Commit graph

1614 commits

Author SHA1 Message Date
Cole Faust
e6481c1b4c Include soong installs file before Android.mk files
I changed the installs file to be after Android.mk files in
aosp/3080639, in order to minimize the information given to Android.mk
files. But it appears that some exotic vendor builds actually rely
on this information (when they shouldn't).

Bug: 340254841
Test: diff'd out/target/product/<vendor>/installed-files-vendor.txt before/after this cl, and with a revert of aosp/3080639
Change-Id: I00a06fe984397e4dba57352850f5e2484d17f657
2024-05-15 15:26:39 -07:00
Treehugger Robot
db3606ddd8 Merge "Move sysprop assignments to separate mk file" into main 2024-05-10 01:26:40 +00:00
Cole Faust
9feef379ff Record contents of EXTRA_INSTALL_ZIPS files in file_list.txt
The partitions will not include anything that's not in file_list.txt.

Zip files in EXTRA_INSTALL_ZIPS are extracted into the staging
directories when other files are installed. Their contents need to
be added to the file_list.txt so that their extracted files are not
ignored.

EXTRA_INSTALL_ZIPS is only used by android_app_set, which is only used
by partners, so this bug went unnoticed for a long time.

Bug: 337869220
Test: m droid and checked the contents of file_list.txt when adding an android_app_set locally
Change-Id: Ifa2f7168dbeedbb2308a481c0c78f28e874b0aef
2024-05-09 11:04:23 -07:00
Inseob Kim
85b83a90e1 Move sysprop assignments to separate mk file
core/sysprop_config.mk is added to separate code setting
ADDITIONAL_*_PROPERTIES variables. This should be a no-op for now but it
will help migrate build.prop generation to Soong.

Bug: 322090587
Test: compare build.prop files before and after
Change-Id: I57a1ae899865027bcadddc2071fcd2afcf2703bc
2024-05-09 17:38:46 +09:00
William McVicker
adc3664dd2 Merge "Add new product property to detect if PAGE_SIZE is defined" into main 2024-04-22 18:30:04 +00:00
Paul Duffin
56ac6da961 Use new metalava jar-to-diff command
Replaces the use of `--input-jar-file` and `--api-xml` with the newly
added `jar-to-diff` command.

Test: TARGETS=$(for i in api.xml system-api.xml module-lib-api.xml system-server-api.xml test-api.xml; do echo out/target/common/obj/$i; done)
      m $TARGETS
      # Diff $TARGETS with and without this change to make sure that
      # they are identical, which they are.
Change-Id: I6a78febb4b2e4d06a0b3aea29fb4a7f94c9ab9a4
2024-04-19 12:34:47 +01:00
Kiyoung Kim
66481ae8e1 Remove BOARD_VNDK_VERSION usage from Kati
As of VNDK deprecation, BOARD_VNDK_VERSION should not be referenced
anymore. This change removes BOARD_VNDK_VERSION references and related
logics from Kati, so VNDK deprecation can be fully set without flag.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I9ea5f1236268b99eb731ebf48afd9e595d06ab1a
2024-04-09 14:47:29 +09:00
Kiyoung Kim
fdeacfd30a Remove PLATFORM_VNDK_VERSION related code
As of VNDK deprecation, PLATFORM_VNDK_VERSION should no longer be used.
This change removes most of references for PLATFORM_VNDK_VERSION
variable.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I9293deffc01d2431740c43ecae23719a9171f344
2024-03-28 13:05:05 +09:00
Yi-Yo Chiang
adaf1c6f11 Copy build.prop[-<part>] to dist dir only if the corresponding partition
image is being built

Bug: 330834204
Test: Build dist and check that build.prop is not copied if not building
  its partition
Change-Id: Iab08ef10e7c723867c2cf3ab4f297918dca989d3
2024-03-25 16:04:00 +08:00
Justin Yun
000e31c9ed Define PRODUCT_SHIPPING_VENDOR_API_LEVEL
Devices may set its first vendor api level to
PRODUCT_SHIPPING_VENDOR_API_LEVEL. This will manually set to
ro.vendor.api_level and will be used by tests.

If this value is not defined, init process will automatically
calculate the ro.vendor.api_level property for tests.

Bug: 326164316
Test: Check vendor/build.prop
Change-Id: I89f844ffaad9e3e39deab1c680bd1f7f17f4d8ad
2024-02-28 21:01:40 +09:00
Yi-Yo Chiang
2aa40fbb57 Add system_ext.img to droidcore-unbundled
Otherwise system_ext.img wouldn't be built under $PRODUCT_OUT dir when
building a system.img&system_ext.img only build target.

Bug: 326359088
Test: Build a system/system_ext image only target
Change-Id: I8732f7a578350f8bc3b91f8a1db656bf95eddc95
2024-02-22 11:47:37 +00:00
Hsin-Yi Chen
bc5a4271ee Merge "Define a make target for all LLNDK dumps" into main 2024-02-21 07:42:50 +00:00
Hsin-Yi Chen
23d855680c Define a make target for all LLNDK dumps
- Define findlsdumps_LLNDK that vFRC process will build.
- Move LSDUMP_PATHS_FILE to target/product/gsi/Android.mk.
- Allow LLNDK dumps in prebuilts/abi-dumps/vndk.

Test: m findlsdumps_LLNDK check-vndk-list
Bug: 314010764
Change-Id: I6329cd4b1b919069291a13bd03720ceea46b95ff
2024-02-21 03:46:57 +00:00
Jiyong Park
de8af59856 Disable reboot to ram dump on zygote crash loop for -eng builds
Bug: 323566535
Test: check sysprop
Change-Id: I4ee3b119bf4a0ff21c8e6d92e74eee084a54867e
2024-02-15 18:18:06 +09:00
Kiyoung Kim
1e14cdfd56 Do not set BOARD_VNDK_VERSION and PLATFORM_VNDK_VERSION
Do not set BOARD_VNDK_VERSION and PLATFORM_VNDK_VERSION if VNDK is
deprecated. BOARD_VNDK_VERSION and PLATFORM_VNDK_VERSION should not be
used once VNDK is deprecated with KEEP_VNDK=false

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: Iead60663bed3653e63e7a444a873cfaea50780b0
2024-02-07 21:07:23 +09:00
Justin Yun
b33308c88c Use RELEASE_BOARD_API_LEVEL_FROZEN
RELEASE_BOARD_API_LEVEL_FROZEN must not be overriden by a board
config value. Use RELEASE_BOARD_API_LEVEL_FROZEN directly to build
configs.

Bug: 295269182
Test: TH
Change-Id: I60ad4cf1a9f377619fef98d6f9ef4d04d3395991
2024-01-22 10:54:06 +09:00
Colin Cross
4637dafb94 Remove last reference to SOONG_COLLECT_JAVA_DEPS
SOONG_COLLECT_JAVA_DEPS was uncondtionally enabled in
If30ad5dbabb6709f834134cbc9a513a9bdc9d9de, remove the conditional
check for disting the results.  The prevents rerunning Make analysis
in ASfP, which is setting SOONG_COLLECT_JAVA_DEPS=true.

Test: builds
Change-Id: Ibecbeeefda3fec43c8a54b5ff80835e331bab1fc
2024-01-08 14:28:48 -08:00
Will McVicker
850a2e8e2f Add new product property to detect if PAGE_SIZE is defined
As part of the effort to support page size agnostic builds, this patch
adds a product property that is set when Android is built with
`PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true` set. This property is
required to be set on all devices launching with V and later.

Test: atest -c Vts16KPageSizeTest
Bug: 315034809
Change-Id: Ia4f7cca362d8e65459b9a1f188cf60d9905c624b
2023-12-12 22:37:19 +00:00
Justin Yun
f2b6016e53 Define ro.llndk.api_level
If RELEASE_BOARD_API_LEVEL is defined, set the API level to
ro.llndk.api_level to show the maximum api level that the LLNDK in
the system partition supports.

Bug: 312098788
Test: getprop ro.llndk.api_level
Change-Id: Ia65bf6c30ea19b229543d35df788eb202fd50dd4
2023-11-22 20:08:49 +09:00
Devin Moore
ca2c656091 Merge "Respect PRODUCT_PACKAGES_SHIPPING_API_LEVEL in artifact path checker" into main 2023-11-20 21:49:35 +00:00
Devin Moore
d47e194115 Respect PRODUCT_PACKAGES_SHIPPING_API_LEVEL in artifact path checker
Test: lunch gsi_tv_arm-userdebug  && m
Bug: 299166571
Change-Id: Ic2ceab29967ef5343dc924c52e0928ada06671f8
2023-11-20 20:45:58 +00:00
Justin Yun
136fa83d4e Merge "Define BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN" into main 2023-11-13 23:40:06 +00:00
Colin Cross
92f8043874 Escape sbom lines
Go 1.21 changes the names of some factory functions to include
characters that need shell escaping.  Wrap everything written to
the sbom file with single quotes.

Bug: 309895579
Test: m out/target/product/vsoc_x86_64/sbom-metadata.csv
Change-Id: Ia61f02d8b02dd9f92ce144307087423c592a1833
2023-11-10 15:06:21 -08:00
Justin Yun
23d52435f3 Define BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN
BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN are set by the release
flags.
BOARD_API_LEVEL sets ro.board.api_level that shows the API level of
the vendor API surface.
BOARD_API_LEVEL_FROZEN sets ro.board.api_frozen that shows if the
ro.board.api_level is finalized.

Bug: 295269182
Test: getprop ro.board.api_level
Change-Id: Ie57c57b6c9f1fc0c98968195843059a48da8e512
2023-11-10 16:31:04 +09:00
Justin Yun
2071b4eac2 Merge "Set ro.product.vndk.version for VNDK v35" into main 2023-11-05 07:16:14 +00:00
Colin Cross
aed37d79f2 Remove obsolete uses of LOCAL_MODULE_TAGS
Only LOCAL_MODULE_TAGS := tests is used is meaningful in the current
implementation.  "optional" and "samples" both exist in the tree, but
are meaningless.  "gnu", "user", "eng" and "debug" are  no longer used,
and are already forbidden by the unusual tags check.  The info from the
"module" target is now available in module-info.json.  Delete all the
irrelevant code.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I04e8178a362e382a1a4bd997c1b4c3a480db7714
2023-11-02 10:10:06 -07:00
Justin Yun
925d1f517c Set ro.product.vndk.version for VNDK v35
Until we have updated art mainline module, we must provide
ro.product.vndk.version to use product namespace for product apks.

This can be removed when art mainline module is updated.

Bug: 308676119
Test: See if product apps uses product-clns namespace in
      cf_x86_64_phone-next-userdebug
Change-Id: I5030fb0f82c80e0cb94c89179e6c71df119368da
2023-11-02 11:48:39 +09:00
Justin Yun
f71c221f40 Remove ro.product.vndk.version property
Product modules no longer use vndk libraries but install them to
/product/lib[64].

Test: lunch cf_x86_64_phone-next-userdebug; m
Test: atest GtsVndkDependencyTestCases
Bug: 299867815
Bug: 302255959
Change-Id: I67614457c83f0f18eba7dc1d8259efeb5795807b
2023-10-25 13:24:29 +09:00
Colin Cross
df85b8691e Make checkbuild depend on blueprint_tests
The Soong tests are being disabled by default, add them as a manual
dependency of checkbuild to esnure they still run in CI.

Bug: 269296618
Test: aninja -t path checkbuild out/host/linux-x86/bin/go/soong-java/test/test.passed
Change-Id: Ice9b5ecdef8455cd0b173edbac141861cffc28c1
2023-10-24 10:59:40 -07:00
Kiyoung Kim
29445bd935 Do not compare KEEP_VNDK with false
Overall android build system assumes empty value as false, so comparing
KEEP_VNDK value with false can cause unexpected problem in the future.
It should be changed to compare with true in opposite way.

Bug: 299197187
Test: aosp_cf build succeeded with KEEP_VNDK=false
Change-Id: I5db685c2735309a14ea6bdb8b8928b2aa987929f
2023-09-25 16:25:20 +09:00
Kiyoung Kim
81923d1289 Define llndk modules instead of vndk_package
vndk_package installs more than VNDK APEX, which includes LLNDK for
system and some core modules with vendor variant. This change adds a new
target llndk_in_system to instal LLNDK modules in the system image and
use this package if VNDK is deprecated

Bug: 299197187
Test: Cuttlefish and Cheetah boot succeeded without error
Change-Id: I9fe1114fdcb65c6143b5f734425c878a29138d0b
2023-09-21 15:43:55 +09:00
Kiyoung Kim
a28e56e1cc Merge "Do not set ro.(product.)vndk.version if VNDK is deprecated" into main 2023-09-04 08:09:56 +00:00
Treehugger Robot
db21a2aee5 Merge "Don't read the odex zip files when building sbom-metadata.csv" into main 2023-09-01 19:29:31 +00:00
Pawan Wagh
8253e12483 Adding a system property to enable 16k dev options
16K dev option should be visible on particular devices which set
PRODUCT_16K_DEVELOPER_OPTION. Adding a system property which will be
enabled based on this option.

Test: m, booted device with PRODUCT_16K_DEVELOPER_OPTION ON/OFF and
verified option visibility.
Bug: 297922563

Change-Id: I6d1cd2ce0c6f38fb43222d8e1ac2b797ef675c62
2023-08-31 20:08:31 +00:00
Cole Faust
b35231ece0 Build the proguard dict zip without PACKAGING intermediates
Before, as each module was built, it would dump its proguard-related
files into the PACKAGING folder. Then the rule for the final distable
zip would zip up this whole folder. This means that if you built a
module that was not part of the system, and then rebuilt the final
zip, it would erronously include more proguard files than necessary.
This problem was worked around by relying on CI to run `m installclean`
every time.

Now, the zip proguard files always include the same information.

This also makes it so that when you build a module, its proguard files
are not copied to the PACKAGING folder, making builds that don't
build the final proguard zips slightly faster.

Bug: 205632228
Test: diff'd proguard-dict.zip, proguard-dict-mapping.textproto, and proguard-usage.zip before/after this cl on sdk_phone_x86_64. They have diffs, but only in the order of files / lines.

Change-Id: I98c02e1eb117c337ba9b98f04ad486597eb9bb86
2023-08-30 17:17:19 -07:00
Cole Faust
9ff7a37096 Don't read the odex zip files when building sbom-metadata.csv
The files inside the odex zip files are now part of $(installed_files)
as of aosp/2729625.

Bug: 205632228
Test: m out/target/product/emulator_x86_64/sbom-metadata.csv, before this cl you can find duplicate entries for the odex files. After this cl there's only 1
Change-Id: I1645bd1bb9e1f10fc3746225a15b8431b666580e
2023-08-29 15:39:10 -07:00
Kiyoung Kim
3747299783 Do not set ro.(product.)vndk.version if VNDK is deprecated
ro.(product.)vndk.version should be empty when the VNDK is deprecated.
This change skips property set up when KEEP_VNDK flag is false. Device
can check if VNDK is deprecated with ro.(product.)vndk.version property.

Bug: 290159430
Test: aosp_cf_x86_64_phone build and boot succeeded.
Change-Id: Ia02fb33137c8df456fda87b5b769cfb940349747
2023-08-25 14:05:06 +09:00
Cole Faust
075d9622ff Ignore vndk compat symlinks in artifact path requirements
A change is being made to properly track apex compat symlinks in
the installation logic, which causes the artifact path requirements
to start complaining about them. Exclude them from the artifact path
requirements.

Bug: 205632228
Test: m nothing
Change-Id: Ie975b7450574d41bb13bb2179edc31ba4edd413e
2023-08-22 11:58:17 -07:00
Wei Li
517a13216e Add SBOM metadata for symlinks in root directory so they can be included in product SBOMs.
Bug: 272358980
Test: build/soong/tests/sbom_test.sh
Change-Id: I06e6716536c034dee3f6aa03469ad9ccc587dbd5
2023-08-10 18:11:06 -07:00
Wei Li
9b4cf43335 Include flags files in product SBOM.
Bug: 272358980
Test: build/soong/tests/sbom_test.sh
Change-Id: Ifcb2f26044c346c54e60d1d4fb85fc4001f64210
2023-08-08 17:26:49 -07:00
Wei Li
604ab2f175 Remove duplicate in unbundled build moduels defined in TARGET_BUILD_APPS.
Bug: 294786322
Test: banchan com.android.adbd com.android.adbd module_arm64 userdebug && m sbom
Change-Id: I60c403d530299741d6250b816095eafedf5bcd3d
2023-08-08 13:59:55 -07:00
Treehugger Robot
21e6105b79 Merge "Combine aconfig cache files into per-partition dumps." into main 2023-07-21 14:34:44 +00:00
Treehugger Robot
3ca44b286e Merge "Add a new variable for deprecating VNDK" into main 2023-07-19 04:44:51 +00:00
Kiyoung Kim
f019601670 Add a new variable for deprecating VNDK
Add a new flag variable for deprecating VNDK. This variable should be
passed to Soong, so it can change behavior based on the flag.

Bug: 290157355
Test: build succeeded with KEEP_VNDK=false
Change-Id: I3a9d1041411ad24ff42f76506a8f929e364b868d
2023-07-14 01:18:19 +00:00
Jooyung Han
2ecded04a6 Do not install required modules from order-only deps
When a vintf_fragments or init_rc file is shared by two modules,
unintended modules are installed due to the shared file.

This was caused by add-all-target-to-target-required-modules-deps.

With the following definitions:

cc_binary {
  name: "foo",
  vintf_fragments: ["shared.xml"],
  required: ["foo-req"],
}

cc_binary {
  name: "bar",
  vintf_fragments: ["shared.xml"],
}

When installing "bar", surprisingly, "foo-req" is installed due to the
link between "shared.xml" and "foo-req" added by
add-all-target-to-target-required-modules-deps.

To fix that, in this change, vintf_fragments and init_rc files are
marked as "order-only" deps. In
add-all-target-to-target-required-modules-deps, order-only deps are not
used to add links to "required" modules.

Now, with the same definitions, installing "bar" won't installs
"foo-req".

Bug: 198818343
Test: (see above)
Change-Id: I16be0dcb84564c559cb2f4223e2812321ee14729
2023-07-11 22:26:15 +09:00
Joe Onorato
63a84551ca Combine aconfig cache files into per-partition dumps.
Bug: 283910439
Test: manual validation of outputs, soong unit tests
Change-Id: I5f7dc16ee42c3722dc66ffe964ed20479eea1e15
2023-07-07 17:33:09 -07:00
Wei Li
50745668c3 Revert "Revert "Support SBOM generation of m build unbundled APEXs.""
This reverts commit bab162156e.

Reason for revert: issue is fixed in ag/23851209.

Change-Id: I965d535771f0bd6eb0e6da66b2c2cc3fd7f194c9
2023-06-30 02:33:36 +00:00
Lukacs T. Berki
3a958ff8a0 Change initialization message.
There are now two newer build systems.

Test: Presubmit.
Change-Id: I9e62e9223ddc757d71f1b404e1cc0a0634b740d4
2023-06-26 07:04:42 +00:00
Wei Li
c20175155a Merge "Include static libraries information in Android SBOM." 2023-06-19 22:02:20 +00:00
Wei Li
d263695cd4 Include static libraries information in Android SBOM.
Bug: 280852724
Test: CIs
Test: lunch aosp_cf_x86_64_phone-userdebug && m sbom
Change-Id: Ie2365d79ba24910b7ace132b578589be10a17d78
2023-06-16 23:02:09 -07:00