diff options
author | Sean Anderson <sean.anderson@seco.com> | 2022-10-21 19:37:23 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-10-26 12:28:40 +0100 |
commit | 63b4efbbf4592113e8b6a7640b5048d9c21613f2 (patch) | |
tree | ebab5188b2f0c67d4e3cdf2e9e1b67ef59232ce0 /meta/classes-recipe/kernel-fitimage.bbclass | |
parent | 00ce3bb06f0b39916a5ba1707a0d932ede4a06a6 (diff) | |
download | poky-63b4efbbf4592113e8b6a7640b5048d9c21613f2.tar.gz |
kernel-fitimage: Use KERNEL_OUTPUT_DIR where appropriate
We have a specific variable for the path to the boot directory. Use it
instead of open-coding this path.
(From OE-Core rev: 725b75e83bc2b2111f2ab5103b7e7f60d6d3f34e)
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/kernel-fitimage.bbclass')
-rw-r--r-- | meta/classes-recipe/kernel-fitimage.bbclass | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 107914e28c..8ddebf8dd8 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass | |||
@@ -496,7 +496,7 @@ fitimage_assemble() { | |||
496 | ramdiskcount=$3 | 496 | ramdiskcount=$3 |
497 | setupcount="" | 497 | setupcount="" |
498 | bootscr_id="" | 498 | bootscr_id="" |
499 | rm -f $1 arch/${ARCH}/boot/$2 | 499 | rm -f $1 ${KERNEL_OUTPUT_DIR}/$2 |
500 | 500 | ||
501 | if [ -n "${UBOOT_SIGN_IMG_KEYNAME}" -a "${UBOOT_SIGN_KEYNAME}" = "${UBOOT_SIGN_IMG_KEYNAME}" ]; then | 501 | if [ -n "${UBOOT_SIGN_IMG_KEYNAME}" -a "${UBOOT_SIGN_KEYNAME}" = "${UBOOT_SIGN_IMG_KEYNAME}" ]; then |
502 | bbfatal "Keys used to sign images and configuration nodes must be different." | 502 | bbfatal "Keys used to sign images and configuration nodes must be different." |
@@ -529,9 +529,9 @@ fitimage_assemble() { | |||
529 | continue | 529 | continue |
530 | fi | 530 | fi |
531 | 531 | ||
532 | DTB_PATH="arch/${ARCH}/boot/dts/$DTB" | 532 | DTB_PATH="${KERNEL_OUTPUT_DIR}/dts/$DTB" |
533 | if [ ! -e "$DTB_PATH" ]; then | 533 | if [ ! -e "$DTB_PATH" ]; then |
534 | DTB_PATH="arch/${ARCH}/boot/$DTB" | 534 | DTB_PATH="${KERNEL_OUTPUT_DIR}/$DTB" |
535 | fi | 535 | fi |
536 | 536 | ||
537 | DTB=$(echo "$DTB" | tr '/' '_') | 537 | DTB=$(echo "$DTB" | tr '/' '_') |
@@ -574,9 +574,9 @@ fitimage_assemble() { | |||
574 | # | 574 | # |
575 | # Step 4: Prepare a setup section. (For x86) | 575 | # Step 4: Prepare a setup section. (For x86) |
576 | # | 576 | # |
577 | if [ -e arch/${ARCH}/boot/setup.bin ]; then | 577 | if [ -e ${KERNEL_OUTPUT_DIR}/setup.bin ]; then |
578 | setupcount=1 | 578 | setupcount=1 |
579 | fitimage_emit_section_setup $1 $setupcount arch/${ARCH}/boot/setup.bin | 579 | fitimage_emit_section_setup $1 $setupcount ${KERNEL_OUTPUT_DIR}/setup.bin |
580 | fi | 580 | fi |
581 | 581 | ||
582 | # | 582 | # |
@@ -650,7 +650,7 @@ fitimage_assemble() { | |||
650 | ${UBOOT_MKIMAGE} \ | 650 | ${UBOOT_MKIMAGE} \ |
651 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ | 651 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ |
652 | -f $1 \ | 652 | -f $1 \ |
653 | arch/${ARCH}/boot/$2 | 653 | ${KERNEL_OUTPUT_DIR}/$2 |
654 | 654 | ||
655 | # | 655 | # |
656 | # Step 8: Sign the image and add public key to U-Boot dtb | 656 | # Step 8: Sign the image and add public key to U-Boot dtb |
@@ -667,7 +667,7 @@ fitimage_assemble() { | |||
667 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ | 667 | ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ |
668 | -F -k "${UBOOT_SIGN_KEYDIR}" \ | 668 | -F -k "${UBOOT_SIGN_KEYDIR}" \ |
669 | $add_key_to_u_boot \ | 669 | $add_key_to_u_boot \ |
670 | -r arch/${ARCH}/boot/$2 \ | 670 | -r ${KERNEL_OUTPUT_DIR}/$2 \ |
671 | ${UBOOT_MKIMAGE_SIGN_ARGS} | 671 | ${UBOOT_MKIMAGE_SIGN_ARGS} |
672 | fi | 672 | fi |
673 | } | 673 | } |
@@ -770,7 +770,7 @@ kernel_do_deploy:append() { | |||
770 | 770 | ||
771 | if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then | 771 | if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then |
772 | bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." | 772 | bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." |
773 | install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" | 773 | install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" |
774 | if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then | 774 | if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then |
775 | ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" | 775 | ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" |
776 | fi | 776 | fi |