]> code.ossystems Code Review - meta-freescale.git/commitdiff
cst: Fix build for target recipe
authorKhem Raj <raj.khem@gmail.com>
Thu, 5 Sep 2019 19:33:10 +0000 (12:33 -0700)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 10 Sep 2019 17:19:35 +0000 (14:19 -0300)
gen_keys when cross-built can not execute on build host
so better to depend on native version and call out native gen_keys
binary

Fixes
TOPDIR/build/tmp/work/mips32r2-yoe-linux/cst/git-r0/temp/run.do_install.29171: line 111: ./gen_keys: cannot execute binary file: Exec format error
WARNING: TOPDIR/build/tmp/work/mips32r2-yoe-linux/cst/git-r0/temp/run.do_install.29171:1 exit 126 from './gen_keys 1024'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes-devtools/cst/cst_git.bb

index 17fc9b381b83d6a8df088f35abbac43b42b72754..a57db6c43f9df9df0f2c60fc4ef27fcda198d739 100644 (file)
@@ -4,9 +4,12 @@ LICENSE = "BSD"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=e959d5d617e33779d0e90ce1d9043eff"
 
-DEPENDS += "openssl"
+DEPENDS += "openssl cst-native"
 RDEPENDS_${PN} = "bash"
 
+GENKEYS ?= "${STAGING_BINDIR_NATIVE}/cst/gen_keys"
+GENKEYS_class-native = "./gen_keys"
+
 inherit kernel-arch
 
 # specify the non default keys pair for secure boot if needed
@@ -25,13 +28,13 @@ PARALLEL_MAKE = ""
 
 do_install () {
     oe_runmake install DESTDIR=${D} BIN_DEST_DIR=${bindir}
+
     if [ -n "${SECURE_PRI_KEY}" ]; then
        cp -f ${SECURE_PRI_KEY} ${D}/${bindir}/cst/srk.pri
        cp -f ${SECURE_PUB_KEY} ${D}/${bindir}/cst/srk.pub
     elif [ ! -f ${D}/${bindir}/cst/srk.pri -o ! ${D}/${bindir}/cst/srk.pub ]; then
-       cd ${D}/${bindir}/cst  && ./gen_keys 1024
+       cd ${D}/${bindir}/cst  && ${GENKEYS} 1024
     fi
-    
 }
 
 FILES_${PN}-dbg += "${bindir}/cst/.debug"