init: chroot from recovery to /first_stage_ramdisk
When using the recovery image as a trampoline to boot the system,
first chroot from the recovery image to /first_stage_ramdisk, to
minimize differences between these two boot paths.
Primary motivation is due to the fact that the basename of each mount
point is used by device-manager to name its nodes, and the previous
code that created used /system_recovery_mount as the mount point for
system.img broke AVB. Instead of hacking around that issue, this
change unified mounting for the recovery trampoline and true first
stage ramdisk paths.
Bug: 114062208
Test: AVB works with blueline_mainline
Change-Id: Iffb154962b6e160150917e068f1e7d0bf7cb84e7
diff --git a/init/switch_root.h b/init/switch_root.h
index d515e5d..e12ccee 100644
--- a/init/switch_root.h
+++ b/init/switch_root.h
@@ -21,7 +21,7 @@
namespace android {
namespace init {
-void SwitchRoot(const std::string& new_root);
+void SwitchRoot(const std::string& new_root, bool move_root_mount);
} // namespace init
} // namespace android