Mailinglist Archive: opensuse-kernel (87 mails)

< Previous Next >
Re: [opensuse-kernel] building kernel-vanilla with one extra patch.
  • From: <doiggl@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 19 Aug 2010 01:06:11 +1000
  • Message-id: <32611cf2d91b6cfdfe766febe4d5282a@xxxxxxxxxxxxxxxxxxxxxxx>
On Tue, 17 Aug 2010 12:47:30 -0400, Jeff Mahoney <jeffm@xxxxxxxx> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/17/2010 11:49 AM, doiggl@xxxxxxxxxxxxxxxxxx wrote:
Hello,
I have been wondering if this is possible as I was unsuccessful the
past
to get a kernel built with the reiser4-for-2.6.35.patch applied.
I am now wondering of this would work ?.

1. Set up a home project called <kernel-vanilla> in my-home-location
2. Link it to the sources of the package kernel-source of project
Kernel:HEAD
- Details <link project='Kernel:HEAD' package='kernel-source'
cicount='copy'/>
3. copy in to my-home-location:<kernel-vanilla> the file
kernel-vanilla.spec.
- I will need to alter it later to add/apply the patch.

4. Add the patch file reiser4-for-2.6.35.patch.bz2 to the project
my-home-location<kernel-vanilla>

5. Add/change to lines
Add extra line to .spec file Source121:
reiser4-for-2.6.35.patch.bz2

Add to end of setup line -a 121
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106
-a
107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120

The patch doesn't actually have to be bzipped, but that's not really
important.

5. Use the script apply-patches [1] to apply the patch into the kernel
[1]

https://build.opensuse.org/package/view_file?file=apply-patches&package=kernel-source&project=Kernel%3AHEAD

6. Some how copy in a reiser4 enabled .config file to /usr/src/linux

The kernel isn't built from /usr/src/linux. It's built in the rpm build
dir, so you can just patch your config changes in there. patches.addon
is only added when flavor != vanilla but config.addon is used always.
You can create config.addon/$ARCH/vanilla files, tar them up, and it
should just work.

7. Build the patched kernel.

The restrictions are these.
- I have to use a vanilla based kernel based on reiser4-for-2.6.35.

What are your thoughts on this approach,would it work, if not what
method
would work ?

It should work, but if I were you, I'd just cheat. Create the
patches.addon.tar.bz2 archive but don't actually have it contain
patches.addon. Just have it contain patches.rpmify/reiser4-for-2.6.35
and then add it to series.conf. patches.kernel.org and patches.rpmify
are applied to the vanilla kernel too.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
Thanks for the info Jeff
Next steps I did -

# tar -cvf patches.addon.tar /patches.rpmify
tar: Removing leading `/' from member names
/patches.rpmify/
/patches.rpmify/reiser4-for-2.6.35.patch

# bzip2 -v patches.addon.tar
patches.addon.tar: 5.319:1, 1.504 bits/byte, 81.20% saved, 2396160 in,
450449 out.

- added file patches.addon.tar to project [1]
- Edited series.conf [2] added in last line
[patches.suse/reiser4-for-2.6.35.patch]


########################################################
# Reiserfs Patches
########################################################
patches.suse/reiserfs-barrier-default
patches.fixes/reiserfs-remove-2-tb-file-size-limit
patches.suse/reiser4-for-2.6.35.patch



I attached a new config to use for the compilation.
Ive got to copy and rename the file [3] to $RPM_BUILD_ROOT/.config
Question: Is the following line correct to do that and is the .config in
the correct spot ?

%build
cp -v dot.config $RPM_BUILD_ROOT/.config

[1]
https://build.opensuse.org/package/files?package=kernel-vanilla&project=home%3Adoiggl
[2]
https://build.opensuse.org/package/edit_file?file=series.conf&amp;package=kernel-vanilla&amp;project=home%3Adoiggl
[3]
https://build.opensuse.org/package/view_file?file=dot.config&package=kernel-vanilla&project=home%3Adoiggl

Is there anything else that needs to be done so the kernel will build ?
Cheers Glenn

--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kernel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References