From: Ben Gardiner Date: Tue, 15 Mar 2011 18:13:54 +0000 (-0400) Subject: image.bbclass: add link to .rootfs. or ..img X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfde49e8d0f1cf09d589910f1a342849db148519;p=openembedded.git image.bbclass: add link to .rootfs. or ..img The current image link-creation code will unconditionaly create a link from . pointing to the .rootfs. output. This is not compatible with the UBIFS images produced which have ..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. before creating the link and fallback to a check for the ..img target after that. Signed-off-by: Ben Gardiner Acked-by: Denys Dmytriyenko Signed-off-by: Tom Rini --- diff --git a/classes/image.bbclass b/classes/image.bbclass index 962161410f..d7fe9b015e 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -140,7 +140,11 @@ def get_imagecmds(d): cmd = "\t#Code for image type " + type + "\n" cmd += "\t${IMAGE_CMD_" + type + "}\n" cmd += "\tcd ${DEPLOY_DIR_IMAGE}/\n" - cmd += "\tln -fs ${IMAGE_NAME}.rootfs." + type + " ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n\n" + cmd += "\tif [ -f ${IMAGE_NAME}.rootfs." + type + " ]; then\n" + cmd += "\tln -fs ${IMAGE_NAME}.rootfs." + type + " ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n" + cmd += "\telif [ -f ${IMAGE_NAME}." + type + ".img ]; then\n" + cmd += "\tln -fs ${IMAGE_NAME}." + type + ".img ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n" + cmd += "\tfi\n\n" cmds += bb.data.expand(cmd, localdata) return cmds