kernel.bbclass: do not deploy fitImage; kernel-fitimage.bbclass does that.
PATCH 1/1 kernel.bbclass: do not deploy fitImage; kernel-fitimage.bbclass does that.
kernel-fitimage.bbclass replaces an occurance of "fitImage" in KERNEL_IMAGETYPE_FOR_MAKE by an image type that is buildable for the architecture (such as zImage). The kernel-fitimage.bbclass packs that image as sub-image in a flattened image tree image (fitImage) and deploys this fitImage along with the image tree source file (.its).
kernel-fitimage.bbclass does not alter KERNEL_IMAGETYPES, which thus also contains "fitImage", which kernel.bbclass will also deploy redundantly with different naming.
The result is a dual deployment with slightly different naming, each with a set of symlinks.
The solution chosen is to have fitImage deployment be handled by kernel-fitimage.bbclass, and have kernel.bbclass ignore fitImage types during deployment.
--- meta/classes/kernel.bbclass | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
meta/classes/kernel.bbclass +13 -8
@@ -669,8 +669,11 @@ kernel_do_deploy() { fi for imageType in ${KERNEL_IMAGETYPES} ; do - base_name=${imageType}-${KERNEL_IMAGE_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin + for imageType in ${KERNEL_IMAGETYPES} ; do + if [ "$imageType" != "fitImage" ]; then + base_name=${imageType}-${KERNEL_IMAGE_NAME} + install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin + fi done if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then mkdir -p ${D}/lib
@@ -686,12 +689,14 @@ kernel_do_deploy() { done if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then - for imageType in ${KERNEL_IMAGETYPES} ; do - initramfs_base_name=${imageType}-${INITRAMFS_NAME} - initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin - ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin - done + if [ "$imageType" != "fitImage" ]; then + for imageType in ${KERNEL_IMAGETYPES} ; do + initramfs_base_name=${imageType}-${INITRAMFS_NAME} + initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME} + install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin + ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin + done + fi fi } do_deploy[cleandirs] = "${DEPLOYDIR}"
Signature · 1 line
2.7.4
Quoted 42 lines · Leon Woestenberg
kernel-fitimage.bbclass replaces an occurance of "fitImage" in
KERNEL_IMAGETYPE_FOR_MAKEby an image type that is buildable for the architecture (such as zImage). The kernel-fitimage.bbclass packs that image as sub-image in a flattened image tree image (fitImage) and deploys this fitImage along with the image tree source file (.its).kernel-fitimage.bbclass does not alter
KERNEL_IMAGETYPES, which thus also contains "fitImage", which kernel.bbclass will also deploy redundantly with different naming.The result is a dual deployment with slightly different naming, each with a set of symlinks.
The solution chosen is to have fitImage deployment be handled by kernel-fitimage.bbclass, and have kernel.bbclass ignore fitImage types during deployment.
Signed-off-by Leon Woestenberg <[email protected]>--- meta/classes/kernel.bbclass | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)meta/classes/kernel.bbclass +5
-2@@ -669,8 +669,11 @@ kernel_do_deploy() { fi for imageType in ${KERNEL_IMAGETYPES} ; do - base_name=${imageType}-${KERNEL_IMAGE_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin + for imageType in ${KERNEL_IMAGETYPES} ; do + if [ "$imageType" != "fitImage" ]; then + base_name=${imageType}-${KERNEL_IMAGE_NAME} + install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} $deployDir/${base_name}.bin + fi done if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then mkdir -p ${D}/lib@@ -686,12 +689,14 @@ kernel_do_deploy() { done
meta/classes/kernel.bbclass kernel_do_deploy() { · line 693
Quoted 10 lines
meta/classes/kernel.bbclass +2
-6if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then - for imageType in ${KERNEL_IMAGETYPES} ; do - initramfs_base_name=${imageType}-${INITRAMFS_NAME} - initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin - ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin - done + if [ "$imageType" != "fitImage" ]; then + for imageType in ${KERNEL_IMAGETYPES} ; do
This looks odd. You test imageType before the for loop which assigns a value to it?
Quoted 17 lines
meta/classes/kernel.bbclass +6
-1+ initramfs_base_name=${imageType}-${INITRAMFS_NAME} + initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME} + install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin + ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin + done + fi fi } do_deploy[cleandirs] = "${DEPLOYDIR}" --2.7.4
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hi Andre,
thanks for reviewing.
Quoted 7 lines · Andre McCurdy
meta/classes/kernel.bbclass kernel_do_deploy() { · line 693
Quoted 2 lines · Leon Woestenberg
meta/classes/kernel.bbclass +2
-0+ if [ "$imageType" != "fitImage" ]; then + for imageType in ${KERNEL_IMAGETYPES} ; doThis looks odd. You test imageType before the for loop which assigns a value to it?
Good catch. I will create new patch that turns the lines around, i.e. test within the for loop
(The above acted on the last imageType of the previous for loop, which had the correct order.)
Quoted 9 lines
meta/classes/kernel.bbclass kernel_do_deploy() { · line 702
Quoted 9 lines
meta/classes/kernel.bbclass +6
-0+ initramfs_base_name=${imageType}-${INITRAMFS_NAME} + initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME} + install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin + ln -sf ${initramfs_base_name}.bin $deployDir/${initramfs_symlink_name}.bin + done + fi fi } do_deploy[cleandirs] = "${DEPLOYDIR}"
Thanks,
Leon.