Commit graph

1576 commits

Author SHA1 Message Date
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
Steven Moreland
41792255af Remove PRODUCT_SEPOLICY_SPLIT.
Obsolete.

Bug: 257176017
Test: build&boot
Change-Id: I7ac95f8e55254b7c07ee5e5ba6c18c23a432bfa1
2023-05-31 22:01:16 +00:00
Kelvin Zhang
ef158a9a51 Add a copy of AB OTA partition list prop in vendor partition
The sysprop to enable/disable AB OTA update is in vendor partition,
but the sysprop which stores list of AB partitions is in product(which
is on system side of treble boundary). This is inconsistent and might
cause problems during mixed build. To mitigate, add a copy of AB
partition list prop in vendor, and readers of this prop will prefer the
vendor copy instead.

Bug: 283042235
Test: th
Change-Id: Idd73971817f663b08824e285d840ed8d8dd60d2c
2023-05-24 18:26:27 -07:00
Treehugger Robot
2231df8a54 Merge changes from topic "b/278060169"
* changes:
  Replace touch -a with comment
  BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration
2023-05-23 08:56:48 +00:00
Jeongik Cha
54403316c0 Replace touch -a with comment
Bug: 278060169
Test: m
Change-Id: Ie5ad1b5c6cf335cc3de641fd76a76bfa5f3f79cb
2023-05-23 07:14:51 +09:00
Jeongik Cha
05210f96b3 BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration
* Extract BUILD_NUMBER, BUILD_HOSTNAME to file to avoid kati change
* Handle FILE_NAME_TAG_PLACEHOLDER string in dist in build/make/packaging/distdir.mk

Test: check if kati isn't invoked even though BUILD_NUMBER, BUILD_HOSTNAME
  is changed
Test: m && m, and check if the second m is no-op
Bug: 278060169
Change-Id: I1b37760242853c1a145bad255d0bb15524234b25
Merged-In: I1b37760242853c1a145bad255d0bb15524234b25
2023-05-23 07:14:22 +09:00
Matthew Sedam
d104c386f6 Merge "Fix small spelling error in build/core/main.mk" 2023-05-22 15:45:43 +00:00
Matthew Sedam
fb861d6ba6 Fix small spelling error in build/core/main.mk
Bug: N/A
Change-Id: I858fb4b23a1c85035c59c42d8e3260fd376f941c
Test: N/A
2023-05-19 20:58:16 +00:00
Kelvin Zhang
d8eac1cb9a 16k: Add 16K variant kernel/ramdisk build targets
This adds two new build variables, BOARD_KERNEL_PATH_16K and
BOARD_KERNEL_MODULES_16K . BOARD_KERNEL_PATH_16K will be copied
to output directory as is.

BOARD_KERNEL_MODULES_16K is a list of modules which will be packed into a
ramdisk and added to output dir. This allows cuttlefish to switch to 16K
kernel at runtime without adding too much overhead, as ramdisk building
takes very little time.

Bug: 253827893
Test: m kernel_16k ramdisk_16k

Change-Id: Ibb36ba4c3399b3f193795aea6597a4aa535f1bec
2023-05-19 13:08:52 -07:00
Kelvin Zhang
863cba2c1d Merge "Revert "16k: Add 16K variant kernel/ramdisk build targets"" 2023-05-19 20:05:00 +00:00
Kelvin Zhang
6572bee96b Revert "16k: Add 16K variant kernel/ramdisk build targets"
This reverts commit 1f04dfaba2.

Reason for revert: breaks build on ab/10170403

Change-Id: I92e064ab07b02e4f17a22b113032eaa4d9f131cc
2023-05-19 20:03:19 +00:00
Kelvin Zhang
ab9fb56784 Merge "16k: Add 16K variant kernel/ramdisk build targets" 2023-05-19 00:00:32 +00:00
Kelvin Zhang
1f04dfaba2 16k: Add 16K variant kernel/ramdisk build targets
This adds two new build variables, BOARD_KERNEL_PATH_16K and
BOARD_KERNEL_MODULES_16K . BOARD_KERNEL_PATH_16K will be copied
to output directory as is.

BOARD_KERNEL_MODULES_16K is a list of modules which will be packed into a
ramdisk and added to output dir. This allows cuttlefish to switch to 16K
kernel at runtime without adding too much overhead, as ramdisk building
takes very little time.

Bug: 253827893
Test: m kernel_16k ramdisk_16k
Change-Id: I4e49c727e5ed07a915145897cb987f29b0fe68e2
2023-05-18 20:12:09 +00:00
Wei Li
fd7e6517d3 Some changes to support SBOM generation for b build unbundled APEXs.
1) Use output file path of installed files in build system since there is no PRODUCT_OUT in Bazel
2) Use CONTAINS to describe the relationship between a APEX and files it contains
3) Generate SBOM of APEXs, which is similar to SBOM of products

Bug: 275472038
Test: CIs
Change-Id: I41622366e5e6ed9dc78cca7bc7bb69a1f8f9bd9f
2023-05-11 13:58:37 -07:00
Kalesh Singh
a5530711fb Merge "16k: Add ro.product.cpu.pagesize.max property" 2023-05-01 18:08:11 +00:00
Peiyong Lin
148276b55a Properly define angle.mk
Previously we used USE_ANGLE to determine whether the build should include
ANGLE drivers, this patch consolidates that into a separate Makefile.

Bug: b/270994705
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: I4d7ffb869ced219009446d907230178e4b940157
2023-04-26 22:05:20 +00:00
Yuxin Hu
e872adfc97 Merge "Use ro.gfx.angle.supported to indicate if ANGLE is built in vendor" 2023-04-26 20:03:58 +00:00
Yuxin Hu
dbd7c0472d Use ro.gfx.angle.supported to indicate if ANGLE is built in vendor
Bug: b/270994705
Test: m -j45; flash and check Pixel 7 boots fine
atest CtsAngleIntegrationHostTestCases

Change-Id: I0fb881962ab77abd18f05d33393c4ee11694109c
2023-04-25 18:05:45 +00:00
Kalesh Singh
72222fbec9 16k: Add ro.product.cpu.pagesize.max property
The device's max supported page size is determined by the
build variable TARGET_MAX_PAGE_SIZE_SUPPORTED.

Export this variable as system property for use in tests.

Bug: 277360995
Test: atest -c vendor_elf_alignment_test -s <serial>
Change-Id: I4f33a42de359c8119e55056f9fd9c7147c7058ec
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-04-21 21:04:10 +00:00
Wei Li
0ab788ee83 Merge "Copy SBOM files of unbundled APKs to dist directory." 2023-04-19 16:36:36 +00:00
Wei Li
49af939a23 Copy SBOM files of unbundled APKs to dist directory.
Bug: 266726655
Test: CIs
Test: tapas Browser2 Calendar arm userdebug && m dist
Change-Id: I82328dc4916451a99ad0bf6d7bb945c9b98d0bea
2023-04-18 15:57:34 -07:00
Colin Cross
bc18b00770 Move old installed file cleanup logic below build/make/core/Makefile
build/make/core/Makefile modifies ALL_DEFAULT_INSTALLED_MODULES,
move the cleanup logic below where it is included so that any
additions are covered by the cleanup logic.

Bug: 267014648
Test: manual
Change-Id: If3ab59aa19273fb20f171a3bb74ea1a2c3841585
2023-04-18 11:32:24 -07:00
Florian Mayer
ed97847d9a Merge "Include hwasan lib and runtime on arm64 system images" 2023-04-14 23:27:56 +00:00
Florian Mayer
201eb3b6cc Include hwasan lib and runtime on arm64 system images
This is needed so we can run hwasan-enabled apps for debugging on normal
system images.

Bug: 276930343
Change-Id: Ie572d77307e5e6268b851ea5c96aae05d588dae3
2023-04-13 17:39:25 -07:00
Wei Li
c4d0a61ee3 Copy SBOM files to directory dist/sbom instead of dist/.
There will be more SBOM files for unbundled APEXs/APks, so collect all in sbom/ for scilo ingestion later.

Bug: 266726655
Test: CIs
Test: lunch aosp_cf_x86_64_phone-userdebug && m dist
Change-Id: Iff4f1177df425095cef3c95c7bf4b85c62fa2e8d
2023-04-13 02:12:32 +00:00
Wei Li
ff8e18cf3e Revert "Revert "Copy SBOM to dist directory when running "m dist".""
This reverts commit fd358ae340.

Reason for revert: fixed the issues in aosp/2529028 and aosp/2524438.

Change-Id: Ieb4e6189a9357dafe81f15c72d5603166d9caa4d
2023-04-11 23:43:54 +00:00
Treehugger Robot
4ae1b2e2b1 Merge "Add partition compatibility symlinks to installed file list." 2023-04-07 02:45:45 +00:00
Wei Li
e64367cf29 Add partition compatibility symlinks to installed file list.
Bug: 272358980
Test: CIs
Test: build/soong/tests/sbom_test.sh
Change-Id: If7c6b218a13dccc2cb74358b01dd9d5db52998fc
2023-04-05 11:06:40 -07:00
Wei Li
5bb735bd95 Quote the value of product mfr in case it contains space.
Bug: 277015970
Test: m sbom
Change-Id: Id18d5b60549a12d71f0eda626bb2a539025aafea
2023-04-05 10:24:12 -07:00
Juho Kim
fd358ae340 Revert "Copy SBOM to dist directory when running "m dist"."
This reverts commit bc7868b18e.

Reason for revert: DroidMonitor: Potential culprit for Bug 277015970 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: If7d2d070714d5b58e77488d4e26d4003bfc34f79
2023-04-05 07:10:21 +00:00
Wei Li
bc7868b18e Copy SBOM to dist directory when running "m dist".
Bug: 266726655
Test: Run "m dist" and sbom.spdx.json should be in dist directory.
Test: CIs
Change-Id: Iabd3b980863fcb62dd75b6f778c49447073b9cdf
2023-04-04 00:56:52 +00:00
Wei Li
ec0881e0c3 Filter out installed files of partitions not built for a target product in SBOM generation.
Also collect some information of all prebuilt partition images for later use in SBOM generation.

Bug: 272360068
Test: CIs
Test: build/soong/tests/sbom_test.sh
Change-Id: I82cd93a50e4230123d47feab9a558211c4276425
2023-04-03 20:01:34 +00:00
Treehugger Robot
d67a345f9a Merge "add PRODUCT_SOURCE_ROOT_DIRS product variable" 2023-03-29 17:04:37 +00:00
Treehugger Robot
f0889e28b6 Merge "remove reference to old VTS config" 2023-03-29 02:23:10 +00:00
Sam Delmerico
4c3b83fe70 add PRODUCT_SOURCE_ROOT_DIRS product variable
Change-Id: I31590eb133511a5dbdb8d6fe436cf511d1a160a2
2023-03-27 14:40:50 -04:00
Steven Moreland
aa81ee2a6e remove reference to old VTS config
No longer exists, no longer used.

Bug: 274790216
Test: N/A
Change-Id: Id11921707cd5141235850d88a6d2397e85726532
2023-03-22 21:11:42 +00:00
Spandan Das
0c01c90544 Update hardcoded references to android_*stubs_current
The hardcoded references should be updated to variables exported by
Soong. This enables the stub selection logic to exist in a single place.

Test: TH
Test: No change in out/build-<lunch_product>.ninja

Change-Id: I153f1c6ffc6c93d8a64c3edfef3e8d52c84207a3
2023-03-20 21:59:18 +00:00
Treehugger Robot
d2b9ad4eb4 Merge "Disable riscv64 dependency on bcc and ld.mc" 2023-03-16 19:39:00 +00:00
Wei Li
499333616c Generate SBOM of the target product in file sbom.spdx.json in product out directory.
Original aosp/2374663 was reverted, so this change cnotains the implementation but disabled by default and SBOM will not be built by default with "m dist".

The feature will be enabled later in small CLs after running tests successfully in forrest.

Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: I926d0f97f3a0330ef61d059f12ea660005d370e6
2023-03-14 15:14:06 -07:00