]> code.ossystems Code Review - meta-freescale.git/commitdiff
qe-ucode: install if QE_UCODE defined
authorTing Liu <ting.liu@freescale.com>
Tue, 13 Jan 2015 09:22:54 +0000 (17:22 +0800)
committerZhenhua Luo <zhenhua.luo@freescale.com>
Tue, 13 Jan 2015 09:44:54 +0000 (17:44 +0800)
* QE_UCODE definition is moved to <machine>.conf
* add check if QE_UCODE defined in anonymous python function
* install the binary into /boot

Signed-off-by: Ting Liu <ting.liu@freescale.com>
meta-fsl-ppc/recipes-bsp/qe-ucode/qe-ucode_git.bb

index 06a7298cc1a71fbe15dccbd51f77437645f89486..028d9bcd032ca10ec97de683111e91496e909307 100644 (file)
@@ -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)"