ia64/xen-unstable

view buildconfigs/mk.linux-2.6-xen @ 10710:800261a88275

[XEND] Prevent uuid double use.

A check_uuid() in this patch checks on uuid of the
VM configuration definition. If specified uuid is
already used with the others VM, the xm create command
does not create the VM. The xm create command error occurs.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Mon Jul 10 15:10:00 2006 +0100 (2006-07-10)
parents 30cdeb686b93
children 84ff152efb0a
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 LINUX_VER3 := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
10 include buildconfigs/Rules.mk
12 # The real action starts here!
13 .PHONY: build
14 build: $(LINUX_DIR)/include/linux/autoconf.h
15 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
16 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
17 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
18 fi
19 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) vmlinuz
20 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
22 $(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
23 rm -rf $(LINUX_DIR)
24 cp -al $(<D) $(LINUX_DIR)
25 # Apply arch-xen patches
26 ( cd linux-$(LINUX_SERIES)-xen-sparse && \
27 LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_DIR) )
28 # Re-use config from install dir if one exits else use default config
29 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
30 [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
31 cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
32 || cp buildconfigs/linux-defconfig_$(EXTRAVERSION)_$(XEN_TARGET_ARCH)$(XEN_SYSTYPE) \
33 $(LINUX_DIR)/.config
34 # See if we need to munge config to enable PAE
35 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
36 # Patch kernel Makefile to set EXTRAVERSION
37 ( cd $(LINUX_DIR) ; \
38 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
39 rm -f Makefile ; mv Mk.tmp Makefile )
40 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
42 .PHONY: prep
43 prep: $(LINUX_DIR)/include/linux/autoconf.h
45 .PHONY: config
46 config: CONFIGMODE = menuconfig
47 config: $(LINUX_DIR)/include/linux/autoconf.h
48 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
50 .PHONY: clean
51 clean::
52 [ ! -d $(LINUX_DIR) ] || \
53 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
56 .PHONY: delete
57 delete:
58 rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR)
60 .PHONY: mrpropper
61 mrpropper:
62 rm -f linux-$(LINUX_VER).tar.bz2