Commit graph

85414 commits

Author SHA1 Message Date
Treehugger Robot
3aad1523a7 Merge "Revert "Revert "Add system staging dir stamp file for bazel sand..."" into main am: 8cad379e98
Original change: https://android-review.googlesource.com/c/platform/build/+/2686910

Change-Id: I03200fefa15b397a3980b90acf54d5fa676346c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-02 04:46:46 +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
e3296281f9 Merge "Remove OPTIONS.host_tools" into main am: 092719a471
Original change: https://android-review.googlesource.com/c/platform/build/+/2688229

Change-Id: I0b32673a99a1104480e38168119e1a641c476fe0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-02 02:49:42 +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
b38245f203 Merge "Add the option for custom_image to be AVB or NONAVB" into main am: d5474ac3da
Original change: https://android-review.googlesource.com/c/platform/build/+/2643431

Change-Id: I8dcf0278278556992d5ef1a3f2f3f10f63a771c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 20:13:23 +00: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
efd7352ae0 Merge "Support generating secondary OTAs from directories" into main am: 8aeb450a98
Original change: https://android-review.googlesource.com/c/platform/build/+/2686869

Change-Id: Ie1d8b2fa1cef19c1f3857348a1616671cad27fe1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 18:53:34 +00:00
Treehugger Robot
507d4b4ead Merge "Adding an option to disable puffdiff" into main am: 7383a91737
Original change: https://android-review.googlesource.com/c/platform/build/+/2686868

Change-Id: I2d5ff0ace7d28bcccd2cab61c9b9ade3864339e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 18:52:57 +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
713a5e79e1 Merge "Revert "Add system staging dir stamp file for bazel sandwich"" into main am: 068da3ef96
Original change: https://android-review.googlesource.com/c/platform/build/+/2685589

Change-Id: I7cd80c86d092f6803489b928f9b0777001d94a4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 07:23:21 +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
f0ebc2f667 Merge "Add system staging dir stamp file for bazel sandwich" into main am: e88ddaecc9
Original change: https://android-review.googlesource.com/c/platform/build/+/2651320

Change-Id: I56ff990c05c99824cdea49922194ea04bc8e76d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-31 23:08:03 +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
Treehugger Robot
0e188d221f Merge "aconfig: require exactly one bug field" into main am: 9997fdbacf
Original change: https://android-review.googlesource.com/c/platform/build/+/2676955

Change-Id: I40f07f3616ce354d4b1d68765dc6f817fceb4471
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 09:28:00 +00:00
Treehugger Robot
9997fdbacf Merge "aconfig: require exactly one bug field" into main 2023-07-28 07:14:42 +00:00
Treehugger Robot
62e1afb314 Merge "aconfig: improve error messages" into main am: 4d37a829dd
Original change: https://android-review.googlesource.com/c/platform/build/+/2679175

Change-Id: I622ebc2750ffe84df3abc034a3919055d28482d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 19:08:54 +00:00
Treehugger Robot
14f9447481 Merge "Fix test failures in releasetools" into main am: 0c8b7efdcc
Original change: https://android-review.googlesource.com/c/platform/build/+/2673339

Change-Id: I605c3f9e468eb747d72421d70c676f4e1c5cd3ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 19:08:41 +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
59d2fb49c7 Merge "16k: core: Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM archs." into main am: e74d66b42f
Original change: https://android-review.googlesource.com/c/platform/build/+/2676499

Change-Id: I22d9c314fb105fee54015b4a7aa2c1ec83cefab2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 14:42:30 +00: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
231775ee04 Merge "Add new Release_aidl_use_unfrozen soong variable" into main am: 11db0915df
Original change: https://android-review.googlesource.com/c/platform/build/+/2650298

Change-Id: Ic27d05916da72e9ba52cc57b1e3bd7788380b048
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 22:15:32 +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
134c808320 Merge "Add core-icu4j and consrypt to the ART boot image for testing." into main am: c07b049aba
Original change: https://android-review.googlesource.com/c/platform/build/+/2655207

Change-Id: Iac209f5e76eddc8abad22ecde668b4b00c422119
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 18:04:09 +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
4609692b9d Merge "Support .(dot) files in root" into main am: 68b4cbecb9
Original change: https://android-review.googlesource.com/c/platform/build/+/2674735

Change-Id: I5bc509ab9bacff3f8311849ec9b92178526cf78d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 01:22:53 +00:00
Treehugger Robot
203570fb65 Merge "Support transitive resource packages from Soong" into main am: 08d991834d
Original change: https://android-review.googlesource.com/c/platform/build/+/2637629

Change-Id: I72c029d945b79d5683c0419af7ab2cd091d4de86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 01:22:26 +00: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
9d4b3b86e9 Merge "16k: core: Add flag to make AOSP page size agnostic" into main am: a5043704ed
Original change: https://android-review.googlesource.com/c/platform/build/+/2657937

Change-Id: I8997a07faf2e295011a7fc67a5c1e1f9f21b5a36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 14:57:04 +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
5acec2b75f Merge "Allow setting some build_broken out of boardconfig" into main am: 36c619075e
Original change: https://android-review.googlesource.com/c/platform/build/+/2636512

Change-Id: I302712a7a8229e9b85f53356fe00bedc3ce91c77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24 14:44:27 +00: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
e182021f83 Merge "aconfig: restructure integration tests" into main am: dce1fabf80
Original change: https://android-review.googlesource.com/c/platform/build/+/2672875

Change-Id: I3c9135982ff7ca258a2b9fa52cbd60f655564aef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24 14:22:42 +00:00
Treehugger Robot
dce1fabf80 Merge "aconfig: restructure integration tests" into main 2023-07-24 13:48:28 +00:00