Академический Документы
Профессиональный Документы
Культура Документы
html
2. Configure DD-WRT
Under Services->Services->Secure Shell: * Enable SSHd * Click Apply Settings Under Services->USB: * Enable Core USB Support * Disable USB Printer Support (enable it if you need printing support) * Enable USB Storage Support * Enable Automatic Drive Mount * Set Disk Mount Point to /mnt * Click Apply Settings
5. Install the required libraries for the MIPS (big-endian) architecture and OpenWRT's opkg
cd /tmp wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33-107_ar71xx.ipk wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-2_ar71xx.ipk ipkg install libc_0.9.33-107_ar71xx.ipk opkg_618-2_ar71xx.ipk You will get the following output with error messages. You can't avoid it so don't worry about it. ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian You probably want to run `ipkg update' ERROR: File not found: //usr/local/lib/ipkg/lists/non-free You probably want to run `ipkg update' ERROR: File not found: //usr/local/lib/ipkg/lists/backports You probably want to run `ipkg update' /bin/ipkg: line 1184: sort: not found Unpacking libc...Done. Configuring libc...Done. ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian You probably want to run `ipkg update' ERROR: File not found: //usr/local/lib/ipkg/lists/non-free You probably want to run `ipkg update' ERROR: File not found: //usr/local/lib/ipkg/lists/backports You probably want to run `ipkg update'
/bin/ipkg: line 1184: sort: not found Unpacking opkg...Done. Configuring opkg...Done. Type the following lines to create the configuration file for opkg: cat > /etc/opkg.conf << EOF src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages dest root /opt dest ram /opt/tmp lists_dir ext /opt/tmp/var/opkg-lists EOF Let's make sure everything works properly: umount /jffs mount -o bind /mnt/sda_part1/root /tmp/root mount -o bind /mnt/sda_part1/opt /opt export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib' opkg update You should see: Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz. Inflating http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz. Updated list of available packages in /opt/tmp/var/opkg-lists/snapshots.
6. Set the startup script to make the changes take effect each time upon reboot
Under DD-WRTs web interface, Administration->Commands, input the following commands in the window then click "Save Startup": #!/bin/sh sleep 5 if [ -f /mnt/sda_part1/optware.enable ]; then mount -o bind /mnt/sda_part1/etc /etc mount -o bind /mnt/sda_part1/root /tmp/root mount -o bind /mnt/sda_part1/opt /opt else exit fi if [ -d /opt/usr ]; then export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib' export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin' else exit fi Note that some users have reported issues that they were able to fix by making the script sleep 10 seconds instead of 5.
export PATH='/sbin:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/usr/bin:/usr/sbin:/opt/usr/local/bin' export PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' export TERMINFO='/opt/usr/share/terminfo' EOF The above script will set the variables for us and also provide a nice colored command line prompt.