[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vnet: Another build fix for finding Linux build tree and version.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1177749864 -3600
# Node ID 0f9b97523450aae06d42852bdac9bbca3d6033d1
# Parent  c5bf8919938bdc476c5cae3bf4c276a93b29bbac
vnet: Another build fix for finding Linux build tree and version.
Signed-off-by: Robert Valentan <R.Valentan@xxxxxxxxxxxxx>
---
 tools/vnet/vnet-module/00README     |    4 ++--
 tools/vnet/vnet-module/Makefile.ver |   16 ++++++----------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff -r c5bf8919938b -r 0f9b97523450 tools/vnet/vnet-module/00README
--- a/tools/vnet/vnet-module/00README   Sat Apr 28 09:37:32 2007 +0100
+++ b/tools/vnet/vnet-module/00README   Sat Apr 28 09:44:24 2007 +0100
@@ -9,8 +9,8 @@ LINUX_SERIES:   linux release to compile
 LINUX_SERIES:   linux release to compile for: 2.4, or 2.6 (default).
 XEN_ROOT:       root of the xen tree containing kernel source.
 KERNEL_VERSION: kernel version, default got from XEN_ROOT.
-KERNEL_MINOR:   kernel minor version, default -xen0.
-KERNEL_SRC:     path to kernel source, default linux-<VERSION> under XEN_ROOT.
+KERNEL_SRC:     path to kernel source, default build-linux-<VERSION> 
+                under XEN_ROOT.
 
 *) For 2.4 kernel
 
diff -r c5bf8919938b -r 0f9b97523450 tools/vnet/vnet-module/Makefile.ver
--- a/tools/vnet/vnet-module/Makefile.ver       Sat Apr 28 09:37:32 2007 +0100
+++ b/tools/vnet/vnet-module/Makefile.ver       Sat Apr 28 09:44:24 2007 +0100
@@ -18,14 +18,7 @@
 # 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
 #============================================================================
 
-include $(XEN_ROOT)/Config.mk
-
 LINUX_SERIES?=2.6
-ifeq ($(XEN_SPLIT_KERNEL),y)
-  KERNEL_MINOR=-xen0
-else
-  KERNEL_MINOR=-xen
-endif
 
 LINUX_VERSION?=$(shell (/bin/ls -d 
$(XEN_ROOT)/pristine-linux-$(LINUX_SERIES).* 2>/dev/null) | \
                       sed -e 's!^.*linux-\(.\+\)!\1!' )
@@ -34,16 +27,19 @@ ifeq ($(LINUX_VERSION),)
 $(error Kernel source for linux $(LINUX_SERIES) not found)
 endif
 
-KERNEL_VERSION=$(LINUX_VERSION)$(KERNEL_MINOR)
+KERNEL_VERSION?=$(shell (/bin/ls -d 
$(XEN_ROOT)/build-linux-$(LINUX_VERSION)-xen* 2>/dev/null) | \
+                      grep -v -m 1 -e '-xenU' | \
+                      sed -e 's!^.*linux-\(.\+\)!\1!' )
 
-KERNEL_SRC ?= $(shell cd 
$(XEN_ROOT)/build-linux-$(KERNEL_VERSION)_$(XEN_TARGET_ARCH) && pwd)
+KERNEL_SRC ?= $(XEN_ROOT)/build-linux-$(KERNEL_VERSION)
 
 ifeq ($(KERNEL_SRC),)
 $(error Kernel source for kernel $(KERNEL_VERSION) not found)
 endif
 
 # Get the full kernel release version from its makefile, as the source path
-# may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 
2.6.12.6-xen0.
+# may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 
+# 2.6.12.6-xen0.
 KERNEL_RELEASE=$(shell make -s -C $(KERNEL_SRC) kernelrelease)
 
 KERNEL_MODULE_DIR=/lib/modules/$(KERNEL_RELEASE)/kernel

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.