From a708070181fc7d7087a8c80d9f9d11b2a57c00e3 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 15 Jan 2013 16:08:52 -0500 Subject: [PATCH] Makefile: Build only 64-bit hypervisor and fix rcS .. by not launching 'xend' under Xen 4.2. Signed-off-by: Konrad Rzeszutek Wilk --- Makefile | 12 +++++++++++- root_image/etc/init.d/rcS | 10 ++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7c20bad..ba30dd3 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,8 @@ linux-distclean: linux-clean XEN_DISTDIR = xen/dist/install +#XEN_MINOR = $(shell cat xen/xen/Makefile | grep XEN_SUBVERSION | head -1 |sed 's/.*= //g') + xen-DISTRIB_TARGET = dist/common/xen.gz .PHONY: xen-dist-nodep @@ -157,16 +159,24 @@ xen-dist-nodep: then (cd xen;./configure); \ fi; \ fi +ifeq ($(ARCH),i386) + touch xen/xen/xen.gz +else $(MAKE) -C xen xen -j$$(($(NCPUS) * 2)) +endif + $(INSTALL_DIR) dist/common/ - $(INSTALL_DATA) $(XEN_DISTDIR)/boot/xen.gz dist/common/ +ifeq ($(ARCH),x86_64) + $(INSTALL_DATA) $(XEN_DISTDIR)/boot/xen.gz dist/common/ +endif IOEMU_DIR = ioemu-remote .PHONY: xen-tools xen-tools: # $(MAKE) -C xen dist-misc -j$$(($(NCPUS) * 2)) + $(MAKE) -C xen IOEMU_CONFIGURE_CROSS="--disable-curses --disable-slirp --disable-opengl --disable-sdl --disable-kvm --disable-vnc-tls" tools -j$$(($(NCPUS) * 2)) .PHONY: xen-dist diff --git a/root_image/etc/init.d/rcS b/root_image/etc/init.d/rcS index 83825f2..1669373 100755 --- a/root_image/etc/init.d/rcS +++ b/root_image/etc/init.d/rcS @@ -97,10 +97,16 @@ if [ $XEND_LOAD -eq 1 ]; then modprobe evtchn modprobe xen_evtchn # Xen 4.0 can't deal with xencommons running first - if [ `xen-detect | sed -e 's/.*v//' -e 's/\.//g'` != 40 ]; then + XEN_VERSION=`xen-detect | sed -e 's/.*v//' -e 's/\.//g'` + if [ "$XEN_VERSION" != 40 ]; then /etc/init.d/xencommons start fi - /etc/init.d/xend start + # Xen 4.2 and above should use 'xl' instead of 'xm' + if [ "$XEN_VERSION" -lt 42 ]; then + /etc/init.d/xend start + else + echo "run_hotplug_scripts=0" >> /etc/xen/xl.conf + fi rm -f /dev/ttyS0 ln -s /dev/null /dev/ttyS0 sed -i 's/\(^ttyS0.*\)/# \1/' /etc/inittab -- 2.39.5