ia64/xen-unstable

changeset 14980:aedc55daf92b

vnet: Fix build of the vnet module.
- correcting KERNEL_SRC ( ./build-linux... )
- typing errors in Makefile.ver
- module-params
Signed-off-by: Robert Valentan <R.Valentan@solid-soft.at>
author kfraser@localhost.localdomain
date Fri Apr 27 16:27:07 2007 +0100 (2007-04-27)
parents 493f7c689f03
children b915eb96097a
files tools/vnet/vnet-module/Makefile.ver tools/vnet/vnet-module/varp.c tools/vnet/vnet-module/vnet.c tools/vnet/vnetd/Makefile tools/vnet/vnetd/sys_kernel.h
line diff
     1.1 --- a/tools/vnet/vnet-module/Makefile.ver	Fri Apr 27 16:21:20 2007 +0100
     1.2 +++ b/tools/vnet/vnet-module/Makefile.ver	Fri Apr 27 16:27:07 2007 +0100
     1.3 @@ -18,8 +18,14 @@
     1.4  # 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
     1.5  #============================================================================
     1.6  
     1.7 +include $(XEN_ROOT)/Config.mk
     1.8 +
     1.9  LINUX_SERIES?=2.6
    1.10 -KERNEL_MINOR=-xen
    1.11 +ifeq ($(XEN_SPLIT_KERNEL),y)
    1.12 +  KERNEL_MINOR=-xen0
    1.13 +else
    1.14 +  KERNEL_MINOR=-xen
    1.15 +endif
    1.16  
    1.17  LINUX_VERSION?=$(shell (/bin/ls -d $(XEN_ROOT)/pristine-linux-$(LINUX_SERIES).* 2>/dev/null) | \
    1.18                        sed -e 's!^.*linux-\(.\+\)!\1!' )
    1.19 @@ -30,7 +36,7 @@ endif
    1.20  
    1.21  KERNEL_VERSION=$(LINUX_VERSION)$(KERNEL_MINOR)
    1.22  
    1.23 -KERNEL_SRC?=$(shell cd $(XEN_ROOT)/linux-$(KERNEL_VERSION) && pwd)
    1.24 +KERNEL_SRC ?= $(shell cd $(XEN_ROOT)/build-linux-$(KERNEL_VERSION)_$(XEN_TARGET_ARCH) && pwd)
    1.25  
    1.26  ifeq ($(KERNEL_SRC),)
    1.27  $(error Kernel source for kernel $(KERNEL_VERSION) not found)
    1.28 @@ -40,10 +46,10 @@ endif
    1.29  # may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 2.6.12.6-xen0.
    1.30  KERNEL_RELEASE=$(shell make -s -C $(KERNEL_SRC) kernelrelease)
    1.31  
    1.32 -KERNEL_MODULE_DIR=/lib/modules/$$(KERNEL_RELEASE)/kernel
    1.33 +KERNEL_MODULE_DIR=/lib/modules/$(KERNEL_RELEASE)/kernel
    1.34  
    1.35  $(warning KERNEL_SRC		$(KERNEL_SRC))
    1.36  $(warning LINUX_VERSION		$(LINUX_VERSION))
    1.37  $(warning KERNEL_VERSION	$(KERNEL_VERSION))
    1.38  $(warning KERNEL_RELEASE	$(KERNEL_RELEASE))
    1.39 -$(warning KERNEL_ MODULE_DIR	$(KERNEL_MODULE_DIR))
    1.40 +$(warning KERNEL_MODULE_DIR	$(KERNEL_MODULE_DIR))
     2.1 --- a/tools/vnet/vnet-module/varp.c	Fri Apr 27 16:21:20 2007 +0100
     2.2 +++ b/tools/vnet/vnet-module/varp.c	Fri Apr 27 16:27:07 2007 +0100
     2.3 @@ -1530,12 +1530,7 @@ void varp_exit(void){
     2.4      dprintf("<\n");
     2.5  }
     2.6  
     2.7 -#ifdef MODULE_PARM
     2.8 -MODULE_PARM(varp_mcaddr, "s");
     2.9 -MODULE_PARM(varp_device, "s");
    2.10 -#else
    2.11  module_param(varp_mcaddr, charp, 0644);
    2.12  module_param(varp_device, charp, 0644);
    2.13 -#endif
    2.14  MODULE_PARM_DESC(varp_mcaddr, "VARP multicast address");
    2.15  MODULE_PARM_DESC(varp_device, "VARP network device");
     3.1 --- a/tools/vnet/vnet-module/vnet.c	Fri Apr 27 16:21:20 2007 +0100
     3.2 +++ b/tools/vnet/vnet-module/vnet.c	Fri Apr 27 16:27:07 2007 +0100
     3.3 @@ -693,12 +693,7 @@ module_init(vnet_module_init);
     3.4  module_exit(vnet_module_exit);
     3.5  MODULE_LICENSE("GPL");
     3.6  
     3.7 -#ifdef MODULE_PARM
     3.8 -MODULE_PARM(vnet_encaps, "s");
     3.9 -#else
    3.10  module_param(vnet_encaps, charp, 0644);
    3.11 -#endif
    3.12 -
    3.13  MODULE_PARM_DESC(vnet_encaps, "Vnet encapsulation: etherip or udp.");
    3.14  
    3.15  #endif
     4.1 --- a/tools/vnet/vnetd/Makefile	Fri Apr 27 16:21:20 2007 +0100
     4.2 +++ b/tools/vnet/vnetd/Makefile	Fri Apr 27 16:27:07 2007 +0100
     4.3 @@ -16,7 +16,7 @@
     4.4  # Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
     4.5  #----------------------------------------------------------------------------
     4.6  
     4.7 -VNET_ROOT = $(shell cd .. && pwd)
     4.8 +VNET_ROOT ?= $(shell cd .. && pwd)
     4.9  include $(VNET_ROOT)/Make.env
    4.10  
    4.11  .PHONY: all
    4.12 @@ -27,6 +27,8 @@ all: vnetd
    4.13  # Comment out when outside xen.
    4.14  #include $(XEN_ROOT)/tools/Rules.mk
    4.15  
    4.16 +INSTALL_PROG ?= $(INSTALL) -m0755 -p
    4.17 +
    4.18  VNETD_INSTALL_DIR = /usr/sbin
    4.19  
    4.20  INCLUDES += -I$(LIBXUTIL_DIR)
     5.1 --- a/tools/vnet/vnetd/sys_kernel.h	Fri Apr 27 16:21:20 2007 +0100
     5.2 +++ b/tools/vnet/vnetd/sys_kernel.h	Fri Apr 27 16:27:07 2007 +0100
     5.3 @@ -45,6 +45,7 @@
     5.4  #define module_exit(x)
     5.5  #define MODULE_LICENSE(x)
     5.6  #define MODULE_PARM(v, t)
     5.7 +#define module_param(v, t, s)
     5.8  #define MODULE_PARM_DESC(v, s)
     5.9  
    5.10  enum {