OpenWrt Forum Archive

Topic: Kamiakze Firmware > 4MB

The content of this topic has been archived on 14 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I'm trying to compile Kamikaze 7.09 but I get an error that the Image is too large. I guess everytime the squashfs file is bigger as 4MB. I want to install the firmware to an Asus wl-500gP which has 8 MB flash.
I'm getting following error:

Creating little endian 3.0 filesystem on /home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.squashfs, block size 65536.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 5056.67 Kbytes (4.94 Mbytes)
        29.32% of uncompressed filesystem size (17243.97 Kbytes)
Inode table size 7068 bytes (6.90 Kbytes)
        27.46% of uncompressed inode table size (25742 bytes)
Directory table size 7027 bytes (6.86 Kbytes)
        57.53% of uncompressed directory table size (12214 bytes)
Number of duplicate files found 0
Number of inodes 779
Number of files 500
Number of fragments 41
Number of symbolic links  206
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 73
Number of uids 1
        root (0)
Number of gids 0
/home/oconnor/Desktop/kamikaze_7.09/staging_dir_mipsel/bin/trx -o /home/oconnor/Desktop/kamikaze_7.09/bin/openwrt-brcm47xx-2.6-squashfs.trx -f /home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/loader.gz -f /home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/vmlinux.lzma -a 1024 -f /home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.squashfs -a 0x10000 -A /home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/fs_mark
mjn3's trx replacement - v0.81.1
fread failure or file "/home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.squashfs" too large
make[3]: *** [install] Error 1
make[3]: Leaving directory `/home/oconnor/Desktop/kamikaze_7.09/target/linux/brcm-2.4/image'
make[2]: *** [image_install] Error 2
make[2]: Leaving directory `/home/oconnor/Desktop/kamikaze_7.09/target'
make[1]: *** [target/install] Error 2
make[1]: Leaving directory `/home/oconnor/Desktop/kamikaze_7.09'
make: *** [world] Fehler 2

What can I do to build an larger Image?

(Last edited by Oconnor on 24 Oct 2007, 12:46)

If the

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments Filesystem size

is lager then 4,88 Mbytes. I'm getting following error

fread failure or file "/home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.squashfs" too large

I openned a ticket https://dev.openwrt.org/ticket/2626

As a work-around, you might select a jffs2 image type. With the 8MB of flash, you can easely do that.

(Last edited by basmevissen on 29 Oct 2007, 18:04)

Same Error with jffs

fread failure or file "/home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.jffs2-64k" too large

and I think jffs2 is not compressed. So the Image gets a lot bigger as 8 MB.

(Last edited by Oconnor on 30 Oct 2007, 11:34)

Ah, horror. The filesystem is 17MB!! What's all in there?

I installed Sftp, Openvpn, eatherwake, hostapd, tcpdump, ntpclient, webif, a lot of usb stuff, php5, lighttpd, sqlite and samba. The squashfs file is about 4.75 MB and the jffs file would be 16,7 MB. All of packages are working and running but i also want to install screen, ntfs-3g, curl, spca for webcam and maybe amule and torrent. I have an USB Stick and could install all packages there, but I like to have it working without USB. Because if I update may router I have to install all packages again at the USB stick.
I have running a blog and a forum at the router with sqlite as database. And also have samba running for sharing some files in my lan, sftp to get acces to the files from the internet. And a minipci Atheros Card for wlan. I'm experimenting with a webcam and want to have a downloadmanager running at the router.
Where can I change the file System Limit of 17 MB at jffs? Or the Limit of 4,78 MB at squashfs filesystem?

(Last edited by Oconnor on 30 Oct 2007, 12:42)

Ah, een complete server in a router :-)
The jffs2 file system has no limit AFAIK. But the flash is only 8MB, so 17MB won't fit.

basmevissen wrote:

Ah, een complete server in a router :-)
The jffs2 file system has no limit AFAIK. But the flash is only 8MB, so 17MB won't fit.

There must be a limit! Or why do I get

fread failure or file "/home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.jffs2-64k" too large

then I try to compile my Image. I do not need to Install the Image on a flash, I could install the Image to an usb-stick. And the Kernel on the flash loads that Image. Or I could install a Image at a larger flash. But there must be a limit for jffs2 (around 17MB) and squashfs (around 4.88MB). So what part of the code generates that output

fread failure or file "/home/oconnor/Desktop/kamikaze_7.09/build_mipsel/linux-2.6-brcm47xx/root.jffs2-64k" too large

and checks if it is too large?

Hi, I found out that in the file ".../trunk/config.in" is written

source "target/linux/*/image/Config.in"

    config TARGET_ROOTFS_FSPART
        int "Filesystem part size (in MB)"
        depends X86_GRUB_IMAGES || TARGET_ROOTFS_EXT2FS || TARGET_rb532 || TARGET_olpc
        default 16
        help
            Allows you to change the filesystem partition size

So I guess that the limit of the squafs is at 16 MB. If I change in that config file the 16 to 26 and I recompile my Image, I still have the limit at 16 MB. So there must be an other Limit of the filesystemsize. Where can I find that?

The file ".../trunk/staging_dir/host/bin/trx" genrates the output " fread failure or file ".../linux-2.6-brcm47xx/root.squashfs" too large. But that file is already a binary file. So I can't change any values. What file generates the file ".../trunk/staging_dir/host/bin/trx" ?

basmevissen wrote:

Ah, een complete server in a router :-)
The jffs2 file system has no limit AFAIK. But the flash is only 8MB, so 17MB won't fit.

You are right that a 17 MB jffs file system won't fit into a flash that only has 8MB. But I don't want to install the jffs system of 17MB I want to install the squashfs filesystem. The squashfs filesystem is the same as the jffs filesystem. Except that the squashfs filesystem is the compressed jffs. And compressed means that 17 MB jffs is about 5MB squashfs. And the 5 MB will fit into a 8 MB flash! But because of that error I can't compile larger images that will fit into the flash. So how can I compile larger images?

I got it. I changed the value TRX_MAX_LEN in the file ".../trunk/tools/firmware-utils/src/trx.c" in line 63 "#define TRX_MAX_LEN    0x5A0000" to a somthing higher value and then it worked smile!

edit:
Or does it have any reason to limit the squashfs filesystem to 5898240 bytes (0x5A0000) or better said to 5,9MB. Can I now have problems after flashing my router with an larger image? If I just not reach the 8MB flash size Limit? Why does someone limited the squashfs filesystem to 5.9MB?

(Last edited by Oconnor on 11 Feb 2008, 23:26)

Hi,

thanks a lot, that also helped my build problems. Same thing I think, image was to large. I'm trying it out for SimpleShare network drive and want to turn it into an IMAP server.

It looks to me that trx tool can get a separate parameter to allow bigger sizes (using -m). Probably this is something with should be configurable in the menuconfig (max size of image for trx tool). Or maybe it is configurable, but I couldn't find it ?

The discussion might have continued from here.