# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1177087958 -3600
# Node ID 59fdc42a67c9f405841b6d5c2e64e9a394fd6f04
# Parent adfc3684e54e441c1ae1700cdb5b8e5523a82b64
# Parent 53b1cfcf129fd89139723512c3560dac22961aff
Merge with xen-unstable for 3.0.5-rc2.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
buildconfigs/mk.linux-2.6.5-SLES-xen | 12 ----
buildconfigs/mk.linux-2.6.9-RHEL-xen | 12 ----
buildconfigs/src.hg-clone | 9 ---
buildconfigs/src.sparse | 73 --------------------------
buildconfigs/Rules.mk | 95 +++++++++++++++++++++++++++++++++--
buildconfigs/mk.linux-2.6-xen | 83 +++++++++---------------------
tools/python/xen/xend/XendConfig.py | 2
xen/Makefile | 2
8 files changed, 120 insertions(+), 168 deletions(-)
diff -r adfc3684e54e -r 59fdc42a67c9 buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk Fri Apr 20 14:05:43 2007 +0100
+++ b/buildconfigs/Rules.mk Fri Apr 20 17:52:38 2007 +0100
@@ -3,8 +3,78 @@ include Config.mk
export DESTDIR
+# Choose the best mirror to download linux kernel
+KERNEL_REPO = http://www.kernel.org
+
ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
+
+# Setup pristine search path
+PRISTINE_SRC_PATH ?= .:..
+vpath pristine-% $(PRISTINE_SRC_PATH)
+
+# Let XEN_TARGET_ARCH override ARCH.
+ifeq ($(XEN_TARGET_ARCH),x86_32)
+LINUX_ARCH ?= i386
+else
+LINUX_ARCH ?= $(XEN_TARGET_ARCH)
+endif
+
+# Expand Linux series to Linux version
+LINUX_SERIES ?= 2.6
+LINUX_VER ?= $(shell grep "^LINUX_VER " buildconfigs/mk.linux-2.6-xen |
sed -e 's/.*=[ ]*//')
+
+# Setup Linux search path
+LINUX_SRC_PATH ?= .:..
+vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
+vpath patch-%.bz2 $(LINUX_SRC_PATH)
+
+# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
+linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word
2,$(subst ., ,$*))
+linux-%.tar.bz2:
+ @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
+ wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
+
+patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word
2,$(subst ., ,$(*F)))
+patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -,
,$(*F))),snapshots,testing)
+patch-%.bz2:
+ @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
+ wget
$(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
+
+pristine-%: pristine-%/.valid-pristine
+ @true
+
+pristine-%/.valid-pristine: %.tar.bz2
+ rm -rf tmp-pristine-$* $(@D)
+ mkdir -p tmp-pristine-$*
+ tar -C tmp-pristine-$* -jxf $<
+ -@rm -f tmp-pristine-$*/pax_global_header
+ mv tmp-pristine-$*/* $(@D)
+ @rm -rf tmp-pristine-$*
+ touch $(@D)/.hgskip
+ touch $@ # update timestamp to avoid rebuild
+
+PATCHDIRS := $(wildcard patches/*-*)
+
+ifneq ($(PATCHDIRS),)
+-include $(patsubst %,%/.makedep,$(PATCHDIRS))
+
+$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
+ @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
+
+ref-%/.valid-ref: pristine-%/.valid-pristine
+ set -e
+ rm -rf $(@D)
+ cp -al $(<D) $(@D)
+ if [ -d patches/$* ] ; then \
+ echo Applying patches from patches/$*... ; \
+ for i in $$(cat patches/$*/series) ; do \
+ echo ... $$i ; \
+ patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
+ done ; \
+ fi
+ touch $@ # update timestamp to avoid rebuild
+endif
%-install:
$(MAKE) -f buildconfigs/mk.$* build
@@ -31,13 +101,32 @@ ALLSPARSETREES = $(patsubst %-xen-sparse
%-clean:
$(MAKE) -f buildconfigs/mk.$* clean
-%.patch:
- $(MAKE) -f buildconfigs/mk.$* $@
+linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
+ rm -rf tmp-$@
+ cp -al $(<D) tmp-$@
+ ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
+ diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
+ rm -rf tmp-$@
+
+%-xen.patch: ref-%/.valid-ref
+ rm -rf tmp-$@
+ cp -al $(<D) tmp-$@
+ ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
+ diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
+ rm -rf tmp-$@
%-mrproper:
- $(MAKE) -f buildconfigs/mk.$*-xen mrproper
+ $(MAKE) -f buildconfigs/mk.$*-xen mrpropper
rm -rf pristine-$(*)* ref-$(*)*
rm -rf $*-xen.patch
+.PHONY: config-update-pae
+config-update-pae:
+ifeq ($(XEN_TARGET_X86_PAE),y)
+ sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\#
CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) >
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
+else
+ grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e
's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\#
CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) >
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
+endif
+
# never delete any intermediate files.
.SECONDARY:
diff -r adfc3684e54e -r 59fdc42a67c9 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen Fri Apr 20 14:05:43 2007 +0100
+++ b/buildconfigs/mk.linux-2.6-xen Fri Apr 20 17:52:38 2007 +0100
@@ -1,16 +1,7 @@ LINUX_SERIES = 2.6
LINUX_SERIES = 2.6
-LINUX_VER ?= 2.6.18
+LINUX_VER = 2.6.18
EXTRAVERSION ?= xen
-
-XEN_LINUX_SOURCE ?= sparse
-
-# Let XEN_TARGET_ARCH override ARCH.
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-LINUX_ARCH ?= i386
-else
-LINUX_ARCH ?= $(XEN_TARGET_ARCH)
-endif
LINUX_SRCDIR = linux-$(LINUX_VER)-xen
LINUX_DIR = build-linux-$(LINUX_VER)-$(EXTRAVERSION)_$(XEN_TARGET_ARCH)
@@ -24,6 +15,8 @@ endif
LINUX_VER3 := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
+include buildconfigs/Rules.mk
+
# The real action starts here!
.PHONY: build
build: $(LINUX_DIR)/include/linux/autoconf.h
@@ -35,56 +28,31 @@ build: $(LINUX_DIR)/include/linux/autoco
mkdir -p $(INSTALL_BOOT_PATH)
$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH)
INSTALL_PATH=$(INSTALL_BOOT_PATH) install
-$(LINUX_DIR)/include/linux/autoconf.h: CONFIG_FILE=$(PWD)/$(LINUX_DIR)/.config
+$(LINUX_SRCDIR)/.valid-src: ref-linux-$(LINUX_VER)/.valid-ref
+ rm -rf $(LINUX_SRCDIR)
+ cp -al $(<D) $(LINUX_SRCDIR)
+ # Apply arch-xen patches
+ ( cd linux-$(LINUX_SERIES)-xen-sparse && \
+ LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_SRCDIR) )
+ # Patch kernel Makefile to set EXTRAVERSION
+ ( cd $(LINUX_SRCDIR) ; \
+ sed -e 's,^EXTRAVERSION.*,&$$(XENGUEST),' \
+ -e 's,^KERNELRELEASE,XENGUEST := $$(shell [ -r
$$(objtree)/.xenguest ] \&\& cat $$(objtree)/.xenguest)\n&,' Makefile >Mk.tmp ;
\
+ rm -f Makefile ; mv Mk.tmp Makefile )
+ touch $@
+
$(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
rm -rf $(LINUX_DIR)
mkdir -p $(LINUX_DIR)
- # Re-use config from install dir if one exists else use the
create_config.sh provided
- # by the source tree.
+ # Re-use config from install dir if one exits else use default config
CONFIG_VERSION=$$(sed -ne 's/$$(XENGUEST)//; s/^EXTRAVERSION = //p'
$(LINUX_SRCDIR)/Makefile); \
- if [ -r
$(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] ; then \
- cp
$(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION)
$(CONFIG_FILE) ; \
- else \
- cd $(LINUX_SRCDIR) && sh buildconfigs/create_config.sh \
- $(CONFIG_FILE) $(EXTRAVERSION) $(XEN_TARGET_ARCH)
$(XEN_SYSTYPE) ; \
- fi
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-ifeq ($(XEN_TARGET_X86_PAE),y)
- sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\#
CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) >
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
-else
- grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e
's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\#
CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) >
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
-endif
-endif
- echo "-$(EXTRAVERSION)" >$(LINUX_DIR)/localversion-xen
+ [ -r
$(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
+ cp
$(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION)
$(LINUX_DIR)/.config \
+ || sh buildconfigs/create_config.sh $(LINUX_DIR)/.config
$(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE)
+ # See if we need to munge config to enable PAE
+ $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk
config-update-pae
+ echo "-$(EXTRAVERSION)" >$(LINUX_DIR)/.xenguest
$(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig
O=$$(/bin/pwd)/$(LINUX_DIR)
- @if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
- echo "***********************************"; \
- echo "oldconfig did not create a Makefile"; \
- echo "Generating $(LINUX_DIR)/Makefile "; \
- echo "***********************************"; \
- ( echo "# Automatically generated: don't edit"; \
- echo ""; \
- echo "VERSION = 2"; \
- echo "PATCHLEVEL = 6"; \
- echo ""; \
- echo "KERNELSRC := $(PWD)/$(LINUX_SRCDIR)"; \
- echo "KERNELOUTPUT := $(PWD)/$(LINUX_DIR)"; \
- echo ""; \
- echo "MAKEFLAGS += --no-print-directory"; \
- echo ""; \
- echo ".PHONY: all \$$(MAKECMDGOALS)"; \
- echo ""; \
- echo "all:"; \
- echo " \$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT)"; \
- echo ""; \
- echo "Makefile:;"; \
- echo ""; \
- echo "\$$(filter-out all Makefile,\$$(MAKECMDGOALS)) %/:"; \
- echo " \$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT) \$$@"; \
- ) > $(LINUX_DIR)/Makefile ; \
- fi
-
-include buildconfigs/src.$(XEN_LINUX_SOURCE)
.PHONY: prep
prep: $(LINUX_DIR)/include/linux/autoconf.h
@@ -99,11 +67,12 @@ clean::
[ ! -d $(LINUX_DIR) ] || \
$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
+
.PHONY: delete
delete:
rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR)
-.PHONY: mrproper
-mrproper:
+.PHONY: mrpropper
+mrpropper:
rm -rf $(LINUX_SRCDIR)
rm -f linux-$(LINUX_VER).tar.bz2
diff -r adfc3684e54e -r 59fdc42a67c9 buildconfigs/mk.linux-2.6.5-SLES-xen
--- a/buildconfigs/mk.linux-2.6.5-SLES-xen Fri Apr 20 14:05:43 2007 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-# This tree only supports PAE
-XEN_TARGET_ARCH = x86_32
-XEN_TARGET_X86_PAE = y
-
-EXTRAVERSION = xen
-LINUX_VER = 2.6.5-SLES
-
-XEN_LINUX_SOURCE = hg-clone
-XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/kernels/sles9x.hg
-XEN_LINUX_HGREV ?= tip
-
-include buildconfigs/mk.linux-2.6-xen
diff -r adfc3684e54e -r 59fdc42a67c9 buildconfigs/mk.linux-2.6.9-RHEL-xen
--- a/buildconfigs/mk.linux-2.6.9-RHEL-xen Fri Apr 20 14:05:43 2007 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-# This tree only supports PAE
-XEN_TARGET_ARCH = x86_32
-XEN_TARGET_X86_PAE = y
-
-EXTRAVERSION = xen
-LINUX_VER = 2.6.9-RHEL
-
-XEN_LINUX_SOURCE = hg-clone
-XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/kernels/rhel4x.hg
-XEN_LINUX_HGREV ?= tip
-
-include buildconfigs/mk.linux-2.6-xen
diff -r adfc3684e54e -r 59fdc42a67c9 buildconfigs/src.hg-clone
--- a/buildconfigs/src.hg-clone Fri Apr 20 14:05:43 2007 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/linux-$(LINUX_VER)-xen.hg
-XEN_LINUX_HGREV ?= tip
-
-$(LINUX_SRCDIR)/.valid-src:
-# TODO handle updating an existing clone?
- if [ ! -d $(LINUX_SRCDIR) ] ; then \
- hg clone -r $(XEN_LINUX_HGREV) $(XEN_LINUX_HGREPO) $(LINUX_SRCDIR);
\
- fi
- touch $@
diff -r adfc3684e54e -r 59fdc42a67c9 buildconfigs/src.sparse
--- a/buildconfigs/src.sparse Fri Apr 20 14:05:43 2007 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-# Choose the best mirror to download linux kernel
-KERNEL_REPO = http://www.kernel.org
-
-# Setup pristine search path
-PRISTINE_SRC_PATH ?= .:..
-vpath pristine-% $(PRISTINE_SRC_PATH)
-
-# Setup Linux search path
-LINUX_SRC_PATH ?= .:..
-vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
-vpath patch-%.bz2 $(LINUX_SRC_PATH)
-
-# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
-linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word
2,$(subst ., ,$*))
-linux-%.tar.bz2:
- @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
- wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
-
-patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word
2,$(subst ., ,$(*F)))
-patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -,
,$(*F))),snapshots,testing)
-patch-%.bz2:
- @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
- wget
$(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
-
-pristine-%: pristine-%/.valid-pristine
- @true
-
-pristine-%/.valid-pristine: %.tar.bz2
- rm -rf tmp-pristine-$* $(@D)
- mkdir -p tmp-pristine-$*
- tar -C tmp-pristine-$* -jxf $<
- -@rm -f tmp-pristine-$*/pax_global_header
- mv tmp-pristine-$*/* $(@D)
- @rm -rf tmp-pristine-$*
- touch $(@D)/.hgskip
- touch $@ # update timestamp to avoid rebuild
-
-PATCHDIRS := $(wildcard patches/*-*)
-
-ifneq ($(PATCHDIRS),)
--include $(patsubst %,%/.makedep,$(PATCHDIRS))
-
-$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
- @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
-
-ref-%/.valid-ref: pristine-%/.valid-pristine
- set -e
- rm -rf $(@D)
- cp -al $(<D) $(@D)
- if [ -d patches/$* ] ; then \
- echo Applying patches from patches/$*... ; \
- for i in $$(cat patches/$*/series) ; do \
- echo ... $$i ; \
- patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
- done ; \
- fi
- touch $@ # update timestamp to avoid rebuild
-endif
-
-$(LINUX_SRCDIR)/.valid-src: ref-linux-$(LINUX_VER)/.valid-ref
- rm -rf $(LINUX_SRCDIR)
- cp -al $(<D) $(LINUX_SRCDIR)
- # Apply arch-xen patches
- ( cd linux-$(LINUX_SERIES)-xen-sparse && \
- LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_SRCDIR) )
- ( cd $(LINUX_SRCDIR) && ln -s $(PWD)/buildconfigs buildconfigs )
- touch $@
-
-linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
- rm -rf tmp-$@
- cp -al $(<D) tmp-$@
- ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
- diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
- rm -rf tmp-$@
diff -r adfc3684e54e -r 59fdc42a67c9 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Fri Apr 20 14:05:43 2007 +0100
+++ b/tools/python/xen/xend/XendConfig.py Fri Apr 20 17:52:38 2007 +0100
@@ -691,7 +691,7 @@ class XendConfig(dict):
self['vtpm_refs'] = cfg.get('vtpm_refs', [])
# coalesce hvm vnc frame buffer with vfb config
- if self.is_hvm() and self['platform'].get('vnc', 0):
+ if self.is_hvm() and int(self['platform'].get('vnc', 0)) != 0:
# add vfb device if it isn't there already
has_rfb = False
for console_uuid in self['console_refs']:
diff -r adfc3684e54e -r 59fdc42a67c9 xen/Makefile
--- a/xen/Makefile Fri Apr 20 14:05:43 2007 +0100
+++ b/xen/Makefile Fri Apr 20 17:52:38 2007 +0100
@@ -2,7 +2,7 @@
# All other places this is stored (eg. compile.h) should be autogenerated.
export XEN_VERSION = 3
export XEN_SUBVERSION = 0
-export XEN_EXTRAVERSION ?= .5-rc1$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .5-rc2$(XEN_VENDORVERSION)
export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
-include xen-version
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|