Add /mnt/vm and mount tmpfs onto it for early VM
It will be used as a storage for early boot virtmgr.
Bug: 354059281
Test: boot and check /mnt/vm
Change-Id: I4a0c604161356b631c21913a0f8c3f2d796a3c65
diff --git a/rootdir/init.rc b/rootdir/init.rc
index b804c1b..7c089c2 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -648,6 +648,14 @@
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