summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorTzu-Jung Lee <roylee17@gmail.com>2015-10-16 18:12:00 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2016-04-19 15:03:21 -0300
commit751359a08e6d87b85fcabd840d8bc055ad952608 (patch)
treee1126f8fa1a7e2d9d27ee2e06bdd5e903cc53611 /classes
parent642951ab7a7f73bc834d2e92f8de0980553a4a11 (diff)
downloadmeta-freescale-751359a08e6d87b85fcabd840d8bc055ad952608.tar.gz
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 <dvhart@linux.intel.com> 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 <roylee17@currantlabs.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_fsl.bbclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index 77deb742..f323a7d7 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -103,8 +103,15 @@ _generate_boot_image() {
103 BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \ 103 BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDCARD} unit b print \
104 | awk "/ $boot_part / { print substr(\$4, 1, length(\$4 -1)) / 1024 }") 104 | awk "/ $boot_part / { print substr(\$4, 1, length(\$4 -1)) / 1024 }")
105 105
106 # mkdosfs will sometimes use FAT16 when it is not appropriate,
107 # resulting in a boot failure from SYSLINUX. Use FAT32 for
108 # images larger than 512MB, otherwise let mkdosfs decide.
109 if [ $(expr $BOOT_BLOCKS / 1024) -gt 512 ]; then
110 FATSIZE="-F 32"
111 fi
112
106 rm -f ${WORKDIR}/boot.img 113 rm -f ${WORKDIR}/boot.img
107 mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -F 32 -C ${WORKDIR}/boot.img $BOOT_BLOCKS 114 mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 ${FATSIZE} -C ${WORKDIR}/boot.img $BOOT_BLOCKS
108 115
109 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} 116 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE}
110 117