Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 0B1CCE00902; Tue, 20 Jan 2015 03:34:16 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.216.178 listed in list.dnswl.org] Received: from mail-qc0-f178.google.com (mail-qc0-f178.google.com [209.85.216.178]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 984DAE0083A for ; Tue, 20 Jan 2015 03:34:08 -0800 (PST) Received: by mail-qc0-f178.google.com with SMTP id b13so7766823qcw.9 for ; Tue, 20 Jan 2015 03:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:organization; bh=zqC5L555HFKeGiDNJfFZEGfEKe7IdnJr+Eju5NuCFRA=; b=fa1nexHlzPLujH/u79I+4FlQysxRTxXh8UU5S7GAIGy7lmwBVUsHuPYaChtsAZhW71 QK0cQB7y1pMt8rtQ0j563z5xGPs3dCxuqZb/Fbhn3BSrlVvs0Vd3uyZeXFuCb/++LTZb pqvBRuWMc/Jzyk1ZScG1wWvvqhSo64h8om9dVSnDOOfC1NO9BkVM7AavTtykJ7Dq1W8u qU5r6xh8bRHwUVQbUFa7ZMAHevftm7fmZAaXL5AakS0eBdZPI0fm3l/3KTmCwQUcaPHB 8TTkE1aOX9G3JAshSDLgVTwX0Qcp1gli+nGNpGU8u+H/VubwAH6FRczKN9+FnzdD21Sx b0og== X-Received: by 10.229.172.196 with SMTP id m4mr10781078qcz.19.1421753647872; Tue, 20 Jan 2015 03:34:07 -0800 (PST) Received: from nano.lab.ossystems.com.br ([177.100.225.47]) by mx.google.com with ESMTPSA id d62sm2007717qga.15.2015.01.20.03.34.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 03:34:06 -0800 (PST) Sender: Otavio Salvador Received: by nano.lab.ossystems.com.br (Postfix, from userid 1000) id E74681CAA8CB3; Tue, 20 Jan 2015 09:34:02 -0200 (BRST) From: Otavio Salvador To: meta-freescale Mailing List Date: Tue, 20 Jan 2015 09:33:51 -0200 Message-Id: <1421753634-13601-1-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 2.1.4 Organization: O.S. Systems Software LTDA. Cc: Otavio Salvador Subject: [PATCH 1/4] imx-test: Rework recipe style X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 11:34:16 -0000 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 --- recipes-bsp/imx-test/imx-test.inc | 49 +++++++++++++++++++++------------------ 1 file 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 @@ +# Copyright (C) 2012-2015 O.S. Systems Software LTDA. + SUMMARY = "Test programs for IMX BSP" DESCRIPTION = "Unit tests for the IMX BSP" SECTION = "base" @@ -13,12 +15,6 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=80 PE = "1" -PLATFORM_mx6 = "IMX6Q" -PLATFORM_mx6sl = "IMX6SL" -PLATFORM_mx6sx = "IMX6SX" -PLATFORM_mx53 = "IMX53" -PLATFORM_mx51 = "IMX51" - SRC_URI = "${FSL_MIRROR}/imx-test-${PV}.tar.gz" inherit module-base @@ -26,13 +22,11 @@ inherit module-base INHIBIT_PACKAGE_STRIP = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INCLUDE_DIR="-I${STAGING_INCDIR} \ - -I${S}/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" +PLATFORM_mx6 = "IMX6Q" +PLATFORM_mx6sl = "IMX6SL" +PLATFORM_mx6sx = "IMX6SX" +PLATFORM_mx53 = "IMX53" +PLATFORM_mx51 = "IMX51" # Required so the fixdep binary is generated addtask make_scripts after do_patch before do_compile @@ -41,18 +35,29 @@ 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}" + unset LDFLAGS + oe_runmake V=1 VERBOSE='' \ + CROSS_COMPILE=${TARGET_PREFIX} \ + INC="-I${STAGING_INCDIR} \ + -I${S}/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_DIR} \ + PLATFORM=${PLATFORM} } do_install() { - install -d ${D}/unit_tests - install -m 755 test-utils.sh ${D}/unit_tests/test-utils.sh - install -m 755 ${S}/platform/${PLATFORM}/* ${D}/unit_tests/ - if [ -e ${WORKDIR}/clocks.sh ]; then - install -m 755 ${WORKDIR}/clocks.sh ${D}/unit_tests/clocks.sh - fi + 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" -- 2.1.4