]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-test: Fix linking failures of test utilities
authorOtavio Salvador <otavio@ossystems.com.br>
Mon, 19 Jan 2015 19:24:14 +0000 (17:24 -0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Thu, 22 Jan 2015 16:03:14 +0000 (14:03 -0200)
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.

This increases the number of tests which build successfully.

The new built tests, when building for i.MX6Q are:

,----
| /unit_tests/hciattach-ar3k.bin
| /unit_tests/config_dec
| /unit_tests/akiyo.mp4
| /unit_tests/config_net
| /unit_tests/mxc_vpu_test.out
| /unit_tests/config_encdec
| /unit_tests/autorun-vpu.sh
| /unit_tests/memtool
| /unit_tests/config_enc
`----

When building for i.MX53 those are:

,----
| /unit_tests/hciattach-ar3k.bin
| /unit_tests/memtool
`----

And when building for i.MX28 those are:

,----
| /unit_tests/mxc_pf_test.out
| /unit_tests/mmdc2
| /unit_tests/key_slot_tests.sh
| /unit_tests/mxc_isl29023.out
| /unit_tests/partition_tests.sh
| /unit_tests/fail_mode_tests.sh
| /unit_tests/scc_test
| /unit_tests/scc2_setup.sh
| /unit_tests/autorun-scc2.sh
| /unit_tests/autorun-scc.sh
| /unit_tests/encrypt_decrypt_tests.sh
| /unit_tests/mxc_fb_test.out
| /unit_tests/memtool
| /unit_tests/scc2_test.out
| /unit_tests/autorun.sh
| /unit_tests/mxc_mlb_test.out
| /unit_tests/scc_setup.sh
| /unit_tests/test_subs.sh
| /unit_tests/all-suite.txt
`----

Change-Id: I58882adc22990d9ec53dc9ead034e85acd64375e
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-bsp/imx-test/imx-test.inc
meta-fsl-arm/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch [new file with mode: 0644]
meta-fsl-arm/recipes-bsp/imx-test/imx-test_3.10.31-1.1.0.bb

index 683249860d397dc67dcff1b02b43accf6aea587a..6e41f61900bfb73f2bf2afbd54d6104a6bdc680a 100644 (file)
@@ -35,7 +35,8 @@ do_make_scripts[deptask] = "do_populate_sysroot"
 do_make_scripts[depends] += "virtual/kernel:do_install"
 
 do_compile() {
-    unset LDFLAGS
+    CFLAGS="${TOOLCHAIN_OPTIONS}"
+    LDFLAGS="${TOOLCHAIN_OPTIONS} -L${STAGING_LIBDIR}"
     oe_runmake V=1 VERBOSE='' \
                CROSS_COMPILE=${TARGET_PREFIX} \
                INC="-I${STAGING_INCDIR} \
diff --git a/meta-fsl-arm/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch b/meta-fsl-arm/recipes-bsp/imx-test/imx-test/Fix-build-in-OpenEmbedded-Core-environment.patch
new file mode 100644 (file)
index 0000000..c5daa69
--- /dev/null
@@ -0,0 +1,69 @@
+From fd826140db0f2a867ef588cccf2e5322cc77126a Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@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@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)
+-      $(LINK) -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)
+-      $(LINK) -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
+
index 2d29eb75581b98c07cc8c30a205160edab7b928a..b5b5024feedece89134613bcc511b9c3c535440e 100644 (file)
@@ -3,8 +3,9 @@
 include imx-test.inc
 
 # FIXME: Drop 'beta' suffix for GA release
-SRC_URI = "${FSL_MIRROR}/${PN}-${PV}-beta.tar.gz"
-S="${WORKDIR}/${PN}-${PV}-beta"
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}-beta.tar.gz \
+           file://Fix-build-in-OpenEmbedded-Core-environment.patch"
+S = "${WORKDIR}/${PN}-${PV}-beta"
 
 SRC_URI_append_mx5 = " file://revert_epdc_hdr_change.patch \
                        file://clocks.sh"