Commit graph

80359 commits

Author SHA1 Message Date
Sam Delmerico
e31d7de7b0 insert --config=bp2build before -- in b args
Bazel also supports `--foo bar` as another way to mean `--foo=bar`,
The current implementation would accidentally catch that and make it
`--foo --config=bp2build bar`. This CL instead requires that additional
arguments to the target come after a `--`.

E.g.
```
b run --args-for-bazel //foo -- --args-for-foo
```

Test: b build //build/bazel/scripts/difftool:difftool
Test: b run //build/bazel/scripts/difftool/difftool.py --level=FINE /tmp/legacyBuildFiles /tmp/bazelBuildFiles --file_type=object
Change-Id: I534caab04e4c919d4e7b6dc83b8a88e020626b18
2022-08-30 10:22:22 -04:00
Treehugger Robot
d50af652bc Merge "Revert "skip soong tests by default for b command"" 2022-08-30 12:18:08 +00:00
Jingwen Chen
e7b2c97c6a Revert "skip soong tests by default for b command"
This reverts commit 56e576dc12.

Reason for revert: breaks `b cquery //foo:bar` - it strips out `//foo:bar`.

Change-Id: I92d8b1c2732efad3160d26ee78116eccc9f8e48a
2022-08-30 08:54:06 +00:00
Hung-Wei Chen
be469cf909 Merge changes Icc298256,I9268cb11,I446a0b16,I347447eb,Iaae39e4c, ...
* changes:
  Remove HashTreeInfo from verity_utils.py
  Remove verity keys from info_dict
  Remove replace verity key args
  Remove unused args from common.py
  Clean up unused code for VB in verity_utils.py
  Remove verity related props from build_image.py
2022-08-30 07:10:23 +00:00
Treehugger Robot
1eb2dc871c Merge "skip soong tests by default for b command" 2022-08-30 00:24:07 +00:00
Treehugger Robot
00b4775107 Merge "Allow to force ro.audio.silent=1 in build." 2022-08-29 23:38:07 +00:00
Florian Mayer
fd1187e821 Allow to force ro.audio.silent=1 in build.
Change-Id: I3e0775dc0befb09d47525284351dad099090b96b
2022-08-26 21:52:57 +00:00
Treehugger Robot
a52c09d238 Merge "Add mtectrl to the base image." 2022-08-26 10:49:29 +00:00
Evgenii Stepanov
49fd191501 Add mtectrl to the base image.
This is a tiny utility (11Kb) that implements the bootloader switch
interface for MTE:
https://source.android.com/docs/security/memory-safety/bootloader-support

It is only useful on armv8.5+ devices, but there is no separate GSI
image for those.

Bug: 242244112
Test: ls /system/bin/mtectrl
Change-Id: I2696a76d5828007a2db486f41064bcfc0e89ec36
2022-08-25 16:20:34 -07:00
Sam Delmerico
56e576dc12 skip soong tests by default for b command
It doesn't really make sense to incur the cost of running Soong tests to
Bazel users. We can shave off 20 seconds from the local critical path
during clean builds (or if Soong itself has changed) by enabling
--skip-soong-tests in the b command.

Test: b build '...'
Test: b build '...' --run-soong-tests
Bug: 240231596
Change-Id: I77d652502dc000908166e13045aa3e245c2e762c
2022-08-25 14:13:21 -04:00
Yifan Hong
9d4741cefb Merge "Set default recovery USB vendor/product IDs." 2022-08-25 18:08:14 +00:00
Melisa Carranza Zúñiga
6c4e194cff Merge "Adding output_path arg to sign_sepolicy_path call" 2022-08-25 08:25:33 +00:00
hungweichen
cc9c05d5b8 Remove HashTreeInfo from verity_utils.py
We are removing VB related functionalities from release tools. This
change removes the hashtreeinfo and generator in verity_utils.py. It
also clears the function args using it.

Bug: 241044073
Test: atest under build/make
Change-Id: Icc298256be6917ffbd40cf4735f8e8092b541c9f
2022-08-25 03:30:06 +00:00
Treehugger Robot
464ed2fda1 Merge "GSI: add VNDK 33/remove VNDK 28" 2022-08-25 03:03:21 +00:00
Hung-ying Tyan
bdce249c63 GSI: add VNDK 33/remove VNDK 28
Bug: 243530456
Test: mix GSI on Android 13 Cuttlefish
Change-Id: I7af784ac6fda2015fa7e9da8cf552755fd74d2e7
2022-08-25 08:11:42 +08:00
hungweichen
22e3b01d7b Remove verity keys from info_dict
We are removing VB support from release tools. This change aims to
remove verity keys in info_dict generated by common.LOADINFODICT

Bug: 242672222
Test: atest under build/make
Change-Id: I9268cb113c2c0bd11ce85b8485e5a4605bdbdca0
2022-08-24 06:37:12 +00:00
hungweichen
dd3fca09f6 Remove replace verity key args
We are removing VB support from release tools. This change aims to
remove the args related to replace verity key.

Bug: 242672222
Test: atest under build/make
Change-Id: I446a0b16e482c43542a1c0e41b24e80eb9fbc8e6
2022-08-24 06:37:12 +00:00
Zhenhuang Wang
aa6a6a4f36 Merge "Export test_options.tags to module-info" 2022-08-24 02:14:02 +00:00
Cole Faust
f376161d5a Merge "Move the --config flag in the b command earlier" 2022-08-24 00:31:52 +00:00
Frederick Mayle
fe9de6798b Merge "envsetup.sh: partly fix syswrite" 2022-08-24 00:00:32 +00:00
Melisa Carranza Zuniga
7ef1379927 Adding output_path arg to sign_sepolicy_path call
Bug: b/217570541
Test: mma and call sign_apex or sign_target_files_apks
Change-Id: I0fcab6e8a40739406a158a687acea448fd205f5d
2022-08-23 19:09:12 +02:00
Treehugger Robot
9261a656ca Merge "Move some OTA signing functions to a separte file" 2022-08-23 02:25:59 +00:00
Frederick Mayle
e59a87946f envsetup.sh: partly fix syswrite
The grep doesn't work because "Reboot" is capitalized in the
enable-verity output. Now, syswrite gets farther, but fails before the
final remount.

    $ syswrite
    adbd is already running as root
    Successfully disabled verity
    Enabled overlayfs
    rebooting
    restarting adbd as root
    error: closed

Test: ran syswrite on freshly flashed device
Change-Id: I26aaa6278d76dcab56fd4bde3d70ac7841ae2a3b
2022-08-22 22:40:23 +00:00
Kelvin Zhang
059bf6e50d Move some OTA signing functions to a separte file
This makes it easier for other otatools to re-use these logic without
having to pull in lots of dependencies.

Test: th
Bug: 227848550

Change-Id: I81ed01c5cea4b934a074650731b6f89752221de9
2022-08-22 18:20:14 +00:00
Kelvin Zhang
15b12d099a Merge "set up the salt for partitions without build.prop" 2022-08-22 17:10:12 +00:00
Zhenhuang Wang
415ee12c76 Export test_options.tags to module-info
The test_options.tags attribute modifies execution behavior when running
tests in ATest Bazel mode. Exporting the value to module-info enables
ATest to add them to the corresponding Bazel target.

Bug: 240928948
Test: manually add `test_options.tags` attribute and run:
    $ refreshmod && \
      cat out/target/product/generic/module-info.json |\
      grep <tags>
Change-Id: I1a70d5c66703ed6a5a250459a80e8bca71d659b6
2022-08-22 20:59:54 +08:00
Hung-Wei Chen
8dec280fec Merge "Remove VB related code" 2022-08-22 05:25:07 +00:00
Treehugger Robot
a0827dcb0e Merge "Add project specific definitions.mk files" 2022-08-19 16:06:55 +00:00
hungweichen
49447913f6 Remove unused args from common.py
We are removing support of VB from release tools. This change aims to
remove args that no longer be used.

Bug: 242672222
Test: atest under build/make
Change-Id: I347447ebf1e589f8d3c4c8254f2940911c0be7f1
2022-08-19 06:04:06 +00:00
hungweichen
17c064d1e2 Clean up unused code for VB in verity_utils.py
We are removeing support of VB from release tools. This change aims to
remove code that are unreachable after removeing Version1ImageBuilder.

Bug: 242672222
Test: atest under build/make
Change-Id: Iaae39e4c49045f6c34351140cd43087dabd63e9c
2022-08-19 06:00:30 +00:00
hungweichen
65ba375a8e Remove verity related props from build_image.py
We are removing VB related functionalities from release tools. This
change remove the verity related props in build_image.py, and also
remove VB1.0 bootimage builder, which will be unreachable without these
props.

Bug: 241044073
Test: atest under build/make
Change-Id: Ib3f1c100c2c6c9e63a64f49269619b76074a27fd
2022-08-19 05:57:56 +00:00
Cole Faust
a68f5166fa Move the --config flag in the b command earlier
Having the --config flag at the end of a bazel command
will make it get passed to the command you're running
with b run instead of bazel.

Fixes: 242759256
Test: Manually
Change-Id: I6d23a0b022fdee5f822a873c1578674d1eab39c0
2022-08-18 19:41:43 -07:00
Yong Ma
253b106f95 set up the salt for partitions without build.prop
BUG:242954151

Test: make target-files-package, then check the two sha1 are same:
      1. sha1 of IMAGES/boot.img
      2. expected sha1 of boot in VENDOR/bin/install-recovery.sh

Test: make target-files-package; unzip target_files.zip IMAGES/\*`;
      `zip -d arget_files.zip IMAGES/\*`
      `add_img_to_target_files -a target_files.zip`.
      Verify that the rebuilt images are identical to the deleted ones.

Change-Id: I5906ac1696b6403674fd8330b1569aed53510945
2022-08-19 02:10:01 +00:00
Greg Kaiser
85518aceab Add project specific definitions.mk files
Just like we do with build/tasks/*.mk, we also look for project
specific definitions.mk files.

Test: TreeHugger
Bug: 243024627
Change-Id: I7f07546582eb02bba245a1f927a11efc1ddc3c6f
2022-08-18 12:22:15 -07:00
Josh Gao
8d0b576af6 Set default recovery USB vendor/product IDs.
Add system properties to let vendors customize the recovery/fastbootd
USB IDs.

Test: `adb reboot fastboot && fastboot wait-for-device && lsusb -d 18d1:`
Change-Id: I70881f27d579dd54371f59a6a76f9b1f80ce9b47
2022-08-17 15:00:48 -07:00
Steven Moreland
34570d33f4 Merge "BOARD_VNDK_VERSION always by default" 2022-08-17 18:43:37 +00:00
Alix Espino
065afd42e8 Merge "Updated Changes.md on deletion of clang property" 2022-08-17 13:42:28 +00:00
hungweichen
f1f5dd3011 Remove VB related code
Cleaning up the related references of VB in Makefile

Bug: 241044073
Change-Id: I9e0ec9d433f2e76951c4390f716cf77674174930
2022-08-17 08:52:17 +00:00
Hung-Wei Chen
a7dfb456a1 Merge changes Ifbcde7da,Icee659ff,I267da2d5
* changes:
  Remove verity.mk, verity_key, PRODUCT_VERITY_SIGNING_KEY
  Remove PRODUCT_SUPPORTS_VERITY(_FEC) reference
  Remove BOOT_SIGNER and PRODUCT_SUPPORTS_BOOT_SIGNER
2022-08-17 03:09:20 +00:00
Treehugger Robot
2dca04c64d Merge "Suppress R8 warnings for support library annotations" 2022-08-17 00:07:51 +00:00
Xin Li
c0ec8b6803 Merge "DO NOT MERGE - Merge Android 13" 2022-08-16 19:08:26 +00:00
Trevor Radcliffe
061479c528 Merge "Add note to Changes.md about sysprop changes" 2022-08-16 18:26:32 +00:00
Jared Duke
3ca564b047 Suppress R8 warnings for support library annotations
Most of these annotations are stripped at dex compile-time, and are not
necessarily present in the generated dex library's classpath. As the
classpath is used to inform R8 about `libraryjars`, this can cause
reference failures during R8 execution when warnings are enabled.

For now, suppress the reference warnings. Unrecognized runtime-visible
annotations will still be kept, and this should unblock efforts to
re-enable R8 warnings for many platform targets. A proper solution will
be to ensure the appropriate annotation libs are fed as `-libraryjars`
to R8.

Bug: 242088131
Test: m + `optimize { ignore_warnings: false }`
Change-Id: Ie92db2a9725ff520b311c6b66a50feae79463925
2022-08-16 08:49:36 -07:00
Xin Li
789597a58b DO NOT MERGE - Merge Android 13
Bug: 242648940
Merged-In: Id4aaefbc53b4250b7308701493d151f9408f47f1
Change-Id: Ibbf423b395e45fb552c9d0b993378afac28b4a25
2022-08-15 21:59:09 -07:00
Treehugger Robot
81994f0b27 Merge "Fix a bug in unsigned OTA generation" am: 2abfe5f3a3
Original change: https://android-review.googlesource.com/c/platform/build/+/2185088

Change-Id: Id6180edf4f57ccabe4ffb072a7eebaa4d6f07ccf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 02:55:33 +00:00
Treehugger Robot
2abfe5f3a3 Merge "Fix a bug in unsigned OTA generation" 2022-08-16 02:27:34 +00:00
Trevor Radcliffe
c9e72668a0 Add note to Changes.md about sysprop changes
Since it's no longer allowed to depend directly on a sysprop_library
module from a cc module, we should make this known to other
engineers.

Bug: 226199990
Test: N/A
Change-Id: I3a66984abc3ab7b369870c8041a08d788d66b15f
2022-08-15 21:46:07 +00:00
Yifan Hong
f19cd6f89f Merge "Support GKI with non-A/B recovery" am: e6f92d1411
Original change: https://android-review.googlesource.com/c/platform/build/+/2183837

Change-Id: Ieb4ea09d84477f3f14f02a04eac44f3cef7c2ca0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-15 21:30:31 +00:00
Yifan Hong
e6f92d1411 Merge "Support GKI with non-A/B recovery" 2022-08-15 20:34:10 +00:00
Alix
a9324f04b8 Updated Changes.md on deletion of clang property
Bug: 208980553
Test: None, updating documentation
Change-Id: I1acc4a5055cdc6477224fc852cb882dcd5909fa6
2022-08-15 17:18:06 +00:00