PDA

View Full Version : [SOLVED] Does anyone know how to build a release kernel from the kernel-$(uname -r).src.rpm?


PaulAlesius
4th March 2012, 02:57 PM
Hi,
I've been trying to build a non-debug kernel from the F17 alpha kernel source (yumdownloader --source kernel) but the build ends up being a debug build, I can see that from the installed config with grep "DEBUG" /boot/config-$(uname -r).

I've built it with "rpmbuild -bb --without debug,debuginfo" and even changed some kernel configs from the .src.rpm, it still ends up being a debug build

Does anyone know how to build a non-debug release kernel?

leigh123linux
4th March 2012, 03:08 PM
http://fedoraproject.org/wiki/Building_a_non-debugging_kernel

PaulAlesius
4th March 2012, 07:22 PM
http://fedoraproject.org/wiki/Building_a_non-debugging_kernel

ok I found that there's a "release" switch to rpmbuild, supposedly one should be able to do "rpmbuild -bb --with release some.spec" but I don't know if the switch has any effect since it's not documented in man rpmbuild.

---------- Post added at 08:13 PM ---------- Previous post was at 04:25 PM ----------

I built the spec with:
rpmbuild -bb --with release --without debug --without debuginfo kernel.spec

But as it seems from the config file that ends up packaged with the rpm (That is later placed in /boot/), that it's still a debug build. grep "CONFIG_DEBUG" config-3.3.0-0.rc5.git3.1.fc17.x86_64:

CONFIG_DEBUG_DEVRES=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_RODATA=y
CONFIG_DEBUG_RODATA_TEST=y
CONFIG_DEBUG_SET_MODULE_RONX=y
CONFIG_DEBUG_NX_TEST=m
CONFIG_DEBUG_BOOT_PARAMS=y

---------- Post added at 08:22 PM ---------- Previous post was at 08:13 PM ----------

Nevermind, it seems to be a release build this time.

Steps to build a really fast "release" kernel:

$ yumdownloader --source kernel
$ rpm -ivh kernel*rpm
$ cd $HOME/rpmbuild/SPECS
$ rpmbuild -bb --with release --without debug --without debuginfo kernel.spec
$ cd $HOME/rpmbuild/RPMS/*
$ sudo rpm -Uvh --force *.rpm

AdamW
5th March 2012, 09:48 PM
The other way to build a release kernel, btw, is to check the kernel package out from git (fedpkg is the easiest way to do this) and run 'make release' then 'fedpkg srpm' to generate a .src.rpm. Then you can build it directly, or via mock, or as a koji scratch build if you're allowed to.

PaulAlesius
5th March 2012, 10:08 PM
AdamW,

Sounds great if you can make the srpm that way from the latest source!

Novi Sad - Katras Travel Photos on Instagram - Vilyuchinsk Photos