summaryrefslogtreecommitdiff
path: root/rootdir/init.rc
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2016-08-23 11:58:09 -0700
committerWei Wang <wvw@google.com>2016-09-06 12:53:38 -0700
commit8e5c9b802841cabff50c7596ff76e169b76a95ad (patch)
tree460cb1fff58811ba1fce42133237748c24f95900 /rootdir/init.rc
parentbc7448afe3ae2aed7b1e2ba7a380bc2bbdbb1772 (diff)
Split fstab mount into 2 phases
This will make it possible to start some key services before mounting data partition (cherry picked from commit abfbec342fdd2fc9d139a88a2d950953918e1b4e) Bug: 30118894 Change-Id: Ia9f8cc035de6cc0df9a61605864915efa0266d7f
Diffstat (limited to 'rootdir/init.rc')
-rw-r--r--rootdir/init.rc22
1 files changed, 18 insertions, 4 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 56379dbd3..a9b6af0de 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -236,6 +236,9 @@ on init
export DOWNLOAD_CACHE /data/cache
+ # set RLIMIT_NICE to allow priorities from 19 to -20
+ setrlimit 13 40 40
+
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
@@ -258,6 +261,11 @@ on firmware_mounts_complete
# Mount filesystems and start core system services.
on late-init
trigger early-fs
+
+ # Mount fstab in init.{$device}.rc by mount_all command. Optional parameter
+ # '--early' can be specified to skip entries with 'latemount'.
+ # /system and /vendor must be mounted by the end of the fs stage,
+ # while /data is optional.
trigger fs
trigger post-fs
@@ -266,9 +274,18 @@ on late-init
# issued fs triggers have completed.
trigger load_system_props_action
+ # Mount fstab in init.{$device}.rc by mount_all with '--late' parameter
+ # to only mount entries with 'latemount'. This is needed if '--early' is
+ # specified in the previous mount_all command on the fs stage.
+ # With /system mounted and properties form /system + /factory available,
+ # some services can be started.
+ trigger late-fs
+
# Now we can mount /data. File encryption requires keymaster to decrypt
- # /data, which in turn can only be loaded when system properties are present
+ # /data, which in turn can only be loaded when system properties are present.
trigger post-fs-data
+
+ # Load persist properties and override properties (if enabled) from /data.
trigger load_persist_props_action
# Remove a file to wake up anything waiting for firmware.
@@ -484,9 +501,6 @@ on boot
hostname localhost
domainname localdomain
- # set RLIMIT_NICE to allow priorities from 19 to -20
- setrlimit 13 40 40
-
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.