1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-05-07 03:49:20 +00:00

classes: sdcardimage: move to 4GiB image

The card image size should be a multiple of clusters and should
reserve space smaller than the card.

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Jason Kridner
2011-10-03 16:48:26 -04:00
committed by Koen Kooi
parent 5c52cbe6a2
commit 4ab77fb919
+2 -2
View File
@@ -10,12 +10,12 @@ IMAGE_CMD_sdimg () {
losetup -d $loop_dev || true losetup -d $loop_dev || true
done done
dd if=/dev/zero of=${SDIMG} bs=4k seek=$(echo '256 * 1024' | bc) count=1 dd if=/dev/zero of=${SDIMG} bs=$(echo '255 * 63 * 512' | bc) count=444
losetup -f ${SDIMG} losetup -f ${SDIMG}
LOOPDEV=$(losetup -j ${SDIMG} -o 0 | cut -d ":" -f 1) LOOPDEV=$(losetup -j ${SDIMG} -o 0 | cut -d ":" -f 1)
# Create partition table # Create partition table
dd if=/dev/zero of=${LOOPDEV} bs=1024 count=1024 #dd if=/dev/zero of=${LOOPDEV} bs=1024 count=1024
SIZE=`fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}'` SIZE=`fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}'`
CYLINDERS=`echo $SIZE/255/63/512 | bc` CYLINDERS=`echo $SIZE/255/63/512 | bc`
{ {