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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>

--- 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
 
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
 
@@ -127,11 +130,15 @@
 %endif
 
 %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
 %endif
 
 #
@@ -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
+arch/ia64/xen-mkbuildtree-pre
+
 #
 # 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
 %endif
-  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 ..
 %endif
@@ -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
 %endif
 
 %if %{buildxen}
-BuildKernel vmlinuz vmlinuz xen0
-BuildKernel vmlinuz vmlinuz xenU
+BuildKernel %xen_target %xen_image xen0
+BuildKernel %xen_target %xen_image xenU
 %endif
 %endif
 
@@ -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 @@
 /%{image_install_path}/vmlinuz-%{KVERREL}xen0
 /boot/System.map-%{KVERREL}xen0
 /boot/config-%{KVERREL}xen0
-/boot/xen.gz-%{KVERREL}
+/%{image_install_path}/xen.gz-%{KVERREL}
 /boot/xen-syms-%{KVERREL}
 %dir /lib/modules/%{KVERREL}xen0
 /lib/modules/%{KVERREL}xen0/kernel
@@ -1651,7 +1663,7 @@
 /%{image_install_path}/vmlinuz-%{KVERREL}xen0-PAE
 /boot/System.map-%{KVERREL}xen0-PAE
 /boot/config-%{KVERREL}xen0-PAE
-/boot/xen.gz-%{KVERREL}-PAE
+/%{image_install_path}/xen.gz-%{KVERREL}-PAE
 /boot/xen-syms-%{KVERREL}-PAE
 %dir /lib/modules/%{KVERREL}xen0-PAE
 /lib/modules/%{KVERREL}xen0-PAE/kernel

Attachment: pgpRwEx1TPr8S.pgp
Description: PGP signature


[Index of Archives]     [Fedora General]     [Fedora Music]     [Linux Kernel]     [Fedora Desktop]     [Fedora Directory]     [PAM]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux