New WRV54G Source Compiles

Discussion in 'Cisco Small Business Routers and VPN Solutions' started by ccbadd, Aug 23, 2006.

  1. ccbadd

    ccbadd Network Guru Member

    I just tried to compile the WRV54G code released over the weekend and it does compile fine. I used OpenSuse 10.1. I will do a diff later to see the differences, but I don't know the lib versions used, so they might not compare. This is good news for us as we should be able to add the features requested by our fellow linksysinfo group. Maybee we can add AES encryption and NAT-T!! Next I will try the WRV200 code for a compile.
  2. eric_stewart

    eric_stewart Super Moderator Staff Member Member

    That's awesome news! I'll be watching this space carefully. If we can find a way to install the massaged kernel, maybe using an installed Open S/WAN package (ie: including the NAT-T patch) using the GUI's firmware upgrade screen that would be an added bonus. I've always thought that the Intel XScale IXP425 processor on the WRV54G makes it a powerhouse....even if it's been crippled with (I think) deliberately missing pieces. I'd love to buy another WRV54G off eBay and try out some enhancements.

  3. Rattlehead

    Rattlehead Network Guru Member

    Nice to hear, from a someone who isnt non firware smart, this is good as it mean 3rd party firmware could come out, that would solve some of the issue that Im experiencing anyway. Keep us informed specially with regards to the WRV54G.Nice work.
  4. Toxic

    Toxic Administrator Staff Member

    Great news. I know one of the users on our forums managed to compile firmware for the RV042 though how is beyond me, however he seems to have gone underground now, but it looks a great day for the WRV54G users!

    Well Done! :thumbup:
  5. DocLarge

    DocLarge Super Moderator Staff Member Member

    *sniff* *sniff* (These tears of joy must be expressed.....)


    Go ahead and "do it to it! with your "cc-badd" self!!

  6. TazUk

    TazUk Network Guru Member

    It's indeed very good news :eek:nfire:

    What version of the source were you using?
  7. chris547

    chris547 Network Guru Member

    One thing I did notice about the last release of GPL code is that it now includes .o files. The instructions that came with the code states that this is done because the files are compiled against a third-party source. Unfortunately these files are you one's you will need to alter to add NAT-T so yet again the Linksys GPL code is as useful as a chocolate fire guard!

    I did managed to compile 2.39 sometime ago and noticed that these files in that version seem to be patched with code that conflicts with the NAT-T patches and I took these to be third party patches.

    In the end I gave up with the GPL code and compiled Openixp ( ) instead. I'll only move back to the GPL code when NAT-T can be added.
  8. Toxic

    Toxic Administrator Staff Member

    So your telling us nothing can be added? Telnet, Multi SSID, PPTP, wireless boost, Static DHCP?
  9. chris547

    chris547 Network Guru Member

    You could try adding a few extra features, these's a few things that can be enabled but if your looking to alter freeswan your out of luck, you might want to also watch out for how much free space is left in the e2prom, I experience problems on Openixp after adding too many new functions! I'd recommend modifying a 3.3v phone cable for the serial connection, since that's the main terminal with kernel diagnostics.
  10. ccbadd

    ccbadd Network Guru Member

    Well, I am looking at the code right now and I am a little confused. I went ahead and deleted the object file for ipsec, ipsect.o, and recompiled and compare the new one with the original and it was the same. I just had a quick look at the diffs for Nat-t and it adds patches to the kernel source and frees/wan code. I don't see it affecting any third party code. I have not tried to apply the diffs yet as I have not done any C or Linux programming in ~10 years and I am a little rusty. chris547, could you give me a little more detailed explanation?

    This weekend I might try to manually add the patches and see what happens.

    Edit: I think I see what chris547 means. One of the files that needs to be patched is libfreeswan.c, but this is not included with the source. I sould need to patch the freeswan source before updateing the kernel code with a new I am very surprised that Linksys would release the code that it has due to GPL issues, but freeswan is GPL'ed also.. I going to keep playing though.
  11. makeit_quick

    makeit_quick LI Guru Member

    The code compiles, but can't be loaded !

    Here is a snippet from the uncontrolled WRV54G Yahoo Groups:

    The 2.39.2 code distribution compiles, however there is a twist here:
    The file from Linksys "WRV54G_R2_39_2_02082006.rmt" is exactly
    5,340,218 bytes.
    Before the compilation, there is an existing openrg.rmt in the TGZ with the
    size of 5,346,206 bytes.
    Removing the openrg.rmt file and compiling makes the openrg.rmt file
    but with the size of 5,354,846 bytes.

    Since the RMT file contains compressed information, ~14K
    significates a major diffrence (especially for a Linux embedded

    to add a crime on a sin...
    none of the RMT files (except the one on the linksys WEB) is willing to load on the WRV54G. the device responds with a "The page cannot be displayed"
    error after trying to upload the image from it's web inteface.

    Can someone tell me if they actually managed to load that file? (no speculations, facts please...)

    Note that QuickVPN is broken (according to my earlier posts), and I'd recommend implementing OpenVPN rather than IPSec because it provides better connectivity options (it can go through proxy).

  12. chris547

    chris547 Network Guru Member

    Yes you've found it, there's also files missing further down in particular the freeswan/klips/net/ipsec directory which is heavily required by the NAT-T patch.

    GPL version 2.39 seems to contain these files but their heavily patched with what I think is third party patches. The major changes to 2.39.2 seems to have been just to make it easier to compile and not have to pull sources for it left, right and centre.
  13. ccbadd

    ccbadd Network Guru Member

    chris547, Could you explain or give a link to information on making this serial connector for the WRV54G? I am still going to try to compile a working rmt file just for grins and this would make it easier to test.
  14. makeit_quick

    makeit_quick LI Guru Member

    Recently I ordered a serial link based on the recommendation in seattlewireless:

    the product is at:
    They Ship very fast and reliably.

    I also ordered a JTAG debugger from EBAY: look for "JTAG10 Parallel Port JTAG Programmer for Blackfin, ARM". didn't got it yet.

    note that I don't recommend using the serial for uploading firmware - if it does not load from your web interface, something is wrong with it. forcing it through the serial interface will probably kill your next firmware boot and you'd have to work hard to recover (if at all).

    the compilation has to make a binary identical RMT or Linksys is breaching their GPL agreement...
  15. chris547

    chris547 Network Guru Member

    There's more details on , also shows a picture how it's connected up. I used a Siemens mobile phone data connector with the phone connector cut off and the leads soldiered to the wrv54g.

    I've never needed JTAG as when loading firmware it never overwrites the bootloader. Even if there's something wrong with the firmware the bootloader will still be intact. The only thing you have to watch out for on the serial port is that you don't miss out the "-s 2" option on the load command and overwrite the bootloader! I did start out using the web interface for uploading firmware but I had a problem with a openixp firmware and if you get a problem after the firmwares loaded and you can't access the device you'll certainly need the serial port!
  16. chris547

    chris547 Network Guru Member

    Can't tell you if the .rmt file will load but I do know that it does compile correctly and does run. The thing is as I've mentioned before I've been running Openixp which I've loaded via the serial port and loading this way requires a .img file instead.

    The .img file that the .rmt file is generated from loads perfect, at least one good things come out of this, I've now got a way of restoring Linksys code after loading Openixp. :) If your .rmt file is still not loading its must be a problem either on your pc or in general in generating it.

    By the way if anybody is planning to use a serial connection the username and password on the serial console is "admin"

  17. makeit_quick

    makeit_quick LI Guru Member

    Can you please verify the image size corresponding to post at this thread from 08-24-2006, 07:49 PM .
    We have to resolve the riddle of why can't this be loaded from WEB interface - people with serial interface virtually does not exist (a minor precentage).

    can you please write down the command sequence?
    does the OpenIXP has the same RedBoot loader?

    I'm not sure its the same firmware if there is a diff in the binary file. this could be another source for another version with other bugs, we have to be careful on that. please cross check inage size, we'll try getting from there and understanding if the WEB interface load problem coes from there
  18. chris547

    chris547 Network Guru Member

    Openrg.rmt is 5346206 while Openrg.img is 5346080, the seattlewireless group mentioned that the .rmt file has checksums included, perhaps these haven't been calculated correctly for some reason ?

    Openixp as well as any other firmware is booted just after the standard bootloader. The firmware shouldn't touch the bootloader, even if a download fails the bootloader should be intact. I'm not sure if it's Redboot as it looks different to whats running on the NSLU-2. To get into the bootloader you need to interrupt normal loading by hitting ESC when prompted and to load firmware using the serial port you need to issue the command "load -u tftp://192.168.2.x/imagename.img -s 2". YOU MUST REMEMBER TO ADD "-s 2" otherwise it will try and load the firmware over the bootloader!

    I'd be suprised if there isn't another way to get into the bootloader via a ethernet port, other Linksys products have had this feature but I've tried the technique that is used on the NSLU-2 and that doesn't work. Surely Linksys would have put something in place to recover from a failed download if there was a power failure?

    The .rmt file is certainly derived from the .img file, its one of the last stages of compiling.
  19. makeit_quick

    makeit_quick LI Guru Member

    please note that this file with this size exists in the original gzipped package.
    your compilation probably don't change it because it is already exists.
    if you delete it and recompile you'd find that the file size changes.
    in both cases (size before and after compile) the files do not match the size of the original linksys release.
    I have gone farther and tried to strip down the ext2 and cramfs file systems from the firmware image... this seems diffrent between the public release and the source recompile.
  20. chris547

    chris547 Network Guru Member

    Your right both openrg.rmt and openrg.img wasn't updated, after deleting these files and recompiling openrg.rmt has now become 5346238 and openrg.img is now 5346112.

    Although openrg.img still runs ok so I guess your problem is past the creation of openrg.img. Since I'm downloading via the serial port and tftp I'm using the .img file, but file also seems to be involved in the generation of the .rmt file. Try deleting and see if that fixes things.
  21. makeit_quick

    makeit_quick LI Guru Member

    I tried to reverse engineer the diffrence between the IMG and RMT file.
    it looks like the one latter has a header concateneted with the rest of the IMG file.
    understanding this could allow inexperienced users to load the compiled image or even load OpenIXP through the HTTP interface!!!
    The only problem I have is the *unknown* 32 bytes at offset 0x04-0x23.
    this looks like some signature, but I could not figure how to calculate it (tried Checksum8, 16, 32, 64, CRC16, 32, MD5-128, SHA1-160, SHA256, PSCHF...) but did not succeed.
    I also disassemble the binary file that builds the RMT but didn't figure out whats being done there.

    Anyway, I gave up (for the moment) to try and work with Linksys "source" and moved to investigate OpenIXP - looks interesting at first glance and bit more promising.

    help regarding the *unknown* bytes is appreciated.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice