[meta-freescale] [meta-fsl-arm][PATCH 06/16] imx-test: Fix build breaks caused by toolchain updates

Lauren Post lauren.post at freescale.com
Wed Jan 21 06:44:36 PST 2015


Recent tool chain commits have broken imx-test builds.

This patch includes recent imx-test patches from Otavio
rebased on top of 3.10.53-1.1.0 release

Fix linking failures of test utilities
Parts of Rework recipe style (do_compile and do_install changes)
Include patch of makefiles (rebased on top of 3.10.53 makefile changes)

Signed-off-by: Lauren Post <lauren.post at freescale.com>
---
 recipes-bsp/imx-test/imx-test.inc                  |   21 +++++-
 ...ix-build-in-OpenEmbedded-Core-environment.patch |   69 ++++++++++++++++++++
 recipes-bsp/imx-test/imx-test_3.10.53-1.1.0.bb     |    2 +
 3 files changed, 89 insertions(+), 3 deletions(-)
 create mode 100644 recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch

diff --git a/recipes-bsp/imx-test/imx-test.inc b/recipes-bsp/imx-test/imx-test.inc
index ab567a7..8cf7d88 100644
--- a/recipes-bsp/imx-test/imx-test.inc
+++ b/recipes-bsp/imx-test/imx-test.inc
@@ -1,3 +1,5 @@
+# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
+
 SUMMARY = "Test programs for IMX BSP"
 DESCRIPTION = "Unit tests for the IMX BSP"
 SECTION = "base"
@@ -41,9 +43,22 @@ do_make_scripts[deptask] = "do_populate_sysroot"
 do_make_scripts[depends] += "virtual/kernel:do_install"
 
 do_compile() {
-        LDFLAGS="" make PLATFORM=${PLATFORM} LINUXPATH=${STAGING_KERNEL_DIR} \
-        KBUILD_OUTPUT=${STAGING_KERNEL_DIR} CROSS_COMPILE=${TARGET_PREFIX} V=1 \
-        INC="${INCLUDE_DIR}"
+    CFLAGS="${TOOLCHAIN_OPTIONS}"
+    LDFLAGS="${TOOLCHAIN_OPTIONS} -L${STAGING_LIBDIR}"
+    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" \
+               LINUXPATH=${STAGING_KERNEL_DIR} \
+               KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR} \
+               PLATFORM=${PLATFORM}
 }
 
 do_install() {
diff --git a/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch b/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch
new file mode 100644
index 0000000..c712753
--- /dev/null
+++ b/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch
@@ -0,0 +1,69 @@
+From fd826140db0f2a867ef588cccf2e5322cc77126a Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio at ossystems.com.br>
+Date: Mon, 19 Jan 2015 16:56:29 -0200
+Subject: [PATCH] Fix build in OpenEmbedded-Core environment
+Organization: O.S. Systems Software LTDA.
+
+Some of the unit-tests were not being built due to differences on how
+the build system behaves when running inside of the OE-Core. This
+fixes those minor issues and increases the number of tests available.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
+
+diff --git a/test/ar3k_bt/Makefile b/test/ar3k_bt/Makefile
+index 92e2901..75d3e78 100755
+--- a/test/ar3k_bt/Makefile
++++ b/test/ar3k_bt/Makefile
+@@ -21,7 +21,7 @@ all: $(OBJS)
+ CFLAGS +=  -lbluetooth
+ 
+ $(OBJDIR)/hciattach-ar3k.bin :
+-	$(CC)  ${INC} -Wall -lbluetooth -g hciattach_ath3k.c  hciattach.c  hciattach_qualcomm.c  hciattach_st.c  hciattach_tialt.c  hciattach_ti.c -o hciattach-ar3k.bin
++	$(CC)  ${INC} -Wall -lbluetooth -g hciattach_ath3k.c  hciattach.c  hciattach_qualcomm.c  hciattach_st.c  hciattach_tialt.c  hciattach_ti.c -o $(OBJDIR)/hciattach-ar3k.bin
+ 
+ clean:
+ 	rm -f *.o hciattach-ar3k.bin
+diff --git a/test/make.rules b/test/make.rules
+index 8982f36..7ff8b38 100755
+--- a/test/make.rules
++++ b/test/make.rules
+@@ -33,7 +33,7 @@ $(OBJDIR)/%.out : $(SRCDIR)/%.c
+ $(OBJDIR)/%.out : $(SRCDIR)/%.s
+ 	@mkdir -p `dirname $@`
+ 	@echo "     Building $@"
+-	$(VERBOSE)$(CC) -g $(INC) $(CFLAGS) -DASSEMBLER $< -o $@
++	$(VERBOSE)$(CC) -g $(INC) $(CFLAGS)-DASSEMBLER $< -o $@
+ 
+ $(OBJDIR)/%.out : $(SRCDIR)/%.S
+ 	@mkdir -p `dirname $@`
+diff --git a/test/memtool/Makefile b/test/memtool/Makefile
+index 7a72803..c3083a0 100644
+--- a/test/memtool/Makefile
++++ b/test/memtool/Makefile
+@@ -20,7 +20,7 @@ CFLAGS+= -Os
+ all : $(TARGET)
+ 
+ $(TARGET):$(OBJ)
+-	$(CC) -o $(TARGET) $(OBJ) -Os
++	$(LINK) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os
+ 	$(STRIP) $(TARGET)
+ 
+ .PHONY: clean
+diff --git a/test/mxc_vpu_test/Makefile b/test/mxc_vpu_test/Makefile
+index 6ab989c..985b311 100644
+--- a/test/mxc_vpu_test/Makefile
++++ b/test/mxc_vpu_test/Makefile
+@@ -23,7 +23,7 @@ endif
+ all: $(TARGET)
+ 
+ $(TARGET): $(OBJ)
+-	$(CC) -o $(TARGET) $(OBJ) ${LIBS} -lvpu -lipu -lrt -lpthread
++	$(LINK) -o $(TARGET) $(OBJ) ${LIBS} $(LDFLAGS) -lvpu -lipu -lrt -lpthread
+ 	mkdir -p $(OBJDIR)
+ 	mv $(TARGET) $(OBJDIR)
+ 	cp autorun-vpu.sh $(OBJDIR)
+-- 
+2.1.4
+
diff --git a/recipes-bsp/imx-test/imx-test_3.10.53-1.1.0.bb b/recipes-bsp/imx-test/imx-test_3.10.53-1.1.0.bb
index 5d4a679..e7b80b5 100644
--- a/recipes-bsp/imx-test/imx-test_3.10.53-1.1.0.bb
+++ b/recipes-bsp/imx-test/imx-test_3.10.53-1.1.0.bb
@@ -2,6 +2,8 @@
 
 include imx-test.inc
 
+SRC_URI += "file://Fix-build-in-OpenEmbedded-Core-environment.patch"
+
 SRC_URI_append_mx5 = " file://revert_epdc_hdr_change.patch \
                        file://clocks.sh"
 SRC_URI_append_mxs = " file://revert_epdc_hdr_change.patch \
-- 
1.7.9.5



More information about the meta-freescale mailing list