]> code.ossystems Code Review - meta-freescale.git/commitdiff
image_types_fsl.bbclass: Calculate BOOT_BLOCKS for new boot partition num
authorJeremy Stashluk <jstashluk@dekaresearch.com>
Mon, 6 Aug 2012 15:54:26 +0000 (11:54 -0400)
committerOtavio Salvador <otavio@ossystems.com.br>
Mon, 6 Aug 2012 16:09:23 +0000 (13:09 -0300)
The empty 1K at the beginning of the disk is no longer a partition, so
the numbers reported by parted have shifted by one.

Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/classes/image_types_fsl.bbclass

index 58f5249e890c566fc49545fa30ac77d2da186be6..1ed817fc94f8edcff2e0d1617768dca994e5200c 100644 (file)
@@ -80,7 +80,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)) / 1024 }')
+                         | awk '/ 1 / { 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