ia64/xen-unstable

changeset 14886:53b1cfcf129f

Revert 14883:6568c1882af5 and 14862:98efd2e410ae.

This reverts the preparation for removing the sparse tree, since these
modified scripts are not yet ready:
1. XENGUEST suffix was lost yet depended on still by sparse tree
Makefiles (hacked around by 14883; also reverted).
2. XEN_TARGET_X86_PAE default value seems to be ignored
(out-of-the-box 'make dist' will build non-PAE kernels).

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Apr 20 17:51:10 2007 +0100 (2007-04-20)
parents 23cf7d6c30f4
children 55135bf6eb44
files buildconfigs/Rules.mk buildconfigs/mk.linux-2.6-xen buildconfigs/mk.linux-2.6.5-SLES-xen buildconfigs/mk.linux-2.6.9-RHEL-xen buildconfigs/src.hg-clone buildconfigs/src.sparse linux-2.6-xen-sparse/arch/i386/Makefile linux-2.6-xen-sparse/arch/i386/boot-xen/Makefile linux-2.6-xen-sparse/arch/x86_64/Makefile
line diff
     1.1 --- a/buildconfigs/Rules.mk	Fri Apr 20 17:32:30 2007 +0100
     1.2 +++ b/buildconfigs/Rules.mk	Fri Apr 20 17:51:10 2007 +0100
     1.3 @@ -3,9 +3,79 @@ include Config.mk
     1.4  
     1.5  export DESTDIR
     1.6  
     1.7 +# Choose the best mirror to download linux kernel
     1.8 +KERNEL_REPO = http://www.kernel.org
     1.9 +
    1.10  ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
    1.11  ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
    1.12  
    1.13 +# Setup pristine search path
    1.14 +PRISTINE_SRC_PATH	?= .:..
    1.15 +vpath pristine-% $(PRISTINE_SRC_PATH)
    1.16 +
    1.17 +# Let XEN_TARGET_ARCH override ARCH.
    1.18 +ifeq ($(XEN_TARGET_ARCH),x86_32)
    1.19 +LINUX_ARCH	?= i386
    1.20 +else
    1.21 +LINUX_ARCH	?= $(XEN_TARGET_ARCH)
    1.22 +endif
    1.23 +
    1.24 +# Expand Linux series to Linux version
    1.25 +LINUX_SERIES	?= 2.6
    1.26 +LINUX_VER	?= $(shell grep "^LINUX_VER " buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
    1.27 +
    1.28 +# Setup Linux search path
    1.29 +LINUX_SRC_PATH	?= .:..
    1.30 +vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
    1.31 +vpath patch-%.bz2 $(LINUX_SRC_PATH)
    1.32 +
    1.33 +# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
    1.34 +linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
    1.35 +linux-%.tar.bz2:
    1.36 +	@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
    1.37 +	wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
    1.38 +
    1.39 +patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
    1.40 +patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
    1.41 +patch-%.bz2:
    1.42 +	@echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
    1.43 +	wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
    1.44 +
    1.45 +pristine-%: pristine-%/.valid-pristine
    1.46 +	@true
    1.47 +
    1.48 +pristine-%/.valid-pristine: %.tar.bz2
    1.49 +	rm -rf tmp-pristine-$* $(@D)
    1.50 +	mkdir -p tmp-pristine-$*
    1.51 +	tar -C tmp-pristine-$* -jxf $<
    1.52 +	-@rm -f tmp-pristine-$*/pax_global_header
    1.53 +	mv tmp-pristine-$*/* $(@D)
    1.54 +	@rm -rf tmp-pristine-$*
    1.55 +	touch $(@D)/.hgskip
    1.56 +	touch $@ # update timestamp to avoid rebuild
    1.57 +
    1.58 +PATCHDIRS := $(wildcard patches/*-*)
    1.59 +
    1.60 +ifneq ($(PATCHDIRS),)
    1.61 +-include $(patsubst %,%/.makedep,$(PATCHDIRS))
    1.62 +
    1.63 +$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: 
    1.64 +	@echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
    1.65 +
    1.66 +ref-%/.valid-ref: pristine-%/.valid-pristine
    1.67 +	set -e
    1.68 +	rm -rf $(@D)
    1.69 +	cp -al $(<D) $(@D)
    1.70 +	if [ -d patches/$* ] ; then                                    \
    1.71 +	    echo Applying patches from patches/$*... ;                 \
    1.72 +	    for i in $$(cat patches/$*/series) ; do                    \
    1.73 +	        echo ... $$i ;                                         \
    1.74 +	        patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
    1.75 +	     done ;                                                    \
    1.76 +	fi
    1.77 +	touch $@ # update timestamp to avoid rebuild
    1.78 +endif
    1.79 +
    1.80  %-install:
    1.81  	$(MAKE) -f buildconfigs/mk.$* build
    1.82  
    1.83 @@ -31,13 +101,32 @@ ALLSPARSETREES = $(patsubst %-xen-sparse
    1.84  %-clean:
    1.85  	$(MAKE) -f buildconfigs/mk.$* clean
    1.86  
    1.87 -%.patch:
    1.88 -	$(MAKE) -f buildconfigs/mk.$* $@
    1.89 +linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
    1.90 +	rm -rf tmp-$@
    1.91 +	cp -al $(<D) tmp-$@
    1.92 +	( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )	
    1.93 +	diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
    1.94 +	rm -rf tmp-$@
    1.95 +
    1.96 +%-xen.patch: ref-%/.valid-ref
    1.97 +	rm -rf tmp-$@
    1.98 +	cp -al $(<D) tmp-$@
    1.99 +	( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )	
   1.100 +	diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
   1.101 +	rm -rf tmp-$@
   1.102  
   1.103  %-mrproper:
   1.104 -	$(MAKE) -f buildconfigs/mk.$*-xen mrproper
   1.105 +	$(MAKE) -f buildconfigs/mk.$*-xen mrpropper
   1.106  	rm -rf pristine-$(*)* ref-$(*)*
   1.107  	rm -rf $*-xen.patch
   1.108  
   1.109 +.PHONY: config-update-pae
   1.110 +config-update-pae:
   1.111 +ifeq ($(XEN_TARGET_X86_PAE),y)
   1.112 +	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)
   1.113 +else
   1.114 +	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
   1.115 +endif
   1.116 +
   1.117  # never delete any intermediate files.
   1.118  .SECONDARY:
     2.1 --- a/buildconfigs/mk.linux-2.6-xen	Fri Apr 20 17:32:30 2007 +0100
     2.2 +++ b/buildconfigs/mk.linux-2.6-xen	Fri Apr 20 17:51:10 2007 +0100
     2.3 @@ -1,17 +1,8 @@
     2.4  LINUX_SERIES = 2.6
     2.5 -LINUX_VER    ?= 2.6.18
     2.6 +LINUX_VER    = 2.6.18
     2.7  
     2.8  EXTRAVERSION ?= xen
     2.9  
    2.10 -XEN_LINUX_SOURCE ?= sparse
    2.11 -
    2.12 -# Let XEN_TARGET_ARCH override ARCH.
    2.13 -ifeq ($(XEN_TARGET_ARCH),x86_32)
    2.14 -LINUX_ARCH	?= i386
    2.15 -else
    2.16 -LINUX_ARCH	?= $(XEN_TARGET_ARCH)
    2.17 -endif
    2.18 -
    2.19  LINUX_SRCDIR = linux-$(LINUX_VER)-xen
    2.20  LINUX_DIR    = build-linux-$(LINUX_VER)-$(EXTRAVERSION)_$(XEN_TARGET_ARCH)
    2.21  
    2.22 @@ -24,6 +15,8 @@ endif
    2.23  
    2.24  LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
    2.25  
    2.26 +include buildconfigs/Rules.mk
    2.27 +
    2.28  # The real action starts here!
    2.29  .PHONY: build
    2.30  build: $(LINUX_DIR)/include/linux/autoconf.h
    2.31 @@ -35,56 +28,31 @@ build: $(LINUX_DIR)/include/linux/autoco
    2.32  	mkdir -p $(INSTALL_BOOT_PATH)
    2.33  	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(INSTALL_BOOT_PATH) install
    2.34  
    2.35 -$(LINUX_DIR)/include/linux/autoconf.h: CONFIG_FILE=$(PWD)/$(LINUX_DIR)/.config
    2.36 +$(LINUX_SRCDIR)/.valid-src: ref-linux-$(LINUX_VER)/.valid-ref
    2.37 +	rm -rf $(LINUX_SRCDIR)
    2.38 +	cp -al $(<D) $(LINUX_SRCDIR)
    2.39 +	# Apply arch-xen patches
    2.40 +	( cd linux-$(LINUX_SERIES)-xen-sparse && \
    2.41 +          LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_SRCDIR) )
    2.42 +	# Patch kernel Makefile to set EXTRAVERSION
    2.43 +	( cd $(LINUX_SRCDIR) ; \
    2.44 +	  sed -e 's,^EXTRAVERSION.*,&$$(XENGUEST),' \
    2.45 +	      -e 's,^KERNELRELEASE,XENGUEST := $$(shell [ -r $$(objtree)/.xenguest ] \&\& cat $$(objtree)/.xenguest)\n&,' Makefile >Mk.tmp ; \
    2.46 +	  rm -f Makefile ; mv Mk.tmp Makefile )
    2.47 +	touch $@
    2.48 +
    2.49  $(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
    2.50  	rm -rf $(LINUX_DIR)
    2.51  	mkdir -p $(LINUX_DIR)
    2.52 -	# Re-use config from install dir if one exists else use the create_config.sh provided
    2.53 -	# by the source tree.
    2.54 +	# Re-use config from install dir if one exits else use default config
    2.55  	CONFIG_VERSION=$$(sed -ne 's/$$(XENGUEST)//; s/^EXTRAVERSION = //p' $(LINUX_SRCDIR)/Makefile); \
    2.56 -	if [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] ; then \
    2.57 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(CONFIG_FILE) ; \
    2.58 -        else \
    2.59 -	  cd $(LINUX_SRCDIR) && sh buildconfigs/create_config.sh \
    2.60 -		$(CONFIG_FILE) $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE) ; \
    2.61 -	fi
    2.62 -ifeq ($(XEN_TARGET_ARCH),x86_32)
    2.63 -ifeq ($(XEN_TARGET_X86_PAE),y)
    2.64 -	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)
    2.65 -else
    2.66 -	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
    2.67 -endif
    2.68 -endif
    2.69 -	echo "-$(EXTRAVERSION)" >$(LINUX_DIR)/localversion-xen
    2.70 +	[ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    2.71 +	  cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    2.72 +	  || sh buildconfigs/create_config.sh $(LINUX_DIR)/.config $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE)
    2.73 +	# See if we need to munge config to enable PAE
    2.74 +	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    2.75 +	echo "-$(EXTRAVERSION)" >$(LINUX_DIR)/.xenguest
    2.76  	$(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig O=$$(/bin/pwd)/$(LINUX_DIR)
    2.77 -	@if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
    2.78 -	    echo "***********************************"; \
    2.79 -	    echo "oldconfig did not create a Makefile"; \
    2.80 -	    echo "Generating $(LINUX_DIR)/Makefile   "; \
    2.81 -	    echo "***********************************"; \
    2.82 -	    ( echo "# Automatically generated: don't edit"; \
    2.83 -	      echo ""; \
    2.84 -	      echo "VERSION = 2"; \
    2.85 -	      echo "PATCHLEVEL = 6"; \
    2.86 -	      echo ""; \
    2.87 -	      echo "KERNELSRC    := $(PWD)/$(LINUX_SRCDIR)"; \
    2.88 -	      echo "KERNELOUTPUT := $(PWD)/$(LINUX_DIR)"; \
    2.89 -	      echo ""; \
    2.90 -	      echo "MAKEFLAGS += --no-print-directory"; \
    2.91 -	      echo ""; \
    2.92 -	      echo ".PHONY: all \$$(MAKECMDGOALS)"; \
    2.93 -	      echo ""; \
    2.94 -	      echo "all:"; \
    2.95 -	      echo "	\$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT)"; \
    2.96 -	      echo ""; \
    2.97 -	      echo "Makefile:;"; \
    2.98 -	      echo ""; \
    2.99 -	      echo "\$$(filter-out all Makefile,\$$(MAKECMDGOALS)) %/:"; \
   2.100 -	      echo "	\$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT) \$$@"; \
   2.101 -	    ) > $(LINUX_DIR)/Makefile ; \
   2.102 -	fi
   2.103 -
   2.104 -include buildconfigs/src.$(XEN_LINUX_SOURCE)
   2.105  
   2.106  .PHONY: prep
   2.107  prep: $(LINUX_DIR)/include/linux/autoconf.h
   2.108 @@ -99,11 +67,12 @@ clean::
   2.109  	[ ! -d $(LINUX_DIR) ] || \
   2.110  		$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
   2.111  
   2.112 +
   2.113  .PHONY: delete
   2.114  delete: 
   2.115  	rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) 
   2.116  
   2.117 -.PHONY: mrproper
   2.118 -mrproper:
   2.119 +.PHONY: mrpropper
   2.120 +mrpropper:
   2.121  	rm -rf $(LINUX_SRCDIR)
   2.122  	rm -f linux-$(LINUX_VER).tar.bz2
     3.1 --- a/buildconfigs/mk.linux-2.6.5-SLES-xen	Fri Apr 20 17:32:30 2007 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,12 +0,0 @@
     3.4 -# This tree only supports PAE
     3.5 -XEN_TARGET_ARCH = x86_32
     3.6 -XEN_TARGET_X86_PAE = y
     3.7 -
     3.8 -EXTRAVERSION = xen
     3.9 -LINUX_VER = 2.6.5-SLES
    3.10 -
    3.11 -XEN_LINUX_SOURCE = hg-clone
    3.12 -XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/kernels/sles9x.hg
    3.13 -XEN_LINUX_HGREV  ?= tip
    3.14 -
    3.15 -include buildconfigs/mk.linux-2.6-xen
     4.1 --- a/buildconfigs/mk.linux-2.6.9-RHEL-xen	Fri Apr 20 17:32:30 2007 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,12 +0,0 @@
     4.4 -# This tree only supports PAE
     4.5 -XEN_TARGET_ARCH = x86_32
     4.6 -XEN_TARGET_X86_PAE = y
     4.7 -
     4.8 -EXTRAVERSION = xen
     4.9 -LINUX_VER = 2.6.9-RHEL
    4.10 -
    4.11 -XEN_LINUX_SOURCE = hg-clone
    4.12 -XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/kernels/rhel4x.hg
    4.13 -XEN_LINUX_HGREV  ?= tip
    4.14 -
    4.15 -include buildconfigs/mk.linux-2.6-xen
     5.1 --- a/buildconfigs/src.hg-clone	Fri Apr 20 17:32:30 2007 +0100
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,9 +0,0 @@
     5.4 -XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/linux-$(LINUX_VER)-xen.hg
     5.5 -XEN_LINUX_HGREV  ?= tip
     5.6 -
     5.7 -$(LINUX_SRCDIR)/.valid-src:
     5.8 -# TODO handle updating an existing clone?
     5.9 -	if [ ! -d $(LINUX_SRCDIR) ] ; then \
    5.10 -	    hg clone -r $(XEN_LINUX_HGREV) $(XEN_LINUX_HGREPO) $(LINUX_SRCDIR); \
    5.11 -	fi
    5.12 -	touch $@
     6.1 --- a/buildconfigs/src.sparse	Fri Apr 20 17:32:30 2007 +0100
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,74 +0,0 @@
     6.4 -# Choose the best mirror to download linux kernel
     6.5 -KERNEL_REPO = http://www.kernel.org
     6.6 -
     6.7 -# Setup pristine search path
     6.8 -PRISTINE_SRC_PATH	?= .:..
     6.9 -vpath pristine-% $(PRISTINE_SRC_PATH)
    6.10 -
    6.11 -# Setup Linux search path
    6.12 -LINUX_SRC_PATH	?= .:..
    6.13 -vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
    6.14 -vpath patch-%.bz2 $(LINUX_SRC_PATH)
    6.15 -
    6.16 -# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
    6.17 -linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
    6.18 -linux-%.tar.bz2:
    6.19 -	@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
    6.20 -	wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
    6.21 -
    6.22 -patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
    6.23 -patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
    6.24 -patch-%.bz2:
    6.25 -	@echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
    6.26 -	wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
    6.27 -
    6.28 -pristine-%: pristine-%/.valid-pristine
    6.29 -	@true
    6.30 -
    6.31 -pristine-%/.valid-pristine: %.tar.bz2
    6.32 -	rm -rf tmp-pristine-$* $(@D)
    6.33 -	mkdir -p tmp-pristine-$*
    6.34 -	tar -C tmp-pristine-$* -jxf $<
    6.35 -	-@rm -f tmp-pristine-$*/pax_global_header
    6.36 -	mv tmp-pristine-$*/* $(@D)
    6.37 -	@rm -rf tmp-pristine-$*
    6.38 -	touch $(@D)/.hgskip
    6.39 -	touch $@ # update timestamp to avoid rebuild
    6.40 -
    6.41 -PATCHDIRS := $(wildcard patches/*-*)
    6.42 -
    6.43 -ifneq ($(PATCHDIRS),)
    6.44 --include $(patsubst %,%/.makedep,$(PATCHDIRS))
    6.45 -
    6.46 -$(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: 
    6.47 -	@echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
    6.48 -
    6.49 -ref-%/.valid-ref: pristine-%/.valid-pristine
    6.50 -	set -e
    6.51 -	rm -rf $(@D)
    6.52 -	cp -al $(<D) $(@D)
    6.53 -	if [ -d patches/$* ] ; then                                    \
    6.54 -	    echo Applying patches from patches/$*... ;                 \
    6.55 -	    for i in $$(cat patches/$*/series) ; do                    \
    6.56 -	        echo ... $$i ;                                         \
    6.57 -	        patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
    6.58 -	     done ;                                                    \
    6.59 -	fi
    6.60 -	touch $@ # update timestamp to avoid rebuild
    6.61 -endif
    6.62 -
    6.63 -$(LINUX_SRCDIR)/.valid-src: ref-linux-$(LINUX_VER)/.valid-ref
    6.64 -	rm -rf $(LINUX_SRCDIR)
    6.65 -	cp -al $(<D) $(LINUX_SRCDIR)
    6.66 -	# Apply arch-xen patches
    6.67 -	( cd linux-$(LINUX_SERIES)-xen-sparse && \
    6.68 -          LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_SRCDIR) )
    6.69 -	( cd $(LINUX_SRCDIR) && ln -s $(PWD)/buildconfigs buildconfigs )
    6.70 -	touch $@
    6.71 -
    6.72 -linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
    6.73 -	rm -rf tmp-$@
    6.74 -	cp -al $(<D) tmp-$@
    6.75 -	( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
    6.76 -	diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
    6.77 -	rm -rf tmp-$@
     7.1 --- a/linux-2.6-xen-sparse/arch/i386/Makefile	Fri Apr 20 17:32:30 2007 +0100
     7.2 +++ b/linux-2.6-xen-sparse/arch/i386/Makefile	Fri Apr 20 17:51:10 2007 +0100
     7.3 @@ -125,7 +125,7 @@ vmlinuz: vmlinux
     7.4  	$(Q)$(MAKE) $(build)=$(boot) $@
     7.5  
     7.6  install:
     7.7 -	$(Q)$(MAKE) $(build)=$(boot) $@
     7.8 +	$(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
     7.9  else
    7.10  all: bzImage
    7.11  
     8.1 --- a/linux-2.6-xen-sparse/arch/i386/boot-xen/Makefile	Fri Apr 20 17:32:30 2007 +0100
     8.2 +++ b/linux-2.6-xen-sparse/arch/i386/boot-xen/Makefile	Fri Apr 20 17:51:10 2007 +0100
     8.3 @@ -12,8 +12,10 @@ INSTALL_ROOT := $(patsubst %/boot,%,$(IN
     8.4  XINSTALL_NAME ?= $(KERNELRELEASE)
     8.5  install:
     8.6  	mkdir -p $(INSTALL_ROOT)/boot
     8.7 +	ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
     8.8 +	rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
     8.9  	install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    8.10  	install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    8.11  	install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    8.12  	install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    8.13 -	ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(shell cat ./localversion-xen)$(INSTALL_SUFFIX)
    8.14 +	ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
     9.1 --- a/linux-2.6-xen-sparse/arch/x86_64/Makefile	Fri Apr 20 17:32:30 2007 +0100
     9.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/Makefile	Fri Apr 20 17:51:10 2007 +0100
     9.3 @@ -91,7 +91,7 @@ vmlinuz: vmlinux
     9.4  	$(Q)$(MAKE) $(build)=$(boot) $@
     9.5  
     9.6  install:
     9.7 -	$(Q)$(MAKE) $(build)=$(boot) $@
     9.8 +	$(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@
     9.9  else
    9.10  #Default target when executing "make"
    9.11  all: bzImage