direct-io.hg

view buildconfigs/mk.linux-2.4-xen0 @ 5517:10e9028c8e3d

bitkeeper revision 1.1718.1.10 (42b7b19aqOS_1M8I4pIOFjiTPYWV-g)

Merge bk://xenbits.xensource.com/xen-unstable.bk
into spot.cl.cam.ac.uk:C:/Documents and Settings/iap10/xen-unstable.bk
author iap10@spot.cl.cam.ac.uk
date Tue Jun 21 06:20:10 2005 +0000 (2005-06-21)
parents cff6a5c4f4b6
children
line source
2 OS = linux
4 LINUX_SERIES = 2.4
6 EXTRAVERSION = xen0
8 LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
10 include buildconfigs/Rules.mk
12 .PHONY: build clean delete
14 # The real action starts here!
15 build: $(LINUX_DIR)/include/linux/autoconf.h
16 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
17 $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
18 $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
19 fi
20 $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
22 patches/tmp/ebtables.diff:
23 mkdir -p patches/tmp
24 wget http://www.cl.cam.ac.uk/netos/xen/downloads/ebtables-brnf-5_vs_2.4.27.diff.gz -O- | gunzip -c > $@
26 $(LINUX_DIR)/include/linux/autoconf.h: patches/tmp/ebtables.diff
27 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
28 rm -rf $(LINUX_DIR)
29 cp -al $(<D) $(LINUX_DIR)
30 # Apply arch-xen patches
31 ( cd linux-$(LINUX_VER)-xen-sparse ; \
32 ./mkbuildtree ../$(LINUX_DIR) )
33 # add ebtables patch
34 ( cd $(LINUX_DIR) ; patch -p1 -F3 < ../patches/tmp/ebtables.diff )
35 # Re-use config from install dir if one exits else use default config
36 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
37 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
38 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
39 || cp $(LINUX_DIR)/arch/xen/defconfig-$(EXTRAVERSION) \
40 $(LINUX_DIR)/.config
41 # Patch kernel Makefile to set EXTRAVERSION
42 ( cd $(LINUX_DIR) ; \
43 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
44 rm -f Makefile ; mv Mk.tmp Makefile )
45 make -C $(LINUX_DIR) ARCH=xen oldconfig
46 make -C $(LINUX_DIR) ARCH=xen dep
48 config: CONFIGMODE = menuconfig
49 config: $(LINUX_DIR)/include/linux/autoconf.h
50 $(MAKE) -C $(LINUX_DIR) ARCH=xen $(CONFIGMODE)
51 $(MAKE) -C $(LINUX_DIR) ARCH=xen dep
53 clean::
54 $(MAKE) -C $(LINUX_DIR) ARCH=xen clean
56 delete:
57 rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)