[PATCH v2 4/4] Add a Xen variant on i386 and amd64.
i386 Xen guests require a PAE (686-bigmem) kernel in order to
run. Therefore this variant includes the relevant installer kernel and
ramdisk in install.386/xen as well as suitable kernel udebs and proper
debs for the installed system.
amd64 Xen has no similar requirement but we include the kernels under
install.amd/xen in order to have a consistent path under both
architectures.
---
data/squeeze/exclude-udebs-i386 | 2 +-
docs/README.variants | 7 +++++++
tools/boot/squeeze/boot-x86 | 6 ++++++
tools/generate_di+k_list | 8 ++++++++
4 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/data/squeeze/exclude-udebs-i386 b/data/squeeze/exclude-udebs-i386
index eeed470..b3af1c9 100644
--- a/data/squeeze/exclude-udebs-i386
+++ b/data/squeeze/exclude-udebs-i386
@@ -29,7 +29,7 @@ usb-serial-modules-*
usb-storage-modules-*
zlib-modules-*
# 686-bigmem kernel udebs are only used for the Xen netboot image
-*-686-bigmem-di
+*-686-bigmem-di !xen
# Not used on i386
console-keymaps-acorn
console-keymaps-amiga
diff --git a/docs/README.variants b/docs/README.variants
index 75499b8..aefeb72 100644
--- a/docs/README.variants
+++ b/docs/README.variants
@@ -12,6 +12,13 @@ option (multiple times if desired) to the easy-build.sh script.
Available Variants
------------------
+* `xen' [i386, amd64 only]
+
+ This variant includes a kernel and installer initrd which is
+ compatible with the Xen hypervisor in `install.<arch>/xen' and
+ includes matching kernel module .udebs as well as a suitable kernel
+ .deb for installation into the final system.
+
Implementation
--------------
diff --git a/tools/boot/squeeze/boot-x86 b/tools/boot/squeeze/boot-x86
index 1ab405a..c538967 100644
--- a/tools/boot/squeeze/boot-x86
+++ b/tools/boot/squeeze/boot-x86
@@ -238,6 +238,12 @@ if [ "$THISTYPE" = "isolinux" ]; then
fi
rm -f boot$N/isolinux/isolinux.cfg.with*
+ if variant_enabled "xen" ; then
+ extra_image xen/vmlinuz
+ extra_image xen/initrd.gz
+ extra_image xen/xm-debian.cfg
+ fi
+
# Modify win32-loader.ini for the "current" arch
if [ -e boot$N/win32-loader.ini ]; then
sed -i "s|install/|$INSTALLDIR/|" boot$N/win32-loader.ini
diff --git a/tools/generate_di+k_list b/tools/generate_di+k_list
index 29e4246..9c2edb0 100755
--- a/tools/generate_di+k_list
+++ b/tools/generate_di+k_list
@@ -124,6 +124,14 @@ atl2-modules-2.6-486
atl2-modules-2.6-686
speakup-modules-2.6-486
speakup-modules-2.6-686
+#ifdef VARIANT_xen
+linux-image-2.6-686-bigmem
+linux-headers-2.6-686-bigmem
+loop-aes-modules-2.6-686-bigmem
+atl2-modules-2.6-686-bigmem
+speakup-modules-2.6-686-bigmem
+#endif
+
#endif
#ifdef ARCH_amd64
--
1.6.3.3
Reply to: