upstream xen-ified kernel building challenge
A fun challenge for those of you who eat raw upstream kernels for lunch:
1) Untar an upstream (say 2.6.30) kernel.org kernel
2) From the bash command line ONLY, execute one or more commands to configure the kernel so "make" will build a fully xen-ified kernel. (Everything else can use the defconfig default.)
For extra credit:
3) Determine the shortest sequence of commands to do the above.
After many tries, I have not been able to do (2) at all. I always have to fall back to an existing .config file that was created using menuconfig. (I *suspect* this is because PARAVIRT_GUEST is defined in Kconfig using a menuconfig line rather than a config line, but am unsure.)
Dan
Hello Dan,
it could look like this:
cat > .config << "EOF"CONFIG_PARAVIRT_GUEST=yCONFIG_XEN=yCONFIG_PARAVIRT=yCONFIG_PARAVIRT_SPINLOCKS=yCONFIG_PARAVIRT_CLOCK=yCONFIG_X86_CMPXCHG64=yCONFIG_HIGHMEM64G=yCONFIG_X86_PAE=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=yCONFIG_XEN_NETDEV_FRONTEND=yCONFIG_XEN_KBDDEV_FRONTEND=yCONFIG_FB_SYS_FILLRECT=yCONFIG_FB_SYS_COPYAREA=yCONFIG_FB_SYS_IMAGEBLIT=yCONFIG_FB_SYS_FOPS=yCONFIG_FB_DEFERRED_IO=yCONFIG_XEN_FBDEV_FRONTEND=y
EOF
yes '' | make oldconfig
(the options could be shortened with a for loop but it would make it unreadable...)
I think the oldconfig run will get and set your arch and shift options if needed for x86_64 but i haven't testet that but it should work on 32bit PAE systems...
have fun,
Marc
Am Dienstag, den 23.06.2009, 16:06 -0700 schrieb Dan Magenheimer:
Quoted 25 lines
A fun challenge for those of you who eat raw upstream kernels for lunch:
1) Untar an upstream (say 2.6.30) kernel.org kernel
2) From the bash command line ONLY, execute one or more commands to configure the kernel so "make" will build a fully xen-ified kernel. (Everything else can use the defconfig default.)For extra credit:
3) Determine the shortest sequence of commands to do the above.After many tries, I have not been able to do (2) at all. I always have to fall back to an existing .config file that was created using menuconfig. (I *suspect* this is because
PARAVIRT_GUESTis defined inKconfigusing a menuconfig line rather than a config line, but am unsure.)Dan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Thanks Marc! It looks like the magic key I was missing is CONFIG_HIGHMEM64G. The following works for a 32-bit 2.6.30 kernel. It misses the frame buffer drivers and paravirtualized spinlocks but results in a kernel runnable on Xen.
cat > .config << "EOF"CONFIG_PARAVIRT_GUEST=yCONFIG_XEN=yCONFIG_HIGHMEM64G=y
EOF
yes '' | make oldconfig
Quoted 74 lines
-----Original Message-----
From: Marc - A. Dahlhaus [ Administration | Westermann GmbH ] [mailto:[email protected]]
Sent: Wednesday, June 24, 2009 4:04 AM
To: Dan Magenheimer
Cc: Xen-devel
Subject: Re: [Xen-devel] upstream xen-ified kernel building challengeHello Dan,
it could look like this:
cat > .config << "EOF"
CONFIG_PARAVIRT_GUEST=yCONFIG_XEN=yCONFIG_PARAVIRT=yCONFIG_PARAVIRT_SPINLOCKS=yCONFIG_PARAVIRT_CLOCK=yCONFIG_X86_CMPXCHG64=yCONFIG_HIGHMEM64G=yCONFIG_X86_PAE=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=yCONFIG_XEN_NETDEV_FRONTEND=yCONFIG_XEN_KBDDEV_FRONTEND=yCONFIG_FB_SYS_FILLRECT=yCONFIG_FB_SYS_COPYAREA=yCONFIG_FB_SYS_IMAGEBLIT=yCONFIG_FB_SYS_FOPS=yCONFIG_FB_DEFERRED_IO=yCONFIG_XEN_FBDEV_FRONTEND=y
EOF
yes '' | make oldconfig(the options could be shortened with a for loop but it would make it unreadable...)
I think the oldconfig run will get and set your arch and shift options if needed for
x86_64but i haven't testet that but it should work on 32bit PAE systems...have fun,
Marc
Am Dienstag, den 23.06.2009, 16:06 -0700 schrieb Dan Magenheimer:
Quoted 25 lines
A fun challenge for those of you who eat raw upstream kernels for lunch:
1) Untar an upstream (say 2.6.30) kernel.org kernel
2) From the bash command line ONLY, execute one or more commands to configure the kernel so "make" will build a fully xen-ified kernel. (Everything else can use the defconfig default.)For extra credit:
3) Determine the shortest sequence of commands to do the above.After many tries, I have not been able to do (2) at all. I always have to fall back to an existing .config file that was created using menuconfig. (I *suspect* this is because
PARAVIRT_GUESTis defined inKconfigusing a menuconfig line rather than a config line, but am unsure.)Dan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
*Sigh* Though this kernel is runnable on Xen, it crashes early with a bad system call. So the default (2.6.30 32-bit) kernel build, with Xen configs added, doesn't boot.
(I have a config that works, its just frustrating as I'd really like to find the magic key! And the diffs between the working version and the "min" version (below) are too extensive!)
Quoted 102 lines
-----Original Message-----
From: Dan Magenheimer
Sent: Wednesday, June 24, 2009 10:50 AM
To: Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
Cc: Xen-devel
Subject: RE: [Xen-devel] upstream xen-ified kernel building challengeThanks Marc! It looks like the magic key I was missing is
CONFIG_HIGHMEM64G. The following works for a 32-bit 2.6.30 kernel. It misses the frame buffer drivers and paravirtualized spinlocks but results in a kernel runnable on Xen.cat > .config << "EOF"
CONFIG_PARAVIRT_GUEST=yCONFIG_XEN=yCONFIG_HIGHMEM64G=y
EOF
yes '' | make oldconfigQuoted 7 lines
-----Original Message-----
From: Marc - A. Dahlhaus [ Administration | Westermann GmbH ] [mailto:[email protected]]
Sent: Wednesday, June 24, 2009 4:04 AM
To: Dan Magenheimer
Cc: Xen-devel
Subject: Re: [Xen-devel] upstream xen-ified kernel buildingchallenge
Quoted 28 lines
Hello Dan,
it could look like this:
cat > .config << "EOF"
CONFIG_PARAVIRT_GUEST=yCONFIG_XEN=yCONFIG_PARAVIRT=yCONFIG_PARAVIRT_SPINLOCKS=yCONFIG_PARAVIRT_CLOCK=yCONFIG_X86_CMPXCHG64=yCONFIG_HIGHMEM64G=yCONFIG_X86_PAE=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=yCONFIG_XEN_NETDEV_FRONTEND=yCONFIG_XEN_KBDDEV_FRONTEND=yCONFIG_FB_SYS_FILLRECT=yCONFIG_FB_SYS_COPYAREA=yCONFIG_FB_SYS_IMAGEBLIT=yCONFIG_FB_SYS_FOPS=yCONFIG_FB_DEFERRED_IO=yCONFIG_XEN_FBDEV_FRONTEND=y
EOF
yes '' | make oldconfigQuoted 4 lines
(the options could be shortened with a for loop but it would make it unreadable...)
I think the oldconfig run will get and set your arch and
shift options
Quoted 35 lines
if needed for
x86_64but i haven't testet that but it should work on 32bit PAE systems...have fun,
Marc
Am Dienstag, den 23.06.2009, 16:06 -0700 schrieb Dan Magenheimer:
Quoted 25 lines
A fun challenge for those of you who eat raw upstream kernels for lunch:
1) Untar an upstream (say 2.6.30) kernel.org kernel
2) From the bash command line ONLY, execute one or more commands to configure the kernel so "make" will build a fully xen-ified kernel. (Everything else can use the defconfig default.)For extra credit:
3) Determine the shortest sequence of commands to do the above.After many tries, I have not been able to do (2) at all. I always have to fall back to an existing .config file that was created using menuconfig. (I *suspect* this is because
PARAVIRT_GUESTis defined inKconfigusing a menuconfig line rather than a config line, but am unsure.)Dan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel