Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Langhoff <martin@laptop.org>2012-03-22 13:19:09 (GMT)
committer Martin Langhoff <martin@laptop.org>2012-03-22 13:56:48 (GMT)
commit54f46e3ca41480a91f054b9577d4b12007758ab9 (patch)
treed90c035906ae934e7413e233526fbcb138eca56c
parentc45229b42ce930701b64c253aa6f93a0766ed506 (diff)
sd_card_image: fix zd img creation in a long directory path
sfdisk truncates the path if it is too long, this breaks our querying of the img file. So we change into the intermediates directory and use a local path.
-rw-r--r--modules/sd_card_image/image.50.makefs.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/sd_card_image/image.50.makefs.sh b/modules/sd_card_image/image.50.makefs.sh
index 6e61eb7..c107ba9 100644
--- a/modules/sd_card_image/image.50.makefs.sh
+++ b/modules/sd_card_image/image.50.makefs.sh
@@ -51,7 +51,10 @@ make_image()
8192,131072,83,*
139264,,,
EOF
- local img_sectors=$(sfdisk -uS -l $img | grep img2 | awk '{print $4}')
+ # sfdisk output truncates paths that are too long
+ pushd $intermediatesdir
+ local img_sectors=$(sfdisk -uS -l $(basename $img) | grep img2 | awk '{print $4}')
+ popd
echo "(1 losetup error is normal here)"
losetup -d /dev/loop6 || :
losetup -o $((8192 * $BLOCK_SIZE)) --sizelimit $((131072 * $BLOCK_SIZE)) /dev/loop6 $img