FRDMRT's Secret Epistemology

Are we the Easter eggs?

Friday, July 08, 2011

HOWTO enable and set up opkg on the Buffalo WZR-HP-G300NH running DD-WRT v24-sp2

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