]> code.ossystems Code Review - openembedded-core.git/commitdiff
uboot-sign: rebuild u-boot.img with signed dtb
authorGeorge McCollister <george.mccollister@gmail.com>
Thu, 26 May 2016 17:27:56 +0000 (12:27 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 May 2016 08:30:33 +0000 (09:30 +0100)
u-boot-nodtb.img doesn't exist so if UBOOT_SUFFIX = "img" is used
u-boot.img must be rebuilt by running make with
EXT_DTB=${DEPLOYDIR}/${UBOOT_DTB_IMAGE} then the resulting .img file must
be install to the deploy directories.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/uboot-sign.bbclass

index 82cec9e3a6b93d37e6360c8e125cb8f6e662c77e..57d49039a9b2a2442ca0080f07e4b16251d7ea6a 100644 (file)
@@ -63,9 +63,13 @@ do_deploy_dtb () {
 do_concat_dtb () {
        # Concatenate U-Boot w/o DTB & DTB with public key
        # (cf. kernel-fitimage.bbclass for more details)
-       cd ${DEPLOYDIR}
        if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ]; then
-               if [ -e "${UBOOT_NODTB_IMAGE}" -a -e "${UBOOT_DTB_IMAGE}" ]; then
+               if [ "x${UBOOT_SUFFIX}" = "ximg" -a -e "${DEPLOYDIR}/${UBOOT_DTB_IMAGE}" ]; then
+                       oe_runmake EXT_DTB=${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
+                       install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+                       install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
+               elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "${DEPLOYDIR}/${UBOOT_DTB_IMAGE}" ]; then
+                       cd ${DEPLOYDIR}
                        cat ${UBOOT_NODTB_IMAGE} ${UBOOT_DTB_IMAGE} | tee ${B}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
                else
                        bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."