From 2ee18cb8676cc0f915823d5be20784ba64646388 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 30 Apr 2012 18:01:54 -0300 Subject: [PATCH] image_types_fsl.bbclass: use a sparse file for sdcard generation This speeds up the generation of the sdcard and reduces the amount of space used for it. Signed-off-by: Otavio Salvador Reported-by: "John Passaniti" --- meta-fsl-arm/classes/image_types_fsl.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-fsl-arm/classes/image_types_fsl.bbclass b/meta-fsl-arm/classes/image_types_fsl.bbclass index d9e292c6..5d213e51 100644 --- a/meta-fsl-arm/classes/image_types_fsl.bbclass +++ b/meta-fsl-arm/classes/image_types_fsl.bbclass @@ -53,7 +53,8 @@ IMAGE_CMD_sdcard () { TMP=${WORKDIR}/tmp SDCARD=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard - dd if=/dev/zero of=${SDCARD} bs=$(expr 1000 \* 1000) count=${SDCARD_SIZE} + # Initialize a sparse file + dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1000 \* 1000 \* ${SDCARD_SIZE}) # Create partition table parted -s ${SDCARD} mklabel msdos -- 2.40.1