diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 17:36:38 +0100 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 17:36:38 +0100 |
| commit | 2a7348129a42f21095fcd62e47a035f78d254130 (patch) | |
| tree | 544dc8019a8f8cb684ace8674193605e607f9964 /recipes-enea | |
| download | meta-enea-master.tar.gz | |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-enea')
| -rw-r--r-- | recipes-enea/linx/linx-2.6.5/liblinx_nobase.patch | 29 | ||||
| -rw-r--r-- | recipes-enea/linx/linx-2.6.5/linxcfg_nobase.patch | 38 | ||||
| -rw-r--r-- | recipes-enea/linx/linx-mod-2.6.5/linx-kernel-modules.patch | 288 | ||||
| -rw-r--r-- | recipes-enea/linx/linx-mod-2.6.5/support-for-3.11-kernel-versions.patch | 206 | ||||
| -rw-r--r-- | recipes-enea/linx/linx-mod_2.6.5.bb | 26 | ||||
| -rw-r--r-- | recipes-enea/linx/linx.inc | 22 | ||||
| -rw-r--r-- | recipes-enea/linx/linx_2.6.5.bb | 9 |
7 files changed, 618 insertions, 0 deletions
diff --git a/recipes-enea/linx/linx-2.6.5/liblinx_nobase.patch b/recipes-enea/linx/linx-2.6.5/liblinx_nobase.patch new file mode 100644 index 0000000..05a4b7e --- /dev/null +++ b/recipes-enea/linx/linx-2.6.5/liblinx_nobase.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From 5ea9763286eb43e01c4ef2f3db59e13367a77138 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: jack zhang <jack.zhang@enea.com> | ||
| 3 | Date: Mon, 17 Dec 2012 03:52:11 +0100 | ||
| 4 | Subject: [PATCH] LXCR-995 As an Enea sales person, I want LINX added to Enea | ||
| 5 | Linux | ||
| 6 | Signed-off-by: jack zhang <jack.zhang@enea.com> | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | For details, see LINXCR-1518 | ||
| 10 | --- | ||
| 11 | liblinx/Makefile.am | 2 +- | ||
| 12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/liblinx/Makefile.am b/liblinx/Makefile.am | ||
| 15 | index 8559e43..3ce47d6 100644 | ||
| 16 | --- a/liblinx/Makefile.am | ||
| 17 | +++ b/liblinx/Makefile.am | ||
| 18 | @@ -47,7 +47,7 @@ dist_man7_MANS = $(LINXROOT)/doc/man7/linx.7 | ||
| 19 | |||
| 20 | include $(LINXROOT)/flags.am | ||
| 21 | |||
| 22 | -include_HEADERS = \ | ||
| 23 | +nobase_include_HEADERS = \ | ||
| 24 | $(LINXROOT)/include/linx.h \ | ||
| 25 | $(LINXROOT)/include/linx_ioctl.h \ | ||
| 26 | $(LINXROOT)/include/linx_socket.h \ | ||
| 27 | -- | ||
| 28 | 1.7.5.4 | ||
| 29 | |||
diff --git a/recipes-enea/linx/linx-2.6.5/linxcfg_nobase.patch b/recipes-enea/linx/linx-2.6.5/linxcfg_nobase.patch new file mode 100644 index 0000000..af4b477 --- /dev/null +++ b/recipes-enea/linx/linx-2.6.5/linxcfg_nobase.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From a3b3dc8117490ddfcc2081fca5ff663e4157a106 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: jack zhang <jack.zhang@enea.com> | ||
| 3 | Date: Mon, 17 Dec 2012 03:57:15 +0100 | ||
| 4 | Subject: [PATCH] LXCR-995 As an Enea sales person, I want LINX added to Enea | ||
| 5 | Linux | ||
| 6 | Signed-off-by: jack zhang <jack.zhang@enea.com> | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | For details, see LINXCR-1518 | ||
| 10 | --- | ||
| 11 | linxcfg/Makefile.am | 4 +--- | ||
| 12 | 1 files changed, 1 insertions(+), 3 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/linxcfg/Makefile.am b/linxcfg/Makefile.am | ||
| 15 | index 9fc8e84..287c71b 100644 | ||
| 16 | --- a/linxcfg/Makefile.am | ||
| 17 | +++ b/linxcfg/Makefile.am | ||
| 18 | @@ -24,16 +24,14 @@ dist_man1_MANS = \ | ||
| 19 | $(LINXROOT)/doc/man1/mkcmclcon.1 \ | ||
| 20 | $(LINXROOT)/doc/man1/rmcmclcon.1 | ||
| 21 | |||
| 22 | -include_HEADERS = \ | ||
| 23 | +nobase_include_HEADERS = \ | ||
| 24 | $(LINXROOT)/include/linxcfg.h \ | ||
| 25 | $(LINXROOT)/include/linux/ethcm_db_ioctl.h \ | ||
| 26 | $(LINXROOT)/include/linux/rlnh_db_ioctl.h \ | ||
| 27 | $(LINXROOT)/include/linux/tcpcm_db_ioctl.h \ | ||
| 28 | $(LINXROOT)/include/linux/shmcm_db_ioctl.h \ | ||
| 29 | - $(LINXROOT)/include/linux/riocm_db_ioctl.h \ | ||
| 30 | $(LINXROOT)/include/linux/cmcl_db_ioctl.h \ | ||
| 31 | $(LINXROOT)/include/linux/riocm_db_ioctl.h \ | ||
| 32 | - $(LINXROOT)/include/linux/cmcl_db_ioctl.h \ | ||
| 33 | $(LINXROOT)/include/db_ioctl.h \ | ||
| 34 | $(LINXROOT)/include/ethcm_db_ioctl.h \ | ||
| 35 | $(LINXROOT)/include/rlnh_db_ioctl.h \ | ||
| 36 | -- | ||
| 37 | 1.7.5.4 | ||
| 38 | |||
diff --git a/recipes-enea/linx/linx-mod-2.6.5/linx-kernel-modules.patch b/recipes-enea/linx/linx-mod-2.6.5/linx-kernel-modules.patch new file mode 100644 index 0000000..f29019b --- /dev/null +++ b/recipes-enea/linx/linx-mod-2.6.5/linx-kernel-modules.patch | |||
| @@ -0,0 +1,288 @@ | |||
| 1 | Use KERNEL_SRC and modules_install to get use of pokys build kernel modules. | ||
| 2 | fix version.h problem. | ||
| 3 | |||
| 4 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
| 5 | |||
| 6 | Upstream-status: Pending | ||
| 7 | --- | ||
| 8 | diff -uNr a/cmcl/Makefile b/cmcl/Makefile | ||
| 9 | --- a/cmcl/Makefile 2013-02-25 15:46:59.777325274 +0100 | ||
| 10 | +++ b/cmcl/Makefile 2013-02-25 15:57:22.038398316 +0100 | ||
| 11 | @@ -3,8 +3,8 @@ | ||
| 12 | LINX ?= $(CURDIR)/../../.. | ||
| 13 | include $(LINX)/net/linx/config.mk | ||
| 14 | |||
| 15 | -KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 16 | -VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 17 | +KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 18 | +VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 19 | |||
| 20 | ifneq ($(VENDOR_VERSION), "") | ||
| 21 | EXTRA_CFLAGS += -DGFP_IS_INT | ||
| 22 | @@ -38,15 +38,17 @@ | ||
| 23 | |||
| 24 | linx_cmcl-y += cmcl.o | ||
| 25 | |||
| 26 | +SRC := $(shell pwd) | ||
| 27 | + | ||
| 28 | modules: | ||
| 29 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules | ||
| 30 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules | ||
| 31 | $(CP) linx_cmcl.ko .. | ||
| 32 | |||
| 33 | clean: | ||
| 34 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` clean | ||
| 35 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) clean | ||
| 36 | $(LINXRM) Module.symvers Module.markers modules.order ../linx_cmcl.ko | ||
| 37 | |||
| 38 | -install: modules | ||
| 39 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules_install | ||
| 40 | +modules_install: modules | ||
| 41 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
| 42 | depmod | ||
| 43 | |||
| 44 | diff -uNr a/config.mk b/config.mk | ||
| 45 | --- a/config.mk 2013-02-25 15:46:59.781325113 +0100 | ||
| 46 | +++ b/config.mk 2013-02-25 16:13:30.672459997 +0100 | ||
| 47 | @@ -3,7 +3,7 @@ | ||
| 48 | # CROSS_COMPILE is cross compiler prefix (including full path) | ||
| 49 | CROSS_COMPILE ?= | ||
| 50 | # KERNEL is the path to your kernel sources | ||
| 51 | -KERNEL ?= | ||
| 52 | +KERNEL_SRC ?= | ||
| 53 | |||
| 54 | # Host architecture | ||
| 55 | HOST_ARCH ?= $(patsubst i%86,i386,$(shell uname -m)) | ||
| 56 | @@ -26,13 +26,13 @@ | ||
| 57 | endif | ||
| 58 | |||
| 59 | ifeq ($(ARCH),$(HOST_ARCH)) | ||
| 60 | -ifndef KERNEL | ||
| 61 | -KERNEL := $(HOST_KERNEL) | ||
| 62 | +ifndef KERNEL_SRC | ||
| 63 | +KERNEL_SRC := $(HOST_KERNEL) | ||
| 64 | endif | ||
| 65 | else | ||
| 66 | -ifndef KERNEL | ||
| 67 | +ifndef KERNEL_SRC | ||
| 68 | ifdef NEED_KERNEL | ||
| 69 | -$(error Please define KERNEL.) | ||
| 70 | +$(error Please define KERNEL_SRC.) | ||
| 71 | endif | ||
| 72 | endif | ||
| 73 | endif | ||
| 74 | @@ -53,8 +53,8 @@ | ||
| 75 | ifdef CROSS_COMPILE | ||
| 76 | $(ECHO) "# CROSS_COMPILE=$(CROSS_COMPILE)" | ||
| 77 | endif | ||
| 78 | -ifdef KERNEL | ||
| 79 | - $(ECHO) "# KERNEL=$(KERNEL)" | ||
| 80 | +ifdef KERNEL_SRC | ||
| 81 | + $(ECHO) "# KERNEL_SRC=$(KERNEL_SRC)" | ||
| 82 | endif | ||
| 83 | ifdef VERBOSE | ||
| 84 | $(ECHO) "# VERBOSE=$(VERBOSE)" | ||
| 85 | @@ -62,7 +62,7 @@ | ||
| 86 | $(ECHO) "# VERBOSE=no" | ||
| 87 | endif | ||
| 88 | |||
| 89 | -export ARCH CROSS_COMPILE KERNEL LINX | ||
| 90 | +export ARCH CROSS_COMPILE KERNEL_SRC LINX | ||
| 91 | |||
| 92 | .PHONY: echo_config | ||
| 93 | |||
| 94 | @@ -117,5 +117,5 @@ | ||
| 95 | # in the mercury linux distribution. | ||
| 96 | EXTRA_CFLAGS += -I$(KDIR)/arch/ppc -DRLNH_ALIGN_ANY | ||
| 97 | else # x86 | ||
| 98 | -KDIR := /lib/modules/$(shell uname -r)/build | ||
| 99 | +KDIR := /lib/modules/$(KERNEL_VERSION)/build | ||
| 100 | endif | ||
| 101 | diff -uNr a/ecm/Makefile b/ecm/Makefile | ||
| 102 | --- a/ecm/Makefile 2013-02-25 15:46:59.781325113 +0100 | ||
| 103 | +++ b/ecm/Makefile 2013-02-25 16:11:13.754388313 +0100 | ||
| 104 | @@ -5,8 +5,8 @@ | ||
| 105 | LINX ?= $(CURDIR)/../../.. | ||
| 106 | include $(LINX)/net/linx/config.mk | ||
| 107 | |||
| 108 | -KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 109 | -VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 110 | +KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 111 | +VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 112 | |||
| 113 | ifneq ($(VENDOR_VERSION), "") | ||
| 114 | EXTRA_CFLAGS += -DGFP_IS_INT | ||
| 115 | @@ -43,14 +43,16 @@ | ||
| 116 | linx_eth_cm-y += ecm_rx.o | ||
| 117 | linx_eth_cm-y += ecm_kutils.o | ||
| 118 | |||
| 119 | +SRC := $(shell pwd) | ||
| 120 | + | ||
| 121 | modules: | ||
| 122 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules | ||
| 123 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules | ||
| 124 | $(CP) linx_eth_cm.ko .. | ||
| 125 | |||
| 126 | clean: | ||
| 127 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` clean | ||
| 128 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) clean | ||
| 129 | $(LINXRM) Module.symvers Module.markers modules.order ../linx_eth_cm.ko | ||
| 130 | |||
| 131 | -install: modules | ||
| 132 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules_install | ||
| 133 | +modules_install: modules | ||
| 134 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
| 135 | depmod | ||
| 136 | diff -uNr a/Makefile b/Makefile | ||
| 137 | --- a/Makefile 2013-02-25 15:46:59.781325113 +0100 | ||
| 138 | +++ b/Makefile 2013-02-25 15:53:22.752757899 +0100 | ||
| 139 | @@ -63,9 +63,9 @@ | ||
| 140 | 2_6_11 := 132619 | ||
| 141 | |||
| 142 | # Vendors version of kernel, needed to catch certain back patches | ||
| 143 | -VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 144 | +VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 145 | # Main line kernel version | ||
| 146 | -KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 147 | +KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 148 | |||
| 149 | # | ||
| 150 | # 'gt_or_eq' | ||
| 151 | @@ -140,14 +140,16 @@ | ||
| 152 | obj-y += riocm/ | ||
| 153 | obj-y += cmcl/ | ||
| 154 | |||
| 155 | +SRC := $(shell pwd) | ||
| 156 | + | ||
| 157 | modules: | ||
| 158 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules | ||
| 159 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules | ||
| 160 | $(CP) */*.ko . | ||
| 161 | clean: | ||
| 162 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` clean | ||
| 163 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) clean | ||
| 164 | $(LINXRM) Module.symvers Module.markers modules.order | ||
| 165 | |||
| 166 | -install: modules | ||
| 167 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules_install | ||
| 168 | +modules_install: modules | ||
| 169 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
| 170 | depmod | ||
| 171 | |||
| 172 | diff -uNr a/riocm/Makefile b/riocm/Makefile | ||
| 173 | --- a/riocm/Makefile 2013-02-25 15:46:59.781325113 +0100 | ||
| 174 | +++ b/riocm/Makefile 2013-02-25 16:05:33.381125565 +0100 | ||
| 175 | @@ -5,8 +5,8 @@ | ||
| 176 | LINX ?= $(CURDIR)/../../.. | ||
| 177 | include $(LINX)/net/linx/config.mk | ||
| 178 | |||
| 179 | -KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 180 | -VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 181 | +KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 182 | +VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 183 | |||
| 184 | ifneq ($(VENDOR_VERSION), "") | ||
| 185 | EXTRA_CFLAGS += -DGFP_IS_INT | ||
| 186 | @@ -43,15 +43,17 @@ | ||
| 187 | linx_rio_cm-y += rio_rx.o | ||
| 188 | linx_rio_cm-y += rio_kutils.o | ||
| 189 | |||
| 190 | +SRC := $(shell pwd) | ||
| 191 | + | ||
| 192 | modules: | ||
| 193 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules | ||
| 194 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules | ||
| 195 | $(CP) linx_rio_cm.ko .. | ||
| 196 | |||
| 197 | clean: | ||
| 198 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` clean | ||
| 199 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) clean | ||
| 200 | $(LINXRM) Module.symvers Module.markers modules.order ../linx_rio_cm.ko | ||
| 201 | |||
| 202 | -install: modules | ||
| 203 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules_install | ||
| 204 | +modules_install: modules | ||
| 205 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
| 206 | depmod | ||
| 207 | |||
| 208 | diff -uNr a/shmcm/Makefile b/shmcm/Makefile | ||
| 209 | --- a/shmcm/Makefile 2013-02-25 15:46:59.781325113 +0100 | ||
| 210 | +++ b/shmcm/Makefile 2013-02-25 16:03:58.113250295 +0100 | ||
| 211 | @@ -5,8 +5,8 @@ | ||
| 212 | LINX ?= $(CURDIR)/../../.. | ||
| 213 | include $(LINX)/net/linx/config.mk | ||
| 214 | |||
| 215 | -KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 216 | -VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 217 | +KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 218 | +VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 219 | |||
| 220 | ifneq ($(VENDOR_VERSION), "") | ||
| 221 | EXTRA_CFLAGS += -DGFP_IS_INT | ||
| 222 | @@ -60,7 +60,7 @@ | ||
| 223 | -I$(LINX)/net/linx/include \ | ||
| 224 | -I$(LINX)/net/linx/shmcm | ||
| 225 | |||
| 226 | -INSTALLDIR = /lib/modules/`uname -r`/kernel/net/linx | ||
| 227 | +INSTALLDIR = /lib/modules/$(KERNEL_VERSION)/kernel/net/linx | ||
| 228 | MODULES = linx_shm_cm.ko | ||
| 229 | |||
| 230 | obj-m := linx_shm_cm.o | ||
| 231 | @@ -70,15 +70,17 @@ | ||
| 232 | linx_shm_cm-y += shmcm_tx.o | ||
| 233 | linx_shm_cm-y += shmcm_kutils.o | ||
| 234 | |||
| 235 | +SRC := $(shell pwd) | ||
| 236 | + | ||
| 237 | modules: | ||
| 238 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules | ||
| 239 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules | ||
| 240 | $(CP) linx_shm_cm.ko .. | ||
| 241 | |||
| 242 | clean: | ||
| 243 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` clean | ||
| 244 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) clean | ||
| 245 | $(LINXRM) Module.symvers Module.markers modules.order ../linx_shm_cm.ko | ||
| 246 | |||
| 247 | -install: modules | ||
| 248 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules_install | ||
| 249 | +modules_install: modules | ||
| 250 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
| 251 | depmod | ||
| 252 | |||
| 253 | diff -uNr a/tcp_cm/Makefile b/tcp_cm/Makefile | ||
| 254 | --- a/tcp_cm/Makefile 2013-02-25 15:46:59.781325113 +0100 | ||
| 255 | +++ b/tcp_cm/Makefile 2013-02-25 16:10:09.097187839 +0100 | ||
| 256 | @@ -3,8 +3,8 @@ | ||
| 257 | LINX ?= $(CURDIR)/../../.. | ||
| 258 | include $(LINX)/net/linx/config.mk | ||
| 259 | |||
| 260 | -KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 261 | -VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL)/include/linux/version.h) | ||
| 262 | +KERNEL_CODE := $(shell awk '/LINUX_VERSION_CODE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 263 | +VENDOR_VERSION := $(shell awk '/UTS_RELEASE/ {print $$3}' $(KERNEL_SRC)/include/generated/utsrelease.h) | ||
| 264 | |||
| 265 | ifneq ($(VENDOR_VERSION), "") | ||
| 266 | EXTRA_CFLAGS += -DGFP_IS_INT | ||
| 267 | @@ -38,15 +38,17 @@ | ||
| 268 | |||
| 269 | linx_tcp_cm-y += tcp_cm.o | ||
| 270 | |||
| 271 | +SRC := $(shell pwd) | ||
| 272 | + | ||
| 273 | modules: | ||
| 274 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules | ||
| 275 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules | ||
| 276 | $(CP) linx_tcp_cm.ko .. | ||
| 277 | |||
| 278 | clean: | ||
| 279 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` clean | ||
| 280 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) clean | ||
| 281 | $(LINXRM) Module.symvers Module.markers modules.order ../linx_tcp_cm.ko | ||
| 282 | |||
| 283 | -install: modules | ||
| 284 | - $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL) M=`pwd` modules_install | ||
| 285 | +modules_install: modules | ||
| 286 | + $(XMAKE) ARCH=$(ARCH) V=$(V) -C $(KERNEL_SRC) M=$(SRC) modules_install | ||
| 287 | depmod | ||
| 288 | |||
diff --git a/recipes-enea/linx/linx-mod-2.6.5/support-for-3.11-kernel-versions.patch b/recipes-enea/linx/linx-mod-2.6.5/support-for-3.11-kernel-versions.patch new file mode 100644 index 0000000..d6f9106 --- /dev/null +++ b/recipes-enea/linx/linx-mod-2.6.5/support-for-3.11-kernel-versions.patch | |||
| @@ -0,0 +1,206 @@ | |||
| 1 | From 20294330f08283d28b6092b568156e29b1792328 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Adrian Dudau <adrian.dudau@enea.com> | ||
| 3 | Date: Thu, 12 Dec 2013 11:23:24 +0100 | ||
| 4 | Subject: [PATCH] support for 3.11 kernel versions | ||
| 5 | |||
| 6 | Fixed NULL pointer dereference in ecm_conn.c | ||
| 7 | |||
| 8 | Signed-off-by: Adrian Dudau <adrian.dudau@enea.com> | ||
| 9 | --- | ||
| 10 | cfg/db_proc.c | 23 ++++++++++++++++++----- | ||
| 11 | ecm/ecm_conn.c | 11 ++++++++--- | ||
| 12 | ipc/hunt.c | 24 ++++++++++++++++++++++++ | ||
| 13 | 3 files changed, 50 insertions(+), 8 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/cfg/db_proc.c b/cfg/db_proc.c | ||
| 16 | index c062a3d..bad0353 100644 | ||
| 17 | --- a/cfg/db_proc.c | ||
| 18 | +++ b/cfg/db_proc.c | ||
| 19 | @@ -41,6 +41,12 @@ | ||
| 20 | #include "db_format.h" | ||
| 21 | #include <asm/uaccess.h> | ||
| 22 | |||
| 23 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) | ||
| 24 | +#define PDE_INODE_NAME(inode) PDE_DATA(inode) | ||
| 25 | +#else | ||
| 26 | +#define PDE_INODE_NAME(inode) PDE(inode)->name | ||
| 27 | +#endif | ||
| 28 | + | ||
| 29 | struct db_seq { | ||
| 30 | const struct db_template *template; | ||
| 31 | struct list_head *list; | ||
| 32 | @@ -148,11 +154,11 @@ static int db_proc_open(struct inode *inode, struct file *file) | ||
| 33 | if (status != 0) | ||
| 34 | goto out_20; | ||
| 35 | |||
| 36 | - status = db_template_get(PDE(inode)->name, &p->template); | ||
| 37 | + status = db_template_get(PDE_INODE_NAME(inode), &p->template); | ||
| 38 | if (status != 0) | ||
| 39 | goto out_20; | ||
| 40 | |||
| 41 | - status = db_list_get(PDE(inode)->name, &p->list); | ||
| 42 | + status = db_list_get(PDE_INODE_NAME(inode), &p->list); | ||
| 43 | if (status != 0) | ||
| 44 | goto out_10; | ||
| 45 | |||
| 46 | @@ -161,7 +167,7 @@ static int db_proc_open(struct inode *inode, struct file *file) | ||
| 47 | return 0; | ||
| 48 | |||
| 49 | out_10: | ||
| 50 | - db_template_put(PDE(inode)->name, &p->template); | ||
| 51 | + db_template_put(PDE_INODE_NAME(inode), &p->template); | ||
| 52 | out_20: | ||
| 53 | kfree(p); | ||
| 54 | return status; | ||
| 55 | @@ -217,11 +223,11 @@ static int db_proc_release(struct inode *inode, struct file *file) | ||
| 56 | s = file->private_data; | ||
| 57 | p = s->private; | ||
| 58 | |||
| 59 | - status = db_list_put(PDE(inode)->name, &p->list); | ||
| 60 | + status = db_list_put(PDE_INODE_NAME(inode), &p->list); | ||
| 61 | if (status != 0) | ||
| 62 | return status; | ||
| 63 | |||
| 64 | - status = db_template_put(PDE(inode)->name, &p->template); | ||
| 65 | + status = db_template_put(PDE_INODE_NAME(inode), &p->template); | ||
| 66 | if (status != 0) | ||
| 67 | return status; | ||
| 68 | |||
| 69 | @@ -258,14 +264,21 @@ int db_proc_add(const char *name) | ||
| 70 | { | ||
| 71 | struct proc_dir_entry *pde; | ||
| 72 | |||
| 73 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) | ||
| 74 | + pde = proc_create_data(name, 0777, db_proc_root, | ||
| 75 | + &db_proc_file_ops, (void *)name); | ||
| 76 | +#else | ||
| 77 | pde = create_proc_entry(name, 0777, db_proc_root); | ||
| 78 | +#endif | ||
| 79 | if (pde == NULL) | ||
| 80 | return -EINVAL; | ||
| 81 | |||
| 82 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) | ||
| 83 | pde->owner = THIS_MODULE; | ||
| 84 | #endif | ||
| 85 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) | ||
| 86 | pde->proc_fops = &db_proc_file_ops; | ||
| 87 | +#endif | ||
| 88 | return 0; | ||
| 89 | } | ||
| 90 | EXPORT_SYMBOL(db_proc_add); | ||
| 91 | diff --git a/ecm/ecm_conn.c b/ecm/ecm_conn.c | ||
| 92 | index aaf5161..b81abd1 100644 | ||
| 93 | --- a/ecm/ecm_conn.c | ||
| 94 | +++ b/ecm/ecm_conn.c | ||
| 95 | @@ -905,8 +905,9 @@ static void free_ecm_connection(struct RlnhLinkObj *co) | ||
| 96 | { | ||
| 97 | /* Undo alloc_ecm_connection(). */ | ||
| 98 | if (co != NULL) { | ||
| 99 | - if (list_empty(&co->ecm_dev->conn_list)) | ||
| 100 | - dev_remove_pack(&co->ecm_dev->pt); | ||
| 101 | + if (co->ecm_dev != NULL) | ||
| 102 | + if (list_empty(&co->ecm_dev->conn_list)) | ||
| 103 | + dev_remove_pack(&co->ecm_dev->pt); | ||
| 104 | if (co->con_name != NULL) | ||
| 105 | kfree(co->con_name); | ||
| 106 | if (co->dev_name != NULL) | ||
| 107 | @@ -1315,7 +1316,11 @@ static int net_event(struct notifier_block *nb, unsigned long event, void *data) | ||
| 108 | struct ecm_work_net_event *p; | ||
| 109 | |||
| 110 | (void)nb; | ||
| 111 | - dev = data; | ||
| 112 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) | ||
| 113 | + dev = netdev_notifier_info_to_dev(data); | ||
| 114 | +#else | ||
| 115 | + dev = data; | ||
| 116 | +#endif | ||
| 117 | |||
| 118 | w = alloc_ecm_work(sizeof(*p), ECM_WORK_NET_EVENT, GFP_KERNEL); | ||
| 119 | if (w == NULL) | ||
| 120 | diff --git a/ipc/hunt.c b/ipc/hunt.c | ||
| 121 | index 843a893..f4564eb 100644 | ||
| 122 | --- a/ipc/hunt.c | ||
| 123 | +++ b/ipc/hunt.c | ||
| 124 | @@ -743,7 +743,9 @@ static inline struct sock *__locate_name(const char *name, | ||
| 125 | unsigned hash, uint32_t hunter_spid) | ||
| 126 | { | ||
| 127 | struct sock *s, *s_found = NULL; | ||
| 128 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) | ||
| 129 | struct hlist_node *node; | ||
| 130 | +#endif | ||
| 131 | |||
| 132 | linx_trace_enter(LINX_TRACEGROUP_IPC, | ||
| 133 | "%s, %d, 0x%x, 0x%x", name, len, hash, hunter_spid); | ||
| 134 | @@ -753,7 +755,11 @@ static inline struct sock *__locate_name(const char *name, | ||
| 135 | |||
| 136 | /* Traverse the list of sockets in the specified hash slot to find a | ||
| 137 | match. */ | ||
| 138 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | ||
| 139 | + sk_for_each(s, &linx_sockets_bound[hash]) { | ||
| 140 | +#else | ||
| 141 | sk_for_each(s, node, &linx_sockets_bound[hash]) { | ||
| 142 | +#endif | ||
| 143 | linx_check_sock(s); | ||
| 144 | |||
| 145 | /* If the length of the aname are the same, potential match was found. */ | ||
| 146 | @@ -1122,7 +1128,9 @@ int linx_info_sockets(struct linx_info_sockets *isockets, | ||
| 147 | LINX_SPID __user * spids) | ||
| 148 | { | ||
| 149 | struct sock *sk; | ||
| 150 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) | ||
| 151 | const struct hlist_node *node; | ||
| 152 | +#endif | ||
| 153 | int i, tot_sockets = 0, tot_sockets_tmp = 0, max_sockets; | ||
| 154 | |||
| 155 | LINX_ASSERT(isockets != NULL); | ||
| 156 | @@ -1131,7 +1139,11 @@ int linx_info_sockets(struct linx_info_sockets *isockets, | ||
| 157 | |||
| 158 | read_lock_bh(&linx_socket_bound_unbound_lock); | ||
| 159 | /* Count the number of sockets the needs to be returned. */ | ||
| 160 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | ||
| 161 | + sk_for_each(sk, &linx_sockets_unbound) { | ||
| 162 | +#else | ||
| 163 | sk_for_each(sk, node, &linx_sockets_unbound) { | ||
| 164 | +#endif | ||
| 165 | if (linx_sk(sk)->type == LINX_TYPE_REMOTE && isockets->remote) { | ||
| 166 | tot_sockets_tmp++; | ||
| 167 | } else if (linx_sk(sk)->type == LINX_TYPE_LOCAL && | ||
| 168 | @@ -1156,7 +1168,11 @@ int linx_info_sockets(struct linx_info_sockets *isockets, | ||
| 169 | |||
| 170 | tot_sockets_tmp = 0; | ||
| 171 | |||
| 172 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | ||
| 173 | + sk_for_each(sk, &linx_sockets_unbound) { | ||
| 174 | +#else | ||
| 175 | sk_for_each(sk, node, &linx_sockets_unbound) { | ||
| 176 | +#endif | ||
| 177 | LINX_SPID spid = linx_sock_to_spid(sk); | ||
| 178 | if (linx_sk(sk)->type == LINX_TYPE_REMOTE && | ||
| 179 | isockets->remote) { | ||
| 180 | @@ -1197,7 +1213,11 @@ int linx_info_sockets(struct linx_info_sockets *isockets, | ||
| 181 | for (i = 0; i < LINX_HASH_SIZE; i++) { | ||
| 182 | tot_sockets_tmp = 0; | ||
| 183 | read_lock_bh(&linx_socket_bound_unbound_lock); | ||
| 184 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | ||
| 185 | + sk_for_each(sk, &linx_sockets_bound[i]) { | ||
| 186 | +#else | ||
| 187 | sk_for_each(sk, node, &linx_sockets_bound[i]) { | ||
| 188 | +#endif | ||
| 189 | if (linx_sk(sk)->type == LINX_TYPE_REMOTE && | ||
| 190 | isockets->remote) { | ||
| 191 | tot_sockets_tmp++; | ||
| 192 | @@ -1222,7 +1242,11 @@ int linx_info_sockets(struct linx_info_sockets *isockets, | ||
| 193 | } | ||
| 194 | |||
| 195 | tot_sockets_tmp = 0; | ||
| 196 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | ||
| 197 | + sk_for_each(sk, &linx_sockets_bound[i]) { | ||
| 198 | +#else | ||
| 199 | sk_for_each(sk, node, &linx_sockets_bound[i]) { | ||
| 200 | +#endif | ||
| 201 | LINX_SPID spid = linx_sock_to_spid(sk); | ||
| 202 | if (linx_sk(sk)->type == LINX_TYPE_REMOTE && | ||
| 203 | isockets->remote) { | ||
| 204 | -- | ||
| 205 | 1.8.3.2 | ||
| 206 | |||
diff --git a/recipes-enea/linx/linx-mod_2.6.5.bb b/recipes-enea/linx/linx-mod_2.6.5.bb new file mode 100644 index 0000000..6cb1266 --- /dev/null +++ b/recipes-enea/linx/linx-mod_2.6.5.bb | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | SUMMARY = "LINX for Linux fast IPC" | ||
| 2 | DESCRIPTION = "LINX is a distributed communication protocol stack for transparent inter node and interprocess communication for a heterogeneous mix of systems." | ||
| 3 | HOMEPAGE = "http://linx.sourceforge.net/" | ||
| 4 | |||
| 5 | SECTION = "kernel/modules" | ||
| 6 | |||
| 7 | LICENSE = "GPLv2" | ||
| 8 | LIC_FILES_CHKSUM = "file://../../COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 9 | |||
| 10 | DEPENDS = "linux-libc-headers linx" | ||
| 11 | RRECOMMENDS_${PN} = "linx kmod" | ||
| 12 | |||
| 13 | SRC_URI = "http://linux.enea.com/linx/linx-${PV}.tar.gz \ | ||
| 14 | file://linx-kernel-modules.patch \ | ||
| 15 | file://support-for-3.11-kernel-versions.patch \ | ||
| 16 | " | ||
| 17 | SRC_URI[md5sum] = "986191fbceff8e15c03dedc5e544e42e" | ||
| 18 | SRC_URI[sha256sum] = "ee51c905115dbf6e25b5980006994a81732b1c0aac460f16a6f0582bc1114954" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/linx-${PV}/net/linx" | ||
| 21 | |||
| 22 | inherit module | ||
| 23 | |||
| 24 | module_do_compile_prepend () { | ||
| 25 | do_make_scripts | ||
| 26 | } | ||
diff --git a/recipes-enea/linx/linx.inc b/recipes-enea/linx/linx.inc new file mode 100644 index 0000000..513c020 --- /dev/null +++ b/recipes-enea/linx/linx.inc | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | SUMMARY = "LINX for Linux fast IPC" | ||
| 2 | DESCRIPTION = "LINX is a distributed communication protocol stack for transparent inter node and interprocess communication for a heterogeneous mix of systems." | ||
| 3 | HOMEPAGE = "http://linx.sourceforge.net/" | ||
| 4 | SECTION = "system/library" | ||
| 5 | |||
| 6 | DEPENDS = "linux-libc-headers virtual/libc" | ||
| 7 | RRECOMMENDS_${PN} = "linx-mod" | ||
| 8 | |||
| 9 | SRC_URI = "http://linux.enea.com/linx/linx-${PV}.tar.gz" | ||
| 10 | |||
| 11 | SRC_URI[md5sum] = "986191fbceff8e15c03dedc5e544e42e" | ||
| 12 | SRC_URI[sha256sum] = "ee51c905115dbf6e25b5980006994a81732b1c0aac460f16a6f0582bc1114954" | ||
| 13 | |||
| 14 | S = "${WORKDIR}/linx-${PV}" | ||
| 15 | |||
| 16 | inherit autotools | ||
| 17 | |||
| 18 | do_install_append () { | ||
| 19 | mkdir -p ${D}/etc | ||
| 20 | install -m 644 ${S}/linxgw/linxgws/example.conf ${D}/etc/linxgws.conf | ||
| 21 | } | ||
| 22 | |||
diff --git a/recipes-enea/linx/linx_2.6.5.bb b/recipes-enea/linx/linx_2.6.5.bb new file mode 100644 index 0000000..d188eb8 --- /dev/null +++ b/recipes-enea/linx/linx_2.6.5.bb | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | require linx.inc | ||
| 2 | LICENSE = "BSD" | ||
| 3 | |||
| 4 | PR = "r0" | ||
| 5 | |||
| 6 | SRC_URI += " file://liblinx_nobase.patch \ | ||
| 7 | file://linxcfg_nobase.patch " | ||
| 8 | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
