[Pkg-xen-devel] Bug#389320: Patch to add ia64 support

Alex Williamson alex.williamson at hp.com
Tue Jul 17 19:27:05 UTC 2007


Tags: patch fixed-upstream

Patch below allows this package to be built on ia64.  Xen has supported
ia64 since ~3.0.1.  Thanks,

	Alex

diff -urN a/xen-3.0-3.0.4-1/debian/arch/defines b/xen-3.0-3.0.4-1/debian/arch/defines
--- a/xen-3.0-3.0.4-1/debian/arch/defines	2007-07-17 12:40:58.000000000 -0600
+++ b/xen-3.0-3.0.4-1/debian/arch/defines	2007-07-17 12:41:17.000000000 -0600
@@ -5,3 +5,4 @@
 arches:
  amd64
  i386
+ ia64
diff -urN a/xen-3.0-3.0.4-1/debian/arch/ia64/defines b/xen-3.0-3.0.4-1/debian/arch/ia64/defines
--- a/xen-3.0-3.0.4-1/debian/arch/ia64/defines	1969-12-31 17:00:00.000000000 -0700
+++ b/xen-3.0-3.0.4-1/debian/arch/ia64/defines	2007-07-17 12:41:17.000000000 -0600
@@ -0,0 +1,8 @@
+[base]
+flavours:
+ ia64
+xen-arch: ia64
+
+[ia64]
+class: ia64
+longclass: all single- and multiprocessor Intel Itanium II
diff -urN a/xen-3.0-3.0.4-1/debian/control b/xen-3.0-3.0.4-1/debian/control
--- a/xen-3.0-3.0.4-1/debian/control	2007-07-17 12:40:58.000000000 -0600
+++ b/xen-3.0-3.0.4-1/debian/control	2007-07-17 12:41:17.000000000 -0600
@@ -16,7 +16,7 @@
  how XEN works).  It also contains the VBD and Xeno howtos.
 
 Package: xen-utils-3.0.4-1
-Architecture: amd64 i386
+Architecture: amd64 i386 ia64
 Provides: xen-utils
 Depends: ${shlibs:Depends}, ${python:Depends}, xen-utils-common, iproute, udev
 Recommends: bridge-utils, libc6-xen [i386], xen-hypervisor-3.0.4-1
@@ -27,7 +27,7 @@
 XB-Python-Version: ${python:Versions}
 
 Package: xen-ioemu-3.0.4-1
-Architecture: amd64 i386
+Architecture: amd64 i386 ia64
 Depends: ${shlibs:Depends}, xen-utils-3.0.4-1
 Description: XEN administrative tools
  The userspace tools to manage a system virtualized through the XEN virtual
@@ -90,3 +90,17 @@
  kernel specifically crafted to work as the Domain 0, mediating hardware
  access for XEN itself.
 
+Package: xen-hypervisor-3.0.4-1-ia64
+Architecture: ia64
+Provides: xen-hypervisor, xen-hypervisor-3.0, xen-hypervisor-3.0.4-1, xen-hypervisor-ia64
+Depends: xen-utils-3.0.4-1
+Suggests: xen-docs-3.0
+Description: The Xen Hypervisor on ia64
+ The hypervisor is the "core" for XEN itself.  It gets booted by the boot
+ loader and controls cpu and memory, sharing them between your
+ administrative domain (Domain 0) and the virtual guest systems.
+ .
+ In order to boot a XEN system along with this package you also need a
+ kernel specifically crafted to work as the Domain 0, mediating hardware
+ access for XEN itself.
+
diff -urN a/xen-3.0-3.0.4-1/debian/control.md5sum b/xen-3.0-3.0.4-1/debian/control.md5sum
--- a/xen-3.0-3.0.4-1/debian/control.md5sum	2007-07-17 12:40:58.000000000 -0600
+++ b/xen-3.0-3.0.4-1/debian/control.md5sum	2007-07-17 12:41:17.000000000 -0600
@@ -1,8 +1,9 @@
-7c0f753594272a01ff96c12b0f5c8d66  debian/changelog
+e4398f000e577b5d0aa41245b35202fa  debian/changelog
 a6f482dc8dde7fa3d02c4ddf20c0f1c0  debian/templates/control.hypervisor.in
 65abcd55f0cab8a1fe0902a800e1cde4  debian/templates/control.main.in
 922d50d8037888fd37577b1123438c76  debian/templates/control.source.in
 500cdf2c42ac337f8f1031e64c9addcd  debian/templates/control.utils.in
-db346ea343858c69dfdeeb24643e2c10  debian/arch/defines
+a0d1bc6e4d07d659fa5826d8f986463a  debian/arch/defines
 296aa76d387953934c54e282f7351d4e  debian/arch/amd64/defines
 9382ea30106f75e9a48cdb12fb21bcee  debian/arch/i386/defines
+c7faa4de2ded12d43d42d86091438d6c  debian/arch/ia64/defines
diff -urN a/xen-3.0-3.0.4-1/debian/patches/00list b/xen-3.0-3.0.4-1/debian/patches/00list
--- a/xen-3.0-3.0.4-1/debian/patches/00list	2007-07-17 12:40:58.000000000 -0600
+++ b/xen-3.0-3.0.4-1/debian/patches/00list	2007-07-17 12:41:17.000000000 -0600
@@ -8,3 +8,5 @@
 blktap-disable
 path-relative
 not-reinvent-udev
+install-boot
+ia64-build
diff -urN a/xen-3.0-3.0.4-1/debian/patches/ia64-build.dpatch b/xen-3.0-3.0.4-1/debian/patches/ia64-build.dpatch
--- a/xen-3.0-3.0.4-1/debian/patches/ia64-build.dpatch	1969-12-31 17:00:00.000000000 -0700
+++ b/xen-3.0-3.0.4-1/debian/patches/ia64-build.dpatch	2007-07-17 12:41:17.000000000 -0600
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ia64-build.dpatch by Alex Williamson <alex.williamson at hp.com>
+##
+## Build fixes for ia64
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+## DP: # HG changeset patch
+## DP: # User kaf24 at firebug.cl.cam.ac.uk
+## DP: # Date 1166866818 0
+## DP: # Node ID bbd1c469ff5b17170fa657f21817aaa0d19dd7fd
+## DP: # Parent 36e33da5146bef9109723bb96a356d1fca14496e
+## DP: [XEN] Add const attribute to elf_sanity_check() parameter on all arches.
+## DP: Signed-off-by: Alex Williamson <alex.williamson at hp.com>
+## DP: 
+--- a/xen/arch/ia64/xen/domain.c	Sat Dec 23 09:38:07 2006 +0000
++++ b/xen/arch/ia64/xen/domain.c	Sat Dec 23 09:40:18 2006 +0000
+@@ -867,7 +867,7 @@ int shadow_mode_control(struct domain *d
+ #endif
+ 
+ // see arch/x86/xxx/domain_build.c
+-int elf_sanity_check(Elf_Ehdr *ehdr)
++int elf_sanity_check(const Elf_Ehdr *ehdr)
+ {
+ 	if (!(IS_ELF(*ehdr)))
+ 	{
+--- a/xen/arch/powerpc/domain_build.c	Sat Dec 23 09:38:07 2006 +0000
++++ b/xen/arch/powerpc/domain_build.c	Sat Dec 23 09:40:18 2006 +0000
+@@ -51,7 +51,7 @@ static unsigned int opt_dom0_shadow;
+ static unsigned int opt_dom0_shadow;
+ boolean_param("dom0_shadow", opt_dom0_shadow);
+ 
+-int elf_sanity_check(Elf_Ehdr *ehdr)
++int elf_sanity_check(const Elf_Ehdr *ehdr)
+ {
+     if (IS_ELF(*ehdr))
+         /* we are happy with either */
+
diff -urN a/xen-3.0-3.0.4-1/debian/patches/install-boot.dpatch b/xen-3.0-3.0.4-1/debian/patches/install-boot.dpatch
--- a/xen-3.0-3.0.4-1/debian/patches/install-boot.dpatch	1969-12-31 17:00:00.000000000 -0700
+++ b/xen-3.0-3.0.4-1/debian/patches/install-boot.dpatch	2007-07-17 12:41:17.000000000 -0600
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## install-boot.dpatch by Alex Williamson <alex.williamson at hp.com>
+##
+## Only archs building tools/firmware end up with /usr/lib/xen/boot,
+## create it if the subdirs install didn't
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+--- xen-3.0/tools/Makefile	2007-07-17 08:53:23.000000000 -0600
++++ xen-3.0/tools/Makefile	2007-07-17 08:55:57.000000000 -0600
+@@ -42,6 +42,8 @@
+ 	$(MAKE) ioemuinstall
+ 	$(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
+ 	$(INSTALL_DIR) -p $(DESTDIR)/var/log/xen
++	[ -d $(DESTDIR)/usr/lib/xen-$(XEN_VERSION)/boot ] || \
++	  $(INSTALL_DIR) -p $(DESTDIR)/usr/lib/xen-$(XEN_VERSION)/boot
+ 
+ .PHONY: clean
+ clean: check_clean
diff -urN a/xen-3.0-3.0.4-1/debian/patches/qemu-arch.dpatch b/xen-3.0-3.0.4-1/debian/patches/qemu-arch.dpatch
--- a/xen-3.0-3.0.4-1/debian/patches/qemu-arch.dpatch	2007-07-17 12:40:58.000000000 -0600
+++ b/xen-3.0-3.0.4-1/debian/patches/qemu-arch.dpatch	2007-07-17 12:41:17.000000000 -0600
@@ -8,7 +8,7 @@
 diff -urNad xen-unstable~/tools/ioemu/configure xen-unstable/tools/ioemu/configure
 --- xen-unstable~/tools/ioemu/configure	2006-08-18 15:35:45.000000000 +0000
 +++ xen-unstable/tools/ioemu/configure	2006-08-18 16:19:34.759859866 +0000
-@@ -27,46 +27,18 @@
+@@ -27,46 +27,21 @@
  make="make"
  install="install"
  strip="strip"
@@ -58,6 +58,9 @@
 +  powerpc)
 +    cpu="powerpc"
 +  ;;
++  ia64)
++    cpu="ia64"
++  ;;
    *)
      cpu="unknown"
    ;;
diff -urN a/xen-3.0-3.0.4-1/debian/rules.gen b/xen-3.0-3.0.4-1/debian/rules.gen
--- a/xen-3.0-3.0.4-1/debian/rules.gen	2007-07-17 12:40:58.000000000 -0600
+++ b/xen-3.0-3.0.4-1/debian/rules.gen	2007-07-17 12:41:17.000000000 -0600
@@ -70,3 +70,31 @@
 setup-i386-i386-pae-real:
 	$(MAKE) -f debian/rules.real setup-flavour MAJOR='3.0' FLAVOUR='i386-pae' CONFIG='pae=y' SUBARCH='none' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='x86_32' ABINAME='-1' ARCH='i386'
 source-i386-i386-pae-real:
+binary-arch:: binary-arch-ia64
+binary-arch-ia64:: binary-arch-ia64-real
+build:: build-ia64
+build-ia64:: build-ia64-real
+setup:: setup-ia64
+setup-ia64:: setup-ia64-real
+binary-arch-ia64-real:
+	$(MAKE) -f debian/rules.real binary-arch-arch MAJOR='3.0' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='ia64' ABINAME='-1' ARCH='ia64'
+build-ia64-real:
+	$(MAKE) -f debian/rules.real build-arch MAJOR='3.0' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='ia64' ABINAME='-1' ARCH='ia64'
+setup-ia64-real:
+	$(MAKE) -f debian/rules.real setup-arch MAJOR='3.0' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='ia64' ABINAME='-1' ARCH='ia64'
+binary-arch-ia64-none-real:
+build-ia64-none-real:
+setup-ia64-none-real:
+binary-arch-ia64:: binary-arch-ia64-ia64
+binary-arch-ia64-ia64:: binary-arch-ia64-ia64-real
+build-ia64:: build-ia64-ia64
+build-ia64-ia64:: build-ia64-ia64-real
+setup-ia64:: setup-ia64-ia64
+setup-ia64-ia64:: setup-ia64-ia64-real
+binary-arch-ia64-ia64-real:
+	$(MAKE) -f debian/rules.real binary-arch-flavour MAJOR='3.0' FLAVOUR='ia64' SUBARCH='none' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='ia64' ABINAME='-1' ARCH='ia64'
+build-ia64-ia64-real:
+	$(MAKE) -f debian/rules.real build-flavour MAJOR='3.0' FLAVOUR='ia64' SUBARCH='none' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='ia64' ABINAME='-1' ARCH='ia64'
+setup-ia64-ia64-real:
+	$(MAKE) -f debian/rules.real setup-flavour MAJOR='3.0' FLAVOUR='ia64' SUBARCH='none' SHORT_VERSION='3.0' EXTRAVERSION='.4' VERSION='3.0.4' XEN_ARCH='ia64' ABINAME='-1' ARCH='ia64'
+source-ia64-ia64-real:
diff -urN a/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postinst b/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postinst
--- a/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postinst	1969-12-31 17:00:00.000000000 -0700
+++ b/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postinst	2007-07-17 12:41:17.000000000 -0600
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+    configure)
+        if command -v elilo > /dev/null; then
+            elilo || :
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+	echo "postinst called with unknown argument \`$1'" >&2
+	exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -urN a/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postrm b/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postrm
--- a/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postrm	1969-12-31 17:00:00.000000000 -0700
+++ b/xen-3.0-3.0.4-1/debian/xen-hypervisor-3.0.4-1-ia64.postrm	2007-07-17 12:41:17.000000000 -0600
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+    remove)
+        if command -v elilo > /dev/null; then
+            elilo || :
+        fi
+    ;;
+
+    purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0






More information about the Pkg-xen-devel mailing list