Commit graph

84326 commits

Author SHA1 Message Date
Jiakai Zhang
96b155c018 Add an entry in METADATA.txt to determine whether to use the CMC GC.
If the device uses the CMC GC, the file will contain:
extra-args = --runtime-arg -Xgc:CMC

Otherwise, the file will contain an empty line:
extra-args =

Bug: 287652269
Test: -
  1. m dist out/dist/boot.zip
  2. unzip -p out/dist/boot.zip METADATA.txt
Change-Id: I3d50367eb2a341e1c03286d7a2cd7ed44d59708f
2023-06-19 20:20:05 +01:00
Treehugger Robot
a99ac90eb5 Merge changes from topic "aconfig-prepare-for-proto-structs"
* changes:
  aconfig: fix incorrect source path in test cache
  aconfig: reduce number of #[cfg(feature = "cargo")] uses
2023-06-19 10:43:34 +00:00
Treehugger Robot
770bfc34e3 Merge "Move ro.apex.updatable to the system partition" 2023-06-19 08:30:52 +00:00
Treehugger Robot
57c1aa7b16 Merge "Handle zip64 extra fields better" 2023-06-17 22:12:26 +00:00
Kelvin Zhang
1e774245a4 Handle zip64 extra fields better
Test: check_target_files_signatures
Bug: 283033491
Change-Id: I7da89f8389c09cc99201cff342483c158bd7e9c1
2023-06-17 09:21:46 -07:00
Treehugger Robot
0d2d11bc00 Merge "Use patch instead of git apply." 2023-06-17 01:56:52 +00:00
Treehugger Robot
59d662524c Merge "aconfig: change java flag method name to camelCase" 2023-06-16 21:49:22 +00:00
Alex Buynytskyy
bce1a51df8 Use patch instead of git apply.
Bug: 281682520
Test: run locally
Change-Id: Ia84055b7a9074836c6d7b3039ba980e39043a41e
2023-06-16 20:23:36 +00:00
Zhi Dou
af81e20653 aconfig: change java flag method name to camelCase
Before java code will directly use the flag name as the method name.
This change adds funciton to try the best to convert flag name to
camelCase, and then use the camelCase string as the method name in the
generated code.

Bug: 279483816
Test: atest aconfig.test aconfig.test.java
Change-Id: I45fc6df46c9d535cd38a657a41313202f9b660af
2023-06-16 12:40:40 +00:00
Jooyung Han
e4635b3e04 Merge "Remove --blkid_path argument" 2023-06-16 06:48:57 +00:00
Justin Yun
cf92cdff7c Merge "Use map_file_generator only for the supported file systems" 2023-06-15 23:54:29 +00:00
Treehugger Robot
5c73eb33db Merge changes I9c1a5346,I0a9d2c58
* changes:
  Fix python3.11's support for zip64
  Search for partition maps in IMAGES dir as well
2023-06-15 15:56:57 +00:00
Justin Yun
a8a5a3ff62 Use map_file_generator only for the supported file systems
map_file_generator can generate map files from erofs and ext# file
systems. Check the file system type and copy images and generate map
files if supported. Otherwise skip these steps.
If the image files are not copied, add_img_to_target_files will
generate the image files and map files.

Bug: 286870582
Test: lunch bertha_x86_64-userdebug && m dist
Change-Id: Ib92dd989cf61b1e376107a507eae9222ceb1d0d4
2023-06-16 00:10:33 +09:00
Mårten Kongstad
0cd8092376 aconfig: fix incorrect source path in test cache
Bug: 283910447
Test: atest aconfig.test
Change-Id: I9bc34e838a0945891f866e9788bcf9f4f6c23d3b
2023-06-15 11:43:33 +02:00
Mårten Kongstad
f94225266f aconfig: reduce number of #[cfg(feature = "cargo")] uses
Group statements with identical #[cfg(feature = "cargo")] attributes in
the same block. This reduces repetition and makes the code easier to
read and less error prone.

Bug: 284779868
Test: atest aconfig.test
Change-Id: Iebdcd20e7cd22cb641424a1af594f5c9ac57b623
2023-06-15 09:28:49 +02:00
Treehugger Robot
1cda03b44b Merge "Update LLNDK list" 2023-06-15 04:26:43 +00:00
Jiyong Park
36fc9a32d7 Move ro.apex.updatable to the system partition
The decision to support updatable APEX or not used to be SoC-specific
because updatable APEX (aka non-flattened APEX) requires some kernel
feature support like loopback device. Kernel was considered as part of
BSP then. Therefore, ro.apex.updatable property was in the vendor
partition.

However, with GKI, kernel is no longer SoC-specific. And most APEXes are
installed to the system partition, which means that the decision affects
how the system partition is built. Thus, this CL moves the property to
the system partition. This enables some partners who have been using
flattened APEX to be able to upgrade to non-flattened APEX without
having to upgrade the vendor partition.

Bug: 281007951
Test: check system/build.prop
Change-Id: I81874076862f6047b9daa14518b95adcb5275064
2023-06-15 13:20:38 +09:00
Kelvin Zhang
38d0c373ac Fix python3.11's support for zip64
Bug: 283033491
Test: check_target_files_signatures -v -l
Change-Id: I9c1a5346e3a5f3920242dc9a5268d999f50a4937
2023-06-14 12:54:57 -07:00
Kelvin Zhang
b789e84499 Search for partition maps in IMAGES dir as well
Partition images are allowed to be in either IMAGES/ or RADIO/ dir of a
target_files zip, so when searching for .map files we should look in
both dirs.

Test: th
Bug: 227848550
Change-Id: I0a9d2c582d8f5d570237434902fac012513c9aad
2023-06-14 10:01:21 -07:00
Treehugger Robot
4b47e8a2f3 Merge "Allow map_file_generator to use host tools" 2023-06-14 16:25:26 +00:00
Zhi Dou
06377d79ab Merge "aconfig: Java codegen iteration 1" 2023-06-14 13:21:16 +00:00
Jooyung Han
629490292a Remove --blkid_path argument
deapexer doesn't need it.

Bug: 279858383
Test: presubmit
Change-Id: If0ec42b5edd4642f07c96ba641030c4dd6fb4660
2023-06-14 15:16:34 +09:00
Treehugger Robot
c37e824f56 Merge "Move MTE mode settings to a product variable." 2023-06-14 01:42:22 +00:00
Kelvin Zhang
0eba102f19 Allow map_file_generator to use host tools
map_file_generator need to invoke binaries such as `unsquashfs` .
These binaries are built from android source tree, so add host binary
output directory to PATH variable so that map_file_generator can use
these binaries.

Test: th
Bug: 286870582
Change-Id: I56634293ee885fc4612627578a22cdf57bc13bfc
2023-06-13 18:24:15 -07:00
Treehugger Robot
c01b9a2877 Merge "aconfig: reject consecutive underscores in identifiers" 2023-06-13 22:05:56 +00:00
Evgenii Stepanov
80b53b8c77 Move MTE mode settings to a product variable.
Allow product configuration of memtag target list by
moving the current set into a product variable instead of the various
.bp files.

The default list of memtag targets can be found in
  build/make/target/product/memtag-common.mk

This is NFC as all targets in the list already have "memtag_heap: true"
in the build files.

Bug: 280343521
Test: no functional change
Change-Id: I5954fde05256e00a8e01c114ad522f50ed0cfa9f
2023-06-13 13:11:52 -07:00
Daniel Zheng
0fd9651321 Merge "Add dt partition in fastboot-info" 2023-06-13 17:35:59 +00:00
Joe Onorato
ac57d98b87 Merge "Allow and merge multiple release configs with the same name" 2023-06-13 15:13:04 +00:00
Zhi Dou
4655c967e1 aconfig: Java codegen iteration 1
This change includes
    - refactor generated java code to generate
        - Flags.java to support the static API
	- FeatureFlagsImpl.java to support injection API
	- FeatureFlags.java interface

Bug: 279483816
Test: atest aconfig.test aconfig.test.java
Change-Id: If0d4baf317b9174635cd0fff3832ab7091ee52ed
2023-06-13 14:45:53 +00:00
Mårten Kongstad
d18c978f31 aconfig: reject consecutive underscores in identifiers
The Java codegen may translate flag names (snake_case) to Java
camelCase, dropping the underscores. The flags a_b and a__b will
translate to the same camelCase form, which is ambiguous.

Circumvent this problem by disallowing consecutive underscores in flag
names, flag namespaces, and packages.

Bug: 284252015
Test: atest aconfig.test
Change-Id: I2586a38160723c06265a140193da8178655553e4
2023-06-13 13:30:58 +02:00
Treehugger Robot
913c41caf5 Merge "Use Z_BEST_COMPRESSION for compress-package" 2023-06-13 10:09:54 +00:00
Joe Onorato
1f6555151e Allow and merge multiple release configs with the same name
For now (to prevent build breakages when this is submitted), duplicate
flag values are allowed, but that will be disallowed once this change
automerges everywhere.

Bug: 286689485
Test: Treehugger
Change-Id: I723340ff9751b61d33c4108b0cc2f90702a116c9
2023-06-12 23:29:25 -07:00
Jooyung Han
bd7a9fafe2 Update LLNDK list
Bug: 271488212
Test: m
Change-Id: I46e1770130be203bfefef0bd5fdf4cec34027d6e
2023-06-13 13:20:23 +09:00
Daniel Zheng
8ad23cf151 Add dt partition in fastboot-info
Adding dt partition in fastboot-info in case device uses it.

Test: m fastboot_info
Change-Id: Id5b3a70064f5ac6da8303f74c73e4d5f395a2c51
2023-06-12 09:57:54 -07:00
Jiakai Zhang
9448754144 Merge "Avoid using soong_zip's "-e" flag for boot.zip." 2023-06-12 16:22:39 +00:00
Daniel Zheng
d97f8505ae Merge "Removing --apply-vbmeta for vbmeta_system" 2023-06-12 15:42:16 +00:00
Dennis Shen
f1cd83bece Merge "aconfig: update cpp codegen to use static methods" 2023-06-12 12:57:57 +00:00
Dennis Shen
4f78f10015 aconfig: update cpp codegen to use static methods
Update c++ codegen to static methods interface.

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I78da3bbca6240bee660c692807930d00f2242b0a
2023-06-12 12:57:38 +00:00
Jiakai Zhang
34914f620b Avoid using soong_zip's "-e" flag for boot.zip.
aosp/23658853 changes boot.zip, which need to be cherry-picked to UDC.
It uses soong_zip's "-e" flag to specify the filename to use in boot.zip
for METADATA.txt. However, the "-e" flag doesn't exist on UDC. This
change uses an alternative approach to avoid using the "-e" flag.

Before this change, the contents were written to
out/dist/boot.zip.METADATA.txt and then passed to soong_zip with "-e" to
rename to file to "METADATA.txt".

After this change, the contents are written to
out/dist/boot_zip/METADATA.txt and then passed to soong_zip with "-j" to
remove the directory name.

Bug: 286381070
Test: m dist out/dist/boot.zip (on udc-dev)
Change-Id: I769de5194b5716f05e5352f4efd635a70ba0b891
2023-06-12 11:27:46 +01:00
Jiakai Zhang
3d58caa11b Merge "Add mainline extension and METADATA.txt to boot.zip." 2023-06-12 09:02:46 +00:00
Joe Onorato
d5eb7a6d28 Merge changes from topic "aosp_starlark_release_config"
* changes:
  Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
  Clean up the API for release config in starlark
2023-06-12 02:27:16 +00:00
Joe Onorato
6d7afa00e3 Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
Bug: 282838389
Test: Treehugger
Merged-In: Ic6dacbdee7d2408aa8b25b4df59bf9bbc566d747
Change-Id: Ie61a7d986c2b8fe2c16117f6678b9e5a71711647
2023-06-11 09:17:43 -07:00
Joe Onorato
d6df20a058 Clean up the API for release config in starlark
Also gets the json summaries working again.

Bug: 283477392
Test: Manual
Merged-In: Iaeb840e96bd7fef2fa1492cb55d9688f7ca75858
Change-Id: I05d9b816ad7ad30c1d238d01df811426d9aeddcb
2023-06-11 07:58:22 -07:00
Joe Onorato
593bef7150 Merge "Define release flags in starlark instead of make" 2023-06-10 03:21:22 +00:00
Florian Mayer
9066ab5240 Merge "Add aosp_arm64_fullmte target" 2023-06-09 23:59:52 +00:00
Treehugger Robot
54066e8ddf Merge "Copy built images to generate target_files.zip" 2023-06-09 22:32:40 +00:00
Joe Onorato
ed1e3b50f3 Merge "Fix build breakage" 2023-06-09 20:57:36 +00:00
Joe Onorato
8b51859317 Fix build breakage
error: build/make/tools/aconfig/Android.bp:69:1: module "aconfig.test.java" variant "android_common": path dependency ":aconfig.test.flags{.srcjar}": unsupported device_config_definitions module reference tag ".srcjar"

Test: m aconfig.test.java
Change-Id: I3df980b06796c90dafee3940fe52809748305950
2023-06-09 13:39:41 -07:00
Cole Faust
386b3746ce Define release flags in starlark instead of make
So that we have a more restricted enviornment for this new configuration
axis that can also be imported into other tools more easily.

Test: Manually (this time also tested setting OUT_DIR outside of the tree)
Change-Id: I01d90e06e45cba756156af16f63e04f575877263
2023-06-09 13:10:05 -07:00
Treehugger Robot
df2af7c840 Merge "Supply apex_info.pb as parameter to delta_generator if file exists" 2023-06-09 19:23:31 +00:00