From 2b78dc8899676772f68d1b269bfa4e005eb58642 Mon Sep 17 00:00:00 2001 From: Sebastiano Barezzi Date: Wed, 29 Jun 2022 09:29:32 +0200 Subject: [PATCH] exynos9610: 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 --- BoardConfigCommon.mk | 1 - common.mk | 3 ++- configs/fstab.exynos9610 | 3 ++- recovery.fstab | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 62bea3d..146f27e 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -79,7 +79,6 @@ BOARD_DTBO_CFG := $(COMMON_PATH)/configs/dtboimg.cfg BOARD_KERNEL_SEPARATED_DTBO := true ## Filesystem -BOARD_BUILD_SYSTEM_ROOT_IMAGE := true BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 TARGET_COPY_OUT_VENDOR := vendor TARGET_FS_CONFIG_GEN += $(COMMON_PATH)/config.fs diff --git a/common.mk b/common.mk index 1a51e52..5e761b6 100644 --- a/common.mk +++ b/common.mk @@ -192,7 +192,8 @@ PRODUCT_COPY_FILES += \ $(COMMON_PATH)/configs/init/rild.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/rild.rc \ $(COMMON_PATH)/configs/init/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \ $(COMMON_PATH)/configs/init/vendor.mmi.carrier.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/vendor.mmi.carrier.rc \ - $(COMMON_PATH)/configs/fstab.exynos9610:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.exynos9610 + $(COMMON_PATH)/configs/fstab.exynos9610:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.exynos9610 \ + $(COMMON_PATH)/configs/fstab.exynos9610:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.exynos9610 # Keymaster PRODUCT_PACKAGES += \ diff --git a/configs/fstab.exynos9610 b/configs/fstab.exynos9610 index 233e61f..19557ce 100644 --- a/configs/fstab.exynos9610 +++ b/configs/fstab.exynos9610 @@ -4,7 +4,8 @@ # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -/dev/block/bootdevice/by-name/system / ext4 ro wait,slotselect +/dev/block/by-name/system /system ext4 ro wait,slotselect,first_stage_mount +/dev/block/by-name/vendor /vendor ext4 ro wait,slotselect,avb,first_stage_mount /dev/block/bootdevice/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,nobarrier,inline_xattr,inline_data,reserve_root=32768,resgid=1065 wait,check,formattable,fileencryption=aes-256-xts,quota,reservedsize=128M /dev/block/bootdevice/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,barrier=1,rw wait /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,notrim diff --git a/recovery.fstab b/recovery.fstab index ed1063b..88996bc 100644 --- a/recovery.fstab +++ b/recovery.fstab @@ -4,7 +4,8 @@ # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -/dev/block/bootdevice/by-name/system / ext4 ro wait,slotselect +/dev/block/by-name/system /system ext4 ro wait,slotselect,first_stage_mount +/dev/block/by-name/vendor /vendor ext4 ro wait,slotselect,avb,first_stage_mount /dev/block/bootdevice/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,nobarrier,inline_xattr,inline_data,reserve_root=32768,resgid=1065 wait,check,formattable,fileencryption=aes-256-xts,quota,reservedsize=128M /dev/block/bootdevice/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,barrier=1,rw wait /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,notrim -- 2.20.1