aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rootkeys9
-rw-r--r--Makefile60
-rw-r--r--buildconfigs/Rules.mk14
-rw-r--r--buildconfigs/mk.linux-2.4-xen0 (renamed from buildconfigs/linux-2.4-xen0)4
-rw-r--r--buildconfigs/mk.linux-2.4-xenU (renamed from buildconfigs/linux-2.4-xenU)4
-rw-r--r--buildconfigs/mk.linux-2.6-xen0 (renamed from buildconfigs/linux-2.6-xen0)4
-rw-r--r--buildconfigs/mk.linux-2.6-xenU (renamed from buildconfigs/linux-2.6-xenU)4
-rw-r--r--buildconfigs/mk.netbsd-2.0-xenU52
-rw-r--r--docs/Makefile1
9 files changed, 111 insertions, 41 deletions
diff --git a/.rootkeys b/.rootkeys
index 372473c5a5..cefb86e532 100644
--- a/.rootkeys
+++ b/.rootkeys
@@ -6,10 +6,11 @@
3eb788d6Kleck_Cut0ouGneviGzliQ Makefile
3f5ef5a24IaQasQE2tyMxrfxskMmvw README
41880852AtdVfSsfKGtrLdajX1vEXQ buildconfigs/Rules.mk
-41880852oSxvHJSmnzI6hlpFvHuQqQ buildconfigs/linux-2.4-xen0
-41880852YWbPAO-cofTsGkFW1x7tGw buildconfigs/linux-2.4-xenU
-41880852Cwk_14PhDA9XZToJ5B2iMQ buildconfigs/linux-2.6-xen0
-41880852siMCKilMpoBLtpP_bhYC2Q buildconfigs/linux-2.6-xenU
+41880852oSxvHJSmnzI6hlpFvHuQqQ buildconfigs/mk.linux-2.4-xen0
+41880852YWbPAO-cofTsGkFW1x7tGw buildconfigs/mk.linux-2.4-xenU
+41880852Cwk_14PhDA9XZToJ5B2iMQ buildconfigs/mk.linux-2.6-xen0
+41880852siMCKilMpoBLtpP_bhYC2Q buildconfigs/mk.linux-2.6-xenU
+4188d881_D8HpHnhHabA46_ycKwQyw buildconfigs/mk.netbsd-2.0-xenU
3f9e7d53iC47UnlfORp9iC1vai6kWw docs/Makefile
4187c1c7IWmBinGdI19kL4MuZ6RLbQ docs/check_pkgs
3f9e7d60PWZJeVh5xdnk0nLUdxlqEA docs/figs/xenlogo.eps
diff --git a/Makefile b/Makefile
index 38510b4cfa..66d2db6afa 100644
--- a/Makefile
+++ b/Makefile
@@ -9,22 +9,17 @@ SOURCEFORGE_MIRROR := http://heanet.dl.sourceforge.net/sourceforge
#http://voxel.dl.sourceforge.net/sourceforge/
#http://easynews.dl.sourceforge.net/sourceforge
-#KERNELS = linux-2.6-xen0 linux-2.6-xenU linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
-KERNELS = linux-2.6-xen0 linux-2.6-xenU
+#KERNELS = mk.linux-2.6-xen0 mk.linux-2.6-xenU mk.linux-2.4-xen0 mk.linux-2.4-xenU mk.netbsd-2.0-xenU
+KERNELS = mk.linux-2.6-xen0 mk.linux-2.6-xenU
export INSTALL_DIR SOURCEFORGE_MIRROR
-.PHONY: all dist install kernels kdelete mkpatches world docs clean mrproper
+.PHONY: all dist install xen tools kernels docs kdelete kclean mkpatches world clean mrproper
-all: dist
+all: dist
# build and install everything into local dist directory
-dist:
- $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
- $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
- $(MAKE) kernels
- sh ./docs/check_pkgs && \
- $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install
+dist: xen tools kernels docs
# install everything into the standard system directories
# NB: install explicitly does not check that everything is up to date!
@@ -33,17 +28,31 @@ install:
$(MAKE) -C tools install
$(shell cp -a install/boot/* /boot/)
$(shell cp -a install/lib/modules/* /lib/modules/)
- sh ./docs/check_pkgs && $(MAKE) -C docs install
+ sh ./docs/check_pkgs && $(MAKE) -C docs install || true
$(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
$(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
-# Build all the various kernels
+xen:
+ $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
+
+tools:
+ $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
+
+# Build all the various kernels and modules
kernels:
for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i build ; done
-# Delete the kernel build trees
+docs:
+ sh ./docs/check_pkgs && \
+ $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
+
+# Delete the kernel build trees entirely
kdelete:
- for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i kdelete ; done
+ for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
+
+# Clean the kernel build trees
+kclean:
+ for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
# Make patches from kernel sparse trees
mkpatches:
@@ -53,24 +62,20 @@ mkpatches:
# build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
# and place them in the install directory. 'make install' should then
# copy them to the normal system directories
-world:
+world:
$(MAKE) clean
$(MAKE) kdelete
$(MAKE) all
- $(MAKE) docs
-
-docs:
- $(MAKE) -C docs all || true
+# clean doesn't do a kclean
clean:
$(MAKE) -C xen clean
$(MAKE) -C tools clean
$(MAKE) -C docs clean
# clean, but blow away kernel build tree plus tar balls
-mrproper: clean
- rm -rf install/* patches *.tar.bz2
- for i in `ls buildconfigs | grep -v Rules.mk` ; do $(MAKE) -f buildconfigs/$$i kdelete || true ; done
+mrproper: clean kdelete
+ rm -rf dist patches *.tar.bz2
$(MAKE) -f buildconfigs/Rules.mk mrproper
install-twisted:
@@ -98,11 +103,14 @@ uninstall:
# Legacy target for compatibility
linux24:
- $(MAKE) -f buildconfigs/linux-2.4-xen0
- $(MAKE) -f buildconfigs/linux-2.4-xenU
+ $(MAKE) -f buildconfigs/mk.linux-2.4-xen0 build
+ $(MAKE) -f buildconfigs/mk.linux-2.4-xenU build
# Legacy target for compatibility
linux26:
- $(MAKE) -f buildconfigs/linux-2.6-xen0
- $(MAKE) -f buildconfigs/linux-2.6-xenU
+ $(MAKE) -f buildconfigs/mk.linux-2.6-xen0 build
+ $(MAKE) -f buildconfigs/mk.linux-2.6-xenU build
+# Legacy target for compatibility
+netbsd20:
+ $(MAKE) -f buildconfigs/mk.netbsd-2.0-xenU build
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
index 6f1caf7d67..e80597bf9b 100644
--- a/buildconfigs/Rules.mk
+++ b/buildconfigs/Rules.mk
@@ -1,4 +1,11 @@
+# We expect these two to already be set if people
+# are using the top-level Makefile
+DIST_DIR ?= $(shell pwd)/dist
+INSTALL_DIR ?= $(DIST_DIR)/install
+
+
+# Figure out which Linux version
LINUX_26VER ?= $(shell ( /bin/ls -ld linux-2.6.*-xen-sparse ) \
2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
@@ -24,7 +31,7 @@ LINUX_26SRC := ./linux-$(LINUX_26VER).tar.bz2
endif
pristine-linux-$(LINUX_26VER): $(LINUX_26SRC)
- rm -rf tmp $@ && mkdir -p tmp && tar -C tmp -jxf $(LINUX_26SRC) && mv tmp/* $@
+ rm -rf tmp-linux-$(LINUX_26VER) $@ && mkdir -p tmp-linux-$(LINUX_26VER) && tar -C tmp-linux-$(LINUX_26VER) -jxf $(LINUX_26SRC) && mv tmp-linux-$(LINUX_26VER)/* $@
touch $@ # update timestamp to avoid rebuild
@@ -37,7 +44,7 @@ LINUX_24SRC := ./linux-$(LINUX_24VER).tar.bz2
endif
pristine-linux-$(LINUX_24VER): $(LINUX_24SRC)
- rm -rf tmp $@ && mkdir -p tmp && tar -C tmp -jxf $(LINUX_24SRC) && mv tmp/* $@
+ rm -rf tmp-linux-$(LINUX_24VER) $@ && mkdir -p tmp-linux-$(LINUX_24VER) && tar -C tmp-linux-$(LINUX_24VER) -jxf $(LINUX_24SRC) && mv tmp-linux-$(LINUX_24VER)/* $@
touch $@ # update timestamp to avoid rebuild
linux-$(LINUX_24VER)-xen.patch: pristine-linux-$(LINUX_24VER)
@@ -61,4 +68,5 @@ mkpatches: linux-$(LINUX_24VER)-xen.patch linux-$(LINUX_26VER)-xen.patch
mrproper:
rm -rf pristine-linux-$(LINUX_24VER) linux-$(LINUX_24VER).tar.bz2
rm -rf pristine-linux-$(LINUX_26VER) linux-$(LINUX_26VER).tar.bz2
- rm -rf linux-$(LINUX_24VER)-xen.patch linux-$(LINUX_26VER)-xen.patch \ No newline at end of file
+ rm -rf linux-$(LINUX_24VER)-xen.patch linux-$(LINUX_26VER)-xen.patch
+ rm -rf pristine-netbsd-2.0
diff --git a/buildconfigs/linux-2.4-xen0 b/buildconfigs/mk.linux-2.4-xen0
index 7f13f52109..5c631b09f9 100644
--- a/buildconfigs/linux-2.4-xen0
+++ b/buildconfigs/mk.linux-2.4-xen0
@@ -42,8 +42,8 @@ build: $(LINUX_DIR)
clean:
$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
-kdelete:
- rm -rf tmp $(LINUX_DIR)
+delete:
+ rm -rf tmp-linux-$(LINUX_24VER) $(LINUX_DIR)
diff --git a/buildconfigs/linux-2.4-xenU b/buildconfigs/mk.linux-2.4-xenU
index e849da907d..113ee0c9ea 100644
--- a/buildconfigs/linux-2.4-xenU
+++ b/buildconfigs/mk.linux-2.4-xenU
@@ -40,8 +40,8 @@ build: $(LINUX_DIR)
clean:
$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
-kdelete:
- rm -rf tmp $(LINUX_DIR)
+delete:
+ rm -rf tmp-linux-$(LINUX_24VER) $(LINUX_DIR)
diff --git a/buildconfigs/linux-2.6-xen0 b/buildconfigs/mk.linux-2.6-xen0
index 32f9be17f7..4eadd852f4 100644
--- a/buildconfigs/linux-2.6-xen0
+++ b/buildconfigs/mk.linux-2.6-xen0
@@ -34,8 +34,8 @@ build: $(LINUX_DIR)
clean:
$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
-kdelete:
- rm -rf tmp $(LINUX_DIR)
+delete:
+ rm -rf tmp-linux-$(LINUX_26VER) $(LINUX_DIR)
diff --git a/buildconfigs/linux-2.6-xenU b/buildconfigs/mk.linux-2.6-xenU
index eb25a7032c..38bf9b85f1 100644
--- a/buildconfigs/linux-2.6-xenU
+++ b/buildconfigs/mk.linux-2.6-xenU
@@ -34,8 +34,8 @@ build: $(LINUX_DIR)
clean:
$(MAKE) -C $(LINUX_DIR) ARCH=xen clean
-kdelete:
- rm -rf tmp $(LINUX_DIR)
+delete:
+ rm -rf tmp-linux-$(LINUX_26VER) $(LINUX_DIR)
diff --git a/buildconfigs/mk.netbsd-2.0-xenU b/buildconfigs/mk.netbsd-2.0-xenU
new file mode 100644
index 0000000000..d41bb39f57
--- /dev/null
+++ b/buildconfigs/mk.netbsd-2.0-xenU
@@ -0,0 +1,52 @@
+
+NETBSD_RELEASE ?= 2.0
+NETBSD_VER ?= $(shell ( /bin/ls -ld netbsd-$(NETBSD_RELEASE)*-xen-sparse ) 2>/dev/null | \
+ sed -e 's!^.*netbsd-\(.\+\)-xen-sparse!\1!' )
+NETBSD_CVSSNAP ?= 20040906
+NETBSD_SRC_PATH ?= .:..
+NETBSD_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(NETBSD_SRC_PATH)),\
+ $(wildcard $(dir)/netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.*z*)))
+NETBSD_TOOLS_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(NETBSD_SRC_PATH)),\
+ $(wildcard $(dir)/netbsd-$(NETBSD_VER)-tools.tar.*z*)))
+
+NETBSD_TREES := netbsd-$(NETBSD_VER)-xenU
+
+pristine-netbsd-src:
+ifeq ($(NETBSD_SRC),)
+ @echo "Cannot find netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.gz in path $(NETBSD_SRC_PATH)"
+ @wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2 -O./netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
+NETBSD_SRC := ./netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
+endif
+
+pristine-netbsd-tools-src:
+ifeq ($(NETBSD_TOOLS_SRC),)
+ @echo "Cannot find netbsd-$(NETBSD_VER)-tools.tar.gz in path $(NETBSD_SRC_PATH)"
+ @wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/netbsd-$(NETBSD_VER)-tools.tar.bz2 -O./netbsd-$(NETBSD_VER)-tools.tar.bz2
+NETBSD_TOOLS_SRC := ./netbsd-$(NETBSD_VER)-tools.tar.bz2
+endif
+
+netbsd-tools: pristine-netbsd-tools-src
+ @[ -d netbsd-$(NETBSD_RELEASE)-tools ] || { \
+ echo extract $(NETBSD_TOOLS_SRC); \
+ tar -jxf $(NETBSD_TOOLS_SRC); }
+
+mk-netbsd-trees: netbsd-tools pristine-netbsd-src
+ $(RM) -rf $(NETBSD_TREES)
+ echo $(NETBSD_SRC) | grep -q bz2 && \
+ tar -jxf $(NETBSD_SRC) || tar -zxf $(NETBSD_SRC)
+ mv netbsd-$(NETBSD_VER)-xen-kernel-$(NETBSD_CVSSNAP) \
+ netbsd-$(NETBSD_VER)-xenU
+ ( cd netbsd-$(NETBSD_VER)-xen-sparse ; \
+ ./mkbuildtree ../netbsd-$(NETBSD_VER)-xenU )
+
+# build the specified netbsd tree
+NBDIR = $(subst netbsd-,netbsd-$(NETBSD_VER)-,$@)
+netbsd-xen%:
+ $(MAKE) -C $(NBDIR) config
+ $(MAKE) -C $(NBDIR) netbsd
+ $(MAKE) -C $(NBDIR) INSTALL_PATH=$(INSTALL_DIR) INSTALL_NAME=boot/netbsd-$(NETBSD_VER)-$(subst netbsd-,,$@) install
+
+build: $(NETBSD_TREES)
+
+delete:
+ rm -rf $(NETBSD_TREES) \ No newline at end of file
diff --git a/docs/Makefile b/docs/Makefile
index aa2b8a1aee..e685704bea 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -22,6 +22,7 @@ clean:
rm -rf $(GFX) ps pdf html
install: all
+ rm -rf $(prefix)/usr/share/doc/xen
mkdir -p $(prefix)/usr/share/doc/xen
cp -dR ps $(prefix)/usr/share/doc/xen
cp -dR pdf $(prefix)/usr/share/doc/xen