Commit graph

59039 commits

Author SHA1 Message Date
Ulya Trafimovich
77a78fca4e Refactor library path representation in dexpreopt.
This is a preliminary CL before fixing on-device paths to DEX jars.
It groups together the inormation about on-host build paths and
on-device install paths to library DEX jars.

This CL changes the structure of module dexpreopt.config files
generated by the build system. Aside of that, no functional changes.

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I8e92829885f26522aa2b936e77e91ce91593b27c
2020-06-04 17:33:22 +01:00
Ulyana Trafimovich
4c5ed87faa Merge "Add product variable PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS." 2020-06-04 08:56:04 +00:00
Pierre Couillaud
d99da8fa17 Strip debug symbols from modules (fixup)
allow to also skip the stripping of the modules present in vendor
ramdisk when the BOARD configuration is set to skip the strip step.

there is also a shortcoming of this functionality: it currently assumes
the modules to strip are all created equal against the same arch in
particular, however this does not work for kernel modules which are
for mixed mode platforms, as example {kernel,android} == {aarch64,armv7}
because it will select the "android" mode strip which is unaware of the
kernel mode architecture.

Bug: 156395749
Bug: 155193290
Change-Id: I35ef51845224e94e3e253acdeb6bb14b990a401b
2020-06-04 00:17:58 +00:00
Treehugger Robot
49efd2aad0 Merge "Re-enable link type checking" 2020-06-03 21:30:22 +00:00
Dan Willemsen
be15ded040 Re-enable link type checking
When I removed the actions that ran the python link type checker, I
forgot that the Make version hadn't been enabled yet. Enable the Make
version.

Bug: 143748700
Test: treehugger (particularly, build_test on the downstream branches)
Change-Id: I293b3be5ca7828c9d7148e13d88b0f0bba54d964
Merged-In: I293b3be5ca7828c9d7148e13d88b0f0bba54d964
Merged-In: I08090db44d47f809fbaa0c4ad373e46e6a3fbe2e
2020-06-03 21:09:32 +00:00
Treehugger Robot
8c6c2cd3de Merge "refactor kernel module build, add version support" 2020-06-03 18:10:52 +00:00
Treehugger Robot
aa62df07cf Merge changes Ia1392b7d,I199788d4,I9c8ac0e6
* changes:
  move BOARD_RECOVERY_KERNEL_MODULES_LOAD default
  move module list creation outside conditionals
  fix reference to BOARD_ODM_MODULES_LOAD
2020-06-03 18:10:44 +00:00
Xin Li
e92524e4ce Merge QQ3A.200605.002 into master
Bug: 158095402
Merged-In: I216989b052070e9f84bf1fa0f9ecc4724db50418
Change-Id: I58f2e5b4c7039a22aaecb66eabc8288ff51cd97c
2020-06-03 10:44:41 -07:00
Ulya Trafimovich
40e55c20eb Add product variable PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS.
If true, incorrect order of system server jars does not cause a build
error. The order is non-optimal if some jar X precedes its dependency Y.
In that case dexpreopt will be unable to resolve any rerefences from X
to Y.

Test: lunch cf_x86_phone-userdebug && m nothing
Test: lunch aosp_car_arm && m nothing

Bug: 140451054

Change-Id: I70efd365fa9fbd9e40792d646f8471d009164924
Merged-In: I70efd365fa9fbd9e40792d646f8471d009164924
(cherry picked from commit 17715b48f0)
2020-06-03 17:38:26 +01:00
Yo Chiang
60da88da55 Make required modules support :32 and :64 suffix
Support specifying bitness of required modules with :32 and :64 suffix,
like in PRODUCT_PACKAGES.

Bug: 155869107
Bug: 129323707
Test: TH noop
Change-Id: I47d523e4e57cb8a99629fd241a16069c0be55903
2020-06-03 18:27:42 +08:00
Yo Chiang
1b8283358e Refactor *-select-bitness-of-required-modules
* Streamline required module bitness resolution

If a module is for cross host OS, the required modules are also for that
OS.
Otherwise if the requirer module is native and the required module is
shared library or native test, then the required module resolves to the
same bitness.
Otherwise the required module resolves to both variants, if they exist.

* Factor out the common logic and merge
  <target|host|host-cross>-select-bitness-of-required-modules

This lays the road for follow-up changes to add bitness suffix support.
This slightly reduces readibility. To make up for the loss, the
bitness-resolving logic is easier to maintain since we don't have
multiple copies of *-select-bitness-of-required-modules.

Bug: 155869107
Test: check the diff of product_target_FILES and product_host_FILES
Test: check the diff of ALL_MODULES.*.REQUIRED_FROM_(TARGET|HOST)
Change-Id: Ib2f4b548535e983d621dad71cb920101111140f2
2020-06-03 18:27:20 +08:00
Treehugger Robot
0208ce535d Merge "remove clatd.conf which is no longer required by clat daemon" am: 5638065faa
Original change: https://android-review.googlesource.com/c/platform/build/+/1172552

Change-Id: I216989b052070e9f84bf1fa0f9ecc4724db50418
2020-06-03 05:27:41 +00:00
Treehugger Robot
5638065faa Merge "remove clatd.conf which is no longer required by clat daemon" 2020-06-03 05:15:21 +00:00
Yo Chiang
eb4f43e6cc Merge "Revert^2 "Retire mainline.mk"" am: 2ca90c5e97
Original change: https://android-review.googlesource.com/c/platform/build/+/1322634

Change-Id: Ia1fe27c92188cf0dc07a1dcc44e819a2babd617c
2020-06-03 03:02:49 +00:00
Yo Chiang
2ca90c5e97 Merge "Revert^2 "Retire mainline.mk"" 2020-06-03 02:47:52 +00:00
Yo Chiang
82e4bc5d0c Revert^2 "Retire mainline.mk"
This reverts commit 4003bd9def.

Reason for revert: cleaned up mainline.mk users

Bug: 157548597
Fixes: 141443017
Change-Id: I5e38620ed1c90f7188901eb148c7e3aa0596a27d
2020-06-03 02:47:34 +00:00
Oleg Aravin
8046cb0a2c Attach apk_name as a suffix for the temporary files
With this change the name of the signed and unsigned APK will be something like 'tmpadrbpp9f/tmpvl0lf2kr/tmpknja6mca_MyApk.apk' instead of 'tmpadrbpp9f/tmpvl0lf2kr/tmpknja6mca'.

The motivation for this change is a better logging and transparency what is being signed in the underlying client.

Change-Id: I32b0e93d5859ca3fb712e426705f16d329d71f0e
2020-06-02 16:03:21 -07:00
Steve Muckle
2335d76ada refactor kernel module build, add version support
Refactor the build support for kernel modules. This refactoring is
leveraged to add support for directories of kernel modules in each
partition. To add a directory of kernel modules, define
BOARD_KERNEL_MODULE_DIRS to include the directory name, for example:

BOARD_KERNEL_MODULE_DIRS := 5.4

The build will then check all the usual kernel module related macros
with an extension of _5.4, for example you can define

BOARD_VENDOR_KERNEL_MODULES_5.4 := <modules to copy>
BOARD_VENDOR_KERNEL_MODULES_ARCHIVE_5.4 = <path to archive file>
BOARD_VENDOR_KERNEL_MODULES_LOAD_5.4 := <modules for load list>

Bug: 157645635
Change-Id: I1687d0ec85c1dcf21350350623b4689aba3f6717
2020-06-02 15:17:26 -07:00
Steve Muckle
c88a8c88e4 move BOARD_RECOVERY_KERNEL_MODULES_LOAD default
Moving this makes each of the partition's kernel module Makefile
generation more similar, enabling a forthcoming cleanup/refactoring.

If recovery-is-boot and there are kernel modules defined in
BOARD_GENERIC_RAMDISK_KERNEL_MODULES, those kernel modules will
now be included in the default assignment to
BOARD_RECOVERY_KERNEL_MODULES_LOAD. If this is not desired then
BOARD_RECOVERY_KERNEL_MODULES_LOAD may simply be set to
BOARD_RECOVERY_KERNEL_MODULES (or a custom list of recovery kernel
modules to load).

Bug: 157645635
Change-Id: Ia1392b7d20d07cee75420edd95dcee1dc825516e
2020-06-02 15:17:15 -07:00
Steve Muckle
1013d789de move module list creation outside conditionals
Currently the two special-case calls to create just a module load list
(as opposed to copying a set of modules and creating a module load list)
are inside checks that the related board macro for the module set is not
empty.

While it would be incorrect to create a non-empty module load list with
an empty set of modules, this error would quickly surface at runtime.
More importantly, moving these out will permit refactoring this code to
clean it up.

Bug: 157645635
Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36
2020-06-02 15:17:04 -07:00
Steve Muckle
f291097221 fix reference to BOARD_ODM_MODULES_LOAD
This check is meant to initialize BOARD_ODM_KERNEL_MODULES_LOAD to
BOARD_ODM_KERNEL_MODULES if BOARD_ODM_KERNEL_MODULES_LOAD is empty.

Bug: 157645635
Change-Id: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
2020-06-02 15:16:54 -07:00
Treehugger Robot
6231dd8584 Merge "Remove unused check-api rule" am: fa9ea4b8b0
Original change: https://android-review.googlesource.com/c/platform/build/+/1322795

Change-Id: I5e1d6dd6629d51410a15620e22d0460d9c39c68b
2020-06-02 19:27:03 +00:00
Treehugger Robot
fa9ea4b8b0 Merge "Remove unused check-api rule" 2020-06-02 19:11:42 +00:00
Aurimas Liutikas
9c5b07966e Remove unused check-api rule
Change-Id: I0297b226d066e99ee4fc4c2b22e160eafc7f5a8a
Test: Treehugger?
2020-06-02 17:01:52 +00:00
Maciej Żenczykowski
836cbf2943 remove clatd.conf which is no longer required by clat daemon
Test: builds
Bug: 144730808
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If5d9e575c0c784fe121d8aff533354d3c91ecff4
2020-06-02 10:32:45 +00:00
Josh Gao
67e0295833 Rename adbd_system_binaries to adbd_system_api.
This is going to include libraries as well, so rename to reflect this.

Bug: http://b/157709367
Test: treehugger
Change-Id: I94625a6343e18032d8607cf8c58bde49d64db85c
2020-06-01 18:57:25 -07:00
sophiez
a81ee59b74 Copy generated xml file for NDK api coverage to dist when CLANG_COVERAGE flag set.
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist DIST_DIR=/usr/local/google/home/sophiez/my_dist_dir EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true SKIP_BOOT_JARS_CHECK=true tests

Change-Id: I778da9ca7897752274744eca5530412c146fac96
2020-06-01 12:18:54 -07:00
Ulyana Trafimovich
25ed6113d5 Merge "Provide library path to android.test.base for dexpreopt." am: 1c294551b4
Change-Id: Ia307ddb9cffe74e9eaf7009924617b41d4facb76
2020-06-01 15:18:13 +00:00
Ulyana Trafimovich
1c294551b4 Merge "Provide library path to android.test.base for dexpreopt." 2020-06-01 15:05:25 +00:00
Ulya Trafimovich
0b0cf4c411 Provide library path to android.test.base for dexpreopt.
It may be needed in class loader context if the target API version
is less than 30.

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ifa5ab18d1dc322184100207ad6eee4bdcf74deb0
2020-06-01 12:29:27 +01:00
Yo Chiang
5e113d40d0 Merge "releasetools: Fix non-existent required dependency" am: 61e1cc7317
Change-Id: Ic9ecfd4e3ce60db8a730e58bac28a20fa151cd61
2020-06-01 06:42:21 +00:00
Yo Chiang
61e1cc7317 Merge "releasetools: Fix non-existent required dependency" 2020-06-01 06:31:07 +00:00
Treehugger Robot
7599287f00 Merge "remove spurious comma from module-load-list-copy-paths call" am: 6be7b57ce7
Change-Id: I07000da98825fb99ddf2947dd5dcc1a04d52bc87
2020-05-29 22:24:44 +00:00
Treehugger Robot
6be7b57ce7 Merge "remove spurious comma from module-load-list-copy-paths call" 2020-05-29 22:08:11 +00:00
Treehugger Robot
558cc4bd0d Merge "Add apksigner to otatools.zip" am: d6eb072c9f
Change-Id: I2c1b523610d2c177e0ac42e6d357648c1bb68cfa
2020-05-29 21:44:50 +00:00
J. Avila
bfc7440c43 Merge "Add build support for LZ4 ramdisks" am: bc4d5bdb87
Change-Id: Id686eef86540752f38fb28fb686907414e8e6f34
2020-05-29 21:43:58 +00:00
Jiyong Park
04799633dd Merge changes from topics "remove_bootimage_sysprops", "sysprop" am: 6dd5383c37
Change-Id: I698ba5f0e6166b1751d6acdedd176a5c939f1dc9
2020-05-29 21:43:03 +00:00
Treehugger Robot
d6eb072c9f Merge "Add apksigner to otatools.zip" 2020-05-29 21:28:11 +00:00
Steve Muckle
06b48162f4 remove spurious comma from module-load-list-copy-paths call
The module-load-list-copy-paths fn takes five parameters.

Merged-In: I7d1736da1599e265793173a741053d8a09f1622f
Change-Id: I9286c9e4ca81caf5392bc804dead718bd028b193
2020-05-29 13:54:49 -07:00
Baligh Uddin
ab25b2dcfa Add apksigner to otatools.zip
BUG: 157735036
Test: Local build.
Change-Id: I95c7001ad520d6b4a415d21ffdef55152b0e82b2
2020-05-29 19:01:32 +00:00
J. Avila
bc4d5bdb87 Merge "Add build support for LZ4 ramdisks" 2020-05-29 16:28:47 +00:00
Jiyong Park
6dd5383c37 Merge changes from topics "remove_bootimage_sysprops", "sysprop"
* changes:
  Drop the dependency from vendor/build.prop to system/build.prop
  Remove ro.bootimage.* sysprops
  ro.build.expect.* sysprops are created in a separate rule
  Make use of ADDITIONAL_ODM_PROPERTIES
  Refactor post_process_props.py
  remove code for default.prop
  Make more use of ADDITIONAL_VENDOR_PROPERTIES
  ADDITIONAL_*_PROPERTIES are props determined by the build system
2020-05-29 01:01:52 +00:00
Yo Chiang
06d3445271 Merge "Check module existence with ALL_MODULES subvars" am: 0dcb96c204
Change-Id: Ic6009117a309bd532ddd50daff8815eab74c6548
2020-05-28 10:30:45 +00:00
Yo Chiang
0dcb96c204 Merge "Check module existence with ALL_MODULES subvars" 2020-05-28 10:12:52 +00:00
Treehugger Robot
08095b3301 Merge "Fix up recovery_text_res" am: 9e424a5a60
Change-Id: Id24ae6b16a83c93aa317fde0fed8215df99e202c
2020-05-28 08:33:46 +00:00
Treehugger Robot
9e424a5a60 Merge "Fix up recovery_text_res" 2020-05-28 08:23:00 +00:00
Dan Willemsen
9767223dc5 Fix up recovery_text_res
First, make it safer for incremental builds. We used to just be
depending on the bootable/recovery/tools/recovery_l10n/res dir as a
dependency, but that would only trigger a rebuild if a direct child
file/directory was added or removed (so essentially, when a translation
was addded or removed). If a translation was updated, it wouldn't
re-trigger recovery_text_res.

So instead of depending on the directory, depend on the results from
running `find` to list all of the contents in that directory.

Next, move it out of PACKAGING. `m installclean`, which runs in between
incremental builds on our build servers, deletes the obj/PACKAGING
directory. So when recovery_text_res used that directory, we were having
to rebuild it on every incremental build, which isn't optimal when it
takes nearly 90s to build.

So with:
 $ lunch aosp_coral-eng
 $ m bootimage
 $ m installclean
 $ m bootimage

The second `m bootimage` went from executing 666 actions in 93s to
executing 658 actions in 6s.

Finally, remove the last uses of $(call include-path-for,recovery),
since they were all in this file (and they weren't using it for include
paths...). We'd like to remove all of these and switch them to header
libraries or other use cases, but in this case, it's just shorter to use
the real path.

Test: treehugger
Test: m bootimage;
      touch bootable/recovery/tools/recovery_l10n/res/values/strings.xml
      m bootimage
Test: m bootimage; m installclean; m bootimage

Change-Id: I005592e49443aab45ed039a2f0c63f7a69035565
2020-05-27 19:37:03 -07:00
J. Avila
3f6560e626 Add build support for LZ4 ramdisks
Ramdisks are currently compressed using gzip, which is generally
smaller, but slower to decompress than lz4. Provide an option for an
lz4 scheme to reduce the time taken to unpack initramfs during boot.

Bug: 156129966
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
2020-05-27 23:44:33 +00:00
Treehugger Robot
62067081f1 Merge "Strip debug symbols from modules" am: a29edba6e8
Change-Id: Id69bfb9745152ac34572483538f794157feb46d4
2020-05-27 21:02:37 +00:00
Treehugger Robot
a29edba6e8 Merge "Strip debug symbols from modules" 2020-05-27 20:46:16 +00:00