Commit graph

329 commits

Author SHA1 Message Date
Cole Faust
b20aee1b1e Merge "Remove all VNDK deprecation flags" into main 2024-06-05 19:24:17 +00:00
Steven Moreland
c89cf9628b Android builds default to 64-bit.
Some people don't specify what they build. This came up on
some host tools target, and there were some interactions.
Anyway, 64-bit is in, 32-bit is out. Cheers.

Bug: N/A
Test: N/A
Change-Id: I69ab62d88011df90874e4ba05ee34b61805911e0
2024-05-31 20:23:16 +00:00
Kiyoung Kim
69f5dbb0d0 Remove all VNDK deprecation flags
VNDK is fully deprecated, so flags to deprecate VNDK is no longer
needed. This change removes all flags deprecates VNDK.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ifc918a875d7d5bed232165873ee9b0c562841594
2024-05-31 09:52:18 +09:00
Joe Onorato
32b2aa33c5 Provide a function in envsetup.sh to get the host arch directly
It's very simple logic, and running get_build_var to do it is slow
and has side effects (like needing a lunch target, creating an out
directory, etc.)

Test: source envsetup.sh
Change-Id: If260efd21713874fba7c15dbc0fd23442d776f8a
Merged-In: If260efd21713874fba7c15dbc0fd23442d776f8a
2024-05-14 15:12:16 -07: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
Alexander Koskovich
d65b625cc5 Allow installing fake [odm|product|system_ext] packages
This is required to use the install_symlink module on these
partitions.

Test: Create install_symlink module on /system_ext
Change-Id: I78e93c5df12bae8fc23b378a30d43bf6c0b67d53
2024-03-18 15:38:18 -04:00
Kiyoung Kim
09aaa26c06 Move setting default BOARD_VNDK_VERSION value
Current BOARD_VNDK_VERSION is being set from config.mk, but this is
before build system loads release config and checks if VNDK is
deprecated or not. Move this to envsetup so it can set up
BOARD_VNDK_VERSION only when VNDK is not deprecated with flag.

Bug: 324976878
Test: mainline release target build succeeded

Change-Id: I490cc431038f5cebc40d03c98d2666eaba906664
2024-02-13 13:40:40 +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
Cole Faust
7aa649a62c Add PRODUCT_VALIDATION_CHECKS
This is a new mechanism for asserting properties about your product
config. See the documentation in product_validation_checks.mk for
more information.

Test: Manually
Change-Id: I698dea899441f3773f839ea2ba1a2a6cfe59b57b
2023-11-06 10:42:01 -08:00
Jeff Hamilton
426a9f8f02 Move most version variable out to relase configs.
This allows finer control of the version variables
per release config, and removes a lot of computed
logic in favor of just directly setting the values.

Bug: 306702353
Test: lunch <device>-next-userdebug && m -j98
Change-Id: I9edc7171d124f0cfa540fea6f0e06ba877910444
Ignore-AOSP-First: Changes in internal projects first.
Merged-In: I9edc7171d124f0cfa540fea6f0e06ba877910444
2023-10-24 16:41:58 +00:00
Cole Faust
976a52c007 Allow installing fake vendor packages
This line in base_rules.mk requires a variable that's qualified by
target/host, the partition, and the module class. There didn't exist
one for target/vendor/fake, so fake vendor modules failed to compile.
Add a TARGET_OUT_FAKE so we can use fake vendor modules. This is aimed
at using install_symlink on the vendor partition.

https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/base_rules.mk;l=279;drc=c67e769b8c44eeb9bb851f20003b63d35193e155

Bug: 205632228
Test: presubmits
Change-Id: If4618f90cebbafcd44e88e38513033282c37c1b7
2023-10-03 14:27:35 -07: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
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
Joe Onorato
7b578d32f9 Revert "Define release flags in starlark instead of make"
This reverts commit c113a70221.

Doesn't work with OUT_DIR hard coded outside the tree.

Test: OUT_DIR=/source/whatever m
Bug: 283278495
Change-Id: I8cc74a9ec936b9c7502b97b9b7a4fd731988c407
2023-05-19 09:22:42 -07:00
Cole Faust
c113a70221 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
Change-Id: Iabce1919f6d6f57a256ae144784af7c47622b54d
2023-05-16 15:46:55 -07:00
Joe Onorato
964f401281 Add release flag logic based on TARGET_RELEASE.
Test: Lots of manual testing
Change-Id: I9072f136e64576009d0debd057c8ce6918fae861
2023-05-11 12:53:36 -07:00
Cole Faust
c63ce1ab58 Allow importing starlark code in makefiles
Adds a new `$(call run-starlark,my/starlark/file.bzl)` function that
will run the starlark file and set all the variables in the
variables_to_export_to_make dictionary as make variables.

Fixes: 280685526
Test: m nothing repeatedly causes no ninja regeneration, but touching all_versions.bzl does. go test, ./out/rbcrun -mode=rbc ./build/make/tests/run.rbc
Change-Id: Ic72e18dd28dba8233ba2dfb658b5d03ccece1bfd
2023-05-09 15:12:58 -07:00
Peter Collingbourne
0d06f702dd Do not force rebuilds after changing host kernel.
Change-Id: I0c62eda893531853e6d192f6551a919d10e12acd
2022-11-02 15:44:14 -07:00
Cole Faust
a1b215cf2a Remove leading whitespace from dump-variables-rbc results
For some reason, some internal products were failing the
quick rbc ci check purely because of indentation differences
in the variable dump file. That file has a lot of wonky
leading indentation due to the foreaches and line breaks
in the function implementation that I couldn't figure
out how to remove. Instead, use a sed command to remove
leading spaces after writing the file.

Bug: 239453560
Test: build/bazel/ci/rbc_dashboard.py --quick on a new internal-only product
Change-Id: I4b34d8e0b5dbbfcbb9ed35345d216ca11a5a1198
2022-07-21 08:08:32 -07:00
Dan Willemsen
b34c387441 Obsolete BOARD_PLAT_*_SEPOLICY_DIR
These were marked as deprecated in late 2020 [1]. Shortly later, there
was an attempt to obsolete them [2] for products shipping with API level
31 or greater, but that was reverted [3] because of internal users.

1: I58c64839cc513ae082cd3ee3c1e108843ea7439e
2: Ic4d1164be611836f6aa697fbf1cb1f1c73a3cd39
3: I7d3556aa0f06684b43f80f09e4c8194c6c44336c

Since these are causing warnings on every build, and there are no more
internal users, just obsolete them entirely. We don't need to rely on
the product shipping api level, since that does not guarantee
source-level compatibility -- and this is an easy fix even if people
have been ignoring the real warnings.

Bug: 235414673
Test: treehugger
Change-Id: If803a33efc38a970247919bf224c12b8c717f955
2022-06-09 09:36:52 -07:00
Cole Faust
ec8316de2e Optionally dump RBC variables at the end of config.mk
config.mk represents essentially the entire product/board
configuration. In order to develop a "quick" rbc regression
test, dump all the make variables at the end of config.mk.

We can then compare these variable dumps instead of ninja
files, because the ninja files take much longer to generate.

Bug: 229132189
Test: Manually
Change-Id: I4e8371be446b7e511aba22dff58530a6d9ff072f
2022-04-13 14:48:32 -07:00
Cole Faust
971ef8ecd6 Fix "posix_spawn: Argument list too long" issue
The shell command was too long when it listed all the make variables.
Dump them to a file instead.

Fixes: 228347189
Test: RBC_BOARD_CONFIG=1 m nothing on aosp_arm64
Change-Id: I325c78810f5efbe87df2c3ffc269ed78db8c3732
2022-04-07 10:19:21 -07:00
Cole Faust
0a746001b8 Exclude deprecated variables from dump-variables-rbc
This is to not show a warning when running the RBC product
config.

Bug: 226622262
Test: Manually
Change-Id: I69265c9d0dd475ada670e26295bdf27dfa407706
2022-03-29 13:49:26 -07:00
Lucas Wei
f57333f7fc Make build support vendor_kernel_boot image
Add vendor_kernel_boot image for vendors whose bootloader support
extra first stage booting kernel modules ramdisks. This benefit
kernel repo to build kernel-artifacts only image without Andorid
artifacts dependency.

Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: If07218b86a7751b3d452a172610af960f5f9ec74
2022-03-16 23:13:19 +08:00
Ramji Jiyani
13a4137929 core & tools: system_dlkm: add dynamic partition
Converts existing static partition support to a
dynamic partition.

Bug: 200082547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ifd6d0c2a04e947b16f8b241e99cca594a1d315ae
2022-01-30 08:43:08 +00:00
Treehugger Robot
ff84a2b45d Merge "Fix RBC incremental builds" 2022-01-27 20:02:35 +00:00
Cole Faust
10105b8157 Fix RBC incremental builds
Kati regenerates its ninja file if an environment variable
that was referenced by the makefiles was changed since the
last run. TRACE_BEGIN_SOONG is a constantly changing variable
that was referenced by dump-variables-rbc, which references
all all-caps variables, with a few exceptions.

Add TRACE_BEGIN_SOONG to that exception list so kati doesn't
rerun every time.

Fixes: 216531048
Test: Manually
Change-Id: I2df65b6f6aa968f132380e3410763d907d9e3e0f
2022-01-26 14:50:09 -08:00
Ramji Jiyani
1065523a5e Add support to build system_dlkm.img
There are 2 choices to build system_dlkm.img for
the system_dlkm partition for Android T launch
devices and must choose one.

1. Use kernel prebuilt system_dlkm.img
   - BOARD_PREBUILT_SYSTEM_DLKM_IMAGE to point image
2. Build from kernel prebuilt system_dlkm_staging
   - PRODUCT_BUILD_SYSTEM_DLKM_IMAGE

Both requires: BOARD_SYSTEM_DLKM_PARTITION_SIZE and
must be 64MB or higher in size (enforced via vts).

Bug: 200082547
Test: TH
Test: atest vts_system_dlkm_partition_test
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I83435123bd8aa3d04ab8a8b650a95fbab0bc49f2
2022-01-21 21:39:15 +00:00
Cole Faust
c7226590e6 Dump soong config variables in dump-variables-rbc
There are some products whose board configurations
use soong_config_get to read the values of soong config
variables that were set in the product configuration.
These variables were being lost, as dump-variables-rbc
was skipping the soong config variables because mk2rbc
couldn't handle converting the raw SOONG_CONFIG_* variables.
To fix that issue, dump-variables-rbc now dumps them as
calls to soong_config_set instead.

Bug: 201700692
Test: m RBC_BOARD_CONFIG=1 nothing on certain products
Change-Id: I91ca8418635a94cf80362cad1729f48854f6bc98
2022-01-12 21:25:02 -08:00
Dan Willemsen
8820840d57 Add basic Darwin+Arm64 support as HOST_CROSS
Soong will use this to turn on universal binary support (X86_64 + Arm64
in the same binary).

Bug: 203607969
Test: m sdk-repo-platform-tools sdk-repo-build-tools on Mac
Change-Id: I04612136a42e85f4add95202ce20e741d9aaa302
2021-12-08 09:26:27 -08:00
Cole Faust
f1f49bb910 Pass input variables to product config
Passing variables via a makefile instead of
rblf_cli / rblf_env allows us to give them correct
types while converting the makefile to starlark,
as opposed to the variables always being strings
when given via rblf_cli / rblf_env.

This also allows us to remove some hand-converted
starlark code.

Bug: 201700692
Test: ./out/soong/rbcrun ./build/make/tests/run.rbc
Change-Id: I58c4f20b29171c14e5ae759beb26a849426f6961
2021-12-02 20:47:31 -08:00
Treehugger Robot
9118768352 Merge "Define $(PRODUCT_OUT) before running the board config" 2021-12-01 01:15:53 +00:00
Cole Faust
52e5d9c776 Define $(PRODUCT_OUT) before running the board config
Certain board configurations reference $(PRODUCT_OUT)
through deferred expansion, which will no longer work
after conversion to starlark.

Bug: 201700692
Test: build/bazel/ci/rbc_regression_test.sh -b yukawa-userdebug
Change-Id: I02055f5c4a05e540c1752d5964d4db4306292c3b
2021-11-30 11:24:33 -08:00
Colin Cross
da166c5ad4 Make SOONG_HOST_OUT an alias for HOST_OUT
Soong now installs to the same directory as Make, point SOONG_HOST_OUT
at HOST_OUT.

Bug: 204136549
Test: m checkbuild
Change-Id: I49bfc0466056d270c8023288a6fe778c3445a900
2021-11-18 16:26:58 -08:00
Martin Stjernholm
743513c830 Document how APEXes are identified in the boot jar variables.
Test: n/a - comment changes only
Bug: 191269918
Change-Id: Ib82ee24be13274051590be5e207883e4fbc9e6ae
2021-07-08 23:24:09 +01:00
Petri Gynther
dc24d88aa9 Rename vendor-ramdisk to vendor_ramdisk
Rename to get consistent ramdisk directory naming in
out/target/product/<name>:
  debug_ramdisk
  ramdisk
  vendor_debug_ramdisk
  vendor_ramdisk

Test: build and inspect out/target/product/<name>
Change-Id: I81d8f2cafe5e1b9024196cd74772b78d4a4aec58
2021-03-03 13:56:48 -08:00
Martin Stjernholm
fa83228660 Move the logic to add jacocoagent in instrumentation builds to make.
This to allow operating on the complete ART_APEX_JARS list from make in
a follow-up CL.

Test: m nothing
Test: m nothing EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
Bug: 180325915
Change-Id: Ic08148edf25738f6f4769e5359a573237a38b0e9
2021-02-17 12:55:49 +00:00
Yifan Hong
4e501b58b8 Merge "Revert "Add modules partition."" 2020-09-16 22:45:54 +00:00
Yifan Hong
c08cbf0f4a Revert "Add modules partition."
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: Iec1d9421bbfeb114fb705f85d910c6def1f211b6
2020-09-15 19:09:26 +00:00
Treehugger Robot
53a80be100 Merge "HOST_CROSS_OS/ARCH can be configured to linux_bionic/arm64" 2020-09-14 03:41:47 +00:00
Yifan Hong
c0f187f5f9 Add modules partition.
Modules partition is a dynamic read-write partition.
- AVB is not enabled on the partition
- OTA is file-based; see follow up CL for details
- No build prop files; in particular, no build fingerprint
- No fs_config
- No notice files; notice files are included in individual APEXes

Test: build on CF
Bug: 163543381

Change-Id: Ie397b9ec61dfd1c158450d050196024604854d4d
2020-09-09 15:00:02 -07:00
Jiyong Park
e80c45f6ac HOST_CROSS_OS/ARCH can be configured to linux_bionic/arm64
Previously, HOST_CROSS_OS/ARCH were fixed to windows/x86. This change
makes the setting configuration and adds the support for new OS/ARCH
combo: linux_bionic/arm64.

linux_bionic is the Linux-based host target that uses Bionic (instead of
glibc) as libc. Previously, it supported only x86_64 and the x86_64
target was NOT configured via Make, but directly via editing
soong.variables file. Now, the support for arm64 is being added in the
Soong side and this change makes it possible to configure the target via
Make.

The new HOST_CROSS_OS/ARCH combo will be used for building the host-side
tools (adb, crosvm, etc.) for running Cuttlefish natively on Linux/ARM
hosts.

Bug: 159685774
Test: HOST_CROSS_OS=linux_bionic HOST_CROSS_ARCH=arm64 m nothing

Change-Id: I6b8ed8f7e26908749bbe778fbdcc34cfbde68179
2020-09-09 17:38:25 +09:00
Jiyong Park
eccc461d00 Fix HOST_CROSS_OUT
Previously, HOST_CROSS_OUT was defined with the assumption that
windows_x86 is the only supported OS/Arch. In preparatio for Linux/ARM
support, HOST_CROSS_OUT is now defined using HOST_CROSS_OS and
HOST_CROSS_ARCH.

Bug: 159685774
Test: m

Change-Id: I0831c2885db37c44af4fd47bab8481bc885b4b7e
2020-08-25 11:01:11 +09:00
Jeongik Cha
d05b57a362 Introduce TARGET_BUILD_UNBUNDLED_IMAGE
- TARGET_BUILD_UNBUNDLED_IMAGE is similar to TARGET_BUILD_APPS, but
its targets are the unbundled partitions instead of apps.
- Rename TARGET_BUILD_APPS_USE_PREBUILT_SDK to TARGET_BUILD_USE_PREBUILT_SDKS
because it is used even without TARGET_BUILD_APPS.
-Instead of TARGET_BUILD_APPS, use TARGET_BUILD_USE_PREBUILT_SDKS
to build java modules with prebuilt sdks, and propagate to Soong.

Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: Ie096212ccbcca0018baae55e106af693b002c9e5
2020-08-03 15:47:09 +09:00
Yifan Hong
f496f1b94f Add odm_dlkm partition.
Test: define odm_dlkm in CF.
Bug: 156020364
Change-Id: I5593d09a1cdf13e651a13e951336555a7475865e
2020-07-16 12:34:29 -07:00
Yifan Hong
cfb917a1c7 Add vendor_dlkm partition.
Test: define vendor_dlkm for CF.
Bug: 156020364

Change-Id: I459059e1c20df7a285a377b8b3bbc8decc60b124
2020-07-13 14:20:56 -07:00
Martin Stjernholm
7a430fd4c8 Introduce TARGET_BUILD_UNBUNDLED.
Setting this flag enables unbundled building, i.e. without support for
building the system image and other platform targets. This
functionality was previously enabled by TARGET_BUILD_APPS, and setting
that still implies TARGET_BUILD_UNBUNDLED.

This helps unbundled builds that aren't apps, e.g. ART runtest builds.
Specifically, with the topic of the child CL
https://r.android.com/1324517 TARGET_BUILD_UNBUNDLED does not imply
disabling dexpreopting, unlike TARGET_BUILD_APPS.

TODO: There may still be app-specific conditions that are incorrectly
controlled by TARGET_BUILD_UNBUNDLED, in particular on the Soong side
through config.UnbundledBuild().

Test: Flash & boot
Test: TH, in particular builds green on ub-launcher3-master
Bug: 157549171
Change-Id: Ic09fc879117ee06cab5444edfc280ed2b52d2870
2020-06-11 01:09:07 +01:00
Dan Willemsen
8447b8116a base_rules.mk optimizations
A few more misc improvements that I found while analyzing the
performance of base_rules.mk.

This brings an aosp-master/aosp_crosshatch-userdebug kati run from 33.3s
to 28.6s

Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: If99c31cc7b5d7133d70eb644c6095f19060b71e5
2020-06-09 09:59:24 -07:00
Victor Chang
ce051d16a4 "Move core-icu4j into i18n APEX" Attempt 2
This reverts commit b72f1e1a8a.
Reland https://r.android.com/1284676

Bug: 138994281
Test: core-icu4j observed in i18n APEX
Change-Id: If773316261fb1f5fb37b56c5233efcc4a434354a
2020-05-05 19:16:30 +01:00
vichang
b72f1e1a8a Revert "Move core-icu4j into i18n APEX"
Revert "Move libpac into i18n APEX"

Revert "Add shared library into i18n APEX and add the required s..."

Revert "Make com_android_i18n namespace visible"

Revert submission 1299494-i18nApex

Reason for revert: Breaking aosp_x86-eng on aosp-master
Reverted Changes:
I30fc3735b:Move ICU from ART APEX to i18n APEX
Icb7e98b5c:Calling @IntraCoreApi from core-icu4j should not c...
Ic7de63fe3:Move core-icu4j into I18n APEX
I65b97bdba:Make com_android_i18n namespace visible
Ia4c83bc15:Move v8 and libpac into i18n APEX
I10e6d4948:Move core-icu4j into i18n APEX
I8d989cad7:Move ICU from ART APEX into i18n APEX
I72216ca12:Move ICU into i18n APEX
Ief9dace85:Add shared library into i18n APEX and add the requ...
I7d97a10ba:Move libpac into i18n APEX
I90fff9c55:Move ICU from ART APEX into i18n APEX

Change-Id: I12a7d609d43620edaf2c5f12711eb3ca3a570d79
2020-05-05 11:11:30 +00:00