Commit Graph

1631 Commits

Author SHA1 Message Date
shuixx
a2f63d21f0 strix 2025-07-14 03:06:44 +00:00
Yumi Yukimura
88602b1464 build: Add phony package to build enforce RRO packages
This allows one to build *__auto_generated_rro_(product|vendor).apk
under $(PRODUCT_OUT)/(product|vendor)/overlay/ without having to
build the full partition image or do full android build.

Change-Id: I0c215ed7968e0cba348d344e00a014470ac37b6e
Signed-off-by: RITEFANG <1721985272@qq.com>
2025-02-05 20:41:13 +08:00
RITEFANG
4aeaa2f1d1 build: Add MinusOS build support
Squashed also with the following changes:

  Author: Luca Stefani <luca020400@lineageos.org>
  Date:   Thu Aug 17 22:22:13 2017 +0200

    core: Include PixelProject pathmap

  Change-Id: Ie25dee383cc5bc9bb6390cff2cb2460d526d80b6

  Author: Simon Shields <simon@lineageos.org>
  Date:   Fri Mar 2 12:55:47 2018 +1100

    build: unconditionally use PixelProject pathmap

    even if we're not building a pixelproject target, we need to
    use the pixelproject pathmap to make things like recovery and ril
    happy

  Change-Id: I974c30ad10d4ff5b7805c3df9c22010f1e002bf1

  Author: Luca Stefani <luca.stefani.ge1@gmail.com>
  Date:   Tue Jan 22 15:50:52 2019 +0100

    Don't export BUILD_NUMBER in envsetup

    * The value is meant to be set only before running an /official/ build
    * This allows us to execute consecutive make commands without
      running kati for every invocation

  Change-Id: Ifa94b839f30c7260009c8a3c91c202b50e28022e

  Author: Luca Stefani <luca020400@lineageos.org>
  Date:   Fri Aug 18 10:17:00 2017 +0200

    envsetup: Call fixup_common_out_dir

  Change-Id: I84e16b0df5822cfd8514c46d709109a13c20f86e

  Author: Adrian DC <radian.dc@gmail.com>
  Date:   Sat May 12 11:24:33 2018 +0200

    build: Include PixelProject specific properties in build.prop

     * Our properties were supposed to go to /system/etc/prop.default
        after the following commit:
        "pixelproject: Move to Google's method of defining system default props"
        Change-Id: I6cb0e28a7599b010b389cc541015a37010a00f4b

     * However if BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED is not true,
        only /default.prop will retain the properties contents of
        ADDITIONAL_DEFAULT_PROPERTIES and PRODUCT_SYSTEM_DEFAULT_PROPERTIES,
        and none of our versioning identification was held in the system

     * Enabling BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED globally would
        break all properties on devices that handle partitions usually
        at the device level rather than the kernel due to mounting races

     * Include the vendor/aosp/config/main.mk entrypoint to be allowed
        to extend ADDITION_BUILD_PROPERTIES as we need to define our releases

  Change-Id: I19918eece0f0dd3ee967db0339b4d09c9a6d540e
  Signed-off-by: Adrian DC <radian.dc@gmail.com>

  Author: Rashed Abdel-Tawab <rashed@linux.com>
  Date:   Thu Sep 5 21:35:38 2019 -0700

    core: Only include PixelProject SE policy if repo exists

  Change-Id: If799106d2da6d8c303430e316edff365a22f7c99

  Author: dianlujitao <dianlujitao@lineageos.org>
  Date:   Thu Sep 5 21:56:36 2019 +0800

    product: Exclude AOSP apn list on PixelProject build

    Change-Id: I1fd10089421a2e4b57ef565d87ad1f6036bd1898

  Author: Michael Bestas <mkbestas@lineageos.org>
  Date:   Fri Apr 12 02:10:12 2019 +0300

    build: Conditionally include AudioPackage14.mk instead of AllAudio.mk

    * AllAudio.mk doesn't contain latest material files and also
      contains multiple duplicate files. Just copy the latest
      material ones and we'll include the older files in vendor/aosp

    Change-Id: Ic7353216a3f3dc3c51006d951ac932cfd6e5f3b5

  Author: dhacker29 <dhackerdvm@gmail.com>
  Date:   Sat Jun 6 22:22:05 2015 -0400

    Remove LatinIME as it is included per target in vendor/aosp

    Change-Id: Ibce4a244ec0653a7c7798d864047ac667866a1dc

  Author: razorloves <razorloves@gmail.com>
  Date:   Mon Oct 7 05:10:56 2019 -0500

    build: Remove su inclusion

    This stops including su in all pixelproject userdebug/eng builds.
    Inclusion of su is conditionally handled in /vendor/aosp.

    Change-Id: Ia3ad978146f170a2b260d77afe9eb580d4b4f823

  Author: Michael Bestas <mkbestas@lineageos.org>
  Date:   Sat Nov 7 22:45:12 2020 +0200

    Stop including vendor specific clear_vars.mk

    vendor/aosp/build/core/clear_vars.mk is no-op since 16.0

    Change-Id: I7e159cc9ed5a838c9a04c1a8b7dcf925d83f0e20

Change-Id: Iab8b2ef8b644a7bea10bfd28b99d9e69539b1357
Signed-off-by: RITEFANG <1721985272@qq.com>
2025-02-05 20:35:57 +08:00
Dan Shi
8d5479a400 Package shared lib for camera-hal-tests
Bug: 362195892
Test: presubmit
Change-Id: Ia424942040c5e0d26f12cc0fcdb0925d90567809
2024-09-20 05:37:54 +00:00
Treehugger Robot
435145d063 Merge "Move create_root_structure.mk to the dont_bother block." into main 2024-09-12 08:29:21 +00:00
Nelson Li
87ef4b8aee Move create_root_structure.mk to the dont_bother block.
Bug: 353642907
Test: m -j init.environ.rc
Change-Id: I54671a194dbf2005286cb8386cafd93fbef75975
2024-09-11 16:46:45 +08:00
Herbert Xue
48ab2f75c2 Move building bootloader/radio image task to proper place
Move the task of building bootloader/radio images and unpack their
partitions to build/core/tasks/tools.

Bug: 359426542
Test: presubmit
Change-Id: I3ac1a1a6eb0e21fb1eac6db628e094a13c9fc73f
2024-09-11 10:04:16 +08:00
Nelson Li
1646e5c028 Move the creation of the root structure to build/core/main.mk
Since Soong currently doesn't support the `install_directory`
functionality, `system/core/rootdir/Android.mk` cannot be directly
converted to Android.bp. Moreover, its main content is to create
directories and symlinks for the root file system. Therefore, we'll
first rename it and move it to build/core/main.mk for handling.

In addition, consolidate the handling of meta-lic related parts into
`build/core/tasks/meta-lic.mk`.

Bug: 353642907
Test: m -j init.environ.rc
Change-Id: Ie8f8bcae5752d22c331b33a33981a959410f0a69
2024-09-10 06:51:10 +00:00
Sangmin Lee
fd2e967af0 Optimize: Reduce vendor target build files
Prevent system/% files from being built by BUILDING_SYSTEM_IMAGE
and data/% files from being built by BUILDING_USERDATA_IMAGE

1) Address issue where system/% files were
being built even when
PRODUCT_BUILD_SYSTEM_IMAGE was false.
 This change reduces the ninja targets for
aosp_cf_x86_64_phone_vendor-trunk_staging-userdebug
from 140,427 to 57,303

Test:
lunch aosp_cf_x86_64_phone_vendor-trunk_staging-userdebug ; m

2) Resolve issue where data/% files were
being built during "m dist" even if
PRODUCT_BUILD_USERDATA_IMAGE was set to false

Test: Set any module to install at data partition using
LOCAL_MODULE_PATH=$(TARGET_OUT_DATA)/app
lunch aosp_cf_x86_64_phone_vendor-trunk_staging-userdebug ; m dist
Check the contents at out/target/product/vsoc_x86_64 and out/dist

Change-Id: I2a914339231d57598a6f30fc83fd8203d4107a11
2024-08-22 15:23:47 +09:00
Qing Shen
ca2fe2cd81 Merge "Add a coverage suffix to avoid Ninja file regeneration." into main 2024-08-20 01:16:53 +00:00
Qing Shen
2c7fb2df08 Add a coverage suffix to avoid Ninja file regeneration.
This CL uses the environment variable, EMMA_INSTRUMENT to determine whether or not coverage is enabled. If coverage is enabled, it adds a bunch of suffixes to the files generated in out/soong/ folders.

This change reduces the build time by avoiding ninja regeneration when users simply switches from atest to atest --experimental-coverage, or vice versa, and no Android.bp changes are made.

Bug: 331444846
Test: Locally run m libc, and then EMMA_INSTRUMENT m libc twice, no ninja regenerations required. Compared the hash of out/target/product/vsoc_x86_64/ between the before-change repo and after-change repo. Only diff is the after-change directory contains an extra file `out/target/product/vsoc_x86_64/.installable_files` while the original directory has only `out/target/product/vsoc_x86_64/.installable_files.previous`, both files have the same hash.
Change-Id: I91eb1134ac552f47a40f3d5ddaab630d146b0773
2024-08-14 01:21:56 +00:00
yike
261e22dd1d Link shared libs to x86/x86_64 folder if available
Currently, the shared libs are not categorized according to arch,
which adds more redundant dependencies at runtime and might mislead
the test execution.

Test: m host-unit-tests
Bug: 351909435
Change-Id: I48f8e6752879cdd4d510ce5b611dc6c118a42f8f
2024-08-09 03:34:08 +00:00
Wei Li
4d7e700997 Switch SBOM generation of products to Soong and remove the function in Make.
Bug: 324467079
Test: m sbom
Test: m dist
Test: banchan com.android.adbd module_arm64 userdebug && m sbom && m dist
Test: build/soong/tests/sbom_test.sh
Change-Id: Ic862604acd3ad11ef238748a744a8e675d2a141a
2024-08-02 17:56:28 -07:00
Yike Zhang
fb308d3c5d Merge "Link shared libs to per test module folder in host-unit-tests.zip" into main 2024-07-12 21:52:51 +00:00
yike
79422c8ed9 Link shared libs to per test module folder in host-unit-tests.zip
Downstream testing infra needs per test module folder to be
self-contained to prune dependencies and increase testing efficiency.

Bug: 351909435
Test: presubmit
Change-Id: Icda8982af8eb223ba4ae45be7975dc5aa42a183e
2024-07-12 20:58:37 +00:00
Wei Li
63d7bb2fb6 Change output of Make metadata to directory compliance-metatada.
Bug: 324465531
Test: CIs
Test: m make-compliance-metadata
Change-Id: I85e2c3b96a26e7a6b9905858212b041483b41b78
2024-06-21 19:31:02 -07:00
Wei Li
a5b70ba64a Export metadata of make modules and installed files.
Bug: 324465531
Test: CIs
Test: m make-metadata
Change-Id: Ie4971477db7e6c395c4721c7978c0ff9cbc655f2
2024-06-18 14:45:18 -07:00
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