Commit graph

3200 commits

Author SHA1 Message Date
Jacky Liu
beb0b6927c Add PRODUCT_EXTRA_OTA_KEYS to add extra ota keys in otacerts.zip
Equivalent to PRODUCT_EXTRA_RECOVERY_KEYS but for A/B OTA.

Bug: 211848136
Test: set PRODUCT_EXTRA_OTA_KEYS and check otacerts.zip
Change-Id: I81e27d12a22b405f6227b09c01ed684dfcede19e
2022-01-05 17:54:40 +08:00
Bowgo Tsai
4f62aa0899 Fix images-for-partitions() for 'init_boot'
Macro images-for-partitions() returns $(INSTALLED_INIT_BOOTIMAGE_TARGET)
for the 'init_boot' partition, which is empty. It should return
$(INSTALLED_INIT_BOOT_IMAGE_TARGET) instead.

Bug: 203698939
Test: `make` without chaining 'init_boot' partition
Change-Id: I387813283dfad7e1b2f762a5fa4065775977caf7
2022-01-04 17:29:03 +08:00
Devin Moore
6363a04e79 Merge changes from topic "init_boot_img"
* changes:
  Update releasetools for new init_boot.img
  Build a new init_boot.img that contains the boot ramdisk
2021-12-22 23:21:17 +00: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
Ramji Jiyani
f9ce357613 Add symlink for system_dlkm modules
Create symlinks for system_dlkm on devices with a
system_dlkm partition:

/system/lib/modules -> /system_dlkm/lib/modules

Bug: 200082547
Test: Manual boot with CF
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I8ddf340425cf92aa234f93f6b31bfd51cfa9c3f3
2021-12-20 19:52:40 +00:00
Treehugger Robot
1f9408b2b2 Merge "Explicitly set EROFS compression parameter" 2021-12-09 00:40:36 +00:00
Treehugger Robot
1295bc5138 Merge "Add missing apksigner dependency" 2021-12-07 11:43:06 +00:00
Kelvin Zhang
37d4929586 Explicitly set EROFS compression parameter
OTA will need to know the compression parameter used to construct EROFS
images. Currently, mkfs.erofs uses lz4hc,9 if the user didn't specify
one. But mkfs's default behavior is subject to change in future
versions. Therefore, explicitly specify the compression parameters so
OTA tooling can properly encode/decode erofs images.

Test: th
Change-Id: Ibbf67502827ee79437b766349be289048e685759
2021-12-01 14:21:24 -08:00
Kelvin Zhang
c06f0627c3 Embed zucchini version info in target_files
external/zucchini/version_info.h contains version info for zucchini
diffing algorithm. OTA tools will use these version info to check for
compatibility and determine if zucchini can be used safely. Owners of
zucchini agreed to keep the format of version_info.h stable so it's
parser friendly.

Bug: 194237829
Test: m dist
Change-Id: If8e37533933b346d3f03adab9263679910ab328c
2021-11-30 12:38:39 -08:00
Yifan Hong
351cd2e489 Merge changes from topic "servicemanager-recovery"
* changes:
  Add servicemanager.recovery to base_vendor.mk.
  Add recovery service_contexts.
2021-11-18 04:39:14 +00:00
Inseob Kim
c1d4512e02 Add missing apksigner dependency
Test: build after removing apksigner
Change-Id: I1ed7f13395bf7d5fe5f06a6bc3280809b5038636
2021-11-15 11:26:57 +09:00
Yifan Hong
276b8c0230 Add recovery service_contexts.
This allows servicemanager to run in recovery.

Test: manual
Bug: 170338625
Change-Id: I60671af0bcaf13fd545b2f286243fee474caace5
2021-11-13 00:28:05 -08:00
Inseob Kim
f69346e0a8 Add fsverity digest manifest
fsverity digest manifest stores a map from files to fsverity digests.
The manifest is installed as a serialized protobuf file, to a signed apk
system/etc/security/fsverity/BuildManifest.apk.

Bug: 193113311
Test: build with PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true
Change-Id: I55fc10400206b8ce0d5f198faea08fe3930b362c
2021-11-11 11:19:44 +00:00
Inseob Kim
9cda397948 Implement fsverity metadata generator
Using fsverity tool, fsverity metadata for specific artifacts in system
mage can be generated. Users can do that by setting a makefile variable
PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA to true.

If set to true, the following artifacts will be signed.

- system/framework/*.jar
- system/framework/oat/<arch>/*.{oat,vdex,art}
- system/etc/boot-image.prof
- system/etc/dirty-image-objects

One fsverity metadata container file per one input file will be
generated in system.img, with a suffix ".fsv_meta". e.g. a container
file for "system/framework/foo.jar" will be
"system/framework/foo.jar.fsv_meta".

Bug: 193113311
Test: build with PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true
Change-Id: Ib70d591a72d23286b5debcb05fbad799dfd79b94
2021-11-11 17:30:19 +09:00
Eric Miao
1d0fd2cb91 Add oatdump and dexdump to dexpreopt_tools.zip
Change-Id: If7615e1da24bcb819f595adb88060b164499a598
2021-11-09 18:53:39 +00:00
Bob Badour
879cfa867d Add macros for non-module license metadata and deps
Gets rid of .meta_module files and instead defers emitting rules until
after all the non-module targets have been processed. Allows direct
dependency on .meta_lic files, which in turn depend on license text
files.

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m reportmissinglicenses

Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
2021-11-03 00:52:25 +00:00
Jooyung Han
8caba5e14e Support custom APEX signing tool
When an APEX specifies its custom signing tool (custom_sign_tool:),
apexkeys.txt contains the info and sign_target_files_apks pass the value
to apex_util.

For now the Virt APEX has its own custom signing tool (sign_virt_apex),
which is added to OTATOOLS.

Bug: 193504286
Test: sign_target_files_apks invokes sign_virt_apex
Change-Id: Iba845723fe3e18f542963324b9c58cd00914c5ba
2021-10-27 16:56:22 +09:00
Yi-Yo Chiang
09f68abca7 Merge "Revert "Renames boot-debug-*.img in GSI targets"" 2021-10-21 07:22:03 +00:00
Yi-Yo Chiang
ffb366ee99 Revert "Renames boot-debug-*.img in GSI targets"
This reverts commit a2a5db4466.

Reason for revert: original change was obsoleted by
  I3161e42b00a93177a1a4cb3b22da2218d294b7a7

Bug: 202129499
Test: Presubmit; change should be noop
Change-Id: Ib7be1ed73dbf08758276666f8ce35ed9cbf18a36
2021-10-18 06:33:51 +00:00
Dan Willemsen
53c98f7f6d Remove sdk-linux-x86.atree as well
I missed this one in my last change.

Bug: 187222815
Change-Id: Ibdbde80fe531d53ce9e89136211bdf85932c058c
2021-10-16 16:49:41 -07:00
Treehugger Robot
7deaa8102e Merge "Remove old build-tools/platform-tools SDK implementation" 2021-10-16 20:20:33 +00:00
Treehugger Robot
d8f17b1fc4 Merge "Add pcluster and deduplication support for erofs images." 2021-10-16 01:56:43 +00:00
Treehugger Robot
093f8dcfc9 Merge "Re-enable disable_sparse properties." 2021-10-15 21:44:14 +00: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
Pierre-Clément Tosi
88cceca4c5 Merge "Introduce BOARD_PVMFWIMAGE_PARTITION_SIZE" 2021-10-15 06:44:04 +00:00
Pierre-Clément Tosi
85da2d3713 Merge "Add pvmfw.img to IMAGES for BUILT_TARGET_FILES_PKG" 2021-10-14 09:11:33 +00:00
Yi-Yo Chiang
5ba458f71d Merge "Cleanup dependencies of debug boot images" 2021-10-13 09:58:23 +00:00
David Anderson
64b351b882 Add pcluster and deduplication support for erofs images.
This adds BOARD_xIMAGE_EROFS_PCLUSTER_SIZE and
BOARD_EROFS_PCLUSTER_SIZE, which set the "pcluster size" of erofs images
for individual images or all erofs images respectively. The pcluster
size affects the maximum size of a physical compressed block.

This also adds BOARD_EROFS_SHARE_DUP_BLOCKS, which turns on chunk
support in EROFS.

Bug: 201685920
Test: manual test
Change-Id: I27ec0899f89890562796dd9fa567fc74182fbefb
2021-10-13 01:03:10 -07:00
David Anderson
5f4aa6c057 Re-enable disable_sparse properties.
This accidentally got omitted in the recent refactoring of
generate-image-prop-dictionary.

Bug: N/A
Test: build, system.img is not sparsed
Change-Id: Ie2e095aff08e937111f5c7ffc06e38e87c2d7d43
2021-10-08 17:21:43 -07:00
Pierre-Clément Tosi
d8248af3c8 Add pvmfw.img to IMAGES for BUILT_TARGET_FILES_PKG
Package the image even if it was built (previously, only the pre-built
version was being included).

Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: Ifb68ad571be78434f815307a5e4939222a28e7b7
2021-10-07 12:18:17 +02:00
Yi-Yo Chiang
9942f4e51e Cleanup dependencies of debug boot images
Remove redundant dependencies and adjust build rule, so that
  ramdisk-debug.img is built iff. boot-debug.img is built
same adjustment for vendor_boot-debug.img, boot-test-harness.img,
vendor_boot-test-harness.img.

Also remove "rsync" build rule in test harness ramdisk.

Bug: 201753847
Test: PRODUCT_BUILD_DEBUG_BOOT_IMAGE=true \
  PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE=false \
  => ramdisk-debug.img is built; vendor_ramdisk-debug.img is not
Test: PRODUCT_BUILD_DEBUG_BOOT_IMAGE=false \
  PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE=true \
  => ramdisk-debug.img is not built; vendor_ramdisk-debug.img is
Test: PRODUCT_BUILD_DEBUG_BOOT_IMAGE=true \
  PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE=true \
  => ramdisk-debug.img is built; so do vendor_ramdisk-debug.img
Change-Id: I33f526bd3c50b9c4010f46e490cab778fcb23371
2021-10-06 16:17:50 +08:00
Pierre-Clément Tosi
ab1d0dc36e Merge changes from topic "default-pvmfw-image" am: b3be181687
Original change: https://android-review.googlesource.com/c/platform/build/+/1832464

Change-Id: I92a002aa926d8d48637e35b26c41ef65026e8eed
2021-10-06 07:43:22 +00:00
Pierre-Clément Tosi
b3be181687 Merge changes from topic "default-pvmfw-image"
* changes:
  Add generic board-agnostic pre-built pvmfw.img
  Add framework for building the pvmfw.img partition
  Stop assuming that pvmfw.img can only be pre-built
2021-10-06 07:25:01 +00:00
Pierre-Clément Tosi
592a3ca91b Introduce BOARD_PVMFWIMAGE_PARTITION_SIZE
Rename the BOARD_PVMFWIMG_PARTITION_SIZE variable to follow the format
used by all other partitions: BOARD_$(name)IMAGE_PARTITION_SIZE. Note
that all boards using that variable should have been updated to also
define the new version, by now.

Define the new variable as board read-only, as done for other
partitions.

Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: I5664c903db6388458e906e996115b695220932ca
2021-10-04 14:20:49 +02: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
Pierre-Clément Tosi
3bda0d6992 Add generic board-agnostic pre-built pvmfw.img
Make use of the pvmfw.img-building AOSP framework to provide a common
default image instead of requiring boards to necessarily provide their
own but allow over-writing it through BOARD_PREBUILT_PVMFWIMAGE, if
desired.

Note: The Android Virtualization Framework requires the pvmfw partition.

Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: I5e06f08d6e22178e45254b7ab63acd3855d99a38
2021-10-04 11:56:56 +02:00
Pierre-Clément Tosi
fa8193c0e9 Add framework for building the pvmfw.img partition
Adapt the variables necessary for building pvmfw.img by following what
was done for other Android partitions and introducing:

 - PRODUCT_BUILD_PVMFW_IMAGE
 - BUILDING_PVMFW_IMAGE
 - BUILT_PVMFWIMAGE_TARGET

Replace the manual 'cp' by the more common 'copy-one-file'.

Bug: 199831815
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img # with TARGET_PKVM_ENABLED=true
Change-Id: I5e4bbcbdbf4b96281ee54631938f097e9744883c
2021-10-04 11:41:34 +02:00
Pierre-Clément Tosi
88648d33c9 Stop assuming that pvmfw.img can only be pre-built
Introduce the BOARD_USES_PVMFWIMAGE variable, similarly to all other
partitions, and use it where appropriate (in particular, where the
soon-to-be incorrect assumption that pvmfw.img could only be a pre-built
board image was made).

Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img # with TARGET_PKVM_ENABLED=true
Change-Id: I8f4faa78c741d29b473303b521834387dbd48cd1
2021-10-04 11:37:19 +02:00
Yi-Yo Chiang
6c51a43bcc Dedup build rules of ramdisk-(debug|test-harness).img
Adjust code location, factor out common code, eliminate dead code.

Bug: 201753847
Test: Presubmit; change is noop
Change-Id: If929bcf92bc03305058d2d8179c8dba351961c8e
2021-10-01 21:45:44 +08: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
Yi-Yo Chiang
dd2fe1f51d Merge "Refactor build logic of boot-debug & vendor_boot-debug" am: 710e74588b
Original change: https://android-review.googlesource.com/c/platform/build/+/1839816

Change-Id: If62de0660fb5f5e5f39ec5ce89384c97e635c9fe
2021-10-01 01:53:00 +00:00
Yi-Yo Chiang
710e74588b Merge "Refactor build logic of boot-debug & vendor_boot-debug" 2021-10-01 01:35:23 +00:00
Yi-Yo Chiang
4d7c613c58 Refactor build logic of boot-debug & vendor_boot-debug
Add PRODUCT variables
  PRODUCT_BUILD_DEBUG_BOOT_IMAGE
  PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE
as toggles to enable/disable building boot-debug & vendor_boot-debug.

Bug: 200945738
Test: m bootimage_debug
Change-Id: Ic032b8594f776f911d7b6345a97d64fed930d890
2021-09-30 18:32:55 +08:00
Treehugger Robot
d995c9e246 Merge "Renames boot-debug-*.img in GSI targets" am: b7aced88d6
Original change: https://android-review.googlesource.com/c/platform/build/+/1833559

Change-Id: I77024efd9f0281e40397bdebfab4160997bb50dc
2021-09-25 03:50:32 +00:00
Treehugger Robot
b7aced88d6 Merge "Renames boot-debug-*.img in GSI targets" 2021-09-25 03:33:40 +00:00
David Anderson
6d3e5ac6e7 Merge "Allow changing the EROFS compressor." am: 684e74ae15
Original change: https://android-review.googlesource.com/c/platform/build/+/1833630

Change-Id: I75fc2f11707825da9acb26138666dc9de77553c2
2021-09-24 19:26:10 +00:00
Bowgo Tsai
a2a5db4466 Renames boot-debug-*.img in GSI targets
Those boot-debug-*.img is used with `repack_bootimg` for a
vendor_boot-debug.img in VTS setup. It is not for GKI boot.img
release.

  https://source.android.com/compatibility/vts/vts-on-gsi#repacking

Renames boot-debug-*.img to boot-with-debug-ramdisk-*.img to
avoid confusion with the official GKI boot.img release.

Bug: 200878300
Test: `lunch gsi_arm64-user` then `make bootimage_debug`
Change-Id: Ia1f6ba847d5b7409fb7a8534432484d2aa972494
2021-09-23 22:19:52 +08:00
David Anderson
40a821f600 Allow changing the EROFS compressor.
This adds BOARD_EROFS_COMPRESSOR to change the compression algorithm
globally, and BOARD_{x}IMAGE_EROFS_COMPRESSOR to change it for
individual partitions.

Bug: N/A
Test: manual test
Change-Id: I2ef831558242a4070ee96269140c33b66c689351
2021-09-22 18:04:27 -07:00
David Anderson
c44602819e Merge "Refactor generate-image-prop-dictionary." am: 4cf8170fed
Original change: https://android-review.googlesource.com/c/platform/build/+/1832960

Change-Id: I002cc8fa262f15cdfb638d4bfd17fd7ff1ae5888
2021-09-23 00:42:32 +00:00
David Anderson
707e6f5ac8 Refactor generate-image-prop-dictionary.
It's really error prone to add new partitions or image flags given the
amount of code duplication here. Since most images have (or should have)
roughly the same flags, this factors the work out into a helper
function.

Bug: N/A
Test: m, m otapackage
Change-Id: If1a22b9d7b5cf028ba52608322c4383792dae6b9
2021-09-22 14:14:44 -07:00