Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79f875f2 authored by Bowgo Tsai's avatar Bowgo Tsai
Browse files

Moving skip_mount.cfg to system_ext partition

We're now adding a core CSI system.img that is common across different
targets. So GSI-specific files should be moved to system_ext partition.

Note that GSI is a system.img that includes the contents of product and
system_ext partitions, under /system/product and /system/system_ext,
respectively. That's why it's under /system/system_ext instead of
/system or /system_ext.

Bug: 137711197
Test: boot GSI on crosshatch
Change-Id: I1ee54c1a434f2d7cf34b4ea2cbda9c732ec932a1
parent a9ffef27
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -706,10 +706,12 @@ bool ReadFstabFromDt(Fstab* fstab, bool log) {

// For GSI to skip mounting /product and /system_ext, until there are well-defined interfaces
// between them and /system. Otherwise, the GSI flashed on /system might not be able to work with
// /product and /system_ext. When they're skipped here, /system/product and /system/system_ext in
// GSI will be used.
// device-specific /product and /system_ext. skip_mount.cfg belongs to system_ext partition because
// only common files for all targets can be put into system partition. It is under
// /system/system_ext because GSI is a single system.img that includes the contents of system_ext
// partition and product partition under /system/system_ext and /system/product, respectively.
bool SkipMountingPartitions(Fstab* fstab) {
    constexpr const char kSkipMountConfig[] = "/system/etc/init/config/skip_mount.cfg";
    constexpr const char kSkipMountConfig[] = "/system/system_ext/etc/init/config/skip_mount.cfg";

    std::string skip_config;
    auto save_errno = errno;