diff options
author | Alex Kiernan <alex.kiernan@gmail.com> | 2018-09-18 15:15:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-22 15:52:12 -0700 |
commit | ce80e2572caedab5bf8acf756f94c18513438122 (patch) | |
tree | ed9fc32f2d44fb30ac91debf7ea24c39775d8768 | |
parent | b492b08a4d6efd4768aff6507745761d02bb2977 (diff) | |
download | poky-ce80e2572caedab5bf8acf756f94c18513438122.tar.gz |
kernel.bbclass: Avoid iterating over KERNEL_IMAGETYPES twice
During deploy we iterate over KERNEL_IMAGETYPES twice, with no consumer
of our changes in the interim. Collapse these two loops into one.
(From OE-Core rev: 8d3139640ed4cd4e196dc2d1f6ae02d612fb9564)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel.bbclass | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 396627e7ef..d0fbbd1989 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -669,20 +669,17 @@ kernel_do_deploy() { | |||
669 | for imageType in ${KERNEL_IMAGETYPES} ; do | 669 | for imageType in ${KERNEL_IMAGETYPES} ; do |
670 | base_name=${imageType}-${KERNEL_IMAGE_NAME} | 670 | base_name=${imageType}-${KERNEL_IMAGE_NAME} |
671 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin | 671 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin |
672 | symlink_name=${imageType}-${KERNEL_IMAGE_LINK_NAME} | ||
673 | ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin | ||
674 | ln -sf ${base_name}.bin $deployDir/${imageType} | ||
672 | done | 675 | done |
676 | |||
673 | if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then | 677 | if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then |
674 | mkdir -p ${D}${root_prefix}/lib | 678 | mkdir -p ${D}${root_prefix}/lib |
675 | tar -cvzf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz -C ${D}${root_prefix} lib | 679 | tar -cvzf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz -C ${D}${root_prefix} lib |
676 | ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz | 680 | ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz |
677 | fi | 681 | fi |
678 | 682 | ||
679 | for imageType in ${KERNEL_IMAGETYPES} ; do | ||
680 | base_name=${imageType}-${KERNEL_IMAGE_NAME} | ||
681 | symlink_name=${imageType}-${KERNEL_IMAGE_LINK_NAME} | ||
682 | ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin | ||
683 | ln -sf ${base_name}.bin $deployDir/${imageType} | ||
684 | done | ||
685 | |||
686 | if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then | 683 | if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then |
687 | for imageType in ${KERNEL_IMAGETYPES} ; do | 684 | for imageType in ${KERNEL_IMAGETYPES} ; do |
688 | initramfs_base_name=${imageType}-${INITRAMFS_NAME} | 685 | initramfs_base_name=${imageType}-${INITRAMFS_NAME} |