ia64/xen-unstable

view buildconfigs/Rules.mk @ 8328:aebe8f5c7069

Increase the default ramdisk size to 16384 to support SLES initrds.
author rread@ubuntu.eng.hq.xensource.com
date Mon Dec 12 11:45:53 2005 -0700 (2005-12-12)
parents 1712c7882f7e
children fd9b2c1bb577
line source
2 include Config.mk
4 export DESTDIR
6 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
7 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
9 .PHONY: mkpatches mrproper
11 # Setup pristine search path
12 PRISTINE_SRC_PATH ?= .:..
13 vpath pristine-% $(PRISTINE_SRC_PATH)
15 # By default, build Linux with ARCH=xen (overridden by some non arch's)
16 ifneq ($(XEN_TARGET_ARCH),ia64)
17 LINUX_ARCH ?= xen
18 else
19 LINUX_ARCH ?= ia64
20 endif
22 # Expand Linux series to Linux version
23 LINUX_SERIES ?= 2.6
24 LINUX_VER ?= $(shell grep "^LINUX_VER" buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
26 # Setup Linux search path
27 LINUX_SRC_PATH ?= .:..
28 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
30 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
31 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
32 linux-%.tar.bz2:
33 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
34 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
36 # Expand NetBSD release to NetBSD version
37 NETBSD_RELEASE ?= 2.0
38 NETBSD_VER ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
39 NETBSD_CVSSNAP ?= 20050309
41 # Setup NetBSD search path
42 NETBSD_SRC_PATH ?= .:..
43 vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
45 # download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
46 netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
47 @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
48 wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
50 netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
51 ln -fs $< $@
53 ifeq ($(OS),linux)
54 OS_VER = $(LINUX_VER)
55 else
56 OS_VER = $(NETBSD_VER)
57 endif
59 pristine-%: pristine-%/.valid-pristine
60 @true
62 pristine-%/.valid-pristine: %.tar.bz2
63 rm -rf tmp-pristine-$* $(@D)
64 mkdir -p tmp-pristine-$*
65 tar -C tmp-pristine-$* -jxf $<
66 -@rm tmp-pristine-$*/pax_global_header
67 mv tmp-pristine-$*/* $(@D)
68 @rm -rf tmp-pristine-$*
69 touch $(@D)/.hgskip
70 touch $@ # update timestamp to avoid rebuild
72 PATCHDIRS := $(wildcard patches/*-*)
74 ifneq ($(PATCHDIRS),)
75 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
77 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
78 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
80 clean::
81 rm -f patches/*/.makedep
83 ref-%/.valid-ref: pristine-%/.valid-pristine
84 set -e
85 rm -rf $(@D)
86 cp -al $(<D) $(@D)
87 if [ -d patches/$* ] ; then \
88 for i in patches/$*/*.patch ; do patch -d $(@D) -p1 <$$i || exit 1 ; done ; \
89 fi
90 touch $@ # update timestamp to avoid rebuild
91 endif
93 %-prep:
94 $(MAKE) -f buildconfigs/mk.$* prep
96 %-install:
97 $(MAKE) -f buildconfigs/mk.$* build
99 %-dist: DESTDIR=$(DISTDIR)/install
100 %-dist: %-install
101 @: # do nothing
103 # Legacy dist target
104 %-build: %-dist
105 @: # do nothing
107 %-delete:
108 $(MAKE) -f buildconfigs/mk.$* delete
110 %-clean:
111 $(MAKE) -f buildconfigs/mk.$* clean
113 %-config:
114 $(MAKE) -f buildconfigs/mk.$* config
116 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
117 rm -rf tmp-$@
118 cp -al $(<D) tmp-$@
119 ( cd linux-2.6-xen-sparse && ./mkbuildtree ../tmp-$@ )
120 diff -Nurp $(<D) tmp-$@ > $@ || true
121 rm -rf tmp-$@
123 %-xen.patch: ref-%/.valid-ref
124 rm -rf tmp-$@
125 cp -al $(<D) tmp-$@
126 ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ )
127 diff -Nurp $(<D) tmp-$@ > $@ || true
128 rm -rf tmp-$@
130 %-mrproper: %-mrproper-extra
131 rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
132 rm -rf $*-xen.patch
134 netbsd-%-mrproper-extra:
135 rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
136 rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
138 %-mrproper-extra:
139 @: # do nothing
141 config-update-pae:
142 ifeq ($(XEN_TARGET_X86_PAE),y)
143 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)
144 else
145 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
146 endif
148 # never delete any intermediate files.
149 .SECONDARY: