6a38aa83b6
On platforms that use ACPI instead of Device Tree (DT), such as Ranchu x86/x86_64, /proc/device-tree/firmware/android/ does not exist. As a result, Android O is unable to mount /system, etc. at the first stage of init: init: First stage mount skipped (missing/incompatible fstab in device tree) Those platforms may create another directory that mimics the layout of the standard DT directory in procfs, and store early mount configuration there. E.g., Ranchu x86/x86_64 creates one in sysfs using information encoded in the ACPI tables: https://android-review.googlesource.com/442472 https://android-review.googlesource.com/443432 https://android-review.googlesource.com/442393 https://android-review.googlesource.com/442395 Therefore, instead of hardcoding the Android DT path, load it from the kernel command line using a new Android-specific property key ("androidboot.android_dt_dir"). If no such property exists, fall back to the standard procfs path (so no change is needed for DT- aware platforms). Note that init/ and fs_mgr/ each have their own copy of the Android DT path, because they do not share any global state. A future CL should remove the duplication by refactoring. With this CL as well as the above ones, the said warning is gone, but early mount fails. That is a separate bug, though, and will be addressed by another CL. Test: Boot patched sdk_phone_x86-userdebug system image with patched Goldfish 3.18 x86 kernel in patched Android Emulator, verify the "init: First stage mount skipped" warning no longer shows in dmesg. Signed-off-by: Yu Ning <yu.ning@intel.com> (cherry picked from commit c08d2cb0fb7ce470e128c7571553aa12ae9b57a4) Change-Id: Ia8d5f68e044fde0ecf5c7b14e40f040ff42bc35d |
||
---|---|---|
.. | ||
include | ||
include_fstab/fstab | ||
.clang-format | ||
Android.bp | ||
Android.mk | ||
fs_mgr.cpp | ||
fs_mgr_avb.cpp | ||
fs_mgr_avb_ops.cpp | ||
fs_mgr_boot_config.cpp | ||
fs_mgr_dm_ioctl.cpp | ||
fs_mgr_format.cpp | ||
fs_mgr_fstab.cpp | ||
fs_mgr_main.cpp | ||
fs_mgr_priv.h | ||
fs_mgr_priv_avb_ops.h | ||
fs_mgr_priv_boot_config.h | ||
fs_mgr_priv_dm_ioctl.h | ||
fs_mgr_priv_sha.h | ||
fs_mgr_slotselect.cpp | ||
fs_mgr_verity.cpp |