aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorBen Gardiner <bengardiner@nanometrics.ca>2011-03-17 00:50:34 +0000
committerTom Rini <tom_rini@mentor.com>2011-03-17 11:07:58 -0700
commitbea53b82ce187c30729efde6ea974aca5ee7f7d0 (patch)
treee25b329200b1e6824e554469ddd86415091e0304 /classes
parent61a44923aeee2e0e07b095b44bb5b8147118d5dd (diff)
downloadopenembedded-bea53b82ce187c30729efde6ea974aca5ee7f7d0.tar.gz
image.bbclass: add link to .rootfs.<type> or .<type>.img
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 <bengardiner@nanometrics.ca> Acked-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Tom Rini <tom_rini@mentor.com> (cherry picked from commit cfde49e8d0f1cf09d589910f1a342849db148519) Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Acked-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Tom Rini <tom_rini@mentor.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/image.bbclass6
1 files changed, 5 insertions, 1 deletions
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