ia64/xen-unstable

view buildconfigs/Rules.mk @ 6417:f7cdd99d1106

Fix MPT mapping for x86/64. Also i386 no longer needs
4MB mapping for PAE, as xenlinux can handle faults when
accessing unmapped sections of the table.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Aug 25 17:15:41 2005 +0000 (2005-08-25)
parents 522bc50588ed
children 8799d14bef77 9312a3e8a6f8 cc5f88b719d0 fa0754a9f64f 112d44270733
line source
2 include Config.mk
4 # We expect these two to already be set if people
5 # are using the top-level Makefile
6 DISTDIR ?= $(CURDIR)/dist
7 DESTDIR ?= $(DISTDIR)/install
9 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
10 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
12 .PHONY: mkpatches mrproper
14 # Setup pristine search path
15 PRISTINE_SRC_PATH ?= .:..
16 vpath pristine-% $(PRISTINE_SRC_PATH)
18 # Expand Linux series to Linux version
19 LINUX_SERIES ?= 2.6
21 # Setup Linux search path
22 LINUX_SRC_PATH ?= .:..
23 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
25 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
26 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
27 linux-%.tar.bz2:
28 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
29 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
31 # Expand NetBSD release to NetBSD version
32 NETBSD_RELEASE ?= 2.0
33 NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
34 NETBSD_CVSSNAP ?= 20050309
36 # Setup NetBSD search path
37 NETBSD_SRC_PATH ?= .:..
38 vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
40 # download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
41 netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
42 @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
43 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
45 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
46 ln -fs $< $@
48 ifeq ($(OS),linux)
49 OS_VER = $(LINUX_VER)
50 else
51 OS_VER = $(NETBSD_VER)
52 endif
54 pristine-%: pristine-%/.valid-pristine
55 @true
57 pristine-%/.valid-pristine: %.tar.bz2
58 rm -rf tmp-pristine-$* $(@D)
59 mkdir -p tmp-pristine-$*
60 tar -C tmp-pristine-$* -jxf $<
61 -@rm tmp-pristine-$*/pax_global_header
62 mv tmp-pristine-$*/* $(@D)
63 @rm -rf tmp-pristine-$*
64 touch $(@D)/.hgskip
65 touch $@ # update timestamp to avoid rebuild
67 PATCHDIRS := $(wildcard patches/*-*)
69 ifneq ($(PATCHDIRS),)
70 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
72 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
73 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
75 clean::
76 rm -f patches/*/.makedep
78 ref-%/.valid-ref: pristine-%/.valid-pristine
79 rm -rf $(@D)
80 cp -al $(<D) $(@D)
81 ([ -d patches/$* ] && \
82 for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done) || true
83 touch $@ # update timestamp to avoid rebuild
84 endif
86 %-build:
87 $(MAKE) -f buildconfigs/mk.$* build
89 %-delete:
90 $(MAKE) -f buildconfigs/mk.$* delete
92 %-clean:
93 $(MAKE) -f buildconfigs/mk.$* clean
95 %-config:
96 $(MAKE) -f buildconfigs/mk.$* config
98 %-xen.patch: ref-%/.valid-ref
99 rm -rf tmp-$@
100 cp -al $(<D) tmp-$@
101 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
102 diff -Nurp $(<D) tmp-$@ > $@ || true
103 rm -rf tmp-$@
105 %-mrproper: %-mrproper-extra
106 rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
107 rm -rf $*-xen.patch
109 netbsd-%-mrproper-extra:
110 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
111 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
113 %-mrproper-extra:
114 @: # do nothing
116 config-update-pae:
117 ifeq ($(XEN_TARGET_X86_PAE),y)
118 sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
119 else
120 grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
121 endif
123 # never delete any intermediate files.
124 .SECONDARY: