ia64/xen-unstable

view buildconfigs/mk.linux-2.4-xen0 @ 5108:cff6a5c4f4b6

bitkeeper revision 1.1521 (42926d1dxnIu-mzz-ImDN9CkKgIcLw)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk-clean
author cl349@firebug.cl.cam.ac.uk
date Mon May 23 23:54:05 2005 +0000 (2005-05-23)
parents b811d111b152 b5b5a5e4052c
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)