Commit graph

75921 commits

Author SHA1 Message Date
Martin Stjernholm
6d91a8fd28 Clean up the special cases where we wouldn't be able to use the
prebuilt ART module.

They were added with the intention of flipping the last fallback to use
prebuilts by default, but that has been descoped. Instead let the ART
module variable default to the generic MODULE_BUILD_FROM_SOURCE.

Test: env MODULE_BUILD_FROM_SOURCE=true \
        build/soong/soong_ui.bash --dumpvars-mode \
        --vars="MODULE_BUILD_FROM_SOURCE ART_MODULE_BUILD_FROM_SOURCE"
  MODULE_BUILD_FROM_SOURCE='true'
  ART_MODULE_BUILD_FROM_SOURCE='true'
Test: env MODULE_BUILD_FROM_SOURCE=false \
        build/soong/soong_ui.bash --dumpvars-mode \
        --vars="MODULE_BUILD_FROM_SOURCE ART_MODULE_BUILD_FROM_SOURCE"
  MODULE_BUILD_FROM_SOURCE='false'
  ART_MODULE_BUILD_FROM_SOURCE='false'
Test: env MODULE_BUILD_FROM_SOURCE=false \
          ART_MODULE_BUILD_FROM_SOURCE=true \
        build/soong/soong_ui.bash --dumpvars-mode \
        --vars="MODULE_BUILD_FROM_SOURCE ART_MODULE_BUILD_FROM_SOURCE"
  MODULE_BUILD_FROM_SOURCE='false'
  ART_MODULE_BUILD_FROM_SOURCE='true'
Bug: 172480615
Bug: 184842499
Change-Id: I433e0236e595422f4d6fe2b4b2411491e3c600cf
2022-03-10 02:36:22 +00:00
Bob Badour
2f66fd1bcc Sundry non-module targets
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m systemlicense reportmissinglicense

Change-Id: Ie6350c3a61129d38c3901a9af9f5b4c05a7c2e2c
2022-03-09 18:12:26 -08:00
Treehugger Robot
e910accc38 Merge "validate_target_files: support gki_arm64" 2022-03-10 00:57:10 +00:00
Kelvin Zhang
e30ed7c8da Add snapuserd/e2fsprogs/f2fs-tools to init_boot partition
Anything remotely related to first stage init should be added to
init_boot

Test: th
Bug: 219841787

Change-Id: I60ada5ff426b04f3e4f842ad7a714615fcc7cb77
2022-03-09 15:12:43 -08:00
Bob Badour
289f6e10be Handle symlink license metadata.
Add target to force-build all license metadata.

Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m alllicensemetadata reportmissinglicenses
Change-Id: Iab3a41a232438e857d23674e0e1230d4d0336466
2022-03-09 13:38:37 -08:00
Treehugger Robot
f2b4e873ec Merge "Fix Markdown formatting." 2022-03-09 18:31:50 +00:00
Andrew Walbran
9b255832cd Fix Markdown formatting.
Change-Id: Id3bacc2cd5cad775199f9793f5da2607ea3e76c3
2022-03-09 14:51:51 +00:00
Bowgo Tsai
341fe02903 validate_target_files: support gki_arm64
gki_arm64 is a special target to build multiple GKI boot-*.img
files. It has neither system.img nor vbmeta.img. Skips checking
system.img and vbmeta.img in this case.

Bug: 223078405
Test: validate_target_files signed-gki_arm64-target_files-8277156.zip
Change-Id: I9d3c102c11787cf70c1e1fc8e6a552f8fd19ff72
2022-03-09 16:35:19 +08:00
Pirama Arumuga Nainar
bd4f7c7ce7 Package llvm-cov in llvm-profdata.zip
It is needed for code coverage smoke test.  Retain the
`llvm-profdata.zip` name since it is used in Tradefed.

Test: `CLANG_COVERAGE=true m dist` and inspect llvm-profdata.zip
Change-Id: Icb48b0fa22deec8c3c49f0e5bb3ae33450883e0e
2022-03-08 23:09:53 -08:00
David Anderson
060505fb4a Merge "build_image: Remove mkerofsimage.sh." 2022-03-09 04:04:05 +00:00
Treehugger Robot
0cc4ae84ea Merge "Fix small typo in ota script options" 2022-03-09 03:06:26 +00:00
Daniel Norman
2b0b9ca1b7 Moves merge scripts into a new merge folder.
This will be used in the following change to split
merge_target_files into a collection of smaller
more-focused scripts.

Bug: 221858722
Test: m otatools; Use to create merged builds
Change-Id: Ie01dac81c5f9f28f1e0fe037259eabd2478e60b6
2022-03-08 16:37:14 -08:00
Kelvin Zhang
ff35cbd110 Merge "Simplify codes when _LoadOemDicts" 2022-03-08 23:16:32 +00:00
Kelvin Zhang
318a464a71 Fix small typo in ota script options
"enable_zucchin" was used instead of "enable_zucchini"

Test: th
Change-Id: Iaccb07bc6913a28c021fe84d3faeb59504ea1fbb
2022-03-08 15:13:01 -08:00
Daniel Norman
986582f262 Merge "Fix META/care_map.pb generation." 2022-03-08 22:42:54 +00:00
Treehugger Robot
057667a90f Merge "Remove duplicate slashes from find_and_copy results" 2022-03-08 20:25:40 +00:00
Daniel Norman
799a18c82e Fix META/care_map.pb generation.
In https://r.android.com/1991151 we removed an extra call to
AddCareMapForAbOta() from generate_care_map(), since
AddCareMapForAbOta() is already called by add_img_to_target_files.

However, when add_img_to_target_files generated care_map.pb it
didn't have the proper partition *_image_size values set for
images copied directly from the input target files packages.
This was because the generate_care_map() function, which sets
those *_image_size values, was executed after add_img_to_target_files.

At best this meant that care_map.pb was missing some information.
At worst, care_map.pb is missing entirely (when all images are
copied instead of regenerated).

This change:
- Renames generate_care_map() to set_copied_image_size_props()
  and simplifies the logic a bit.
- Calls set_copied_image_size_props() before calling
  add_img_to_target_files. Now, add_img_to_target_files will
  have all necessary *_image_size values to perform the
  META/care_map.pb generation step.

Bug: 187432243
Bug: 221858722
Bug: 223198503
Test: Use to create a merged build that does not regenerate any images.
      Observe that META/care_map.pb is now generated as expected.
Change-Id: I1b3c8636be8cbe203222e60b1272a5e11f68589b
2022-03-08 19:02:51 +00:00
jiajia tang
c7c8697a62 Simplify codes when _LoadOemDicts
Use function LoadDictionaryFromFile(), instead of
LoadDictionaryFromLines(). Makes codes conciser.

Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I15d6d4281a03be8a2f6f855054b1e4c1c3010fcd
2022-03-08 18:27:24 +08:00
Xin Li
7d4b3d25e7 Merge "Merge Android 12L" 2022-03-08 06:53:53 +00:00
Treehugger Robot
026abf7bad Merge "Accept CLANG_COVERAGE_CONTINUOUS_MODE build variable" 2022-03-08 06:37:02 +00:00
Alexander Smundak
842733cb67 Merge changes Iacd23cec,I6b9b3bd4
* changes:
  Add an option to use Starlark-based configuration by default.
  Clean up product definitions reading.
2022-03-08 01:07:14 +00:00
Xin Li
62a34ff6af Merge Android 12L
Bug: 222710654
Merged-In: I367438214a7649cade2396b48ed3efb14b564075
Change-Id: I78e650920f9cf47c1eaaa259103f8f95d3368f4c
2022-03-08 00:13:48 +00:00
Sasha Smundak
b87b773042 Add an option to use Starlark-based configuration by default.
In order to use Starlark-based product and board configuration for
a product, add its name to the STARLARK_OPT_IN_PRODUCTS list in
the AndroidProducts.mk file where this product is defined.

Fixes: 220379303
Test: Temporarily added STARLARK_OPT_IN_PRODUCTS to build/make/target/product/AndroidProducts.mk
Change-Id: Iacd23cec00a7a1958701873bce0fc9d5f79b1f17
2022-03-07 11:26:59 -08:00
Sasha Smundak
d40c94633b Clean up product definitions reading.
Bug: 220379303
Test: treehugger
Change-Id: I6b9b3bd486a1680ace8278eb5160e09885543f4b
2022-03-07 11:25:58 -08:00
Cole Faust
c6de8d531c Remove duplicate slashes from find_and_copy results
The make version, find-copy-subdir-files, has very
similiar functionality: it adds `| sed "s://:/:g"`
to its results.

Fixes: 223221122
Test: Manually
Change-Id: Iaac96f760d46304aed27a7d31bb4e8bd930c2c55
2022-03-07 11:14:56 -08:00
Dario Freni
a05fb4002b Merge "Build modules from source by default." am: ec63efddf9
Original change: https://android-review.googlesource.com/c/platform/build/+/1998880

Change-Id: I367438214a7649cade2396b48ed3efb14b564075
2022-03-07 17:26:25 +00:00
Dario Freni
ec63efddf9 Merge "Build modules from source by default." 2022-03-07 17:00:39 +00:00
Dario Freni
fd8c869065 Build modules from source by default.
Most branches, most of the time, will build modules from source. By
changing the default we make it easier to switch a whole branch to use
module prebuilts by requiring only one CL to be committed on that branch
and nowhere else.

Before this change, dozens of Soong targets needed to be updated when
deciding to start using prebuilts for modules and sdk stubs. In
addition, the typical need is to enable prebuilts on a single branch at
the time, which resulted in a dozens of "D0 N0T MERGE ANYWHERE" CLs,
causing a lot of confusion.

Bug: 184842499
Test: (on a branch with ModuleMetadataGoogle enabled as prebuilt):
  m out/target/product/sunfish/product/app/ModuleMetadataGoogle/ModuleMetadataGoogle.apk
  (verified with `aapt2 dump badging` that apk is built from source)
  MODULE_BUILD_FROM_SOURCE=false m out/target/product/sunfish/product/app/ModuleMetadataGoogle/ModuleMetadataGoogle.apk
  (verified with `aapt2 dump badging` that apk is prebuilt)

Change-Id: I625c48640c4bb1edf360605a1daac293a4a0a07a
2022-03-07 17:00:09 +00:00
Treehugger Robot
59c8ca8c63 Merge "Add an option to set VABC compression algo" am: 966482dc56
Original change: https://android-review.googlesource.com/c/platform/build/+/2006773

Change-Id: Ibaef432422fe798f8622516a0d5e7f3c57d0f1af
2022-03-05 00:14:23 +00:00
Treehugger Robot
966482dc56 Merge "Add an option to set VABC compression algo" 2022-03-04 23:56:27 +00:00
Treehugger Robot
8414a9e9c0 Merge "Allow vendor_otatools arg to be file or folder" am: a2d6ed53f0
Original change: https://android-review.googlesource.com/c/platform/build/+/2007451

Change-Id: Ie7d1ac14913ad484f6c172605da60b9394fd479a
2022-03-04 23:30:36 +00:00
Treehugger Robot
a2d6ed53f0 Merge "Allow vendor_otatools arg to be file or folder" 2022-03-04 23:08:21 +00:00
David Anderson
f54665f42a Add build flags for legacy EROFS support.
EROFS images by default will only work on newer kernels. Old versions of
5.4 and 4.19 need an extra flag to mkfs.erofs.

Add BUILD_EROFS_USE_LEGACY_COMPRESSION to force this flag.

Bug: 222373106
Test: build with BUILD_EROFS_USE_LEGACY_COMPRESSION enabled
Change-Id: I3818e14356beaa11073c6b9fea6a6ad999bba4aa
2022-03-04 14:47:17 -08:00
Cole Faust
dc426cf23b Merge "Add ART_MODULE_BUILD_FROM_SOURCE to control the equivalent soong config variable" am: 1421f7c7c3
Original change: https://android-review.googlesource.com/c/platform/build/+/2000971

Change-Id: I65fb099bacdea8e2c8382838f1d86e8edae51774
2022-03-04 22:22:38 +00:00
Cole Faust
1421f7c7c3 Merge "Add ART_MODULE_BUILD_FROM_SOURCE to control the equivalent soong config variable" 2022-03-04 22:02:24 +00:00
Pirama Arumuga Nainar
0a04ec1f3b Accept CLANG_COVERAGE_CONTINUOUS_MODE build variable
Bug: http://b/194128476

Coverage instrumentation will support continuous mode when this flag is
set.

Test: CLANG_COVERAGE_CONTINUOUS_MODE m and verify continuous mode works.
Change-Id: I187574c600ba10145dfb2c6c23551d235c33103a
2022-03-04 12:45:33 -08:00
Kelvin Zhang
84b3a28603 Add an option to set VABC compression algo
When testing on cuttlefish, space consumption isn't a concern, so
compression can be disabled to save time. We also want to test the
non-compressed code path, as we expect some OEMs to use userspace COW
w/o compression.

If no --vabc_compression_param option specified to
ota_from_target_files, we will use the compression algo specified in
target_files's dynamic_partition_info.txt.

Bug: 219966986
Test: th
Change-Id: Ie18064b15938550ad6fb4efc86fc100c12321dc0
2022-03-04 12:29:30 -08:00
David Anderson
94ad5bb5ef build_image: Remove mkerofsimage.sh.
These wrapper scripts are difficult to maintain and there's not really
any value add. The argument strings don't match and every new build flag
has to be connected in an extra place.

Bug: 222715577
Test: make with EROFS enabled
Change-Id: Ie0e51cc30aa08b004d5d8345a2a2d885e193ffa9
2022-03-04 11:07:43 -08:00
Iavor-Valentin Iftime
63cde0fd92 Allow vendor_otatools arg to be file or folder
Required by signer script when using "--vendor_otatools" argument.

Bug: 220126689
Bug: 186097910

Test: sign_target_files_apks \
        --vendor_otatools=otatools_vendor_dir \
	--vendor_partitions=vendor,odm \
	merged-target_files.zip \
	signed-target_files.zip

Change-Id: Iaa596f95f9db1e1e423b8306e9590fe27acb76e7
2022-03-04 16:02:46 +00:00
Treehugger Robot
267d9eeb59 Merge "Move comment to license_note" am: 4e09d57fa7
Original change: https://android-review.googlesource.com/c/platform/build/+/2008052

Change-Id: Ifb7743b4119875c00783c5b517d871c16e7cf2a1
2022-03-04 14:58:51 +00:00
Treehugger Robot
4e09d57fa7 Merge "Move comment to license_note" 2022-03-04 14:39:32 +00:00
Treehugger Robot
578d7b2492 Merge "Phony target to report all library names." am: f2a0110d36
Original change: https://android-review.googlesource.com/c/platform/build/+/2002324

Change-Id: I236cdbe7b5723e0b2c54075bca83fb471346d2cc
2022-03-04 02:50:26 +00:00
Treehugger Robot
f2a0110d36 Merge "Phony target to report all library names." 2022-03-04 02:23:38 +00:00
Treehugger Robot
39ec08569c Merge "Allow missing key for misc_info lookups." am: 54188ba009
Original change: https://android-review.googlesource.com/c/platform/build/+/2007930

Change-Id: I9d91627787936369a4931451c7f3dc21711a6c16
2022-03-04 00:15:05 +00:00
Treehugger Robot
54188ba009 Merge "Allow missing key for misc_info lookups." 2022-03-03 23:46:15 +00:00
Bob Badour
e6d0369d01 Move comment to license_note
Comments not preserved during refresh.

Test: m nothing
Change-Id: Id088dbe25ab9a3508e87b77f0ff877255423a1dd
2022-03-03 14:57:46 -08:00
Daniel Norman
c44f964a5a Allow missing key for misc_info lookups.
This broke the TV-VF build in ab/8246202.

Change-Id: Ifbf76a3c43c46fcd4280180e45ad23fcbed9346d
2022-03-03 19:42:32 +00:00
Treehugger Robot
075daf7363 Merge "Add SPL downgrade option help text" am: 0b6921be2b
Original change: https://android-review.googlesource.com/c/platform/build/+/2005090

Change-Id: I5642277743a9b63b0240415d50927f35e6c3a20d
2022-03-03 18:24:35 +00:00
Treehugger Robot
0b6921be2b Merge "Add SPL downgrade option help text" 2022-03-03 17:56:41 +00:00
Bob Badour
77570059cd Phony target to report all library names.
Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m nothing reportallnoticelibrarynames

Change-Id: I0f791e2d92b8135d6af3a6c93f0db348fc69f5a1
2022-03-02 22:32:37 -08:00