1
votes

I am trying to compile the linux kernel (3.0.0-13) with the Xen dom0 config flags which are not exposed via menuconfig. (Yes, I know that ubuntu provides a 'virtual' flavoured kernel that supports Xen paravirtualization, but that kernel does not seem to boot on my hardware. So, I am trying to compile the 'generic' flavoured ubuntu kernel with the extra Xen config flags since I know that the 'generic' flavour runs on my hardware). Every time that I try to compile my config flags are ignored based on the .config file that is generated and packaged with my kernel binary.

I have tried the following the following:

  • Downloaded the kernel source using apt-get source linux-image

I have then followed all of the steps from this guide: How to compile a new Ubuntu 11.10 (Oneiric) kernel and performed the following extra steps:

  • put my own config flags in the config.flavour.xxx file then compiled the linux-image package
  • Paused the 'debian/rules editconfigs' command immediately after the it runs 'menuconfig' and replaced the build/.config file with my custom .config file then compiled the linux-image package

I have also used the following howto How To Compile A Kernel - The Ubuntu Way and run the following commands on kernel source code that I already had:

  • edit the .config file to have my config flags
  • run 'make oldconfig'
  • run 'make-kpkg clean && fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers'

After every time I have compiled the kernel I have installed the newly compiled linux-image package and have discovered that my config flags are not in the /boot/config-xxx file as I expect.

  1. What am I doing wrong to cause my config flags to be ignored?
  2. What can I do to make sure that my kernel config flags are used when compiling?
  3. Is there some other option than recompiling the kernel to get a Xen dom0 kernel that work for my hardware?
2

2 Answers

1
votes

What am I doing wrong to cause my config flags to be ignored?

The root of the issue lies in the first portion of your problem; the Xen dom0 config flags are not exposed via menuconfig

Simply setting them in the .config doesn't mean they'll be activated. You have to consider the dependencies for the config options.

From the linux 3.0 tag at github: https://github.com/torvalds/linux/blob/02f8c6aee8df3cdc935e9bdd4f2d020306035dbe/arch/x86/xen/Kconfig

config XEN_DOM0
def_bool y
depends on XEN && PCI_XEN && SWIOTLB_XEN
depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI

Are all these depends flags met?

What can I do to make sure that my kernel config flags are used when compiling?

In the beginning stages of the kernel compile process, the .config file is re-written if there are any discrepancies. A good test to make sure your edits will persist is checking if they still exist in your .config file after doing a make menuconfig and saving changes. If after that your flags are still there, you can be sure that your flags are being used.

Is there some other option than recompiling the kernel to get a Xen dom0 kernel that work for my hardware?

Not unless another distribution ships with XEN_DOM0 enabled.

2
votes

For question 3: Is there another way to get a xen dom0 kernel for my hardware?

Yes.

Although all of the xen documentation says that all stock kernel support xen dom0, what they mean is that the source for all stock kernels now support xen dom0 but that support is turned off in their precompiled binaries.

On debian there is the following package which is a prebuilt linux kernel with the xen dom0 support turned on. Package: linux-image-xen-686

For anyone else who is really looking to compile their own xen dom0 kernel the following site has a good guide: Compiling a Xen Dom0 Kernel for Ubuntu Jaunty