Commit graph

85322 commits

Author SHA1 Message Date
Daniel Zheng
74955f8883 Adding option to configure compression level
Adding option to ota_from_target_files to configure compression level.
This option can be configured via the --vabc_compression_param flag.
e.g. --vabc_compression_param=gz,9 specifies gz compression algorithm
using level 9 compression

Test: ota_from_target_files
Change-Id: Ifc851faccbb3fba466d45c9695aaab322a362081
2023-08-08 08:09:15 -07:00
Daniel Zheng
3bff72fbc6 Adding supported compression methods
Adding in supported compression methods to help

Test: m ota_from_target_files
Change-Id: I1c3101f983eb8b38d43752530bd9f61a85fddba4
2023-08-03 15:32:29 -07:00
Treehugger Robot
392398cd40 Merge "Minify the sdk targets" into main 2023-08-02 23:31:35 +00:00
Cole Faust
92d921ce24 Minify the sdk targets
Previously, the "sdk" target was a minimal lunch target that only
included enough to build the sdk. But the "sdk_<arch>" targets
redirected to the "sdk_phone_<arch>" targets, which are much bigger
and capable of building a whole emulator.

Building the sdk on products that can build a whole device complicates
the rest of the build system (for example, it starts enforcing dexpropt
works)

Bug: 290798660
Test: m sdk dist sdk_repo device-tests platform_tests on sdk_x86_64-userdebug
Change-Id: I76f38cf19172a5f5fae423175d5e03670137a0df
2023-08-02 15:36:59 -07:00
Jason Wu
8e1baff3d3 Merge "Revise minSdkVersion to fix failed mainline_modules_bundles-userdebug" into main 2023-08-02 21:15:25 +00:00
James Wu
c5e321a06e Revise minSdkVersion to fix failed mainline_modules_bundles-userdebug
Test: abtd tests
Bug: 293456031
Change-Id: I674c50690bd04b7e4867c4aceb31d5bdcb53be84
2023-08-02 19:25:58 +00:00
Wei Li
fb55377c4b Merge "Fix the calculation of package verification code which should not include algorithm information." into main 2023-08-02 19:10:52 +00:00
Treehugger Robot
8cad379e98 Merge "Revert "Revert "Add system staging dir stamp file for bazel sand..."" into main 2023-08-02 04:11:10 +00:00
Treehugger Robot
092719a471 Merge "Remove OPTIONS.host_tools" into main 2023-08-02 01:52:27 +00:00
Cole Faust
6833d7d47a Remove OPTIONS.host_tools
It appears to be unused.

Test: Presubmits
Change-Id: Idd7f9dda996458b93da77c783a546cdb3d1e0047
2023-08-01 18:00:37 -07:00
Treehugger Robot
d5474ac3da Merge "Add the option for custom_image to be AVB or NONAVB" into main 2023-08-01 19:08:06 +00:00
Treehugger Robot
8aeb450a98 Merge "Support generating secondary OTAs from directories" into main 2023-08-01 18:14:37 +00:00
Treehugger Robot
7383a91737 Merge "Adding an option to disable puffdiff" into main 2023-08-01 18:09:43 +00:00
Kelvin Zhang
5b9ca88501 Support generating secondary OTAs from directories
Test: ota_from_target_files --include_secondary
Change-Id: I1004defdb4fe601a6ec733a7ceb213de7d540174
2023-08-01 10:04:08 -07:00
Kelvin Zhang
456c6d9a67 Adding an option to disable puffdiff
This is handy for quick OTA generation during development.

Change-Id: I878f7cb3479d6338c04aca44d16e48e83270252c
2023-08-01 10:03:54 -07:00
Cole Faust
4ad906d6a4 Revert "Revert "Add system staging dir stamp file for bazel sand..."
Revert submission 2685589-revert-2651299-bazel_sandwich-TVXWOASJNU

Reason for revert: It was not the cause of b/293883239

Reverted changes: /q/submissionid:2685589-revert-2651299-bazel_sandwich-TVXWOASJNU

Change-Id: I98ca2be7490a4e38d35e4e640a0d027711b67030
2023-08-01 16:38:58 +00:00
Jooyung Han
068da3ef96 Merge "Revert "Add system staging dir stamp file for bazel sandwich"" into main 2023-08-01 06:50:26 +00:00
Jooyung Han
f6a2234a54 Revert "Add system staging dir stamp file for bazel sandwich"
Revert submission 2651299-bazel_sandwich

Reason for revert: b/293883239, checking if this breaks the build.

Reverted changes: /q/submissionid:2651299-bazel_sandwich

Change-Id: I40661772148434adf5fbec9568b4c303ff7eaf1c
2023-08-01 05:15:28 +00:00
Treehugger Robot
e88ddaecc9 Merge "Add system staging dir stamp file for bazel sandwich" into main 2023-07-31 23:00:55 +00:00
Wei Li
f99db9977c Fix the calculation of package verification code which should not include algorithm information.
Bug: 293304694
Test: atest --host sbom_data_test
Test: build/soong/tests/sbom_test.sh
Change-Id: I94ea42284a9a6b5cc787a3489bfa575aa7663282
2023-07-31 15:09:16 -07:00
Treehugger Robot
9997fdbacf Merge "aconfig: require exactly one bug field" into main 2023-07-28 07:14:42 +00:00
Treehugger Robot
4d37a829dd Merge "aconfig: improve error messages" into main 2023-07-27 18:09:37 +00:00
Treehugger Robot
0c8b7efdcc Merge "Fix test failures in releasetools" into main 2023-07-27 18:07:47 +00:00
Cole Faust
82222146ee Add system staging dir stamp file for bazel sandwich
This stamp file is an alias to request that the system staging directory
be built. The bazel sandwich cannot know the full list of files in the
staging directory at analysis time, so it will just depend on this
instead, and then find all the files in the staging dir at execution
time.

Bug: 265127181
Test: m bazel_sandwich
Change-Id: Iee3dff4f77c9e7054b4e8297e5d96b4ef8bf1cbb
2023-07-27 10:14:36 -07:00
Juan Yescas
e74d66b42f Merge "16k: core: Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM archs." into main 2023-07-27 14:00:22 +00:00
Mårten Kongstad
cd414d4c2e aconfig: improve error messages
Propagate anyhow errors to main.rs and commands.rs to improve the error
message. As an example. instead of just "bad flag declaration: exactly
one bug required", aconfig will now print the following.

---- 8< ----
Error: failed to create cache

Caused by:
    0: failed to parse build/make/tools/aconfig/tests/test.aconfig
    1: bad flag declaration: missing description
---- >8 ----

Error messages can be improved further by including additional
information in the protos.rs error cases. This will be handled in a
follow-up CL.

Bug: 290300657
Test: manual: introduce error in an aconfig file and run `m all_aconfig_declarations`
Test: atest aconfig.test
Change-Id: Id278f4877e5794b95913ae8ba0ca3ee211293f38
2023-07-27 15:54:45 +02:00
Mårten Kongstad
6353c6c635 aconfig: require exactly one bug field
Some consumers of `aconfig dump` do not support multiple bugs. At the
same time, we want all flags to be associated with at least one bug.

Teach aconfig to require that the bug field in the flag_declaration and
parsed_flag proto messages appear exactly once.

This change could have been implemented as a change of `repeated` to
`optional` in the proto definition. However, the chosen approach, with a
runtime check, is easier to revert if we want to support multiple bugs
in the future.

Bug: 293156797
Test: m all_aconfig_declarations && printflags
Test: atest aconfig.test aconfig.test.java aconfig.test.cpp
Change-Id: Ib87dac68b392986a8daa64e56cd85477c92fbe83
2023-07-27 09:44:00 +02:00
Juan Yescas
6196841f4d 16k: core: Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM archs.
For arm archs, PRODUCT_MAX_PAGE_SIZE_SUPPORTED  values can be 4096, 16384, 65536.
For other archs, PRODUCT_MAX_PAGE_SIZE_SUPPORTED can only be 4096.

Note: The linker flag max-page-size is configured by PRODUCT_MAX_PAGE_SIZE_SUPPORTED flag.

Bug: 289419664

Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone
      build/make/core/config.mk:448: error: TARGET_MAX_PAGE_SIZE_SUPPORTED=65536 is greater than 4096. Only supported in ARM arch.

      source build/envsetup.sh
      lunch aosp_raven_64-userdebug

Change-Id: I887d6f12835f1bea4c6b92d7d836440b8d3fd6a8
2023-07-27 00:13:50 +00:00
Devin Moore
11db0915df Merge "Add new Release_aidl_use_unfrozen soong variable" into main 2023-07-26 21:42:52 +00:00
Jiakai Zhang
c07b049aba Merge "Add core-icu4j and consrypt to the ART boot image for testing." into main 2023-07-26 16:46:13 +00:00
Ray-cy.lee
e97e0cb16b Add the option for custom_image to be AVB or NONAVB
Check BOARD_AVB_$(call to-upper,$(partition))_KEY_PATH to decide whether custom_image should sign AVB or not. If key path isn't set, the custom image will be excluded from AVB and copied to /IMAGES in target-files directly. This allows vendor to use custom_images flow packing unsigned image.
And to every non-avb custom partition, one image whose name is partition name must be added in its BOARD_<CUSTOM_PARTITION>_IMAGE_LIST.

BOARD_CUSTOMIMAGES_PARTITION_LIST := tvconfig
BOARD_TVCONFIG_IMAGE_LIST := \
    device/xxxx/yyyy/tvconfig.img \
    device/xxxx/yyyy/tvconfig_custom1.img

Test:
1) Build image, target-files, OTA package by m and m dist
2) Sign images by sign_target_files_apk.py

Fix: 285227850
Change-Id: I7477dafe023e4b168f0f08fb7aedd9e511a60e1b
2023-07-26 20:21:29 +08:00
Jooyung Han
68b4cbecb9 Merge "Support .(dot) files in root" into main 2023-07-26 01:00:19 +00:00
Treehugger Robot
08d991834d Merge "Support transitive resource packages from Soong" into main 2023-07-26 00:34:57 +00:00
Colin Cross
d9d5c2a95e Support transitive resource packages from Soong
Soong is improving resource handling by not squashing resources from
all dependencies into every android_library.  This causes problems
when the android_library is exported to Make, as Make is still using
the old squashing behavior.

Add a file to every static java library that lists the resource packages
of its transitive dependencies.  For modules defined in Andorid.mk files
leave the file empty, but for Soong modules populate it with the list
of transtiive dependencies.  Pass the contents all of the files from
direct dependencies to aapt2 link to include any transitive dependencies.

Bug: 284023594
Test: m Dialer
Change-Id: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
Merged-In: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
2023-07-25 21:30:38 +00:00
Juan Yescas
a5043704ed Merge "16k: core: Add flag to make AOSP page size agnostic" into main 2023-07-25 14:24:40 +00:00
Jooyung Han
8d72515292 Support .(dot) files in root
When .(dot) file/dir is added to the rootdir, it works with normal `m
systemimage` build, but fails when building the images with target
files because the copy command misses .(dot) files.

When packaging, need to copy the whole content from the src directory.
This also matches the condition `ls -A` (which means, we care about dot
files as well).

Bug: 292438323
Test: m dist (aosp_cf_x86_64_phone-userdebug)
Change-Id: Ib3f555305c915d499448c2064e5639a641b2ddb7
2023-07-25 13:58:19 +09:00
Juan Yescas
1083f36818 16k: core: Add flag to make AOSP page size agnostic
The new boolean flag will be PRODUCT_PAGE_SIZE_AGNOSTIC.

When PRODUCT_PAGE_SIZE_AGNOSTIC is true:

- AOSP will use getpagesize() to retrieve the page size.
- The flag `TARGET_MAX_PAGE_SIZE_SUPPORTED` has to be equals to `65536`.
- AOSP will be able to use 4k/16k page size Linux kernels

When PRODUCT_PAGE_SIZE_AGNOSTIC is false:

- AOSP will only support 4k page size kernels.

Test: source build/envsetup.sh
      lunch aosp_raven_64-userdebug
      get_build_var TARGET_PAGE_SIZE_AGNOSTIC
      get_build_var PRODUCT_MAX_PAGE_SIZE_SUPPORTED
      65536

      source build/envsetup.sh
      lunch aosp_raven_64-userdebug
      build/make/core/config.mk:414: error: TARGET_MAX_PAGE_SIZE_SUPPORTED has to be 65536 to support page size agnostic.
      10:32:55 dumpvars failed with: exit status 1

Bug: 289419664
Change-Id: If8fc243a3e2cad77414a53a29805c7b6d349d4dd
2023-07-24 13:48:52 -07:00
Kelvin Zhang
43df0805c2 Fix test failures in releasetools
new_path used before assignment, use `path` instead.

Bug: 280425458
Change-Id: I55086f92cf109af67032614cefde60e6478bb149
2023-07-24 13:16:03 -07:00
Liz Kammer
36c619075e Merge "Allow setting some build_broken out of boardconfig" into main 2023-07-24 14:24:25 +00:00
Treehugger Robot
dce1fabf80 Merge "aconfig: restructure integration tests" into main 2023-07-24 13:48:28 +00:00
Mårten Kongstad
af3da9d1be aconfig: restructure integration tests
Consolidate integration tests under tests/. Rename build targets to
follow the same pattern.

The important aconfig build targets are:

  - aconfig           : the aconfig binary
  - aconfig.test      : the aconfig unit tests
  - aconfig.test.java : the Java integration tests
  - aconfig.test.cpp  : the C++ integration tests
  - aconfig.test.rust : the Rust integration tests (not implemented yet)

Note: the Rust integration tests are blocked until the build system has
added support for aconfig Rust libraries.

Note: the flags used in the integration are not set correctly. A
follow-up CL will fix this.

Bug: 283911467
Test: atest aconfig.test.java aconfig.test.cpp
Change-Id: Idb8dad4c38a49231c2e89228775bacf065ee1f57
2023-07-24 13:05:43 +02:00
Liz Kammer
b607281fae Allow setting some build_broken out of boardconfig
Some build broken flags are for cross-cutting features rather than
board-specific. In order to support these without requiring broad
changes across many board configs, these can be set in a buildspec.mk
files.

Test: set build_broken flags in environment, get expected fail
Test: set build_broken flags in buildspec, get expected success
Change-Id: I8a74c30575f6bf40e46281ca5f37f3cfed526ec5
2023-07-21 15:51:58 -04:00
Treehugger Robot
289fdf213a Merge "Make aconfig c++ generate only one header and only one .cc file" into main 2023-07-21 19:09:30 +00:00
Joe Onorato
ac692c5eae Make aconfig c++ generate only one header and only one .cc file
Bug: 283479529
Test: m aconfig_hello_world_cc && adb push $TOP/out/target/product/panther/system/bin/aconfig_hello_world_cc /system/bin && adb shell aconfig_hello_world_cc
Change-Id: I1890aff70262343e18a62fb2efb2fd0e13a48fb2
2023-07-21 09:12:01 -07:00
Treehugger Robot
21e6105b79 Merge "Combine aconfig cache files into per-partition dumps." into main 2023-07-21 14:34:44 +00:00
Devin Moore
816167b93b Add new Release_aidl_use_unfrozen soong variable
This comes from a trunk stable build flag `RELEASE_AIDL_USE_UNFROZEN`
and is used by the AIDL compiler when creating build rules for the
generated AIDL libraries.

Test: m
Bug: 290265210

Change-Id: I9161a3262d6b2ef8792e8c0b8a759da9a540c560
2023-07-21 00:17:47 +00:00
Yi Kong
7859cc45f7 Merge "Remove dangling reference to LLVMgold.so" into main 2023-07-20 17:33:54 +00:00
David Fu
4c1bc5b9b7 Merge "Added haiku-presubmit phony rule to makefile" into main 2023-07-20 17:00:05 +00:00
Yi Kong
bb31ca1168 Remove dangling reference to LLVMgold.so
We removed LLVMgold.so from the Android LLVM for a long time.

Change-Id: I334d93659f801cc3bcfff1162adc950c83ed14ba
Test: presubmit
2023-07-20 13:26:15 +00:00
Treehugger Robot
08cb169cbe Merge changes from topic "aconfig-improve-dump-formats" into main
* changes:
  aconfig: add 'verbose' dump format
  aconfig: improve the 'text' dump format
  aconfig: remove the 'debug' dump format
2023-07-20 12:35:57 +00:00