aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2018-09-18 15:15:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-22 11:22:30 -0700
commit8d3139640ed4cd4e196dc2d1f6ae02d612fb9564 (patch)
tree9d206f3f63df573a9e20fded79ee2fb39c5c4bda
parent62d2d7d12dda69d6019a1a2d5492450487e41bfd (diff)
downloadopenembedded-core-contrib-8d3139640ed4cd4e196dc2d1f6ae02d612fb9564.tar.gz
openembedded-core-contrib-8d3139640ed4cd4e196dc2d1f6ae02d612fb9564.tar.bz2
openembedded-core-contrib-8d3139640ed4cd4e196dc2d1f6ae02d612fb9564.zip
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. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/kernel.bbclass11
1 files changed, 4 insertions, 7 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 396627e7efa..d0fbbd19899 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -669,20 +669,17 @@ kernel_do_deploy() {
for imageType in ${KERNEL_IMAGETYPES} ; do
base_name=${imageType}-${KERNEL_IMAGE_NAME}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin
+ symlink_name=${imageType}-${KERNEL_IMAGE_LINK_NAME}
+ ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
+ ln -sf ${base_name}.bin $deployDir/${imageType}
done
+
if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
mkdir -p ${D}${root_prefix}/lib
tar -cvzf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz -C ${D}${root_prefix} lib
ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz
fi
- for imageType in ${KERNEL_IMAGETYPES} ; do
- base_name=${imageType}-${KERNEL_IMAGE_NAME}
- symlink_name=${imageType}-${KERNEL_IMAGE_LINK_NAME}
- ln -sf ${base_name}.bin $deployDir/${symlink_name}.bin
- ln -sf ${base_name}.bin $deployDir/${imageType}
- done
-
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
for imageType in ${KERNEL_IMAGETYPES} ; do
initramfs_base_name=${imageType}-${INITRAMFS_NAME}