OSDN Git Service
Jiyong Park [Wed, 11 Mar 2020 04:59:38 +0000 (13:59 +0900)]
Make libseliux a stub library
libselinux is currently being copied to APEXes. This is risky because
the library is not designed to be portable; part of it is tied to the
specific version of the Android that it was developed for.
This change fixes the problem by declaring that the library supports
a stub with the list of C APIs that are included in the stub. Then there
is only one copy of libselinux in /system/lib and other APEXes use the
copy by dynamically linking to it.
Bug:
151053366
Test: m com.android.adbd. It doesn't include libselinux in it.
Test: m com.android.adbd-deps-info. then inspect
out/soong/com.android.adbd-deps-info.txt. The dependency to libselinux
is shown as '(external)'.
Change-Id: I445db2d0c5103b8b3267caa094f5d91259f1f491
Automerger Merge Worker [Wed, 4 Mar 2020 06:15:18 +0000 (06:15 +0000)]
Remove cronet apex from visible_apexes am:
a8eeddac31
Change-Id: I84d40640f1e3130500ca03e5015555043be6af0b
Automerger Merge Worker [Wed, 4 Mar 2020 06:14:44 +0000 (06:14 +0000)]
Generates jni.config.txt am:
8e5cc8d49e
Change-Id: I14823f7d785294f63d75bef6a094ae19b66c934a
Jooyung Han [Mon, 2 Mar 2020 16:02:22 +0000 (01:02 +0900)]
Remove cronet apex from visible_apexes
It is now automatically set as visible because it has jni_libs.
Bug:
146420818
Bug:
143733063
Test: CronetApiTest
Change-Id: I7d506e63aece907d7cc00b405aca23a196f9a3db
Jooyung Han [Mon, 2 Mar 2020 15:34:32 +0000 (00:34 +0900)]
Generates jni.config.txt
This file is consumed by libnativeloader so that JNI libraries in an
APEX can be loaded from classloader-namespace created for java libraries
in the same apex.
Bug:
143733063
Bug:
146420818
Test: ./rundiff.sh
Change-Id: I4b80d5c1c2a10cd6b644187e6ddd416c22cddf27
Automerger Merge Worker [Fri, 28 Feb 2020 17:23:09 +0000 (17:23 +0000)]
Merge "Make APEXes with JNI libs "visible" in "system" section" am:
b263b8a15e
Change-Id: I4563d296129763cdbefe0d90a49c03ceef7b1380
Jooyung Han [Fri, 28 Feb 2020 17:12:53 +0000 (17:12 +0000)]
Merge "Make APEXes with JNI libs "visible" in "system" section"
Automerger Merge Worker [Wed, 26 Feb 2020 12:23:42 +0000 (12:23 +0000)]
Make sphal and vndk namespace available from legacy devices am:
8a550bb09b
Change-Id: Icd04634f47edbaef5e95d5aef682512fe6740c37
Kiyoung Kim [Wed, 26 Feb 2020 04:36:48 +0000 (13:36 +0900)]
Make sphal and vndk namespace available from legacy devices
linkerconfig failed to complete the execution from ARC++ which was
caused by missing vndk variables because ARC++ is legacy device. This
change allows linkerconfig to generate ld.config.txt for SWCodec by
allowing SPHal and VNDK namespaces even from legacy devices
Bug:
149914078
Test: m -j passed
Test: Tested from ARC++ w/ betty
Change-Id: I5412434f0d2b3b69b916ca512828498a7eba72a3
Automerger Merge Worker [Tue, 25 Feb 2020 13:09:19 +0000 (13:09 +0000)]
Replace the hardcoded ART namespace config with an autogenerated one. am:
0e9de4a5d7
Change-Id: Ifb50a8da35d31a5dc531ac940985216f409267bd
Automerger Merge Worker [Tue, 25 Feb 2020 13:09:08 +0000 (13:09 +0000)]
Rename ART APEX directory to what it is on device. am:
b7e0ae0c97
Change-Id: Id5070761eb98f45c78f08245af0f35e7470341e7
Automerger Merge Worker [Tue, 25 Feb 2020 05:43:55 +0000 (05:43 +0000)]
Exit on failure in rundiff.sh. am:
73cccc439c
Change-Id: I86a4678d6d3bf1ce3928e5d1c2611d8ca9febdea
Automerger Merge Worker [Tue, 25 Feb 2020 01:42:33 +0000 (01:42 +0000)]
Update golden linkerconfig from change in https://r.android.com/
1242397. am:
957847ebd3
Change-Id: I9b0554ee04db0fbf4c9d343d44816b904aadbbeb
Martin Stjernholm [Fri, 21 Feb 2020 20:25:43 +0000 (20:25 +0000)]
Replace the hardcoded ART namespace config with an autogenerated one.
Test: Build and boot
Test: system/linkerconfig/rundiff.sh
Bug:
147082642
Change-Id: If6e45da6823180c8ef36f066753bdba167f64df5
Martin Stjernholm [Mon, 24 Feb 2020 17:21:56 +0000 (17:21 +0000)]
Rename ART APEX directory to what it is on device.
Preparation to make an InitializeWithApex call in art.cc produce the
right paths.
Test: system/linkerconfig/rundiff.sh
Bug:
147082642
Change-Id: If6116a906dcd0ec983dec8746ab004cb0c835f58
Martin Stjernholm [Mon, 24 Feb 2020 17:18:38 +0000 (17:18 +0000)]
Exit on failure in rundiff.sh.
In particular, don't show a diff created with an old binary if
linkerconfig failed to compile.
Test: system/linkerconfig/rundiff.sh
(with and without a syntax error in a linkerconfig .cc file)
Bug:
140599044
Change-Id: I1449de75d20e8a40f26bac087048f869a0f468a5
Martin Stjernholm [Mon, 24 Feb 2020 16:03:06 +0000 (16:03 +0000)]
Update golden linkerconfig from change in https://r.android.com/
1242397.
Test: system/linkerconfig/rundiff.sh
Bug:
140599044
Change-Id: Ia4cdf12bcc37564951cbfc7ea286fd3bc1a6a933
Automerger Merge Worker [Sat, 22 Feb 2020 13:38:21 +0000 (13:38 +0000)]
Merge "Add golden output of linkerconfig" am:
2c87cccfbd
Change-Id: I549a7f2f90e9b1a9e78f56ac1b0684588740bd98
Treehugger Robot [Sat, 22 Feb 2020 13:27:30 +0000 (13:27 +0000)]
Merge "Add golden output of linkerconfig"
Jooyung Han [Tue, 18 Feb 2020 06:28:55 +0000 (15:28 +0900)]
Make APEXes with JNI libs "visible" in "system" section
It could be done by explicitly listing them when building "system"
section. This change does it automatically by checking if an apex has
jni libs in it.
Bug:
149363889
Test: atest --host linkerconfig_contents_fulltest
build/boots
Change-Id: Ibb23268ab3e5dcfe0a8f8f1c98f7594c083eafac
Automerger Merge Worker [Sat, 22 Feb 2020 00:22:14 +0000 (00:22 +0000)]
Merge "Add libadbd_fs to list of stub dependencies." am:
e04eef3242
Change-Id: I283fdcd61aec1b236fe91cff9c54a66898be2587
Josh Gao [Sat, 22 Feb 2020 00:03:21 +0000 (00:03 +0000)]
Merge "Add libadbd_fs to list of stub dependencies."
Automerger Merge Worker [Fri, 21 Feb 2020 21:23:05 +0000 (21:23 +0000)]
Merge "[adbwifi] Add adbd apex exported libs to system namespace." am:
c005be7589
Change-Id: I5440261e02501e6fac27fee126485a22dea9de3a
Joshua Duong [Fri, 21 Feb 2020 21:07:51 +0000 (21:07 +0000)]
Merge "[adbwifi] Add adbd apex exported libs to system namespace."
Automerger Merge Worker [Fri, 21 Feb 2020 10:27:08 +0000 (10:27 +0000)]
Merge "Trim root path from output" am:
b7c162435b
Change-Id: If7db732fa5a1e267c777c0610608dc3492a77749
Treehugger Robot [Fri, 21 Feb 2020 10:14:36 +0000 (10:14 +0000)]
Merge "Trim root path from output"
Automerger Merge Worker [Fri, 21 Feb 2020 10:00:19 +0000 (10:00 +0000)]
Merge "Define vndk_product namespace for product apps" am:
6eb18354c1
Change-Id: Ifde5ffcae2bdad31e068f2fabfbe9a1838b14a21
Treehugger Robot [Fri, 21 Feb 2020 09:38:26 +0000 (09:38 +0000)]
Merge "Define vndk_product namespace for product apps"
Automerger Merge Worker [Fri, 21 Feb 2020 07:37:41 +0000 (07:37 +0000)]
Merge "Make /linkerconfig/<apexname> directories accessible to others" am:
b52f719faf
Change-Id: Id755473867942a98d93d1091a3e7556fccbd43bd
Treehugger Robot [Fri, 21 Feb 2020 07:14:12 +0000 (07:14 +0000)]
Merge "Make /linkerconfig/<apexname> directories accessible to others"
Jooyung Han [Thu, 20 Feb 2020 10:54:16 +0000 (19:54 +0900)]
Add golden output of linkerconfig
./rundiff.sh runs linkerconfig on host and compares the output files
with golden output.
Bug:
140599044
Test: ./rundiffs.sh
Change-Id: I1b2892d70fc514cf70a28eb6e041ad0bfa232de1
Jooyung Han [Thu, 20 Feb 2020 09:21:03 +0000 (18:21 +0900)]
Trim root path from output
When linkerconfig runs on host with --root argument, it prints root as
well like following:
$ linkerconfig --vndk R --root /tmp/test_root
...
namespace.foo.search_paths = /tmp/test_root/product/${LIB}
..
This change trims root from path variables and apex paths so the output
look more like real output.
Bug: n/a
Test: build/boot
run linkerconfig on host and compare outputs
Change-Id: Icc91f297047f059684a42d825048e50e26873520
Jiyong Park [Fri, 21 Feb 2020 04:56:52 +0000 (13:56 +0900)]
Make /linkerconfig/<apexname> directories accessible to others
When linkerconfig is exec'ed by init, umask is by default set to 0x0077.
As a result, even though we create the directories with mkdir(...,
0755), they are marked as inaccessible for group and others.
Fixing the issue by explicitly setting umask to 0x0022.
Bug:
144914078
Test: build a device with flattened APEX. Check the mode bits of the
directories of under /linkerconfig.
$ ls -al /linkerconfig
total 96
drwxr-xr-x 9 root root 200 2020-02-21 13:47 .
drwxr-xr-x 22 root root 4096 2020-02-21 13:54 ..
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.adbd
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.art
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.conscrypt
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.media.swcodec
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.os.statsd
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.runtime
drwx--xr-x 2 root root 60 2020-02-21 13:47 com.android.sdkext
-rw-r--r-- 1 root root 91651 2020-02-21 13:47 ld.config.txt
Change-Id: Id2f7f8a363ba239943942ba6e3bc984cd8f630b0
Josh Gao [Fri, 21 Feb 2020 04:43:55 +0000 (20:43 -0800)]
Add libadbd_fs to list of stub dependencies.
Test: treehugger
Change-Id: Iebb108c212ace8470efef6c2838eaefdd4b4be70
Joshua Duong [Mon, 10 Feb 2020 06:28:01 +0000 (22:28 -0800)]
[adbwifi] Add adbd apex exported libs to system namespace.
These libraries will be used by system_server
(libandroid_servers.so).
Bug: b/
149181583
Bug: b/
111434128
Test: boots, adbd is not crashing.
Test: cat /proc/`pidof system_server`/maps | grep libadb
Verify that only libadb_pairing_auth.so, libadb_pairing_connection.so,
and libadb_pairing_server.so are being used.
Test: cat /proc/`pidof adbd`/maps | grep libadb
Change-Id: I8b645c9aca2465d5231b3cb21ca85fc3ebfc9093
Justin Yun [Tue, 18 Feb 2020 06:01:51 +0000 (15:01 +0900)]
Define vndk_product namespace for product apps
Unbundled apps may use vndk-sp libs from the system section. However,
product apps must use the vndk-sp libs for the product vndk version
that can be different from the vendor vndk version. So we must define
a vndk namespace for product partition.
For this purpose, BuildVndkNamespace() function requires an
additional parameter to indicate which partition is using the
namespace.
Using this function, the system section has an additional namespace
called "vndk_product" which is used only for unbundled product apps.
Test: atest linkerconfig_modules_unittest
Bug:
149063221
Change-Id: I3658efdc75e5c9a0ac3b92b9afc68aff2d4cb300
Automerger Merge Worker [Fri, 21 Feb 2020 01:12:02 +0000 (01:12 +0000)]
Merge "Rename APEX Namespace" am:
52120b489b
Change-Id: I1ad4220320ce62274f553afa7e81b322e82e1f51
Kiyoung Kim [Fri, 21 Feb 2020 01:04:37 +0000 (01:04 +0000)]
Merge "Rename APEX Namespace"
Automerger Merge Worker [Fri, 21 Feb 2020 00:07:01 +0000 (00:07 +0000)]
Merge "Fix full content test" am:
9fa8d06ecc
Change-Id: I41c27ed81cfb803954d773a07a4d0747bea4b33f
Kiyoung Kim [Thu, 20 Feb 2020 23:46:39 +0000 (23:46 +0000)]
Merge "Fix full content test"
Kiyoung Kim [Thu, 20 Feb 2020 09:04:23 +0000 (18:04 +0900)]
Fix full content test
Full content test was not working properly because the way of checking
if VNDK is enabled has been changed. This fix generates test context to
mock it available for VNDK.
Test: atest passed
Change-Id: I46064d1d5505dc5c6af438e69faae166dee9dc58
Kiyoung Kim [Wed, 19 Feb 2020 07:26:03 +0000 (16:26 +0900)]
Rename APEX Namespace
Current APEX Namespace is named with APEX name itself, which also uses
.(dot) so linker configuration can keep the syntax safe. Update name of
namespace from APEX by replacing '_' with '.' so keep configuration safe
for future syntax update.
Bug:
148826508
Test: m -j passed
Test: boot succeeded from cuttlefish and walleye
Change-Id: I9185c909678e2e39d539622d51d8f378b819b466
Automerger Merge Worker [Wed, 19 Feb 2020 04:06:42 +0000 (04:06 +0000)]
Add com.android.os.statsd to legacy linkerconfig am:
2b465ce881
Change-Id: Ib2a29f358385d1b67a27f58e900dcd76a2efa20f
Garfield Tan [Wed, 19 Feb 2020 01:43:36 +0000 (17:43 -0800)]
Add com.android.os.statsd to legacy linkerconfig
Similar to aosp/
1237667, but for legacy stuff.
Bug: None
Test: Legacy stuff boots.
Change-Id: Iad17f5529ea6bb520c0ee5a4071a82ffd7c2cc27
Jeffrey Huang [Tue, 18 Feb 2020 20:50:43 +0000 (20:50 +0000)]
Merge "Update linkerconfig for libs in statsd" am:
5504faa670
Change-Id: I969a8e8828d5e9273c863688c48d6d2ba9297d95
Jeffrey Huang [Tue, 18 Feb 2020 18:26:53 +0000 (18:26 +0000)]
Merge "Update linkerconfig for libs in statsd"
Treehugger Robot [Tue, 18 Feb 2020 08:06:49 +0000 (08:06 +0000)]
Merge "Add com.android.os.statsd to linkerconfig" am:
91fccce607
Change-Id: Ia2aa4670b96557434b1c1c8675409e17515f00a3
Treehugger Robot [Tue, 18 Feb 2020 07:54:26 +0000 (07:54 +0000)]
Merge "Add com.android.os.statsd to linkerconfig"
Tej Singh [Thu, 13 Feb 2020 01:21:01 +0000 (17:21 -0800)]
Add com.android.os.statsd to linkerconfig
Adds com.android.os.statsd to System BuildSection. I believe this is to
get the namespace the proper visibility for jni.
Test: build/boots
Change-Id: Id516e79e12fde608888587ec15ab0f3358f4918d
Merged-In: Id516e79e12fde608888587ec15ab0f3358f4918d
(cherry picked from commit
91454166a50d86d2367c8ec5b4686087ecc13184)
Treehugger Robot [Tue, 18 Feb 2020 05:30:16 +0000 (05:30 +0000)]
Merge "Remove extra using statements" am:
28133def11
Change-Id: Iab0964273993949a3eb3c0c331eb58bc75e3c5e1
Treehugger Robot [Tue, 18 Feb 2020 05:20:14 +0000 (05:20 +0000)]
Merge "Remove extra using statements"
Jeffrey Huang [Mon, 17 Feb 2020 19:59:58 +0000 (11:59 -0800)]
Update linkerconfig for libs in statsd
Bug:
148605160
Test: m -j
Change-Id: Idb6308e8f518536e97106c445b1945945040a4c3
Jeffrey Huang [Fri, 14 Feb 2020 22:11:39 +0000 (22:11 +0000)]
Merge "Fix Camera bug" am:
5c811ebf1c
Change-Id: I78f49c50833251698c1fc5351e3a5ee66819e872
Jeffrey Huang [Fri, 14 Feb 2020 21:57:31 +0000 (21:57 +0000)]
Merge "Fix Camera bug"
Tom Cherry [Fri, 14 Feb 2020 20:27:19 +0000 (12:27 -0800)]
Remove extra using statements
android::base::Errorf and android::base::ErrnoErrorf are now #define's
instead of functions, so remove their using statements.
Test: build
Change-Id: I7333b916ee87668fb9fd15b9293de5da41c43409
Jeffrey Huang [Fri, 14 Feb 2020 20:08:20 +0000 (12:08 -0800)]
Fix Camera bug
Bug:
149538115
Test: Flash and take a picture, verified no crash
Change-Id: Idd455f8803cf6f1b1f4c95d854a6077e33bae5e1
Jeffrey Huang [Fri, 14 Feb 2020 04:07:02 +0000 (04:07 +0000)]
Allow libincident.so to be linked from apex am:
4e15bf53f0
Change-Id: Iea0a310c93367544a21a0964a7985647f888ef52
Jeffrey Huang [Thu, 13 Feb 2020 23:40:36 +0000 (15:40 -0800)]
Allow libincident.so to be linked from apex
Bug:
145923087
Test: m -j
Change-Id: I787f15750e19c5028b334161c5a7d4fa13003c6f
Automerger Merge Worker [Thu, 13 Feb 2020 06:42:09 +0000 (06:42 +0000)]
Fix linkerconfig_backward_compatibility_test am:
2dd4e4d2cb
Change-Id: I978ed22941f49942163419544398f8925af3ddaa
Jooyung Han [Wed, 12 Feb 2020 23:41:15 +0000 (08:41 +0900)]
Fix linkerconfig_backward_compatibility_test
The current GetValue() falls back to GetProperty(). This makes the test
show different result on different running environment. For consistent
test result, MockVariables() now overrides all product/vendor variables.
Bug: n/a
Test: atest --host linkerconfig_backward_compatibility_test
atest linkerconfig_backward_compatibility_test
Change-Id: I4b7533e10058b0236a8aef4c54fbb58f3bec0ccc
Automerger Merge Worker [Wed, 12 Feb 2020 18:42:25 +0000 (18:42 +0000)]
Read vndk libraries txt files from vndk apex am:
7c2b73a71f
Change-Id: I24a5c1482e9a059025dac3aba1ea1e1cf485b7b2
Automerger Merge Worker [Wed, 12 Feb 2020 18:42:22 +0000 (18:42 +0000)]
Generate vendor stuff only if vndk is avilable am:
3f83cfb602
Change-Id: I90769d8e5ae9ea3116454aa3bf4d43d04021a877
Jooyung Han [Tue, 11 Feb 2020 23:53:51 +0000 (08:53 +0900)]
Read vndk libraries txt files from vndk apex
Vndk apex contains some txt files which list libraries it contains.
- llndk.libraries.txt
- vndksp.libraries.txt
- vndkcore.libraries.txt
- vndkprivate.libraries.txt
These files can be read from vndk apex instead of /system/etc.
Bug:
145184886
Test: build / flash / boot
Change-Id: I2b242b71768af2a30de519ccd4d73b1a86e46382
Jooyung Han [Tue, 11 Feb 2020 23:43:31 +0000 (08:43 +0900)]
Generate vendor stuff only if vndk is avilable
Linkerconfig runs even when there is no apexes available. When vndk apex
is not available, having vendor section or namespaces requiring vndk
libraries is meaningless.
This is necessary because we'd like to load some variables from vndk
apex, but relying on those variables when vndk apex is not available may
fail to generate linker configuration.
Bug:
145184886
Test: build / flash / boot
Change-Id: I7c77757254a63c8bc7470c4ae87f2db3779e6465
Automerger Merge Worker [Tue, 11 Feb 2020 23:07:32 +0000 (23:07 +0000)]
Merge "Add required modules for linkerconfig" am:
bade76eb13
Change-Id: I9cad270d6fbfa1125f1524954f2b8f7765228499
Treehugger Robot [Tue, 11 Feb 2020 22:59:27 +0000 (22:59 +0000)]
Merge "Add required modules for linkerconfig"
Automerger Merge Worker [Tue, 11 Feb 2020 22:47:37 +0000 (22:47 +0000)]
Merge "2 more missing Result::ok() calls in system/linkerconfig" am:
ffacdd9477
Change-Id: I0fbc15f0cb04554567ee042fb97a91e09a6faf6f
Treehugger Robot [Tue, 11 Feb 2020 22:35:08 +0000 (22:35 +0000)]
Merge "2 more missing Result::ok() calls in system/linkerconfig"
Automerger Merge Worker [Tue, 11 Feb 2020 22:08:19 +0000 (22:08 +0000)]
Merge changes I2ead6a77,I6bf2204a am:
4add3c0b71
Change-Id: I3b673660490dc97f6d080a9c0112a6b62a98c99c
Treehugger Robot [Tue, 11 Feb 2020 21:49:17 +0000 (21:49 +0000)]
Merge changes I2ead6a77,I6bf2204a
* changes:
Remove ResolveVariables()
Make ConfigWriter simpler
Jooyung Han [Tue, 11 Feb 2020 19:21:16 +0000 (04:21 +0900)]
Add required modules for linkerconfig
linkerconfig relies on some txt files.
Adding those modules as required:
- llndk.libraries.txt
- vndkprivate.libraries.txt
- vndkcore.libraries.txt
- vndkcorevariant.libraries.txt
- vndksp.libraries.txt
- sanitizer.libraries.txt
Bug: N/A
Test: m installclean; m linkerconfig
check if those txt files are installed together
Change-Id: I8ab98591026dad06b3140043c54b7134ca3dac33
Bernie Innocenti [Tue, 11 Feb 2020 20:09:44 +0000 (05:09 +0900)]
2 more missing Result::ok() calls in system/linkerconfig
Test: cd system/linkerconfig && atest
Change-Id: I2c6f8eb4b81065b90512f88a9f248affecacf019
Automerger Merge Worker [Tue, 11 Feb 2020 19:16:38 +0000 (19:16 +0000)]
Merge "Use apex_name for the name of linker namespace" am:
2fa82ebd25
Change-Id: I92d3bdbf307e06d8439d957d779312498c12e20f
Treehugger Robot [Tue, 11 Feb 2020 19:00:40 +0000 (19:00 +0000)]
Merge "Use apex_name for the name of linker namespace"
Jooyung Han [Fri, 7 Feb 2020 16:08:22 +0000 (01:08 +0900)]
Remove ResolveVariables()
ResolveVariables() takes long because it uses regex pattern search and
replace them with values. It can be avoided by resolving variables while
configurations are being built.
For easy transition, "Var()" utility function is introduced which should
be called after LoadVariables(). This will be enforced by moving Var()
into Context so that it only be called when Context is available (which
is, after LoadVariables() is called)
Bug:
149020353
Test: atest --test-mapping system/linkerconfig
build / flash / boot
Change-Id: I2ead6a77dcc9ec14b4e083897a2818714438beb5
Jooyung Han [Fri, 7 Feb 2020 06:38:16 +0000 (15:38 +0900)]
Make ConfigWriter simpler
- Remove varg WriteLine
- No prefix
- Add WriteVars for writing multiple lines using "="/ "+="
This refactoring is a prep for removing "ResolveVariables()" which is very slow.
Bug:
149020353
Test: atest --test-mapping system/linkerconfig
Change-Id: I6bf2204a9ac0794b0bdf8028999a3543821a26be
Automerger Merge Worker [Sun, 9 Feb 2020 08:21:56 +0000 (08:21 +0000)]
Last missing Result::ok() calls in system/linkerconfig am:
51be4fe748
Change-Id: I71de5d9c437049101bdf9c185242058776981c35
Bernie Innocenti [Sat, 8 Feb 2020 19:12:18 +0000 (04:12 +0900)]
Last missing Result::ok() calls in system/linkerconfig
No functionality change.
Test: cd system/linkerconfig && atest
Change-Id: I5ffa14d1d935c8e01c694338400e366a19895ba6
Automerger Merge Worker [Sat, 8 Feb 2020 01:37:40 +0000 (01:37 +0000)]
Remove unused files am:
35df8b6140
Change-Id: I3d3de0df7afb119313feb7704d5e03a054b09510
Jooyung Han [Fri, 7 Feb 2020 17:59:10 +0000 (02:59 +0900)]
Use apex_name for the name of linker namespace
Till now short names are used for apex namespaces but there are no
explicit rule for this. Instead of extracting namespace name from apex
name (com.android.foo => foo), we'd better use apex name as it is
because it is well-established identifier for apexes.
Bug:
148826508
Test: build/flash/boot
atest
Change-Id: I4f77eb85652a999274844436ba14b5c05831cf5b
Jooyung Han [Fri, 7 Feb 2020 17:51:00 +0000 (02:51 +0900)]
Remove unused files
conscrypt and neuralnetworks namespaces are now generated automatically.
Bug: N/A
Test: build
Change-Id: Ic13d3f4206ecfda1937adf2111977b279fba05ef
Automerger Merge Worker [Fri, 7 Feb 2020 07:44:06 +0000 (07:44 +0000)]
Auto-generate runtime namespace am:
b818280515
Change-Id: I9ae5f026915c98aa1070560fd1923536c0a8d3b7
Automerger Merge Worker [Fri, 7 Feb 2020 07:43:57 +0000 (07:43 +0000)]
Auto-generate media namespace am:
834efc8c45
Change-Id: Idff81f99b6a7baf98882615653563e7cc69b09f2
Automerger Merge Worker [Fri, 7 Feb 2020 07:43:55 +0000 (07:43 +0000)]
Auto-generate apex namespaces: cronet,nn,conscrypt am:
9960aca469
Change-Id: I7e6ecab4463e0c50864ef186952d549b6a63b40f
Jooyung Han [Thu, 6 Feb 2020 11:46:02 +0000 (20:46 +0900)]
Auto-generate runtime namespace
runtime apex provides bionic(libc/libm/libdl) libraries. But actually
they are supposed to be accessed via symlinks in /system/lib (i.e.
system namespace).
By amending soong not to emit those bionic libs as providing libs of
runtime apex, now runtime apex can be auto-generated by linkerconfig.
Bug:
144664390
Test: build / flash / boot
Change-Id: Idda42801a608e5fcb495bfccdd07ca6c0666a53d
Jooyung Han [Thu, 6 Feb 2020 11:39:02 +0000 (20:39 +0900)]
Auto-generate media namespace
Now, media namespace is auto-generated.
This is done by adding /apex/<name>/lib as permitted path as well as
search path, because media apex needs a permitted path
/com.android.media/lib/extractors.
Bug:
144664390
Test: build / flash / boot
atest --test-mapping system/linkerconfig
Change-Id: I9186b0768b3bce3ad19f3d14010725af0bbf5861
Jooyung Han [Thu, 6 Feb 2020 11:17:53 +0000 (20:17 +0900)]
Auto-generate apex namespaces: cronet,nn,conscrypt
Some visible namespaces are now auto-generated using activated apex
info. This is quite a significant change for init/bootstrap stages.
For example, at init stage which has no apexes activated, linkerconfig
dosn't generate apex namespaces at all. Previously, it was statically
generated whether those apexes are available or not.
Amon remaining apexes, media and runtime will be removed soon.
Bug:
144664390
Test: compare generated ld.config.txt between changes
build / flash / boot
atest --test-mapping system/linkerconfig
Change-Id: I334071dd59273e194ccdca1ef2cff0b7ee1b5c35
Automerger Merge Worker [Fri, 7 Feb 2020 03:47:15 +0000 (03:47 +0000)]
Merge "Configuration for special APEX binaries" am:
ce9da40b83
Change-Id: I182bca74f03de286823a6f0b61b04043e819920f
Kiyoung Kim [Fri, 7 Feb 2020 03:25:42 +0000 (03:25 +0000)]
Merge "Configuration for special APEX binaries"
Kiyoung Kim [Wed, 29 Jan 2020 05:56:54 +0000 (14:56 +0900)]
Configuration for special APEX binaries
Some of the linker configuration for APEX binaries are not enough just
to use auto-generated contents. This change implements some of the
additional namespaces for some special APEXes with binaries - ART and
Media SWCodec.
Bug:
147987608
Test: m -j passed
Test: Tested adbd and swcodec(Youtube) on Cuttlefish and Crosshatch
Change-Id: I58345dc31bb97138c9c632039a10ab000e23bcb6
Automerger Merge Worker [Thu, 6 Feb 2020 23:19:49 +0000 (23:19 +0000)]
Convert system/linkerconfig to Result::ok() am:
5c325567e2
Change-Id: I3d10df9aaaa1dbb9456960c24b20c7d7c4f6bab4
Bernie Innocenti [Thu, 6 Feb 2020 14:16:23 +0000 (23:16 +0900)]
Convert system/linkerconfig to Result::ok()
No functionality changes, this is a mechanical cleanup.
Test: m
Change-Id: I759398fdf01d1703b0c128fb4f34d33a6f1a2027
Automerger Merge Worker [Wed, 5 Feb 2020 05:24:37 +0000 (05:24 +0000)]
Move part of Context into modules::BaseContext am:
32c2ef7510
Change-Id: Ie1318021f558fce908222f5df2c174fe1db33812
Automerger Merge Worker [Wed, 5 Feb 2020 05:24:27 +0000 (05:24 +0000)]
Add default "provides" list to system namespace am:
91079f0f9b
Change-Id: Ie67d2b6d6bd4f5762a03f7559a6ff1ebcdd2c7ec
Automerger Merge Worker [Wed, 5 Feb 2020 05:24:25 +0000 (05:24 +0000)]
Add "--strict" flag am:
b4af747146
Change-Id: Ic1e6d5a1e28fedc98470dc8a3f0ef9375fedf85f
Automerger Merge Worker [Wed, 5 Feb 2020 05:24:23 +0000 (05:24 +0000)]
Build adbd/resolv namespace automatically am:
7482996bd3
Change-Id: I7edb3004451f2b94e2f0f019ca603c4c1b423b72
Jooyung Han [Tue, 4 Feb 2020 10:46:06 +0000 (19:46 +0900)]
Move part of Context into modules::BaseContext
ApexInfo/strict is used in Section::Resolve and it's very generic.
Moving it into BaseContext makes code simpler
Bug: N/A
Test: atest --test-mapping system/linkerconfig
Change-Id: I8acbdb7ed3368b6c10474be1c30a12fbc81c8ca6
Jooyung Han [Mon, 3 Feb 2020 10:32:33 +0000 (19:32 +0900)]
Add default "provides" list to system namespace
Contrary to APEX modules, system doesn't have meta data represening
"provides". So adding the "provides" list to system namespaces.
Bug:
144664390
Test: build / flash / boot
Test: atest --test-mapping system/linkerconfig
Change-Id: I808736814221a0d0cff2f163d64da01b398dc265
Jooyung Han [Mon, 3 Feb 2020 09:07:12 +0000 (18:07 +0900)]
Add "--strict" flag
--strict flag tells linkerconfig to resolve constraints in strict mode.
In strict mode, when a required module is not found, resolution fails.
Otherwise, missing requirements are ignored silently.
Linkerconfig may run at a very early stage when there is no apexes or
only bootstrap apexes are activated. --strict mode can be turned on when
all apexes are activated.
Bug:
144664390
Test: build / flash / boot
Change-Id: I13cab3aabb605338d031f825fe4af5f9a410a715
Jooyung Han [Mon, 3 Feb 2020 08:35:56 +0000 (17:35 +0900)]
Build adbd/resolv namespace automatically
adbd/resolv APEXes can be generated automatically.
Bug:
144664390
Test: build / flash / boot
Change-Id: I025bf186d7071e6051bd65d94ec9b3185b8c1a43