You are not logged in.

#1 2004-07-06 13:20:27

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Need help applying a patch to kernel 2.6.7

ok, I have spent way to much time searching and trying to follow kernel patch instructions on how to patch your kernel. When I used debian i patched my kernel 2.4 a few times with no trouble at all but aparently arch with kernel 2.6 is different. I can find decent documentation on the wiki pages about compiling your kernel. That's not a problem. But what i want to do is use abs to patch and then compile my kernel. Or even patch my exsisting kernel src and compile it. Every time I try to apply a patch i get errors, cannot find file to patch and then asking me what file to patch etc... I want to have the supermount option in my kernel. I don't want autofs. I'm constantly using cd's and don't want to deal with mounting and unmounting. can someone please give real good instructions on how to patch kernel 2.6.7  without omitting anything that might be elementry for people who use linux alot? I'm sure I'm just missing a stupid step but before when I patched my kernel with debian there was a patch directory and a linux directory inside the usr/src directory with the linux directory linked to the linux-kernel-verssion directory. Like do I need to create a linux directory and link it to the kernel directory under usr/src despite the fact i have already tried this and it didn't work ? I have tried all different types of patches thinking I just had the wrong patch file. I am so confused about this patch thing. this shouldn't be this freaking hard, or is probably easy if there was a decent "how to" to read explaining this in very easy step by step instructions and if and when i ever get the freaking patch to apply to my kernel src i intend on writing a how to  with easy instructions so i can save someone els all the wasted time i had in trying to accomplish somthing that should be as easy as one two three! It's these little freaking obsticals that reminds me why microsoft is mainstream above linux, not to say I will ever use windows again, but linux should be easy enough for the people who want to use there computer for other tasks other than trying to figure out how to make there stupid cd drive automount. I'm sorry but I can't understand why supermount can't be incorporated into the default kernel considering how convenient it is, with the option of turning it off if by some weird chance you like manually unmounting your 7 cd's and remounting them one by one as you go about your burning and copying tasks. Uggggggg!


-- archlinux 是一个极好的 linux

Offline

#2 2004-07-06 13:55:51

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Need help applying a patch to kernel 2.6.7

First, among those many cds find the one with some nice music and play it :-) Then browse /var/abs tree and look for examples (or just use find). It shouldn't be hard since arch uses vanilla kernel. And this should also help you:
http://bbs.archlinux.org/viewtopic.php? … ight=patch
http://bbs.archlinux.org/viewtopic.php? … t=pkgbuild (example of PKGBUILD with patch)

BTW if you are posting something like this please post the error messages too and your PKGBUILD (if you are using abs) - first thing I would suspect is just wrong path or wrong/mispelled PKGBUILD variable...

Offline

#3 2004-07-06 14:47:12

Egil.B
Member
From: Universitas Osloensis
Registered: 2004-02-14
Posts: 116

Re: Need help applying a patch to kernel 2.6.7

You don't have to use Supermount. Use Autofs instead. All you need to do is 'pacman -S autofs'. No hassle with patching and compiling. smile

Offline

#4 2004-07-06 14:59:15

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Need help applying a patch to kernel 2.6.7

I have been to both of those links that you gave a dozen times before I wrote my first post, along with more pages than I can count following thier instructions. I'm using the patch-2.6.7.gz following the instructions. I put the patch file into usr/src/linux-2.6.7 This is the error I get.....

# gzip -dc /usr/src/linux-2.6.7/patch-2.6.7.gz | patch -p1
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nru a/CREDITS b/CREDITS
|--- a/CREDITS  Tue Jun 15 22:20:42 2004
|+++ b/CREDITS  Tue Jun 15 22:20:42 2004
--------------------------
File to patch:

Same thing if I put the patch in usr/src and apply it from there or if i creat a linux directory and link it to usr/src/linux-2.6.7 and try to apply the patch from the linux directory. I already rebuilt my kernel with abs and tried to apply the patch to the rebuilt kernel in that directory with the same error. Please don't think I'm not sincere when i say I have searched and have read all the howto's I could find. I do apreciate the links you gave though.. thanks, but I'm still stuck. There are many others who aparently have run into this from what I have read in other forums but all of those threads seem to just stop without a solution to the problem, or what the person was doing wrong.  Is there a secret on how to do this, or maybe I can't patch kernel 2.6.7 with a 2.6.7 patch and need to downgrade to a older 2.6 kernel and patch it to 2.6.7?


-- archlinux 是一个极好的 linux

Offline

#5 2004-07-06 15:22:53

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Need help applying a patch to kernel 2.6.7

if you are in /var/abs/kernels/kernel26 you would put your patch there. then add and entry for it in the source url array. then add the patch line at the appropriate spot:

patch -Np1 -i ../patch.patch

there are lots of examples in abs.


AKA uknowme

I am not your friend

Offline

#6 2004-07-06 17:24:33

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Need help applying a patch to kernel 2.6.7

Thank you for the info .. I'm searching for examples on applying patches to the kernel in abs, which would give me a hint to the apropriate spot to add the patch -Np1 -i ../patch.patch line. I'm guessing but maybe this would be twards the end of the build instructions. once I find a good example I will see the light smile


-- archlinux 是一个极好的 linux

Offline

#7 2004-07-06 18:28:23

wdemoss
Member
From: WV - USA
Registered: 2004-01-18
Posts: 222

Re: Need help applying a patch to kernel 2.6.7

Here is an example that I had posted a while back for the mm pactchset and it includes the full kernel source in /usr/src
http://bbs.archlinux.org/viewtopic.php? … t=pkgbuild

hth,
-wd


Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?

Offline

#8 2004-07-06 18:33:39

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Need help applying a patch to kernel 2.6.7

nope, it will be towards the beginning.  Here's the reason:

First, makepkg will uncompress the files for you.  Now you have to CD into that directory (from within the pkgbuild: ie: cd $startdir/src/myproject).  Now you have to apply the patch to those files *before* they are built, or else they will be compiled without the changes in the patch.

I had to create simple packages for several of the PKGBUILDS in this project:
http://www.archlinux.org/~dusty/lookingglass.html

Those PKGBUILDS might tell you one way to apply patches.

Hope it helps.

Oh, one thing, Leigh, I'm finding it hard to read your posts because they are big long blocks with no paragraphs or line breaks. If I wasn't busy this wouldn't matter, but I'm just skimming today, so I've avoided reading your posts twice on account of this (third time's the charm though smile.  If I'm the only one doing this, it doesn't matter, but it wouldn't hurt to press <enter><enter> to insert a newline every once in a while too.  8)

Dusty

Offline

#9 2004-07-06 21:47:32

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Need help applying a patch to kernel 2.6.7

<enter> is that big key to the right with an arrow on it, probably just over <shift>  big_smile

I did a supermount search
http://www.linuxquestions.org/questions … did=180729
it looks difficult...


arch + gentoo + initng + python = enlisy

Offline

#10 2004-07-07 06:13:49

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Need help applying a patch to kernel 2.6.7

xerxes2 wrote:

<enter> is that big key to the right with an arrow on it, probably just over <shift>  big_smile

I did a supermount search
http://www.linuxquestions.org/questions … did=180729
it looks difficult...

I'm stupid, sorry for the output of my posts. They don't span across the screen from
my view using arch. Anyway I guess my frustrations got the better of me as I had and still have a pile of cd's that need copied for friends and after using supermount with debian,
I can apreciate how convienient it is especially with huge burning jobs.
Through all my searches I was led to believe that a patch needed to be applied to the source
before compile, as was the case with debian, not during compile, as I now realize. Thanks for all the info, sarcastic or not, I'm very apreciative. smile Patching is most likely elementary for most and I'm just a hard case *sigh*


-- archlinux 是一个极好的 linux

Offline

#11 2004-07-07 10:04:05

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Need help applying a patch to kernel 2.6.7

hehehe..no I mean what i said. It looks difficult to fix supermount. Maybe you should try what Egil.b said instead. big_smile


arch + gentoo + initng + python = enlisy

Offline

#12 2004-07-07 11:15:52

rensel
Member
From: Milan, Italy, Europe, Earth, S
Registered: 2004-06-20
Posts: 93
Website

Re: Need help applying a patch to kernel 2.6.7

Use SubMount instead of SuperMount. http://submount.sourceforge.net
It's the same thing, but you compile it as a kernel module and don't need to patch anything. SuSE 9.1 uses it.


Arch GNU/Linux 0.7 Trusted User
"If I were more modest, I would be perfect"

Offline

#13 2004-07-07 15:26:20

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Need help applying a patch to kernel 2.6.7

Leigh wrote:

I'm stupid, sorry for the output of my posts.

I didn't mean to come down hard. I don't bother giving hints to people with a bad attitude.=)  It doesn't really matter if I read your post now or not cause I don't mean anything about supermount!

Dusty

Offline

#14 2004-07-07 16:36:47

Egil.B
Member
From: Universitas Osloensis
Registered: 2004-02-14
Posts: 116

Re: Need help applying a patch to kernel 2.6.7

rensel wrote:

Use SubMount instead of SuperMount. http://submount.sourceforge.net
It's the same thing, but you compile it as a kernel module and don't need to patch anything. SuSE 9.1 uses it.

Autofs is even better, its userspace wink

Offline

#15 2004-07-08 01:37:32

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Need help applying a patch to kernel 2.6.7

I made a PKGBUILD for submount http://bbs.archlinux.org/viewtopic.php?t=5537. It's a very small and fast compiling package. Try it and post your comments please.

Offline

#16 2004-07-08 11:11:45

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Need help applying a patch to kernel 2.6.7

Dusty wrote:
Leigh wrote:

I'm stupid, sorry for the output of my posts.

I didn't mean to come down hard.

Dusty

I didn't think you came down on me hard smile actually I was greatfull cause I would have never
known about my post output unless someone told me. Thank you for the info on applying
patches. It's somthing I'm reading alot about now. I want to experiment with my kernel
but want to make sure i keep my original intact cause I'm bound to really botch things up.

lanrat! your my hero  big_smile  Submount works like a charm. Your PKGBUILD worked and I
installed the submount-0.9-1.pkg.tar.gz with packman -A command. before that I went
ahead and created a directry under in /home and am using that directry to build packages
not listed in the arch package list. I'm not sure if this is best, but I didn't want to do it
in the /var/abs directory for fear of messing it up.  After installing submount I edited
my /etc/fstab like this, according to the examples on the sourceforg page while changing
the paths to where I created the mount points.

dev/cdroms/cdrom0 /mnt/cdrw subfs fs=cdfss,ro,iocharset=iso8859-1,umask=0 0 0
/dev/cdroms/cdrom1 /mnt/dvdrom subfs fs=cdfss,ro,iocharset=iso8859-1,umask=0 0 0
/dev/floppy/0 /mnt/floppy subfs fs=floppyfss,iocharset=iso8859-1,sync,umask=0 0 0

I didn't need to put the subfs module in my etc/rc.conf file since the entrys in the fstab
automatically loads the module. I tested my dives and they all work like a charm. I opend
the mount point directory for each drive to make sure I could see the contents of the
cd's in the drive and my floppy. Everything's peachy smile

One thing though. The first few times I tried building the submount package I got an
error twards the end of the build proccess. I whish I had saved the error. Anyway I recopied
your PKGBUILD and tried again and then it worked like a charm. I'm a happy cd burner
now! Thanks a trillian smile


-- archlinux 是一个极好的 linux

Offline

#17 2004-07-08 12:13:17

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Need help applying a patch to kernel 2.6.7

You're welcome :-) That's how we solve the problems in arch community 8)
I already changed the installation info (no need for placing submount module in rc.conf) - well it was 4am when I was writing this :-)

BTW It is safe to build your own packages in /var/abs/local - that's what it is for (no overwrite after running abs - don't worry). Just add a subdir for any new package like this /var/abs/local/submount. This will keep all your pkgbuilds in one place. About the error: sometimes it happens when you copy some control (hidden) characters after last } in the pkgbuild.

Offline

#18 2004-07-09 08:46:13

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Need help applying a patch to kernel 2.6.7

Thanks, I'll use the /var/abs/local for building packages then. It is more convenient staying in the /var dir. The The auto mounting was my biggest abstical so far and it turned out to be
pretty simple with the right information. All my searching was with supermount and I never
ran across submount till I saw your reply. Anyway, it worked so well maybe Ach will include this
package and your build to the package list page? I think alot of people new to arch who were use
to using supermount would be delighted with submount and the ease of incorperating it to
work as a module. This is a great community using arch. I'm learning that there's not much that linux can't do, but sometimes takes alot of patience and communication to get everything to
work like you want it to.


-- archlinux 是一个极好的 linux

Offline

Board footer

Powered by FluxBB