]> code.ossystems Code Review - meta-freescale.git/commitdiff
image_types_fsl: Fix the size of the created file fs with mkfs.vfat
authorAndrei Gherzan <andrei@gherzan.ro>
Fri, 18 May 2012 21:46:03 +0000 (00:46 +0300)
committerAndrei Gherzan <andrei@gherzan.ro>
Fri, 18 May 2012 22:09:02 +0000 (01:09 +0300)
It looks like mkfs.vfat is using 1024B block size. The returned value
of BOOT_BLOCKS was in blocks of 512B. This needs to be changed in blocks
of 1024B.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
meta-fsl-arm/classes/image_types_fsl.bbclass

index daea8ce1ef82b1fd4f666f96e8a8b6ede0c8a4f5..da4439242bb0ec8e8461292dce534fc9b9c22892 100644 (file)
@@ -77,7 +77,7 @@ generate_imx_sdcard () {
        esac
 
        BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
-                         | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 512 }')
+                         | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
        mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
        mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin ::/uImage
 
@@ -122,7 +122,7 @@ generate_mxs_sdcard () {
        esac
 
        BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
-                         | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 512 }')
+                         | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 1024 }')
        mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
        mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin ::/uImage