diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2018-08-19 22:15:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-21 14:49:42 +0100 |
commit | d0a8532abbd86841f50d36407b5f4f8a84285bcd (patch) | |
tree | 5ca25bac5f9e400be20695d4106bf099a17f7cb5 /meta/classes/kernel-fitimage.bbclass | |
parent | a65c1216d7c4c9283817361252034d7c7f59cf31 (diff) | |
download | poky-d0a8532abbd86841f50d36407b5f4f8a84285bcd.tar.gz |
kernel-artifact-names, kernel-fitimage: add KERNEL_FIT_BASE_NAME, KERNEL_FIT_SYMLINK_NAME variables
* use the same naming scheme for fitImage files like all other deployed artifacts
* remove unnecessary cd to DEPLOYDIR
* remove unnecessary cd to B
(From OE-Core rev: fd69f8b2d7dd950cee9e820ef91ea90521c95ace)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel-fitimage.bbclass')
-rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index a1d0dda55d..a99c9d8054 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass | |||
@@ -1,4 +1,4 @@ | |||
1 | inherit kernel-uboot uboot-sign | 1 | inherit kernel-uboot kernel-artifact-names uboot-sign |
2 | 2 | ||
3 | python __anonymous () { | 3 | python __anonymous () { |
4 | kerneltypes = d.getVar('KERNEL_IMAGETYPES') or "" | 4 | kerneltypes = d.getVar('KERNEL_IMAGETYPES') or "" |
@@ -488,32 +488,22 @@ kernel_do_deploy[vardepsexclude] = "DATETIME" | |||
488 | kernel_do_deploy_append() { | 488 | kernel_do_deploy_append() { |
489 | # Update deploy directory | 489 | # Update deploy directory |
490 | if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then | 490 | if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then |
491 | cd ${B} | ||
492 | echo "Copying fit-image.its source file..." | 491 | echo "Copying fit-image.its source file..." |
493 | its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}" | 492 | install -m 0644 ${B}/fit-image.its ${DEPLOYDIR}/fitImage-its-${KERNEL_FIT_BASE_NAME}.its |
494 | its_symlink_name=fitImage-its-${MACHINE} | 493 | ln -snf fitImage-its-${KERNEL_FIT_BASE_NAME} ${DEPLOYDIR}/fitImage-its-${KERNEL_FIT_SYMLINK_NAME} |
495 | install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its | 494 | |
496 | linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}" | 495 | echo "Copying linux.bin file..." |
497 | linux_bin_symlink_name=fitImage-linux.bin-${MACHINE} | 496 | install -m 0644 ${B}/linux.bin ${DEPLOYDIR}/fitImage-linux.bin-${KERNEL_FIT_BASE_NAME}.bin |
498 | install -m 0644 linux.bin ${DEPLOYDIR}/${linux_bin_base_name}.bin | 497 | ln -snf fitImage-linux.bin-${KERNEL_FIT_BASE_NAME}.bin ${DEPLOYDIR}/fitImage-linux.bin-${KERNEL_FIT_SYMLINK_NAME} |
499 | 498 | ||
500 | if [ -n "${INITRAMFS_IMAGE}" ]; then | 499 | if [ -n "${INITRAMFS_IMAGE}" ]; then |
501 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." | 500 | echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." |
502 | its_initramfs_base_name="fitImage-its-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" | 501 | install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_BASE_NAME}.its |
503 | its_initramfs_symlink_name=fitImage-its-${INITRAMFS_IMAGE_NAME} | 502 | ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_BASE_NAME}.its ${DEPLOYDIR}/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_SYMLINK_NAME} |
504 | install -m 0644 fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/${its_initramfs_base_name}.its | ||
505 | fit_initramfs_base_name="fitImage-${INITRAMFS_IMAGE_NAME}-${PV}-${PR}-${DATETIME}" | ||
506 | fit_initramfs_symlink_name=fitImage-${INITRAMFS_IMAGE_NAME} | ||
507 | install -m 0644 arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/${fit_initramfs_base_name}.bin | ||
508 | fi | ||
509 | 503 | ||
510 | cd ${DEPLOYDIR} | 504 | echo "Copying fitImage-${INITRAMFS_IMAGE} file..." |
511 | ln -sf ${its_base_name}.its ${its_symlink_name}.its | 505 | install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_BASE_NAME}.bin |
512 | ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin | 506 | ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_BASE_NAME}.bin ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_SYMLINK_NAME} |
513 | |||
514 | if [ -n "${INITRAMFS_IMAGE}" ]; then | ||
515 | ln -sf ${its_initramfs_base_name}.its ${its_initramfs_symlink_name}.its | ||
516 | ln -sf ${fit_initramfs_base_name}.bin ${fit_initramfs_symlink_name}.bin | ||
517 | fi | 507 | fi |
518 | fi | 508 | fi |
519 | } | 509 | } |