diff options
Diffstat (limited to 'meta/classes/kernel-fitimage.bbclass')
-rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 548699e978..718162a861 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass | |||
@@ -35,7 +35,7 @@ python __anonymous () { | |||
35 | # the fitImage: | 35 | # the fitImage: |
36 | if d.getVar('UBOOT_SIGN_ENABLE') == "1": | 36 | if d.getVar('UBOOT_SIGN_ENABLE') == "1": |
37 | uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot' | 37 | uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot' |
38 | d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn) | 38 | d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_populate_sysroot' % uboot_pn) |
39 | } | 39 | } |
40 | 40 | ||
41 | # Options for the device tree compiler passed to mkimage '-D' feature: | 41 | # Options for the device tree compiler passed to mkimage '-D' feature: |
@@ -456,10 +456,17 @@ fitimage_assemble() { | |||
456 | # Step 7: Sign the image and add public key to U-Boot dtb | 456 | # Step 7: Sign the image and add public key to U-Boot dtb |
457 | # | 457 | # |
458 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then | 458 | if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then |
459 | add_key_to_u_boot="" | ||
460 | if [ -n "${UBOOT_DTB_BINARY}" ]; then | ||
461 | # The u-boot.dtb is a symlink to UBOOT_DTB_IMAGE, so we need copy | ||
462 | # both of them, and don't dereference the symlink. | ||
463 | cp -P ${STAGING_DATADIR}/u-boot*.dtb ${B} | ||
464 | add_key_to_u_boot="-K ${B}/${UBOOT_DTB_BINARY}" | ||
465 | fi | ||
459 | uboot-mkimage \ | 466 | uboot-mkimage \ |
460 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ | 467 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ |
461 | -F -k "${UBOOT_SIGN_KEYDIR}" \ | 468 | -F -k "${UBOOT_SIGN_KEYDIR}" \ |
462 | ${@'-K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}"' if len('${UBOOT_DTB_BINARY}') else ''} \ | 469 | $add_key_to_u_boot \ |
463 | -r arch/${ARCH}/boot/${2} | 470 | -r arch/${ARCH}/boot/${2} |
464 | fi | 471 | fi |
465 | } | 472 | } |
@@ -505,5 +512,11 @@ kernel_do_deploy_append() { | |||
505 | install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin | 512 | install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin |
506 | ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME} | 513 | ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME} |
507 | fi | 514 | fi |
515 | if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then | ||
516 | # UBOOT_DTB_IMAGE is a realfile, but we can't use | ||
517 | # ${UBOOT_DTB_IMAGE} since it contains ${PV} which is aimed | ||
518 | # for u-boot, but we are in kernel env now. | ||
519 | install -m 0644 ${B}/u-boot-${MACHINE}*.dtb ${DEPLOYDIR}/ | ||
520 | fi | ||
508 | fi | 521 | fi |
509 | } | 522 | } |