Skip to content

Commit abd8a35

Browse files
committed
image:vfat fs creation and mount tweaks
AB: use device sector size when creating filesystems. AB: panic on errors for the boot critical partition. Don't specify sectors-per-custer as it can conflict with sizing. Use default options as the base when mounting. Refs: https://www.kernel.org/doc/Documentation/filesystems/vfat.txt
1 parent d195da8 commit abd8a35

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

image/gpt/ab_userdata/genimage.cfg.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ image config.vfat {
9191
vfat {
9292
label = "BOOTFS"
9393
file "autoboot.txt" { image = "autoboot.txt" }
94-
extraargs = "-s 1"
94+
extraargs = "-s 1 -S <SECTOR_SIZE>"
9595
}
9696
size = 32M
9797
}
9898

9999
image bootA.vfat {
100100
vfat {
101101
label = "BOOTA"
102-
extraargs = "-i <BOOTA_UUID>"
102+
extraargs = "-S <SECTOR_SIZE> -i <BOOTA_UUID>"
103103
}
104104
size = <FW_SIZE>
105105
mountpoint = "/boot/firmware"
@@ -121,7 +121,7 @@ image systemA.ext4 {
121121
image bootB.vfat {
122122
vfat {
123123
label = "BOOTB"
124-
extraargs = "-i <BOOTB_UUID>"
124+
extraargs = "-S <SECTOR_SIZE> -i <BOOTB_UUID>"
125125
}
126126
size = <FW_SIZE>
127127
mountpoint = "/boot/firmware"

image/gpt/ab_userdata/pre-image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ cat genimage.cfg.in | sed \
3030
-e "s|<IMAGE_SUFFIX>|$IGconf_image_suffix|g" \
3131
-e "s|<FW_SIZE>|$IGconf_image_boot_part_size|g" \
3232
-e "s|<SYSTEM_SIZE>|$IGconf_image_system_part_size|g" \
33+
-e "s|<SECTOR_SIZE>|$IGconf_device_sector_size|g" \
3334
-e "s|<SLOTP>|'$(readlink -ef slot-post-process.sh)'|g" \
3435
-e "s|<MKE2FSCONF>|'$(readlink -ef mke2fs.conf)'|g" \
3536
-e "s|<BOOTA_UUID>|$BOOTA_UUID|g" \

image/gpt/ab_userdata/slot-post-process.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ case $COMP in
1010
SYSTEM)
1111
cat << EOF > $IMAGEMOUNTPATH/etc/fstab
1212
/dev/disk/by-slot/active/system / ext4 rw,relatime,errors=remount-ro,commit=30 0 1
13-
/dev/disk/by-slot/active/boot /boot/firmware vfat defaults,rw,nofail 0 2
13+
/dev/disk/by-slot/active/boot /boot/firmware vfat defaults,rw,noatime,nofail 0 2
1414
LABEL=USERDATA /data ext4 rw,relatime,nofail,commit=30 0 2
15-
LABEL=BOOTFS /bootfs vfat defaults,rw 0 2
15+
LABEL=BOOTFS /bootfs vfat defaults,rw,noatime,errors=panic 0 2
1616
EOF
1717
;;
1818
BOOT)

image/mbr/simple_dual/genimage.cfg.in.btrfs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ image <IMAGE_NAME>.<IMAGE_SUFFIX> {
3939
image boot.vfat {
4040
vfat {
4141
label = "BOOT"
42-
extraargs = "-s 4 -S <SECTOR_SIZE> -i <BOOT_UUID>"
42+
extraargs = "-S <SECTOR_SIZE> -i <BOOT_UUID>"
4343
}
4444
size = <FW_SIZE>
4545
mountpoint = "/boot/firmware"

image/mbr/simple_dual/genimage.cfg.in.ext4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ image <IMAGE_NAME>.<IMAGE_SUFFIX> {
3939
image boot.vfat {
4040
vfat {
4141
label = "BOOT"
42-
extraargs = "-s 4 -S <SECTOR_SIZE> -i <BOOT_UUID>"
42+
extraargs = "-S <SECTOR_SIZE> -i <BOOT_UUID>"
4343
}
4444
size = <FW_SIZE>
4545
mountpoint = "/boot/firmware"

image/mbr/simple_dual/setup-clear.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ EOF
2424
esac
2525

2626
cat << EOF >> $IMAGEMOUNTPATH/etc/fstab
27-
UUID=${BOOTUUID^^} /boot/firmware vfat rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 2
27+
UUID=${BOOTUUID^^} /boot/firmware vfat defaults,rw,noatime,errors=remount-ro 0 2
2828
EOF
2929
;;
3030
BOOT)

image/mbr/simple_dual/setup-crypt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ EOF
2323
esac
2424

2525
cat << EOF >> $IMAGEMOUNTPATH/etc/fstab
26-
UUID=${BOOTUUID^^} /boot/firmware vfat rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 2
26+
UUID=${BOOTUUID^^} /boot/firmware vfat defaults,rw,noatime,errors=remount-ro 0 2
2727
EOF
2828
;;
2929
BOOT)

0 commit comments

Comments
 (0)