direct-io.hg

view buildconfigs/mk.linux-2.6-xen @ 9393:b2828004f131

merge xen-unstable.hg
author awilliam@xenbuild.aw
date Wed Mar 22 09:12:48 2006 -0700 (2006-03-22)
parents b64ac7e90ac6
children c83da0012e87
line source
2 OS = linux
4 LINUX_SERIES = 2.6
5 LINUX_VER = 2.6.16
6 LINUX_SRCS = linux-2.6.16.tar.bz2
8 EXTRAVERSION ?= xen
10 LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
12 include buildconfigs/Rules.mk
14 .PHONY: build clean delete
16 # The real action starts here!
17 build: $(LINUX_DIR)/include/linux/autoconf.h
18 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
19 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
20 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
21 fi
22 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) vmlinuz
23 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
25 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
26 rm -rf $(LINUX_DIR)
27 cp -al $(<D) $(LINUX_DIR)
28 # Apply arch-xen patches
29 ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
30 LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
31 # Re-use config from install dir if one exits else use default config
32 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
33 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
34 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
35 || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
36 $(LINUX_DIR)/.config
37 # See if we need to munge config to enable PAE
38 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
39 # Patch kernel Makefile to set EXTRAVERSION
40 ( cd $(LINUX_DIR) ; \
41 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
42 rm -f Makefile ; mv Mk.tmp Makefile )
43 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
45 prep: $(LINUX_DIR)/include/linux/autoconf.h
47 config: CONFIGMODE = menuconfig
48 config: $(LINUX_DIR)/include/linux/autoconf.h
49 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
51 clean::
52 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
54 delete:
55 rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)