How to Compile Busybox For My WN2500RP?

Hey there! I've got a Netgear WN2500RP that I want to do a block-level backup of it's existing firmware. The issue is that it doesn't come with much utilities in it's busybox, and many things are missing including dd.

I'm trying to compile busybox for it, so that I can download a busybox including dd onto it to do the backup, but I can't figure out how to get mipsel-linux-gnu-gcc to generate an executable that works, even for a simple hello world C file.

This is the closest thing I've gotten:

 mipsel-linux-gnu-gcc hello.cc -o hello -mips1 -mfp32 -mabi=32 -mno-shared

But when run it says:

unknown errorIllegal instruction

Also, the flags for the compiled executable are:

Flags:                             0x74001005, noreorder, cpic, o32, mips16, mips32r2

Which doesn't match those of the native busybox on the router ( oh, I lost them I'll have to find them again, but I'm pretty sure it said mips1 not mips32r2 ).


Another thought was to try and see what could be done for backup in the bootloader, but again, the bootloader on this model seems particularly limited. None of the documentation for commands that I've seen for the CFE prompt work except ifconfig and boot. There's no help command or anything to figure out what commands can be used in the bootloader.

Reconsider if you really want to go that route, bcm53xx support is quite basic and there are no adequate wireless drivers.

You either need to use the toolchain that was used for the OEM firmware or compile statically (which comes with quite a few caveats).

Yeah, I ended up just putting OpenWrt on it without worrying about backing it up first. This is really pretty much a trash router for me anyway and I'm just using it for learning and experimentation. With or without OpenWrt I don't have a real use for it, so it'll be fine however it ends up. OpenWrt seems pretty cool!

Ah, OK. I thought that shouldn't be too difficult, but decided it just wasn't worth the time after several failed attempts.