[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Linux build cleanup.



changeset:   7198:f2fce0c89fd9
tag:         tip
user:        mostrows@xxxxxxxxxxxxxxxxxxxxx
date:        Tue Oct  4 14:16:56 2005 -0400
summary:     Restructure the makefiles used to drive builds of linux 2.6 
kernels.  
             A common file eliminates duplication across makefiles.
             Use Linux's own facilities for building outside the source tree,
             this means that a single source tree is created from the sparse 
tree
             and linux builds occur in source-free build trees.

Signed-off-by: Michal Ostrowski <mostrows@xxxxxxxxxxxxxx>

diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6-xen     Tue Oct  4 14:16:56 2005 -0400
@@ -1,51 +1,4 @@
-
-OS           = linux
-
-LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.12
-
+BUILD_DIR   ?= linux-2.6.12-xen0
 EXTRAVERSION = xen
 
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) 
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = 
-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+include buildconfigs/mk.linux-2.6.common
diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6-xen0
--- a/buildconfigs/mk.linux-2.6-xen0    Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6-xen0    Tue Oct  4 14:16:56 2005 -0400
@@ -1,51 +1,4 @@
-
-OS           = linux
-
-LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.12
-
+BUILD_DIR    ?= linux-2.6.12-xen0
 EXTRAVERSION = xen0
 
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) 
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = 
-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+include buildconfigs/mk.linux-2.6.common
diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6-xenU
--- a/buildconfigs/mk.linux-2.6-xenU    Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6-xenU    Tue Oct  4 14:16:56 2005 -0400
@@ -1,51 +1,4 @@
-
-OS           = linux
-
-LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.12
-
+BUILD_DIR    ?= linux-2.6.12-xenU
 EXTRAVERSION = xenU
 
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) 
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = 
-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+include buildconfigs/mk.linux-2.6.common
diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6.common
--- /dev/null   Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6.common  Tue Oct  4 14:16:56 2005 -0400
@@ -0,0 +1,64 @@
+
+OS           = linux
+
+LINUX_SERIES = 2.6
+LINUX_VER    = 2.6.12
+
+EXTRAVERSION ?= xen
+
+LINUX_DIR    = $(OS)-$(LINUX_VER)-xen.src
+
+XEN_ROOT= ./
+include buildconfigs/Rules.mk
+
+BUILD_DIR ?= $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
+
+BUILD_ARG=
+ifneq ($(BUILD_DIR),$(LINUX_DIR))
+BUILD_ARG=O=$(shell pwd)/$(BUILD_DIR)
+endif
+
+BUILD_ARG+=ARCH=xen 
+BUILD_ARG+=-C $(LINUX_DIR)
+.PHONY: build clean delete
+
+# The real action starts here!
+build: $(BUILD_DIR)/include/linux/autoconf.h
+       if grep "^CONFIG_MODULES=" $(BUILD_DIR)/.config ; then \
+           $(MAKE) $(BUILD_ARG) modules ; \
+           $(MAKE) $(BUILD_ARG) INSTALL_MOD_PATH=$(DESTDIR) modules_install; \
+       fi
+       $(MAKE) $(BUILD_ARG) INSTALL_PATH=$(DESTDIR) install 
+
+
+$(LINUX_DIR): ref-$(OS)-$(LINUX_VER)/.valid-ref
+       cp -al $(<D) $(LINUX_DIR)
+       # Apply arch-xen patches
+       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
+          ./mkbuildtree ../$(LINUX_DIR) )
+
+CONFIG_VERSION:=$(shell sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile)
+
+APPEND_VERSION:=$(CONFIG_VERSION)-$(EXTRAVERSION)
+CONFIG_FILE=$(DESTDIR)/boot/config-$(LINUX_VER)$(APPEND_VERSION)
+DEFAULT_CONFIG=$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH)
+
+$(BUILD_DIR)/include/linux/autoconf.h: $(LINUX_DIR)
+       rm -rf $(BUILD_DIR)
+       mkdir $(BUILD_DIR)
+       # Re-use config from install dir if one exits else use default config
+       [ -r $(CONFIG_FILE) ] && cp $(CONFIG_FILE) $(BUILD_DIR)/.config \
+         || cp $(DEFAULT_CONFIG) $(BUILD_DIR)/.config
+       # See if we need to munge config to enable PAE
+       $(MAKE) CONFIG_FILE=$(BUILD_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
+       $(MAKE) $(BUILD_ARG) oldconfig 
EXTRAVERSION=$(CONFIG_VERSION)-$(XENGUEST)
+
+config: CONFIGMODE = menuconfig
+config: $(LINUX_DIR)/include/linux/autoconf.h
+       $(MAKE) $(BUILD_ARG) $(CONFIGMODE)
+
+clean::
+       $(MAKE) $(BUILD_ARG) clean
+
+delete: 
+       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 

Attachment: bin2kx_YfRFOh.bin
Description: message/delivery-status

--- Begin Message ---
        by igw2.watson.ibm.com (8.13.1/8.13.1/8.13.1-2005-04-25 igw) with ESMTP 
id j94JeJEt005512
        for <xen-devel@xxxxxxxxxxxxxxxxxx>; Tue, 4 Oct 2005 15:40:19 -0400
Received: from sp1n294en1.watson.ibm.com (localhost [127.0.0.1])
        by sp1n294en1.watson.ibm.com (8.11.7-20030924/8.11.7/01-14-2004_2) with 
ESMTP id j94JcWv76216
        for <xen-devel@xxxxxxxxxxxxxxxxxx>; Tue, 4 Oct 2005 15:38:32 -0400
Received: from mgsmtp00.watson.ibm.com (mgsmtp00.watson.ibm.com [9.2.40.58])
        by sp1n294en1.watson.ibm.com (8.11.7-20030924/8.11.7/01-14-2004_1) with 
ESMTP id j94JcV579838
        for <xen-devel@xxxxxxxxxxxxxxxxxx>; Tue, 4 Oct 2005 15:38:31 -0400
Received: from kitch0.watson.ibm.com (kitch0.watson.ibm.com [9.2.224.107])
        by mgsmtp00.watson.ibm.com (8.12.11/8.12.11/2005/09/01) with ESMTP id 
j94Jb10r014551
        for <xen-devel@xxxxxxxxxxxxxxxxxx>; Tue, 4 Oct 2005 15:37:01 -0400
Received: from brick.watson.ibm.com (brick.watson.ibm.com [9.2.216.48])
        by kitch0.watson.ibm.com (AIX5.1/8.11.6p2/8.11.0/03-06-2002) with ESMTP 
id j94JcVl43368
        for <xen-devel@xxxxxxxxxxxxxxxxxx>; Tue, 4 Oct 2005 15:38:31 -0400
Date: Tue, 4 Oct 2005 15:38:55 -0400
From: Michal Ostrowski <mostrows@xxxxxxxxxxxxxx>
To: xen-devel@xxxxxxxxxxxxxxxxxx
Subject: [PATCH] Linux build cleanup.
Message-ID: <20051004153855.708d7e8e@xxxxxxxxxxxxxxxxxxxx>
X-Mailer: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i486-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed;
 boundary=Signature_Tue__4_Oct_2005_15_38_55_-0400_egxfdzywQgmVLLt8;
 protocol="application/pgp-signature"; micalg=pgp-sha1

--Signature_Tue__4_Oct_2005_15_38_55_-0400_egxfdzywQgmVLLt8
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

changeset:   7198:f2fce0c89fd9
tag:         tip
user:        mostrows@xxxxxxxxxxxxxxxxxxxxx
date:        Tue Oct  4 14:16:56 2005 -0400
summary:     Restructure the makefiles used to drive builds of linux 2.6 ke=
rnels. =20
             A common file eliminates duplication across makefiles.
             Use Linux's own facilities for building outside the source tree,
             this means that a single source tree is created from the sparse 
tree
             and linux builds occur in source-free build trees.



diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6-xen     Tue Oct  4 14:16:56 2005 -0400
@@ -1,51 +1,4 @@
-
-OS           =3D linux
-
-LINUX_SERIES =3D 2.6
-LINUX_VER    =3D 2.6.12
-
+BUILD_DIR   ?=3D linux-2.6.12-xen0
 EXTRAVERSION =3D xen
=20
-LINUX_DIR    =3D $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=3D" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) 
INSTALL_MOD_PATH=3D$(DES=
TDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) INSTALL_PATH=3D$(DESTDIR) 
in=
stall
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=3D$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=3D$$(sed -ne 's/^EXTRAVERSION =3D //p' 
$(LINUX_DIR)/Makefi=
le); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) =
] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) =
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TAR=
GET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=3D$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
confi=
g-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST =3D 
-$(EXTRAVERSION)/=
' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE =3D menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) clean
-
-delete:=20
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)=20
+include buildconfigs/mk.linux-2.6.common
diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6-xen0
--- a/buildconfigs/mk.linux-2.6-xen0    Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6-xen0    Tue Oct  4 14:16:56 2005 -0400
@@ -1,51 +1,4 @@
-
-OS           =3D linux
-
-LINUX_SERIES =3D 2.6
-LINUX_VER    =3D 2.6.12
-
+BUILD_DIR    ?=3D linux-2.6.12-xen0
 EXTRAVERSION =3D xen0
=20
-LINUX_DIR    =3D $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=3D" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) 
INSTALL_MOD_PATH=3D$(DES=
TDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) INSTALL_PATH=3D$(DESTDIR) 
in=
stall
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=3D$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=3D$$(sed -ne 's/^EXTRAVERSION =3D //p' 
$(LINUX_DIR)/Makefi=
le); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) =
] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) =
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TAR=
GET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=3D$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
confi=
g-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST =3D 
-$(EXTRAVERSION)/=
' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE =3D menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) clean
-
-delete:=20
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)=20
+include buildconfigs/mk.linux-2.6.common
diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6-xenU
--- a/buildconfigs/mk.linux-2.6-xenU    Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6-xenU    Tue Oct  4 14:16:56 2005 -0400
@@ -1,51 +1,4 @@
-
-OS           =3D linux
-
-LINUX_SERIES =3D 2.6
-LINUX_VER    =3D 2.6.12
-
+BUILD_DIR    ?=3D linux-2.6.12-xenU
 EXTRAVERSION =3D xenU
=20
-LINUX_DIR    =3D $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=3D" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) 
INSTALL_MOD_PATH=3D$(DES=
TDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) INSTALL_PATH=3D$(DESTDIR) 
in=
stall
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=3D$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=3D$$(sed -ne 's/^EXTRAVERSION =3D //p' 
$(LINUX_DIR)/Makefi=
le); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) =
] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) =
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TAR=
GET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=3D$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
confi=
g-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST =3D 
-$(EXTRAVERSION)/=
' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE =3D menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=3D$(LINUX_ARCH) clean
-
-delete:=20
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)=20
+include buildconfigs/mk.linux-2.6.common
diff -r c092fbcc18c6 -r f2fce0c89fd9 buildconfigs/mk.linux-2.6.common
--- /dev/null   Tue Oct  4 11:45:05 2005 -0400
+++ b/buildconfigs/mk.linux-2.6.common  Tue Oct  4 14:16:56 2005 -0400
@@ -0,0 +1,64 @@
+
+OS           =3D linux
+
+LINUX_SERIES =3D 2.6
+LINUX_VER    =3D 2.6.12
+
+EXTRAVERSION ?=3D xen
+
+LINUX_DIR    =3D $(OS)-$(LINUX_VER)-xen.src
+
+XEN_ROOT=3D ./
+include buildconfigs/Rules.mk
+
+BUILD_DIR ?=3D $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
+
+BUILD_ARG=3D
+ifneq ($(BUILD_DIR),$(LINUX_DIR))
+BUILD_ARG=3DO=3D$(shell pwd)/$(BUILD_DIR)
+endif
+
+BUILD_ARG+=3DARCH=3Dxen=20
+BUILD_ARG+=3D-C $(LINUX_DIR)
+.PHONY: build clean delete
+
+# The real action starts here!
+build: $(BUILD_DIR)/include/linux/autoconf.h
+       if grep "^CONFIG_MODULES=3D" $(BUILD_DIR)/.config ; then \
+           $(MAKE) $(BUILD_ARG) modules ; \
+           $(MAKE) $(BUILD_ARG) INSTALL_MOD_PATH=3D$(DESTDIR) modules_install; 
\
+       fi
+       $(MAKE) $(BUILD_ARG) INSTALL_PATH=3D$(DESTDIR) install=20
+
+
+$(LINUX_DIR): ref-$(OS)-$(LINUX_VER)/.valid-ref
+       cp -al $(<D) $(LINUX_DIR)
+       # Apply arch-xen patches
+       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
+          ./mkbuildtree ../$(LINUX_DIR) )
+
+CONFIG_VERSION:=3D$(shell sed -ne 's/^EXTRAVERSION =3D //p' $(LINUX_DIR)/M=
akefile)
+
+APPEND_VERSION:=3D$(CONFIG_VERSION)-$(EXTRAVERSION)
+CONFIG_FILE=3D$(DESTDIR)/boot/config-$(LINUX_VER)$(APPEND_VERSION)
+DEFAULT_CONFIG=3D$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$=
(XEN_TARGET_ARCH)
+
+$(BUILD_DIR)/include/linux/autoconf.h: $(LINUX_DIR)
+       rm -rf $(BUILD_DIR)
+       mkdir $(BUILD_DIR)
+       # Re-use config from install dir if one exits else use default config
+       [ -r $(CONFIG_FILE) ] && cp $(CONFIG_FILE) $(BUILD_DIR)/.config \
+         || cp $(DEFAULT_CONFIG) $(BUILD_DIR)/.config
+       # See if we need to munge config to enable PAE
+       $(MAKE) CONFIG_FILE=3D$(BUILD_DIR)/.config -f buildconfigs/Rules.mk 
confi=
g-update-pae
+       $(MAKE) $(BUILD_ARG) oldconfig 
EXTRAVERSION=3D$(CONFIG_VERSION)-$(XENGUES=
T)
+
+config: CONFIGMODE =3D menuconfig
+config: $(LINUX_DIR)/include/linux/autoconf.h
+       $(MAKE) $(BUILD_ARG) $(CONFIGMODE)
+
+clean::
+       $(MAKE) $(BUILD_ARG) clean
+
+delete:=20
+       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)=20



--Signature_Tue__4_Oct_2005_15_38_55_-0400_egxfdzywQgmVLLt8
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFDQtpPDMDCqU5zPMARAh7rAJ4j0Gbf/Vfo/jvXUdLpDPzq3QXlMgCfc0Cc
UtZ8bZeQZXIFZaM5K1AFdlY=
=C0wR
-----END PGP SIGNATURE-----

--Signature_Tue__4_Oct_2005_15_38_55_-0400_egxfdzywQgmVLLt8--

--- End Message ---

Attachment: pgpS1Ri7mQozr.pgp
Description: PGP signature

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.