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>2015-10-16 15:15:16 -0300
commit5efa2d7c81a4c1f3590a3e2f8cf77bf2f2d756e9 (patch)
tree4c4a803d0fa02b95ae3413a6628a1037a131dd1b /classes
parent40a59c4a99578ca2af163ddc77ee5df1e414b139 (diff)
downloadmeta-fsl-arm-5efa2d7c81a4c1f3590a3e2f8cf77bf2f2d756e9.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 77deb74..f323a7d 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