Skip to content

Commit ace5364

Browse files
kernel tools: use 4K sector size for DTB FAT image
Update build-dtb-image.sh to format the DTB FAT image with a 4096-byte logical sector size by passing `-S 4096` to mkfs.vfat. This aligns the dtb.bin filesystem layout with 4K sector expectations on target boot flows while keeping the overall image size and DTB payload unchanged. Signed-off-by: Bjordis Collaku <[email protected]>
1 parent 66b4f00 commit ace5364

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/scripts/build-dtb-image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ echo "[INFO] Using loop device: $LOOP_DEV"
227227
# Create a temporary mount directory for this run
228228
MNT_DIR="$(mktemp -d -t dtb-mnt-XXXXXX)"
229229

230-
# Format the loop device with FAT
231-
echo "[INFO] Formatting $LOOP_DEV as FAT..."
232-
mkfs.vfat "$LOOP_DEV" >/dev/null
230+
# Format the loop device with FAT (4 KiB logical sector size)
231+
echo "[INFO] Formatting $LOOP_DEV as FAT with 4 KiB sector size..."
232+
mkfs.vfat -S 4096 "$LOOP_DEV" >/dev/null
233233

234234
# Mount the loop device
235235
echo "[INFO] Mounting $LOOP_DEV at $MNT_DIR..."

0 commit comments

Comments
 (0)