From: Fabio Berton <fabio.ber...@ossystems.com.br>

  - 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.ber...@ossystems.com.br>
Signed-off-by: Otavio Salvador <ota...@ossystems.com.br>
---

 recipes-bsp/imx-test/imx-test.inc             |  72 --------
 ...efiles-to-handle-library-dependencie.patch | 170 ------------------
 ...efile-Add-include-path-to-CC-command.patch |  27 +++
 recipes-bsp/imx-test/imx-test_git.bb          |  84 ++++++++-
 4 files changed, 104 insertions(+), 249 deletions(-)
 delete mode 100644 recipes-bsp/imx-test/imx-test.inc
 delete mode 100644 
recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch
 create mode 100644 
recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch

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 @@
-# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
-# Copyright (C) 2015 Freescale Semiconductor
-# Copyright 2017 NXP
-
-SUMMARY = "Test programs for IMX BSP"
-DESCRIPTION = "Unit tests for the IMX BSP"
-SECTION = "base"
-
-DEPENDS_mx6q  = "virtual/kernel imx-lib virtual/imxvpu"
-DEPENDS_mx6dl = "virtual/kernel imx-lib virtual/imxvpu"
-DEPENDS_mx6sl = "virtual/kernel imx-lib"
-DEPENDS_mx6sll = "virtual/kernel imx-lib"
-DEPENDS_mx6sx = "virtual/kernel imx-lib"
-DEPENDS_mx6ul = "virtual/kernel imx-lib"
-DEPENDS_mx7d  = "virtual/kernel imx-lib"
-DEPENDS_mx7ulp = "virtual/kernel imx-lib"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-
-PE = "1"
-
-inherit module-base
-
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-
-PLATFORM_mx6q  = "IMX6Q"
-PLATFORM_mx6dl = "IMX6Q"
-PLATFORM_mx6sl = "IMX6SL"
-PLATFORM_mx6sll = "IMX6SL"
-PLATFORM_mx6sx = "IMX6SX"
-PLATFORM_mx6ul = "IMX6UL"
-PLATFORM_mx7d  = "IMX7D"
-PLATFORM_mx7ulp  = "IMX7D"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', 
d)}"
-PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
-
-do_compile() {
-    CFLAGS="${TOOLCHAIN_OPTIONS}"
-    oe_runmake V=1 VERBOSE='' \
-               CROSS_COMPILE=${TARGET_PREFIX} \
-               INC="-I${STAGING_INCDIR} \
-                    -I${S}/include \
-                    -I${STAGING_KERNEL_BUILDDIR}/include/uapi \
-                    -I${STAGING_KERNEL_BUILDDIR}/include \
-                    -I${STAGING_KERNEL_DIR}/include/uapi \
-                    -I${STAGING_KERNEL_DIR}/include \
-                    -I${STAGING_KERNEL_DIR}/arch/arm/include \
-                    -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
-                    
-I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include" \
-               CC="${CC} -L${STAGING_LIBDIR} ${LDFLAGS}" \
-               LINUXPATH=${STAGING_KERNEL_DIR} \
-               KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} \
-               PLATFORM=${PLATFORM}
-}
-
-do_install() {
-    oe_runmake DESTDIR=${D}/unit_tests \
-               PLATFORM=${PLATFORM} \
-               install
-
-    if [ -e ${WORKDIR}/clocks.sh ]; then
-        install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh
-    fi
-}
-
-FILES_${PN} += "/unit_tests"
-RDEPENDS_${PN} = "bash"
-
-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 @@
-From 251612f51136568331d3cf3826bf08c3f70d7eee Mon Sep 17 00:00:00 2001
-From: Lauren Post <lauren.p...@nxp.com>
-Date: Wed, 24 Aug 2016 14:54:33 -0500
-Subject: [PATCH] imx-test:  Fix Makefiles to handle library dependencies
-
-Applications with library dependencies need different handling to pull in both
-CFLAGS and LDFLAGS. Without these changes the library dependencies are not
-linked in correctly causing build breaks.
-
-Signed-off-by: Lauren Post <lauren.p...@nxp.com>
----
- test/mxc_cec_test/Makefile       | 13 ++++++++++---
- test/mxc_i2c_slave_test/Makefile | 12 ++++++++++--
- test/mxc_mpeg4_enc_test/Makefile | 18 ++++++------------
- test/pxp_lib_test/Makefile       | 16 ++++++++++------
- test/pxp_v4l2_test/Makefile      | 19 ++++++++++++++++---
- 5 files changed, 52 insertions(+), 26 deletions(-)
-
-diff --git a/test/mxc_cec_test/Makefile b/test/mxc_cec_test/Makefile
-index 8327784..9d7ee9e 100755
---- a/test/mxc_cec_test/Makefile
-+++ b/test/mxc_cec_test/Makefile
-@@ -2,11 +2,18 @@
- # Makefile for MediaLB driver test app.
- #
- INC += -I$(LINUXPATH)/include
--CFLAGS += -lpthread -lcec -lrt
- 
--OBJS = $(OBJDIR)/mxc_cec_test.out
-+TARGET = $(OBJDIR)/mxc_cec_test.out
-+OBJ = mxc_cec_test.o
-+
-+all : $(TARGET)
-+
-+LDFLAGS += -lpthread -lcec -lrt -lstdc++ -pthread
-+
-+$(TARGET):$(OBJ)
-+      $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os
-+      $(STRIP) $(TARGET)
- 
--all : $(OBJS)
- 
- .PHONY: clean
- clean :
-diff --git a/test/mxc_i2c_slave_test/Makefile 
b/test/mxc_i2c_slave_test/Makefile
-index 07d0ff1..2b6b8ef 100644
---- a/test/mxc_i2c_slave_test/Makefile
-+++ b/test/mxc_i2c_slave_test/Makefile
-@@ -2,9 +2,17 @@
- 
- CFLAGS += -lpthread
- 
--OBJS = $(OBJDIR)/mxc_i2c_slave_test.out
-+TARGET = $(OBJDIR)/mxc_i2c_slave_test.out
- 
--all : $(OBJS)
-+all : $(TARGET)
-+
-+LDFLAGS += -lpthread -lstdc++ -pthread
-+
-+OBJ = mxc_i2c_slave_test.o
-+
-+$(TARGET):$(OBJ)
-+      $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os
-+      $(STRIP) $(TARGET)
- 
- .PHONY: clean
- clean :
-diff --git a/test/mxc_mpeg4_enc_test/Makefile 
b/test/mxc_mpeg4_enc_test/Makefile
-index 842ab58..1de4115 100644
---- a/test/mxc_mpeg4_enc_test/Makefile
-+++ b/test/mxc_mpeg4_enc_test/Makefile
-@@ -6,27 +6,21 @@ CFLAGS += -I . -lpthread
- 
- EXES = $(OBJDIR)/cam2mpeg4.out
- SCRIPTS = $(OBJDIR)/autorun-hantro.sh
--ifeq "$(PLATFORM)" "MXC30030EVB"
--LIBS = libmpeg4enc_cif.a
--TEMP_EXE = $(OBJDIR)/cam2mpeg4_cif.out
--OBJS = $(OBJDIR)/cam2mpeg4_cif.o
--else
- LIBS = libmpeg4enc_vga.a
--TEMP_EXE = $(OBJDIR)/cam2mpeg4_vga.out
--OBJS = $(OBJDIR)/cam2mpeg4_vga.o
--endif
-+OBJS = cam2mpeg4_vga.o
- 
- all: $(EXES) $(SCRIPTS)
- 
--$(EXES): $(TEMP_EXE)
--      @mv $< $@
-+LDFLAGS += -lpthread
-+
-+$(EXES): $(OBJS)
-+      $(CC) -o $(EXES) $(OBJS) libmpeg4enc_vga.a $(LDFLAGS) -Os
-+      $(STRIP) $(EXES)
- 
- .PHONY: clean
- clean:
-       rm -f $(EXES) $(OBJS) $(SCRIPTS)
- 
--$(TEMP_EXE): $(LIBS)
--
- #
- # include the Rules
- #
-diff --git a/test/pxp_lib_test/Makefile b/test/pxp_lib_test/Makefile
-index 978bea5..c73e4c2 100644
---- a/test/pxp_lib_test/Makefile
-+++ b/test/pxp_lib_test/Makefile
-@@ -1,13 +1,16 @@
- SRCS = pxp_test.c utils.c
--CFLAGS += -lpxp -lpthread
- 
--OBJS = $(OBJDIR)/pxp_test.out \
--      $(OBJDIR)/autorun-pxp.sh
--$(OBJS): $(SRCS)
--      mkdir -p $(OBJDIR)
--      $(VERBOSE) $(CC) -g $(INC) $(CFLAGS) $^ $(LIBS) -o $@
-+TARGET = $(OBJDIR)/pxp_test.out
- 
--all: $(OBJS)
-+all: $(TARGET)
-+
-+OBJ = pxp_test.o utils.o
-+
-+LDFLAGS += -pthread -lpxp -lstdc++ -pthread
-+
-+$(OBJDIR)/pxp_test.out: $(OBJ)
-+      $(CC) -o  $(OBJDIR)/pxp_test.out $(OBJ) $(LDFLAGS) -Os
-+      $(STRIP) $(OBJDIR)/pxp_test.out
- 
- .PHONY: clean
- clean:
-diff --git a/test/pxp_v4l2_test/Makefile b/test/pxp_v4l2_test/Makefile
-index 8f72e63..da83f8a 100644
---- a/test/pxp_v4l2_test/Makefile
-+++ b/test/pxp_v4l2_test/Makefile
-@@ -1,12 +1,25 @@
- # Just use the pxp library to get contiguous physical memory for USERPTR 
testing
- # However, be aware that this is not the only way.
--CFLAGS += -lpthread -lpxp -DGET_CONTI_PHY_MEM_VIA_PXP_LIB
-+CFLAGS += -DGET_CONTI_PHY_MEM_VIA_PXP_LIB
- 
--OBJS =        $(OBJDIR)/pxp_v4l2_test.out \
-+TARGET = $(OBJDIR)/pxp_v4l2_test.out \
-       $(OBJDIR)/pxp_v4l2_out_test.sh \
-       $(OBJDIR)/mx6s_v4l2_capture.out
- 
--all : $(OBJS)
-+all : $(TARGET)
-+
-+LDFLAGS += -lpthread -lpxp -lstdc++ -pthread
-+
-+$(OBJDIR)/pxp_v4l2_test.out : pxp_v4l2_test.o
-+      $(CC) -o $(OBJDIR)/pxp_v4l2_test.out pxp_v4l2_test.o $(LDFLAGS) -Os
-+      $(STRIP) $(OBJDIR)/pxp_v4l2_test.out
-+
-+$(OBJDIR)/mx6s_v4l2_capture.out : mx6s_v4l2_capture.o
-+      $(CC) -o $(OBJDIR)/mx6s_v4l2_capture.out mx6s_v4l2_capture.o $(LDFLAGS) 
-Os
-+      $(STRIP) $(OBJDIR)/mx6s_v4l2_capture.out
-+
-+$(OBJDIR)/pxp_v4l2_out_test.sh: pxp_v4l2_out_test.sh
-+      cp pxp_v4l2_out_test.sh $(OBJDIR)
- 
- .PHONY: clean
- clean :
--- 
-1.9.1
-
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 @@
+From d289d905c64882c58e3b99f74f68e72f9100115e Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.ber...@ossystems.com.br>
+Date: Tue, 12 Jun 2018 14:58:40 -0300
+Subject: [PATCH] test/Makefile: Add include path to CC command
+Organization: O.S. Systems Software LTDA.
+
+Signed-off-by: Fabio Berton <fabio.ber...@ossystems.com.br>
+---
+ test/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Makefile b/test/Makefile
+index f1cfa2a..4f14d2c 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -12,7 +12,7 @@ ALL_OBJS :=
+ 
+ %.o: %.c
+       @echo " CC      $@"
+-      $(Q)$(CC) -c $(CFLAGS) $< -o $@
++      $(Q)$(CC) -c $(CFLAGS) $(INC) $< -o $@
+ 
+ 
+ # This creates the build and copy rules for one executable. Because we
+-- 
+2.17.1
+
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 @@
-# Copyright (C) 2013-2016 Freescale Semiconductor
+# Copyright (C) 2012-2018 O.S. Systems Software LTDA.
+# Copyright (C) 2015 Freescale Semiconductor
 # Copyright 2017 NXP
 
-include imx-test.inc
+SUMMARY = "Test programs for IMX BSP"
+DESCRIPTION = "Unit tests for the IMX BSP"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-PV = "6.0+${SRCPV}"
+DEPENDS_mx6q  = "virtual/kernel imx-lib virtual/imxvpu"
+DEPENDS_mx6dl = "virtual/kernel imx-lib virtual/imxvpu"
+DEPENDS_mx6sl = "virtual/kernel imx-lib"
+DEPENDS_mx6sll = "virtual/kernel imx-lib"
+DEPENDS_mx6sx = "virtual/kernel imx-lib"
+DEPENDS_mx6ul = "virtual/kernel imx-lib"
+DEPENDS_mx7d  = "virtual/kernel imx-lib"
+DEPENDS_mx7ulp = "virtual/kernel imx-lib"
+DEPENDS_append = " alsa-lib"
 
-PARALLEL_MAKE="-j 1"
+PE = "1"
+PV = "7.0+${SRCPV}"
 
-SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga"
-SRC_URI = 
"git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "fb250a795ce0d25c19610e9e19e1cd815fc64cb9"
+SRCBRANCH = "imx_4.9.88_2.0.0_ga"
+SRCREV = "1f7da41b3a8d5dff8329d7b01b10d4d71144b43e"
+SRC_URI = " \
+    
git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH}
 \
+    file://0001-test-Makefile-Add-include-path-to-CC-command.patch \
+"
 
 S = "${WORKDIR}/git"
 
+
+inherit module-base
+
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+PLATFORM_mx6q  = "IMX6Q"
+PLATFORM_mx6dl = "IMX6Q"
+PLATFORM_mx6sl = "IMX6SL"
+PLATFORM_mx6sll = "IMX6SL"
+PLATFORM_mx6sx = "IMX6SX"
+PLATFORM_mx6ul = "IMX6UL"
+PLATFORM_mx7d  = "IMX7D"
+PLATFORM_mx7ulp  = "IMX7D"
+
+PARALLEL_MAKE="-j 1"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', 
d)}"
+PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
+
+do_compile() {
+    CFLAGS="${TOOLCHAIN_OPTIONS}"
+    oe_runmake V=1 VERBOSE='' \
+               CROSS_COMPILE=${TARGET_PREFIX} \
+               INC="-I${STAGING_INCDIR} \
+                    -I${S}/include \
+                    -I${STAGING_KERNEL_BUILDDIR}/include/uapi \
+                    -I${STAGING_KERNEL_BUILDDIR}/include \
+                    -I${STAGING_KERNEL_DIR}/include/uapi \
+                    -I${STAGING_KERNEL_DIR}/include \
+                    -I${STAGING_KERNEL_DIR}/arch/arm/include \
+                    -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
+                    
-I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include" \
+               CC="${CC} -L${STAGING_LIBDIR} ${LDFLAGS}" \
+               LINUXPATH=${STAGING_KERNEL_DIR} \
+               KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} \
+               PLATFORM=${PLATFORM}
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D}/unit_tests \
+               PLATFORM=${PLATFORM} \
+               install
+
+    if [ -e ${WORKDIR}/clocks.sh ]; then
+        install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh
+    fi
+}
+
+FILES_${PN} += "/unit_tests"
+RDEPENDS_${PN} = "bash"
+
+FILES_${PN}-dbg += "/unit_tests/.debug"
 COMPATIBLE_MACHINE = "(mx6|mx7)"
-- 
2.17.1

-- 
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to