For work, I started experimenting with writing C programs for (flashed) Linksys WRT54GL routers.
Basically, the WRT54GL routers are running OpenWRT, a very lightweight linux distro, specifically designed for those type of routers. The router uses a Broadcom CPU, and uses the MIPS architecture. For more information, check the OpenWRT site at http://openwrt.org/.
At first, I was a bit worried about the differences between the full availability of the GNU C Libary, and the very slim version on the OpenWRT distro. Luckily, I quickly found out that the C Library on OpenWRT has the most used functions well covered.
Compiling C programs for MIPS might seem tricky (since you can't plainly fire up your GCC), but OpenWRT has an SDK available at their site, along with a bit of an explanation on how to get it compiled with it.
However, if your C program is very small, and doesn't use fancy Makefiles and such, you can directly execute the MIPS-GCC compiler; a bit like this:
$ cd OpenWrt-SDK-Linux-x86_64-1/staging_dir_mipsel/bin $ ./mipsel-linux-gcc -c program.c $ ./mipsel-linux-gcc -o program program.o
That's it for now. More explanations and findings will be reported as I learn a bit more.
« ‹ | December 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |