ia64/xen-unstable

changeset 14985:0f9b97523450

vnet: Another build fix for finding Linux build tree and version.
Signed-off-by: Robert Valentan <R.Valentan@solid-soft.at>
author Keir Fraser <keir@xensource.com>
date Sat Apr 28 09:44:24 2007 +0100 (2007-04-28)
parents c5bf8919938b
children 1ddaf2650633
files tools/vnet/vnet-module/00README tools/vnet/vnet-module/Makefile.ver
line diff
     1.1 --- a/tools/vnet/vnet-module/00README	Sat Apr 28 09:37:32 2007 +0100
     1.2 +++ b/tools/vnet/vnet-module/00README	Sat Apr 28 09:44:24 2007 +0100
     1.3 @@ -9,8 +9,8 @@ can be set in your env or on the make co
     1.4  LINUX_SERIES:   linux release to compile for: 2.4, or 2.6 (default).
     1.5  XEN_ROOT:       root of the xen tree containing kernel source.
     1.6  KERNEL_VERSION: kernel version, default got from XEN_ROOT.
     1.7 -KERNEL_MINOR:   kernel minor version, default -xen0.
     1.8 -KERNEL_SRC:     path to kernel source, default linux-<VERSION> under XEN_ROOT.
     1.9 +KERNEL_SRC:     path to kernel source, default build-linux-<VERSION> 
    1.10 +                under XEN_ROOT.
    1.11  
    1.12  *) For 2.4 kernel
    1.13  
     2.1 --- a/tools/vnet/vnet-module/Makefile.ver	Sat Apr 28 09:37:32 2007 +0100
     2.2 +++ b/tools/vnet/vnet-module/Makefile.ver	Sat Apr 28 09:44:24 2007 +0100
     2.3 @@ -18,14 +18,7 @@
     2.4  # 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
     2.5  #============================================================================
     2.6  
     2.7 -include $(XEN_ROOT)/Config.mk
     2.8 -
     2.9  LINUX_SERIES?=2.6
    2.10 -ifeq ($(XEN_SPLIT_KERNEL),y)
    2.11 -  KERNEL_MINOR=-xen0
    2.12 -else
    2.13 -  KERNEL_MINOR=-xen
    2.14 -endif
    2.15  
    2.16  LINUX_VERSION?=$(shell (/bin/ls -d $(XEN_ROOT)/pristine-linux-$(LINUX_SERIES).* 2>/dev/null) | \
    2.17                        sed -e 's!^.*linux-\(.\+\)!\1!' )
    2.18 @@ -34,16 +27,19 @@ ifeq ($(LINUX_VERSION),)
    2.19  $(error Kernel source for linux $(LINUX_SERIES) not found)
    2.20  endif
    2.21  
    2.22 -KERNEL_VERSION=$(LINUX_VERSION)$(KERNEL_MINOR)
    2.23 +KERNEL_VERSION?=$(shell (/bin/ls -d $(XEN_ROOT)/build-linux-$(LINUX_VERSION)-xen* 2>/dev/null) | \
    2.24 +                      grep -v -m 1 -e '-xenU' | \
    2.25 +                      sed -e 's!^.*linux-\(.\+\)!\1!' )
    2.26  
    2.27 -KERNEL_SRC ?= $(shell cd $(XEN_ROOT)/build-linux-$(KERNEL_VERSION)_$(XEN_TARGET_ARCH) && pwd)
    2.28 +KERNEL_SRC ?= $(XEN_ROOT)/build-linux-$(KERNEL_VERSION)
    2.29  
    2.30  ifeq ($(KERNEL_SRC),)
    2.31  $(error Kernel source for kernel $(KERNEL_VERSION) not found)
    2.32  endif
    2.33  
    2.34  # Get the full kernel release version from its makefile, as the source path
    2.35 -# may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 2.6.12.6-xen0.
    2.36 +# may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 
    2.37 +# 2.6.12.6-xen0.
    2.38  KERNEL_RELEASE=$(shell make -s -C $(KERNEL_SRC) kernelrelease)
    2.39  
    2.40  KERNEL_MODULE_DIR=/lib/modules/$(KERNEL_RELEASE)/kernel