aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>2004-07-14 19:34:21 +0000
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>2004-07-14 19:34:21 +0000
commit4de79f111115cbb694c49926941dcba299ac69ca (patch)
tree05a5c4e34cfc8fa8e043fe16f3d168eec1356949 /Makefile
parent5b676e9d24dddec199706e480e6d9fffe5c7a856 (diff)
downloadxen-4de79f111115cbb694c49926941dcba299ac69ca.tar.gz
xen-4de79f111115cbb694c49926941dcba299ac69ca.tar.bz2
xen-4de79f111115cbb694c49926941dcba299ac69ca.zip
bitkeeper revision 1.1089.1.1 (40f58abd3hHSQAjS5fkV46SbJOhZXA)
- Include Linux 2.6 in top-level Makefile - Enable module support in 2.6
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 31 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 69ae3b0a8f..c528512d13 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,9 @@ dist: all
$(MAKE) linux-xenU
$(MAKE) linux-xen0
-LINUX_VER ?= $(shell ( /bin/ls -ld linux-*-xen-sparse ) 2>/dev/null | \
- sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
+LINUX_RELEASE ?= 2.4
+LINUX_VER ?= $(shell ( /bin/ls -ld linux-$(LINUX_RELEASE).*-xen-sparse ) 2>/dev/null | \
+ sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
LINUX_CONFIG_DIR ?= $(INSTALL_DIR)/boot
LINUX_SRC_PATH ?= .:..
LINUX_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(LINUX_SRC_PATH)),\
@@ -36,7 +37,7 @@ LINUX_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(LINUX_SRC_PATH)),\
pristine-linux-src:
ifeq ($(LINUX_SRC),)
@echo "Cannot find linux-$(LINUX_VER).tar.gz in path $(LINUX_SRC_PATH)"
- @wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.bz2 -O./linux-$(LINUX_VER).tar.bz2
+ @wget http://www.kernel.org/pub/linux/kernel/v$(LINUX_RELEASE)/linux-$(LINUX_VER).tar.bz2 -O./linux-$(LINUX_VER).tar.bz2
LINUX_SRC := ./linux-$(LINUX_VER).tar.bz2
endif
@@ -48,6 +49,7 @@ patches/ebtables-brnf-5_vs_2.4.25.diff:
LINUX_TREES := linux-$(LINUX_VER)-xen0 linux-$(LINUX_VER)-xenU
# make a linux-xen build tree from a pristine kernel plus sparse tree
+ifeq ($(LINUX_RELEASE),2.4)
mk-linux-trees: patches/ebtables-brnf-5_vs_2.4.25.diff pristine-linux-src
$(RM) -rf $(LINUX_TREES)
echo $(LINUX_SRC) | grep -q bz2 && \
@@ -58,9 +60,19 @@ mk-linux-trees: patches/ebtables-brnf-5_vs_2.4.25.diff pristine-linux-src
cp -al linux-$(LINUX_VER)-xen0 linux-$(LINUX_VER)-xenU
( cd linux-$(LINUX_VER)-xen0 ; \
patch -p1 -F3 < ../patches/ebtables-brnf-5_vs_2.4.25.diff )
+else
+mk-linux-trees: pristine-linux-src
+ $(RM) -rf $(LINUX_TREES)
+ echo $(LINUX_SRC) | grep -q bz2 && \
+ tar -jxf $(LINUX_SRC) || tar -zxf $(LINUX_SRC)
+ mv linux-$(LINUX_VER) linux-$(LINUX_VER)-xenU
+ ( cd linux-$(LINUX_VER)-xen-sparse ; \
+ ./mkbuildtree ../linux-$(LINUX_VER)-xenU )
+endif
# configure the specified linux tree
CDIR = $(subst config-,linux-$(LINUX_VER)-,$@)
+ifeq ($(LINUX_RELEASE),2.4)
config-xen%:
$(MAKE) -C $(CDIR) ARCH=xen mrproper
cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config-,,$@) \
@@ -68,6 +80,17 @@ config-xen%:
$(MAKE) -C $(CDIR) ARCH=xen $(subst config-,,$@)_config
$(MAKE) -C $(CDIR) ARCH=xen oldconfig
$(MAKE) -C $(CDIR) ARCH=xen dep
+else
+config-xen%:
+ $(MAKE) -C $(CDIR) ARCH=xen mrproper
+ @[ -e $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config-,,$@) ] \
+ && cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config-,,$@) \
+ $(CDIR)/.config || true
+ @[ -e $(CDIR)/arch/xen/defconfig ] || cp \
+ $(CDIR)/arch/xen/defconfig-$(subst config-,,$@) \
+ $(CDIR)/arch/xen/defconfig
+ $(MAKE) -C $(CDIR) ARCH=xen oldconfig
+endif
# build the specified linux tree
BDIR = $(subst linux-,linux-$(LINUX_VER)-,$@)
@@ -89,6 +112,11 @@ world:
$(MAKE) config-xen0
$(MAKE) linux-xen0
+linux26:
+ $(MAKE) LINUX_RELEASE=2.6 mk-linux-trees
+ $(MAKE) LINUX_RELEASE=2.6 config-xenU
+ $(MAKE) LINUX_RELEASE=2.6 linux-xenU
+
clean: delete-symlinks
$(MAKE) -C xen clean