[opensuse-kernel] Rebuilding kernel using rpmbuild?
Hello. I tried to rebuild 3.7.10-1.24.1 but got an error. How did you build it? # wget http://download.opensuse.org/update/12.3/src/kernel-source-3.7.10-1.24.1.src... http://download.opensuse.org/update/12.3/nosrc/kernel-default-3.7.10-1.24.1.... (...snipped...) # rpm --checksig kernel-source-3.7.10-1.24.1.src.rpm kernel-default-3.7.10-1.24.1.nosrc.rpm kernel-source-3.7.10-1.24.1.src.rpm: rsa sha1 (md5) pgp md5 OK kernel-default-3.7.10-1.24.1.nosrc.rpm: rsa sha1 (md5) pgp md5 OK # rpm -ivh kernel-source-3.7.10-1.24.1.src.rpm kernel-default-3.7.10-1.24.1.nosrc.rpm (...snipped...) # rpmbuild -bp --target i686 /usr/src/packages/SPECS/kernel-default.spec (...snipped...) scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * RCU Subsystem * RCU Implementation
1. Tree-based hierarchical RCU (TREE_RCU) choice[1]: 1 Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration. make[2]: *** [silentoldconfig] Error 1 make[1]: *** [silentoldconfig] Error 2 make: *** [sub-make] Error 2 make: Leaving directory `/usr/src/packages/BUILD/kernel-default-3.7.10/linux-3.7' error: Bad exit status from /var/tmp/rpm-tmp.F7WUiP (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.F7WUiP (%prep) -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 01/03/2014 02:13 AM, Tetsuo Handa wrote:
Hello.
I tried to rebuild 3.7.10-1.24.1 but got an error. How did you build it?
# wget http://download.opensuse.org/update/12.3/src/kernel-source-3.7.10-1.24.1.src... http://download.opensuse.org/update/12.3/nosrc/kernel-default-3.7.10-1.24.1.... (...snipped...) # rpm --checksig kernel-source-3.7.10-1.24.1.src.rpm kernel-default-3.7.10-1.24.1.nosrc.rpm kernel-source-3.7.10-1.24.1.src.rpm: rsa sha1 (md5) pgp md5 OK kernel-default-3.7.10-1.24.1.nosrc.rpm: rsa sha1 (md5) pgp md5 OK # rpm -ivh kernel-source-3.7.10-1.24.1.src.rpm kernel-default-3.7.10-1.24.1.nosrc.rpm (...snipped...) # rpmbuild -bp --target i686 /usr/src/packages/SPECS/kernel-default.spec (...snipped...) scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * RCU Subsystem * RCU Implementation
1. Tree-based hierarchical RCU (TREE_RCU) choice[1]: 1 Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration.
make[2]: *** [silentoldconfig] Error 1 make[1]: *** [silentoldconfig] Error 2 make: *** [sub-make] Error 2 make: Leaving directory `/usr/src/packages/BUILD/kernel-default-3.7.10/linux-3.7' error: Bad exit status from /var/tmp/rpm-tmp.F7WUiP (%prep)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.F7WUiP (%prep)
When you build the kernel under a wrapper such as rpmbuild, you need to take special care that all configuration questions have been answered before you start. Using 'make oldconfig' will take care of that. In your case, you have not created a configuration. If you want to duplicate a running system, you can use 'zcat /proc/config.gz > .config' from the directory that contains the kernel source. At this point, then 'make oldconfig' just to be certain. One other point is that it is not good practice to build the kernel as root. You should either change the ownership if the files in the kernel source, or copy them to your file area. Larry -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Hello Larry. Larry Finger wrote:
When you build the kernel under a wrapper such as rpmbuild, you need to take special care that all configuration questions have been answered before you start. Using 'make oldconfig' will take care of that.
I'm assuming that source rpm files are made in a way "rpmbuild -bb" rebuilds binary rpm files without any interactive operation. But you say that I need to manually do "make oldconfig" operation? I don't know how to specify command to inject (e.g. "make oldconfig") as an argument to /usr/bin/rpmbuild rather than directly editing spec files, for the error occurs in the %prep stage that creates source directory and initializes configuration. Is my assumption wrong (e.g. rebuilding with rpmbuild is no longer supported)? Or my assumption is correct but failing with other reasons (e.g. my build environment is bad)? Regards. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 1/3/14, 3:13 AM, Tetsuo Handa wrote:
Hello.
I tried to rebuild 3.7.10-1.24.1 but got an error. How did you build it?
# wget http://download.opensuse.org/update/12.3/src/kernel-source-3.7.10-1.24.1.src... http://download.opensuse.org/update/12.3/nosrc/kernel-default-3.7.10-1.24.1.... (...snipped...) # rpm --checksig kernel-source-3.7.10-1.24.1.src.rpm kernel-default-3.7.10-1.24.1.nosrc.rpm kernel-source-3.7.10-1.24.1.src.rpm: rsa sha1 (md5) pgp md5 OK kernel-default-3.7.10-1.24.1.nosrc.rpm: rsa sha1 (md5) pgp md5 OK # rpm -ivh kernel-source-3.7.10-1.24.1.src.rpm kernel-default-3.7.10-1.24.1.nosrc.rpm (...snipped...) # rpmbuild -bp --target i686 /usr/src/packages/SPECS/kernel-default.spec (...snipped...) scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * RCU Subsystem * RCU Implementation
1. Tree-based hierarchical RCU (TREE_RCU) choice[1]: 1 Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration.
make[2]: *** [silentoldconfig] Error 1 make[1]: *** [silentoldconfig] Error 2 make: *** [sub-make] Error 2 make: Leaving directory `/usr/src/packages/BUILD/kernel-default-3.7.10/linux-3.7' error: Bad exit status from /var/tmp/rpm-tmp.F7WUiP (%prep)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.F7WUiP (%prep)
Building RPMs using rpmbuild is 100% supported. That's what everything boils down to internally anyway. Larry's advice about running 'make oldconfig' would probably result in a building kernel but probably won't result in a 32-bit kernel and it's just papering over a bug. The problem is the --target i686 that you're doing. The openSUSE-12.3 branch can't handle that for some reason. The master branch can. I wasn't able to reproduce your problem there. It successfully started a 32-bit build using --target i686. A workaround is to just do "linux32 rpmbuild..." without the --target i686. That will also produce a 32-bit kernel on a 64-bit system. Michal, any idea what the difference is here? -Jeff -- Jeff Mahoney SUSE Labs
Jeff Mahoney wrote:
Building RPMs using rpmbuild is 100% supported. That's what everything boils down to internally anyway.
Larry's advice about running 'make oldconfig' would probably result in a building kernel but probably won't result in a 32-bit kernel and it's just papering over a bug. The problem is the --target i686 that you're doing. The openSUSE-12.3 branch can't handle that for some reason. The master branch can. I wasn't able to reproduce your problem there. It successfully started a 32-bit build using --target i686.
A workaround is to just do "linux32 rpmbuild..." without the --target i686. That will also produce a 32-bit kernel on a 64-bit system.
Yes, I'm trying to build i686 kernel on a system running with x86_64 kernel. Wrapping with /usr/bin/linux32 worked. Thank you. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 2014-01-04 02:55, Jeff Mahoney wrote:
Building RPMs using rpmbuild is 100% supported. That's what everything boils down to internally anyway.
Larry's advice about running 'make oldconfig' would probably result in a building kernel but probably won't result in a 32-bit kernel and it's just papering over a bug. The problem is the --target i686 that you're doing. The openSUSE-12.3 branch can't handle that for some reason. The master branch can. I wasn't able to reproduce your problem there. It successfully started a 32-bit build using --target i686.
3.9+ respects the CONFIG_64BIT setting on x86 and does not derive the target target bitness from the host bitness. See commit ffee0de (x86: Default to ARCH=x86 to avoid overriding CONFIG_64BIT). Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (4)
-
Jeff Mahoney
-
Larry Finger
-
Michal Marek
-
Tetsuo Handa