summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-10-15 13:48:24 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-10-15 13:48:24 +0200
commit99ce37e4a9c1cbfe534528584c67577d07c825ae (patch)
treefd4d936e9c2f1e9a9ffafec418e3a1f3850b15c0 /classes
parent554db22c5bfdefaa54f3923a7ffbe72092bd0d91 (diff)
downloadmeta-ti-99ce37e4a9c1cbfe534528584c67577d07c825ae.tar.gz
sdcard_image bbclass: default to 4GiB, but use 2GiB for beaglebone
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
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}