From 35ff76b80ddaaf3ab82508643f163b96694d82c2 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Sat, 19 May 2012 00:09:40 +0300 Subject: image_types_fsl.bbclass: Fix the calculation of BOOT_BLOCKS 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 --- classes/image_types_fsl.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 8471da2..daea8ce 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass @@ -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 -- cgit v1.2.3-54-g00ecf