Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Squashfs with LZMA compression [ebuild]

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
43 posts
  • Previous
  • 1
  • 2
Author
Message
Sadako
Advocate
Advocate
User avatar
Posts: 3792
Joined: Thu Aug 05, 2004 5:50 pm
Location: sleeping in the bathtub
Contact:
Contact Sadako
Website

  • Quote

Post by Sadako » Fri Feb 22, 2008 12:44 am

mikegpitt wrote:Do you still have the patch for the 2.6.23 sources? It doesn't appear to be available on the sqashlzma site anymore, and the d/l links you posted seem to be dead.
www.hamiltonshells.ca/~hopeless/lzma

I grabbed these about a week after christmas, are they what you're looking for?
"You have to invite me in"
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Fri Feb 22, 2008 1:10 am

Hopeless wrote:
mikegpitt wrote:Do you still have the patch for the 2.6.23 sources? It doesn't appear to be available on the sqashlzma site anymore, and the d/l links you posted seem to be dead.
www.hamiltonshells.ca/~hopeless/lzma

I grabbed these about a week after christmas, are they what you're looking for?
Yes! I believe so. Thanks, I appreciate it!

I'm not sure why the squashlzma guys don't keep an archive on their site. I don't like to move to a new kernel until Gentoo marks it as stable, and that is still at least a few weeks away, but I'd like to try this out with my 2.6.23 kernel.
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

  • Quote

Post by cyrillic » Fri Feb 22, 2008 4:05 am

mikegpitt wrote:... the d/l links you posted seem to be dead.
Sorry about that. My dynamic IP changed a couple of days ago.

Here is the link : ftp://71.174.53.196

ps. It has been reported that the 2.6.24 patch is slightly broken, but the 2.6.23 patch may still be working OK.
Top
avx
Advocate
Advocate
User avatar
Posts: 2152
Joined: Mon Jun 21, 2004 4:06 am

  • Quote

Post by avx » Fri Feb 22, 2008 6:24 am

I used the patches from www.hamiltonshells.ca/~hopeless/lzma , cause your ftp was down (as you said) and they worked clean with gentoo-sources-2.6.24-r2.
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Mon Feb 25, 2008 11:42 pm

I'm a bit confused on how to apply this kernel patch. This should be applied to a kernel that isn't already patched with squashfs correct? It looks like in the patch that it is looking for files such as squashfs/Makefile, linux-2.6.23/fs/squashfs/inode.c, etc...

When I apply the patch using 'patch -p1 < sqlzma2k-3.3.patch' it can't find the correct files to apply.

I'm using a modified version of the gentoo sources to apply the patch to. It is exacttly the same as the regular gentoo sources, except I removed the squashfs patch before emerging.
Top
hirakendu
Guru
Guru
Posts: 386
Joined: Wed Jan 24, 2007 5:54 pm
Location: san diego
Contact:
Contact hirakendu
Website

  • Quote

Post by hirakendu » Tue Feb 26, 2008 3:00 am

i believe it applies to a kernel already containing vanilla squashfs. so don't remove the squashfs patch before merging gentoo-sources.
Helium Sources || Gentoo Minimal Livecd
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Tue Feb 26, 2008 3:22 am

hirakendu wrote:i believe it applies to a kernel already containing vanilla squashfs. so don't remove the squashfs patch before merging gentoo-sources.
That makes sense, but it doesn't apply cleanly to the gentoo sources (as mentioned in the first post). Are the gentoo squashfs patches altered in some way?
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Tue Feb 26, 2008 4:04 am

mikegpitt wrote:
hirakendu wrote:i believe it applies to a kernel already containing vanilla squashfs. so don't remove the squashfs patch before merging gentoo-sources.
That makes sense, but it doesn't apply cleanly to the gentoo sources (as mentioned in the first post). Are the gentoo squashfs patches altered in some way?
Nevermind... I answered my own question. It turned out I read carelessly before. Gentoo sources includes partial squashfs support. I grabbed the real squashfs patches off sourceforge and everything applied cleanly.
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Tue Feb 26, 2008 4:49 pm

Ok... I think I need some more assistance. I'm having a heck of a time figuring out how this works.

I have:
- successfully patched the kernel (at least it threw no errors while patching)
- used the posted ebuild to make the squashfs-tools

I can't however seem to build the kernel module. I unpack sqlzma3.3-fixed.tar.bz2 and run make, and it spits errors that looks like it's not copying over the proper files from the kernel. I copy those manually, and then it complains about not finding the lzma sources. I copy those over and it can't find the file sqlzma.mk.

I also tried to build as a module it in the kernel (even though it says it won't work), and no luck there either.

Can anyone walk me through what I am doing wrong?
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

  • Quote

Post by cyrillic » Tue Feb 26, 2008 4:50 pm

mikegpitt wrote:Gentoo sources includes partial squashfs support. I grabbed the real squashfs patches off sourceforge and everything applied cleanly.
Gentoo-sources contains full support for squashfs+zlib (but not lzma). The same is true of the official squashfs patches you found on sourceforge.
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Tue Feb 26, 2008 8:07 pm

I'm still a bit lost, but making progress.

I realized that I don't need to build the squashfs-tools in a separate dir, since the ebuild does this. I still can't seem to build the kernel modules: sqlzma, unlzma, and squashfs

The ebuild seems to comment this part out of the makefile so I did the following:

- Started the emerge squashfs-tools, and hit ctrl-c before it was finished.

- Went to the dir /var/tmp/portage/sys-fs/squashfs-tools-3.3/work and edited the makefile to uncomment the lines 'KDir = /lib/modules/$(shell uname -r)/build' and 'BuildSquashfs = 1'

- tried to make it, which failed, because some files were missing (like I posted above)

- Copied over the files: cp /usr/src/linux/fs/squashfs/* /var/tmp/portage/sys-fs/squashfs-tools-3.3/work/squashfs3.3/kernel-patches/linux-2.6.23/fs/squashfs/.

- rebuilt it, now all the modules are built

- failure... when I type in make load it loads sqlzma & unlzma, but I get this error with squashfs

Code: Select all

insmod: error inserting '/var/tmp/portage/sys-fs/squashfs-tools-3.3/work/squashfs3.3/kernel-patches/linux-2.6.23/fs/squashfs/squashfs.ko': -1 Cannot allocate memory

So, I can only surmise I'm WAY off-base at trying to get this working, since no one has posted anything remotely close to what I'm doing here, and several of you seem to have things working.


How do I build the kernel modules needed for this?
Top
hirakendu
Guru
Guru
Posts: 386
Joined: Wed Jan 24, 2007 5:54 pm
Location: san diego
Contact:
Contact hirakendu
Website

  • Quote

Post by hirakendu » Fri Mar 28, 2008 5:30 am

The data corruption issue with sqlzma 3.3 seems to have been fixed with some new updates. (Came across them one fine day trolling through distrowatch and a new release of slax :p.) Here is an updated ebuild for the userspace tools (mksquashfs and undquashfs) : http://hirakendu.mooo.com/sqlzma-stuff/ ... -r2.ebuild. Although, the bug was apparently not in the userspace tools, but in the kernel part. Here is the kernel patch (to be applied to vanilla 2.6.24 with vanilla squashfs 3.3) - http://hirakendu.mooo.com/helium-source ... lzma.patch.

@mikegpitt : I think you are trying the hard way. If you want modular, you may just follow the instructions on the squashfs-lzma readme, without using the ebuilds. The ebuilds here will give you only the userspace tools mksquashfs and unsquashfs for creating images and extracting them (and this doesn't require kernel support). For the kernel part, that is required for mounting image and using it as filesystem, use the kernel patches in this thread. You may also try out helium sources (see signature) or zen-sources. Note that these patches will create a single squashfs.ko module that includes lzma functionality, unlike the original package in sqlzma website that may also create unlzma.ko etc. I would suggest to build squashfs into the kernel image and not keep it as modular.
ps : A clean way to break an emerge process into steps, instead of pressing ctrl-c is to use 'ebuild abc.ebuild unpack', and likewise the arguments compile, install, qmerge ...
Helium Sources || Gentoo Minimal Livecd
Top
dnjl
n00b
n00b
Posts: 2
Joined: Mon Feb 10, 2003 1:26 pm

  • Quote

Post by dnjl » Mon Apr 07, 2008 5:00 pm

Hi!

I have reworked this ebuild in some details:

- added and made use of lzma use-flag
- modified description, homepage and license
- added cvs-patches
- updated lzma
- cleaned up, amongst others the version-handling

Code: Select all

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils toolchain-funcs

# versions as of 2008/04/07
SQUASH_PV="squashfs${PV}"
LZMA_PV="lzma457"
SQLZMA_PV="sqlzma${PV}-${LZMA_PV/#lzma}-2"

DESCRIPTION="Tool for creating compressed filesystem type squashfs"
HOMEPAGE="http://squashfs.sourceforge.net http://www.squashfs-lzma.org"
SRC_URI="mirror://sourceforge/squashfs/${SQUASH_PV}.tar.gz
	lzma? (	mirror://sourceforge/sevenzip/${LZMA_PV}.tar.bz2
		http://www.squashfs-lzma.org/dl/${LZMA_PV}.tar.bz2
		http://www.squashfs-lzma.org/dl/${SQLZMA_PV}.tar.bz2
		http://www.squashfs-lzma.org/dl/squashfs-${PV}-cvsfix.tar.gz	)"

LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="lzma"

RDEPEND="sys-libs/zlib"


src_unpack() {
	cd ${WORKDIR}
	unpack ${SQUASH_PV}.tar.gz || die

	if use lzma ; then
		unpack ${SQLZMA_PV}.tar.bz2 || die
		mkdir ${LZMA_PV}
		cd ${LZMA_PV}
		unpack ${LZMA_PV}.tar.bz2 || die
		cd ..
		sed -i "s:lzma449:${LZMA_PV}:g" sqlzma1-449.patch
		epatch sqlzma1-449.patch || die
		epatch sqlzma2u-${PV}.patch || die

		# cvs fixes
		unpack squashfs-${PV}-cvsfix.tar.gz
		epatch code_cleanup.patch
		epatch mksquashfs_code_cleanups.patch
		epatch mksquashfs_bug_fixes.patch
		epatch mksquashfs_trace_fixes.patch
		epatch mksquashfs_unused_vars.patch
		epatch typo_mkflags_u.patch
		epatch unsquashfs_bugfixes.patch

		# adjust cflags
		sed -i "s:-O2:${CFLAGS}:" ${LZMA_PV}/C/Compress/Lzma/sqlzma.mk || die
		sed -i "s:-O2:${CFLAGS}:" ${LZMA_PV}/CPP/7zip/Compress/LZMA_Alone/makefile.gcc || die
		
		# adjust Makefile
		sed -i "s:KDir =:# KDir =:" Makefile || die # kernel dir unneeded
		sed -i "s:BuildSquashfs =:# BuildSquashfs =:" Makefile || die	# dont build modules
		sed -i "s:^LzmaVer =.*:LzmaVer = ${LZMA_PV}:" Makefile || die	# correct lzma version
	fi

	# adjust cflags
	sed -i "s:-O2:${CFLAGS}:" ${SQUASH_PV}/squashfs-tools/Makefile || die
} 

src_compile() {
	if ! use lzma ; then
		cd ${WORKDIR}/${SQUASH_PV}/squashfs-tools
	else
		cd ${WORKDIR}
	fi

        emake CC="$(tc-getCC)" || die
}

src_install() {
	cd ${SQUASH_PV}/squashfs-tools
	dobin mksquashfs unsquashfs || die
	cd ..
	dodoc README ACKNOWLEDGEMENTS CHANGES COPYING PERFORMANCE.README README-3.3
	cd ..
	use lzma && dodoc sqlzma.txt
}

pkg_postinst() {
	elog "This version of mksquashfs requires a 2.6.24 kernel or better."
}
Top
hirakendu
Guru
Guru
Posts: 386
Joined: Wed Jan 24, 2007 5:54 pm
Location: san diego
Contact:
Contact hirakendu
Website

  • Quote

Post by hirakendu » Tue Apr 08, 2008 5:09 am

thanks for the ebuild :). (ps : was the lzma use-flag necessary? as there is a nolzma option in mksquashfs.)
Helium Sources || Gentoo Minimal Livecd
Top
dimm
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Wed Jan 21, 2009 8:00 pm

  • Quote

Post by dimm » Thu Apr 30, 2009 12:58 pm

hi there!

$ uname -r
2.6.25-gentoo-r8

What can I do to be able to create a squashfs version 2.0, compressed lzma?
As I understood from http://www.squashfs-lzma.org/ I need to compile a new kernel from http://www.kernel.org and use some patch from link below. Maybe someone has faced this problem and may suggest another direction for solutions.
Top
dimm
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Wed Jan 21, 2009 8:00 pm

  • Quote

Post by dimm » Fri May 01, 2009 9:02 am

So, everything turned out much easier than I thought. So, squashfs support was included in my kernel (2.6.25-r8) in a separate module. Now, when I encountered the need for squashfs-lzma patch I downloaded from http://bugs.gentoo.org/attachment.cgi?id=171897, copied it to / usr/src/linux-2.6.25-gentoo-r8 /, then 'patch-p1 <2.6.25-gentoo-r8-lzma.patch', and rebuild the kernel: 'make & & make modules_install', now we have several new modules: squashfs, sqlzma, unlzma. But what i really don't know - how to make squashfs v2.0 ?
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

  • Quote

Post by cyrillic » Fri May 01, 2009 11:53 pm

dimm wrote:But what i really don't know - how to make squashfs v2.0 ?
You just need to install a really old version of squashfs-tools if you want version 2.0

BTW, the current vanilla kernels include squashfs-4.0
Top
dimm
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Wed Jan 21, 2009 8:00 pm

  • Quote

Post by dimm » Tue May 12, 2009 10:05 am

For downloading squashfs-tools-2.0 only google can help, or we have nice place with archive of some programs?
Top
Post Reply

43 posts
  • Previous
  • 1
  • 2

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic