From: Jason Kridner Date: Mon, 3 Oct 2011 20:48:26 +0000 (-0400) Subject: classes: sdcardimage: move to 4GiB image X-Git-Tag: v2012.05-yocto1.2~347 X-Git-Url: https://git.ti.com/gitweb?p=glsdk%2Fmeta-ti-glsdk.git;a=commitdiff_plain;h=4ab77fb9195f493c41d3d110903f2ec8234e2fd0;ds=inline 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 Signed-off-by: Koen Kooi --- diff --git a/classes/sdcard_image.bbclass b/classes/sdcard_image.bbclass index b3885df..640c6a4 100644 --- a/classes/sdcard_image.bbclass +++ b/classes/sdcard_image.bbclass @@ -10,12 +10,12 @@ IMAGE_CMD_sdimg () { losetup -d $loop_dev || true 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} LOOPDEV=$(losetup -j ${SDIMG} -o 0 | cut -d ":" -f 1) # 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}'` CYLINDERS=`echo $SIZE/255/63/512 | bc` {