Opps. The links it not complete i pasted this guide here with complete links (wget commands they are shorted down): http://pastebin.com/xfqY3MpW
Well I think I got it all here. I am sorry if i repeated myself.
Confirmation on this guide:
All you need is copy paste.
You can try this on other routers. But remember change the wget to point to packages compiled for you router.
I can confirm its working on WNDR3700V1 (ar71xx based)
Should work on all other ar71xx based routers.
FOR AR71XX Based Routers ONLY. Confirmed working on ddwrt 25408 and 25760 But should work on all newr versions of DDWRT.
DO THIS ON YOUR OWN RISK. It is 100% safe :D
All changes is made to the USB, we binded to the system dirs. So you can always REMOVE startup script and the USB. Reboot and you are back to before you started this.
When you are done with step 10 you can confirm if opkg update is working or not.
If you get "OPKG NOT FOUND" there is no reason to do the rest. Maybe you missed a step, try a newer DDWRT version ?
If it does keep on and follow the last steps where we add a startupscript and the last things.
1. You need a USB flash drive. Mine is 800~ MB and software: putty and WinSCP. Google it.
2. Format the USB stick as EXT3, using GPARTED, you can download and run a live version of ubuntu from the CD or from a virtual machine.
2.1
I formated my first partition as:
Filesystem: EXT3
Name: Data
Primary
size: 650 MB
and second partition as:
Filesystem: EXT3
Name: System
Primary
size: 150 MB
3. Webinterface
Services > USB
Enable:
Core USB Support
USB Storage Support
Automatic Drive Mount
4.
Webinterface
Services > NAS
Enable Sambe Sharing
5.
Put the USB in the router and restart it.
6.
Look in the webinterface that the 2 partitions on your USB drive is mounted as
/tmp/mnt/sda1
/tmp/mnt/sda2
7. Putty:
cd /tmp/mnt/sda1
touch optware.enable
cd /tmp/mnt/sda2
mkdir etc opt root bin lib usr
touch optware.enable
chmod 755 etc opt root bin lib usr
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /tmp/mnt/sda2/etc/
cp -a /bin/* /tmp/mnt/sda2/bin/
cp -a /lib/* /tmp/mnt/sda2/lib/
cp -a /usr/* /tmp/mnt/sda2/usr/
sleep 5
mount -o bind /tmp/mnt/sda2/etc /etc
mount -o bind /tmp/mnt/sda2/bin /bin
mount -o bind /tmp/mnt/sda2/lib /lib
mount -o bind /tmp/mnt/sda2/usr /usr
mount -o bind /tmp/mnt/sda2/opt /jffs
8.
cd /tmp
ipkg -d / -force-depends install uclibcxx_0.2.4-1_ar71xx.ipk
ipkg -d / install libc_0.9.33.2-1_ar71xx.ipk
ipkg -d / install opkg_618-3_ar71xx.ipk
You should see:
Connecting to openwrt. And downloading.
9.
cat > /etc/opkg.conf << EOF
dest root /opt
dest ram /opt/tmp
lists_dir ext /opt/tmp/var/opkg-lists
EOF
10.
umount /jffs
mount -o bind /tmp/mnt/sda2/opt /opt
mount -o bind /tmp/mnt/sda2/root /tmp/root
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
opkg update
-You should see af running opkg downloading something and Update list of available packes.
IF ITS TELLING YOU OPKG NOT FOUND. Your version of DDWRT does not work with this or you missed a step. Remove the USB drive and format it. And try again, or try a other DDWRT version or skip this
-else keep going.
11.
cat > /tmp/mnt/sda2/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
12. Webinterface. Administration > Commands
CHANGE THE 192.168.1.104 to your ATV IP ADDRESS AND 192.168.1.1 TO YOUR ROUTERS:
- iptables forward port 80 to 8080 and 443 to 8443, so we still can use the routers webinterface :)
- The rest is to mount our usb on boot. Without we will lose it everytime we reboot the router.
-Change ip's and paste this:
#! /bin/sh
sleep 2
iptables -t nat -A PREROUTING -s 192.168.1.104 -d 192.168.1.1 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.1:8080
iptables -t nat -A PREROUTING -s 192.168.1.104 -d 192.168.1.1 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.1:8443
sleep 10
if [ -f /mnt/sda1/optware.enable ]; then
if [ -f /mnt/sda2/optware.enable ]; then
mount -o bind /tmp/mnt/sda2/bin /bin
mount -o bind /tmp/mnt/sda2/etc /etc
mount -o bind /tmp/mnt/sda2/lib /lib
mount -o bind /tmp/mnt/sda2/opt /opt
mount -o bind /tmp/mnt/sda2/usr /usr
mount -o bind /tmp/mnt/sda2/root /tmp/root
sleep 2
else
exit
fi
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
13. Reb00t the router.
14. Putty:
opkg update
-You should see downloading and updated list.
15.
cd /tmp
opkg install libc_0.9.33.2-1_ar71xx.ipk
-And you are done with installing optware (opkg)
16.
Now:
opkg install python
opkg install python-openssl
opkg install python-expat
opkg install nano
WinSCP:
Transfer PlexConnect with the certificates to /tmp/root/
Putty:
chmod -R +x /tmp/root/PlexConnect
chmod -R 755 /tmp/root/PlexConnect
-run plexconnect so it will create Settings.cfg
cd /tmp/root/PlexConnect
./PlexConnect.py
-wait few secs and stop it with
CTRL + C
nano /tmp/root/PlexConnect/Settings.cfg
Change:
Port 80 and 443 to 8080 and 8443
enable_dnsserver = False
enable_plexconnect_autodetect = False
-And change 192.168.1.1 to your routers lan IP
ip_plexconnect = 192.168.1.1
CTRL + X and y for save.
-Webinterface
Services > Services
Change 192.168.1.1 to routers IP and add this to the "Additional DNSMASQ Options"
address=/trailers.apple.com/192.168.1.1
address=/atv.plexconnect/192.168.1.1
And you are done.
Let me know if you got any questions. And share your result.