Commit Graph

1423 Commits

Author SHA1 Message Date
Jiyong Park 2e24e8e2f0 Merge "Configure ld.config.txt for SP-HALs" into oc-dev am: 43b72b58f2
am: 7610066315

Change-Id: I59ede8903c6890b976ef3ca42c7ad1d220470a42
2017-04-15 02:07:02 +00:00
Jiyong Park 7610066315 Merge "Configure ld.config.txt for SP-HALs" into oc-dev
am: 43b72b58f2

Change-Id: I3e7e5f142f6c8e76da26e25362eccd35f10b81f1
2017-04-15 02:04:49 +00:00
TreeHugger Robot 43b72b58f2 Merge "Configure ld.config.txt for SP-HALs" into oc-dev 2017-04-15 01:47:39 +00:00
Jiyong Park 450cff4b68 Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.

default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).

sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().

vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.

Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.

Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.

Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')

Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-14 16:39:36 +09:00
Todd Poynor 4224f030c4 Merge changes I76212f65,I6a29c678 into oc-dev am: 5975d4e337
am: a03b4dc574

Change-Id: Ib202914daeb62057d4575e4815329f5a7bee80f0
2017-04-14 02:05:13 +00:00
Wei Wang e61f5c42fa Merge "init.rc: start all 3 servicemanagers early" into oc-dev am: d12835d19f
am: c74c092929

Change-Id: Ib436e16a88570a6b896ec917b40be87cf9a66fe0
2017-04-14 02:04:58 +00:00
Todd Poynor a03b4dc574 Merge changes I76212f65,I6a29c678 into oc-dev
am: 5975d4e337

Change-Id: I0441dc1f8a9ff11429a253d0510790b20b42e3b4
2017-04-14 01:37:03 +00:00
TreeHugger Robot 5975d4e337 Merge changes I76212f65,I6a29c678 into oc-dev
* changes:
  init.rc: create /data/misc/reboot owned by system
  reboot: fix owner and permissions of last_reboot_reason file
2017-04-14 01:29:39 +00:00
Wei Wang c74c092929 Merge "init.rc: start all 3 servicemanagers early" into oc-dev
am: d12835d19f

Change-Id: I935cc9f8b353a6b513fb825e989156684f27a9dd
2017-04-14 01:26:18 +00:00
Todd Poynor e1e6edcf33 init.rc: create /data/misc/reboot owned by system
Directory will be read and modified by system uid.

Bug: 37251463
Test: Manual: reboot and inspect
Change-Id: I76212f65af991ff9ad0969b9c0b8460b80fb9cd2
2017-04-13 15:48:11 -07:00
Tom Cherry ec1d24f522 Merge changes Ie5ec609a,I5a2ac369,I690137b5 am: 659b78ed10 am: 01b87aac9c am: 8d9eee4f2b
am: aa85663027

Change-Id: I69be112c0020f7b4ce1a9a92c1e60e8f2941c5a9
2017-04-13 22:25:29 +00:00
Tom Cherry aa85663027 Merge changes Ie5ec609a,I5a2ac369,I690137b5 am: 659b78ed10 am: 01b87aac9c
am: 8d9eee4f2b

Change-Id: I5cd7d00f71bfd3970189481f381629cedc358c9b
2017-04-13 21:45:58 +00:00
Tom Cherry 659b78ed10 Merge changes Ie5ec609a,I5a2ac369,I690137b5
* changes:
  ueventd: Fix up string handling in handle_*_device_event()
  ueventd: convert mkdir_recursive() to std::string
  ueventd: move subsystem logic from code to ueventd.rc
2017-04-13 21:22:45 +00:00
Wei Wang 00cdc10662 init.rc: start all 3 servicemanagers early
With the binder traffic of composer moved to vndbinder,
vndservicemanager is needed to be started early to get bootanim
displayed quickly.

Also servicemanager is required to be start early to support early
bootanim and sufaceflinger.

Bug: 37306311
Test: bootanim regression fixed
Change-Id: Ice1e05bdb3fe4e67a63a49f1db8afdb018c7b61b
2017-04-13 21:06:17 +00:00
Jaesoo Lee 498e500e8f Merge "disable module loading after BOOT_COMPLETED broadcast" into oc-dev am: a02b1f5bed
am: 00b0b347a0

Change-Id: I62f0b7d807a96276d08d13adcd758d126a509c39
2017-04-12 23:54:37 +00:00
Tom Cherry 780a71e779 ueventd: move subsystem logic from code to ueventd.rc
Test: Boot bullhead
Test: Boot sailfish, observe no boot time regression
Test: init unit tests

Change-Id: I690137b584fcc2b9cd2dd932a2678f75a56d6737
2017-04-12 16:36:20 -07:00
Jaesoo Lee 00b0b347a0 Merge "disable module loading after BOOT_COMPLETED broadcast" into oc-dev
am: a02b1f5bed

Change-Id: I7c750c9838b22cbcd9acb849c10be47ba7a50feb
2017-04-12 23:09:04 +00:00
Jaesoo Lee 20b7f78204 Merge "disable module loading after BOOT_COMPLETED broadcast" 2017-04-12 22:59:37 +00:00
Tom Cherry a72518f588 Merge "ueventd: remove /dev/log" am: 120add07ab am: 9ae606d659 am: 6c2e8b10fe
am: 6289bb1341

Change-Id: I688c8cca7ebca7f4cd86ac8d3595b6ba01be9221
2017-04-12 08:23:22 +00:00
Tom Cherry 6289bb1341 Merge "ueventd: remove /dev/log" am: 120add07ab am: 9ae606d659
am: 6c2e8b10fe

Change-Id: Ic257774710a74e72a97f4187e48587150ee3d613
2017-04-12 08:17:29 +00:00
Jaesoo Lee dcf4d19dd9 disable module loading after BOOT_COMPLETED broadcast
This CL disables module loading by writing 1 to
/proc/sys/kernel/modules_disabled when the property sys.boot_completed
is set to 1 by ActivityManagerService (at the broadcast of
PHASE_BOOT_COMPLETED).

Bug: 36515654
Test: tested on sailfish and verified that module loading is disabled in
userdebug and enabled in eng mode
Merged-In: Id38d34a6395966ab21e440614337c0cfca791ad0
(cherry picked from commit 6ed19d1675)

Change-Id: I2faa459b450b3a64f854c832c6b91cbf682bbffa
2017-04-12 10:08:26 +09:00
Tom Cherry d4ff8d83d3 ueventd: remove /dev/log
This was marked deprecated in 2014 and removed in 2015, let's remove
the uevent rule now too.

Test: see that logging still works on bullhead
Change-Id: Idaf3f49a1afe7046eba6c976628b9f1c8b3ec094
2017-04-11 21:35:46 +00:00
Jaesoo Lee 6ed19d1675 disable module loading after BOOT_COMPLETED broadcast
This CL disables module loading by writing 1 to
/proc/sys/kernel/modules_disabled when the property sys.boot_completed
is set to 1 by ActivityManagerService (at the broadcast of
PHASE_BOOT_COMPLETED).

Bug: 36515654
Test: tested on sailfish and verified that module loading is disabled in
userdebug and enabled in eng mode
Change-Id: Id38d34a6395966ab21e440614337c0cfca791ad0
2017-04-11 10:22:47 +09:00
Janis Danisevskis ec0ab6524e Move early_hal start to late-fs trigger action
The class early_hal is essentially for the keymaster hal which needs
to be up before vold tries to unlock a storage encryption key (FDE or
FBE). The current position is too early in the boot process, because
on devices with legacy HAL the wrapper service uses system properties
to find the legacy HAL.

This patch moves the start of the early_hal class to the late-fs trigger
action which runs right after the system property action.

Test: Manually tested and update tested on bullhead, sailfish, and
      another device.
Bug: 35764921

Change-Id: I34b45b85f8450e9ef18861535fdb2ee963df8c9b
(cherry picked from commit 1ad8d21947)
2017-04-07 15:28:56 -07:00
Janis Danisevskis 71132a8608 Merge "Move early_hal start to late-fs trigger action" into oc-dev am: 9cadfde2d6
am: a074e16357

Change-Id: I4dc06d4929a68a5ad1d8dc1386876e8d772802e5
2017-04-07 06:16:27 +00:00
Janis Danisevskis 1ad8d21947 Move early_hal start to late-fs trigger action
The class early_hal is essentially for the keymaster hal which needs
to be up before vold tries to unlock a storage encryption key (FDE or
FBE). The current position is too early in the boot process, because
on devices with legacy HAL the wrapper service uses system properties
to find the legacy HAL.

This patch moves the start of the early_hal class to the late-fs trigger
action which runs right after the system property action.

Test: Manually tested and update tested on bullhead, sailfish, and
      another device.
Bug: 35764921

Change-Id: I34b45b85f8450e9ef18861535fdb2ee963df8c9b
2017-04-07 02:30:18 +00:00
Steven Moreland 2ad7aafa23 Merge "init.rc: add class_start early_hal" am: 7bbd2a5290 am: 795eb840a7 am: 4bf15ab6b5
am: 53ae57e0bf

Change-Id: I10c10cfde7c6f4ffeabcad04eb738b62dfcbb831
2017-04-05 00:56:20 +00:00
Steven Moreland 53ae57e0bf Merge "init.rc: add class_start early_hal" am: 7bbd2a5290 am: 795eb840a7
am: 4bf15ab6b5

Change-Id: Ieae51492b03168b13224c252d075c03c8f80942d
2017-04-05 00:47:01 +00:00
Steven Moreland 38b5735987 init.rc: add class_start early_hal
This class is used to start hals which are required in order to mount
data (for instance keymaster).

Test: works to start early_hal in internal
Bug: 36278706
Change-Id: If06908135e59b187683d8cf4cc4a00b490559081
(cherry picked from commit 5d56bad4bd)
2017-04-04 15:35:05 -07:00
Steven Moreland 5d56bad4bd init.rc: add class_start early_hal
This class is used to start hals which are required in order to mount
data (for instance keymaster).

Test: works to start early_hal in internal
Bug: 36278706
Change-Id: If06908135e59b187683d8cf4cc4a00b490559081
2017-04-04 21:22:47 +00:00
Martijn Coenen 1e667f1e19 Merge "Add /dev/vndbinder to ueventd.rc" into oc-dev am: 026d17dab3
am: 92b49c03b5

Change-Id: I5d6d3f65a3f6cd66f503c6e915bb9e5404ed8bac
2017-04-04 06:40:45 +00:00
Martijn Coenen 62c5b47b9f Add /dev/vndbinder to ueventd.rc
Bug: 36052864
Test: vndservicemanager can access /dev/vndbinder
Change-Id: I208ae91e722185f015fe8f0047c54087be6d21a2
2017-04-03 17:04:02 -07:00
Andreas Gampe 4542eda998 ASAN: Fix ASAN directory in asan_extract.sh
Move things over to the new layout.

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_TARGET_SYSTEM=true
Change-Id: I4dba269f82e4f88e39f926c6c2dd3c5efa07b2a1
2017-04-03 10:41:54 -07:00
Andreas Gampe df5496aa65 ASAN-Extract
Add init script and shell script to unzip a tar containing ASAN
libraries on boot.

Bug: 36458146
Test: m && m SANITIZE_TARGET=address
Test: manual (build steps for tar missing)
Change-Id: I1bcf332f86c5bf2e0333cbe3def684999c1002f8
2017-03-31 16:02:24 -07:00
Tom Cherry aaeb792312 init.rc: launch update_verifier with exec_start
This allows update_verifier to raise it's priority and ioprio.

Bug: 36511808
Bug: 36102163
Test: Boot bullhead
Test: Verify boottime decrease on sailfish
Change-Id: I5710c6a98dc7acee9063d1fa1d1c80668f0f1528
(cherry picked from commit 1e2d8c7fce)
2017-03-29 13:37:54 -07:00
Tom Cherry 61c5bdf6de Merge changes from topic 'exec-start-update-verifier' am: 8772b3686e am: 571cb53797
am: 5b591daf83

Change-Id: I9b6a559f4295dd25e84d17e89d93ee0cb3c3a7f2
2017-03-29 18:49:24 +00:00
Tom Cherry 1e2d8c7fce init.rc: launch update_verifier with exec_start
This allows update_verifier to raise it's priority and ioprio.

Bug: 36511808
Bug: 36102163
Test: Boot bullhead
Test: Verify boottime decrease on sailfish
Change-Id: I5710c6a98dc7acee9063d1fa1d1c80668f0f1528
2017-03-28 15:54:45 -07:00
Steven Moreland da48f4938a Merge "Revert "Revert "Start hwservicemanager earlier.""" am: ca622b4e78 am: e326cb121e
am: 352b3d737c

Change-Id: I7cb77ed1a7e4d7d8cee945a1ddee0c448f350452
2017-03-27 17:37:30 +00:00
Treehugger Robot ca622b4e78 Merge "Revert "Revert "Start hwservicemanager earlier.""" 2017-03-27 17:28:38 +00:00
Dimitry Ivanov 0bc3add41b Merge "Add ld.config.txt to /system/etc" am: d444f8663d am: e6f9497cca
am: 7bbe56c46b

Change-Id: I17bd0af0e7acdb8f4cea33c29812825ec78d5f3f
2017-03-25 05:26:30 +00:00
Treehugger Robot d444f8663d Merge "Add ld.config.txt to /system/etc" 2017-03-25 05:17:33 +00:00
Steven Moreland d627502bb0 Revert "Revert "Start hwservicemanager earlier.""
This reverts commit 5011270225.

Now starting even earlier.

Reason for revert: Needed change, reverted b/c broken device.

Bug: 36278706
Test: original DOA device boots
Test: angler, bullhead, fugu, marlin, ryu
Test: all these devices boot with wipe
Test: all these devices boot with w/o wipe
Test: lshal shows all included services

Change-Id: Ic639aedf7834b1bd3a26d23d109727f5559317e9
2017-03-24 20:52:44 -07:00
Thierry Strudel 7d84086639 Merge "Revert "Start hwservicemanager earlier."" am: 3ba313597d am: 263cf5c8d9
am: ea6de14c5e

Change-Id: Ia0b57d328df2fc47e7f5dee35930e43bb514c4f5
2017-03-24 14:42:14 +00:00
Thierry Strudel 3ba313597d Merge "Revert "Start hwservicemanager earlier."" 2017-03-24 14:33:18 +00:00
Steven Moreland 5011270225 Revert "Start hwservicemanager earlier."
This reverts commit 9e36331174.

Reason for revert: a DOA device

Bug: 36546734

Change-Id: I0456247d362fe43b8c37623d04432eb494f68f68
2017-03-24 06:05:41 +00:00
Jeff Vander Stoep 5659c9cf1d Merge "Create dir in /data for vendor customization" am: c39a31f002 am: bfc4da8369
am: bc4d384d49

Change-Id: Ic14d961fb28c1cbad6a2082a321a679580a69d2c
2017-03-23 19:48:45 +00:00
Treehugger Robot c39a31f002 Merge "Create dir in /data for vendor customization" 2017-03-23 19:36:52 +00:00
Jeff Vander Stoep 61efb0dab8 Create dir in /data for vendor customization
Vendor owns /data/vendor.

HAL data must go in /data/vendor/hardware/.

Bug: 34980020
Test: build and boot AOSP Marlin. Observe /data/vendor and
      /data/vendor/hardware exist and are empty.
Change-Id: I6fe96e3c76a10a5eb480ba10e10d4d006de56c12
2017-03-23 10:30:34 -07:00
Steven Moreland 2b9a3391d0 Merge "Start hwservicemanager earlier." am: fcd509298d am: 0a85db775e
am: 6c546660d9

Change-Id: Ifd4e04fef289f8ece3884434efa1a3c6d47890fa
2017-03-23 03:53:01 +00:00
Treehugger Robot fcd509298d Merge "Start hwservicemanager earlier." 2017-03-23 03:39:40 +00:00