ia64/xen-unstable

view buildconfigs/mk.linux-2.6-xen @ 10123:d9f63f9361c4

[LOADER] Another change to the elf_paddr_offset/virt_base logic.
This avoids using zero to indicate 'undefined'. Instead we use
an explicit boolean to indicate whether suitable defaults should
be used. As well as making the logic clearer (I believe) it also
avoids problems if anyone ever explicitly specifies virt_base
(and also elf_paddr_offset) as zero.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun May 21 18:55:14 2006 +0100 (2006-05-21)
parents 44e5abbf333b
children ef80b6e4e03a
line source
1 LINUX_SERIES = 2.6
2 LINUX_VER = 2.6.16.13
4 EXTRAVERSION ?= xen
6 LINUX_DIR = linux-$(LINUX_VER)-$(EXTRAVERSION)
8 include buildconfigs/Rules.mk
10 # The real action starts here!
11 .PHONY: build
12 build: $(LINUX_DIR)/include/linux/autoconf.h
13 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
14 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
15 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
16 fi
17 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) vmlinuz
18 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
20 $(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
21 rm -rf $(LINUX_DIR)
22 cp -al $(<D) $(LINUX_DIR)
23 # Apply arch-xen patches
24 ( cd linux-$(LINUX_SERIES)-xen-sparse && \
25 LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_DIR) )
26 # Re-use config from install dir if one exits else use default config
27 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
28 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
29 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
30 || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
31 $(LINUX_DIR)/.config
32 # See if we need to munge config to enable PAE
33 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
34 # Patch kernel Makefile to set EXTRAVERSION
35 ( cd $(LINUX_DIR) ; \
36 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
37 rm -f Makefile ; mv Mk.tmp Makefile )
38 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
40 .PHONY: prep
41 prep: $(LINUX_DIR)/include/linux/autoconf.h
43 .PHONY: config
44 config: CONFIGMODE = menuconfig
45 config: $(LINUX_DIR)/include/linux/autoconf.h
46 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
48 .PHONY: clean
49 clean::
50 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
52 .PHONY: delete
53 delete:
54 rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR)