Hacking the router
I've been playing some more with my router. For my experiments I used the latest firmware version, 3.01.25. It took me quite a bit of brain-mangling until I found out that I didn't need to create a completely new kernel as I interpreted the line
2. Make custom modifications to source code and compile.
in the README file in the Netgear firmware image. (I really tried hard to compile the kernel and in the end I've been successful but more on that later) Instead it's enough to continue with item #3, changing to root and unpack the target image directory. Then it's possible to just put the newly compiled binary which was created in the way described in all the other DG834-hacking pages into the right place in the target directory, recreate the image and upload it to the router. That's it. I've already managed to make my HelloWorld permanent on the router.
But it's not possible to create a completely new kernel the same way.
To create a new kernel I had to cruise around quite some obstacles:
- The toolchain from Linksys contains gcc 3.3 (all versions of the toolchain even the old ones) but the kernel requires an old one. Something like 2.95.3. You can compile standalone applications for the router but it's useless for a selfmade kernel
- I just found one reference to the right compiler toolset for the kernel but I've lost the link, sorry. Nevertheless, the toolset needed for compiling the kernel is here. Put the directory 'opt/hardhat/previewkit/mips/fp_le/bin' into your PATH
- Somewhere during the creation-process there is an error with 7zip. It's in the tools-directory of the netgear-source, put that directory into your PATH
- Some of the compiler toolset binaries require a shared lib named 'libbfd' in version 2.11.90, it can be found here. Just download the file and put it somewhere in your LD_LIBRARY_PATH
If these prerequisites are met, it's possible to compile and generate a own kernel. Run 'make menuconfig' and save and then just 'make dep ram_zimage_pad'.
I think the new kernel has to be merged somehow into the router image and the checksum re-created but I didn't try that yet. So no new kernel so far just home-brewn software. But that's plenty of room to play for now.
The next thing will be to update the busybox on the router. I just have to decide what commands I need in there...