summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2014-02-19 22:11:23 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-02-23 23:17:42 +0100
commita7ee4f3b00870b4a7c7bd5caada6df00089973c8 (patch)
tree4107ccc414f51b869907b7d05a9af46a424a5046
parentffade38e6bd4018ef6c14fa10b3b46f8b77247e9 (diff)
downloadmeta-openembedded-a7ee4f3b00870b4a7c7bd5caada6df00089973c8.tar.gz
ltp-ddt: Fix build with newer kernels
Update to latest git kernel internal headers has got resuffled so adjust to that split modules out into packages of their own otherwise debug split logic gets confused when packaging the kernel modules Package debug info generated from newly added test cases Put .a files in staticdev package install modules in usual location Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-KERNEL_INC-in-modern-kernel-should-point-at-toplevel.patch40
-rw-r--r--meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch34
-rw-r--r--meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb22
3 files changed, 92 insertions, 4 deletions
diff --git a/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-KERNEL_INC-in-modern-kernel-should-point-at-toplevel.patch b/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-KERNEL_INC-in-modern-kernel-should-point-at-toplevel.patch
new file mode 100644
index 000000000..0b4ee6455
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-KERNEL_INC-in-modern-kernel-should-point-at-toplevel.patch
@@ -0,0 +1,40 @@
1From e0fc5bea466c16b9d754a8ac8d0453e396678a2c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Feb 2014 20:28:07 -0800
4Subject: [PATCH] KERNEL_INC in modern kernel should point at toplevel
5 kerneldir
6
7Reason is kernel headers are not only in toplevel
8include/ but also in toplevel arch/ dir
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 Makefile | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
14
15diff --git a/Makefile b/Makefile
16index 031d8bc..73e9b3c 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -245,15 +245,15 @@ endif
20
21 modules_edma:
22 @echo "Going to compile edma test kernel modules for $(PLATFORM)"
23- cd testcases/ddt/edma_test_suite/src/kernel; make CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_INC)/.. PLATFORM=$(PLATFORM)
24+ cd testcases/ddt/edma_test_suite/src/kernel; make CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_INC) PLATFORM=$(PLATFORM)
25
26 modules_gpio:
27 @echo "Going to compile gpio test kernel modules for $(PLATFORM)"
28- cd testcases/ddt/gpio_test_suite/src/kernel; make CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_INC)/.. PLATFORM=$(PLATFORM)
29+ cd testcases/ddt/gpio_test_suite/src/kernel; make CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_INC) PLATFORM=$(PLATFORM)
30
31 modules_ipc:
32 @echo "Going to compile IPC test kernel modules for $(PLATFORM)"
33- cd testcases/ddt/ipc_test_suite/src/kernel; make CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_INC)/.. PLATFORM=$(PLATFORM)
34+ cd testcases/ddt/ipc_test_suite/src/kernel; make CROSS_COMPILE=$(CROSS_COMPILE) KERNEL_DIR=$(KERNEL_INC) PLATFORM=$(PLATFORM)
35
36 modules: $(MODULES_TO_BUILD)
37
38--
391.9.0
40
diff --git a/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch b/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch
new file mode 100644
index 000000000..56b0333ca
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch
@@ -0,0 +1,34 @@
1From 4a8f24892514cd5e4d11b9105c843db49eea921b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Feb 2014 19:41:33 -0800
4Subject: [PATCH] wdt_test_suite: Make sure to include generated headers
5
6This makes sure that its using the generated headers
7and not the raw headers from kernel, generated headers
8are built for the given machine already when kernel is
9built and are available in configured/compiled kernel tree
10already
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 testcases/ddt/wdt_test_suite/Makefile | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/testcases/ddt/wdt_test_suite/Makefile b/testcases/ddt/wdt_test_suite/Makefile
18index 90a6a90..22a1cfd 100644
19--- a/testcases/ddt/wdt_test_suite/Makefile
20+++ b/testcases/ddt/wdt_test_suite/Makefile
21@@ -20,8 +20,8 @@ INCLUDES = -I $(KERNEL_INC) -I src/interface/common -I ../utils/user
22 INCLUDES = -I src/parser \
23 -I src/interface/common \
24 -I ../utils/user \
25- -I $(KERNEL_INC)/include \
26- -I $(KERNEL_INC)/arch/arm/include
27+ -I $(KERNEL_INC)/include/generated \
28+ -I $(KERNEL_INC)/arch/arm/include/generated \
29
30 #List of source files- Update this on adding a new C file
31 SOURCES := \
32--
331.9.0
34
diff --git a/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb b/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
index da8196440..8e170cabb 100644
--- a/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
+++ b/meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
@@ -8,14 +8,17 @@ PR = "r1"
8PROVIDES += "ltp" 8PROVIDES += "ltp"
9DEPENDS += "zip-native virtual/kernel alsa-lib" 9DEPENDS += "zip-native virtual/kernel alsa-lib"
10 10
11inherit autotools 11inherit autotools module-base kernel-module-split
12 12
13PACKAGE_ARCH = "${MACHINE_ARCH}" 13PACKAGE_ARCH = "${MACHINE_ARCH}"
14 14
15SRCREV = "46e8aa7d0dd095300709309301e1c79f0003df40" 15SRCREV = "4f77e2e33357d2b23211ecd22f27f521aa01469a"
16BRANCH ?= "master" 16BRANCH ?= "master"
17 17
18SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH}" 18SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH} \
19 file://0001-wdt_test_suite-Make-sure-to-include-generated-header.patch \
20 file://0001-KERNEL_INC-in-modern-kernel-should-point-at-toplevel.patch \
21 "
19 22
20S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
21 24
@@ -25,11 +28,12 @@ EXTRA_OEMAKE_append = " \
25 prefix=${LTPROOT} \ 28 prefix=${LTPROOT} \
26 CROSS_COMPILE=${HOST_PREFIX} \ 29 CROSS_COMPILE=${HOST_PREFIX} \
27 SKIP_IDCHECK=1 \ 30 SKIP_IDCHECK=1 \
28 KERNEL_INC=${STAGING_KERNEL_DIR}/include-generic \ 31 KERNEL_INC=${STAGING_KERNEL_DIR} \
29 KERNEL_USR_INC=${STAGING_INCDIR} \ 32 KERNEL_USR_INC=${STAGING_INCDIR} \
30 ALSA_INCPATH=${STAGING_INCDIR} \ 33 ALSA_INCPATH=${STAGING_INCDIR} \
31 ALSA_LIBPATH=${STAGING_LIBDIR} \ 34 ALSA_LIBPATH=${STAGING_LIBDIR} \
32 PLATFORM=${MACHINE} \ 35 PLATFORM=${MACHINE} \
36 RANLIB=${RANLIB} \
33" 37"
34 38
35TARGET_CC_ARCH += "${LDFLAGS}" 39TARGET_CC_ARCH += "${LDFLAGS}"
@@ -44,8 +48,10 @@ FILES_${PN}-dbg += " \
44 ${LTPROOT}/testcases/bin/ddt/.debug \ 48 ${LTPROOT}/testcases/bin/ddt/.debug \
45 ${LTPROOT}/testcases/bin/ddt/*/bin/.debug \ 49 ${LTPROOT}/testcases/bin/ddt/*/bin/.debug \
46 ${LTPROOT}/testcases/bin/ddt/*/test/.debug \ 50 ${LTPROOT}/testcases/bin/ddt/*/test/.debug \
51 ${LTPROOT}/testcases/realtime/*/*/.debug \
47" 52"
48 53
54FILES_${PN}-staticdev += "${LTPROOT}/lib"
49FILES_${PN} += "${LTPROOT}/*" 55FILES_${PN} += "${LTPROOT}/*"
50 56
51do_configure() { 57do_configure() {
@@ -55,9 +61,17 @@ do_configure() {
55 echo "${TAG}" > ${S}/ChangeLog 61 echo "${TAG}" > ${S}/ChangeLog
56} 62}
57 63
64kmoddir = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/ddt"
65
66do_compile_append () {
67 oe_runmake DESTDIR=${D} modules
68}
69
58do_install() { 70do_install() {
59 oe_runmake DESTDIR=${D} install 71 oe_runmake DESTDIR=${D} install
60 install -d ${D}${datadir} 72 install -d ${D}${datadir}
73 install -d ${D}${kmoddir}
61 cp -a ${D}${LTPROOT}/share/* ${D}${datadir} 74 cp -a ${D}${LTPROOT}/share/* ${D}${datadir}
62 rm -rf ${D}${LTPROOT}/share/ 75 rm -rf ${D}${LTPROOT}/share/
76 mv ${D}${LTPROOT}/testcases/bin/ddt/*.ko ${D}${kmoddir}
63} 77}