WRT54G

From WirelessAfrica
Revision as of 12:16, 22 November 2005 by Yusufk (talk | contribs)

Linksys hack

Firmware

Sveasoft

linksys: adding files to the code.bin firmware

Community I developed a script to add custom files into the Linksys filesystem. This was needed, for example, to add ripd.conf and zebra.conf to /usr/local/etc for the zebra routing daemon.

This is how it works ($LINKSYS_SRC is the directory of your linksys source code eg. /home/djohnson/downloads/linksys/sveasoft/Alchemy-2.3.4/)

1. Copy the script (makeimage.sh) to $LINKSYS_SRC/src/router 2. Copy files that you need to the $LINKSYS_SRC/src/router/mipsel-uclibc/target directory (you can make directories and add/delete files in here) 3. Execute the makeimage.sh script from the $LINKSYS_SRC/src/router directory 4. A new code.bin will be built which can be uploaded to the linksys box

The makeimage.sh script looks as follows:

  1. $include .config
  2. iLINUIXDIR=(shell pwd)
  3. echo $LINUXDIR
  4. export LINUXDIR
  5. export PLATFORMDIR := $(TOP)/$(PLATFORM)
  6. export INSTALLDIR := $(PLATFORMDIR)/install
  7. export TARGETDIR := $(PLATFORMDIR)/target

../linux/linux/scripts/squashfs/mksquashfs mipsel-uclibc/target mipsel-uclibc/target.squashfs -noappend cp ../linux/linux/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz mipsel-uclibc ../../tools/trx -o mipsel-uclibc/linux.trx mipsel-uclibc/vmlinuz mipsel-uclibc/target.squashfs

cp ../linux/linux/arch/mips/brcm-boards/bcm947xx/compressed/zImage mipsel-uclibc dd conv=sync bs=64k < mipsel-uclibc/zImage > mipsel-uclibc/linux.bin cat mipsel-uclibc/target.squashfs >> mipsel-uclibc/linux.bin

cp mipsel-uclibc/linux.trx ../../image/linux.trx cp ../../image/linux.trx ../../image/code.bin

OpenWRT

Freifunk

DD-WRT