summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2015-01-19 17:15:06 -0200
committerOtavio Salvador <otavio@ossystems.com.br>2015-01-22 14:03:14 -0200
commit0ed4d4fc48820912b30df6c59ff99960777d79ed (patch)
tree08e7635f6bd7fab759b17f92e1d4469d9305967c /recipes-bsp
parent8507a7eb0c4c64783cebe8e953381c95e2d2d92d (diff)
downloadmeta-fsl-arm-0ed4d4fc48820912b30df6c59ff99960777d79ed.tar.gz
imx-test: Rework recipe style
This rework the recipe to use an easier to read metadata style, basically: * use 4 spaces for do_compile and do_install tasks * rework inclusion of extra paths in do_compile * include missing copyright notice from O.S. Systems * move platform setting after source URI definition Change-Id: Ic902c04a0eb8c0230ae74ac835b6a202784ebb78 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/imx-test/imx-test.inc49
1 files changed, 27 insertions, 22 deletions
diff --git a/recipes-bsp/imx-test/imx-test.inc b/recipes-bsp/imx-test/imx-test.inc
index ab567a7..6832498 100644
--- a/recipes-bsp/imx-test/imx-test.inc
+++ b/recipes-bsp/imx-test/imx-test.inc
@@ -1,3 +1,5 @@
1# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
2
1SUMMARY = "Test programs for IMX BSP" 3SUMMARY = "Test programs for IMX BSP"
2DESCRIPTION = "Unit tests for the IMX BSP" 4DESCRIPTION = "Unit tests for the IMX BSP"
3SECTION = "base" 5SECTION = "base"
@@ -13,12 +15,6 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=80
13 15
14PE = "1" 16PE = "1"
15 17
16PLATFORM_mx6 = "IMX6Q"
17PLATFORM_mx6sl = "IMX6SL"
18PLATFORM_mx6sx = "IMX6SX"
19PLATFORM_mx53 = "IMX53"
20PLATFORM_mx51 = "IMX51"
21
22SRC_URI = "${FSL_MIRROR}/imx-test-${PV}.tar.gz" 18SRC_URI = "${FSL_MIRROR}/imx-test-${PV}.tar.gz"
23 19
24inherit module-base 20inherit module-base
@@ -26,13 +22,11 @@ inherit module-base
26INHIBIT_PACKAGE_STRIP = "1" 22INHIBIT_PACKAGE_STRIP = "1"
27INHIBIT_PACKAGE_DEBUG_SPLIT = "1" 23INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
28 24
29INCLUDE_DIR="-I${STAGING_INCDIR} \ 25PLATFORM_mx6 = "IMX6Q"
30 -I${S}/include \ 26PLATFORM_mx6sl = "IMX6SL"
31 -I${STAGING_KERNEL_DIR}/include/uapi \ 27PLATFORM_mx6sx = "IMX6SX"
32 -I${STAGING_KERNEL_DIR}/include \ 28PLATFORM_mx53 = "IMX53"
33 -I${STAGING_KERNEL_DIR}/arch/arm/include \ 29PLATFORM_mx51 = "IMX51"
34 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
35 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include"
36 30
37# Required so the fixdep binary is generated 31# Required so the fixdep binary is generated
38addtask make_scripts after do_patch before do_compile 32addtask make_scripts after do_patch before do_compile
@@ -41,18 +35,29 @@ do_make_scripts[deptask] = "do_populate_sysroot"
41do_make_scripts[depends] += "virtual/kernel:do_install" 35do_make_scripts[depends] += "virtual/kernel:do_install"
42 36
43do_compile() { 37do_compile() {
44 LDFLAGS="" make PLATFORM=${PLATFORM} LINUXPATH=${STAGING_KERNEL_DIR} \ 38 unset LDFLAGS
45 KBUILD_OUTPUT=${STAGING_KERNEL_DIR} CROSS_COMPILE=${TARGET_PREFIX} V=1 \ 39 oe_runmake V=1 VERBOSE='' \
46 INC="${INCLUDE_DIR}" 40 CROSS_COMPILE=${TARGET_PREFIX} \
41 INC="-I${STAGING_INCDIR} \
42 -I${S}/include \
43 -I${STAGING_KERNEL_DIR}/include/uapi \
44 -I${STAGING_KERNEL_DIR}/include \
45 -I${STAGING_KERNEL_DIR}/arch/arm/include \
46 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
47 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include" \
48 LINUXPATH=${STAGING_KERNEL_DIR} \
49 KBUILD_OUTPUT=${STAGING_KERNEL_DIR} \
50 PLATFORM=${PLATFORM}
47} 51}
48 52
49do_install() { 53do_install() {
50 install -d ${D}/unit_tests 54 oe_runmake DESTDIR=${D}/unit_tests \
51 install -m 755 test-utils.sh ${D}/unit_tests/test-utils.sh 55 PLATFORM=${PLATFORM} \
52 install -m 755 ${S}/platform/${PLATFORM}/* ${D}/unit_tests/ 56 install
53 if [ -e ${WORKDIR}/clocks.sh ]; then 57
54 install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh 58 if [ -e ${WORKDIR}/clocks.sh ]; then
55 fi 59 install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh
60 fi
56} 61}
57 62
58FILES_${PN} += "/unit_tests" 63FILES_${PN} += "/unit_tests"