[opensuse-kernel] building kernel-vanilla with one extra patch.
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 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 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 ? Ta Glenn -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/17/2010 11:49 AM, doiggl@velocitynet.com.au 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxqvSIACgkQLPWxlyuTD7LmvgCcDDCEMS8q5pKlFfhYVQcrfw8V VXsAn3DhawtM9PtUgoOhOctPhz+tyk8r =A0TJ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/17/2010 11:49 AM, doiggl@velocitynet.com.au wrote:
Hello, I have been wondering if this is possible as I was unsuccessful the
On Tue, 17 Aug 2010 12:47:30 -0400, Jeff Mahoney <jeffm@suse.com> wrote: 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]
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&package=ke... [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@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/18/2010 11:06 AM, doiggl@velocitynet.com.au wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/17/2010 11:49 AM, doiggl@velocitynet.com.au wrote:
Hello, I have been wondering if this is possible as I was unsuccessful the
On Tue, 17 Aug 2010 12:47:30 -0400, Jeff Mahoney <jeffm@suse.com> wrote: 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]
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
No. It needs to be the actual location of the patch. So, patches.rpmify/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
No, you're making things more difficult than they need to be. You don't need to do this. Just put your config changes in config.addon/$arch/vanilla, and tar it up. You can even change things that are already in the shipping vanilla config as the last entry for a particular item is the one that will take effect. - -Jeff
[1] https://build.opensuse.org/package/files?package=kernel-vanilla&project=home%3Adoiggl [2] https://build.opensuse.org/package/edit_file?file=series.conf&package=ke... [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 ?
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxsGdkACgkQLPWxlyuTD7JLPwCfS5rgxt8CYpxH3DFmH9nSj7Lp KNkAni+t6Xv9iuT0oKmyTx04J2zESeRv =C1ut -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wed, 18 Aug 2010 13:35:21 -0400, Jeff Mahoney <jeffm@suse.com> wrote:
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 - Edited series.conf 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
No. It needs to be the actual location of the patch. So, patches.rpmify/reiser4-for-2.6.35.patch.
Changes made [1] to series.conf ######################################################## # Reiserfs Patches ######################################################## patches.suse/reiserfs-barrier-default patches.fixes/reiserfs-remove-2-tb-file-size-limit patches.rpmify/reiser4-for-2.6.35.patch Next the .config changes for compilation - I seleted these changes for the .config and I made a file of changes the first 15 lines shown # make menuconfig File systems ---> <M> Reiser4 # diff .config .configReiser4 > .configReiser4.diff # head -15 .configReiser4.diff 2a3,4
# Linux kernel version: 2.6.35.2 # Thu Aug 19 23:36:12 2010 7a10 CONFIG_INSTRUCTION_DECODER=y 20a24 CONFIG_NEED_SG_DMA_LENGTH=y 56a61 CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" 58,61d62 < CONFIG_SUSE_KERNEL=y < # CONFIG_ENTERPRISE_SUPPORT is not set < CONFIG_SPLIT_PACKAGE=y < # CONFIG_KERNEL_DESKTOP is not set 70a72
Question: What is the .spec file command to apply the .configReiser4.diff changes file to the original unpacked .config file so it generates a reiser4 enabled .config ready for compilation and what section of the spec file does that go in. Spec file listing [3] Also any news on getting the %changelog not in descending chronological order fixed see [4] for Kernel HEAD [1] https://build.opensuse.org/package/view_file?file=series.conf&package=kernel-vanilla&project=home%3Adoiggl [2] https://build.opensuse.org/package/files?package=kernel-vanilla&project=home%3Adoiggl [3] https://build.opensuse.org/package/view_file?file=kernel-vanilla.spec&package=kernel-vanilla&project=home%3Adoiggl [4] http://lists.opensuse.org/opensuse-kernel/2010-08/msg00037.html Cheers Glenn -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/19/2010 10:22 AM, doiggl@velocitynet.com.au wrote:
On Wed, 18 Aug 2010 13:35:21 -0400, Jeff Mahoney <jeffm@suse.com> wrote:
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 - Edited series.conf 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
No. It needs to be the actual location of the patch. So, patches.rpmify/reiser4-for-2.6.35.patch.
Changes made [1] to series.conf
######################################################## # Reiserfs Patches ######################################################## patches.suse/reiserfs-barrier-default patches.fixes/reiserfs-remove-2-tb-file-size-limit patches.rpmify/reiser4-for-2.6.35.patch
Next the .config changes for compilation
- I seleted these changes for the .config and I made a file of changes the first 15 lines shown # make menuconfig File systems ---> <M> Reiser4
# diff .config .configReiser4 > .configReiser4.diff # head -15 .configReiser4.diff 2a3,4
# Linux kernel version: 2.6.35.2 # Thu Aug 19 23:36:12 2010 7a10 CONFIG_INSTRUCTION_DECODER=y 20a24 CONFIG_NEED_SG_DMA_LENGTH=y 56a61 CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" 58,61d62 < CONFIG_SUSE_KERNEL=y < # CONFIG_ENTERPRISE_SUPPORT is not set < CONFIG_SPLIT_PACKAGE=y < # CONFIG_KERNEL_DESKTOP is not set 70a72
Question: What is the .spec file command to apply the .configReiser4.diff changes file to the original unpacked .config file so it generates a reiser4 enabled .config ready for compilation and what section of the spec file does that go in. Spec file listing [3]
There isn't one. As I've mentioned like three times now, just put: CONFIG_REISER4=m ... or whatever it is into config.addon/x86_64/vanilla, tar it up into config.addon.tar.bz2, and it will get pulled in automatically. - -Jeff
Also any news on getting the %changelog not in descending chronological order fixed see [4] for Kernel HEAD
[1] https://build.opensuse.org/package/view_file?file=series.conf&package=kernel-vanilla&project=home%3Adoiggl [2] https://build.opensuse.org/package/files?package=kernel-vanilla&project=home%3Adoiggl [3] https://build.opensuse.org/package/view_file?file=kernel-vanilla.spec&package=kernel-vanilla&project=home%3Adoiggl [4] http://lists.opensuse.org/opensuse-kernel/2010-08/msg00037.html
Cheers Glenn
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkxtSvMACgkQLPWxlyuTD7LjJgCfeOhUTLClXNHhsfJbeMg20O7B gzIAoJDSRw/rOkfONZD8Y4CgQjgTWHkr =FLs9 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (2)
-
doiggl@velocitynet.com.au
-
Jeff Mahoney