Commit graph

64252 commits

Author SHA1 Message Date
Rupert Shuttleworth
729427460b Ensure file permissions are writable before attempting to sign.
Test: Manually using USE_BAZEL=1 use_rbe m dist (fixes a build error).
Change-Id: I1aac185f12ac430514c975103547ce211ea6c99e
2020-12-08 10:03:34 +00:00
Colin Cross
33571ac8dd Merge "Use jni_libs instead of required for signapk conscrypt JNI" 2020-12-04 21:49:35 +00:00
Yo Chiang
ad4dae71cf Merge "Add phony target to check all PCF ELF prebuilts" 2020-12-04 02:49:33 +00:00
Colin Cross
789c57ee04 Merge "Follow argument changes to RuleBuilder" 2020-12-03 20:07:30 +00:00
Yifan Hong
69ba9af617 Merge "Add linker to VAB with vendor_ramdisk" 2020-12-03 19:53:20 +00:00
Treehugger Robot
ed41c73db5 Merge "Make installed-files-recovery.txt depend on rsync timestamp" 2020-12-03 16:42:25 +00:00
Treehugger Robot
d955bc1288 Merge "Adds host_init_verifier to otatools.zip" 2020-12-03 07:10:21 +00:00
Yifan Hong
914ef21c28 Add linker to VAB with vendor_ramdisk
Add linker.vendor_ramdisk for Virtual A/B devices with
a vendor_ramdisk because e2fsck is dynamic.

Test: pass
Bug: 173425293
Change-Id: I0a6f5bf15362e28eaa07a4d639ea23749b94b0f5
2020-12-02 19:51:16 -08:00
Yifan Hong
08d1865332 Merge "Add Virtual A/B with vendor ramdisk product." 2020-12-03 03:02:35 +00:00
Daniel Norman
ee33b4ea51 Adds host_init_verifier to otatools.zip
This is needed after
commit 21c34f78e8
which starts calling host_init_verifier in merge_target_files,
a binary in releasetools.

Test: m otatools
Change-Id: Iee762de9fd6f890b5cc26ee5507da2f3f284fc14
2020-12-02 16:18:25 -08:00
Colin Cross
359f421d3b Make installed-files-recovery.txt depend on rsync timestamp
Files are copied into the recovery installation directory by a rule
that runs rsync.  The previous logic tried to avoid racing with the
rsync rule by depending on the final packaged recovery image, but
if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set then
INSTALLED_RECOVERYIMAGE_TARGET is left empty and no dependency was
added.  Depend on the timestamp file used as the output of the rule
that runs rsync instead.

Test: query dependencies of installed-files-recovery.txt
Fixes: 173772240
Change-Id: I5ec77a6933e3a83fe4e4819e0e246017d824d8a5
2020-12-02 23:19:29 +00:00
Colin Cross
bbc94b0d83 Use jni_libs instead of required for signapk conscrypt JNI
Using jni_libs tells Soong to install the JNI library into
a genrule sandbox alongside the java binary.

Bug: 124313442
Test: m checkbuild
Change-Id: Ia550102c7aa483497f95ac2ea8bb01bce89ae9c1
2020-12-02 11:37:21 -08:00
Treehugger Robot
f4b637a2a3 Merge "Switch default execution strategy to racing for developer builds" 2020-12-02 18:21:47 +00:00
JaeMan Park
38e3f08248 Merge "Add java sdk library enforcement flag" 2020-12-02 04:39:08 +00:00
Kiyoung Kim
39f809beac Merge "Generate system stub library list at build time" 2020-12-02 00:28:18 +00:00
Colin Cross
40c9513f7f Follow argument changes to RuleBuilder
Pass pctx and ctx to NewRuleBuilder instead of RuleBuilder.Build,
and don't pass ctx to RuleBuilderCommand.BuiltTool.  Follows the
changes in I63e6597e19167393876dc2259d6f521363b7dabc.

Test: m checkbuild
Change-Id: I5d11e07ae1a24a967e379c151f4f5d7d188c6cc0
2020-12-01 16:21:51 -08:00
Treehugger Robot
961ef44f0b Merge "Update mts task to make mts-${MODULE} test suites" 2020-12-01 22:19:26 +00:00
Kiyoung Kim
36481e0b34 Generate system stub library list at build time
List of stub libraries from system (and bionic APEX) is currently
managed in static file. This change generates the list at build time and
adds to the system config so linkerconfig can use it.

Bug: 172889962
Test: Build cuttlefish and confirmed list is generated in
/system/etc/linker.config.pb

Change-Id: Idd5a93442f398dd8e88c767c694ddae64d1bb713
2020-12-01 15:33:09 +09:00
Anton Hansson
e13277f26e Merge "Add bootclasspath config to its own makefile" 2020-11-26 12:20:05 +00:00
Anton Hansson
8c73673e73 Add bootclasspath config to its own makefile
This is part of adding some devices/products suitable for unbundled
builds. An unbundled product does not need all the PRODUCT_PACKAGES
etc present in the normal hierarchy of products, but does need to know
which jars are on the bootclasspath.

Therefore, factor out the bootclasspath config from base_system.mk and
put it in its own makefile where it can be inherited by these unbundled
products.

Bug: 172256440
Test: diff presubmit artifacts (noop)
Merged-In: Id3f91e387bba2e0525b4010f22fe380d1d8be537
Change-Id: Id3f91e387bba2e0525b4010f22fe380d1d8be537
2020-11-25 18:53:37 +00:00
Daniel Norman
e9fdfb9fea Merge "Runs host_init_verifier on merged target files packages." 2020-11-25 18:13:30 +00:00
Chih-hung Hsieh
5364ffafa9 Merge "Dump a new CSV with warning messages" 2020-11-25 17:38:21 +00:00
Kousik Kumar
f16d798822 Switch default execution strategy to racing for developer builds
This is to efficiently use both local and remote resources when using
RBE for Android developers.

Bug: b/170699893
Change-Id: I46bc3ff9c0d8d08e8f3aaa15076eb606737355af
2020-11-25 12:14:16 -05:00
Kousik Kumar
e5b0fbd21a Merge "Use unified cas uploads / downloads" 2020-11-24 18:52:13 +00:00
Daniel Norman
21c34f78e8 Runs host_init_verifier on merged target files packages.
This verifies the init rc files in the merged result.

Bug: 163089173
Test: test_common.py
Test: Run merge_target_files.py to merge two target-files packages where
      one has init_rc errors. Observe script failure.
Test: Run merge_target_files.py on two good target-files packages,
      observe no failure.
Change-Id: I86c8e5a2bc07c2c1896ac40afd32bc1d055447ee
2020-11-24 17:26:27 +00:00
Kousik Kumar
aa79007e04 Use unified cas uploads / downloads
This is to deduplciate uploads and downloads when running builds with
RBE. Especially useful for certain Java / R8 / D8 actions that have JAR
files as common inputs.

Change-Id: I0459d4e5c89bd93e5c0c53195fdabccabec08674
2020-11-24 10:56:32 -05:00
Saeid Farivar Asanjan
75dc8d2dab Dump a new CSV with warning messages
Bug: 171068870
Test: manual
Change-Id: Ibb528940daf9a6cd99ece8e5a63d67aacdfc131c
2020-11-24 05:46:33 +00:00
Jingwen Chen
5569faae37 Merge "Remove SOONG, SOONG_BUILD_NINJA, SOONG_IN_MAKE and SOONG_BOOTSTRAP." 2020-11-24 02:09:21 +00:00
Treehugger Robot
84e9bf1a94 Merge "Try to find host tools in the same directory as the caller" 2020-11-24 02:05:39 +00:00
Treehugger Robot
3e2f8dae78 Merge changes from topic "vab_makefile_move"
* changes:
  Add symlinks to legacy Virtual A/B makefiles.
  Move virtual_ab makefiles to its own dir.
2020-11-24 01:55:21 +00:00
Yifan Hong
6b7cc73ec5 Add Virtual A/B with vendor ramdisk product.
If vendor_ramdisk exists, it is preferred to use launch_with_vendor_ramdisk.mk
because it moves e2fsck to vendor_ramdisk, making ramdisk smaller.

Devices that uses VABC is assumed to have a vendor ramdisk, so inherit
from this new makefile.

Test: pass
Change-Id: If6adad9985ca4750225fd4263edb42de1ddaf486
2020-11-23 15:17:01 -08:00
Yifan Hong
942987d116 Add symlinks to legacy Virtual A/B makefiles.
For Virtual A/B makefiles that is created before S, add
symlinks so that existing devices don't break.

Test: pass
Change-Id: Ie04c4a8a2375edc673a8a7a2adcd162b21178f68
2020-11-23 15:17:01 -08:00
Yifan Hong
018c698280 Move virtual_ab makefiles to its own dir.
Also add a readme file.

Test: none

Change-Id: Ia1e02d8fb0c6df13271f208b3ca1dc1f250b085b
2020-11-23 15:17:01 -08:00
Treehugger Robot
bda655cead Merge "build: make fs_config_generator.py python2 explicitly" 2020-11-23 23:08:22 +00:00
David Anderson
01585c5ce6 Merge "Move snapuserd into the vendor ramdisk." 2020-11-23 21:18:07 +00:00
Kelvin Zhang
788055c00b Merge "Add --disable_verity_computation option to ota script" 2020-11-23 19:43:24 +00:00
Treehugger Robot
1393da036e Merge "Add installed-files-vendor-ramdisk.txt" 2020-11-23 19:35:00 +00:00
Kelvin Zhang
caf7bbc39e Add --disable_verity_computation option to ota script
Test: treehugger, generate an OTA with --disable_verity_computation, serve it to
VABC device. Make sure it works

Change-Id: I0a5f3c018727cb3eed3edd004d60d09d13e34039
2020-11-23 13:24:34 -05:00
Jingwen Chen
341928ecc5 Remove SOONG, SOONG_BUILD_NINJA, SOONG_IN_MAKE and SOONG_BOOTSTRAP.
These variables appear to be unused since Nougat, when Soong was
invoked through Make. This is no longer the case, since soong_build is
now invoked through soong_ui.

https://cs.android.com/android/platform/superproject/+/android-7.1.2_r36:build/core/soong.mk

Test: TH presubmit
Change-Id: I1cfe63144d559fa0da0e54474ed1e36fb3fa0555
2020-11-23 02:06:57 -05:00
Petri Gynther
6ff5201ce9 Add installed-files-vendor-ramdisk.txt
Add installed-files-vendor-ramdisk.txt build artifact, so that it is
easy to see what files landed on the vendor ramdisk.

Test: clean build, inspect installed-files-vendor-ramdisk.txt
Change-Id: Ie84d06dc968ad972ab2bfa79db4d1839ba09e09f
2020-11-20 16:59:57 -08:00
Daniel Norman
97332c9685 Merge "Adds a new build task to run host_init_verifier on partition dirs." 2020-11-20 18:57:17 +00:00
Treehugger Robot
adcf94d5b7 Merge "Turns on building vbmeta.img when merging if avb_enable=true." 2020-11-20 06:18:34 +00:00
Treehugger Robot
ca3faad9f2 Merge "Mark PRODUCT_xxx variables as single item instead of list" 2020-11-20 06:00:36 +00:00
Bo Hu
1816caecf1 Merge "emulator: enable cfi for emulator's wifi driver" 2020-11-20 02:17:44 +00:00
Jiyong Park
c8c94ac38e Try to find host tools in the same directory as the caller
common.py is used by many python-based host tools. When a host tool
invokes another host tool, it's usually done with the name of the tool,
not the absolute path of the tool. For example, ["cmd", "arg"] instead
of ["out/soong/host/linux-x86/bin/cmd", "arg"].

Previously, the caller of the tool has to teach all the locations of the
sub-tools that the tool will internally use. But this isn't ideal;

1) It's against the abstraction. The existence of the sub tools and their
names are implementation detail of the containing tool. It's also
subject to change.

2) This isn't scalable. Sometimes a host tool invokes a large number of
host tools. Furthermore, the sub tools might invoke other sub-sub tools.
Then the location of the sub-sub-tools had to be known to the top-level
tool.

The idea here is to make use of the fact that

a) dependencies to the sub (and sub-sub) tools are already described in
the Android.bp and

b) the dependencies are guaranteed to be up-to-date and installed to the
host tool directory (out/soong/host/linux-x86/bin) by Soong.

Then by the time a host tool is invoked, all of its sub tools should
be found in the host tool directory. So, when "cmd" is about to be
invoked, common.py first tries to find it from the user-given paths. If
not found there, it falls back to search the directory where the current
tool is located at. Then finally falls back to the original name "cmd"
and expects it to be found under PATH.

Bug: 172414391
Test: m
Change-Id: Id7b44f9021be3bbf0631ddafe382ea3990f7ea74
2020-11-20 10:40:54 +09:00
Julien Desprez
0137f2d940 Merge "Add a template for java host unit tests" 2020-11-20 00:07:41 +00:00
Treehugger Robot
3ccf730cdc Merge "Use 'inherit-product/inherit-product-if-exists to include config files" 2020-11-19 23:54:27 +00:00
Daniel Norman
38888d390f Turns on building vbmeta.img when merging if avb_enable=true.
Needed after commit 8218225794
which skips regenerating vbmeta.img if avb_building_vbmeta_image!=true.
Partial builds that disable vbmeta generation do not set this field.

Bug: 169892879
Test: Run merge_target_files.py on builds that have avb_enable=true but
      PRODUCT_BUILD_VBMETA_IMAGE=false. Observe vbmeta.img generation.
Change-Id: Id498dbd28c909e19cd35178b95a0b5dc22a1ac70
2020-11-19 14:51:15 -08:00
bohu
79106cd3ab emulator: enable cfi for emulator's wifi driver
Since the wpa_supplicant_8 has enabled cfi, the
static lib that it uses should enable cfi, otherwise
there will be runtime crashes.

BUG: 169343095
Test:
lunch sdk_phone_arm64-userdebug
m -j
run the image on the aarch64-linux host
hostapd_nohidl and wpa_supplicant should
not crash with cfi failures.

Change-Id: I00e3840032530ee62aac69cab0b54755f83291f9
2020-11-19 12:50:47 -08:00
Julien Desprez
0bb3fffd1a Add a template for java host unit tests
This will execute the host unit tests in isolation.

Test: make aoa-helper-test
Bug: 172961860
Change-Id: Icbbf7214d877bd2e65ac1b97bc299f7af7acdcfe
2020-11-19 09:42:41 -08:00