Commit Graph

35360 Commits

Author SHA1 Message Date
Tom Cherry 99a538a4bb Merge "init: use unique_fd in builtins.cpp" am: c34afb1cd5 am: 76756aa1dd
am: 54032d387a

Change-Id: I20865544dd1692979c8fbd21c05272a98c00eca4
2017-08-02 17:27:03 +00:00
Tom Cherry 54032d387a Merge "init: use unique_fd in builtins.cpp" am: c34afb1cd5
am: 76756aa1dd

Change-Id: Idbb7f13966643faa2e38ac954e21d6af2daed4f5
2017-08-02 17:22:30 +00:00
Tom Cherry 76756aa1dd Merge "init: use unique_fd in builtins.cpp"
am: c34afb1cd5

Change-Id: I9f1fef77ab4d3f873180f305177e586d44a22c49
2017-08-02 17:18:33 +00:00
Tom Cherry c34afb1cd5 Merge "init: use unique_fd in builtins.cpp" 2017-08-02 17:09:31 +00:00
Christopher Ferris aaea04cf0d Merge "Revert "Add support for the new unwind method."" am: 0d2cac9ea8 am: ce7c7c04d9
am: b736134dc9

Change-Id: I7369d1089ff5734bb69ad8add610c0790b797e7b
2017-08-02 02:18:37 +00:00
Christopher Ferris b736134dc9 Merge "Revert "Add support for the new unwind method."" am: 0d2cac9ea8
am: ce7c7c04d9

Change-Id: Ia61d452721e9ec76823cf766a738f53ccd9b2c37
2017-08-02 02:14:35 +00:00
Christopher Ferris ce7c7c04d9 Merge "Revert "Add support for the new unwind method.""
am: 0d2cac9ea8

Change-Id: I68903c1641ee0d439dc5f839b968cff4b739dd84
2017-08-02 02:06:06 +00:00
Christopher Ferris 0d2cac9ea8 Merge "Revert "Add support for the new unwind method."" 2017-08-02 01:49:03 +00:00
Christopher Ferris bd625efbca Revert "Add support for the new unwind method."
This reverts commit 5b460d13a4.

Reason for revert: Strange sailfish boot problem.

Change-Id: Ibde9375405cca4343c262335647dac120aab4d73
2017-08-02 01:47:31 +00:00
Christopher Ferris 0a063d5736 Merge "Add support for the new unwind method." am: 9ccf627e78 am: 61ef596862
am: 8216b64545

Change-Id: I586fa7b51c6ee6d86d2c8f39eaed01e5e49cff43
2017-08-01 23:37:55 +00:00
Christopher Ferris 8216b64545 Merge "Add support for the new unwind method." am: 9ccf627e78
am: 61ef596862

Change-Id: Ia13d7a19837313eccabb7c0fd84eebb5a7ae5236
2017-08-01 23:34:26 +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
Christopher Ferris 61ef596862 Merge "Add support for the new unwind method."
am: 9ccf627e78

Change-Id: Ie03fea9039dba17957a47edbc6d79e9c0727c86c
2017-08-01 23:29:59 +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
Christopher Ferris 9ccf627e78 Merge "Add support for the new unwind method." 2017-08-01 23:22:42 +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 7037991f04 init: use unique_fd in builtins.cpp
Test: boot

Change-Id: I09295856dbd0de9436a95a2fe99ab6be156b995f
2017-08-01 14:22:44 -07: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 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 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
Treehugger Robot c7ba2bb5a3 Merge "fastboot: call mke2fs to format ext4 filesystem on windows" 2017-08-01 02:35:31 +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
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
Christopher Ferris 5b460d13a4 Add support for the new unwind method.
Also add a comment to the GetElf function to indicate that it never returns
nullptr.

Bug: 23762183

Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.

Change-Id: I252b9c2497e2d3d94347dd6e506170bf50cbfe16
2017-07-31 13:00:35 -07: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
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