Commit Graph

35730 Commits

Author SHA1 Message Date
Chih-Hung Hsieh b7486369df Merge "Fix misc-macro-parentheses warnings in system/core." am: e4bd153e55 am: dfaa20c069 am: 3d0ff4ee98
am: c3357de3fd

Change-Id: I3c3c048851fe44a260a7f952b89d5b5dd72a4b4e
2017-08-01 23:38:19 +00:00
Chih-Hung Hsieh c3357de3fd Merge "Fix misc-macro-parentheses warnings in system/core." am: e4bd153e55 am: dfaa20c069
am: 3d0ff4ee98

Change-Id: Id161056885d346583e66ca49bf10934bc01e619f
2017-08-01 23:34:26 +00:00
Chih-Hung Hsieh 3d0ff4ee98 Merge "Fix misc-macro-parentheses warnings in system/core." am: e4bd153e55
am: dfaa20c069

Change-Id: I2a2376e19bdd415f784f708e2b8c910734e866a9
2017-08-01 23:29:59 +00:00
Chih-Hung Hsieh dfaa20c069 Merge "Fix misc-macro-parentheses warnings in system/core."
am: e4bd153e55

Change-Id: I6b38149a0fa15874eff68cbf7ee62e4acd41c595
2017-08-01 23:26:06 +00:00
Treehugger Robot e4bd153e55 Merge "Fix misc-macro-parentheses warnings in system/core." 2017-08-01 23:08:18 +00:00
Chih-Hung Hsieh 85244e8bc2 Fix misc-macro-parentheses warnings in system/core.
Add NOLINT comment to work around clang-tidy
error in checking macro arguments used in
type expressions.

Bug: 28705665
Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \
      WITH_TIDY_FLAGS=-header-filter=system/core/.*

Change-Id: I7619978c1804e151a11a8b0477e80076bcf21cab
2017-08-01 22:12:57 +00:00
Tom Cherry 48b9bccf48 Merge changes Ibd57c103,I81f1e8ac,Ia6e546fe am: 2a2a8d9ec0 am: b1c18af247 am: 3d6b46a789
am: c31c4d5c6d

Change-Id: I0c20d57379aa545ea91633e33a7583604d947a52
2017-08-01 20:35:46 +00:00
Tom Cherry c31c4d5c6d Merge changes Ibd57c103,I81f1e8ac,Ia6e546fe am: 2a2a8d9ec0 am: b1c18af247
am: 3d6b46a789

Change-Id: I704cb309efb106cff34c28b9c7fde3e86bb34cc0
2017-08-01 20:32:12 +00:00
Tom Cherry 3d6b46a789 Merge changes Ibd57c103,I81f1e8ac,Ia6e546fe am: 2a2a8d9ec0
am: b1c18af247

Change-Id: I501b47b2aecaed3b4c15636f09bd337b4ea799c0
2017-08-01 20:29:10 +00:00
Tom Cherry b1c18af247 Merge changes Ibd57c103,I81f1e8ac,Ia6e546fe
am: 2a2a8d9ec0

Change-Id: Id39de0d3d62c1e0f3585ae7817940dbbebfa6ae3
2017-08-01 20:25:57 +00:00
Tom Cherry 2a2a8d9ec0 Merge changes Ibd57c103,I81f1e8ac,Ia6e546fe
* changes:
  init: rename ServiceManager to ServiceList and clean it up
  init: move reaping from ServiceManager to signal_handler.cpp
  init: move exec operations out of ServiceManager
2017-08-01 20:15:02 +00:00
Tom Cherry 911b9b1d6e init: rename ServiceManager to ServiceList and clean it up
ServiceManager is essentially just a list now that the rest of its
functionality has been moved elsewhere, so the class is renamed
appropriately.

The ServiceList::Find* functions have been cleaned up into a single
smaller interface.
The ServiceList::ForEach functions have been removed in favor of
ServiceList itself being directly iterable.

Test: boot bullhead
Change-Id: Ibd57c103338f03b83d81e8b48ea0e46cd48fd8f0
2017-08-01 11:06:17 -07:00
Tom Cherry eeee83106b init: move reaping from ServiceManager to signal_handler.cpp
signal_handler.cpp itself needs to be cleaned up, but this is a step
to clean up ServiceManager.

Test: boot bullhead
Change-Id: I81f1e8ac4d09692cfb364bc702cbd3deb61aa55a
2017-08-01 11:06:17 -07:00
Tom Cherry 3b81f2d623 init: move exec operations out of ServiceManager
These can be implemented without ServiceManager, so we remove them and
make ServiceManager slightly less of a God class.

Test: boot bullhead
Test: init unit tests
Change-Id: Ia6e546fe5292255412245256f7d230af4ece135f
2017-08-01 11:06:04 -07:00
Tom Cherry f62a7f56fe Merge "init: fix process restarting" am: eb3fa92191 am: 25422816d4 am: b435774e01
am: 2f77438b4d

Change-Id: I212c1f8e5f08f11d071dc1e46f929aa18e9da06d
2017-08-01 17:15:00 +00:00
Tom Cherry 2f77438b4d Merge "init: fix process restarting" am: eb3fa92191 am: 25422816d4
am: b435774e01

Change-Id: Ibbf50172f4a6358363e2d1889ae631eaeca8004c
2017-08-01 17:11:08 +00:00
Tom Cherry b435774e01 Merge "init: fix process restarting" am: eb3fa92191
am: 25422816d4

Change-Id: I4b55c13edc6a3f8076acbe878078913f35f17e26
2017-08-01 17:07:31 +00:00
Tom Cherry 25422816d4 Merge "init: fix process restarting"
am: eb3fa92191

Change-Id: Ic03cf607631c49c1d37584f7641d9300a79f5457
2017-08-01 17:04:44 +00:00
Tom Cherry eb3fa92191 Merge "init: fix process restarting" 2017-08-01 16:53:52 +00:00
Jin Qian 88ab692797 Merge "fastboot: call mke2fs to format ext4 filesystem on windows" am: c7ba2bb5a3 am: 1cb98847d5 am: e8c5ebb887
am: 10db8729f2

Change-Id: I133a0af95cde272516754d2b7596e184bf9c3ab9
2017-08-01 02:54:19 +00:00
Jin Qian 10db8729f2 Merge "fastboot: call mke2fs to format ext4 filesystem on windows" am: c7ba2bb5a3 am: 1cb98847d5
am: e8c5ebb887

Change-Id: I97658c9eed8875e816229f48690adfb894e1bcf3
2017-08-01 02:50:47 +00:00
Jin Qian e8c5ebb887 Merge "fastboot: call mke2fs to format ext4 filesystem on windows" am: c7ba2bb5a3
am: 1cb98847d5

Change-Id: I5ab0c2adcbca1fcb11db77c442c2cb5bcaa33db0
2017-08-01 02:47:49 +00:00
Jin Qian 1cb98847d5 Merge "fastboot: call mke2fs to format ext4 filesystem on windows"
am: c7ba2bb5a3

Change-Id: Ic35a2eef4a8ce79e8c3d8cc3f4e1016cef5871bc
2017-08-01 02:44:48 +00:00
Jean-Luc Brouillet 92bb981750 Merge "Make the Neural Networks library loadable by apps." into oc-mr1-dev
am: 24d43899cd

Change-Id: If4efbac5db63a1a80601e6d1255acaeb234ec508
2017-08-01 02:38:38 +00:00
Treehugger Robot c7ba2bb5a3 Merge "fastboot: call mke2fs to format ext4 filesystem on windows" 2017-08-01 02:35:31 +00:00
Jean-Luc Brouillet 24d43899cd Merge "Make the Neural Networks library loadable by apps." into oc-mr1-dev 2017-08-01 02:26:10 +00:00
Jin Qian a99d0ad734 Merge "fastboot: enable uninit_bg for ext4" am: be4eec05e8 am: 73b1567f54 am: e8cd28194c
am: 42427edd01

Change-Id: I25b0797238daf2f201192c40ea8394d2039958f5
2017-08-01 02:21:49 +00:00
Jin Qian 42427edd01 Merge "fastboot: enable uninit_bg for ext4" am: be4eec05e8 am: 73b1567f54
am: e8cd28194c

Change-Id: I4f6bb03c58cbbf0a2aa9c4609e0c70058914b4e6
2017-08-01 02:15:03 +00:00
Jin Qian e8cd28194c Merge "fastboot: enable uninit_bg for ext4" am: be4eec05e8
am: 73b1567f54

Change-Id: I1ee1de64ecc19aa1c4541a576f5eefce8f1e945c
2017-08-01 02:05:29 +00:00
Jin Qian 73b1567f54 Merge "fastboot: enable uninit_bg for ext4"
am: be4eec05e8

Change-Id: I1773de0cce8bdde4b58c02902d9466f896ccee00
2017-08-01 02:01:28 +00:00
Treehugger Robot be4eec05e8 Merge "fastboot: enable uninit_bg for ext4" 2017-08-01 01:55:26 +00:00
Yu Ning 7b1d17e38a Allow the use of a custom Android DT directory
am: 6a38aa83b6

Change-Id: I10a5e6cea7e6030069eadcf3a961d4303cea8203
2017-08-01 00:42:02 +00:00
Jin Qian 29fc859a6d fastboot: call mke2fs to format ext4 filesystem on windows
Bug: 35219933
Change-Id: I0cc8c165176e8dc9cbe4b6a52679937bc872e2d0
2017-08-01 00:19:56 +00:00
Jin Qian 99e3964e0d fastboot: enable uninit_bg for ext4
This speeds up mke2fs as well as e2fsck.

Bug: 23686092
Bug: 64032335
Change-Id: I9f2d4c15e431647bb845d50a2361b2a9a091fba6
2017-07-31 23:57:39 +00:00
Tom Cherry d269e3a795 init: fix process restarting
The time data types associated with restarting processes halfway moved
to std::chrono and halfway didn't.  In this intermediate state, the
times would get converted from nanoseconds to seconds then to
milliseconds.  The precision lost when converting to seconds would
cause the main loop of init to spin whenever a process was within a
second of being restarted.

This patch cleans up this logic and uses nanoseconds and milliseconds
explicitly, with a ceiling to milliseconds to prevent unneeded
spinning.

Test: boot bullhead, kill processes, see that they restart sanely.

Change-Id: I0b017ba0e50c09704b0c5cdfcde1dba461804593
2017-07-31 16:00:18 -07:00
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
Bo Hu 01128555ac Merge "Allow the use of a custom Android DT directory" am: 6fa0884188 am: 8b2e0e03d4 am: 8bdf7ed10e
am: 5e8de93697

Change-Id: I065dbef72e7bc4d6233c9f73786139a78e9098d8
2017-07-29 07:12:49 +00:00
Bo Hu 5e8de93697 Merge "Allow the use of a custom Android DT directory" am: 6fa0884188 am: 8b2e0e03d4
am: 8bdf7ed10e

Change-Id: I6e924fb7f52650343ba4ae591e09deee6a366905
2017-07-29 07:10:18 +00:00
Bo Hu 8bdf7ed10e Merge "Allow the use of a custom Android DT directory" am: 6fa0884188
am: 8b2e0e03d4

Change-Id: I5c5f80c6c55ff8d7bae1f52593dec3ef6efa9908
2017-07-29 07:07:48 +00:00
Bo Hu 8b2e0e03d4 Merge "Allow the use of a custom Android DT directory"
am: 6fa0884188

Change-Id: I1c37cb0c809b2ed51d61e6b1e8ea87830e48eda5
2017-07-29 07:05:18 +00:00
Bo Hu 6fa0884188 Merge "Allow the use of a custom Android DT directory" 2017-07-29 06:58:07 +00:00
James Hawkins 0b553ccab0 bootstat: Log even more boot reasons.
am: f415d1253c

Change-Id: I0dad1435de7f551c0748752d4c23f8c00e48a57f
2017-07-29 03:44:30 +00:00
James Hawkins f415d1253c bootstat: Log even more boot reasons.
Bug: 27555866
Test: None
Change-Id: I8ab6597a323f5973d8b1c22c2c7422ef0c2efcc3
(cherry picked from commit 8d7f63da26)
2017-07-28 14:50:16 -07:00
Tom Cherry 56fd494914 Merge "init: remove Parser singleton and related cleanup" am: 379123f9ab am: bf4afbb288 am: 1b74d14b7e
am: a78298e8a6

Change-Id: I3aaa252ad83a982a471188d5fc2f84f258892cd6
2017-07-28 16:50:47 +00:00
Tom Cherry a78298e8a6 Merge "init: remove Parser singleton and related cleanup" am: 379123f9ab am: bf4afbb288
am: 1b74d14b7e

Change-Id: Ifaaeae8fb3f43235846207fa02a83edbc1e427d9
2017-07-28 16:42:55 +00:00
Tom Cherry 1b74d14b7e Merge "init: remove Parser singleton and related cleanup" am: 379123f9ab
am: bf4afbb288

Change-Id: Ie2e9d6b92bbc6011796c63da990c44281046b59a
2017-07-28 16:39:57 +00:00
Tom Cherry bf4afbb288 Merge "init: remove Parser singleton and related cleanup"
am: 379123f9ab

Change-Id: I3ef698fb1f18bcaf7dd5e1c01f1fb01bead2aa0a
2017-07-28 16:36:54 +00:00
Tom Cherry 379123f9ab Merge "init: remove Parser singleton and related cleanup" 2017-07-28 16:29:36 +00:00
Joel Galenson c6674713fb Merge "Move chmod of /sys/kernel/debug/tracing to fix tracing." am: 13c3a582de am: c4f2163954 am: 68e79940ea
am: 4de04ccb6b

Change-Id: I82d5f376a1b38d0773d9e1277388d4e58c77e823
2017-07-28 16:23:55 +00:00
Joel Galenson 4de04ccb6b Merge "Move chmod of /sys/kernel/debug/tracing to fix tracing." am: 13c3a582de am: c4f2163954
am: 68e79940ea

Change-Id: Ie2ca46038cef82d7a63bed3473656c17e94bb503
2017-07-28 16:17:53 +00:00