]> code.ossystems Code Review - meta-freescale.git/commitdiff
hv-cfg: use MACHINE specific variable
authorZhenhua Luo <zhenhua.luo@freescale.com>
Wed, 2 Sep 2015 09:10:46 +0000 (17:10 +0800)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 19 Apr 2016 18:03:18 +0000 (15:03 -0300)
* Use HV_CFG_M in hv-cfg bb file

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
recipes-virtualization/hv-cfg/hv-cfg_git.bb

index e4f18e079e74a713cc0716f88cfeb3d6f1d0df0c..0da5a40e564bd376852327130e01e622fa63b62d 100644 (file)
@@ -23,24 +23,22 @@ SRCREV = "b9287b07390d17bfba936a806a72b91b89507c22"
 
 S = "${WORKDIR}/git"
 
+python () {
+    if not d.getVar("HV_CFG_M", True):
+        raise bb.parse.SkipPackage("HV_CFG_M is not defined, please \
+check ${MACHINE}.conf file.")
+}
+
 do_install () {
        make install
 
-       M=`echo ${MACHINE} | sed s/-64b//g`
-       if [ "t1042d4rdb" = "${M}" ] || [ "t1040d4rdb" = "${M}" ];then
-               M=t1040rdb
-       fi
        install -d ${D}/boot/hv-cfg
-       cp -r ${S}/${M}/${M}/* ${D}/boot/hv-cfg
+       cp -r ${S}/${HV_CFG_M}/${HV_CFG_M}/* ${D}/boot/hv-cfg
 }
 
 do_deploy () {
-       M=`echo ${MACHINE} | sed s/-64b//g`
-       if [ "t1042d4rdb" = "${M}" ] || [ "t1040d4rdb" = "${M}" ];then
-               M=t1040rdb
-       fi
        install -d ${DEPLOYDIR}/hv-cfg
-       cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/hv-cfg
+       cp -r ${S}/${HV_CFG_M}/${HV_CFG_M}/* ${DEPLOYDIR}/hv-cfg
 }
 addtask deploy after do_install