[Fedora-xen] fedora-xen-ia64 integration, step 1

Aron Griffis aron at hp.com
Fri Jun 2 17:10:02 UTC 2006

Here is an updated patch based on Juan's and Jeremy's comments.

This patch makes the following changes to the kernel specfile:

    - abstract xenlinux build using xen_flags, xen_target and
      xen_image instead of assuming x86 behavior

    - add xen_* overrides to %ifarch ia64, won't be used until
      buildxen is flipped on for ia64

    - run the ia64 xen-mkbuildtree-pre hook following applying the xen
      patch, on all architectures for consistency.

    - update numerous hardcoded references to /boot to use
      %{image_install_path} instead.  No exception for xenU kernels.

    - build the hypervisor with %{?_smp_mflags} (it works fine)

Signed-off-by: Aron Griffis <aron at hp.com>

--- kernel-2.6.spec.orig	2006-06-01 19:12:59.000000000 -0400
+++ kernel-2.6.spec	2006-06-02 13:05:34.000000000 -0400
@@ -32,6 +32,9 @@
 %define xen_version 20060524
 %define make_target bzImage
 %define kernel_image x86
+%define xen_flags verbose=y debug=y crash_debug=y
+%define xen_target vmlinuz
+%define xen_image vmlinuz
@@ -127,11 +130,15 @@
 %ifarch ia64
-%define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ia64.config
+%define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ia64*.config
 %define image_install_path boot/efi/EFI/redhat
 %define signmodules 1
 %define make_target compressed
 %define kernel_image vmlinux.gz
+# ia64 doesn't building with debug=y at the moment
+%define xen_flags verbose=y crash_debug=y
+%define xen_target compressed
+%define xen_image vmlinux.gz
@@ -834,6 +841,11 @@
 # Delete the rest of the backup files, they just confuse the build later
 find -name "*.p.xen" | xargs rm -f
+# Run the ia64 xen-mkbuildtree-pre hook, which creates these symlinks:
+#       include/asm-ia64/xen/asm-xsi-offsets.h
+#       drivers/xen/core/xenia64_init.c
 # Xen includes a patch which moves the vsyscall fixmap into a user-space VA,
 # freeing user-space from reliance on an absolute fixmap area and so allowing
@@ -1293,15 +1305,15 @@
 %if %{includexen}
 %if %{buildxen}
   cd xen
-  mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
+  mkdir -p $RPM_BUILD_ROOT/%{image_install_path} $RPM_BUILD_ROOT/boot
 %if %{buildxenPAE}
-  make debug=y verbose=y crash_debug=y pae=y
-  install -m 644 xen.gz $RPM_BUILD_ROOT/boot/xen.gz-%{KVERREL}-PAE
+  make %{xen_flags} pae=y
+  install -m 644 xen.gz $RPM_BUILD_ROOT/%{image_install_path}/xen.gz-%{KVERREL}-PAE
   install -m 755 xen-syms $RPM_BUILD_ROOT/boot/xen-syms-%{KVERREL}-PAE
   make clean
-  make debug=y verbose=y crash_debug=y
-  install -m 644 xen.gz $RPM_BUILD_ROOT/boot/xen.gz-%{KVERREL}
+  make %{?_smp_mflags} %{xen_flags}
+  install -m 644 xen.gz $RPM_BUILD_ROOT/%{image_install_path}/xen.gz-%{KVERREL}
   install -m 755 xen-syms $RPM_BUILD_ROOT/boot/xen-syms-%{KVERREL}
   cd ..
@@ -1323,13 +1335,13 @@
 %if %{includexen}
 %if %{buildxenPAE}
-BuildKernel vmlinuz vmlinuz xen0-PAE
-BuildKernel vmlinuz vmlinuz xenU-PAE
+BuildKernel %xen_target %xen_image xen0-PAE
+BuildKernel %xen_target %xen_image xenU-PAE
 %if %{buildxen}
-BuildKernel vmlinuz vmlinuz xen0
-BuildKernel vmlinuz vmlinuz xenU
+BuildKernel %xen_target %xen_image xen0
+BuildKernel %xen_target %xen_image xenU
@@ -1443,7 +1455,7 @@
 %post xen0
 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}-xen0
-/sbin/new-kernel-pkg --package kernel-xen0 --mkinitrd --depmod --install --multiboot=/boot/xen.gz-%{KVERREL} %{KVERREL}xen0
+/sbin/new-kernel-pkg --package kernel-xen0 --mkinitrd --depmod --install --multiboot=/%{image_install_path}/xen.gz-%{KVERREL} %{KVERREL}xen0
 [ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
 %post xen0-devel
@@ -1469,7 +1481,7 @@
 %post xen0-PAE
 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}-xen0-PAE
-/sbin/new-kernel-pkg --package kernel-xen0-PAE --mkinitrd --depmod --install --multiboot=/boot/xen.gz-%{KVERREL}-PAE %{KVERREL}xen0-PAE
+/sbin/new-kernel-pkg --package kernel-xen0-PAE --mkinitrd --depmod --install --multiboot=/%{image_install_path}/xen.gz-%{KVERREL}-PAE %{KVERREL}xen0-PAE
 [ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
 %post xen0-PAE-devel
@@ -1611,7 +1623,7 @@
 %dir /lib/modules/%{KVERREL}xen0
@@ -1651,7 +1663,7 @@
 %dir /lib/modules/%{KVERREL}xen0-PAE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-xen/attachments/20060602/5924cf93/attachment.sig>

More information about the Fedora-xen mailing list