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

Commit 4ed7632c authored by Tiffany Yang's avatar Tiffany Yang Committed by Automerger Merge Worker
Browse files

Merge "init: Wait for /dev/hvc1 during ARCVM first-stage mount" into main am: ccb950f9

parents 140b20cc ccb950f9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -305,6 +305,11 @@ bool FirstStageMountVBootV2::InitDevices() {
            return false;
        }
    }

    if (IsArcvm() && !block_dev_init_.InitHvcDevice("hvc1")) {
        return false;
    }

    return true;
}

+2 −0
Original line number Diff line number Diff line
@@ -474,6 +474,8 @@ void SelinuxRestoreContext() {
    RestoreconIfExists(SnapshotManager::GetGlobalRollbackIndicatorPath().c_str(), 0);
    RestoreconIfExists("/metadata/gsi",
                       SELINUX_ANDROID_RESTORECON_RECURSE | SELINUX_ANDROID_RESTORECON_SKIP_SEHASH);

    RestoreconIfExists("/dev/hvc1", 0);
}

int SelinuxKlogCallback(int type, const char* fmt, ...) {
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <sys/stat.h>
#include <sys/types.h>
#include <sys/unistd.h>

#include <chrono>
#include <functional>
@@ -108,6 +109,10 @@ inline constexpr bool IsMicrodroid() {
#endif
}

inline bool IsArcvm() {
    return !access("/is_arcvm", F_OK);
}

bool Has32BitAbi();

std::string GetApexNameFromFileName(const std::string& path);