summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/sdcard_image.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/sdcard_image.bbclass b/classes/sdcard_image.bbclass
index be7ab3b9..41891fe5 100644
--- a/classes/sdcard_image.bbclass
+++ b/classes/sdcard_image.bbclass
@@ -12,6 +12,10 @@ LOOPDEV ?= "/dev/loop1"
12LOOPDEV_BOOT ?= "/dev/loop2" 12LOOPDEV_BOOT ?= "/dev/loop2"
13LOOPDEV_FS ?= "/dev/loop3" 13LOOPDEV_FS ?= "/dev/loop3"
14 14
15# Default to 4GiB images, but use 2GiB images for beaglebone
16SDIMG_SIZE ?= "444"
17SDIMG_SIZE_beaglebone = "222"
18
15IMAGE_CMD_sdimg () { 19IMAGE_CMD_sdimg () {
16 SDIMG=${WORKDIR}/sd.img 20 SDIMG=${WORKDIR}/sd.img
17 21
@@ -29,7 +33,7 @@ IMAGE_CMD_sdimg () {
29 33
30 # If an SD image is already present, reuse and reformat it 34 # If an SD image is already present, reuse and reformat it
31 if [ ! -e ${SDIMG} ] ; then 35 if [ ! -e ${SDIMG} ] ; then
32 dd if=/dev/zero of=${SDIMG} bs=$(echo '255 * 63 * 512' | bc) count=222 36 dd if=/dev/zero of=${SDIMG} bs=$(echo '255 * 63 * 512' | bc) count=${SDIMG_SIZE}
33 fi 37 fi
34 38
35 ${LOSETUP} ${LOOPDEV} ${SDIMG} 39 ${LOSETUP} ${LOOPDEV} ${SDIMG}