From 755319eed4fd490eea81ac6fa350c6dadf799f55 Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Mon, 26 Aug 2019 11:36:57 +0800 Subject: cst: specify the non default keys pair Signed-off-by: Chunrong Guo --- recipes-devtools/cst/cst_git.bb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'recipes-devtools') diff --git a/recipes-devtools/cst/cst_git.bb b/recipes-devtools/cst/cst_git.bb index dcac949c..17fc9b38 100644 --- a/recipes-devtools/cst/cst_git.bb +++ b/recipes-devtools/cst/cst_git.bb @@ -9,6 +9,10 @@ RDEPENDS_${PN} = "bash" inherit kernel-arch +# specify the non default keys pair for secure boot if needed +#SECURE_PRI_KEY = "/path/srk.pri" +#SECURE_PUB_KEY = "/path/srk.pub" + SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cst;nobranch=1 \ " SRCREV = "e04690ba2ca60f56eb126e01496ed0cacbd838d4" @@ -21,6 +25,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 + fi + } FILES_${PN}-dbg += "${bindir}/cst/.debug" -- cgit v1.2.3-54-g00ecf