ia64/xen-unstable

view buildconfigs/mk.linux-2.6-xen @ 11753:bf0deb09facd

[XEND] Fix pygrub when run server-side on a domain with blktap disks.

For some slightly-crazy reason the blktap patches changed the name
of the SEXPR block containing the disk definition 'vbd' to 'tap', even
though merely changing the 'uname' fragement was sufficient. eg

(vbd (backend 0) (dev hda:disk) (uname file:/xen/rhel4x86_64.img)
(mode w) )

changes to

(tap (backend 0) (dev hda:disk) (uname tap:aio:/xen/rhel4x86_64.img)
(mode w) )

If you create a domain with xm, then xm runs pygrub client side which
works fine. If you create a domain by feeding a block of SEXPR to Xend
over its network port, then pygrub is run server side. The code in
XenD which decides which disk to run pygrub against only looks for
'device/vbd' in the SEXPR so fails to see any blktap disks.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
author kfraser@localhost.localdomain
date Thu Oct 05 16:14:50 2006 +0100 (2006-10-05)
parents c5d4d47bbeb8
children a5aadc4c6bb6
line source
1 LINUX_SERIES = 2.6
2 LINUX_VER = 2.6.16.29
4 EXTRAVERSION ?= xen
6 LINUX_DIR = linux-$(LINUX_VER)-$(EXTRAVERSION)
8 IMAGE_TARGET ?= vmlinuz
9 INSTALL_BOOT_PATH ?= $(DESTDIR)
11 LINUX_VER3 := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
13 include buildconfigs/Rules.mk
15 # The real action starts here!
16 .PHONY: build
17 build: $(LINUX_DIR)/include/linux/autoconf.h
18 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
19 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
20 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
21 fi
22 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) $(IMAGE_TARGET)
23 mkdir -p $(INSTALL_BOOT_PATH)
24 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(INSTALL_BOOT_PATH) install
26 $(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
27 rm -rf $(LINUX_DIR)
28 cp -al $(<D) $(LINUX_DIR)
29 # Apply arch-xen patches
30 ( cd linux-$(LINUX_SERIES)-xen-sparse && \
31 LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_DIR) )
32 # Re-use config from install dir if one exits else use default config
33 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
34 [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
35 cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
36 || sh buildconfigs/create_config.sh $(LINUX_DIR)/.config $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE)
37 # See if we need to munge config to enable PAE
38 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
39 # Patch kernel Makefile to set EXTRAVERSION
40 ( cd $(LINUX_DIR) ; \
41 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
42 rm -f Makefile ; mv Mk.tmp Makefile )
43 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
45 .PHONY: prep
46 prep: $(LINUX_DIR)/include/linux/autoconf.h
48 .PHONY: config
49 config: CONFIGMODE = menuconfig
50 config: $(LINUX_DIR)/include/linux/autoconf.h
51 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
53 .PHONY: clean
54 clean::
55 [ ! -d $(LINUX_DIR) ] || \
56 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
59 .PHONY: delete
60 delete:
61 rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR)
63 .PHONY: mrpropper
64 mrpropper:
65 rm -f linux-$(LINUX_VER).tar.bz2