No description
Find a file
Yu Ning 6a38aa83b6 Allow the use of a custom Android DT directory
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
2017-07-31 15:27:09 -07:00
adb Merge "adbd: add logging to troubleshoot usb issues." into oc-dr1-dev 2017-07-27 15:34:59 +00:00
adf libadfhwc: Fix adf_hwc_close 2017-03-02 17:40:16 +00:00
base Move Timer from init to libbase 2017-07-10 09:28:24 -07:00
bootstat bootstat: Log even more boot reasons. 2017-07-28 14:50:16 -07:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd DO NOT MERGE ANYWHERE tombstoned: Avoid creating the tombstoned_java_trace socket. 2017-07-25 13:17:01 +01:00
demangle Mark libdemangle as vendor_available 2017-06-14 18:58:22 +09:00
fastboot fastboot: add mke2fs and e2fsdroid to build package 2017-07-19 15:21:15 -07:00
fs_mgr Allow the use of a custom Android DT directory 2017-07-31 15:27:09 -07:00
gatekeeperd Merge "system/core: use proper nativehelper headers" am: 4f59afe9fa am: 6208cd1322 am: 106c355688 2017-07-19 15:39:36 +00:00
healthd resolve merge conflicts of 74a5f22d9 to oc-dr1-dev-plus-aosp 2017-07-19 18:25:51 -07:00
include Merge "Move libnativebridge headers into the module." 2017-07-06 23:36:34 +00:00
init Allow the use of a custom Android DT directory 2017-07-31 15:27:09 -07:00
libappfuse Remove ScopedLogSeverity for debugging 2017-07-14 16:44:16 +09:00
libbacktrace Cleanup the libbacktrace interface a bit. 2017-07-19 15:36:32 -07:00
libbinderwrapper libbinderwrapper: Android.mk -> Android.bp 2017-04-25 15:55:26 -07:00
libcrypto_utils Add vendor_available:true to libcrypto_utils 2017-05-16 11:51:09 -07:00
libcutils Merge "Remove more documentation for obsolete board configuration." am: 73a6512bab am: 09181f3dd9 2017-06-30 00:07:45 +00:00
libdiskconfig Mark libdiskconfig vendor_available. 2017-05-31 01:54:31 +00:00
libgrallocusage Mark libgrallocusage as vendor_available 2017-05-04 12:25:43 +09:00
libion Mark libion vendor_available. 2017-05-31 01:56:38 +00:00
libkeyutils Add libkeyutils. 2017-05-10 14:53:28 -07:00
liblog Add sys/cdefs.h to log/log_main.h. 2017-07-17 17:59:35 -07:00
libmemtrack libmemtrack: check return value for getMemory() 2017-02-27 12:21:39 -08:00
libmemunreachable Merge "libmemunreachable: track kernel binder references" 2017-07-13 19:41:26 +00:00
libmetricslogger Revert "Mark libmetricslogger vendor_available." 2017-07-17 19:33:17 +00:00
libnativebridge Move libnativebridge headers into the module. 2017-07-06 11:23:16 -07:00
libnativeloader system/core: use proper nativehelper headers 2017-07-18 17:03:20 -07:00
libnetutils Mark libnetutils vendor_available. 2017-05-31 02:02:17 +00:00
libpackagelistparser liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libpixelflinger Va_end should be used with va_start 2017-03-23 22:41:42 +01:00
libprocessgroup Add memcg related configs to init. 2017-07-18 15:58:40 -07:00
libprocinfo libprocinfo: add support for parsing process state. 2017-06-27 15:06:27 -07:00
libsparse Merge "libsparse: Fix odd-sized input files total_blks" am: 652ce94f40 am: ab74c778df 2017-04-19 19:26:27 +00:00
libsuspend Merge "Mark libsuspend vendor_available." am: 6e2d24ab5a am: 1c8e482995 am: 89fc3a6525 2017-05-25 17:38:16 +00:00
libsync Fix NDK libsync to match ndk/sync.h 2017-06-13 23:03:28 -07:00
libsystem fix circular dependency libnativewindow <-> libui 2017-05-09 15:15:50 -07:00
libsysutils Remove old LOG_EVENT_* code from libsysutils 2017-07-11 15:14:26 -07:00
libunwindstack Speed up StepIfSignalHandler path. 2017-07-19 21:35:46 +00:00
libusbhost Merge "Convert libusbhost to Android.bp" am: a58c4b5bcd am: dff208c80c 2017-04-20 17:24:57 +00:00
libutils Merge "Remove ALOGD_IF_SLOW" 2017-07-18 17:20:39 +00:00
libvndksupport Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev 2017-05-31 07:01:41 +00:00
libziparchive Libziparchive: Export headers in defaults 2017-07-05 22:03:44 -07:00
lmkd Make lmkd use medium/critical mem pressure, and update soft limit based on adj score. 2017-06-14 13:28:44 -07:00
logcat logcat: Add missing newline to read failure 2017-07-08 17:51:27 +02:00
logd Add logd CTS tests to VTS 2017-07-10 11:17:38 -07:00
logwrapper Merge "logwrapper: add a benchmark for android_fork_execvp_ext" 2017-03-23 11:56:10 +00:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 16:06:37 -07:00
qemu_pipe Mark libqemu_pipe vendor_available 2017-06-08 14:16:11 -07:00
reboot Convert more Android.mk files to Android.bp 2016-07-13 17:41:45 -07:00
rootdir Merge "Add system/${LIB}/vndk to default namespace for vendor." into oc-mr1-dev 2017-07-27 15:47:48 +00:00
run-as Define range of GIDs for cached app data. 2016-12-13 13:28:08 -07:00
sdcard Make sdcardfs the default 2017-03-20 13:11:10 -07:00
shell_and_utilities Remove reference to deleted gzip module 2017-07-06 22:33:22 +00:00
storaged storaged: record userdata space utilization 2017-07-17 15:51:30 -07:00
toolbox Merge "Add building and installing of grep for vendor." 2017-06-16 23:24:32 +00:00
trusty Merge "system/core: use proper nativehelper headers" am: 4f59afe9fa am: 6208cd1322 2017-07-19 15:36:37 +00:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.bp Export android_filesystem_config.h as a filegroup 2017-01-17 18:20:28 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk init.rc: have hwservicemanager start the HAL class 2016-09-26 00:23:51 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00
platform_tools_tool_version.mk Fix warning on the build servers 2017-05-25 12:35:40 -07:00
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00