Commit graph

3526 commits

Author SHA1 Message Date
Peter Collingbourne
b327befaae Merge "Make kernel prebuilts writable after copying them." 2023-04-01 00:33:43 +00:00
Dennis Shen
5acfb9c4c6 Create otatools build target with dist
BUG: b/275545565
TEST: m otatools-dist dist
Change-Id: I8484a7927955bf694221937ba778db7065b83eb2
2023-03-30 20:10:17 +00:00
Peter Collingbourne
fd95f097fe Make kernel prebuilts writable after copying them.
Images created by Bazel are read-only, which leads to build failures when
later commands attempt to modify them, as the cp command will also copy
the file permissions. Fix it by using chmod to make the images writable
after copying them.

Change-Id: I8aaa7c4395d38b674f76a7f0ebfa95e1f2da0af0
2023-03-24 16:39:17 -07:00
Wei Li
15187b6f1a Merge "Generate SBOM of the target product in file sbom.spdx.json in product out directory." 2023-03-15 05:20:44 +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
Treehugger Robot
d4248892e6 Merge "add make_erofs to otatools to support erofs apex" 2023-03-14 15:47:05 +00:00
Kevin Han
afb2495f6f Merge "Revert "Generate SBOM of the target product in file sbom.spdx in..."" 2023-03-13 21:03:22 +00:00
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
27d32b0957 Merge "Generate SBOM of the target product in file sbom.spdx in product out directory." 2023-03-13 17:43:59 +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
Wei Li
82308a21a3 Merge "Revert "Generate SBOM of the target product in file sbom.spdx in..."" 2023-03-10 06:40:54 +00:00
Android Culprit Assistant
95c3ea8704 Revert "Generate SBOM of the target product in file sbom.spdx in..."
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/5b65d203-d364-4ade-aabb-1330fe45236a).

Change-Id: I4c7d7645ec0c266eb4d591b3089ba02e78da0659
2023-03-10 06:18:03 +00:00
Wei Li
4e2aed055b Merge "Generate SBOM of the target product in file sbom.spdx in product out directory." 2023-03-10 04:47:47 +00:00
Wei Li
02797aa70e Generate SBOM of the target product in file sbom.spdx in product out directory.
Test: m sbom
Test: m dist
Bug: 266726655
Change-Id: I6464fa2dc416dea62c5cf688c923d6b496f044f5
2023-03-09 15:27:58 -08:00
Jooyung Han
49bf691c65 Remove the old output of conv_linker_config
With 3397b6a2aadf8c2eb808fa38f7d6c07d5c82f320 in build/soong,
conv_linker_config fails when the output exists.

For system/vendor partitions, linker.config.pb files are built by
a custom rule, which is missing the removal of the old output. It would
fail with incremental build.

We could fix this by adding --force to overwrite. But I just added `rm`
following the convention in Makefile.

Bug: n/a
Test: m && (touch input of /vendor/etc/linker.config.pb)
      m (again)
Change-Id: Iaeaf861e90b9535394d94c6b16229a4f566789d5
2023-03-09 16:47:32 +09:00
Dennis Shen
03ef64b134 add make_erofs to otatools to support erofs apex
Change-Id: I272e7a689c563ac0a266e6cd86984fc85a3380b9
2023-03-08 23:49:30 +00:00
Jooyung Han
63975d73b1 Add dependency to /vendor/etc/linker.config.pb
The rule for the file should depend on vendor files. Otherwise, the rule
can be fired before installation of those stub libraries in /vendor/lib.

Bug: 244531518
Test: m (with a vendor lib with stubs)
Test: check /vendor/etc/linker.config.pb (should have the lib)
    $ conv_linker_config print -s $OUT/vendor/etc/linker.config.pb
Change-Id: If7a81e26a7a105234201b10cd58825c67a1d5967
2023-03-07 18:28:18 +09:00
Jooyung Han
8c119032f4 Create vendor/etc/linker.config.pb with STUB_LIBRARIES
system/etc/linker.config.pb is automatically populated with
STUB_LIBRARIES. We do the same for vendor/etc/linker.config.pb.

Bug: 244531518
Test: m vendorimage
Change-Id: If930ca07fcf7c6830b70a0332dae05365b90db12
2023-03-04 08:32:34 +09:00
Bob Badour
df0f55e526 Assert copyright on log contents.
Test: m droid dist
Change-Id: I7266c0cc7c1517482e3aa66f8c7df3a6fbe484fe
2023-03-01 10:34:34 -08:00
Bob Badour
7cc4e334ca BUILT_KERNEL_CONFIGS_FILE built by linux tools
Doesn't qualify as 0p. Use kernel license text.

Test: m droid dist
Change-Id: Ideb88128b3c0f250d4c978291a028b2952b73ba9
2023-03-01 10:16:04 -08:00
Treehugger Robot
fddcbb03a1 Merge "Add zip2zip to dependency of relevant binary targets" 2023-02-22 19:46:32 +00:00
Kelvin Zhang
6d366d36e4 Add zip2zip to dependency of relevant binary targets
Bug: 269735619
Change-Id: I7eb3de066ec17cfcb072b4072997e3bafa83fbcd
2023-02-21 12:49:20 -08:00
Vincent Donnefort
6e861e9cf8 Fix missing dev nodes in init_boot.img ramdisk
Previously ("Add null and console dev nodes to the Android initramfs")
introduced into init_boot.img the /dev/console and /dev/null nodes.
Sadly, it missed changing the release tools which are also generating
images in their own way.

Bug: 254835242
Change-Id: I4d2893ac24c09cf0d117422cbe2bde66083e7118
2023-02-17 10:52:28 +00:00
Treehugger Robot
272d090d39 Merge "Rename otatools dependency from futility to futility-host" 2023-02-16 07:39:05 +00:00
Aaron Kling
e380321735 Rename otatools dependency from futility to futility-host
The futility target for host is futility-host. This is required for
ryu out of tree signing.

Change-Id: I6c06ec69f991abc23597e19dd4478774cc4d56c4
2023-02-15 21:12:23 +00:00
Spandan Das
d3e1b41c33 Merge "Dist api_fingerprint file for droidcore" 2023-02-15 18:06:27 +00:00
Kelvin Zhang
19961b53c4 Copy all files from BOARD_SYSTEM_DLKM_SRC
BOARD_SYSTEM_DLKM_SRC might contain files such as modules.dep. These
files also need to be copied, so relax the globbing pattern to copy all
files under BOARD_SYSTEM_DLKM_SRC.

Test: th
Bug: 267014648
Change-Id: I1fef8f8d7fe01fd4bd99d62981c108d95ef47bfe
2023-02-14 18:23:28 -08:00
Spandan Das
10cd857c3f Dist api_fingerprint file for droidcore
Currently it only gets disted for `sdk`

Bug: 266791853
Test: m dist droidcore, and checked out/dist/api_fingerprint.txt
Change-Id: I098c3890d7290a5f0094fea056cbc8bf1684df11
2023-02-14 21:26:55 +00:00
Treehugger Robot
fa7113c696 Merge "Support BOARD_SYSTEM_DLKM_SRC build config" 2023-02-11 09:25:04 +00:00
Kelvin Zhang
0dbfd70963 Support BOARD_SYSTEM_DLKM_SRC build config
In aosp/2323114 , BOARD_SYSTEM_DLKM_SRC is removed in favor of
BOARD_SYSTEM_KERNEL_MODULES . However, BOARD_SYSTEM_DLKM_SRC preserves
directory structure of input kernel modules, where as
BOARD_SYSTEM_KERNEL_MODULES flattens everything by copying all modules
into the same directory. This causes some issues as vendor_dlkm that
depend on system_dlkm modules now need to update their modules.dep file
due to changes in path. For backward compatibility, add support
for BOARD_SYSTEM_DLKM_SRC .

When both BOARD_SYSTEM_DLKM_SRC and BOARD_SYSTEM_KERNEL_MODULES are
set, BOARD_SYSTEM_KERNEL_MODULES will be preferred. The priority is arbitrary,
but we need a defined ordering to prevent double copying.

Test: th
Bug: 267014648
Change-Id: Ib2f5229af02ea2b7c0d96da70afed9118f484c97
2023-02-10 21:06:53 -08:00
Devin Moore
77ae07dc5b Use the init_boot partition name with avb for prebuilt
When building a target with a prebuilt init_boot image, we still need to
use the correct name for the image.

Test: m
Bug: 268050089
Change-Id: I8fd11d8c17c2c140b7cff1dd8255c8b8728ea196
2023-02-06 17:25:06 +00:00
Treehugger Robot
43cbca31e6 Merge "Add support for packaging modules.load.recovery into vendor_kernel_boot" 2023-01-27 22:55:58 +00:00
Shikha Panwar
44eccdd471 Merge "Include initrd_bootconfig in the list of OTA tools" 2023-01-27 12:11:10 +00:00
Vincent Donnefort
6133aea40f Merge "Add null and console dev nodes to the Android initramfs" 2023-01-26 09:04:33 +00:00
Isaac J. Manjarres
3a7fe9184b Add support for packaging modules.load.recovery into vendor_kernel_boot
Add support for creating a modules.load.recovery file in the
vendor_kernel_boot image when
BOARD_VENDOR_KERNEL_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD is specified.

Bug: 266752750
Change-Id: I430b785c13dca84949da5032e05025385168df07
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
2023-01-25 17:33:18 -08:00
Kelvin Zhang
0841b9076b Fix dependency issues for vbmeta.img target
Extra space in variable names causes dependencies for
INSTALLED_VBMETAIMAGE_TARGET to be missing. Remove extraneous sspaces.

Bug: 263568805
Test: lunch cuttlefish,  m distclean, m, and check
$OUT/vbmeta_vendor_dlkm.img

Change-Id: If818a8af42c407a7213f58a7142dffb9dee1fd16
2023-01-23 11:12:26 -08:00
Baligh Uddin
9170e897d0 Package blkid_static in otatools
BUG: 264426585
Test: TH
Change-Id: Ie34719e98619d18dc35add80595eddd867eaf38f
2023-01-19 18:20:55 +00:00
Cole Faust
bd5eab8477 Remove usages of SOONG_MODULES_CFLAG_ARTIFACTS
No longer used.

Bug: 262629589
Test: m nothing
Change-Id: I3d9acf9fc3e205588161c9fb50fbe757f764d6bb
2023-01-17 15:38:33 -08:00
Treehugger Robot
b80d9d6c33 Merge "Allow vendors to add custom vbmeta partitions" 2023-01-14 00:23:02 +00:00
Shikha Panwar
d3bef475b2 Include initrd_bootconfig in the list of OTA tools
initrd_bootconfig is required for signing the virt apex & hence needs to
run outside the source tree as well.

Test: NA
Bug: 245277660
Change-Id: Id1776661e76a75cfb3cf530e7777dc4292522dd0
2023-01-13 08:28:44 +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
Vincent Donnefort
4a5fd836a1 Add null and console dev nodes to the Android initramfs
/dev/null is a security requirement for bionic, /dev/console is needed
so the kernel can set-up stdout stderr and stdin before running /init.

Bug: 254835242
Change-Id: I865856885e9957ea17e28b62273e701af9bfc56f
2023-01-12 11:25:14 +00:00
Jooyung Han
da2d4a29bf vendor/etc/linker.config.pb from multiple input files
When we have dedicated .mk files for each modules (e.g. usb, drm, etc)
and those modules have their own linker configuration requirements, it
would make more sense to have "fragments" for linker configuration.

This change introduces a new list variable to store the list of linker
configuration fragments. When it's set, vendor/etc/linker.config.pb is
generated from the list of input fragments.

Bug: 264330513
Test: set PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS
Test: m vendorimage (generates vendor/etc/linker.config.pb)
Change-Id: I9eed0f90add0191885b7195efdab94b5b1a4a62d
2023-01-10 11:57:23 +09:00
Jooyung Han
0561be3c26 Merge "checkvintf --check-one with APEXes" 2022-12-20 14:44:29 +00:00
Jooyung Han
c9cc48b412 checkvintf --check-one with APEXes
checkvintf --check-one is to check the consistency of VINTF data in a
single partition. To read VINTF from /vendor partition, it should read
/apex as well to gather VINTF from vendor apexes.

Bug: 262189711
Test: m check-vintf-all
Change-Id: I70b194f4dae47ca6080dcdfb3baa69ac7da9b653
2022-12-16 16:12:29 +09:00
Jiyong Park
e219f0068a Place unstripped pvmfw image to the symbols directory
Bug: 245896220
Test: examine the symbols.zip file on aosp_cheetah
Change-Id: I8730baa64e6ff16fcdf765dc8878771d2ec16be8
2022-12-16 14:30:03 +09:00
Treehugger Robot
8a9dffb96e Merge "Default to not generating modules.dep for system side" 2022-12-08 01:03:07 +00:00
Kelvin Zhang
395d3df406 Default to not generating modules.dep for system side
Test: th
Bug: 149866755
Change-Id: I36c26bed46f43ca8ff7d4afdaf3ee1d7e1c70c3f
2022-12-07 10:36:10 -08:00
Treehugger Robot
3de79b1806 Merge "Fix typo in cross partition dependency generation" 2022-12-07 03:33:42 +00:00
Kelvin Zhang
21b6cade74 Fix typo in cross partition dependency generation
intention was to symlink modules in vendor_dlkm to system_dlkm. Typo
caused the same modules to link itself.

Test: build, make sure vendor_dlkm's modules.dep contains system
dependency

Change-Id: I19664cd9a8578566d3a038885b8ce27556801a79
2022-12-06 16:31:02 -08:00