LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-04-2010, 08:52 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
kernel patching options and problems with 2.6.36


I'm trying to patch the 2.6.36 kernel with a squashfs-lzma patch and it gives me this output

Code:
[root@nfluxos linux]# patch -p1 < ../kernel-squashfs-lzma.patch
can't find file to patch at input line 8
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|===================================================================
|RCS file: /cvsroot/packages/kernel/kernel-squashfs-lzma.patch,v
|retrieving revision 1.6
|retrieving revision 1.7
|diff -u -p -r1.6 -r1.7
|--- kernel-squashfs-lzma.patch 2010/08/05 19:52:26 1.6
|+++ kernel-squashfs-lzma.patch 2010/10/21 06:28:30 1.7
--------------------------
File to patch:
am I doing it wrong?
here's the patch info
http://www.mail-archive.com/pld-cvs-...msg234515.html

using kernel.org 2.6.36 source
thanks for any help
 
Old 11-04-2010, 10:11 AM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by linus72 View Post
I'm trying to patch the 2.6.36 kernel with a squashfs-lzma patch and it gives me this output...
Try removing these lines from the patch:
Code:
diff -u packages/kernel/kernel-squashfs-lzma.patch:1.6 
packages/kernel/kernel-squashfs-lzma.patch:1.7
--- packages/kernel/kernel-squashfs-lzma.patch:1.6      Thu Aug  5 21:52:26 2010
+++ packages/kernel/kernel-squashfs-lzma.patch  Thu Oct 21 08:28:30 2010
@@ -1,7 +1,7 @@
 
Old 11-04-2010, 10:44 AM   #3
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I wouldn't recommend that, this appears to be a patch for a patch file - see the lines like
Quote:
-@@ -50,7 +50,11 @@
+@@ -52,7 +52,11 @@
 
Old 11-04-2010, 01:50 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by ciotog View Post
I wouldn't recommend that, this appears to be a patch for a patch file...
Yes, it is a patch for
Code:
---- Files affected:
packages/kernel:
   kernel-squashfs-lzma.patch (1.6 -> 1.7)
The OP needs to get the 1.6 patch file, and then patch that.

Patching patches... sounds like we are making a quilt.
 
Old 11-04-2010, 02:04 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
ah
so I need the 1.6 patch also?

none of the above has worked so far either....
thanks for helping too
 
Old 11-04-2010, 02:08 PM   #6
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by linus72 View Post
so I need the 1.6 patch also?
Yes. This file only patches the patch, which will have a lot of other changes in it.

If you only apply the changes in this patch (which you could do after manually editing the patch), you will only get a subset of the changes you need. In other words, I should have not posted my first reply.
 
Old 11-04-2010, 02:11 PM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
ok
I found this too
http://cvs.pld-linux.org/cgi-bin/cvs...hfs-lzma.patch

so, I patch the source with 1.6 then 1.7 or what to do exactly?
thanks
 
Old 11-04-2010, 06:57 PM   #8
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
Ah, that page is better. What you want to do is click on the download link next to "Revision 1.7:", this will give you the latest version of the complete patch file. Then you can apply it as you originally intended.

If there is then a Revision 1.8 patch it gets a little more complicated. You could reverse the 1.7 patch, then download and apply the complete 1.8 patch. Or you could reverse the 1.7 patch, update the patch file with the 1.7-1.8 patch, then apply it.

Last edited by ciotog; 11-04-2010 at 06:58 PM.
 
Old 11-05-2010, 06:29 AM   #9
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
well, neither patch works
1.6 or 1.7
it gives the same output

Quote:
[root@nfluxos linux]# patch -p1 < ../kernel-squashfs-lzma.patch
can't find file to patch at input line 8
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|===================================================================
|RCS file: /cvsroot/packages/kernel/kernel-squashfs-lzma.patch,v
|retrieving revision 1.6
|retrieving revision 1.7
|diff -u -p -r1.6 -r1.7
|--- kernel-squashfs-lzma.patch 2010/08/05 19:52:26 1.6
|+++ kernel-squashfs-lzma.patch 2010/10/21 06:28:30 1.7
--------------------------
File to patch:
any ideas??

I also found these patches
https://dev.openwrt.org/browser/trun...patches-2.6.36

005
006
007
008
997
998

I applied all 6 patches and it ends making with a zlib_deflate error issue..(sigh)

I did find a good aufs2 patch here
http://cvs.pld-linux.org/cgi-bin/cvs...el-aufs2.patch

so, you can make a livecd as long as you have aufs2 and squashfs like in reg kernel
but reg squashfs iso will be much bigger than squashfs-lzma iso
might have to wait awhile on squashfs-lzma...
Does anyone know what version of squashfs is in kernel 2.6.36??
thanks for you help!

Last edited by linus72; 11-05-2010 at 06:31 AM.
 
Old 11-05-2010, 09:05 AM   #10
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
It doesn't appear to me that you downloaded the right file - it should have been this link:
http://cvs.pld-linux.org/cgi-bin/cvs...e=text%2Fplain

At any rate your kernel source tree is now not pristine, so you'd probably need to re-extract the source to use it.

The squashfs version as reported on my 2.6.36 kernel source is 4.0.

Something you should keep in mind that while lzma does provide better compression (maybe 25% better than zlib) it's generally quite a bit slower to decompress - there a table here that shows the results for just the kernel:
http://free-electrons.com/blog/lzo-kernel-compression/

According to this lzma takes more than 5 times as long to load due to the decompression overhead.
 
Old 11-06-2010, 07:16 AM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
hello ciotog
thanks for that link, dont know why I did the wrong one..

your right, lzma does have a disadvantage
but; take for example my nFluxOS Slackware build, it's about 690mb or so
if I used squashfs 4.0 it would be about 900mb or more
thus I would have to remove alot of stuff to get a squashfs 4.0 iso at 700mb

it would be easier to use squashfs 4.0 because it's already in the kernel but as I said the size difference is big
Plus, my lzma distros (arch/slackware) boot pretty fast off usb compared to the same ubuntu/debian builds with 4.0, as they boot just a bit slower
they are supposed to be adding lzma support to the vanilla kernel as they have added lzo already
thanks for all your help too
the patches applied successfuly and I compiled a live kernel though I left LZO as not compiled because it would not compile...but the kernel works good anyway
there is a bug with either posivxl or aufs2 patch as persistent changes on fat32 usb has issues so you should use changes=slxsave.xfs
anyway, thank you again!

EDIT: also, the article you linked to is about how the kernel itself is compressed right?
I compile them to use gzip; the only thing the lzma is used for is to compress the root filesystem into .lzm's for the livecd using mksquashfs/unsquashfs 4.1-lzma cvs. and the initrd is gzip also
so thats better right, using gzip to compress the kernel?

Last edited by linus72; 11-06-2010 at 07:45 AM.
 
Old 11-06-2010, 05:50 PM   #12
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
The issue with the FS being compressed is that it gets accessed a lot more than the kernel - the kernel gets loaded only once, so if there's a delay of 4 seconds more because of the compression type then it's really not much of an issue. If the filesystem is compressed requiring a cpu intensive decompression method, then the whole system will seem boggy.

Really it's a matter of weighing the pros and cons... If you need the extra compression in order to fit constraints, then you don't have much choice.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while patching Rtlinux 3.1 kernel using kernel linux-2.4.29 dolreich_c Linux - General 1 02-06-2018 06:48 AM
Error while patching RTLinux 2.6.9 kernel using kernel linux-2.6.9 krishna_karne Linux - Software 1 11-16-2007 10:36 PM
patching Debian Stock Kernel with prepatch from kernel.org kushalkoolwal Debian 10 08-25-2007 01:05 PM
Patching a 2.6 kernel with a 2.4 kernel keyboard driver..possible? dxx Linux - Laptop and Netbook 3 11-18-2004 04:18 AM
Kernel 2.6.2 options question - LOCKED options ? tvojvodi Linux - General 0 02-17-2004 04:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration