【轉貼】4013B使用同家廠商不同晶片LinksysWrt54g改造範本



贊助商連結


purk
2004-06-26, 07:33 AM
使用晶片
AirForce BCM94702 is system-on-a-chip which features a powerful MIPS32


跟4013B都是MIPS32的CPU


How to build custom firmware from 1.42.2Question: Does anybody have a quick (one page or less) write-up or notes that describe how to build a firmware image from the linksys sources? Also where is the toolchain for building binaries for the WRT54G?

Answer : Here is quickly answer for you:

1. Download source code at: http://www.linksys.com/support/gpl.asp - decompresse to un folder in your linux box (ex /home/toto/works/firmware

2. Copy /home/toto/works/firmware/tools/brcm to /opt or make a symbol link for save your spacedisk and your times

3. Set Path to /opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin

4. cd /home/toto/works/firmware/release/src/linux/linux

5. make symlinks

6. make dep

Comment:' Steps 4-6 is not needed, the make at step 8 does it automatically. If you notice, virgin source does not even have a .config file in the directory, how are you supposed to make dep if there's no .config to dep from? -sf

7. cd /home/toto/works/firmware/release/src

8. make

Now, you'll get your firmware in /home/toto/works/firmware/release/image

Have Fun




http://www.seattlewireless.net/index.cgi/LinksysWrt54g
http://www.seattlewireless.net/index.cgi/LinksysWrt54g
http://cmeerw.org/dev/book/print/97
http://cmeerw.org/dev/book/print/97

贊助商連結


purk
2004-06-26, 09:44 PM
got a shell on the boxThe idea is simple. Replace the httpd binary in /usr/sbin of the firmware to any binary we want. For instance, I replaced it by a telnet daemon. For that, I used busybox 1.00.pre5, which, I must say, is pleasently well packaged, and delightfully easy to use. Here is what I did:
make menuconfig
Check General configuration/Use the devpts filesystem for Unix98 PTYs
Check Build options/Build BusyBox? as a static binary (no shared libs)
Check Build options/Do you want to build BusyBox? with a Cross Compiler? and set Cross compile prefix to /opt/brcm/hndtools-mipsel-linux/bin/mipsel-linux- (or whatever is your cross compiler prefix, this is for the one given by linksys GPL source for wrt54)
Check Networking options/httpd and Networking options/telnetd
exit and save configuration
make dep
edit include/applet.h and change APPLET(httpd, httpd_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER) to APPLET(httpd, telnetd_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)
make
make a new firmware by replacing /usr/sbin/httpd by busybox
telnet on your box
You can uncheck any applet you don't want during the busybox config


Where can I download a version of the firmware with busybox? Or can anyone maybe send it to me to tobias AT netmadeira DOT com ?
A: You can get it at 3.00.07.trx. Use at your own risk. It is the 3.00.07 firmware version where the web server /usr/sbin/httpd has been renamed to /usr/sbin/httpd.ori. The /usr/sbin/httpd is busybox running telnetd applet by default. Upon installation, telneting to the box gives a busybox shell. You can run the normal web server by

cd /www;/usr/sbin/httpd.ori

To use the custom busybox,

ln -s /usr/sbin/httpd /tmp/busybox;/tmp/busybox

purk
2005-04-25, 02:38 AM
使用晶片
AirForce BCM94702 is system-on-a-chip which features a powerful MIPS32


跟4013B都是MIPS32的CPU