summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-test
diff options
context:
space:
mode:
authorFabio Berton <fabio.berton@ossystems.com.br>2018-06-11 15:54:36 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2018-06-26 14:16:13 -0300
commit8b0357fdb0f26bad796ab2560cdea57c3201b445 (patch)
tree5db24ac93bf5c9929c95edbe75c082ff96fa9263 /recipes-bsp/imx-test
parentf62e49dd7966e5d4ea2a9fde536c6150797d0772 (diff)
downloadmeta-freescale-8b0357fdb0f26bad796ab2560cdea57c3201b445.tar.gz
imx-test: Update to version 7.0
- Remove .inc file to use only one .bb file - Add alsa-lib to DEPENDS - Add patch to use include path when compile sources from test directory - Drop unused patch - Update O.S. Systems Software Copyright Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Diffstat (limited to 'recipes-bsp/imx-test')
-rw-r--r--recipes-bsp/imx-test/imx-test.inc72
-rw-r--r--recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch170
-rw-r--r--recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch27
-rw-r--r--recipes-bsp/imx-test/imx-test_git.bb84
4 files changed, 104 insertions, 249 deletions
diff --git a/recipes-bsp/imx-test/imx-test.inc b/recipes-bsp/imx-test/imx-test.inc
deleted file mode 100644
index 36068892..00000000
--- a/recipes-bsp/imx-test/imx-test.inc
+++ /dev/null
@@ -1,72 +0,0 @@
1# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
2# Copyright (C) 2015 Freescale Semiconductor
3# Copyright 2017 NXP
4
5SUMMARY = "Test programs for IMX BSP"
6DESCRIPTION = "Unit tests for the IMX BSP"
7SECTION = "base"
8
9DEPENDS_mx6q = "virtual/kernel imx-lib virtual/imxvpu"
10DEPENDS_mx6dl = "virtual/kernel imx-lib virtual/imxvpu"
11DEPENDS_mx6sl = "virtual/kernel imx-lib"
12DEPENDS_mx6sll = "virtual/kernel imx-lib"
13DEPENDS_mx6sx = "virtual/kernel imx-lib"
14DEPENDS_mx6ul = "virtual/kernel imx-lib"
15DEPENDS_mx7d = "virtual/kernel imx-lib"
16DEPENDS_mx7ulp = "virtual/kernel imx-lib"
17
18LICENSE = "GPLv2"
19LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
20
21PE = "1"
22
23inherit module-base
24
25INHIBIT_PACKAGE_STRIP = "1"
26INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
27
28PLATFORM_mx6q = "IMX6Q"
29PLATFORM_mx6dl = "IMX6Q"
30PLATFORM_mx6sl = "IMX6SL"
31PLATFORM_mx6sll = "IMX6SL"
32PLATFORM_mx6sx = "IMX6SX"
33PLATFORM_mx6ul = "IMX6UL"
34PLATFORM_mx7d = "IMX7D"
35PLATFORM_mx7ulp = "IMX7D"
36
37PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
38PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
39
40do_compile() {
41 CFLAGS="${TOOLCHAIN_OPTIONS}"
42 oe_runmake V=1 VERBOSE='' \
43 CROSS_COMPILE=${TARGET_PREFIX} \
44 INC="-I${STAGING_INCDIR} \
45 -I${S}/include \
46 -I${STAGING_KERNEL_BUILDDIR}/include/uapi \
47 -I${STAGING_KERNEL_BUILDDIR}/include \
48 -I${STAGING_KERNEL_DIR}/include/uapi \
49 -I${STAGING_KERNEL_DIR}/include \
50 -I${STAGING_KERNEL_DIR}/arch/arm/include \
51 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
52 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include" \
53 CC="${CC} -L${STAGING_LIBDIR} ${LDFLAGS}" \
54 LINUXPATH=${STAGING_KERNEL_DIR} \
55 KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} \
56 PLATFORM=${PLATFORM}
57}
58
59do_install() {
60 oe_runmake DESTDIR=${D}/unit_tests \
61 PLATFORM=${PLATFORM} \
62 install
63
64 if [ -e ${WORKDIR}/clocks.sh ]; then
65 install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh
66 fi
67}
68
69FILES_${PN} += "/unit_tests"
70RDEPENDS_${PN} = "bash"
71
72FILES_${PN}-dbg += "/unit_tests/.debug"
diff --git a/recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch b/recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch
deleted file mode 100644
index 417e29c3..00000000
--- a/recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch
+++ /dev/null
@@ -1,170 +0,0 @@
1From 251612f51136568331d3cf3826bf08c3f70d7eee Mon Sep 17 00:00:00 2001
2From: Lauren Post <lauren.post@nxp.com>
3Date: Wed, 24 Aug 2016 14:54:33 -0500
4Subject: [PATCH] imx-test: Fix Makefiles to handle library dependencies
5
6Applications with library dependencies need different handling to pull in both
7CFLAGS and LDFLAGS. Without these changes the library dependencies are not
8linked in correctly causing build breaks.
9
10Signed-off-by: Lauren Post <lauren.post@nxp.com>
11---
12 test/mxc_cec_test/Makefile | 13 ++++++++++---
13 test/mxc_i2c_slave_test/Makefile | 12 ++++++++++--
14 test/mxc_mpeg4_enc_test/Makefile | 18 ++++++------------
15 test/pxp_lib_test/Makefile | 16 ++++++++++------
16 test/pxp_v4l2_test/Makefile | 19 ++++++++++++++++---
17 5 files changed, 52 insertions(+), 26 deletions(-)
18
19diff --git a/test/mxc_cec_test/Makefile b/test/mxc_cec_test/Makefile
20index 8327784..9d7ee9e 100755
21--- a/test/mxc_cec_test/Makefile
22+++ b/test/mxc_cec_test/Makefile
23@@ -2,11 +2,18 @@
24 # Makefile for MediaLB driver test app.
25 #
26 INC += -I$(LINUXPATH)/include
27-CFLAGS += -lpthread -lcec -lrt
28
29-OBJS = $(OBJDIR)/mxc_cec_test.out
30+TARGET = $(OBJDIR)/mxc_cec_test.out
31+OBJ = mxc_cec_test.o
32+
33+all : $(TARGET)
34+
35+LDFLAGS += -lpthread -lcec -lrt -lstdc++ -pthread
36+
37+$(TARGET):$(OBJ)
38+ $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os
39+ $(STRIP) $(TARGET)
40
41-all : $(OBJS)
42
43 .PHONY: clean
44 clean :
45diff --git a/test/mxc_i2c_slave_test/Makefile b/test/mxc_i2c_slave_test/Makefile
46index 07d0ff1..2b6b8ef 100644
47--- a/test/mxc_i2c_slave_test/Makefile
48+++ b/test/mxc_i2c_slave_test/Makefile
49@@ -2,9 +2,17 @@
50
51 CFLAGS += -lpthread
52
53-OBJS = $(OBJDIR)/mxc_i2c_slave_test.out
54+TARGET = $(OBJDIR)/mxc_i2c_slave_test.out
55
56-all : $(OBJS)
57+all : $(TARGET)
58+
59+LDFLAGS += -lpthread -lstdc++ -pthread
60+
61+OBJ = mxc_i2c_slave_test.o
62+
63+$(TARGET):$(OBJ)
64+ $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os
65+ $(STRIP) $(TARGET)
66
67 .PHONY: clean
68 clean :
69diff --git a/test/mxc_mpeg4_enc_test/Makefile b/test/mxc_mpeg4_enc_test/Makefile
70index 842ab58..1de4115 100644
71--- a/test/mxc_mpeg4_enc_test/Makefile
72+++ b/test/mxc_mpeg4_enc_test/Makefile
73@@ -6,27 +6,21 @@ CFLAGS += -I . -lpthread
74
75 EXES = $(OBJDIR)/cam2mpeg4.out
76 SCRIPTS = $(OBJDIR)/autorun-hantro.sh
77-ifeq "$(PLATFORM)" "MXC30030EVB"
78-LIBS = libmpeg4enc_cif.a
79-TEMP_EXE = $(OBJDIR)/cam2mpeg4_cif.out
80-OBJS = $(OBJDIR)/cam2mpeg4_cif.o
81-else
82 LIBS = libmpeg4enc_vga.a
83-TEMP_EXE = $(OBJDIR)/cam2mpeg4_vga.out
84-OBJS = $(OBJDIR)/cam2mpeg4_vga.o
85-endif
86+OBJS = cam2mpeg4_vga.o
87
88 all: $(EXES) $(SCRIPTS)
89
90-$(EXES): $(TEMP_EXE)
91- @mv $< $@
92+LDFLAGS += -lpthread
93+
94+$(EXES): $(OBJS)
95+ $(CC) -o $(EXES) $(OBJS) libmpeg4enc_vga.a $(LDFLAGS) -Os
96+ $(STRIP) $(EXES)
97
98 .PHONY: clean
99 clean:
100 rm -f $(EXES) $(OBJS) $(SCRIPTS)
101
102-$(TEMP_EXE): $(LIBS)
103-
104 #
105 # include the Rules
106 #
107diff --git a/test/pxp_lib_test/Makefile b/test/pxp_lib_test/Makefile
108index 978bea5..c73e4c2 100644
109--- a/test/pxp_lib_test/Makefile
110+++ b/test/pxp_lib_test/Makefile
111@@ -1,13 +1,16 @@
112 SRCS = pxp_test.c utils.c
113-CFLAGS += -lpxp -lpthread
114
115-OBJS = $(OBJDIR)/pxp_test.out \
116- $(OBJDIR)/autorun-pxp.sh
117-$(OBJS): $(SRCS)
118- mkdir -p $(OBJDIR)
119- $(VERBOSE) $(CC) -g $(INC) $(CFLAGS) $^ $(LIBS) -o $@
120+TARGET = $(OBJDIR)/pxp_test.out
121
122-all: $(OBJS)
123+all: $(TARGET)
124+
125+OBJ = pxp_test.o utils.o
126+
127+LDFLAGS += -pthread -lpxp -lstdc++ -pthread
128+
129+$(OBJDIR)/pxp_test.out: $(OBJ)
130+ $(CC) -o $(OBJDIR)/pxp_test.out $(OBJ) $(LDFLAGS) -Os
131+ $(STRIP) $(OBJDIR)/pxp_test.out
132
133 .PHONY: clean
134 clean:
135diff --git a/test/pxp_v4l2_test/Makefile b/test/pxp_v4l2_test/Makefile
136index 8f72e63..da83f8a 100644
137--- a/test/pxp_v4l2_test/Makefile
138+++ b/test/pxp_v4l2_test/Makefile
139@@ -1,12 +1,25 @@
140 # Just use the pxp library to get contiguous physical memory for USERPTR testing
141 # However, be aware that this is not the only way.
142-CFLAGS += -lpthread -lpxp -DGET_CONTI_PHY_MEM_VIA_PXP_LIB
143+CFLAGS += -DGET_CONTI_PHY_MEM_VIA_PXP_LIB
144
145-OBJS = $(OBJDIR)/pxp_v4l2_test.out \
146+TARGET = $(OBJDIR)/pxp_v4l2_test.out \
147 $(OBJDIR)/pxp_v4l2_out_test.sh \
148 $(OBJDIR)/mx6s_v4l2_capture.out
149
150-all : $(OBJS)
151+all : $(TARGET)
152+
153+LDFLAGS += -lpthread -lpxp -lstdc++ -pthread
154+
155+$(OBJDIR)/pxp_v4l2_test.out : pxp_v4l2_test.o
156+ $(CC) -o $(OBJDIR)/pxp_v4l2_test.out pxp_v4l2_test.o $(LDFLAGS) -Os
157+ $(STRIP) $(OBJDIR)/pxp_v4l2_test.out
158+
159+$(OBJDIR)/mx6s_v4l2_capture.out : mx6s_v4l2_capture.o
160+ $(CC) -o $(OBJDIR)/mx6s_v4l2_capture.out mx6s_v4l2_capture.o $(LDFLAGS) -Os
161+ $(STRIP) $(OBJDIR)/mx6s_v4l2_capture.out
162+
163+$(OBJDIR)/pxp_v4l2_out_test.sh: pxp_v4l2_out_test.sh
164+ cp pxp_v4l2_out_test.sh $(OBJDIR)
165
166 .PHONY: clean
167 clean :
168--
1691.9.1
170
diff --git a/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch b/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch
new file mode 100644
index 00000000..8387a17c
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch
@@ -0,0 +1,27 @@
1From d289d905c64882c58e3b99f74f68e72f9100115e Mon Sep 17 00:00:00 2001
2From: Fabio Berton <fabio.berton@ossystems.com.br>
3Date: Tue, 12 Jun 2018 14:58:40 -0300
4Subject: [PATCH] test/Makefile: Add include path to CC command
5Organization: O.S. Systems Software LTDA.
6
7Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
8---
9 test/Makefile | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/test/Makefile b/test/Makefile
13index f1cfa2a..4f14d2c 100644
14--- a/test/Makefile
15+++ b/test/Makefile
16@@ -12,7 +12,7 @@ ALL_OBJS :=
17
18 %.o: %.c
19 @echo " CC $@"
20- $(Q)$(CC) -c $(CFLAGS) $< -o $@
21+ $(Q)$(CC) -c $(CFLAGS) $(INC) $< -o $@
22
23
24 # This creates the build and copy rules for one executable. Because we
25--
262.17.1
27
diff --git a/recipes-bsp/imx-test/imx-test_git.bb b/recipes-bsp/imx-test/imx-test_git.bb
index ddc87a97..94765df4 100644
--- a/recipes-bsp/imx-test/imx-test_git.bb
+++ b/recipes-bsp/imx-test/imx-test_git.bb
@@ -1,16 +1,86 @@
1# Copyright (C) 2013-2016 Freescale Semiconductor 1# Copyright (C) 2012-2018 O.S. Systems Software LTDA.
2# Copyright (C) 2015 Freescale Semiconductor
2# Copyright 2017 NXP 3# Copyright 2017 NXP
3 4
4include imx-test.inc 5SUMMARY = "Test programs for IMX BSP"
6DESCRIPTION = "Unit tests for the IMX BSP"
7SECTION = "base"
8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
5 10
6PV = "6.0+${SRCPV}" 11DEPENDS_mx6q = "virtual/kernel imx-lib virtual/imxvpu"
12DEPENDS_mx6dl = "virtual/kernel imx-lib virtual/imxvpu"
13DEPENDS_mx6sl = "virtual/kernel imx-lib"
14DEPENDS_mx6sll = "virtual/kernel imx-lib"
15DEPENDS_mx6sx = "virtual/kernel imx-lib"
16DEPENDS_mx6ul = "virtual/kernel imx-lib"
17DEPENDS_mx7d = "virtual/kernel imx-lib"
18DEPENDS_mx7ulp = "virtual/kernel imx-lib"
19DEPENDS_append = " alsa-lib"
7 20
8PARALLEL_MAKE="-j 1" 21PE = "1"
22PV = "7.0+${SRCPV}"
9 23
10SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga" 24SRCBRANCH = "imx_4.9.88_2.0.0_ga"
11SRC_URI = "git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH}" 25SRCREV = "1f7da41b3a8d5dff8329d7b01b10d4d71144b43e"
12SRCREV = "fb250a795ce0d25c19610e9e19e1cd815fc64cb9" 26SRC_URI = " \
27 git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \
28 file://0001-test-Makefile-Add-include-path-to-CC-command.patch \
29"
13 30
14S = "${WORKDIR}/git" 31S = "${WORKDIR}/git"
15 32
33
34inherit module-base
35
36INHIBIT_PACKAGE_STRIP = "1"
37INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
38
39PLATFORM_mx6q = "IMX6Q"
40PLATFORM_mx6dl = "IMX6Q"
41PLATFORM_mx6sl = "IMX6SL"
42PLATFORM_mx6sll = "IMX6SL"
43PLATFORM_mx6sx = "IMX6SX"
44PLATFORM_mx6ul = "IMX6UL"
45PLATFORM_mx7d = "IMX7D"
46PLATFORM_mx7ulp = "IMX7D"
47
48PARALLEL_MAKE="-j 1"
49
50PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
51PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
52
53do_compile() {
54 CFLAGS="${TOOLCHAIN_OPTIONS}"
55 oe_runmake V=1 VERBOSE='' \
56 CROSS_COMPILE=${TARGET_PREFIX} \
57 INC="-I${STAGING_INCDIR} \
58 -I${S}/include \
59 -I${STAGING_KERNEL_BUILDDIR}/include/uapi \
60 -I${STAGING_KERNEL_BUILDDIR}/include \
61 -I${STAGING_KERNEL_DIR}/include/uapi \
62 -I${STAGING_KERNEL_DIR}/include \
63 -I${STAGING_KERNEL_DIR}/arch/arm/include \
64 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
65 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include" \
66 CC="${CC} -L${STAGING_LIBDIR} ${LDFLAGS}" \
67 LINUXPATH=${STAGING_KERNEL_DIR} \
68 KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} \
69 PLATFORM=${PLATFORM}
70}
71
72do_install() {
73 oe_runmake DESTDIR=${D}/unit_tests \
74 PLATFORM=${PLATFORM} \
75 install
76
77 if [ -e ${WORKDIR}/clocks.sh ]; then
78 install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh
79 fi
80}
81
82FILES_${PN} += "/unit_tests"
83RDEPENDS_${PN} = "bash"
84
85FILES_${PN}-dbg += "/unit_tests/.debug"
16COMPATIBLE_MACHINE = "(mx6|mx7)" 86COMPATIBLE_MACHINE = "(mx6|mx7)"