[meta-freescale] [meta-fsl-ppc][PATCH v2 3/4] qe-ucode: install if QE_UCODE defined
ting.liu at freescale.com
ting.liu at freescale.com
Fri Jan 9 01:09:11 PST 2015
From: Ting Liu <ting.liu at freescale.com>
* add check if QE_UCODE defined in anonymous python function
* install the binary into /boot
* remove COMPATIBLE_MACHINE setting as the recipe will be skipped
if QE_UCODE not defined
Signed-off-by: Ting Liu <ting.liu at freescale.com>
---
recipes-bsp/qe-ucode/qe-ucode_git.bb | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/recipes-bsp/qe-ucode/qe-ucode_git.bb b/recipes-bsp/qe-ucode/qe-ucode_git.bb
index 06a7298..b897c91 100644
--- a/recipes-bsp/qe-ucode/qe-ucode_git.bb
+++ b/recipes-bsp/qe-ucode/qe-ucode_git.bb
@@ -3,6 +3,13 @@ SECTION = "qe-ucode"
LICENSE = "Freescale-EULA"
LIC_FILES_CHKSUM = "file://EULA;md5=60037ccba533a5995e8d1a838d85799c"
+python () {
+ if not d.getVar("QE_UCODE", True):
+ machine = d.getVar("MACHINE", True)
+ raise bb.parse.SkipPackage("QE_UCODE not set in \
+ meta-fsl-ppc/conf/machine/%s.conf" % machine)
+}
+
inherit deploy
SRC_URI = "git://git.freescale.com/ppc/sdk/qe-ucode.git;nobranch=1"
@@ -11,28 +18,17 @@ SRCREV= "49efc94b553de5c2a9bd28093592eff0068e161c"
S = "${WORKDIR}/git"
do_install () {
- case ${MACHINE} in
- p1025rdb|p1021rdb|p1025twr) QE_UCODE="fsl_qe_ucode_1021_10_A.bin";;
- t1040rdb|t1040rdb-64b) QE_UCODE="iram_Type_A_T1040_r1.0.bin";;
- *) QE_UCODE="";;
- esac
- install -d ${D}/
- install -m 644 ${QE_UCODE} ${D}/
+ install -d ${D}/boot
+ install -m 644 ${QE_UCODE} ${D}/boot/
}
do_deploy () {
- case ${MACHINE} in
- p1025rdb|p1021rdb|p1025twr) QE_UCODE="fsl_qe_ucode_1021_10_A.bin";;
- t1040rdb|t1040rdb-64b) QE_UCODE="iram_Type_A_T1040_r1.0.bin";;
- *) QE_UCODE="";;
- esac
- install -d ${DEPLOYDIR}/
- install -m 644 ${QE_UCODE} ${DEPLOYDIR}/
+ install -d ${DEPLOYDIR}/boot
+ install -m 644 ${QE_UCODE} ${DEPLOYDIR}/boot/
}
addtask deploy before do_build after do_install
PACKAGES += "${PN}-image"
-FILES_${PN}-image += "/*"
+FILES_${PN}-image += "/boot/*"
ALLOW_EMPTY_${PN} = "1"
-COMPATIBLE_MACHINE = "(p1025rdb|p1021rdb|p1025twr|t1040rdb|t1040rdb-64b)"
--
1.9.1
More information about the meta-freescale
mailing list