HOWTO enable and set up opkg on the Buffalo WZR-HP-G300NH running DD-WRT v24-sp2
- Set up bind-mounts
- Enable jffs2
- Copy /etc to /jffs2/etc and bind-mount /jffs2/etc on top of /etc
- Bind-mount /jffs2/opt on top of /opt
- Probably optional: Bind-mount /jffs2/usr-local on top of /usr/local
- Extract an openwrt rootfs into /opt
- wget http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/ar71xx/default/openwrt-ar71xx-rootfs.tar.gz
- cd /opt && tar zxvf openwrt-ar71xx-rootfs.tar.gz
- N.B. Make sure that /opt/lib and /opt/usr/lib are first in your LD_LIBRARY_PATH
- Install openwrt libs
- wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/uclibcxx_0.2.2-3_ar71xx.ipk
- ipkg -d /opt install uclibcxx_0.2.2-3_ar71xx.ipk
- N.B.: Don’t forget that “-d /opt”!
- Install http://downloads.openwrt.org/backfire/10.03/ar71xx/packages/opkg_513-2_ar71xx.ipk the same way.
- Modify /opt/etc/opkg.conf
- dest root /opt
- get rid of the line saying to overlay root
- Then ln -s /opt/etc/opkg.conf /etc/opkg.conf
- Set LD_LIBRARY_PATH=/opt/usr/lib:/opt/lib:/lib:/usr/lib:/mmc/lib:/mmc/usr/lib
- Add /opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin to PATH
