diff options
author | Fabio Berton <fabio.berton@ossystems.com.br> | 2018-06-11 15:54:36 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-06-26 14:16:13 -0300 |
commit | 8b0357fdb0f26bad796ab2560cdea57c3201b445 (patch) | |
tree | 5db24ac93bf5c9929c95edbe75c082ff96fa9263 /recipes-bsp/imx-test | |
parent | f62e49dd7966e5d4ea2a9fde536c6150797d0772 (diff) | |
download | meta-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')
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 | |||
5 | SUMMARY = "Test programs for IMX BSP" | ||
6 | DESCRIPTION = "Unit tests for the IMX BSP" | ||
7 | SECTION = "base" | ||
8 | |||
9 | DEPENDS_mx6q = "virtual/kernel imx-lib virtual/imxvpu" | ||
10 | DEPENDS_mx6dl = "virtual/kernel imx-lib virtual/imxvpu" | ||
11 | DEPENDS_mx6sl = "virtual/kernel imx-lib" | ||
12 | DEPENDS_mx6sll = "virtual/kernel imx-lib" | ||
13 | DEPENDS_mx6sx = "virtual/kernel imx-lib" | ||
14 | DEPENDS_mx6ul = "virtual/kernel imx-lib" | ||
15 | DEPENDS_mx7d = "virtual/kernel imx-lib" | ||
16 | DEPENDS_mx7ulp = "virtual/kernel imx-lib" | ||
17 | |||
18 | LICENSE = "GPLv2" | ||
19 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
20 | |||
21 | PE = "1" | ||
22 | |||
23 | inherit module-base | ||
24 | |||
25 | INHIBIT_PACKAGE_STRIP = "1" | ||
26 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
27 | |||
28 | PLATFORM_mx6q = "IMX6Q" | ||
29 | PLATFORM_mx6dl = "IMX6Q" | ||
30 | PLATFORM_mx6sl = "IMX6SL" | ||
31 | PLATFORM_mx6sll = "IMX6SL" | ||
32 | PLATFORM_mx6sx = "IMX6SX" | ||
33 | PLATFORM_mx6ul = "IMX6UL" | ||
34 | PLATFORM_mx7d = "IMX7D" | ||
35 | PLATFORM_mx7ulp = "IMX7D" | ||
36 | |||
37 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
38 | PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr" | ||
39 | |||
40 | do_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 | |||
59 | do_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 | |||
69 | FILES_${PN} += "/unit_tests" | ||
70 | RDEPENDS_${PN} = "bash" | ||
71 | |||
72 | FILES_${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 @@ | |||
1 | From 251612f51136568331d3cf3826bf08c3f70d7eee Mon Sep 17 00:00:00 2001 | ||
2 | From: Lauren Post <lauren.post@nxp.com> | ||
3 | Date: Wed, 24 Aug 2016 14:54:33 -0500 | ||
4 | Subject: [PATCH] imx-test: Fix Makefiles to handle library dependencies | ||
5 | |||
6 | Applications with library dependencies need different handling to pull in both | ||
7 | CFLAGS and LDFLAGS. Without these changes the library dependencies are not | ||
8 | linked in correctly causing build breaks. | ||
9 | |||
10 | Signed-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 | |||
19 | diff --git a/test/mxc_cec_test/Makefile b/test/mxc_cec_test/Makefile | ||
20 | index 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 : | ||
45 | diff --git a/test/mxc_i2c_slave_test/Makefile b/test/mxc_i2c_slave_test/Makefile | ||
46 | index 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 : | ||
69 | diff --git a/test/mxc_mpeg4_enc_test/Makefile b/test/mxc_mpeg4_enc_test/Makefile | ||
70 | index 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 | # | ||
107 | diff --git a/test/pxp_lib_test/Makefile b/test/pxp_lib_test/Makefile | ||
108 | index 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: | ||
135 | diff --git a/test/pxp_v4l2_test/Makefile b/test/pxp_v4l2_test/Makefile | ||
136 | index 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 | -- | ||
169 | 1.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 @@ | |||
1 | From d289d905c64882c58e3b99f74f68e72f9100115e Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
3 | Date: Tue, 12 Jun 2018 14:58:40 -0300 | ||
4 | Subject: [PATCH] test/Makefile: Add include path to CC command | ||
5 | Organization: O.S. Systems Software LTDA. | ||
6 | |||
7 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
8 | --- | ||
9 | test/Makefile | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/test/Makefile b/test/Makefile | ||
13 | index 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 | -- | ||
26 | 2.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 | ||
4 | include imx-test.inc | 5 | SUMMARY = "Test programs for IMX BSP" |
6 | DESCRIPTION = "Unit tests for the IMX BSP" | ||
7 | SECTION = "base" | ||
8 | LICENSE = "GPLv2" | ||
9 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
5 | 10 | ||
6 | PV = "6.0+${SRCPV}" | 11 | DEPENDS_mx6q = "virtual/kernel imx-lib virtual/imxvpu" |
12 | DEPENDS_mx6dl = "virtual/kernel imx-lib virtual/imxvpu" | ||
13 | DEPENDS_mx6sl = "virtual/kernel imx-lib" | ||
14 | DEPENDS_mx6sll = "virtual/kernel imx-lib" | ||
15 | DEPENDS_mx6sx = "virtual/kernel imx-lib" | ||
16 | DEPENDS_mx6ul = "virtual/kernel imx-lib" | ||
17 | DEPENDS_mx7d = "virtual/kernel imx-lib" | ||
18 | DEPENDS_mx7ulp = "virtual/kernel imx-lib" | ||
19 | DEPENDS_append = " alsa-lib" | ||
7 | 20 | ||
8 | PARALLEL_MAKE="-j 1" | 21 | PE = "1" |
22 | PV = "7.0+${SRCPV}" | ||
9 | 23 | ||
10 | SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga" | 24 | SRCBRANCH = "imx_4.9.88_2.0.0_ga" |
11 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH}" | 25 | SRCREV = "1f7da41b3a8d5dff8329d7b01b10d4d71144b43e" |
12 | SRCREV = "fb250a795ce0d25c19610e9e19e1cd815fc64cb9" | 26 | SRC_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 | ||
14 | S = "${WORKDIR}/git" | 31 | S = "${WORKDIR}/git" |
15 | 32 | ||
33 | |||
34 | inherit module-base | ||
35 | |||
36 | INHIBIT_PACKAGE_STRIP = "1" | ||
37 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
38 | |||
39 | PLATFORM_mx6q = "IMX6Q" | ||
40 | PLATFORM_mx6dl = "IMX6Q" | ||
41 | PLATFORM_mx6sl = "IMX6SL" | ||
42 | PLATFORM_mx6sll = "IMX6SL" | ||
43 | PLATFORM_mx6sx = "IMX6SX" | ||
44 | PLATFORM_mx6ul = "IMX6UL" | ||
45 | PLATFORM_mx7d = "IMX7D" | ||
46 | PLATFORM_mx7ulp = "IMX7D" | ||
47 | |||
48 | PARALLEL_MAKE="-j 1" | ||
49 | |||
50 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
51 | PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr" | ||
52 | |||
53 | do_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 | |||
72 | do_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 | |||
82 | FILES_${PN} += "/unit_tests" | ||
83 | RDEPENDS_${PN} = "bash" | ||
84 | |||
85 | FILES_${PN}-dbg += "/unit_tests/.debug" | ||
16 | COMPATIBLE_MACHINE = "(mx6|mx7)" | 86 | COMPATIBLE_MACHINE = "(mx6|mx7)" |