( This is a port of commit cfde49e8d0f1cf09d589910f1a342849db148519 from git://git.openembedded.org/openembedded )
The current image link-creation code will unconditionaly create a link from .<type> pointing to the .rootfs.<type> output. This is not compatible with the UBIFS images produced which have .<type>.img extension since they are not considered to be valid rootfs images when they are not included in a UBI container. Check for existence of the link target .rootfs.<type> before creating the link and fallback to a check for the .<type>.img target after that. Signed-off-by: Ben Gardiner <bengardi...@nanometrics.ca> Acked-by: Denys Dmytriyenko <de...@ti.com> Signed-off-by: Tom Rini <tom_r...@mentor.com> Signed-off-by: Ben Gardiner <bengardi...@nanometrics.ca> --- meta/classes/image_types.bbclass | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 696e978..6a66d21 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -16,7 +16,11 @@ runimagecmd () { ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR}; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'` ${cmd} cd ${DEPLOY_DIR_IMAGE}/ - ln -fs ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} + if [ -f ${IMAGE_NAME}.rootfs.${type} ]; then + ln -fs ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} + elif [ -f ${IMAGE_NAME}.${type}.img ]; then + ln -fs ${IMAGE_NAME}.${type}.img ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} + fi } IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" -- 1.7.0.4 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core