1.本地目录根据实际修改2.opkg源:http://downloads.openwrt.org/backfire/10.03.1/ar71xx/packages/# From: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=86912# 1. Prepare the USB disk# Create an ext3 partition using GParted for instance#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#3. Plug the USB drive into the router and reboot it#* SSH into your box using user root and make sure, using mount, that your USB stick was mounted correctly (you can also check this on the web #interface under Services->USB).#4. Create and prepare necessary structure#* SSH into your box using user root if not already done at previous step:cd /mntmkdir etc opt roottouch optware.enablechmod 755 etc opt rootmkdir opt/libchmod 755 opt/libcp -a /etc/* /mnt/etc/mount -o bind /mnt/etc /etcmount -o bind /mnt/opt /jffs#5. Install the required libraries for the MIPS (big-endian) architecture and OpenWRT's opkg#cd /tmpwget http://downloads.openwrt.org/backfire/10.03.1/ar71xx/packages/libc_0.9.30.1-43.32_ar71xx.ipkwget http://downloads.openwrt.org/backfire/10.03.1/ar71xx/packages/opkg_576-2_ar71xx.ipkipkg install libc_0.9.30.1-43.32_ar71xx.ipk opkg_576-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 << EOFsrc/gz snapshots http://downloads.openwrt.org/snapshots/trunk/ar71xx/packagesdest root /optdest ram /opt/tmplists_dir ext /opt/tmp/var/opkg-listsEOF#Let's make sure everything works properly:umount /jffsmount -o bind /mnt/root /tmp/rootmount -o bind /mnt/opt /optexport 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-WRT’s web interface, Administration->Commands, input the following commands in the window then click "Save Startup":##!/bin/sh#sleep 10#if [ -f /mnt/optware.enable ]; then#mount -o bind /mnt/etc /etc#mount -o bind /mnt/root /tmp/root#mount -o bind /mnt/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.## 7. Modification of the profile file## SSH into your box then copy/paste the commands below to PuTTY window to create a script running each time when user root logins:##cat > /mnt/root/.profile << EOF#export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib:/opt/usr/local/lib'#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.##8. Reboot and check##Reboot your device with reboot#When it's back on the track, SSH into your box.#Run opkg update##You can start installing all kind of wild things ! Yeeehhhaaa !
2014年8月21日星期四
DD-WRT Optware 安装(以Athreos为例)
订阅:
博文评论 (Atom)
没有评论:
发表评论