android_system_image filers packaging items installed outside "system"
partition.
Some packaging items install related items to different partitions but
putting them altogether to android_system_image doesn't make sense.
(android_system_image is suppposed to be "system" partition)
To be specific, this filters out "apex" partition items. "apex"
partition is used by APEX installation to install APEX contents to paths
similar to activated paths on device so that symbol lookup works well
with APEX contents.
Bug: 225121718
Test: atest MicrodroidHostTestCases
Test: debugfs <intermediate>/microdroid.img -R 'ls system'
shows no "com.android.runtime"
Change-Id: Ibc3d85ead2fda99e231132ce8ab9ccf1cc9317b7
Previously, we gather all deps without checking if a dep is actually one
of packaged items (CopyDepsToZip contents)
For example, following items shouldn't be listed.
provideLibs: "platform-mainline-sdk_libartpalette-system@current.so"
provideLibs: "platform-mainline-sdk_liblog@current.so"
provideLibs: "runtime-module-sdk_libc@current.so"
provideLibs: "runtime-module-sdk_libdl@current.so"
provideLibs: "runtime-module-sdk_libdl_android@current.so"
provideLibs: "runtime-module-sdk_libm@current.so"
Now, we gather only those modules contributing CopyDepsToZip to generate
linker config for android_system_image.
Test: m nothing
Test: m microdroid
Test: conv_linker_config print -s
.../microdroid/android_common/root/system/etc/linker.config.pb
shouldn't list sdk members.
Change-Id: Ife5d2193ab59970367d10e196aaaa922c6582862
android_system_image module type is a specialization of the
android_filesystem module type. Currently, it adds a build rule for
creating linker.config.pb from the information about all the other files
in the filesystem and includes linker.config.pb to the filesystem as
well.
To do so, the filesystem module now provides a function pointer which
subtype modules like android_system_image can implement to pass extra
files that they want to package in the filesystem.
In addition, the linkerconfig package is revised to make it possible to
build linker.config.pb file outside of the package.
Bug: 185391776
Test: m microdroid and inspect etc/linker.config.pb in it.
Change-Id: Id89c40b519213062860d7306029b8413d8d36a2d