ia64/xen-unstable

changeset 6870:e608c8118f25

Clone of Christian's xen-unstable mkbuildtree patch (cset 6960)
author djm@kirby.fc.hp.com
date Tue Sep 20 16:57:09 2005 -0600 (2005-09-20)
parents 8906825d5197
children 4c1c79806874
files buildconfigs/Rules.mk buildconfigs/mk.linux-2.4-xenU buildconfigs/mk.linux-2.6-xen buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU linux-2.6-xen-sparse/mkbuildtree
line diff
     1.1 --- a/buildconfigs/Rules.mk	Tue Sep 20 16:11:19 2005 -0600
     1.2 +++ b/buildconfigs/Rules.mk	Tue Sep 20 16:57:09 2005 -0600
     1.3 @@ -15,6 +15,13 @@ ALLSPARSETREES = $(patsubst %-xen-sparse
     1.4  PRISTINE_SRC_PATH	?= .:..
     1.5  vpath pristine-% $(PRISTINE_SRC_PATH)
     1.6  
     1.7 +# By default, build Linux with ARCH=xen (overridden by some non arch's)
     1.8 +ifneq ($(ARCH),ia64)
     1.9 +LINUX_ARCH	?= xen
    1.10 +else
    1.11 +LINUX_ARCH	?= ia64
    1.12 +endif
    1.13 +
    1.14  # Expand Linux series to Linux version
    1.15  LINUX_SERIES	?= 2.6
    1.16  
     2.1 --- a/buildconfigs/mk.linux-2.4-xenU	Tue Sep 20 16:11:19 2005 -0600
     2.2 +++ b/buildconfigs/mk.linux-2.4-xenU	Tue Sep 20 16:57:09 2005 -0600
     2.3 @@ -15,17 +15,17 @@ include buildconfigs/Rules.mk
     2.4  # The real action starts here!
     2.5  build: $(LINUX_DIR)/include/linux/autoconf.h
     2.6  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     2.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     2.8 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     2.9 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    2.10 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    2.11  	fi
    2.12 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    2.13 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    2.14  
    2.15  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    2.16  	rm -rf $(LINUX_DIR)
    2.17  	cp -al $(<D) $(LINUX_DIR)
    2.18  	# Apply arch-xen patches
    2.19  	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    2.20 -          ./mkbuildtree ../$(LINUX_DIR) )
    2.21 +          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    2.22  	# Re-use config from install dir if one exits else use default config
    2.23  	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    2.24  	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    2.25 @@ -36,16 +36,16 @@ build: $(LINUX_DIR)/include/linux/autoco
    2.26  	( cd $(LINUX_DIR) ; \
    2.27  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    2.28  	  rm -f Makefile ; mv Mk.tmp Makefile )
    2.29 -	make -C $(LINUX_DIR) ARCH=xen oldconfig
    2.30 -	make -C $(LINUX_DIR) ARCH=xen dep
    2.31 +	make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    2.32 +	make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
    2.33  
    2.34  config: CONFIGMODE = menuconfig
    2.35  config: $(LINUX_DIR)/include/linux/autoconf.h
    2.36 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen $(CONFIGMODE)
    2.37 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen dep
    2.38 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    2.39 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
    2.40  
    2.41  clean::
    2.42 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
    2.43 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    2.44  
    2.45  delete: 
    2.46  	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
     3.1 --- a/buildconfigs/mk.linux-2.6-xen	Tue Sep 20 16:11:19 2005 -0600
     3.2 +++ b/buildconfigs/mk.linux-2.6-xen	Tue Sep 20 16:57:09 2005 -0600
     3.3 @@ -15,17 +15,17 @@ include buildconfigs/Rules.mk
     3.4  # The real action starts here!
     3.5  build: $(LINUX_DIR)/include/linux/autoconf.h
     3.6  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     3.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     3.8 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     3.9 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    3.10 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    3.11  	fi
    3.12 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    3.13 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    3.14  
    3.15  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    3.16  	rm -rf $(LINUX_DIR)
    3.17  	cp -al $(<D) $(LINUX_DIR)
    3.18  	# Apply arch-xen patches
    3.19  	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    3.20 -          ./mkbuildtree ../$(LINUX_DIR) )
    3.21 +          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    3.22  	# Re-use config from install dir if one exits else use default config
    3.23  	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    3.24  	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    3.25 @@ -38,14 +38,14 @@ build: $(LINUX_DIR)/include/linux/autoco
    3.26  	( cd $(LINUX_DIR) ; \
    3.27  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    3.28  	  rm -f Makefile ; mv Mk.tmp Makefile )
    3.29 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen oldconfig
    3.30 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    3.31  
    3.32  config: CONFIGMODE = menuconfig
    3.33  config: $(LINUX_DIR)/include/linux/autoconf.h
    3.34 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen $(CONFIGMODE)
    3.35 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    3.36  
    3.37  clean::
    3.38 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
    3.39 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    3.40  
    3.41  delete: 
    3.42  	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
     4.1 --- a/buildconfigs/mk.linux-2.6-xen0	Tue Sep 20 16:11:19 2005 -0600
     4.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Tue Sep 20 16:57:09 2005 -0600
     4.3 @@ -15,17 +15,17 @@ include buildconfigs/Rules.mk
     4.4  # The real action starts here!
     4.5  build: $(LINUX_DIR)/include/linux/autoconf.h
     4.6  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     4.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     4.8 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     4.9 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    4.10 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    4.11  	fi
    4.12 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    4.13 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    4.14  
    4.15  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    4.16  	rm -rf $(LINUX_DIR)
    4.17  	cp -al $(<D) $(LINUX_DIR)
    4.18  	# Apply arch-xen patches
    4.19  	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    4.20 -          ./mkbuildtree ../$(LINUX_DIR) )
    4.21 +          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    4.22  	# Re-use config from install dir if one exits else use default config
    4.23  	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    4.24  	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    4.25 @@ -38,14 +38,14 @@ build: $(LINUX_DIR)/include/linux/autoco
    4.26  	( cd $(LINUX_DIR) ; \
    4.27  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    4.28  	  rm -f Makefile ; mv Mk.tmp Makefile )
    4.29 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen oldconfig
    4.30 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    4.31  
    4.32  config: CONFIGMODE = menuconfig
    4.33  config: $(LINUX_DIR)/include/linux/autoconf.h
    4.34 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen $(CONFIGMODE)
    4.35 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    4.36  
    4.37  clean::
    4.38 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
    4.39 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    4.40  
    4.41  delete: 
    4.42  	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
     5.1 --- a/buildconfigs/mk.linux-2.6-xenU	Tue Sep 20 16:11:19 2005 -0600
     5.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Tue Sep 20 16:57:09 2005 -0600
     5.3 @@ -15,17 +15,17 @@ include buildconfigs/Rules.mk
     5.4  # The real action starts here!
     5.5  build: $(LINUX_DIR)/include/linux/autoconf.h
     5.6  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     5.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     5.8 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     5.9 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    5.10 +	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    5.11  	fi
    5.12 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    5.13 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    5.14  
    5.15  $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    5.16  	rm -rf $(LINUX_DIR)
    5.17  	cp -al $(<D) $(LINUX_DIR)
    5.18  	# Apply arch-xen patches
    5.19  	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    5.20 -          ./mkbuildtree ../$(LINUX_DIR) )
    5.21 +          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    5.22  	# Re-use config from install dir if one exits else use default config
    5.23  	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    5.24  	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    5.25 @@ -38,14 +38,14 @@ build: $(LINUX_DIR)/include/linux/autoco
    5.26  	( cd $(LINUX_DIR) ; \
    5.27  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    5.28  	  rm -f Makefile ; mv Mk.tmp Makefile )
    5.29 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen oldconfig
    5.30 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    5.31  
    5.32  config: CONFIGMODE = menuconfig
    5.33  config: $(LINUX_DIR)/include/linux/autoconf.h
    5.34 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen $(CONFIGMODE)
    5.35 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    5.36  
    5.37  clean::
    5.38 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
    5.39 +	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    5.40  
    5.41  delete: 
    5.42  	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
     6.1 --- a/linux-2.6-xen-sparse/mkbuildtree	Tue Sep 20 16:11:19 2005 -0600
     6.2 +++ b/linux-2.6-xen-sparse/mkbuildtree	Tue Sep 20 16:57:09 2005 -0600
     6.3 @@ -89,6 +89,11 @@ AS=`pwd`
     6.4  abs_to_rel ${AD} ${AS}
     6.5  RS=$DESTPATH
     6.6  
     6.7 +# Arch-specific pre-processing
     6.8 +if [ -x arch/${LINUX_ARCH}/xen-mkbuildtree-pre ]; then
     6.9 +	arch/${LINUX_ARCH}/xen-mkbuildtree-pre
    6.10 +fi
    6.11 +
    6.12  # Remove old copies of files and directories at the destination
    6.13  for i in `find . -type f -o -type l` ; do rm -f ${AD}/${i#./} ; done
    6.14  
    6.15 @@ -110,3 +115,9 @@ relative_lndir ../../../${RS}/../xen/inc
    6.16  
    6.17  cd ${AD}/include/asm-xen/linux-public
    6.18  ln -sf ../../../${RS}/../tools/xenstore/xenstored.h
    6.19 +
    6.20 +# Arch-specific post-processing
    6.21 +cd ${AD}
    6.22 +if [ -x arch/${LINUX_ARCH}/xen-mkbuildtree-post ]; then
    6.23 +	arch/${LINUX_ARCH}/xen-mkbuildtree-post
    6.24 +fi