diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2015-01-19 17:15:06 -0200 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2015-01-22 14:03:14 -0200 |
commit | 0ed4d4fc48820912b30df6c59ff99960777d79ed (patch) | |
tree | 08e7635f6bd7fab759b17f92e1d4469d9305967c /recipes-bsp/imx-test | |
parent | 8507a7eb0c4c64783cebe8e953381c95e2d2d92d (diff) | |
download | meta-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/imx-test')
-rw-r--r-- | recipes-bsp/imx-test/imx-test.inc | 49 |
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 | |||
1 | SUMMARY = "Test programs for IMX BSP" | 3 | SUMMARY = "Test programs for IMX BSP" |
2 | DESCRIPTION = "Unit tests for the IMX BSP" | 4 | DESCRIPTION = "Unit tests for the IMX BSP" |
3 | SECTION = "base" | 5 | SECTION = "base" |
@@ -13,12 +15,6 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=80 | |||
13 | 15 | ||
14 | PE = "1" | 16 | PE = "1" |
15 | 17 | ||
16 | PLATFORM_mx6 = "IMX6Q" | ||
17 | PLATFORM_mx6sl = "IMX6SL" | ||
18 | PLATFORM_mx6sx = "IMX6SX" | ||
19 | PLATFORM_mx53 = "IMX53" | ||
20 | PLATFORM_mx51 = "IMX51" | ||
21 | |||
22 | SRC_URI = "${FSL_MIRROR}/imx-test-${PV}.tar.gz" | 18 | SRC_URI = "${FSL_MIRROR}/imx-test-${PV}.tar.gz" |
23 | 19 | ||
24 | inherit module-base | 20 | inherit module-base |
@@ -26,13 +22,11 @@ inherit module-base | |||
26 | INHIBIT_PACKAGE_STRIP = "1" | 22 | INHIBIT_PACKAGE_STRIP = "1" |
27 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | 23 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
28 | 24 | ||
29 | INCLUDE_DIR="-I${STAGING_INCDIR} \ | 25 | PLATFORM_mx6 = "IMX6Q" |
30 | -I${S}/include \ | 26 | PLATFORM_mx6sl = "IMX6SL" |
31 | -I${STAGING_KERNEL_DIR}/include/uapi \ | 27 | PLATFORM_mx6sx = "IMX6SX" |
32 | -I${STAGING_KERNEL_DIR}/include \ | 28 | PLATFORM_mx53 = "IMX53" |
33 | -I${STAGING_KERNEL_DIR}/arch/arm/include \ | 29 | PLATFORM_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 |
38 | addtask make_scripts after do_patch before do_compile | 32 | addtask make_scripts after do_patch before do_compile |
@@ -41,18 +35,29 @@ do_make_scripts[deptask] = "do_populate_sysroot" | |||
41 | do_make_scripts[depends] += "virtual/kernel:do_install" | 35 | do_make_scripts[depends] += "virtual/kernel:do_install" |
42 | 36 | ||
43 | do_compile() { | 37 | do_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 | ||
49 | do_install() { | 53 | do_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 | ||
58 | FILES_${PN} += "/unit_tests" | 63 | FILES_${PN} += "/unit_tests" |