Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 61

Thread: Building the custom firmware

  1. #31

    Internal connector

    There is an internal connector on the WL-500 board. You
    can find a picture on this page.

    http://www.i4shop.net/cz/iObchod/Web...p?idprod=wl500

    the image itself:

    http://www.i4shop.net/cz/iObchod/Img/WL-500/wl500e.jpg

    Originally posted by zomk3
    Just as an idea. Isn't there a diagonistic port on the side of the board ?

  2. #32
    Join Date
    Feb 2004
    Location
    Minnesota, USA
    Posts
    25

    (Re)Building Firmware

    If I unpack and repack the factory firmware using the instructions on this forum, the new packed file is not identical to the original, even though I didn't modify anything in the build directory. Is this normal, or am I doing something wrong?

    Thanks.

  3. #33
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    Yes, there is a small difference in the cramfs headers. Some of the fields are unique for every pack operation (they are choosen randomly by mkcramfs). Also, be sure you've added ASUS trailer to the cramfs.
    Regards,
    Oleg.

  4. #34
    Join Date
    Feb 2004
    Location
    Minnesota, USA
    Posts
    25
    Thanks, Oleg, I won't be concerned about the small difference in size and content. How did you arrive at the offsets you use in the dd commands in your extract scripts? [Never mind - I see that was answered above.]

    Based on your work, I decided to get the WL-500g instead of a Linksys unit, since it looks like I can easily add functions by putting stuff on a USB "drive" and making limited changes to Busybox and/or init scripts, etc. instead of having to rebuild the whole firmware package, as the Linksys hackers have done.

    In looking at the scripts, I don't see an inittab, or an /etc/nit.d/rcS file as mentioned in the busybox docs (http://www.busybox.net/downloads/BusyBox.html). Could anyone explain the boot process and how the scripts in /init get run an in what order?

    Thanks.
    Last edited by RCR; 24-02-2004 at 07:15.

  5. #35
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    Originally posted by RCR
    Thanks, Oleg, I won't be concerned about the small difference in size and content. How did you arrive at the offsets you use in the dd commands in your extract scripts? [Never mind - I see that was answered above.]

    Based on your work, I decided to get the WL-500g instead of a Linksys unit, since it looks like I can easily add functions by putting stuff on a USB "drive" and making limited changes to Busybox and/or init scripts, etc. instead of having to rebuild the whole firmware package, as the Linksys hackers have done.

    In looking at the scripts, I don't see an inittab, or an /etc/nit.d/rcS file as mentioned in the busybox docs (http://www.busybox.net/downloads/BusyBox.html). Could anyone explain the boot process and how the scripts in /init get run an in what order?

    Thanks.
    The offsets are coming from the trx header (see the corresponding file in the linksys sources). As for WRT54G - it's seems it's pretty easy to do the hardware "hacking" to add USB support to the WRT54G and other broadcom based devices.

    As for Busybox - ASUS has changed the busybox. They're launching the /init/boot

  6. #36
    Join Date
    Feb 2004
    Location
    Minnesota, USA
    Posts
    25

    Build tools

    Based on Oleg's work, I've written some tools to help unpack and repack the trx files. These will work with any trx file, even the modified ones since they unpack based on info found in the trx header. This makes it easy to, for example, unpack Oleg's custom firmware, add or modify something, and repack it without having to apply his patches to the original firmware.

    If anyone is interested, I can provide them to Antiloop so that others can download them.

    Now to fiddle with the firewall and add an SSH deamon...

  7. #37
    Join Date
    Dec 2003
    Location
    Czech Republic
    Posts
    270
    A good job, RCR, thanks. I am sure it will be interesting for some people. Does it run in Windows or under Linux? If the length of zipped file is under 200 KB, perhaps you can attach it here (in HOW TO TALK section).
    Last edited by Technik; 29-02-2004 at 11:06.

  8. #38
    Join Date
    Nov 2003
    Location
    Eindhoven
    Posts
    2,407

    Re: Build tools

    Originally posted by RCR
    Based on Oleg's work, I've written some tools to help unpack and repack the trx files. These will work with any trx file, even the modified ones since they unpack based on info found in the trx header. This makes it easy to, for example, unpack Oleg's custom firmware, add or modify something, and repack it without having to apply his patches to the original firmware.

    If anyone is interested, I can provide them to Antiloop so that others can download them.

    Now to fiddle with the firewall and add an SSH deamon...
    send them!

    to forum@chupa.nl
    tx

  9. #39
    Join Date
    Feb 2004
    Location
    Minnesota, USA
    Posts
    25

    "wltools" firmware extract/pack tools

    I just emailed them. Here's the text of the README file:

    This is a set of tools to unpack and repack firmware files for the Asus WL-500g
    wireless router. The tools should run on any Linux system. The license for the
    programs is at the end of this file.

    See the scripts, source, and make file for setup and usage instructions. You
    will need to download the Linksys source. For example, get wrt54gv2.2.02.2.tgz
    from http://www.linksys.com/support/gpl.asp.

    The procedure is as follows:

    wlextract old-firmware-file.trx

    uncram

    [Modify the root file system in the ./build directory.]

    mktrx

    Afterward, you can use the WL-500g's web interface to upload the new firmware
    file ("firmware.trx")

    The trx file consists of 2 segments: the kernel and cramfs image with appended
    Asus trailer.

    The uncram program uses the sudo command to allow non-root users to mount the
    cramfs file system.

    The root file system directory ("build") will be owned by root. Modified and
    additional files should be owned by root and be in the root group.

    After loading modified firmware with router's upgrade web page (wait for
    transfer to complete), connections may not be allowed. Power off and on the
    router to recover.

    If you load bad firmware (power LED blinking, unable to connect) power off,
    hold down reset button, and turn power back on. Then use the Asus
    "Firmware Restoration" tool to reload good firmware.

    Thanks to Oleg at the www.chupa.nl forums for discovering the structure of the
    firmware files and documenting them on the forums. Thanks too to the Antiloop
    at www.chupa.nl for providing the forums for exchange of WL-500g technical
    info.

  10. #40

    Re: Build tools

    Originally posted by RCR
    Based on Oleg's work, I've written some tools to help unpack and repack the trx files. These will work with any trx file, even the modified ones since they unpack based on info found in the trx header. This makes it easy to, for example, unpack Oleg's custom firmware, add or modify something, and repack it without having to apply his patches to the original firmware.

    If anyone is interested, I can provide them to Antiloop so that others can download them.

    Now to fiddle with the firewall and add an SSH deamon...
    I am currently examining some of the custom firmwares for the linksys router. Especially regarding the Dropbear ssh deamon.
    I think till end of this week i can proviade a modified firmware based on olegs with dropbear.

  11. #41
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    Guys, have you read my other posts? There is already dropbear ssh daemon & the necessary packing scripts.

  12. #42
    Originally posted by Oleg
    Guys, have you read my other posts? There is already dropbear ssh daemon & the necessary packing scripts.
    Just as a quick question, why didn't you use 0.41 version of Dropbear ?

  13. #43
    Join Date
    Feb 2004
    Location
    Minnesota, USA
    Posts
    25
    Originally posted by Oleg
    Guys, have you read my other posts? There is already dropbear ssh daemon & the necessary packing scripts.
    Thanks for the heads up on the ssh addition. As to the packing scripts, your original will only unpack the factory firmware, I wanted to be able to unpack yours and modify it without rebuilding busybox, etc., which is why I wrote one that uses the TRX header instead of dd and "magic" numbers. The packing stuff was for my convenience, so I threw it in. There are some changes I want to make for myself - writing the tools helps me to understand the environment rather than just following a cookbook approach.

    Working on these mass-produced routers is a great way to brush up on embedded programming skills, which is one reason for my interest in the Asus and Linksys units. It occurs to me that the Asus, with its parallel port, would be a great controller unit for any number of applications.


    I haven't looked at your latest with SSH yet (I'm at work...). In your post you mention compiling busybox with uclibc. How much space did that free up? Did you recompile both busybox binaries? Allso, do you have any idea why Asus used 2 different busybox binaries?

    Thanks for your help.
    Last edited by RCR; 01-03-2004 at 18:29.

  14. #44
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    Originally posted by zomk3
    Just as a quick question, why didn't you use 0.41 version of Dropbear ?
    Ok, I've downloaded dropbear-0.39 some time ago. And I've not rechecked the dropbear site until today. Anyway, I think the firmware could be safely rebuild with 0.41.

  15. #45
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,353
    Ok, your unpack tool could be usefull. As for pack - have not seen this yet. If you've used my Makefile stuff, please retain the GPL license and mention the original copyright. Also there is a good idea to make the GPLed version of trx tool.
    I'm also has something like this - the untrx tool, to break the trx on to the parts and simple script which call untrx & uncramfs (available on the internet, and also patched just because of the stupid error). Ok, I've never release this to public.

    As for busyboxes - starting with my 1.6.5.3-2 firmwares there is only one busybox binary. The only reason why ASUS have included two binaries was as seems the fact that second busybox was used for insmod only. They probably has the problems with insmod (and everybody have it with stock busybox), which is segfaults on the brcm modules. If you review my patch you will notice the required patch for insmod. May be Asus guys was lazy enough to recompile busybox or whatever.

    As for libc/uclibc stuff. I've tried to compiling dropbear and busybox against the glibc dynamically to reduce the size of the resultant firmware, added needed resolver libraries, but it was 8k larger than the maximim allowed size. So, I decided not to use glibc resolver and parts that depends on it. I've relinked the glibc without the busyboxes and I've freed up around 250 k in the original firmware and this was large enough to include uclibc (relinked also).

    Regards, Oleg.

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Custom Firmware v1.1.2.8
    By JOCKYW2001 in forum WL-HDD Firmware Releases
    Replies: 42
    Last Post: 29-04-2005, 17:35
  2. Building Firmware 1.1.28
    By ankn99 in forum WL-HDD Q&A
    Replies: 2
    Last Post: 10-01-2005, 18:21
  3. New custom firmware - 1.7.5.6-1
    By Oleg in forum WL-500g Custom Development
    Replies: 26
    Last Post: 30-04-2004, 09:05

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •