XCP: how to build dom0 kernel
hi,
i tried to build xcp dom0 kernel but no luck.
1. install kernel srpm
(kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpm from http://www.xen.org/files/XenCloud/Software/latest/sources/source-1.iso)
2. run rpmbuild and got the following error.
# rpmbuild -ba --target i686 kernel-xen.spec
any idea? is there build instructions/scripts/etc somewhere?
YAMAMOTO Takashi
+ make -C linux-2.6.27.42-0.1.1.xs0.1.1.737.1065xen -j2 -s CROSS_COMPILE= silentoldconfig *
* Restart config...
*
*
* Processor type and features
*
Tickless System (Dynamic Ticks) (NO_HZ) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration.
make[1]: *** [silentoldconfig] Error 1
make: *** [silentoldconfig] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.68761 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.68761 (%build)
head-006%
Quoted 10 lines · YAMAMOTO Takashi
hi,
i tried to build xcp dom0 kernel but no luck.
1. install kernel srpm
(kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpm from http://www.xen.org/files/XenCloud/Software/latest/sources/source-1.iso)2. run rpmbuild and got the following error.
# rpmbuild -ba --target i686 kernel-xen.spec
Did you edit any files or touch anything between step 1 and step 2?
What are the contents of /usr/src/redhat/{SOURCES,SPECS}?
Quoted 1 line
any idea? is there build instructions/scripts/etc somewhere?
I would have expected the steps you took to have worked. What is your build environment, just a regular CentOS 5.4 install or something else?
Can you try:
# rpmbuild --target i686 --rebuild kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpm
I don't really expect it will make any difference but that is precisely what the XCP build system does so it may be informative.
Ian.
hi,
Quoted 5 lines · YAMAMOTO Takashi
Quoted 4 lines
hi,
i tried to build xcp dom0 kernel but no luck.
Quoted 8 lines
Quoted 6 lines
1. install kernel srpm
(kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpm from http://www.xen.org/files/XenCloud/Software/latest/sources/source-1.iso)2. run rpmbuild and got the following error.
# rpmbuild -ba --target i686 kernel-xen.specDid you edit any files or touch anything between step 1 and step 2?
no.
Quoted 2 lines
What are the contents of
/usr/src/redhat/{SOURCES,SPECS}?
head-006% ls ~/rpm/{SPECS,SOURCES} /home/yamamoto/rpm/SOURCES:
Module.kabi-kdump
Module.kabi-xen
check-kabi kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065-i686-kdump.config kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065-i686-utility.config kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065-i686-xen.config linux-2.6.27.42-0.1.1.xs0.1.1.737.1065.tar.bz2
/home/yamamoto/rpm/SPECS:
kernel-xen.spec log
head-006%
(i have ~/.rpmmacros so that i can build rpms as a non-root user. i have confirmed that removing .rpmmacros didn't fix the error.)
Quoted 11 lines
Quoted 2 lines
any idea? is there build instructions/scripts/etc somewhere?
I would have expected the steps you took to have worked. What is your build environment, just a regular CentOS 5.4 install or something else?
Can you try:
# rpmbuild --target i686 --rebuild kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpmI don't really expect it will make any difference but that is precisely what the XCP build system does so it may be informative.
it didn't make any difference. see below.
my build host is running CentOS 5.3 and its normal toolchain. does ddk.iso contain some special toolchain which is different from CentOS's one?
YAMAMOTO Takashi
Quoted 2 lines
Ian.
head-006% time rpmbuild --target i686 --rebuild kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpm >| xxx 2>&1 u 12.39s s 6.75s e 18.91s maj 0 min 1212335 in 0 out 0
head-006% tail -30 xxx
+ cd /home/yamamoto/rpm/BUILD
+ cd kernel-2.6.27.42
+ LANG=C
+ export LANG
+ unset DISPLAY
+ Build xen
+ flavour=xen
+ linux=linux-2.6.27.42-0.1.1.xs0.1.1.737.1065xen
+ case ${flavour} in
+ CROSS_COMPILE=
+ TARGET=i686
+ MAKEOPTS='-j2 -s CROSS_COMPILE='
+ make -C linux-2.6.27.42-0.1.1.xs0.1.1.737.1065xen -j2 -s CROSS_COMPILE= silentoldconfig *
* Restart config...
*
*
* Processor type and features
*
Tickless System (Dynamic Ticks) (NO_HZ) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration.
make[1]: *** [silentoldconfig] Error 1
make: *** [silentoldconfig] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.31388 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.31388 (%build)
head-006%
Quoted 7 lines · YAMAMOTO Takashi
hi,
Quoted 3 lines · YAMAMOTO Takashi
What are the contents of
/usr/src/redhat/{SOURCES,SPECS}?head-006% ls ~/rpm/{SPECS,SOURCES}
[...]
all as expected.
Quoted 2 lines
(i have ~/.rpmmacros so that i can build rpms as a non-root user. i have confirmed that removing .rpmmacros didn't fix the error.)
yes, this shouldn't cause trouble.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
any idea? is there build instructions/scripts/etc somewhere?
I would have expected the steps you took to have worked. What is your build environment, just a regular CentOS 5.4 install or something else?
Quoted 7 lines
Quoted 5 lines
Can you try:
# rpmbuild --target i686 --rebuild kernel-2.6.27.42-0.1.1.xs0.1.1.737.1065.src.rpmI don't really expect it will make any difference but that is precisely what the XCP build system does so it may be informative.
it didn't make any difference. see below.
OK. I'll install up a VM and give it a go see if I can work out what is happening.
Quoted 3 lines
my build host is running CentOS 5.3 and its normal toolchain. does ddk.iso contain some special toolchain which is different from CentOS's one?
Nope, it's just the standard one.
There is a special 64 bit cross compiled (x86_64-linux-gcc) but that is only used for the hypervisor.
Oh, I have an idea -- is you host running 32 or 64 bit CentOS?
Ian.
hi,
Quoted 2 lines
OK. I'll install up a VM and give it a go see if I can work out what is happening.
thanks.
Quoted 1 line
Oh, I have an idea -- is you host running 32 or 64 bit CentOS?
64 bit.
head-006% uname -a
Linux head-006 2.6.18-128.el5_vaj2010022501xen #1 SMP Mon Mar 1 09:28:06 JST 2010 x86_64 x86_64 x86_64 GNU/Linux head-006%
does it matter?
YAMAMOTO Takashi
Quoted 9 lines · YAMAMOTO Takashi
hi,
Quoted 2 lines
OK. I'll install up a VM and give it a go see if I can work out what is happening.
thanks.
Quoted 1 line
Oh, I have an idea -- is you host running 32 or 64 bit CentOS?
Quoted 7 lines
64 bit.
head-006% uname -a
Linux head-006 2.6.18-128.el5_vaj2010022501xen #1 SMP Mon Mar 1 09:28:06 JST 2010x86_64x86_64x86_64GNU/Linux head-006%does it matter?
Unfortunately I think it does. XCP domain 0 is 32 bit and the kernel-xen.spec is obviously not quite right for cross compiling. I'd recommend installing a 32 bit CentOS VM and using that. You may be able to make cross compiling work for the kernel but if you get into building anything further down the userspace part you may run into even more troubles.
If you want to try and get cross compilation working for the kernel only I think you would need to start by modifying the macro near the top of kernel-xen.spec file include a correct ARCH= in MAKEOPTS, probably by defining a kernelarch variable in the "%ifarch %{ix86}" and "%ifarch x86_64" blocks just above and using that.
Ian.