Commit graph

1816 commits

Author SHA1 Message Date
Tom Cherry
d7ca913892 Merge "Move Timer from init to libbase" am: 896297b2ef am: 7ff0b008f7 am: 4e5c4f18d8
am: c0a9cf648b

Change-Id: Idb80a901f4c0080b932b6da247150ed4ffdb6b8e
2017-07-10 18:40:54 +00:00
Tom Cherry
c0a9cf648b Merge "Move Timer from init to libbase" am: 896297b2ef am: 7ff0b008f7
am: 4e5c4f18d8

Change-Id: Iffad0dcde94fce7dac627ebf0530420f9cfd38d1
2017-07-10 18:36:54 +00:00
Tom Cherry
4e5c4f18d8 Merge "Move Timer from init to libbase" am: 896297b2ef
am: 7ff0b008f7

Change-Id: I3d1dd6eabbf17d701eefbf7363bfe6107d4de8a4
2017-07-10 18:32:54 +00:00
Tom Cherry
7ff0b008f7 Merge "Move Timer from init to libbase"
am: 896297b2ef

Change-Id: I1990fa013fa1fe69a61711faf032db45216f6f47
2017-07-10 18:28:25 +00:00
Tom Cherry
ede0d53850 Move Timer from init to libbase
Test: boot bullhead
Test: new libbase unit tests

Change-Id: Ic398a1daa1fe92c10ea7bc1e6ac3f781cee9a5b5
2017-07-10 09:28:24 -07:00
Jin Qian
e6dfd45f00 init: require e2fsdroid and mke2fs when building init am: 041f849548
am: f361c2560c

Change-Id: Ic85298e7340a6e61aeab5cfeadaf4cb7a24ade1f
2017-07-06 21:13:13 +00:00
Jin Qian
f361c2560c init: require e2fsdroid and mke2fs when building init
am: 041f849548

Change-Id: Icf49587d20a210cdcf130aacc25ecbcbfd31f06c
2017-07-06 20:55:36 +00:00
Jin Qian
041f849548 init: require e2fsdroid and mke2fs when building init
init calls fs_mgr to format ext4 partitions. This requires
e2fsdroid and mke2fs in /system/bin/

Bug: 35219933
Change-Id: Ia32fe438cd9b9332f8e18e0cbe7f61bd050adcb1
2017-07-06 11:45:06 -07:00
Keun-young Park
3b15f44041 Merge "add "shutdown critical" to service" into oc-dr1-dev 2017-07-06 17:14:23 +00:00
Tom Cherry
c680bfeaf2 init: add info logs in first stage mount if we have to poll
It's not a error case if we do not find a device that we're attempting
to regenerate uevents for during first stage mount, but it is likely
to increase boot time, so we log a message to attribute this delay.

Bug: 63327193
Test: Boot bullhead, sailfish

Merged-In: I97c2e5aefd218bbdd87717ff3c375381f725de08
Change-Id: I97c2e5aefd218bbdd87717ff3c375381f725de08
(cherry picked from commit 322e176f6a)
2017-07-06 13:04:23 +08:00
Tom Cherry
e0d1699487 Merge "init: add info logs in first stage mount if we have to poll" am: 6a9d56775f am: 11d5611ba5 am: 7b600f8012
am: 71ed340d1e

Change-Id: I722d6d71a9505d2b579a4bb9484221b73d71d50b
2017-07-06 04:55:40 +00:00
Tom Cherry
71ed340d1e Merge "init: add info logs in first stage mount if we have to poll" am: 6a9d56775f am: 11d5611ba5
am: 7b600f8012

Change-Id: I4abc2b23c0b86059d44965b0139256f7617f48dd
2017-07-06 04:53:38 +00:00
Tom Cherry
7b600f8012 Merge "init: add info logs in first stage mount if we have to poll" am: 6a9d56775f
am: 11d5611ba5

Change-Id: Ib08ea62f6fb13cfaed6bc894bcbc548ccd8c3d55
2017-07-06 04:51:08 +00:00
Tom Cherry
11d5611ba5 Merge "init: add info logs in first stage mount if we have to poll"
am: 6a9d56775f

Change-Id: I7948db4cf1d6af6f4e6d0ddb2a2788f62317126f
2017-07-06 04:48:38 +00:00
Treehugger Robot
6a9d56775f Merge "init: add info logs in first stage mount if we have to poll" 2017-07-06 04:46:05 +00:00
Tom Cherry
1b5db82fd9 Merge "ueventd: don't double fork firmware handlers" am: 0f4fb5497a am: e944b7e0a4 am: 1eee2122ca
am: 7c4b63be8c

Change-Id: I39c17229dd4043da3ed5824b7a13b2d2e8cede4a
2017-07-06 02:53:11 +00:00
Tom Cherry
7c4b63be8c Merge "ueventd: don't double fork firmware handlers" am: 0f4fb5497a am: e944b7e0a4
am: 1eee2122ca

Change-Id: I726a412b0b01c4f829847b8ebdef97be4df5abef
2017-07-06 02:33:52 +00:00
Tom Cherry
1eee2122ca Merge "ueventd: don't double fork firmware handlers" am: 0f4fb5497a
am: e944b7e0a4

Change-Id: Ifc8c586aa3b06ecb42bf20284c461b4b7c159bc7
2017-07-06 02:21:26 +00:00
Tom Cherry
e944b7e0a4 Merge "ueventd: don't double fork firmware handlers"
am: 0f4fb5497a

Change-Id: I2a40b76e937853fd2f1eed61cc0fe4f6fa465ba2
2017-07-06 02:10:57 +00:00
Tom Cherry
0f4fb5497a Merge "ueventd: don't double fork firmware handlers" 2017-07-06 02:02:33 +00:00
Keun-young Park
f5b616dabf Merge "add "shutdown critical" to service" am: b3915d113d am: a4ad5d0328 am: 19ec8e7bcf
am: bedc5faea7

Change-Id: I62cd1bc82531b88f5d8c8ac2dd637d5ec9d52572
2017-07-06 01:38:15 +00:00
Keun-young Park
bedc5faea7 Merge "add "shutdown critical" to service" am: b3915d113d am: a4ad5d0328
am: 19ec8e7bcf

Change-Id: Ide84d7f87a9884068ebc1cc9680c997507727af3
2017-07-06 01:13:19 +00:00
Keun-young Park
19ec8e7bcf Merge "add "shutdown critical" to service" am: b3915d113d
am: a4ad5d0328

Change-Id: I6467657616371e84468975e56ac086855a298efb
2017-07-06 00:56:18 +00:00
Keun-young Park
d266d37e4c add "shutdown critical" to service
- "shutdown critical" prevents killing the service during
  shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
  times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
  be updated to add "shutdown critical". watchdogd is still kept in the list.

bug: 37626581
Test: reboot and check last kmsg

(cherry picked from commit cccb34fce8)

Change-Id: I3c6aeb7151e64beca4b435f843ae64455217262d
2017-07-06 00:54:02 +00:00
Keun-young Park
a4ad5d0328 Merge "add "shutdown critical" to service"
am: b3915d113d

Change-Id: I25b6f42478efda7077e00141042a427245393d28
2017-07-06 00:46:31 +00:00
Treehugger Robot
b3915d113d Merge "add "shutdown critical" to service" 2017-07-06 00:40:55 +00:00
Wei Wang
a89b61ad99 Merge "init: Support custom shutdown actions" am: c1bc4241f8 am: 5b89535442 am: b39890048c
am: 2a38e6d119

Change-Id: I6776039ebf9f87b41193cc24a9786dc80db99e43
2017-07-06 00:22:45 +00:00
Tom Cherry
38728d6ca8 Merge "Merge "ueventd: remove character device symlinks (/dev/usb/*)" am: f3ae82f57f am: 6e0b51825b am: bef2bbdf62" into oc-dr1-dev-plus-aosp
am: 93e81d4775

Change-Id: Ie1cdea248765cf8a3ab96deb59d27016a181b1f6
2017-07-06 00:21:01 +00:00
Tom Cherry
2afdb6d526 Merge "init: reap zombies only after kill(-pid, ...)" am: a51c40ce35 am: 0924b32c1f am: 419a9ef8f1
am: fc479afbb6

Change-Id: Id45511f512fce014de32cc4d642df4cdcf5634c3
2017-07-06 00:20:08 +00:00
Wei Wang
2a38e6d119 Merge "init: Support custom shutdown actions" am: c1bc4241f8 am: 5b89535442
am: b39890048c

Change-Id: I57a0422f47094cc061163510138e9562648fdd98
2017-07-05 23:58:51 +00:00
Wei Wang
b39890048c Merge "init: Support custom shutdown actions" am: c1bc4241f8
am: 5b89535442

Change-Id: I57b87dac016b4d7d6f982ee0057823eb1119bab7
2017-07-05 23:56:50 +00:00
Wei Wang
5b89535442 Merge "init: Support custom shutdown actions"
am: c1bc4241f8

Change-Id: I6bb1789dbc5edbb10f2f4d712e9ca83e6302fdf4
2017-07-05 23:54:56 +00:00
Treehugger Robot
c1bc4241f8 Merge "init: Support custom shutdown actions" 2017-07-05 23:49:41 +00:00
Tom Cherry
0f296e06d6 ueventd: don't double fork firmware handlers
ueventd may be asked to handle firmware during the time critical
coldboot process.  If we double fork to avoid needing to reap the
firmware handler, then we may add significant delay to this process,
as the first child may not get scheduled quickly enough for waitpid()
to complete without delay.

Bug: 63081260
Test: boot bullhead and sailfish, check that firmwares are loaded,
      no zombie ueventd processes remain, and no new errors are shown
Change-Id: I2bac3b1fbc3a58557a00326e491c104656db27ae
2017-07-05 16:41:11 -07:00
Tom Cherry
07999f8677 Merge "ueventd: remove character device symlinks (/dev/usb/*)" am: f3ae82f57f am: 6e0b51825b
am: bef2bbdf62

Change-Id: Ice5ec0702cbdae53d7a78bceb7a24e923a488319
2017-07-05 23:37:46 +00:00
Tom Cherry
fc479afbb6 Merge "init: reap zombies only after kill(-pid, ...)" am: a51c40ce35 am: 0924b32c1f
am: 419a9ef8f1

Change-Id: I0f2e6b2b2dfed4dab480acf2562df78da8d2f65e
2017-07-05 23:37:21 +00:00
Tom Cherry
bef2bbdf62 Merge "ueventd: remove character device symlinks (/dev/usb/*)" am: f3ae82f57f
am: 6e0b51825b

Change-Id: Ic31e720cd9014de76f0fd999af44ce3c3ffcd482
2017-07-05 23:01:53 +00:00
Tom Cherry
419a9ef8f1 Merge "init: reap zombies only after kill(-pid, ...)" am: a51c40ce35
am: 0924b32c1f

Change-Id: I18a3c9a9a96a2488c7714113175f3e8115bd697f
2017-07-05 23:01:35 +00:00
Tom Cherry
6e0b51825b Merge "ueventd: remove character device symlinks (/dev/usb/*)"
am: f3ae82f57f

Change-Id: Ib601af84ed3b186705caaed05706d6b1f3c5746c
2017-07-05 22:50:35 +00:00
Tom Cherry
0924b32c1f Merge "init: reap zombies only after kill(-pid, ...)"
am: a51c40ce35

Change-Id: I4f1b7a05cdff1fe7851b528d0bdeda354011b599
2017-07-05 22:50:17 +00:00
Tom Cherry
f3ae82f57f Merge "ueventd: remove character device symlinks (/dev/usb/*)" 2017-07-05 22:41:55 +00:00
Jin Qian
3ca00a3c98 Merge "init: rename mke2fs tools with _static suffix" into oc-dr1-dev
am: 5c5c544e80

Change-Id: Ifee5b6516fe3aee03df845a46421753295cbc740
2017-07-05 22:40:42 +00:00
Tom Cherry
a51c40ce35 Merge "init: reap zombies only after kill(-pid, ...)" 2017-07-05 22:39:51 +00:00
TreeHugger Robot
5c5c544e80 Merge "init: rename mke2fs tools with _static suffix" into oc-dr1-dev 2017-07-05 22:33:35 +00:00
Keun-young Park
cccb34fce8 add "shutdown critical" to service
- "shutdown critical" prevents killing the service during
  shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
  times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
  be updated to add "shutdown critical". watchdogd is still kept in the list.

bug: 37626581
Test: reboot and check last kmsg

Change-Id: Ie8cc699d1efbc59b9a2561bdd40fec64aed5a4bb
2017-07-05 14:55:22 -07:00
Wei Wang
eeab491efd init: Support custom shutdown actions
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.

This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.

Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
2017-07-05 14:49:57 -07:00
Tom Cherry
322e176f6a init: add info logs in first stage mount if we have to poll
It's not a error case if we do not find a device that we're attempting
to regenerate uevents for during first stage mount, but it is likely
to increase boot time, so we log a message to attribute this delay.

Bug: 63327193
Test: Boot bullhead, sailfish

Change-Id: I97c2e5aefd218bbdd87717ff3c375381f725de08
2017-07-05 14:05:03 -07:00
Nick Kralevich
1d4647b4ce Merge "Remove unnecessary SELinux dependencies" am: 22de50d351 am: e9b9b10c58 am: 0056e6bccc
am: 4192d74a83

Change-Id: I6d1cfcbfa98881fb24a516646f030d451fa357ee
2017-07-01 16:54:36 +00:00
Nick Kralevich
4192d74a83 Merge "Remove unnecessary SELinux dependencies" am: 22de50d351 am: e9b9b10c58
am: 0056e6bccc

Change-Id: Id160e23a6bd53238ad279bb5b28e7ca8a08c0805
2017-07-01 16:49:35 +00:00
Nick Kralevich
0056e6bccc Merge "Remove unnecessary SELinux dependencies" am: 22de50d351
am: e9b9b10c58

Change-Id: Ifead418ceb9fe806d76102d9068a32539a8b99d0
2017-07-01 16:44:36 +00:00