]> code.ossystems Code Review - meta-freescale.git/commitdiff
image_types_fsl.bbclass: Fix the calculation of BOOT_BLOCKS
authorAndrei Gherzan <andrei@gherzan.ro>
Fri, 18 May 2012 21:09:40 +0000 (00:09 +0300)
committerAndrei Gherzan <andrei@gherzan.ro>
Fri, 18 May 2012 21:15:49 +0000 (00:15 +0300)
In awk the first cell/item is $1 not $0 in this way the size
of the partition from parted is actually $4 not $3.

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

index 8471da2d5c013fa146f492b6757e23658298d97f..daea8ce1ef82b1fd4f666f96e8a8b6ede0c8a4f5 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($3, 1, length($3 -1)) / 512 }')
+                         | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 512 }')
        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($3, 1, length($3 -1)) / 512 }')
+                         | awk '/ 2 / { print substr($4, 1, length($4 -1)) / 512 }')
        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