All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] image.bbclass: add link to .rootfs.<type> or .<type>.img
@ 2011-03-15 18:13 Ben Gardiner
  2011-03-15 18:13 ` [PATCH 2/2] bitbake.conf: use .ubifs.img extension in IMAGE_CMD_ubi Ben Gardiner
  2011-03-15 20:01 ` [PATCH 1/2] image.bbclass: add link to .rootfs.<type> or .<type>.img Denys Dmytriyenko
  0 siblings, 2 replies; 9+ messages in thread
From: Ben Gardiner @ 2011-03-15 18:13 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Tom Rini

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>
CC: Tom Rini <trini@embeddedalley.com>

---

Tested successfully in arago; I'm sorry I couldn't find a combination of
MACHINE and DISTRO and image that would build on org.openembedded.dev.

This patch is a git am fix-up of the patch tested in arago.

---

 classes/image.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/classes/image.bbclass b/classes/image.bbclass
index 9621614..d7fe9b0 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
 
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-03-16 20:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 18:13 [PATCH 1/2] image.bbclass: add link to .rootfs.<type> or .<type>.img Ben Gardiner
2011-03-15 18:13 ` [PATCH 2/2] bitbake.conf: use .ubifs.img extension in IMAGE_CMD_ubi Ben Gardiner
2011-03-15 20:02   ` Denys Dmytriyenko
2011-03-15 20:01 ` [PATCH 1/2] image.bbclass: add link to .rootfs.<type> or .<type>.img Denys Dmytriyenko
2011-03-16 15:25   ` Ben Gardiner
2011-03-16 16:18     ` Tom Rini
2011-03-16 20:31       ` Denys Dmytriyenko
2011-03-16 20:30     ` Denys Dmytriyenko
2011-03-16 20:40       ` Ben Gardiner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.