mata: Switch to two-stage init mounting

* Stop handling vendor mounting from kernel, first stage init is gonna
  do that, together with system (which is now /system)
* Use correct mount flags coming from kernel dts
* Move system and vendor mount points to /dev/block/by-name/, we don't
  have bootdevice symlink to that point in init
* Copy fstab to recovery for first stage init

Change-Id: Iaa0ecc3f13c3cfd3fe357ca509549d0f68a29cf0
This commit is contained in:
Sebastiano Barezzi
2023-11-09 17:54:41 +01:00
committed by Nolen Johnson
parent ddb6310791
commit c492ae2429
3 changed files with 12 additions and 2 deletions

View File

@ -98,7 +98,6 @@ BOARD_BOOTIMAGE_PARTITION_SIZE := 536870912 # 500MB
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4294967296 # 4GB
BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 # 1GB
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
BOARD_FLASH_BLOCK_SIZE := 0x40000
BOARD_USES_RECOVERY_AS_BOOT := true
TARGET_COPY_OUT_VENDOR := vendor

View File

@ -7,10 +7,20 @@ include $(CLEAR_VARS)
LOCAL_MODULE := fstab.mata
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_REQUIRED_MODULES := fstab.mata_ramdisk
LOCAL_SRC_FILES := etc/fstab.mata
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.mata_ramdisk
LOCAL_MODULE_STEM := fstab.mata
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/fstab.mata
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.persist
LOCAL_MODULE_TAGS := optional

View File

@ -3,7 +3,8 @@
# 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/soc/1da4000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify
/dev/block/platform/soc/1da4000.ufshc/by-name/system /system ext4 ro,barrier=1 wait,slotselect,verify,first_stage_mount
/dev/block/platform/soc/1da4000.ufshc/by-name/vendor /vendor ext4 ro,barrier=1 wait,slotselect,first_stage_mount
/dev/block/platform/soc/1da4000.ufshc/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,formattable,fileencryption=ice,quota
/dev/block/platform/soc/1da4000.ufshc/by-name/misc /misc emmc defaults defaults
/dev/block/platform/soc/1da4000.ufshc/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait,slotselect