You are not logged in.

#1 2006-03-31 01:38:52

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Question on a custom kernel built

Hello,

I'm trying to compile a custom kernel where i will include fbsplash and suspend2 patches only on 2.6.16 (patched to 2.6.16.1) kernel, so I've downloaded http://dev.gentoo.org/~spock/projects/g … 6.16.patch and http://www.suspend2.net/downloads/all/s … 16.tar.bz2 but when i apply suspend2 i can't apply fbsplash

[wael@nasreddine ../src/linux-2.6.16]$ patch -Np1 -i ../fbsplash-0.9.2-r5-2.6.16-rc2.patch
patching file Documentation/fb/00-INDEX
patching file Documentation/fb/splash.txt
patching file drivers/Makefile
patching file drivers/video/Kconfig
patching file drivers/video/Makefile
patching file drivers/video/cfbsplash.c
patching file drivers/video/console/bitblit.c
patching file drivers/video/console/fbcon.c
patching file drivers/video/fbcmap.c
patching file drivers/video/fbsplash.c
patching file drivers/video/fbsplash.h
patching file include/linux/console_splash.h
patching file include/linux/console_struct.h
patching file include/linux/fb.h
patching file include/linux/sysctl.h
Hunk #1 FAILED at 151.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/sysctl.h.rej
patching file kernel/sysctl.c
Hunk #1 succeeded at 89 (offset -7 lines).
Hunk #2 succeeded at 419 (offset -5 lines).

I know about Archck guys big_smile, just have another purpose for this kernel big_smile

Offline

#2 2006-03-31 07:42:17

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Question on a custom kernel built

Whenever a patch fails for me, I play around with the -pX number. I dunno what it is, but increasing the number seems to work most of the times. Sorry for the noob answer. tongue


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2006-03-31 08:58:24

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Question on a custom kernel built

adjusting the -p will not assist here.

I'll upload a patch for you with all that in it that will apply cleanly to 2.6.16.

In the meantime though, you could try ArchCK, http://iphitus.loudas.com/archck.php as it contains what you want.

James

Offline

#4 2006-03-31 09:16:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Question on a custom kernel built

I suspect, G, that you wanted to do this yourself, rather than have it done for you - no offense, iph. smile - in which case you need to inspect the .rej file(s) created when you get a hunk failure - in the example above, include/linux/sysctl.h.rej - and compare it/them to the vanilla code and the two patches.. It's likely that sysctl.h was patched for suspend2 first, and then fbsplash came along to patch the same file, but of course it it was no longer the file it used to be, so the patch failed. Clear as mud, right? wink

You could also try something very simple - apply the patches in the reverse order. It might or might not work.

Obviously, iph is the expert here, so you can rely on what he gives you - but you won't learn as much that way....

Offline

#5 2006-03-31 11:30:17

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Question on a custom kernel built

@iphitus, For sure man i know already about Archck, and actually first i tried ur 2.6.16 broken out, but i removed the ck, patches, cat them all into one and apply, and of course it failed on suspend2, so here i went looking for suspend 2 myself and i used again ur broken out but it failed, so I've made an empty folder, and i went to the sites and downloaded the patches, applied them on clean code and it failed... Maybe suspend2 is for 2.6.16 and not for 2.6.16.1 ?? coz actually i was applying upsteam patche first, then suspend 2 then fbsplash...

@tomk, actually yes, i want to learn more and more so actually i'm trying to create an OS myself just for learning purpose at least get a console, play with initscripts, kernel, inittab, pacman.. for the moment i changed pacman a lot, i changed the extension, i took a lot of ideas from Frugalware like up2date but made it myself, compiled the whole base and i failed on the kernel step, so untar initrd -> untar arch stock kernel -> mknod of everything else and it boots big_smile... anyway ur idea is cool, actually i do that a lot, but i felt like asking the questions coz i was supposing that suspend2 and fbsplash guys make their patches compatible..

@Fubar

man patch wrote:

       -pnum  or  --strip=num
          Strip  the  smallest  prefix containing num leading slashes from each file name found in the patch file.  A sequence of one or more
          adjacent slashes is counted as a single slash.  This controls how file names found in the patch file are treated, in case you  keep
          your files in a different directory than the person who sent out the patch.  For example, supposing the file name in the patch file
          was

             /u/howard/src/blurfl/blurfl.c

          setting -p0 gives the entire file name unmodified, -p1 gives

             u/howard/src/blurfl/blurfl.c

          without the leading slash, -p4 gives

             blurfl/blurfl.c

          and not specifying -p at all just gives you blurfl.c.  Whatever you end up with is looked for either in the current  directory,  or
          the directory specified by the -d option.

so Np1 will consider all pathes in patch a (-1) path, ex. a/path/to/file = path/to/file in p1 mode wink

iphitus & tomk, Thank you smile

Offline

#6 2006-03-31 13:46:12

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Question on a custom kernel built

My suspend patch in my broken out wont apply without a -ck patch underneath it. Ditto for my fbsplash patch.

Otherwise, patch your kernel with suspend2 FIRST, and then patch fbsplash. fbsplash will fail one hunk, in include/linux/sysctl.h

Open up include/linux/sysctl.h, scroll down to the KERN_SOMETHING=55 statements, and add one at the end with KERN_FBSPLASH=XX, where XX is a number one bigger than the last one in that structure.

eg for example:

        KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */
        KERN_SPIN_RETRY=70,     /* int: number of spinlock retries */
};
        KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */
        KERN_SPIN_RETRY=70,     /* int: number of spinlock retries */
        KERN_FBSPLASH=71,
};

Although, there will be some different numbers and names as youve applied suspend2. But you get the idea wink

James

Offline

#7 2006-03-31 14:00:43

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Question on a custom kernel built

Oh Great!! Thank you iphitus big_smile big_smile

Offline

#8 2006-03-31 14:22:01

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Question on a custom kernel built

I remember having to make almost the same fix myself some time ago smile

Offline

#9 2006-03-31 14:58:37

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Question on a custom kernel built

Yea well i didn't know about it, but now thx to iphitus i do big_smile

Offline

#10 2006-03-31 15:15:26

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Question on a custom kernel built

And now you can fully appreciate the lunancy that must affect all kernel patchset maintainers!  Imagine wanting to do that every two weeks!

Offline

Board footer

Powered by FluxBB