Kind of a late reply, but I figured someone else might be interested.. it took me half a day to figure it all out.
The short version:
- Grab my q_netem.so and put it in /usr/lib
- Grab my sch_netem.o and put it in /lib/modules/2.4.30
- insmod sch_netem
- netem should now be working. test with something like "tc qdisc add dev eth0 root netem delay 5ms"
The long version:
- Find a linux box or run something in vmware
- svn co https://svn.openwrt.org/openwrt/branches/whiterussian/
- open ./target/linux/linux-2.4/config/brcm, find the line "# CONFIG_NET_SCH_NETEM is not set", and change it to "CONFIG_NET_SCH_NETEM=m"
(depending on the box you compile from, you might have to:
- apt-get install bzip2 unzip zlibc zlib1g-dev
- edit toolchain/Makefile and remove the gdb from "TARGETS:=sed utils binutils gcc uClibc ipkg-utils gdb"
- cp -r ./target/linux/package/openwrt/include/* ./staging_dir_mipsel/usr/include/ )
- run make menuconfig
- make sure package selection -> iproute2 TC / IP are enabled (M)
- make sure kernel configuration -> linux 2.4/support for broadcom based routers is enabled (*)
- if you want to save time compiling (and just need the netem modules, not a complete openwrt build), you can disable everything else
- run make clean world
- find your q_netem.so in ./build_mipsel/iproute2-2.6.11-050330/tc/
- find your sch_netem.o in ./build_mipsel/linux-2.4-brcm/modules/lib/modules/2.4.30/kernel/net/sched/
I'm pretty new at this, so please let me know if I did something wrong or left anything out.