Skip to content

Commit

Permalink
Fix default vfat sector size for the UFS devices and partitions (#748)
Browse files Browse the repository at this point in the history
Set default vfat sector size for UFS devices and partitions.
  • Loading branch information
ricardosalveti authored Feb 14, 2025
2 parents 82f944e + e5eb186 commit f018d26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/linux-qcom-dtbbin.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ do_qcom_dtbbin_deploy() {
dtb_base_name=`basename $dtb .$dtb_ext`
mkdir -p ${DTBBIN_DEPLOYDIR}/$dtb_base_name
cp ${D}/${KERNEL_DTBDEST}/$dtb_base_name.dtb ${DTBBIN_DEPLOYDIR}/$dtb_base_name/combined-dtb.dtb
mkfs.vfat $@ -C ${DTBBIN_DEPLOYDIR}/dtb-${dtb_base_name}-image.vfat ${DTBBIN_SIZE}
mkfs.vfat -S ${QCOM_VFAT_SECTOR_SIZE} -C ${DTBBIN_DEPLOYDIR}/dtb-${dtb_base_name}-image.vfat ${DTBBIN_SIZE}
mcopy -i "${DTBBIN_DEPLOYDIR}/dtb-${dtb_base_name}-image.vfat" -vsmpQ ${DTBBIN_DEPLOYDIR}/$dtb_base_name/* ::/
rm -rf ${DTBBIN_DEPLOYDIR}/$dtb_base_name
done
Expand Down
3 changes: 3 additions & 0 deletions conf/machine/include/qcom-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ IMAGE_ROOTFS_ALIGNMENT ?= "4096"
QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
QCOM_BOOTIMG_PAGE_SIZE ?= "4096"

# Default vfat sector size to 4096, compatible with UFS
QCOM_VFAT_SECTOR_SIZE ??= "4096"

# Default serial console for QCOM devices
SERIAL_CONSOLES ?= "115200;ttyMSM0"

Expand Down
4 changes: 1 addition & 3 deletions recipes-kernel/images/esp-qcom-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ inherit image
IMAGE_FSTYPES = "vfat"
IMAGE_FSTYPES_DEBUGFS = ""

# UFS requires vfat sector size of 4096 (default is 512)
VFAT_SECTOR_SIZE ?= "4096"
EXTRA_IMAGECMD:vfat += " -S ${VFAT_SECTOR_SIZE}"
EXTRA_IMAGECMD:vfat += " -S ${QCOM_VFAT_SECTOR_SIZE}"

# Align image size with the expected partition size (512MB)
IMAGE_ROOTFS_SIZE = "524288"
Expand Down

0 comments on commit f018d26

Please sign in to comment.