diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2015-10-28 13:30:10 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2015-10-28 13:30:10 +0100 |
commit | 38929ed6a4630d2b8f3efa00616800b4012ea0d7 (patch) | |
tree | 22bd8dca4994cd3d73f7f959f57f0bc7137d04cf /recipes-enea | |
download | meta-nfv-access-common-38929ed6a4630d2b8f3efa00616800b4012ea0d7.tar.gz |
Initial commit
result of splitting up meta-enea
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-enea')
-rw-r--r-- | recipes-enea/count-ticks/count-ticks/run-ptest | 23 | ||||
-rw-r--r-- | recipes-enea/count-ticks/count-ticks_1.1.bb | 25 | ||||
-rw-r--r-- | recipes-enea/linx/linx-2.6.6/liblinx_free_buf.patch | 22 | ||||
-rw-r--r-- | recipes-enea/linx/linx-2.6.6/liblinx_nobase.patch | 29 | ||||
-rw-r--r-- | recipes-enea/linx/linx-2.6.6/linxcfg_nobase.patch | 38 | ||||
-rw-r--r-- | recipes-enea/linx/linx-mod-2.6.6/linx-kernel-modules.patch | 288 | ||||
-rw-r--r-- | recipes-enea/linx/linx-mod-2.6.6/support-for-3.11-kernel-versions.patch | 206 | ||||
-rw-r--r-- | recipes-enea/linx/linx-mod-2.6.6/support-for-3.12-kernels.patch | 24 | ||||
-rw-r--r-- | recipes-enea/linx/linx-mod-2.6.6/support-for-3.15-kernels.patch | 60 | ||||
-rw-r--r-- | recipes-enea/linx/linx-mod_2.6.6.bb | 34 | ||||
-rw-r--r-- | recipes-enea/linx/linx.inc | 23 | ||||
-rw-r--r-- | recipes-enea/linx/linx_2.6.6.bb | 6 | ||||
-rw-r--r-- | recipes-enea/list2mask/list2mask/run-ptest | 15 | ||||
-rw-r--r-- | recipes-enea/list2mask/list2mask_1.0.bb | 25 | ||||
-rw-r--r-- | recipes-enea/partrt/partrt/run-ptest | 9 | ||||
-rw-r--r-- | recipes-enea/partrt/partrt_1.1.bb | 30 |
16 files changed, 857 insertions, 0 deletions
diff --git a/recipes-enea/count-ticks/count-ticks/run-ptest b/recipes-enea/count-ticks/count-ticks/run-ptest new file mode 100644 index 0000000..b54364a --- /dev/null +++ b/recipes-enea/count-ticks/count-ticks/run-ptest | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/sh -eu | ||
2 | |||
3 | fail () { | ||
4 | printf "%s\n" "$*" | ||
5 | exit | ||
6 | } | ||
7 | |||
8 | count_ticks --cpu 0 --start || fail "Failed starting tick counting" | ||
9 | find /usr -name dummy 2>&1 > /dev/null | ||
10 | |||
11 | nr_ticks=$(count_ticks --batch --cpu 0 --end) | ||
12 | |||
13 | if [ $? -ne 0 ]; then | ||
14 | echo "FAIL: count_ticks failed execution" | ||
15 | exit | ||
16 | fi | ||
17 | |||
18 | if [ $nr_ticks == 0 ]; then | ||
19 | echo "FAIL: count_ticks didn't see any ticks" | ||
20 | exit | ||
21 | fi | ||
22 | |||
23 | echo "PASS: count_ticks" | ||
diff --git a/recipes-enea/count-ticks/count-ticks_1.1.bb b/recipes-enea/count-ticks/count-ticks_1.1.bb new file mode 100644 index 0000000..caa6ed7 --- /dev/null +++ b/recipes-enea/count-ticks/count-ticks_1.1.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Tick count tool" | ||
2 | DESCRIPTION = "Count number of kernel ticks during command execution." | ||
3 | SECTION = "utils" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | RDEPENDS_${PN} = "bash" | ||
10 | |||
11 | SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ | ||
12 | file://run-ptest \ | ||
13 | " | ||
14 | |||
15 | SRCREV = "0fa0a8e084fe68e77a1f0968f2fbfa993292ae9c" | ||
16 | |||
17 | inherit ptest | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | FILES_${PN} += "/bin/*" | ||
22 | |||
23 | do_install() { | ||
24 | install -D ${S}/install/bin/count_ticks ${D}/usr/bin/count_ticks | ||
25 | } | ||
diff --git a/recipes-enea/linx/linx-2.6.6/liblinx_free_buf.patch b/recipes-enea/linx/linx-2.6.6/liblinx_free_buf.patch new file mode 100644 index 0000000..42f3e99 --- /dev/null +++ b/recipes-enea/linx/linx-2.6.6/liblinx_free_buf.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Fixed buffer free problem when sending between threads in the same process. | ||
2 | |||
3 | Upstream-Status: Not Applicable | ||
4 | |||
5 | Signed-off-by: Huimin She <huimin.she@enea.com> | ||
6 | |||
7 | --- | ||
8 | diff -rup a/liblinx/linx.c b/liblinx/linx.c | ||
9 | --- a/liblinx/linx.c 2014-04-17 13:40:30.000000000 +0200 | ||
10 | +++ b/liblinx/linx.c 2014-07-24 14:22:30.264648751 +0200 | ||
11 | @@ -711,7 +711,10 @@ int linx_send(LINX * linx, union LINX_SI | ||
12 | if (ret == 0) { | ||
13 | sig_adm->sndrcv = sndrcv; | ||
14 | } | ||
15 | - adm_free_buf(linx, sig_adm); | ||
16 | + if (ret != 1) { | ||
17 | + /* Don't free signals sent back to itself, they are needed later! */ | ||
18 | + adm_free_buf(linx, sig_adm); | ||
19 | + } | ||
20 | out: | ||
21 | /* Take signal pointer from user. */ | ||
22 | *sig = LINX_NIL; | ||
diff --git a/recipes-enea/linx/linx-2.6.6/liblinx_nobase.patch b/recipes-enea/linx/linx-2.6.6/liblinx_nobase.patch new file mode 100644 index 0000000..05a4b7e --- /dev/null +++ b/recipes-enea/linx/linx-2.6.6/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.6/linxcfg_nobase.patch b/recipes-enea/linx/linx-2.6.6/linxcfg_nobase.patch new file mode 100644 index 0000000..af4b477 --- /dev/null +++ b/recipes-enea/linx/linx-2.6.6/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.6/linx-kernel-modules.patch b/recipes-enea/linx/linx-mod-2.6.6/linx-kernel-modules.patch new file mode 100644 index 0000000..f29019b --- /dev/null +++ b/recipes-enea/linx/linx-mod-2.6.6/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.6/support-for-3.11-kernel-versions.patch b/recipes-enea/linx/linx-mod-2.6.6/support-for-3.11-kernel-versions.patch new file mode 100644 index 0000000..d6f9106 --- /dev/null +++ b/recipes-enea/linx/linx-mod-2.6.6/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.6/support-for-3.12-kernels.patch b/recipes-enea/linx/linx-mod-2.6.6/support-for-3.12-kernels.patch new file mode 100644 index 0000000..60c69a8 --- /dev/null +++ b/recipes-enea/linx/linx-mod-2.6.6/support-for-3.12-kernels.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Fixed build errors for linx_mod with kernel 3.12.X. | ||
2 | |||
3 | For details, see [LXCR-3427]. | ||
4 | |||
5 | Upstream-Status: Not Applicable | ||
6 | |||
7 | Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com> | ||
8 | |||
9 | --- | ||
10 | --- a/af_linx.c 2014-04-02 10:19:44.000000000 +0300 | ||
11 | +++ b/af_linx.c 2014-07-23 17:40:01.629687646 +0300 | ||
12 | @@ -1034,8 +1034,11 @@ | ||
13 | failure: | ||
14 | *errcode = err; | ||
15 | return NULL; | ||
16 | -#else | ||
17 | +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0) | ||
18 | return sock_alloc_send_pskb(sk, 0, data_len, 0, errcode); | ||
19 | +#else | ||
20 | + /* max_page_order == 0 => no paged allocations */ | ||
21 | + return sock_alloc_send_pskb(sk, 0, data_len, 0, errcode, 0); | ||
22 | #endif | ||
23 | } | ||
24 | |||
diff --git a/recipes-enea/linx/linx-mod-2.6.6/support-for-3.15-kernels.patch b/recipes-enea/linx/linx-mod-2.6.6/support-for-3.15-kernels.patch new file mode 100644 index 0000000..80118a4 --- /dev/null +++ b/recipes-enea/linx/linx-mod-2.6.6/support-for-3.15-kernels.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | Fixed build errors for linx-mod with kernel >= 3.15.0 | ||
2 | |||
3 | Upstream-Status: Not Applicable | ||
4 | |||
5 | Signed-off-by: Huimin She <huimin.she@enea.com> | ||
6 | |||
7 | --- | ||
8 | diff -rup a/af_linx.c b/af_linx.c | ||
9 | --- a/af_linx.c 2014-07-25 16:22:23.295570583 +0200 | ||
10 | +++ b/af_linx.c 2014-07-25 16:22:23.299570583 +0200 | ||
11 | @@ -743,7 +743,11 @@ setup_receive_filter(struct sock *sk, st | ||
12 | /* This function is called to wake up a receiving socket when it is sleeping | ||
13 | * waiting for a new message in poll or select. | ||
14 | */ | ||
15 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) | ||
16 | static void linx_data_ready(struct sock *sk, int len) | ||
17 | +#else | ||
18 | +static void linx_data_ready(struct sock *sk) | ||
19 | +#endif | ||
20 | { | ||
21 | linx_check_sock(sk); | ||
22 | |||
23 | @@ -1401,7 +1405,11 @@ linx_do_legacy_sendmsg(struct sock *sk, | ||
24 | LINX_SOCK_STAT_QUEUE_SIGNAL(to, payload_size); | ||
25 | #endif | ||
26 | /* Wake up the receiver, if it sleeps and wait for the signal. */ | ||
27 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) | ||
28 | to->sk_data_ready(to, payload_size); | ||
29 | +#else | ||
30 | + to->sk_data_ready(to); | ||
31 | +#endif | ||
32 | |||
33 | return 0; | ||
34 | out: | ||
35 | @@ -1577,7 +1585,11 @@ linx_do_sendmsg(struct sock *sk, | ||
36 | LINX_SOCK_STAT_QUEUE_SIGNAL(to, payload_size); | ||
37 | #endif | ||
38 | /* Wake up the receiver, if it sleeps and wait for the signal. */ | ||
39 | - to->sk_data_ready(to, payload_size); | ||
40 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) | ||
41 | + to->sk_data_ready(to, payload_size); | ||
42 | +#else | ||
43 | + to->sk_data_ready(to); | ||
44 | +#endif | ||
45 | |||
46 | return 0; | ||
47 | out: | ||
48 | @@ -1636,7 +1648,11 @@ int __linx_do_sendmsg_skb_to_local_sk(st | ||
49 | LINX_SOCK_STAT_QUEUE_SIGNAL(to, payload_size); | ||
50 | #endif | ||
51 | /* Wake up the receiver, if it sleeps and waits for the signal. */ | ||
52 | - to->sk_data_ready(to, payload_size); | ||
53 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) | ||
54 | + to->sk_data_ready(to, payload_size); | ||
55 | +#else | ||
56 | + to->sk_data_ready(to); | ||
57 | +#endif | ||
58 | |||
59 | return 0; | ||
60 | } | ||
diff --git a/recipes-enea/linx/linx-mod_2.6.6.bb b/recipes-enea/linx/linx-mod_2.6.6.bb new file mode 100644 index 0000000..18adef9 --- /dev/null +++ b/recipes-enea/linx/linx-mod_2.6.6.bb | |||
@@ -0,0 +1,34 @@ | |||
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://support-for-3.12-kernels.patch \ | ||
15 | file://support-for-3.15-kernels.patch" | ||
16 | |||
17 | SRC_URI[md5sum] = "f6d7e103eee0807cacf73aa20cf95571" | ||
18 | SRC_URI[sha256sum] = "a8fa3fe221e883ecb6afaa001652c96080a474b95e8d37c3bcf3e0c2ae618799" | ||
19 | |||
20 | S = "${WORKDIR}/linx-${PV}/net/linx" | ||
21 | |||
22 | inherit module | ||
23 | |||
24 | module_do_compile_prepend () { | ||
25 | |||
26 | HAS_LOADABLE_MODULES=$(cat ${STAGING_KERNEL_DIR}/.config | grep "CONFIG_MODULES=y") | ||
27 | |||
28 | if [[ ${#HAS_LOADABLE_MODULES} -eq 0 ]] ; then | ||
29 | echo "The specified Linux kernel has no support for pluggable modules (CONFIG_MODULES=y). Enable it before baking this." | ||
30 | exit 1 | ||
31 | fi | ||
32 | |||
33 | do_make_scripts | ||
34 | } | ||
diff --git a/recipes-enea/linx/linx.inc b/recipes-enea/linx/linx.inc new file mode 100644 index 0000000..3160cfb --- /dev/null +++ b/recipes-enea/linx/linx.inc | |||
@@ -0,0 +1,23 @@ | |||
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 | file://liblinx_free_buf.patch" | ||
11 | |||
12 | SRC_URI[md5sum] = "f6d7e103eee0807cacf73aa20cf95571" | ||
13 | SRC_URI[sha256sum] = "a8fa3fe221e883ecb6afaa001652c96080a474b95e8d37c3bcf3e0c2ae618799" | ||
14 | |||
15 | S = "${WORKDIR}/linx-${PV}" | ||
16 | |||
17 | inherit autotools-brokensep | ||
18 | |||
19 | do_install_append () { | ||
20 | mkdir -p ${D}/etc | ||
21 | install -m 644 ${S}/linxgw/linxgws/example.conf ${D}/etc/linxgws.conf | ||
22 | } | ||
23 | |||
diff --git a/recipes-enea/linx/linx_2.6.6.bb b/recipes-enea/linx/linx_2.6.6.bb new file mode 100644 index 0000000..79f7ed7 --- /dev/null +++ b/recipes-enea/linx/linx_2.6.6.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require linx.inc | ||
2 | LICENSE = "BSD" | ||
3 | |||
4 | PR = "r0" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
diff --git a/recipes-enea/list2mask/list2mask/run-ptest b/recipes-enea/list2mask/list2mask/run-ptest new file mode 100644 index 0000000..9eb6c2f --- /dev/null +++ b/recipes-enea/list2mask/list2mask/run-ptest | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/bin/sh -eu | ||
2 | |||
3 | mask=$(list2mask --cpus 2-3,5,7-8) | ||
4 | |||
5 | if [ $? -ne 0 ]; then | ||
6 | echo "FAIL: list2mask failed to execute" | ||
7 | exit | ||
8 | fi | ||
9 | |||
10 | if [ "$mask" != "1ac" ]; then | ||
11 | echo "FAIL: list2mask returns mask '$mask', expected '1ac'" | ||
12 | exit | ||
13 | fi | ||
14 | |||
15 | echo "PASS: list2mask" | ||
diff --git a/recipes-enea/list2mask/list2mask_1.0.bb b/recipes-enea/list2mask/list2mask_1.0.bb new file mode 100644 index 0000000..d72bcda --- /dev/null +++ b/recipes-enea/list2mask/list2mask_1.0.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Translate CPU list to a CPU mask" | ||
2 | DESCRIPTION = "Translate CPU list given on command line to a hexadecimal CPU mask. Can use kernel boot parameters isolcpus or nohz_full as input as well as a list given on command line." | ||
3 | SECTION = "utils" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | RDEPENDS_${PN} = "bash" | ||
10 | |||
11 | SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ | ||
12 | file://run-ptest \ | ||
13 | " | ||
14 | |||
15 | SRCREV = "db6eff03d80c04803fb146939c504b500e16fe2f" | ||
16 | |||
17 | inherit ptest | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | FILES_${PN} += "/bin/*" | ||
22 | |||
23 | do_install() { | ||
24 | install -D ${S}/install/bin/${PN} ${D}/usr/bin/${PN} | ||
25 | } | ||
diff --git a/recipes-enea/partrt/partrt/run-ptest b/recipes-enea/partrt/partrt/run-ptest new file mode 100644 index 0000000..b84af18 --- /dev/null +++ b/recipes-enea/partrt/partrt/run-ptest | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ./test_partition.py target -v | ||
4 | |||
5 | if [ $? -eq 0 ]; then | ||
6 | echo "PASS: test_partition" | ||
7 | else | ||
8 | echo "FAIL: test_partition" | ||
9 | fi | ||
diff --git a/recipes-enea/partrt/partrt_1.1.bb b/recipes-enea/partrt/partrt_1.1.bb new file mode 100644 index 0000000..8113805 --- /dev/null +++ b/recipes-enea/partrt/partrt_1.1.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "CPU partitioning tool" | ||
2 | DESCRIPTION = "partrt is a tool for dividing a SMP Linux system into a real time domain and a non-real time domain." | ||
3 | SECTION = "utils" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b52bab7a403562f36be803f11489f1a4" | ||
6 | |||
7 | RDEPENDS_${PN} = "bash" | ||
8 | RDEPENDS_${PN}-ptest += "python" | ||
9 | |||
10 | SRC_URI = "git://github.com/OpenEneaLinux/rt-tools.git;branch=master \ | ||
11 | file://run-ptest \ | ||
12 | " | ||
13 | |||
14 | SRCREV = "cbe36a4946a2b3bb4927ca3b8ac800111ae9ce49" | ||
15 | |||
16 | inherit ptest | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | FILES_${PN} += "/bin/*" | ||
21 | |||
22 | do_install() { | ||
23 | install -d ${D}/usr/bin | ||
24 | install ${S}/install/bin/partrt ${D}/usr/bin | ||
25 | } | ||
26 | |||
27 | do_install_ptest() { | ||
28 | install ${S}/test/test_partition.py ${D}${PTEST_PATH} | ||
29 | sed -i s/target/${MACHINE}/ ${D}${PTEST_PATH}/run-ptest | ||
30 | } | ||