[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH 2/3] image_types.bbclass: add link to .rootfs.<type> or .<type>.img
From: bengardiner () nanometrics ! ca (Ben Gardiner)
Date: 2011-03-31 4:36:37
Message-ID: 907dd3d266c8fe4fcbdb698b23937687cb88ec15.1301544780.git.bengardiner () nanometrics ! ca
[Download RAW message or body]
( 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 <bengardiner at nanometrics.ca>
Acked-by: Denys Dmytriyenko <denys at ti.com>
Signed-off-by: Tom Rini <tom_rini at mentor.com>
Signed-off-by: Ben Gardiner <bengardiner at 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic