Mount /mnt/vm earlier
To support early VM in the init stage.
Bug: 331320802
Test: boot and check /mnt/vm
Change-Id: If6f20a616ad24ae194e6fae292c9be200b63185b
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 63e3d06..4b3ad82 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -495,6 +495,14 @@
start hwservicemanager
start vndservicemanager
+ # Mount /mnt/vm ASAP to allow early VMs to run.
+ mkdir /mnt/vm 0755 root root
+ mount tmpfs tmpfs /mnt/vm nosuid nodev noexec rw
+ restorecon /mnt/vm
+ chown system system /mnt/vm
+ chmod 0770 /mnt/vm
+ mkdir /mnt/vm/early 0770 system system
+
# Run boringssl self test for each ABI. Any failures trigger reboot to firmware.
import /system/etc/init/hw/init.boringssl.${ro.zygote}.rc
@@ -661,14 +669,6 @@
chmod 0755 /sys/kernel/tracing
chmod 0755 /sys/kernel/debug/tracing
- # Early HALs may use early VM. Mount /mnt/vm before starting such HALs.
- mkdir /mnt/vm 0755 root root
- mount tmpfs tmpfs /mnt/vm nosuid nodev noexec rw
- restorecon /mnt/vm
- chown system system /mnt/vm
- chmod 0770 /mnt/vm
- mkdir /mnt/vm/early 0770 system system
-
# HALs required before storage encryption can get unlocked (FBE)
class_start early_hal