I'm not sure how much interest there is in squashfs these days, and there doesn't seem to be too much activity upstream ...
But hey, I use squashfs on a regular basis, so I cooked up some kernel patches (because I prefer not to build stuff outside the kernel tree), and fixed (butchered) the squashfs-tools ebuild to include LZMA support.
These patches are for 2.6.22 and 2.6.23 vanilla kernels respectively.
sqlzma.22.patch 162KB
sqlzma.23.patch 162KB
If your kernel (gentoo-sources, etc.) already includes partial squashfs support, then these may not apply cleanly.
sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild
Code: Select all
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild,v 1.1 2007/05/16 19:19:07 wolf31o2 Exp $
# Added LZMA stuff 2007/10/14 cyrillic
inherit eutils toolchain-funcs
MY_PV=${PV/_p/-r}
DESCRIPTION="Tool for creating compressed filesystem type squashfs"
HOMEPAGE="http://www.squashfs-lzma.org/"
# SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
SRC_URI="http://www.squashfs-lzma.org/dl/squashfs3.2-r2.tar.gz
http://www.squashfs-lzma.org/dl/lzma443.tar.bz2
http://www.squashfs-lzma.org/dl/sqlzma3.2-r2b.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE=""
RDEPEND="sys-libs/zlib"
# S=${WORKDIR}/squashfs${PV/_p/-r}/squashfs-tools
src_unpack() {
cd "${WORKDIR}"
unpack squashfs3.2-r2.tar.gz sqlzma3.2-r2b.tar.bz2
mkdir lzma443
cd lzma443
unpack lzma443.tar.bz2
cd "${WORKDIR}"
epatch sqlzma1-443.patch
epatch sqlzma2u-3.2-r2.patch
sed -i "s:-O2:${CFLAGS}:" squashfs3.2-r2/squashfs-tools/Makefile
sed -i "s:-O2:${CFLAGS}:" lzma443/C/7zip/Compress/LZMA_C/makefile.gcc
sed -i "s:-O2:${CFLAGS}:" lzma443/C/7zip/Compress/LZMA_Alone/makefile.gcc
sed -i "s:KDir =:# KDir =:" Makefile
sed -i "s:BuildSquashfs =:# BuildSquashfs =:" Makefile
}
src_compile() {
emake CC="$(tc-getCC)" || die
}
src_install() {
cd squashfs3.2-r2/squashfs-tools
dobin mksquashfs unsquashfs || die
cd ..
dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README README-3.2
cd ..
dodoc sqlzma.txt
} EDIT: Better CFLAGS support in ebuild.
EDIT2 : Added patch for 2.6.24-rc kernels.
EDIT3 : Scrapped patch for 2.6.24* -- it compiled fine, but caused a kernel panic if you actually tried to mount something.





