Commit graph

84293 commits

Author SHA1 Message Date
Treehugger Robot
913c41caf5 Merge "Use Z_BEST_COMPRESSION for compress-package" 2023-06-13 10:09:54 +00:00
Jiakai Zhang
9448754144 Merge "Avoid using soong_zip's "-e" flag for boot.zip." 2023-06-12 16:22:39 +00:00
Daniel Zheng
d97f8505ae Merge "Removing --apply-vbmeta for vbmeta_system" 2023-06-12 15:42:16 +00:00
Dennis Shen
f1cd83bece Merge "aconfig: update cpp codegen to use static methods" 2023-06-12 12:57:57 +00:00
Dennis Shen
4f78f10015 aconfig: update cpp codegen to use static methods
Update c++ codegen to static methods interface.

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I78da3bbca6240bee660c692807930d00f2242b0a
2023-06-12 12:57:38 +00:00
Jiakai Zhang
34914f620b Avoid using soong_zip's "-e" flag for boot.zip.
aosp/23658853 changes boot.zip, which need to be cherry-picked to UDC.
It uses soong_zip's "-e" flag to specify the filename to use in boot.zip
for METADATA.txt. However, the "-e" flag doesn't exist on UDC. This
change uses an alternative approach to avoid using the "-e" flag.

Before this change, the contents were written to
out/dist/boot.zip.METADATA.txt and then passed to soong_zip with "-e" to
rename to file to "METADATA.txt".

After this change, the contents are written to
out/dist/boot_zip/METADATA.txt and then passed to soong_zip with "-j" to
remove the directory name.

Bug: 286381070
Test: m dist out/dist/boot.zip (on udc-dev)
Change-Id: I769de5194b5716f05e5352f4efd635a70ba0b891
2023-06-12 11:27:46 +01:00
Jiakai Zhang
3d58caa11b Merge "Add mainline extension and METADATA.txt to boot.zip." 2023-06-12 09:02:46 +00:00
Joe Onorato
d5eb7a6d28 Merge changes from topic "aosp_starlark_release_config"
* changes:
  Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
  Clean up the API for release config in starlark
2023-06-12 02:27:16 +00:00
Joe Onorato
6d7afa00e3 Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
Bug: 282838389
Test: Treehugger
Merged-In: Ic6dacbdee7d2408aa8b25b4df59bf9bbc566d747
Change-Id: Ie61a7d986c2b8fe2c16117f6678b9e5a71711647
2023-06-11 09:17:43 -07:00
Joe Onorato
d6df20a058 Clean up the API for release config in starlark
Also gets the json summaries working again.

Bug: 283477392
Test: Manual
Merged-In: Iaeb840e96bd7fef2fa1492cb55d9688f7ca75858
Change-Id: I05d9b816ad7ad30c1d238d01df811426d9aeddcb
2023-06-11 07:58:22 -07:00
Joe Onorato
593bef7150 Merge "Define release flags in starlark instead of make" 2023-06-10 03:21:22 +00:00
Florian Mayer
9066ab5240 Merge "Add aosp_arm64_fullmte target" 2023-06-09 23:59:52 +00:00
Treehugger Robot
54066e8ddf Merge "Copy built images to generate target_files.zip" 2023-06-09 22:32:40 +00:00
Joe Onorato
ed1e3b50f3 Merge "Fix build breakage" 2023-06-09 20:57:36 +00:00
Joe Onorato
8b51859317 Fix build breakage
error: build/make/tools/aconfig/Android.bp:69:1: module "aconfig.test.java" variant "android_common": path dependency ":aconfig.test.flags{.srcjar}": unsupported device_config_definitions module reference tag ".srcjar"

Test: m aconfig.test.java
Change-Id: I3df980b06796c90dafee3940fe52809748305950
2023-06-09 13:39:41 -07:00
Cole Faust
386b3746ce Define release flags in starlark instead of make
So that we have a more restricted enviornment for this new configuration
axis that can also be imported into other tools more easily.

Test: Manually (this time also tested setting OUT_DIR outside of the tree)
Change-Id: I01d90e06e45cba756156af16f63e04f575877263
2023-06-09 13:10:05 -07:00
Treehugger Robot
df2af7c840 Merge "Supply apex_info.pb as parameter to delta_generator if file exists" 2023-06-09 19:23:31 +00:00
Florian Mayer
0352c44ab3 Add aosp_arm64_fullmte target
Test: lunch aosp_arm64_fullmte && m
Test: llvm-readelf -a out/target/product/generic_arm64/system/bin/toybox
  Memtag Android Note:
      Tagging Mode: SYNC
      Heap: Enabled
      Stack: Enabled

Bug: 271768933
Bug: 286415307
Change-Id: I2a1ac78be551d50be9bf6c4ffc8667de4ef7ce8e
2023-06-09 18:17:47 +00:00
Jiakai Zhang
a5551c5d91 Add mainline extension and METADATA.txt to boot.zip.
Contents of METADATA.txt:

booclasspath = dex_bootjars_input/core-oj.jar:dex_bootjars_input/core-libart.jar:dex_bootjars_input/okhttp.jar:dex_bootjars_input/bouncycastle.jar:dex_bootjars_input/apache-xml.jar:dex_bootjars_input/framework.jar:dex_bootjars_input/framework-graphics.jar:dex_bootjars_input/ext.jar:dex_bootjars_input/telephony-common.jar:dex_bootjars_input/voip-common.jar:dex_bootjars_input/ims-common.jar:dex_bootjars_input/core-icu4j.jar:apex_bootjars/framework-adservices.jar:apex_bootjars/framework-sdksandbox.jar:apex_bootjars/framework-appsearch.jar:apex_bootjars/framework-bluetooth.jar:apex_bootjars/conscrypt.jar:apex_bootjars/android.net.ipsec.ike.jar:apex_bootjars/updatable-media.jar:apex_bootjars/framework-mediaprovider.jar:apex_bootjars/framework-ondevicepersonalization.jar:apex_bootjars/framework-statsd.jar:apex_bootjars/framework-permission.jar:apex_bootjars/framework-permission-s.jar:apex_bootjars/framework-scheduling.jar:apex_bootjars/framework-sdkextensions.jar:apex_bootjars/framework-connectivity.jar:apex_bootjars/framework-connectivity-t.jar:apex_bootjars/framework-tethering.jar:apex_bootjars/framework-uwb.jar:apex_bootjars/framework-virtualization.jar:apex_bootjars/framework-wifi.jar
booclasspath-locations = /apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/apex/com.android.i18n/javalib/core-icu4j.jar:/apex/com.android.adservices/javalib/framework-adservices.jar:/apex/com.android.adservices/javalib/framework-sdksandbox.jar:/apex/com.android.appsearch/javalib/framework-appsearch.jar:/apex/com.android.btservices/javalib/framework-bluetooth.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.ondevicepersonalization/javalib/framework-ondevicepersonalization.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.permission/javalib/framework-permission-s.jar:/apex/com.android.scheduling/javalib/framework-scheduling.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.tethering/javalib/framework-connectivity.jar:/apex/com.android.tethering/javalib/framework-connectivity-t.jar:/apex/com.android.tethering/javalib/framework-tethering.jar:/apex/com.android.uwb/javalib/framework-uwb.jar:/apex/com.android.virt/javalib/framework-virtualization.jar:/apex/com.android.wifi/javalib/framework-wifi.jar
boot-image = system/framework/boot.art:system/framework/boot-framework-adservices.art

Bug: 286381070
Test: m dist out/dist/boot.zip
Change-Id: I258479ffbdf199091290b074329ff1b43db2e669
2023-06-09 17:56:31 +01:00
Zhi Dou
1120cb8aa4 Merge "aconfig: add Java integration tests" 2023-06-09 13:36:25 +00:00
Håkan Kvist
ddb968dce0 Supply apex_info.pb as parameter to delta_generator if file exists
Supply generator with parameter --apex_info_file=META/apex_info.pb
if the file exists.

This ensures that apex_info is included in payload header.

This is identical to the behaviour of brillo_update_payload
which is not being used since:
Invoke delta_generator directly
fcd731e3d6

Issue: 286253576
Test: Manual, confirm that apex_info is included in payload header
Change-Id: Ic096c5f8966beec8686f918aba462c955290a6c5
2023-06-09 12:46:58 +02:00
Mårten Kongstad
9c59c31499 aconfig: add Java integration tests
Add integration tests for Java. This test setup verifies that

  - the build system calls aconfig to generate a Java library
  - the Java test compiles against the auto-generated library
  - the auto-generated code returns expected values

Similar integration tests for C++ and Rust will be added in follow-up
CLs.

Note: the build does not currently support specifying that
tests/*.values should be applied, so the test flags will all be assigned
the defaults. A later CL will fix this.

Bug: b/283911467
Test: atest aconfig.test aconfig.test.java
Change-Id: Ia365e209261f4935a23e2dac9ef0ab5b60f76e52
2023-06-09 09:59:21 +02:00
Treehugger Robot
c07ff752aa Merge "BF_BUILD_NUMBER should have BUILD_NUMBER" 2023-06-09 07:37:39 +00:00
Jeongik Cha
8a64fb1663 BF_BUILD_NUMBER should have BUILD_NUMBER
BF_BUILD_NUMBER has hostname by mistake during refactoring.

Bug: 286453356
Test: build with BUILD_NUMBER
Change-Id: Id3fd7975057dfd70dfb7c02650672e670c6d5984
2023-06-09 11:51:18 +09:00
Treehugger Robot
a85c8a863a Merge "BOARD_VNDK_VERSION must be set first pass" 2023-06-08 23:19:34 +00:00
Treehugger Robot
d60dbf9773 Merge "fixup! Allow ota_from_target_file to work entirely on directories" 2023-06-08 22:20:30 +00:00
Daniel Zheng
9456228807 Removing --apply-vbmeta for vbmeta_system
Removing since vbmeta rewrite is only needed for root vbmeta

Test: m fastboot_info
Change-Id: Idd07629104b48db0b75b43d73cd59564583819a4
2023-06-08 11:14:58 -07:00
Florian Mayer
a0c6f31ef7 Merge "Fix bug when memtag_heap in diag but not sanitizers" 2023-06-08 16:04:08 +00:00
Mårten Kongstad
ec5da68dbd Merge changes from topic "aconfig-rename-namespace-to-package"
* changes:
  aconfig: include namespace in create-device-config-defaults
  aconfig: improve code diffs in tests
  aconfig: add namespace field to flag_declaration and parsed_flag
  aconfig: allow dots in package fields
  aconfig: rename namespace -> package
2023-06-08 15:12:10 +00:00
Håkan Kvist
b8982fc538 fixup! Allow ota_from_target_file to work entirely on directories
The following log message would always be shown:
WARNING : Cannot find care map file in target_file package

Break out of the care map copying loop as soon a file has been
copied. This ensures that else statement is only executed if no
care map file exists.

Test: Manual. Run ota_from_target_files with target-zip with and
    without care map files.
Change-Id: Ia196aa182ed81f21424317a7005f5634866b4b99
2023-06-08 15:17:57 +02:00
Mårten Kongstad
202102f7be aconfig: include namespace in create-device-config-defaults
Update the output format of create-device-config-defaults to include the
flag's namespace. Also change the delimiters. The new format is

  <namespace>:<package>.<flag-name>=[enabled|disabled|

Bug: 285468565
Test: atest aconfig.test
Change-Id: I9b4ca1611cca8528dc341fc12812b614c86f6c08
2023-06-08 11:28:09 +02:00
Mårten Kongstad
b025507857 aconfig: improve code diffs in tests
Implement a helper function to make it easier for unit tests to diff
(and find the first difference) generated code and expected code.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I460e8fbf05e8f33e8a62ecef67b2d9d77051e876
2023-06-08 11:27:59 +02:00
Mårten Kongstad
066575b95f aconfig: add namespace field to flag_declaration and parsed_flag
Add a new field to the proto messages flag_declaration and parsed_flag.

The new field will be used verbatim as a parameter when calling
DeviceConfig.getBoolean to read the value of a READ_WRITE flag. See the
DeviceConfig API for more info.

Note: not to be confused with the old namespace field, which has been
renamed to package.

Bug: 285211724
Test: atest aconfig.test
Change-Id: I2181be7b5e98fc334e5277fb5f7e386f1fe0b550
2023-06-08 11:27:57 +02:00
Mårten Kongstad
fbd71e2773 aconfig: allow dots in package fields
Allow package fields to include dots.

Update the generated code based on the package name: if the package name
is com.android.example:

  - java: package com.android.example; ...
  - C++: namespace com::android::example { ... }
  - Rust: mod com { mod android { mod example { ... } } }

Also, update examples to use dots in the package fields.

Also, remove unnecessary #include from the auto-generated C++ code: the
header should not include itself.

Bug: 285000854
Test: atest aconfig.test
Change-Id: I8a5352e25c64c34dee0725202a1b7c9957819de8
2023-06-08 11:25:43 +02:00
Nikita Ioffe
fe22cc38da Merge "Add PRODUCT_AVF_KERNEL_MODULES_ENABLED" 2023-06-07 23:36:20 +00:00
Florian Mayer
2a67626055 Fix bug when memtag_heap in diag but not sanitizers
Without this we get:
unsupported argument 'memtag_heap' to option '-fno-sanitize-trap='

Change-Id: Iaeb23d0f4962bb3d788036fadc14b9420221a38e
2023-06-07 16:13:22 -07:00
Steven Moreland
78549acb47 BOARD_VNDK_VERSION must be set first pass
Removing all places that consider that this might not be
set.

Bug: 122954981
Test: build
Change-Id: I62107d041410f4ee1d3652e394ed5e7688c12f25
2023-06-07 20:57:38 +00:00
Devin Moore
9bf17fd9dd Merge "Add new script to analyze static/shared library usage" 2023-06-07 20:18:09 +00:00
Treehugger Robot
69227ff9ae Merge "Resolve test crash in build/make/tools/compliance." 2023-06-07 17:41:04 +00:00
Nikita Ioffe
cae3ef96c6 Add PRODUCT_AVF_KERNEL_MODULES_ENABLED
This flag controls whether com.android.virt APEX should include an
additional kernel image that supports modules loading.

Bug: 283822676
Bug: 278008256
Test: m
Change-Id: I296c57308e130ee6d5d185dcb4b690d11d2b04ac
2023-06-07 16:33:55 +01:00
Jingwen Chen
376b6b6378 Resolve test crash in build/make/tools/compliance.
Test: m compliance_sbom
Test: go test ./...
Fixes: 285157766
BUG: 282746032
Change-Id: I5cc39f45f7ac3d9c574e2ebaa7fdfda864cb109d
2023-06-07 13:06:13 +00:00
Mårten Kongstad
9fb58965af aconfig: rename namespace -> package
What used to be referred to as a namespace is now called a package.

This CL is a semantic change only.

Bug: 285000854
Test: m nothing
Test: atest aconfig.test
Change-Id: If3fca67c415af75b44f316e16666b97089407069
2023-06-07 14:53:04 +02:00
Treehugger Robot
2bb714ed2b Merge changes from topic "aconfig-gen-device-config-files"
* changes:
  aconfig: add create-device-config-sysprops command
  aconfig: add create-device-config-defaults command
  aconfig: add test utilities
  aconfig: cache.rs: remove unnecessary use statements
  aconfig: give commands ownership of all arguments
2023-06-07 09:50:23 +00:00
Seigo Nonaka
52b65fef51 Merge "Include RobotoFlex into AOSP system image" 2023-06-07 02:14:27 +00:00
Treehugger Robot
3cda7834aa Merge "Use python based unzip function for portability" 2023-06-06 18:24:03 +00:00
Treehugger Robot
fff48d788f Merge "Always set a avb salt for hermetic build" 2023-06-06 18:23:58 +00:00
Devin Moore
b1bae84508 Merge "Add static_libs to module-info.json" 2023-06-06 15:36:57 +00:00
Steven Moreland
0b219d399c Merge "Remove PRODUCT_SEPOLICY_SPLIT." 2023-06-05 23:08:24 +00:00
Kelvin Zhang
7c9205b008 Use python based unzip function for portability
Bug: 283033491
Test: th
Change-Id: Ief86b55c1d4a14220a0fb593c583a721d59cf86c
2023-06-05 15:54:12 -07:00
Devin Moore
bd13e63e99 Add new script to analyze static/shared library usage
Parses module-info.json, gathers stats on how many times each library is
included shared or statically.

Can print a list of libraries that would be a candidate for changing
from static to shared or visa versa.

Test: m
Bug: 280829178
Change-Id: I4bbffbd673ab2e08c69d0ab6e68402be77c9ffbc
2023-06-05 20:23:36 +00:00