From 95a9bd749b4159e1e52a832e588253e66f96725f Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 13 Jan 2015 17:22:54 +0800 Subject: [PATCH] qe-ucode: install if QE_UCODE defined * QE_UCODE definition is moved to .conf * add check if QE_UCODE defined in anonymous python function * install the binary into /boot Signed-off-by: Ting Liu --- .../recipes-bsp/qe-ucode/qe-ucode_git.bb | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb b/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb index 06a7298c..028d9bcd 100644 --- a/meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb +++ b/meta-fsl-ppc/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,18 @@ 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)" +COMPATIBLE_MACHINE = "(p1021rdb|p1025twr|t1)" -- 2.40.1