OpenWrt Forum Archive

Topic: Using squashfs-2.0 for openwrt?

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

Hi all...

I'm trying to build openwrt on an amd64-based system running Gentoo.  Currently the build fails with a segmentation fault in the mksquashfs call, due to a known bug in the 2.0-alpha version of squashfs.

Fortunately Gentoo also includes an ebuild of mksquashfs (squashfs-tools), which is based on squashfs-2.0 (non-alpha) and seems to work fine on amd64 (it was specifically modified to support amd64).

Armed with this info, I changed make/ to install squashfs-2.0.tar.gz instead of squashfs-2.0-ALPHA.tar.gz, the build works all the way through, and I can mount the resulting root_fs_mipsel with no problems (but please note that I have not yet tried to load the image into my wrt).

Assuming I can get it to work, what's the likelihood of OpenWRT moving to squashfs-2.0 as it's official version?  The patch is trivial:

% cvs diff
RCS file: /openwrt/buildroot/make/,v
retrieving revision 1.3
diff -r1.3
< SQUASHFS_SOURCE=squashfs2.0-ALPHA.tar.gz
> SQUASHFS_SOURCE=squashfs2.0.tar.gz

As near as I can tell, 2.0 should be entirely backwards-compatible with 2.0-ALPHA, but I'm by no means an expert.


Just as an update to this, the resulting openwrt-g-code.bin installed perfectly on my wrt54g.  Now to try my hand at some packages...

Another change in the same makefile:

I've been working on building on PPC.  Please add the "-le" to the invokation of mksquashfs so that we get the correct endianness when building on both little and big endian systems.

The discussion might have continued from here.