WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.2-testing] [BUILD] Fixup support for building ups

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] [BUILD] Fixup support for building upstream kernels.
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jun 2008 21:10:27 -0700
Delivery-date: Mon, 09 Jun 2008 21:10:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213002682 -3600
# Node ID 19b727584b8cde1798c13d32960a819a09788097
# Parent  0ba107453f28049d8e8f502e51552b4aa44a1317
[BUILD] Fixup support for building upstream kernels.

In particular:
 - support merged x86 architecture. To facilitate this it made sense
   to encode some existing logic in shell scripts rather than
   increasing complicated make conditionals.
 - set CONFIG_PARAVIRT_GUEST=y which is required for newer kernels.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
xen-unstable changeset:   17030:419a141ca16d7b248805addb0465a6b48e9723dc
xen-unstable date:        Tue Feb 12 14:59:01 2008 +0000
---
 buildconfigs/enable-xen-config   |    9 ++++++++-
 buildconfigs/mk.linux-2.6-common |   24 ++++++++----------------
 buildconfigs/select-linux-arch   |   30 ++++++++++++++++++++++++++++++
 buildconfigs/select-linux-image  |   33 +++++++++++++++++++++++++++++++++
 4 files changed, 79 insertions(+), 17 deletions(-)

diff -r 0ba107453f28 -r 19b727584b8c buildconfigs/enable-xen-config
--- a/buildconfigs/enable-xen-config    Mon Jun 09 10:10:47 2008 +0100
+++ b/buildconfigs/enable-xen-config    Mon Jun 09 10:11:22 2008 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-set -ex
+set -e
 
 if [ $# -ne 1 ] ; then
        echo "Usage $(basename $0) <config-file>" 1>&2
@@ -26,6 +26,7 @@ setopt()
 }
 
 setopt CONFIG_PARAVIRT y
+setopt CONFIG_PARAVIRT_GUEST y
 setopt CONFIG_XEN y
 setopt CONFIG_VMI y
 setopt CONFIG_KVM y
@@ -37,4 +38,10 @@ setopt CONFIG_HVC_XEN y
 setopt CONFIG_HVC_XEN y
 setopt CONFIG_NUMA n
 
+case ${XEN_TARGET_ARCH} in
+    x86_32) setopt CONFIG_64BIT n ;;
+    x86_64) setopt CONFIG_64BIT y ;;
+    *) ;;
+esac
+
 exit 0
diff -r 0ba107453f28 -r 19b727584b8c buildconfigs/mk.linux-2.6-common
--- a/buildconfigs/mk.linux-2.6-common  Mon Jun 09 10:10:47 2008 +0100
+++ b/buildconfigs/mk.linux-2.6-common  Mon Jun 09 10:11:22 2008 +0100
@@ -20,22 +20,9 @@ __NONINT_CONFIG =
 __NONINT_CONFIG =
 endif
 
-# Let XEN_TARGET_ARCH override ARCH.
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-LINUX_ARCH     ?= i386
-else
-LINUX_ARCH     ?= $(XEN_TARGET_ARCH)
-endif
-
 LINUX_DIR     = build-linux-$(LINUX_VER)$(EXTRAVERSION)_$(XEN_TARGET_ARCH)
 
 IMAGE_TARGET ?= vmlinuz
-ifneq ($(XEN_TARGET_ARCH),ia64)
-IMAGE_PATH ?= arch/$(LINUX_ARCH)/boot/$(firstword $(IMAGE_TARGET))
-else
-IMAGE_PATH ?= arch/ia64/hp/sim/boot/vmlinux.gz
-endif
-INSTALL_BOOT_PATH := $(DESTDIR)/boot
 
 LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
 
@@ -43,6 +30,11 @@ _build: build
 _build: build
 
 include buildconfigs/src.$(XEN_LINUX_SOURCE)
+
+LINUX_ARCH = $$(sh buildconfigs/select-linux-arch $(LINUX_SRCDIR))
+IMAGE_PATH = $$(sh buildconfigs/select-linux-image $(LINUX_DIR) $(LINUX_ARCH) 
$(IMAGE_TARGET))
+
+INSTALL_BOOT_PATH := $(DESTDIR)/boot
 
 # Default to allowing interface mismatch
 ifndef XEN_LINUX_ALLOW_INTERFACE_MISMATCH
@@ -70,9 +62,9 @@ endif
        fi
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
$(IMAGE_TARGET)
        mkdir -p $(INSTALL_BOOT_PATH)
-       cp $(LINUX_DIR)/$(IMAGE_PATH) 
$(INSTALL_BOOT_PATH)/vmlinuz-$(KERNELRELEASE)
-       cp $(LINUX_DIR)/.config $(INSTALL_BOOT_PATH)/config-$(KERNELRELEASE)
-       cp $(LINUX_DIR)/System.map 
$(INSTALL_BOOT_PATH)/System.map-$(KERNELRELEASE)
+       @cp -v $(IMAGE_PATH) $(INSTALL_BOOT_PATH)/vmlinuz-$(KERNELRELEASE)
+       @cp -v $(LINUX_DIR)/.config $(INSTALL_BOOT_PATH)/config-$(KERNELRELEASE)
+       @cp -v $(LINUX_DIR)/System.map 
$(INSTALL_BOOT_PATH)/System.map-$(KERNELRELEASE)
 
 $(LINUX_DIR)/include/linux/autoconf.h: 
CONFIG_FILE=$(CURDIR)/$(LINUX_DIR)/.config
 $(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
diff -r 0ba107453f28 -r 19b727584b8c buildconfigs/select-linux-arch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/buildconfigs/select-linux-arch    Mon Jun 09 10:11:22 2008 +0100
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+ME=$(basename $0)
+
+if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
+    echo "usage: $ME <linux-build-directory>" 1>&2
+    exit 1;
+fi
+
+LINUX_DIR=$1
+
+case ${XEN_TARGET_ARCH} in
+    x86_32|x86_64)
+       if [ -d ${LINUX_DIR}/arch/x86 ] ; then
+           ARCH=x86
+       elif [ "${XEN_TARGET_ARCH}" = "x86_32" ] ; then
+           ARCH=i386
+       else
+           ARCH=x86_64
+       fi
+       ;;
+    *)
+       ARCH=${XEN_TARGET_ARCH}
+       ;;
+esac
+
+echo "$ME: ${ARCH}" 1>&2
+echo ${ARCH}
+
+exit 0
diff -r 0ba107453f28 -r 19b727584b8c buildconfigs/select-linux-image
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/buildconfigs/select-linux-image   Mon Jun 09 10:11:22 2008 +0100
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+ME=$(basename $0)
+
+if [ $# -lt 3 ] ; then
+    echo "usage: $ME <linux-build-directory> <linux-arch> <linux-targets...>" 
1>&2
+    exit 1;
+fi
+
+LINUX_DIR=$1
+LINUX_ARCH=$2
+LINUX_TARGET=$3 # We don't care about second and subsequent targets
+
+case ${XEN_TARGET_ARCH} in
+    ia64)
+       IMAGE=${LINUX_DIR}/arch/ia64/hp/sim/boot/vmlinux.gz
+       ;;
+    *)
+       if [ -f ${LINUX_DIR}/arch/${LINUX_ARCH}/boot/${LINUX_TARGET} ] ; then
+           IMAGE=${LINUX_DIR}/arch/${LINUX_ARCH}/boot/${LINUX_TARGET}
+       elif [ -f ${LINUX_DIR}/${LINUX_TARGET} ] ; then
+           IMAGE=${LINUX_DIR}/${LINUX_TARGET}
+       else
+           echo "$ME: cannot determine Linux image to use for ${LINUX_ARCH} in 
${LINUX_DIR}" 1>&2
+           exit 1
+       fi
+       ;;
+esac
+
+echo "$ME: ${IMAGE}" 1>&2
+echo ${IMAGE}
+
+exit 0

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] [BUILD] Fixup support for building upstream kernels., Xen patchbot-3.2-testing <=