Commit graph

1576 commits

Author SHA1 Message Date
Kevin Han
161d711d4d Revert "Generate SBOM of the target product in file sbom.spdx in..."
Revert submission 2481062-sbom

Reason for revert: b/273332655

Reverted changes: /q/submissionid:2481062-sbom

Change-Id: Ie8a73d8dc50592204acd489482e0e9d96ffbd5df
2023-03-13 20:57:37 +00:00
Wei Li
88ac7ae7df Generate SBOM of the target product in file sbom.spdx in product out directory.
Original aosp/2374663 was reverted, try to submit it again with some fixes in this.

Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: Icf305770473f0c448a1ad721cbe7addf737115e4
2023-03-13 17:38:04 +00:00
Colin Cross
a1d6109978 Disable riscv64 dependency on bcc and ld.mc
riscv64 can't build the device version of bcc and ld.mc due to a
dependency on an old version of LLVM, but they are listed in
base_system.mk which can't add them conditionally based on the target
architecture.  Add a hack to base_system.mk to silence the warning
that the host-only modules are listed in PRODUCT_PACKAGES.  This
can be removed once renderscript is removed from the platform.

Test: lunch aosp_riscv64-userdebug && m
Change-Id: I8efd769a34b110dfb838f7016e029369cb9a0f01
2023-02-27 21:12:07 +00:00
Treehugger Robot
e473190d52 Merge "Resubmit: Initial add wvts to build" 2023-01-18 00:17:45 +00:00
Kelvin Zhang
b81b4e3621 Allow vendors to add custom vbmeta partitions
Currently we only have vbmeta_system and vbmeta_vendor. Add
BOARD_AVB_VBMETA_CUSTOM_PARTITIONS , which allows OEMs to define
their own vbmeta_*.img partitions. example: aosp/2381823

Bug: 263568805
Change-Id: Id671e2c3aee9ada90256381cce432927df03169b
2023-01-12 17:34:42 -08:00
Robert Shih
1b73bfbd97 Resubmit: Initial add wvts to build
[ Merge of pa/2264578 ]

Test: make wvts

Bug: 209663123
Change-Id: If1382ed06a93bc34d327ee88bf46ff290e84f786
2023-01-11 00:55:50 +00:00
Robert Shih
57fe3f6041 Revert "Initial add wvts to build"
This reverts commit 588f2e62da.

Reason for revert: b/265032293

Change-Id: I6a9dd24cfef2256288170f5bf59d24604f05d4d2
2023-01-10 18:51:18 +00:00
Robert Shih
588f2e62da Initial add wvts to build
[ Merge of pa/2264578 ]

Test: make wvts

Bug: 209663123
Change-Id: I089fcdfc385e9d01aa275f77a566ffecb5340495
2023-01-08 03:38:11 +00:00
Jiakai Zhang
d6c6e3a9f3 Determine whether to enable userfaultfd GC at build time.
This is determined by:
- a product config flag
- the vendor API level

It is then passed to the device as a system property
"ro.dalvik.vm.enable_uffd_gc".

This change is a no-op change. It doesn't enable userfaultfd GC by
default. OVERRIDE_ENABLE_UFFD_GC=default can be passed to the build
system to enable userfaultfd GC for testing purposes.

Bug: 242553398
Test: -
  1. lunch aosp_redfin-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=default build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "false" in the output
Test: -
  1. lunch aosp_oriole-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=default build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "true" in the output
Test: -
  1. lunch aosp_redfin-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=true build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "true" in the output
Test: -
  1. lunch aosp_oriole-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=false build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "false" in the output
Change-Id: Ifd6e6cddb502315912ff949619a5b526ae0d73ff
2022-11-17 16:33:44 +00:00
Yi-Yo Chiang
06c6273073 Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE
This variable is always false or empty now, so clean up remaining
references of the variable.

Remove "buildvariant=" kernel commandline as it was used by
system-as-root kernels to determine the system build variant. It is
unsupported now.

Bug: 241346584
Test: Presubmit
Change-Id: I0f97b6e0bf8b03429f65366119ff78f9c7983516
2022-10-13 16:08:53 +08:00
Yi-Yo Chiang
70b69de18a Add ro.force.debuggable=0 to ADDITIONAL_SYSTEM_PROPERTIES
This should only be set to '1' by flashing debug boot image,
so default to '0' in system/build.prop.

Bug: 223517900
Test: Boot with and without debug boot image and check value of property
Change-Id: I0e0df7d86a31fd771248433513483e8ad600b5ed
2022-06-10 15:28:31 +08:00
Bob Badour
ba3372439f Create license metadata for copied targets.
Bug: 213388645

Test: m cts dist reportmissinglicenses
Change-Id: I43043e5e7b80d9f3210d6498c215846aec761add
2022-06-02 15:43:08 -07:00
Anton Hansson
55a8f02ea8 Remove unused dependencies from sdk goals
The SDK no longer includes system images, so no longer needs to depend
on targets that are only relevant for the system images.

Remove all the explicit dependencies that end up depending on
"everything" but are not included in the sdk zip.

Two positive side-effects:
- fewer unused things get built (now ~32k targets, down from ~108k)
- apexes no longer get built, eliminating the risk of mismatch between
  module sdk prebuilts and source-built AOSP apexes.

There are some potential risks with this CL:
- because we no longer forcefully rebuild everything, if there are bugs
  in dependencies of exising files in the SDK, incremental builds may
  not rebuild them.
- some files that get built into the SDK may be being built as a
  side-effect of other files included in the SDK, so removing one file
  may cause another to not get built. The solution to that is to add
  the file not getting built to ALL_SDK_FILES.

Bug: 205008975
Test: m sdk sdk_repo dist && diff sdk.zip before/after (identical)
Change-Id: I97284864f66aa88556fbe16864f45b04be97634e
2022-05-12 12:28:49 +00:00
Dan Shi
3e85ca9d4b Allow non-compat suite to locate testcases dir properly
cc_test that can run on hostside are default to be part of
host-unit-tests suite. The suite is set up similar to device-tests and
general-tests, and it's not a compatibility suite. So following variable
will always be empty:
$(COMPATIBILITY_TESTCASES_OUT_host-unit-tests.
It should use HOST_OUT_TESTCASES as testcases dir.

The same logic should be applied to art-host-tests.

Bug: None
Test: build
Change-Id: Ieddacd5157da73c6df473c103be109d9c3a55281
2022-04-28 13:36:36 -07:00
Cole Faust
81f1e92ed8 Remove usages of long-form variables
The long-form variables (PRODUCTS.<makefile>.<variable>)
are used to get information about multiple products.
However, they've never really worked correctly, and so
importing multiple products is deprecated behavior.

Remove as many usages of the long-form variables and
multi-product imports as possible.

Bug: 228518445
Test: Manually
Change-Id: I0b67f16360ff8bdcdb39638de739440472bccf76
2022-04-13 15:49:56 -07:00
Treehugger Robot
ff15a27bd7 Merge "Non-module targets." 2022-04-11 19:42:29 +00:00
Treehugger Robot
7b51e8cbdf Merge changes from topic "colefaust_artifact_path_requirements"
* changes:
  Add artifact path requirement support to Starlark
  Support `m product-graph` in Starlark product config
2022-04-08 17:32:25 +00:00
Bob Badour
3a0f0c157e Non-module targets.
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses

Change-Id: Ia7cddef9748f6c036a2fc7539dad717ebc131f7c
2022-04-07 22:03:29 -07:00
Colin Cross
ac7febc9c7 Revert "Revert "Produce mappings of hashes to elf symbols and r8 dictionaries""
This reverts commit 59ecb9e016.

Reason for revert: symbols_map is fixed to ignore non-elf files

Bug: 218888599
Change-Id: I88654b2dba3dfb9ab2809b0555544277279f345d
2022-04-06 01:11:20 +00:00
Cole Faust
2e8bb7989e Add artifact path requirement support to Starlark
Artifact path requirements requires setting some new variables,
and also dumping the state of the product config variables
after evaluating partial products that set artifact path requirements.

Bug: 188079133
Test: Removed the code that disabled artifacts path requirements from the rbc dashboard script,
      and verified that it was still green for aosp_arm64
Change-Id: I228e35285d788f4c83aa695c0f28b7c7db02544c
2022-04-05 16:53:38 -07:00
Cole Faust
0472730380 Support m product-graph in Starlark product config
Bug: 221312856
Test: Manually
Change-Id: Ia3a78df2de356801c83b1ba5c17601acfc026d06
2022-04-05 16:52:23 -07:00
Colin Cross
59ecb9e016 Revert "Produce mappings of hashes to elf symbols and r8 dictionaries"
This reverts commit 3570b3ed86.

Reason for revert: b/228195288

Bug: 218888599
Change-Id: I17b38ca1b6f8940d682f2782515bfd5f8db1ce58
2022-04-05 17:47:27 +00:00
Colin Cross
3570b3ed86 Produce mappings of hashes to elf symbols and r8 dictionaries
Run the symbols_map tool on each unstripped binary and proguard
dictionary while copying it to produce a textproto that maps the
hash to the symbol/dictionary file location.  Combine the textprotos
into a mapping file when producing the zipped build artifacts.

Bug: 218888599
Test: m dist
Change-Id: I78997e2f3b631ed74213903cc8e72415b2d7eee0
2022-04-04 16:04:52 -07:00
Colin Cross
ce3c48db58 Merge changes I084158ff,I2f2ba905,Ic9af8761
* changes:
  Depend on PRODUCT_COPY_FILES that are not in images
  Remove ALL_ORIGINAL_DYNAMIC_BINARIES
  Remove ALL_GENERATED_SOURCES
2022-03-22 22:24:39 +00:00
Colin Cross
79a76ec581 Depend on PRODUCT_COPY_FILES that are not in images
If0e4b958b3dfaa02771a5da70f970379635f904e made `droidcore` stop
depending on `files` so that installed files from unbuilt images
would not be built.  That also disabled the dependency on installed
files that were not in any image, but the vendor notice file had
overly broad dependencies that caused them to still be built.
Icdb11d3c72b180cd02231e8dc98ae500d6566a98 made the vendor notice
file dependencies less broad, exposing the missing `droidcore`
dependencies.

Track the list of installed device files that are not included in any
image, built or unbuilt, and add them as a dependency for `droidcore`.

Bug: 225187583
Test: m checkbuild
Test: check dependency path to encryptionkey.img
Change-Id: I084158ffb52b353e9a3eca9ad06a68c80d3bd371
2022-03-22 09:25:58 -07:00
Lucas Wei
8842016b30 Merge "Make build support vendor_kernel_boot image" 2022-03-22 13:48:34 +00:00
Bob Badour
7358398647 Fix typo -- no _gz on notice file name.
Test: m nothing reportmissinglicenses
Change-Id: I133950489a17d1bd30a7fb3bc1a96ff6699d475b
2022-03-18 12:12:43 -07:00
Bob Badour
dbb8d7a3d4 Apps-only notice file
Bug: 225050939
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m alllicensemetadata reportmissinglicenses

Change-Id: I5564c59686277398e05bb59b30d548b2ed678eab
2022-03-17 13:55:15 -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
Treehugger Robot
0835ac67b6 Merge "Change how we set ro.product.first_api_level." 2022-02-23 20:49:14 +00:00
Peter Collingbourne
0e3b095886 Change how we set ro.product.first_api_level.
The goal of this change is to cause ro.product.first_api_level to be
set in /system/build.prop in targets with PRODUCT_FULL_TREBLE=false
(which may be the case for targets without the usual set of
hardware interfaces, such as the mini targets being added in
https://r.android.com/1966051).

Setting ro.product.first_api_level is necessary for devices with newer
kernels to boot because it controls which metadata encryption format
is used, and an old format that is incompatible with new kernels is
used by default (see commit 4073c0b5241b635cb59e9e8a75ddcc783b5a99ce in
system/vold). There also appear to be e.g. bionic tests that check this
property. So it seems reasonable to set it even if PRODUCT_FULL_TREBLE
is false.

To begin with, stop adding it to ADDITIONAL_SYSTEM_PROPERTIES. There's
basically no point in adding it there because it will be filtered
out by the property blocklist for the system partition, whether
PRODUCT_FULL_TREBLE is true or false. This lets us remove the
blocklist entry, which causes ro.product.first_api_level to
appear in /system/build.prop via ADDITIONAL_VENDOR_PROPERTIES on
PRODUCT_FULL_TREBLE=false targets.

Bug: 217455793
Change-Id: I8c07baf9d308ea734ffed5d9b1776b60cdbf3435
2022-02-18 20:03:10 -08:00
Cole Faust
900999973e Sort AB_OTA_PARTITIONS
Some product config makefiles are being refactored for
the conversion to Starlark. In order to test that the
refactor doesn't cause any meaningful change, we test
that the ninja files are the same before/after the refactor.
Currently, they have differences in the order of AB_OTA_PARTIONS,
which shouldn't matter. In order to increase our confidence
and make the ninja files more stable, sort AB_OTA_PARTITIONS
before it's used.

Bug: 220169197
Test: Presubmits
Change-Id: I6a9f9f2990406d810577cf8930416925f2987311
2022-02-17 11:35:27 -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
Devin Moore
4724f77bca Merge "Fix initbootimage .PHONY target" 2022-01-24 15:17:17 +00:00
Nicolas Geoffray
7d0f8dd332 Merge "Revert "Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing."" 2022-01-24 13:59:48 +00: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
Devin Moore
35b69f698d Fix initbootimage .PHONY target
This was assigning the INSTALLED_INIT_BOOT_IMAGE_TARGET to bootimage
instead of initbootimage.

Test: m
Bug: 203698939
Change-Id: I5fc6e2296dac8cc35c4d46601fea6ab0ee18fd18
2022-01-20 15:26:47 +00:00
Nicolas Geoffray
4ff406c4a1 Revert "Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing."
This reverts commit 50930076a2.

Bug: 214049018

Reason for revert: Not needed after all.

Change-Id: Ifbf3053fd70c5880e58136821a2fb8b783c48e2a
2022-01-19 16:22:07 +00:00
Nicolas Geoffray
00a48b3df7 Merge "Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing." 2022-01-17 12:23:19 +00:00
Nicolas Geoffray
50930076a2 Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing.
Keep the property for now to keep the ability to toggle on/off the
library we want. If we want to remove this functionality,
we need to cleanup all references to persist.sys.dalvik.vm.lib.2.

Test: build and boot with debug apex
Bug: 214049018
Change-Id: I66c7eb510f5a8b7974391ceafd309fba59a524a1
2022-01-14 16:07:07 +00:00
Yi-Yo Chiang
f282f5521d Add boot*.img to default dist target if PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST
Right now if PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST is given,
  $ m dist bootimage
would copy boot*.img to the dist dir.

After this change, both
  $ m dist  # droidcore
  $ m dist bootimage
would copy boot*.img to the dist dir, the difference is that the latter
builds & copies *only* the boot images.

Bug: 212486689
Test: m dist bootimage
Test: m dist => boot*.img are copied to dist dir
Change-Id: I1c714ce5d75eba93e32078b1ac291a181b05405a
2022-01-11 17:31:16 +08:00
Devin Moore
380d9e445c Build a new init_boot.img that contains the boot ramdisk
This ramdisk used to be in boot.img, and is now placed into this new
init_boot.img instead.
This new image is used for a new init parition to seperate Android
platform artifacts from the kernel artifacts in boot.img.

Test: boot Cuttlefish
Bug: 203698939

Change-Id: Iaaf82486259979ab728730ce72a4e847ae005c18
2021-12-20 20:54:14 +00:00
Cole Faust
985fa48a98 Make starlark board configuration work with sdk_phone_x86_64
The main issue with board configuration up till this
cl was that it didn't have access to the product configuration
variables. Pass those in by dumping the make variables to a
temporary file, which is then converted to RBC, loaded,
and passed to the starlark board config..

Bug: 201700692
Test: build/bazel/ci/rbc_product_config.sh -pb sdk_phone_x86_64-userdebug
Change-Id: I9a4946b970ca43c5b5f53a6c507ad2c1a2eca61e
2021-11-04 16:13:24 -07:00
Colin Cross
23ee375a4a Support generating install rules in Soong
Support moving some install rules into Soong by allowing Soong to
provide a Makefile containing install rules, and by skipping parts
of base_rules.mk when Soong already created an install rule.

The install rules are exported as a Makefile instead of directly
in Soong's build.ninja file so that base_rules.mk can add dependencies
from the `required` property that are hard to resolve in Soong.

Bug: 204136549
Test: m checkbuild
Change-Id: Ife2964d76469b385e90c0c5f6adf21bd2b5e8bf6
2021-10-29 15:43:39 -07:00
Dan Willemsen
349dc07933 Shrink Mac builds
Device builds are no longer supported on Mac, but we do support building
various host tools, including the SDK build-tools and platform-tools
packages. All of these are defined in Soong now, so we stop reading all
the Android.mk files, and defining and depending on the device output
targets.

Bug: 187222815
Test: `m`, `m dist`, etc on Mac
Change-Id: Ibb19756d44f2cbc6948381043115718ffc3f4b7d
2021-10-17 00:28:39 -07:00
Dan Willemsen
39b81cdc7a Remove old build-tools/platform-tools SDK implementation
Since those were the only components of the Windows SDK, this removes a
lot of special casing around that as well.

Bug: 187222815
Change-Id: I2690aadcf78e9ccad43314c8475893e81a2e2735
2021-10-15 14:22:07 -07:00
Yi-Yo Chiang
f93950ae53 Merge changes If929bcf9,I9fb5c7fc am: 747a0c12eb
Original change: https://android-review.googlesource.com/c/platform/build/+/1842716

Change-Id: I0f9bc530c3e2e83b14efcad778870bc0d7795888
2021-10-04 10:00:49 +00:00
Yi-Yo Chiang
747a0c12eb Merge changes If929bcf9,I9fb5c7fc
* changes:
  Dedup build rules of ramdisk-(debug|test-harness).img
  Build vendor_ramdisk[-debug].img if building vendor_boot.img
2021-10-04 09:50:36 +00:00
Howard Chen
8a59680b4f Merge "Make GSI target to export bootimage to DIST" am: c1b9c1d801
Original change: https://android-review.googlesource.com/c/platform/build/+/1839815

Change-Id: Ibac747f40c9a961fbe692f511b2edfef11f07247
2021-10-04 06:59:55 +00:00
Howard Chen
c1b9c1d801 Merge "Make GSI target to export bootimage to DIST" 2021-10-04 06:36:32 +00:00
Yi-Yo Chiang
870ea163c2 Build vendor_ramdisk[-debug].img if building vendor_boot.img
Make vendor_boot.img / vendor_ramdisk.img symmetrical to boot.img /
ramdisk.img.

Bug: 201753847
Test: Build and check vendor_ramdisk[-debug].img
Change-Id: I9fb5c7fca09a77446bd140ca549c2091fc9c6a40
2021-10-01 21:45:34 +08:00
Ulyana Trafimovich
e6a4320cb0 Merge "Remove unused variable SKIP_BOOT_JARS_CHECK." am: 85ed8ef84f
Original change: https://android-review.googlesource.com/c/platform/build/+/1841575

Change-Id: Id9dfc110111e09a3d82d0ae6f76ce943431b8bb6
2021-10-01 07:34:20 +00:00
Ulya Trafimovich
ddec79ce54 Remove unused variable SKIP_BOOT_JARS_CHECK.
The variable is no longer used after https://r.android.com/1737753.

Bug: 189298093
Test: m
Change-Id: I6bcb6735189429551ebca697441f2a1edb5c4dfa
2021-09-30 14:00:34 +01:00
Howard Chen
95339b0d91 Make GSI target to export bootimage to DIST
This is to support a bootimage only target in AB.

Bug: 198363484
Test: lunch aosp_arm64-userdebug; make bootimage dist

Change-Id: I9a32c365f635ec4693675a1969d7a1e684c8f55a
2021-09-30 07:10:05 +00:00
Treehugger Robot
d656f50618 Merge "Stop disting monolithic SDK for Mac SDK builds" am: 1646ba0814
Original change: https://android-review.googlesource.com/c/platform/build/+/1829032

Change-Id: I2bda18219770a634add3716a3de215b8fc41cba6
2021-09-17 06:08:53 +00:00
Dan Willemsen
616e7fd9b6 Stop disting monolithic SDK for Mac SDK builds
The Mac SDK build is being reduced to just the build-tools and
platform-tools packages. I'm still working on refactoring those builds
not to require the monolithic SDK to be built first, but we can at least
stop distributing it (and other related files) now.

Most of these checks can likely go away once the build refactor is
complete, since we'll be able to move away from the `sdk` target to
something more specific. Right now there's a lot of logic around sdk
being in MAKECMDGOALS that I don't want to unravel with the current
build logic.

Bug: 187222815
Change-Id: I1f711ce063170e41078ad4a125bcd77340a1746c
2021-09-16 14:54:38 -07:00
Lukács T. Berki
0dae6f9daa Merge "Remove soong_docs from droidcore." am: f999a9d145
Original change: https://android-review.googlesource.com/c/platform/build/+/1818099

Change-Id: I28685ea07309b5ffebb44bc62149bef8b4dd3d20
2021-09-08 13:39:20 +00:00
Lukacs T. Berki
043f3a1897 Remove soong_docs from droidcore.
soong_docs will be run directly from soong_ui so it won't have a
corresponding Make target.

Test: Presubmits.
Change-Id: Id7abccdf2ea3830edf6043c10b617bddf4f9c86d
2021-09-08 08:24:33 +02:00
Sophie Zheng
a44660f3a6 Merge "API coverage Copy generated API list during building cc_library to cc_apis/" am: 8f863178da
Original change: https://android-review.googlesource.com/c/platform/build/+/1798348

Change-Id: I3cafb348553174a01cb9fc796d7138d30f5943a9
2021-08-25 21:58:02 +00:00
Sophie Zheng
8f863178da Merge "API coverage Copy generated API list during building cc_library to cc_apis/" 2021-08-25 21:42:44 +00:00
sophiez
c2ae0e5bbb API coverage
Copy generated API list during building cc_library to cc_apis/

Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist DIST_DIR=/usr/local/google/home/sophiez/my_dist_dir EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true SKIP_BOOT_JARS_CHECK=true

Change-Id: I05e6b7b9c9bbbab72718fd926ddda468bde05565
2021-08-17 14:59:36 -07:00
Spandan Das
fddb39414a Merge "Remove MODULE_BUILD_FROM_SOURCE=true for coverage builds" am: 9c1806331d am: 91a0bf995c
Original change: https://android-review.googlesource.com/c/platform/build/+/1788549

Change-Id: I2029ac5a55b5a24770b5974ab1087e5cd15b71d7
2021-08-10 23:11:04 +00:00
Spandan Das
9c1806331d Merge "Remove MODULE_BUILD_FROM_SOURCE=true for coverage builds" 2021-08-10 22:35:42 +00:00
Alexander Smundak
0db8f12015 Merge changes I0ecafa41,Ic6173a96 am: 420a93155a am: 9edaddf6ad
Original change: https://android-review.googlesource.com/c/platform/build/+/1786890

Change-Id: Ie26afa42c3db28fed546b2c51a58b3d696e55c14
2021-08-06 02:30:02 +00:00
Spandan Das
289fb6cad0 Remove MODULE_BUILD_FROM_SOURCE=true for coverage builds
This flag will be selectively added to build targets if necessary

Bug: 193569756
Test: m nothing
Change-Id: Ie0fd898b03aa91322dddd9137b038031d46c8d24
2021-08-06 02:25:04 +00:00
Sasha Smundak
8d97bf5327 Integrate Starlark-based configuration runner
If RBC_PRODUCT_CONFIG variable is set, obtain product configuration
variables by converting product configuration makefiles to Starlark
files and then executing them.
Also, introduce RBC_NO_PRODUCT_GRAPH variable to suppress product graph
generation. We cannot generate product graph with Starlark, so this
option allows to verify that the rest of the contents of the generated
Ninja files remains the same when Starlark-based converter is used.
This allows to perform the regression testing, i.e. running
`RBC_NO_PRODUCT_GRAPH=t DISABLE_ARTIFACT_PATH_REQUIREMENTS=t m nothing`
and
`RBC_PRODUCT_CONFIG=t m nothing`
should generate identical *.ninja files.

Bug: 181797530
Test: Manual
Change-Id: Ic6173a9640f32766b71c02a2b1833ce7a278e4cc
2021-08-04 17:15:16 -07:00
Mathew Inwood
ab6e72bd00 Merge "Fix typo." am: 0361b625f2 am: c84ab4d0e8
Original change: https://android-review.googlesource.com/c/platform/build/+/1784570

Change-Id: I6d6792534e7e514d68816b524187cbb005c0a7a0
2021-08-03 10:09:57 +00:00
Mathew Inwood
0361b625f2 Merge "Fix typo." 2021-08-03 09:27:41 +00:00
Bowgo Tsai
5c2a544516 Merge "Adding vendor_boot-test-harness.img" am: 23ae3dcbe1 am: 82a45ea4a0
Original change: https://android-review.googlesource.com/c/platform/build/+/1782047

Change-Id: I377125c9184bf2947c4f592f9395efb66864a85e
2021-08-03 06:34:25 +00:00
Bowgo Tsai
23ae3dcbe1 Merge "Adding vendor_boot-test-harness.img" 2021-08-03 06:07:13 +00:00
Mathew Inwood
87c4655f07 Fix typo.
Test: m

Change-Id: I6a85ea59bb6d6babd6979de22a944e8751ea287f
2021-08-02 15:00:10 +01:00
Mathew Inwood
945184174c Don't use mainline prebuilts for coverage builds.
Test: TH
Bug: 192556458
Bug: 159241638
Merged-In: Id29e273c1df1fa27a038ebdcff1a17acca58bd46
Change-Id: Id29e273c1df1fa27a038ebdcff1a17acca58bd46
2021-08-02 13:25:03 +01:00
Alexander Smundak
ba28f07d46 Merge changes I129136e8,I278bd8ed,I1d22ed6f am: 510c0014d5 am: bd4362926e
Original change: https://android-review.googlesource.com/c/platform/build/+/1781014

Change-Id: I96d9919f4b65a548b57d2bc8eee38d2fd02baa73
2021-07-30 02:35:20 +00:00
Bowgo Tsai
87f60017b9 Adding vendor_boot-test-harness.img
boot-test-harness.img is used to allow adb root on user build
images. It also sets properties: ro.audio.silent=1 & ro.test_harness=1.

GKI 2.0 devices will use BOARD_PREBUILT_BOOTIMAGE so
boot-test-harness.img will not be generated.

Therefore, we have to introduce the vendor_boot-test-harness.img
as an alternative for boot-test-harness.img.

In the future, we'll simplify the flow as:
  + If a device has a /vendor_boot partition, builds
    vendor_boot-(test-harness|debug).img.
  + Otherwise, builds boot-(test-harness|debug).img.

boot-(test-harness|debug).img needs to be kept for some clients
to gracefully transit to using vendor_boot-(test-harness|debug).img.

Bug: 194654549
Test: make then `unpack_bootimg --boot_img $OUT/vendor_boot-test-harness.img`
Test: Check the ramdisk content in ./out/vendor_ramdisk

Change-Id: If3a1393b4ff3e69bb9b62f3b843b7858437d47bf
2021-07-30 00:54:47 +00:00
Sasha Smundak
0e4a5ad24b Trim spaces in the rule actions
When rule action contains something like
  cp $(FOO) ...
and FOO is set with
FOO := a \
 b \

the generated Ninja file constains extra spaces, making it
difficult to compare it to the same file generated by the
Starlark-based product configuration.

Bug: 181797530
Test: manual
Change-Id: I278bd8edf0f017a31c5b5115b2a38f4f663c55fc
2021-07-29 10:57:06 -07:00
TreeHugger Robot
18eac2c301 Merge "Don't use mainline prebuilts for coverage builds." into sc-dev am: d932280147
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/15358466

Change-Id: If8a86300a70199380b8bf2885eeac909480e743d
2021-07-22 17:21:47 +00:00
Mathew Inwood
31167aeaf4 Don't use mainline prebuilts for coverage builds.
Test: TH
Bug: 192556458
Bug: 159241638
Change-Id: Id29e273c1df1fa27a038ebdcff1a17acca58bd46
2021-07-22 12:10:57 +01:00
Treehugger Robot
d622e08647 Merge "dexpreopt.config should be created even though unbundled image is built" am: e01cfe4896 am: 10b90baa51
Original change: https://android-review.googlesource.com/c/platform/build/+/1730113

Change-Id: I54f082381d01c57d5fed3be25fdf764ff58431ce
2021-07-15 09:28:41 +00:00
Jeongik Cha
b26bf58e12 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027
2021-07-14 18:52:01 +09:00
Bill Peckham
87ae77f7ef Merge "Break dependency from droid_targets to blueprint_tools" am: 61de59bc36 am: a897b876e7
Original change: https://android-review.googlesource.com/c/platform/build/+/1754798

Change-Id: I313be134662bf05da0efe835681ca3c32ff6112d
2021-07-07 20:39:51 +00:00
Bill Peckham
cc2961f54a Break dependency from droid_targets to blueprint_tools
But only for a TARGET_BUILD_UNBUNDLED_IMAGE build. Since
the unbundled image build attempts to remove as many
framework sources as possible, we'd like to remove the
sources and dependencies of some blueprint_tools as
well.

Test: m nothing dist
Test: Verify graph is unchanged
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: Verify that graph no longer includes blueprint_tools
Bug: 192629969
Change-Id: Ibfb52b841379e20855d0a935a13ad047af2fe58d
2021-07-02 13:13:10 -07:00
TreeHugger Robot
ae53a41a1f Merge changes Ie63d08ac,Ia7f8200c into sc-dev am: c66099dcc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/15008279

Change-Id: I99e71fbfc149099a7e2bcdd9b71a7281960f5310
2021-06-17 15:18:21 +00:00
TreeHugger Robot
c66099dcc6 Merge changes Ie63d08ac,Ia7f8200c into sc-dev
* changes:
  Fix typo in droidcore-unbundled.
  Introduce droidcore-unbundled target
2021-06-17 15:01:07 +00:00
Bill Peckham
315b98a73a Introduce droidcore-unbundled target
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.

Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
(cherry picked from commit 0a30cc41bc)
2021-06-16 19:54:07 +00:00
Bill Peckham
16da01fe20 Introduce droidcore-unbundled target
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.

Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Merged-In: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
2021-06-16 09:10:07 -07:00
Kelvin Zhang
9b55885314 Add ro.vendor.build.dont_use_vabc to disable VABC OTA
This prop is owned by OEM, OEM can set this if they want to disable
VABC.

Test: m dist, make sure generated OTA has VABC disabled
Bug: 185400304

Change-Id: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
Merged-In: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
2021-06-14 15:38:37 -07:00
Treehugger Robot
6b0f56a5fc Merge "Add ro.vendor.build.dont_use_vabc to disable VABC OTA" am: c09cda8c6c am: 61a1d6d7a3
Original change: https://android-review.googlesource.com/c/platform/build/+/1734412

Change-Id: I0cdfa2823cc075dce0fe75df2a36c1731ea15155
2021-06-14 19:13:17 +00:00
Kelvin Zhang
10eac08fe1 Add ro.vendor.build.dont_use_vabc to disable VABC OTA
This prop is owned by OEM, OEM can set this if they want to disable
VABC.

Test: m dist, make sure generated OTA has VABC disabled
Bug: 185400304

Change-Id: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
2021-06-14 10:23:14 -04:00
Tianjie Xu
8108eed6d0 Merge "Enable a prop to determine the new figerprint is enabled" am: 5260f435a3 am: d34ac59c5a
Original change: https://android-review.googlesource.com/c/platform/build/+/1716976

Change-Id: I894e32aefa3e83f287a59c5c81fa4e11e7eff140
2021-06-01 05:08:17 +00:00
Tianjie
c3b841a422 Enable a prop to determine the new figerprint is enabled
VTS and some other tests would replace the system images with GSI. To
put the correct fingerprint in the test report, we need to know if the
new fingerprint format is in use. So, add a vendor build prop.

OEMs are reponsible for setting this build prop, or using other ways
to put the correct fingerprint in the test report.

Bug: 188824341
Test: boot the device, check build prop
Change-Id: I6bc7f01903865fc2c256d209debdab68cd9d1bb3
2021-05-26 11:19:45 -07:00
Treehugger Robot
fdca5d9faa Merge "Target for tools to dexpreopt" am: 26bad544c5 am: ee88da65f5 am: 4beb444294
Original change: https://android-review.googlesource.com/c/platform/build/+/1688306

Change-Id: I91c8fd16af6707d159b448668082fed25d215531
2021-05-13 01:27:10 +00:00
Jeongik Cha
2522c36b4c Target for tools to dexpreopt
Bug: 158843648
Test: m droidcore
Change-Id: I580e2b3285cc524234859998a0e4e072ecaef072
2021-05-12 23:28:49 +09:00
Treehugger Robot
c572c6dc7a Merge "Store dexpreopt.config files to dexpreopt_config.zip" am: 6edaa353b1 am: 543f6750c9 am: 0a1e0a5914
Original change: https://android-review.googlesource.com/c/platform/build/+/1666808

Change-Id: Ic836d95701bab97c0f9b579e03724b4a10a80545
2021-04-23 08:10:51 +00:00
Treehugger Robot
6edaa353b1 Merge "Store dexpreopt.config files to dexpreopt_config.zip" 2021-04-23 06:47:57 +00:00
Jeongik Cha
a8056d6cb9 Store dexpreopt.config files to dexpreopt_config.zip
To dexpreopt in post processing, store config files for dexpreopt

Bug: 158843648
Test: m dist and check dexpreopt_config.zip
Change-Id: I5c63a5ffc10023994b14e3a63f50defb9194739f
2021-04-23 01:01:31 +00:00
Treehugger Robot
9c612a36eb Merge "Test changes for build support for test jni_libs" am: f3162034ef am: bcc08a2454 am: ab9ffa8fed
Original change: https://android-review.googlesource.com/c/platform/build/+/1680149

Change-Id: Idda39045f8a58b6abe55b09e2ca934643b4603af
2021-04-20 13:47:58 +00:00
Treehugger Robot
f3162034ef Merge "Test changes for build support for test jni_libs" 2021-04-20 12:26:30 +00:00
Treehugger Robot
e52d2e5dbd Merge "Rename ro.product.enforce_debugfs_restrictions" am: 228ef5f05f am: a74fbc00a0 am: 16a42ccf08
Original change: https://android-review.googlesource.com/c/platform/build/+/1676369

Change-Id: I7df1d7b81485aea822a8fdb5bc7adb78bb73ccc9
2021-04-20 07:29:53 +00:00
Daniel Cardenas
68984aa93a Test changes for build support for test jni_libs
Tested with patches:  aosp/1560314  aosp/1560314/

Bug: 176593487
Test: make tvts aapt
Change-Id: I2a2867726cc39758dfb27a0a12867e20e4af56d7
2021-04-19 20:48:02 -07:00
Hridya Valsaraju
31b2e3e388 Rename ro.product.enforce_debugfs_restrictions
Rename ro.product.enforce_debugfs_restrictions appropriately to
ro.product.debugfs_restrictions.enabled as per the sysprop naming
scheme.

Test: build, boot
Bug: 184381659
Change-Id: I65265098caf6382583aa53811f1b3330e58141c0
2021-04-19 17:41:25 +00:00