2fa7451e9b530f814f93ca2248fa425b1f5362cd |
|
21-Apr-2018 |
Tom Cherry <tomcherry@google.com> |
init: allow entering of network namespaces Add the ability to enter a network namespace when launching a service. Typical usage of this would be something similar to the below: on fs exec ip netns add namespace_name service vendor_something /vendor/... capabilities <lower than root> user not_root enter_namespace net /mnt/.../namespace_name Note changes to the `ip` tool are needed to create the namespace in the correct directory. Bug: 73334854 Test: auto team verified Merged-In: Ifa91c873d36d69db399bb9c04ff2362518a0b07d Change-Id: Ifa91c873d36d69db399bb9c04ff2362518a0b07d (cherry picked from commit aead51b418e70a49191bc0cc5b67c92c969ae699)
/system/core/init/README.md
|
7e469ce60cceb0fb7a0274ac78f47ec975fe2e3e |
|
23-Feb-2018 |
Elliott Hughes <enh@google.com> |
Document property expansion. Bug: N/A Test: N/A Change-Id: I54b9d2d08d98d83060b54981b1c5dc9660b93e8f
/system/core/init/README.md
|
3631c545b8e3256c5aba2269491912e3f568cd99 |
|
18-Sep-2017 |
Tom Cherry <tomcherry@google.com> |
init: add exec_background command This command functions similarly to `exec` except that it does not cause init to halt executing commands until the process has terminated. It is useful for launching simple one time background tasks. Bug: 65736247 Test: create an exec_background service and see it function properly Change-Id: I719c8b85479b65201770aedc0a13191303007c11
/system/core/init/README.md
|
02628f3b2323ea9cd2459f863a2ae0d0c59f90a4 |
|
16-Aug-2017 |
Wei Wang <wvw@google.com> |
init: add option to read file fully on readahead Bug: 62413151 Test: boottime, dumpcache Change-Id: I1a7b69f0619428e4db31c5a7639c5d895c89ecdb
/system/core/init/README.md
|
7ac013de7edc7ec6570ff6a5b6bd3bdce68b769c |
|
25-Aug-2017 |
Tom Cherry <tomcherry@google.com> |
init: support setting rlimits per service Add a new service option, `rlimit` that allows a given rlimit to be set for a specific service instead of globally. Use the same parsing, now allowing text such as 'cpu' or 'rtprio' instead of relying on the enum value for the `setrlimit` builtin command as well. Bug: 63882119 Bug: 64894637 Test: boot bullhead, run a test app that attempts to set its rtprio to 95, see that the priority set fails normally but passes when `rlimit rtprio 99 99` is used as its service option. See that this fails when `rlimit rtprio 50 50` is used as well. Test: new unit tests Change-Id: I4a13ca20e8529937d8b4bc11718ffaaf77523a52
/system/core/init/README.md
|
542aae443fbb1ed336368692df949dfe2a6ba62b |
|
04-Aug-2017 |
Wei Wang <wvw@google.com> |
init: Add readahead built-in command Inspired by ag/2659809/, this CL add readahead built-in command in init to let files be prefetched into pagecache for faster reading. Readahead happens in background but due to filesystem limitation it might take small amount of time in it reading the filesystem metadata needed to locate the requested blocks. So the command is executed in a forked process to not block init execution. Bug: 62413151 Test: boottime, dumpcache Change-Id: I56c86e2ebc20efda4aa509e6efb736bd1d92baa5
/system/core/init/README.md
|
d485226951013247dbb502fef7edbc6cf83acb0f |
|
17-Jul-2017 |
Robert Benea <robenea@google.com> |
Add memcg related configs to init. Allow configuring memory.swappiness, memory.soft_limit_in_bytes and memory.limit_in_bytes by init; by doing so there is better control of memory consumption per native app. Test: tested on gobo branch. bug: 63765067 Change-Id: I8906f3ff5ef77f75a0f4cdfbf9d424a579ed52bb
/system/core/init/README.md
|
cccb34fce8798f2a359c6eb0e394ef9460673629 |
|
05-Jul-2017 |
Keun-young Park <keunyoung@google.com> |
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
/system/core/init/README.md
|
323d5791b4b8080165799f8ee91d976e6be921cc |
|
04-May-2017 |
William Roberts <william.c.roberts@intel.com> |
init: cleanup exec_service documentation The exec_service documentation was difficult to read, clarify it. Tests: Run grip.py to verify that the markdown still works correctly. Run aspell to verify spelling. Change-Id: I29bdd456f3d3ea2a91c9d4772bd09a5a195f97a9 Signed-off-by: William Roberts <william.c.roberts@intel.com>
/system/core/init/README.md
|
d262017fef0761e6cf6d1e449fa088338cdc68e6 |
|
17-Apr-2017 |
Bowgo Tsai <bowgotsai@google.com> |
init: moving early mount logic into init_first_stage.cpp Also renames "early mount" to "first stage mount" to prevent confusion with "mount_all --early", which is run in the init second stage. Also creates a base class: FirstStageMount and two derived classes: FirstStageMountVBootV1 and FirstStageMountVBootV2 to replace/refactor existing functions: - early_mount() -> DoFirstStageMount() and FirstStageMount::DoFirstStageMount() - vboot_1_0_early_partitions -> FirstStageMountVBootV1::GetRequiredDevices() - vboot_2_0_early_partitions -> FirstStageMountVBootV2::GetRequiredDevices() - vboot_1_0_mount_partitions -> FirstStageMount::MountPartitions() and FirstStageMountVBootV1::SetUpDmVerity() - vboot_2_0_mount_partitions -> FirstStageMount::MountPartitions() and FirstStageMountVBootV2::SetUpDmVerity() Bug: 37413399 Test: first stage mount /vendor with vboot 2.0 (avb) on bullhead Test: first stage mount /system with without verity on bullhead Test: first stage mount /vendor with with vboot 1.0 on sailfish Change-Id: I6584bdf7d832c9fbc8740f97c9b8b94e68a90783
/system/core/init/README.md
|
012c573e267b8dd70de14237cb470bd7301ee8ea |
|
18-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: Stop combining actions In the past, I had thought it didn't make sense to have multiple Action classes with identical triggers within ActionManager::actions_, and opted to instead combine these into a single action. In theory, it should reduce memory overhead as only one copy of the triggers needs to be stored. In practice, this ends up not being a good idea. Most importantly, given a file with the below three sections in this same order: on boot setprop a b on boot && property:true=true setprop c d on boot setprop e f Assuming that property 'true' == 'true', when the `boot` event happens, the order of the setprop commands will actually be: setprop a b setprop e f setprop c d instead of the more intuitive order of: setprop a b setprop c d setprop e f This is a mistake and this CL fixes it. It also documents this order. Secondly, with a given 'Action' now spanning multiple files, in order to keep track of which file a command is run from, the 'Command' itself needs to store this. Ironically to the original intention, this increases total ram usage. This change now only stores the file name in each 'Action' instead of each 'Command'. All in all this is a negligible trade off of ram usage. Thirdly, this requires a bunch of extra code and assumptions that don't help anything else. In particular it forces to keep property triggers sorted for easy comparison, which I'm using an std::map for currently, but that is not the best data structure to contain them. Lastly, I added the filename and line number to the 'processing action' LOG(INFO) message. Test: Boot bullhead, observe above changes Test: Boot sailfish, observe no change in boot time Change-Id: I3fbcac4ee677351314e33012c758145be82346e9
/system/core/init/README.md
|
19866bf19f1b63c2afbda02dd63e4f3b1a2bab91 |
|
19-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: add warning that `start` is not synchronous Bug: 36571736 Bug: 37481363 Change-Id: I5d360cbb3635f00453a492ee4e3650fb80f390f5
/system/core/init/README.md
|
98ad32a967079be80a101458d8a29d7ecefbb547 |
|
18-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: handle sys.powerctl immediately Currently if a process sets the sys.powerctl property, init adds this property change into the event queue, just like any other property. The actual logic to shutdown the device is not executed until init gets to the action associated with the property change. This is bad for multiple reasons, but explicitly causes deadlock in the follow scenario: A service is started with `exec` or `exec_start` The same service sets sys.powerctl indicating to the system to shutdown The same service then waits infinitely In this case, init doesn't process any further commands until the exec service completes, including the command to reboot the device. This change causes init to immediately handle sys.powerctl and reboot the device regardless of the state of the event queue, wait for exec, or wait for property conditions. Bug: 37209359 Bug: 37415192 Test: Init reboots normally Test: Update verifier can reboot the system Change-Id: Iff2295aed970840f47e56c4bacc93001b791fa35
/system/core/init/README.md
|
dbe88e7953ed53961056c7f5531d91d229293462 |
|
28-Dec-2016 |
Yongqin Liu <yongqin.liu@linaro.org> |
init: use read_file and write_file to implement do_copy builtin this will make the implementation more cleaner, and has error message output when failed on some operations also add the O_TRUNC flag explicitly for the open function called in write_file. And add more test on read_file and write_file functions Bug: 36726045 Test: manual with hikey Test: boot and init tests on bullhead Test: cast with fugu, per b/36726045 Merged-In: If3c30a2fff58cfece2fcd27e69c30382146e6808 Change-Id: If3c30a2fff58cfece2fcd27e69c30382146e6808 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
/system/core/init/README.md
|
7830d59500eb0cb24333dc357ac5bed38270e181 |
|
28-Mar-2017 |
Keun-young Park <keunyoung@google.com> |
add shutdown animation - Run shutdown animation during shutdown if surfaceflinger is available / running. - services necessary for animation should be added to animation class. - Keep debugging tools while non-critical services are terminated: logd, adbd, tombstoned bug: 36526187 Test: many reboots Change-Id: I758f700a622c6005f3df9f29de2b55270055ad4d
/system/core/init/README.md
|
3428d0c2c0b0056dadbc561d86b66ec83b960583 |
|
31-Mar-2017 |
Wonsik Kim <wonsik@google.com> |
Merge "Revert "init: use read_file and write_file to implement do_copy builtin""
|
395e29472fa012c4177d981d9ce699625b706f4f |
|
31-Mar-2017 |
Wonsik Kim <wonsik@google.com> |
Revert "init: use read_file and write_file to implement do_copy builtin" This reverts commit 82bac0de6d95bcdf45729516f6a4f29eb2681118. Change-Id: Ibfdf453bd85ba4fcd1948b78bd22e639a883653e
/system/core/init/README.md
|
8772b3686efad95dc53afca5004fcd62c2797638 |
|
29-Mar-2017 |
Treehugger Robot <treehugger-gerrit@google.com> |
Merge changes from topic 'exec-start-update-verifier' * changes: init.rc: launch update_verifier with exec_start init: add exec_start command
|
8678872a0076d31335d91622b9b2b5d7b0fc3551 |
|
28-Mar-2017 |
Treehugger Robot <treehugger-gerrit@google.com> |
Merge "init: add class_restart"
|
88d6b4af165311a3774a98e39fa38ef778b9b230 |
|
28-Mar-2017 |
Treehugger Robot <treehugger-gerrit@google.com> |
Merge "init: Fix README.md for writepid"
|
b27004aa05039b5196f1e878169dca41b68aadd6 |
|
28-Mar-2017 |
Tom Cherry <tomcherry@google.com> |
init: add exec_start command Exec services may also want to set other service flags such as priority. Instead of expanding the exec syntax to handle this, create a new command, exec_start, that will treat an existing service definition as an exec service. The new exec_start command will start the service then halt init from executing further commands until the service has exited. This change additionally encapsulates the waiting_for_exec logic into ServiceManager and removes the ambiguous 'bool' return value from Reap() which previously indicated if a Reaped service was an exec service or not. Bug: 36511808 Bug: 36102163 Test: Bullhead boots, services run with exec_start as they do exec. Change-Id: I44f775cf1c1dd81d5c715f44fdc150c651a2c80a
/system/core/init/README.md
|
641ff0a4d8d05349d9c22f726a035a2936a2a94d |
|
27-Mar-2017 |
Wei Wang <wvw@google.com> |
init: add support of multiple class names Add support of multiple class names in service, so that related services can be grouped together. By doing this, we can start/stop some services for special purpose. For example, early zygote, early boot animation and etc. Bug: 36535312 Test: marlin boots with defined classes Change-Id: Ifeaaf034fd836816e24f3775bece53ea83faada6
/system/core/init/README.md
|
2b63d54af81b2d061b98799b97f01d771bfa6782 |
|
10-Mar-2017 |
Steven Moreland <smoreland@google.com> |
init: add class_restart Bug: 34093663 Test: hwservicemanager `onrestart class_restart hal` works Change-Id: Ie1e4daab2b7b4c6c714d4e3d05afa2d86d6233df
/system/core/init/README.md
|
e564dac2b32a4555d7a2d5304dc1581709ec9f4b |
|
27-Mar-2017 |
Tom Cherry <tomcherry@google.com> |
init: Fix README.md for writepid writepid takes a list of space delimited files. Make this clear in the documentation, following the format for repeated fields used in the rest of the file. Test: N/A Change-Id: I5bbe453fcb54f060d3cc5a82e9b38d3091a1ece3
/system/core/init/README.md
|
82bac0de6d95bcdf45729516f6a4f29eb2681118 |
|
28-Dec-2016 |
Yongqin Liu <yongqin.liu@linaro.org> |
init: use read_file and write_file to implement do_copy builtin this will make the implementation more cleaner, and has error message output when failed on some operations also add the O_TRUNC flag explicitly for the open function called in write_file. And add more test on read_file and write_file functions Test: manual with hikey Change-Id: Ifc1086a20e85db6980b497b1150a8a7952e672d6 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
/system/core/init/README.md
|
0828676dff618c8ecc9852cb319543570b3a2e72 |
|
03-May-2016 |
Alex Vakulenko <avakulenko@google.com> |
Add 'ro.cpuset.default' system property for default cpusets. Normally 'writepid' is used to add a process to a particular cpuset. However certain systems with big/small cores might need to specify a default cpuset for system processes which do not explicitly specify one. Add an option to use 'ro.cpuset.default' system property to specify default cpuset for system processes which do not explicitly write to /dev/cpuset/... with 'writepid' option. The cpuset name specified in ro.cpuset.default is just the cpuset name, e.g. '/system-background', '/foreground', or simply '/' for the "root" cpuset. Bug: 28550814 Test: `m -j32` succeeds for aosp_sailfish-eng. Phone boots successfully. Also tested manually with debug trace messages on emulator with different combinations of values for 'ro.cpuset.default'. Change-Id: I501727fa5ee3f4bb7a938fa104b81a404b616633
/system/core/init/README.md
|
a08f002c231b401489e7161098898281971f54ef |
|
21-Feb-2017 |
Bin Chen <bin.chen@linaro.org> |
init: minor fix to READEME.md Change-Id: I149c2a8f2053ac4dcc61bea6fa8c57f4c7b73c9e Signed-off-by: Bin Chen <bin.chen@linaro.org>
/system/core/init/README.md
|
132ac31b4738094e62cc1744e75f3756a035302c |
|
26-Jan-2017 |
Wei Wang <wvw@google.com> |
init: add wait_for_prop builtin command There are many use cases from vendors to exec service in background and then use a shell scriprt to wait for the command done. This CL is to add a wait_for_prop command to suppor those use cases. Bug: 34746108 Test: on marlin Change-Id: Ia81290b0928f9d375710d2daa546714f0cd65b72
/system/core/init/README.md
|
15f0f504ace98775429d6fedfc458db53b43d9e7 |
|
09-Jan-2017 |
Elliott Hughes <enh@google.com> |
Move to .md files for even trivial documentation. So it's automatically displayed for folks browsing the source. Bug: N/A Test: N/A Change-Id: Ib595ab428054f274a92374728e3e66474ffc5116
/system/core/init/README.md
|