classes: sdcardimage: move to 4GiB image
authorJason Kridner <jdk@ti.com>
Mon, 3 Oct 2011 20:48:26 +0000 (16:48 -0400)
committerKoen Kooi <koen@dominion.thruhere.net>
Sat, 8 Oct 2011 19:07:52 +0000 (21:07 +0200)
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>
classes/sdcard_image.bbclass

index b3885df62e47e91be4d63f4c051b70af0cc1238f..640c6a4abb01a66e166e5de4c004770260af01cd 100644 (file)
@@ -10,12 +10,12 @@ IMAGE_CMD_sdimg () {
                losetup -d $loop_dev || true
        done
 
                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
        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`
        {
        SIZE=`fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}'`
        CYLINDERS=`echo $SIZE/255/63/512 | bc`
        {