Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: How to build Oleg's latest custom firmware?

  1. #1

    How to build Oleg's latest custom firmware?

    Hi, first I want to thank Oleg, Technik and Antiloop for all the work already done on the WL-500g.

    OK, I have bought one, reflashed it with Oleg's 1.7.5.6-3 firmware, it works great. Thanks! I am booting from a USB key, it's working great.

    What I am trying to do now on my Linux Mandrake 10.0 box is to setup the toolchain to build new firmware.

    So I have downloaded the ASUS GPL package and installed it following the instructions, and it compiles a new firmware image, OK.

    So now how do I use Oleg's latest sources to build a new custom firmware? BTW I have applied Oleg's patch to the kernel in the ASUS package, but how do I install the rest?

    I have found Oleg's previous instructions for the 1.6.xx ASUS firmware but if I understand it correctly Oleg's work now allows one to rebuild the entire firmware.

    Any help from you guys will be greatly appreciated.

  2. #2
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Decompress it and type make. If everything is ok the build process will be completed in several minutes saying "You can now try your new firmware linux.trx ... bla-bla-bla".

    But if you need to change modules/kernel this is something tricky - you need to compile them separately and copy to the directory with my sources. So full build looks like this:
    • decompress ASUS sources
    • patch ASUS kernel with the 1.7.5.6-1 kernel patch (to add the et modules support)
    • patch the same source tree with 1.7.5.6-3 kernel patch (to add all the remaining stuff)
    • execute "make mrproper" in the kernel tree
    • copy .config file from my sources
    • execute "make oldconfig" or "make menuconfig"
    • once configured type "make bzImage modules modules_install DEPMOD=true"
    • once completed mips modules will be in the /lib/modules/2.4.20 (so if you've something in this directory it will be lost..)
    • copy modules to "extra" directory in my sources (check to see it's layout)
    • copy arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz to the piggy.gz in build directory
    • once you've completed type make in my dir

    Regards,
    Oleg.

  3. #3

    Thumbs up Thanks for the explanation

    Hi Oleg,

    Thanks a lot for the help, your clear explanations are very useful.

    I plan to try to compile kernel 2.4.21, 2.4.22 and so on until 2.4.26.

    Also I would like to use the latest uClibc, binutils and gcc for the cross toolchain, but that's for later on.

    My first cross-building test will be a classic "hello, world!" program.

    I'll inform on my progress in the forum.

  4. #4
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by andy
    Hi Oleg,

    Thanks a lot for the help, your clear explanations are very useful.

    I plan to try to compile kernel 2.4.21, 2.4.22 and so on until 2.4.26.

    Also I would like to use the latest uClibc, binutils and gcc for the cross toolchain, but that's for later on.

    My first cross-building test will be a classic "hello, world!" program.

    I'll inform on my progress in the forum.
    In fact broadcom 2.4.20 kernel is heavily patched version and includes features from the 2.4.2x

  5. #5
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    5
    Hi

    I don't know if it's just me, but when running make after untaring Oleg source code gives me an error about a missing zlib.h when compiling squashfs-tools.
    That's because the mips cross compiler is being used to compile squashfs-tools.
    doing:

    cd build/squashfs/squashfs-tools ; make

    will compile squashfs-tools with the native compiler and returning to the untared sources directory and running make sucefully builds the firmware image.

    I'm recompiling the firmware because I want to try changing the firewall (to shorewall maybe) because the asus firewall setup script sucks and also because I needed to apply a patch to usb-storage to get support for my CF/smartmedia cardreader (it's available in http://www.phonk.net/Gedachten/cfreader)

  6. #6
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Squashfs tools are compiled with native compiler. And this works for me. Seems your build environment is something broken.

  7. #7
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    2
    Using Gentoo Linux, I get the same error as gryle: zlib.h not found. And "cd build/squashfs/squashfs-tools ; make" does indeed resolve it.

    Next error is "ldconfig" not found, solved by adding /sbin to PATH.

    Next error was "trx" not found, solved by adding ".../WL500gb_1.7.5.6_GPL/release/tools" to PATH, which is where I downloaded the ASUS stuff.

    Success!

    (Now if only I had a WL-500g box... am just exploring for now)

  8. #8
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    You need to be root to build the firmware (in this case ldconfig should be in path). If it's not, then your distro is stange enough. As for trx, it's better to copy it to the /usr/local/bin.

  9. #9
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    2
    Hi - I prefer to build most software without root privileges. Yes, the ldconfig issue is clearly caused by /sbin not being in the path (it is when I'm root). But as you can see, your setup is almost ready for use as non-root, if you change "ldconfig" to /sbin/ldconfig it would "just work".

    I'm not sure what causes the gcc mixup failure for squashfs, "which gcc" gives me "/usr/bin/gcc" as expected. Could it be a make version difference? In your Makefile, you do "CC=mipsel-uclibc-gcc", and then "make -C $(TOP)/squashfs/squashfs-tools". Could it be that the CC gets exported? Gentoo has gnu make 3.80.

    Thanks for creating a such a terrific build setup, btw.

  10. #10
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    3
    Silly browser, user name fixed now.
    -jcw

  11. #11
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    The problem is that cramfs/squashfs packers will put UIDs/GUIDs as is, i.e. files, which should be owned by root will be in fact owned by other user, so firmware scripts could fail.

  12. #12
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    As for build. I've used RH9, Fedora Core 1, Fedora Core 2 boxes for builds all went fine. Currently my FC2 has make 3.80 and everything work as expected. It should not export CC if it does not specified...

  13. #13
    Quote Originally Posted by Oleg
    ...
    But if you need to change modules/kernel this is something tricky - you need to compile them separately and copy to the directory with my sources. So full build looks like this:
    [list][*] decompress ASUS sources[*] patch ASUS kernel with the 1.7.5.6-1 kernel patch (to add the et modules support)[*] patch the same source tree with 1.7.5.6-3 kernel patch (to add all the remaining stuff)
    ...
    Regards,
    Oleg.
    Hi Oleg, I've compiled OpenVPN for this great piece of hardware, but have problems with tun/tap device: maybe in your kernel this module was not present.

    I have compiled tun from ASUS original sources (as a module) and it is loadable w/o problems ('insmod tun.o' seems ok) but OpenVPN fails trying to use it.

    So I will try to rebuild the kernel (and the firmware).

    ASUS's sources 1.7.5.6 can't be compiled due to lack of 'et' directory in source tree: where can I find the patches 1.7.5.6-1 & -3 to fix it?

    Dave, Italy

  14. #14
    I'm searching these patches too. Oleg can you please post a link?

  15. #15
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356

Page 1 of 2 12 LastLast

Similar Threads

  1. Custom Firmware 1.9.2.7-6b is latest ?
    By flyboy in forum WL-HDD Custom Development
    Replies: 7
    Last Post: 11-01-2006, 17:06
  2. problems my latest firmware
    By rexster in forum WL-500g Q&A
    Replies: 2
    Last Post: 21-05-2005, 04:35
  3. firmware build problem
    By JOCKYW2001 in forum WL-HDD Custom Development
    Replies: 13
    Last Post: 06-10-2004, 15:07
  4. Wireless DHCP not working in latest firmware?
    By PascalF in forum WL-500g Q&A
    Replies: 14
    Last Post: 14-09-2004, 16:25

Posting Permissions

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