Commit 265296e7 authored by Cesar Prados's avatar Cesar Prados

vme_wb: the driver compiles now against vmebridge for kernels < 3.10, and

        against the vme in-tree  kernle module, it's not ready though
parent daa213ef
REPO_VME = git://ohwr.org/hdl-core-lib/vme64x-core/legacy-vme64x-core.git
DRV_DIR = $(shell pwd)/../../legacy-vme64x-core
KERNEL_LIMIT := 3.10.0
SRC_NEWK := 3.10
KERNELVER ?= $(shell /bin/uname -r)
TEMP := $(shell /bin/echo "$(KERNELVER)'\'n$(KERNEL_LIMIT)")
KERNEL := $(shell /bin/echo -e $(TEMP) | sed '/^$$/d' | sort -t. -k1,1nr -k2,2nr | head -1)
ifeq ($(KERNEL),$(KERNEL_LIMIT))
SUB := gitmodules wishbone vme modules
export CONFIG_VME_OLDK=m
else
SUB := wishbone modules
export CONFIG_VME_NEWK=m
endif
ifneq ($(KERNELRELEASE),)
KBUILD_EXTRA_SYMBOLS += $(M)/../pcie-wb/Module.symvers $(M)/../../legacy-vme64x-core/drv/driver/Module.symvers
obj-m := vme_wb.o
ccflags-y := -I$(M)/../../legacy-vme64x-core/drv/driver
ccflags-y += -I$(M)/../pcie-wb
KBUILD_EXTRA_SYMBOLS += $(M)/../pcie-wb/Module.symvers
ifeq ($(CONFIG_VME_OLDK),m)
KBUILD_EXTRA_SYMBOLS += $(M)/../../legacy-vme64x-core/drv/driver/Module.symvers
endif
obj-$(CONFIG_VME_NEWK) := $(SRC_NEWK)/vme_wb.o
obj-$(CONFIG_VME_OLDK) := vme_wb.o
ccflags-y := -I$(M)/../../legacy-vme64x-core/drv/driver
ccflags-y += -I$(M)/../pcie-wb
else
KERNELVER ?= `uname -r`
KERNELDIR ?= /lib/modules/$(KERNELVER)/build
PWD := $(shell pwd)
PWD ?= $(shell pwd)
all: gitmodules wishbone vme modules
all: $(SUB)
gitmodules:
@test -d $(DRV_DIR) && \
......@@ -27,12 +49,13 @@ vme:
$(MAKE) -C ../../legacy-vme64x-core/drv/driver KERNELVER="$(KERNELVER)" KERNELDIR="$(KERNELDIR)"
modules:
@echo $(KBUILD_EXTRA_SYMBOLS)
$(MAKE) -C $(KERNELDIR) M=$(PWD)
install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) INSTALL_MOD_PATH=$(STAGING) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
clean:
rm -rf *~ core *.depend .*.cmd *.ko .*.mod.c .tmp_versions
rm -rf ./$(SRC_NEWK)/*.*o*
endif
......@@ -2,7 +2,7 @@
*
* Released according to the GNU GPL, version 2 or any later version
*
* VME-WB bridge for VME
* VME-WB bridge for VME for Kernel < 3.10
This kernle module provides methods for using Etherbone over VME. It depens on
the wishbone and vmebridge modules. The first steers the Ethernet communication and
......@@ -46,3 +46,7 @@ vme, the position of the base address switch.
<vector> of the IRQ
<lun> index value for VME card
* VME-WB bridge for VME for Kernel => 3.10
this driver is under development
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment