From 5efa2d7c81a4c1f3590a3e2f8cf77bf2f2d756e9 Mon Sep 17 00:00:00 2001 From: Tzu-Jung Lee Date: Fri, 16 Oct 2015 18:12:00 +0000 Subject: image_types_fsl.bbclass: Use FAT 32 for images larger than 512MB Refers to the following commit of poky for more detail. commit 722430a488f39bf583e4a557a254fb84fae4d0a7 Author: Darren Hart Date: Wed Dec 12 14:39:15 2012 -0800 bootimg: Use FAT 32 for images larger than 512MB Fixes [YOCTO #2138] Signed-off-by: Tzu-Jung Lee Signed-off-by: Otavio Salvador --- classes/image_types_fsl.bbclass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass index 77deb74..f323a7d 100644 --- a/classes/image_types_fsl.bbclass +++ b/classes/image_types_fsl.bbclass @@ -103,8 +103,15 @@ _generate_boot_image() { BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ | awk "/ $boot_part / { print substr(\$4, 1, length(\$4 -1)) / 1024 }") + # mkdosfs will sometimes use FAT16 when it is not appropriate, + # resulting in a boot failure from SYSLINUX. Use FAT32 for + # images larger than 512MB, otherwise let mkdosfs decide. + if [ $(expr $BOOT_BLOCKS / 1024) -gt 512 ]; then + FATSIZE="-F 32" + fi + rm -f ${WORKDIR}/boot.img - mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -F 32 -C ${WORKDIR}/boot.img $BOOT_BLOCKS + mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 ${FATSIZE} -C ${WORKDIR}/boot.img $BOOT_BLOCKS mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} -- cgit v1.2.3-54-g00ecf