Commit graph

80390 commits

Author SHA1 Message Date
Jihoon Kang
d203e12f20 Create partition-specific symlink for jnilib install
Context
- Currently, unembedded JNI libraries are being installed from a symlink based on an android_app's partition.
- Unembedded JNI library may exist in a different partition from that of the app module, thus create a symlink based on the partition of each jni libraries.
- Scope of this change is limited to bp modules, and does not affect mk modules.

Implementation
- Use the JNI library name:partition mapping from LOCAL_SOONG_JNI_LIBS_PARTITION_<target> to create a symlink.

Bug: 154162945
Test: m
Change-Id: Ie9396e0eb1c5bfc5855a2a84db395a2b9008b17b
2022-09-07 17:35:29 +00:00
Treehugger Robot
2a9b910bf4 Merge "Rename mkf2fsuserimg.sh and mksquashfsimage.sh" 2022-09-06 18:42:31 +00:00
Cole Faust
b000208877 Rename mkf2fsuserimg.sh and mksquashfsimage.sh
See other cl in this topic for more information.

Bug: 198619163
Test: Presubmits
Change-Id: Ib39e8513a303a12e8bb6464a114ec39aa087d58a
2022-09-05 18:34:56 -07:00
Treehugger Robot
7aad536922 Merge "Add security patch level param to otatools" 2022-09-02 20:48:41 +00:00
Treehugger Robot
f2514a60cb Merge "Fix module-file name collisions" 2022-09-02 17:20:42 +00:00
Sandro Montanari
dd0a85b0eb Merge "Make com.android.sepolicy mandatory" 2022-09-02 09:29:06 +00:00
Cole Faust
f4431716ca Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Delete the symlinks as they don't appear to be used.

Bug: 198619163
Test: Presubmits
Change-Id: I50eac56aa2b87708d1762e504b3bfd86c07a6bfb
2022-09-01 15:27:05 -07:00
Florian Mayer
9050cd6d37 Merge "Revert "Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes.""" 2022-09-01 19:29:35 +00:00
Treehugger Robot
522df8591f Merge "Add b autocomplete to envsetup" 2022-09-01 14:41:20 +00:00
Treehugger Robot
628a288a6d Merge "Remove 'eval' from b to fix quoted arguments." 2022-09-01 13:44:39 +00:00
Chris Parsons
a297297fdf Add b autocomplete to envsetup
Note that b autocompletion isn't perfect, given that the autocompletion
script looks into the workspace root for BUILD files, instead of
out/soong/workspace. (Also, out/soong/workspace may not even be
available if bp2build has not yet been run!) However, this is a good
start to autocompletion, as bazel commands, flags, and packages
autocomplete correctly.

Fixes: 196945896
Test: Treehugger
Test: Manual verification of `b` autocompletion
Change-Id: Ia99abcfe50d195c48644c7b3455243c03d5d38f7
2022-09-01 08:41:14 -04:00
Sandro
fd1a018a48 Make com.android.sepolicy mandatory
The apex_sepolicy files were removed from the system partition in
ag/17753690 because they were not necessary in T builds.

For updatable sepolicy in Android U+ we are planning to move parts of
the existing platform policy into the apex sepolicy, so we will need to
make the apex_sepolicy files available to all builds.

Bug: 243923977
Test: adb shell ls /dev/selinux /system/etc/selinux
Change-Id: I24b8b8880149885d98caf992afdae908ead11fcf
2022-09-01 09:11:37 +00:00
Jingwen Chen
1ea787a0d0 Remove 'eval' from b to fix quoted arguments.
eval doesn't seem to be necessary and using it breaks quoted args to query.

    $ b cquery 'kind(test, //build/bazel/...)'
    -bash: eval: line 99: syntax error near unexpected token `('
    -bash: eval: line 99: ')`bazel cquery kind(test, //build/bazel/...)
    ---config=bp2build ''

Test: source and rerun b cquery with quoted args
Change-Id: I2b8c4387ab729b5f927fe5a629d3a4cd58bcf901
2022-09-01 05:59:02 +00:00
Florian Mayer
548a2adaf7 Revert "Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes.""
This reverts commit fe3e537192.

Reason for revert: reland with fix

Change-Id: I199e0e0d0bbb7e74292c6406b7d9fe4db7449d59
2022-08-31 15:27:07 -07:00
Florian Mayer
a2159cd341 Merge "Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes."" 2022-08-31 18:38:31 +00:00
Florian Mayer
fe3e537192 Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes."
This reverts commit 1264fcc95a.

Reason for revert: b/244454542

Change-Id: Ic12481fe99d989dabd52431290c78a17cec911ec
2022-08-31 18:37:51 +00:00
Florian Mayer
739ff268d5 Merge "[make] Add memtag-stack sanitizer, switch to linker-generated notes." 2022-08-31 17:54:05 +00:00
Treehugger Robot
af46a14004 Merge "Actually pass $skip_tests to _trigger_build in b" 2022-08-31 13:08:10 +00:00
Jingwen Chen
28a22982cc Actually pass $skip_tests to _trigger_build in b
Change-Id: I66514175978f2fc224fcbd38b65d42e499593f28
Test: run b
2022-08-31 09:47:37 +00:00
Treehugger Robot
0ab4e21939 Merge "Rename ota_utils.Payload to PayloadGenerator" 2022-08-31 05:10:45 +00:00
Cole Faust
5137db0333 Merge "Add avbtool alias" 2022-08-31 00:31:15 +00:00
Treehugger Robot
364cfb2eaf Merge "Move Payload/StreamProperty class to ota_utils.py" 2022-08-30 22:09:57 +00:00
Cole Faust
45844ab338 Add avbtool alias
As a replacement for the removal of the avbtool symlink

Bug: 198619163
Test: Manually running `avbtool`
Change-Id: I54d504a5132e5ac89337e67a07bca0a6f410c272
2022-08-30 13:59:07 -07:00
Kelvin Zhang
fa9286943c Rename ota_utils.Payload to PayloadGenerator
There's also a Payload class in system/update_engine/scripts. To avoid
name collision, rename the one in releasetools to PayloadGenerator.
No functional changes in this CL.

Bug: 227848550
Test: th

Change-Id: Ib7d4c7ad9839d99416d965e3a3661b8cee7b7693
2022-08-30 19:46:49 +00:00
Kelvin Zhang
62a7f6e08e Move Payload/StreamProperty class to ota_utils.py
This allows other modules to import these classes w/o bring in tons of
depedency. No functional changes.

Test: th
Bug: 227848550
Change-Id: I98139b45c02eddefa8a26d032e759fa11cc4c694
2022-08-30 18:29:41 +00:00
Alix Espino
d5c36e1fd7 Merge "Default BuildBrokenClangProperty to empty (false)" 2022-08-30 17:42:10 +00:00
Sam Delmerico
31302e9266 Merge changes I2325e199,I534caab0
* changes:
  skip soong tests by default for b command
  insert --config=bp2build before -- in b args
2022-08-30 17:26:57 +00:00
Sam Delmerico
e4c74c5eef 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: I2325e1992099534b41ae996cee99e126a12f3c62
2022-08-30 10:30:19 -04:00
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
1264fcc95a [make] Add memtag-stack sanitizer, switch to linker-generated notes.
This change depends on the following toolchain commit:
https://reviews.llvm.org/D118948

Bug: b/174878242

Change-Id: Id67503a5c0983c9ae6fc29f158f4d20bca778e9f
2022-08-29 15:18:05 -07:00
Florian Mayer
fd1187e821 Allow to force ro.audio.silent=1 in build.
Change-Id: I3e0775dc0befb09d47525284351dad099090b96b
2022-08-26 21:52:57 +00:00
Alix
7a4d539e75 Default BuildBrokenClangProperty to empty (false)
Clang property is deprecated. Set up a BUILD_BROKEN_CLANG_PROPERTY
flag so partners can bypass errors from using clang.

Change-Id: I7ec19c3d11086046031108ecccba5065c38fa338
Test: m nothing & Treehugger
2022-08-26 20:05:42 +00:00
Kelvin Zhang
0b7207cec5 Add security patch level param to otatools
Test: generate an OTA with --security_patch_level flag, install it, make
sure data wipe happened.
Bug: 242812845

Change-Id: Ic33c5c468dca050a966653e9233388371d8e9b1e
2022-08-26 18:03:27 +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