Split zuma fstab into two files

Common fstab entries(everything but /metadata and /data) are
moved to a separate fstab file.
This allows us to create an ext4 variant of the same fstab later.

Test: device boots
Bug: 339337171
Change-Id: I3129551c98b14473c776f2cf3dee1b81fc0c84b3
This commit is contained in:
Kelvin Zhang 2024-05-14 10:01:03 -07:00
parent fe169c6406
commit c542bcfd03
3 changed files with 26 additions and 8 deletions

View file

@ -35,7 +35,10 @@ package {
genrule { genrule {
name: "gen_fstab.zuma-hw-encrypt", name: "gen_fstab.zuma-hw-encrypt",
srcs: ["fstab.zuma.in"], srcs: [
"fstab.zuma.common",
"fstab.zuma.f2fs",
],
out: ["fstab.zuma"], out: ["fstab.zuma"],
cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" + cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" +
" -e s/@inlinecrypt@/inlinecrypt/ " + " -e s/@inlinecrypt@/inlinecrypt/ " +
@ -44,7 +47,10 @@ genrule {
genrule { genrule {
name: "gen_fstab.zuma-sw-encrypt", name: "gen_fstab.zuma-sw-encrypt",
srcs: ["fstab.zuma.in"], srcs: [
"fstab.zuma.common",
"fstab.zuma.f2fs",
],
out: ["fstab.zuma"], out: ["fstab.zuma"],
cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" + cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" +
" -e s/@inlinecrypt@// " + " -e s/@inlinecrypt@// " +
@ -53,7 +59,10 @@ genrule {
genrule { genrule {
name: "gen_fstab.zuma-no-encrypt", name: "gen_fstab.zuma-no-encrypt",
srcs: ["fstab.zuma.in"], srcs: [
"fstab.zuma.common",
"fstab.zuma.f2fs",
],
out: ["fstab.zuma"], out: ["fstab.zuma"],
cmd: "sed -e s/@fileencryption@//" + cmd: "sed -e s/@fileencryption@//" +
" -e s/@inlinecrypt@// " + " -e s/@inlinecrypt@// " +
@ -62,7 +71,10 @@ genrule {
genrule { genrule {
name: "gen_fstab.zuma-fips", name: "gen_fstab.zuma-fips",
srcs: ["fstab.zuma.in"], srcs: [
"fstab.zuma.common",
"fstab.zuma.f2fs",
],
out: ["fstab.zuma-fips"], out: ["fstab.zuma-fips"],
cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" + cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" +
" -e s/@inlinecrypt@/inlinecrypt/ " + " -e s/@inlinecrypt@/inlinecrypt/ " +

View file

@ -15,10 +15,6 @@ vendor_dlkm /vendor_dlkm
/dev/block/platform/13200000.ufs/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount /dev/block/platform/13200000.ufs/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/init_boot /init_boot emmc defaults slotselect,avb=init_boot,first_stage_mount /dev/block/platform/13200000.ufs/by-name/init_boot /init_boot emmc defaults slotselect,avb=init_boot,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/misc /misc emmc defaults wait /dev/block/platform/13200000.ufs/by-name/misc /misc emmc defaults wait
/dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,first_stage_mount,metadata_csum
#/dev/block/platform/13200000.ufs/by-name/pvmfw /pvmfw emmc defaults wait,slotselect,avb=pvmfw,first_stage_mount #/dev/block/platform/13200000.ufs/by-name/pvmfw /pvmfw emmc defaults wait,slotselect,avb=pvmfw,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,device=zoned:/dev/block/by-name/zoned_device
/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption
/dev/block/platform/13200000.ufs/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount /dev/block/platform/13200000.ufs/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount
/devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto /devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto

10
conf/fstab.zuma.f2fs Normal file
View file

@ -0,0 +1,10 @@
# Android fstab file.
#
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,device=zoned:/dev/block/by-name/zoned_device
/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption
/dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,first_stage_mount,metadata_csum