1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

modify tomato firmware under windows

Discussion in 'Tomato Firmware' started by leechange, Nov 21, 2007.

  1. leechange

    leechange LI Guru Member

    step 1: download the tools

    step 2: unpack firmware
    UnpackTomato.exe firmwarename
    then we can find the rootfs of the firmware in the directory "root"
    (we can do the step by "winscp" if we have a router device)

    step 3: modify
    we can add, remove and modify the directories, symbol links, scripts, web interface and every text files
    we can add and remove binary files.(modify binary file is not supported)
    dev and ipc files are not supported

    A symbol link in the firmware is descripted "shortcut" and the tartget in the property "Description"

    step 4: backup the original firmware

    step 5: pack new firmware
    PackTomato.exe firmwarename

    done. good luck!
  2. mstombs

    mstombs Network Guru Member

    Does this actually work? A long time ago I looked at unsquash tools for windows, but even Cygwin needed a Linux formatted disk partition to work. Windows, by default, does not understand that upper and lower case filenames are different, Linux file properties or symbolic links - unless you know different?

    I guess you have recompiled a version of Jeremy Collake's firmware mod kit http://www.bitsum.com/firmware_mod_kit.htm under windows? Please note his tool is for Linux and all source files are GPL and available.
  3. leechange

    leechange LI Guru Member

    It seems to work actually.

    Yes, there are many differences between windows and linux file system.
    Fortunately, these differences can be obviateted in the tomato firmware.
    Case sensitive: there is only one pair of files /lib/modules/2.4.20/kernel/net/ipv4/netfilter/ipt_TOS.o & ipt_tos.o
    Linux file properties: although no user-read write execute, we have the ReadOnly, Hidden and Archive properties. How about the sticky bit, Group and Other? There is a single user in the tomato environment, his name is "root".
    Symbolic link: is descripted a "shortcut" in windows, and the target of symbolic link in the property "Description" of the shortcut.
    Don't worry about each difference, the tool is "PackTomato", not "PackSquashfs".

    I guess the most important is the source. They are adapted from Phillip Lougher's squashfs tools and Lougher's source files are GPL, so we can download the tool's source file at UnpackTomato_src.rar and PackTomato_src.rar. But the compiler is not the gcc, it's Delphi 2000 5.00.2195 SP4

Share This Page