自定义内核 2.6.18 在 centos 中编译失败

自定义内核 2.6.18 在 centos 中编译失败

我正在从 RPM 源代码进行编译。以前同样的编译可以成功,但这次不行。

也许您可以帮助我解决这个问题吗?

make[2]: Leaving directory `/root/rpmbuild/BUILD/kernel-2.6.18/xen/arch/x86'
gzip -f -9 < /root/rpmbuild/BUILD/kernel-2.6.18/xen/xen > /root/rpmbuild/BUILD/kernel-2.6.18/xen/xen.gz.new
mv /root/rpmbuild/BUILD/kernel-2.6.18/xen/xen.gz.new /root/rpmbuild/BUILD/kernel-2.6.18/xen/xen.gz
make[1]: Leaving directory `/root/rpmbuild/BUILD/kernel-2.6.18/xen'
BUILDING A KERNEL FOR x86_64...
USING ARCH=x86_64
***
*** You have not yet configured your kernel!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***

RPM build errors:

谢谢

答案1

cd /root/rpmbuild/BUILD/kernel-2.6.18/xen/arch/x86
cp configs/<desired-config-file> .config
make oldconfig
make menuconfig

或者

make xconfig

然后

cp .config ~/rpmbuild/SOURCES/config-`uname -m`-generic
cd /root/rpmbuild
rpmbuild -bb --target=`uname -m` kernel.spec

相关内容