[opensuse] Kernel compilation the openSUSE way?
I usually take the newest openSUSE kernel (from repository Kernel_stable). But since some month I have a DVB T2 HD card, which requires a patch (see https://bugzilla.kernel.org/show_bug.cgi?id=194171). So I need to compile kernels myself. I have a working compilation path. But the current path has 12 steps! It takes some time. I wonder, why it is so complicated to configure, compile and install a Kernel under openSUSE. Is there a better/easier/automated way to configure, compile and install a Kernel under openSUSE? I know this blog article. But the article uses Vanilla kernels and also needs 6 steps. With additional patches (4 steps), third-party modules (2 steps) and cleanup (1 step) the article would also need 13 steps: Compiling the Linux Kernel, the SUSE way https://www.suse.com/communities/blog/compiling-de-linux-kernel-suse-way/ This is my Kernel configuration, compilation and installation path: 1. Update kernel-source and kernel-default from Kernel_stable repository 2. Save kernel-source: cp -a /usr/src/linux-4.x.y-... /usr/src/linux-4.x.y-my 3. Apply my patches cd /usr/src/linux-4.x.y-my patch -b -p1 < ~myuser/.../my-kernel-patch.patch 4. Copy standard configuration: cd /usr/src/linux-4.x.y-my cp -v /boot/config-4.11.4-1.gcba98ee-default .config 5. Edit .config: remove CONFIG_LOCALVERSION, CONFIG_DEBUG_KERNEL, CONFIG_EXPERT remove some hardware-dependent settings 6. edit configuration interactively: Disable CONFIG_EXPERT and CONFIG_DEBUG_KERNEL, because otherwise "make binrpm-pkg" creates huge kernel binaries. make oldconfig [...] Local version - append to kernel release (LOCALVERSION) [] (NEW) -my1 * * Configure standard kernel features (expert users) * Configure standard kernel features (expert users) (EXPERT) [N/y/?] (NEW) Kernel debugging (DEBUG_KERNEL) [N/y/?] (NEW) make menuconfig Do some additional configuration. 7. Compile kernel (-j4 for four processor cores, ionice and nice to reduce the load, binrpm-pkg for RPM without source-RPM) make clean nice ionice -c idle make -j4 binrpm-pkg 8. Install the kernel RPM package rpm -Uvh /usr/src/packages/RPMS/x86_64/kernel-4.x.y_my1-....x86_64.rpm 9. Install necessary symbolic links for "dkms" cd /lib/modules/4.x.y-my1 ln -sv /usr/src/linux-4.x.y-my source ln -sv /usr/src/linux-4.x.y-my build 10. Update third-party modules (e.g. Nvidia driver): dkms install -m nvidia -v 375.66 -k 4.x.y-my1 11. Cleanup cd /usr/src/linux-4.x.y-my make clean 12. Select Grub configuration and reboot grub2-once --list | less grub2-once 2 reboot Greetings, Björn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, Jun 09, 2017 at 02:33:24PM +0200, Bjoern Voigt wrote:
I usually take the newest openSUSE kernel (from repository Kernel_stable). But since some month I have a DVB T2 HD card, which requires a patch (see https://bugzilla.kernel.org/show_bug.cgi?id=194171).
So I need to compile kernels myself. I have a working compilation path. But the current path has 12 steps! It takes some time. I wonder, why it is so complicated to configure, compile and install a Kernel under openSUSE.
Is there a better/easier/automated way to configure, compile and install a Kernel under openSUSE?
I know this blog article. But the article uses Vanilla kernels and also needs 6 steps. With additional patches (4 steps), third-party modules (2 steps) and cleanup (1 step) the article would also need 13 steps:
Out of the box thinking: Send the patch upstream: - no steps required Open a bug for the kernel team with the patch and ask for inclusin: - 1 step Otherwise ... I usually let the OBS build kernels RPMs, so I would: - checkout kernel-default - add the patch to patches.fixes.tar.bz2 and series.conf - osc ci - have OBS build it. (Your DKMS steps of course need to be done too.) Ciao, Marcus
Op vrijdag 9 juni 2017 14:39:02 CEST schreef Marcus Meissner:
On Fri, Jun 09, 2017 at 02:33:24PM +0200, Bjoern Voigt wrote:
I usually take the newest openSUSE kernel (from repository Kernel_stable). But since some month I have a DVB T2 HD card, which requires a patch (see https://bugzilla.kernel.org/show_bug.cgi?id=194171).
So I need to compile kernels myself. I have a working compilation path. But the current path has 12 steps! It takes some time. I wonder, why it is so complicated to configure, compile and install a Kernel under openSUSE.
Is there a better/easier/automated way to configure, compile and install a Kernel under openSUSE?
I know this blog article. But the article uses Vanilla kernels and also needs 6 steps. With additional patches (4 steps), third-party modules (2
steps) and cleanup (1 step) the article would also need 13 steps: Out of the box thinking:
Send the patch upstream: - no steps required
Open a bug for the kernel team with the patch and ask for inclusin: - 1 step
Otherwise ... I usually let the OBS build kernels RPMs, so I would: - checkout kernel-default - add the patch to patches.fixes.tar.bz2 and series.conf - osc ci - have OBS build it.
(Your DKMS steps of course need to be done too.)
Ciao, Marcus
OBS, and if it's just for your own machine, include the dkms steps in the spec file. Keep the package locally. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Bjoern Voigt wrote:
I usually take the newest openSUSE kernel (from repository Kernel_stable). But since some month I have a DVB T2 HD card, which requires a patch (see https://bugzilla.kernel.org/show_bug.cgi?id=194171).
So I need to compile kernels myself. I have a working compilation path. But the current path has 12 steps! It takes some time. I wonder, why it is so complicated to configure, compile and install a Kernel under openSUSE.
It isn't really very complicated: Get the source, apply your patch, configure, make, make install. Update your bootloader. That's about it. -- Per Jessen, Zürich (22.8°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-06-09 14:33, Bjoern Voigt wrote: ...
Compiling the Linux Kernel, the SUSE way
https://www.suse.com/communities/blog/compiling-de-linux-kernel-suse-way/
This is my Kernel configuration, compilation and installation path:
1. Update kernel-source and kernel-default from Kernel_stable repository 2. Save kernel-source: cp -a /usr/src/linux-4.x.y-... /usr/src/linux-4.x.y-my 3. Apply my patches cd /usr/src/linux-4.x.y-my patch -b -p1 < ~myuser/.../my-kernel-patch.patch 4. Copy standard configuration: cd /usr/src/linux-4.x.y-my cp -v /boot/config-4.11.4-1.gcba98ee-default .config 5. Edit .config: remove CONFIG_LOCALVERSION, CONFIG_DEBUG_KERNEL, CONFIG_EXPERT remove some hardware-dependent settings 6. edit configuration interactively: Disable CONFIG_EXPERT and CONFIG_DEBUG_KERNEL, because otherwise "make binrpm-pkg" creates huge kernel binaries.
4..6 Instead, "make cloneconfig". -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Bjoern Voigt wrote:
5. Edit .config: remove CONFIG_LOCALVERSION, CONFIG_DEBUG_KERNEL, CONFIG_EXPERT remove some hardware-dependent settings BTW, why is it necessary to manually disable the options CONFIG_DEBUG_KERNEL and CONFIG_EXPERT, if I copy the kernel configuration from the standard kernel?
(It I do not disable both options, I get a huge kernel with debugging symbols, which probably does not boot (not tested). All standard kernel compilation HOWTOs fail with the options CONFIG_DEBUG_KERNEL and CONFIG_EXPERT enabled.) Greetings, Björn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
You will need to run 1. mkinitrd 2. grub2-mkconfig -o /boot/grub2/grub.cfg to make the kernel bootable after installing the rpm.
Hello, In the Message; Subject : Re: [opensuse] Kernel compilation the openSUSE way? Message-ID : <163809880786.30999.17110480670825785143@mailman3.infra.opensuse.org> Date & Time: Sun, 28 Nov 2021 11:26:47 -0000 "Fusion Future" <qydwhotmail@gmail.com> has written:
You will need to run
1. mkinitrd 2. grub2-mkconfig -o /boot/grub2/grub.cfg
to make the kernel bootable after installing the rpm.
Just after installing rpms, dracut do it automatically, don't it? Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ galaxy.dti.ne.jp ┃\/彡 ┗━━┛ "Bill! You married with Computer. Not with Me!" "No..., with money."
On 18/11/2021 04.06, Fusion Future wrote:
That's useful. Thanks for sharing!
Er... it is customary to say to what post you are replying to, by including a line referencing the previous poster and the date, and a paragraph with some text from the previous poster - like I do above. I have looked back to August 2018 and I don't find any email with that subject line in this mail list to which you could be replying. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
Sorry, I replied the post on the website. It's https://lists.opensuse.org/archives/list/users@lists.opensuse.org/thread/NJ4...
On 28/11/2021 13.22, Fusion Future wrote:
Sorry, I replied the post on the website. It's https://lists.opensuse.org/archives/list/users@lists.opensuse.org/thread/NJ4...
Ah, so June 2017. Thanks. Date: Fri, 9 Jun 2017 14:33:24 +0200 From: Bjoern Voigt <bjoernv@arcor.de> Reply-To: OS-en <opensuse@opensuse.org> To: opensuse@opensuse.org Subject: [opensuse] Kernel compilation the openSUSE way? -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On 28/11/2021 13.47, Carlos E. R. wrote:
On 28/11/2021 13.22, Fusion Future wrote:
Sorry, I replied the post on the website. It's https://lists.opensuse.org/archives/list/users@lists.opensuse.org/thread/NJ4...
Ah, so June 2017. Thanks.
Date: Fri, 9 Jun 2017 14:33:24 +0200 From: Bjoern Voigt <bjoernv@arcor.de> Reply-To: OS-en <opensuse@opensuse.org> To: opensuse@opensuse.org Subject: [opensuse] Kernel compilation the openSUSE way?
Oops. Message-ID: <65474602-5bfa-3efb-2c81-bd1f5148e247@arcor.de> -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
participants (7)
-
Bjoern Voigt
-
Carlos E. R.
-
Fusion Future
-
Knurpht - Gertjan Lettink
-
Marcus Meissner
-
Masaru Nomiya
-
Per Jessen