Commit graph

3225 commits

Author SHA1 Message Date
Muhammad Haseeb Ahmad
cced136e8c Add PHONY target to make haiku-java target
This build creates artifacts for java fuzzers for Haiku.

Bug: 213225119
Test: build/soong/soong_ui.bash --make-mode -j86 haiku-java showcommands
dist DIST_DIR="."

Change-Id: I1ec16c39c3cd0ca008acc38bc51a3c3fa2ecdc9f
2022-01-13 19:53:40 +00:00
Treehugger Robot
d36d4d8608 Merge "Generate .fsv_meta for more files" 2022-01-13 01:06:01 +00:00
Treehugger Robot
49c9d1867a Merge "Add TARGET_RECOVERY_FSTAB_GENRULE" 2022-01-12 20:55:38 +00:00
Treehugger Robot
d6bdfb3993 Merge "Remove win_sdk" 2022-01-11 22:25:02 +00:00
Cole Faust
fdc2cd300e Remove win_sdk
win_sdk is deprecated, if given on the command line
sdk will be build instead.

Bug: 212724080
Test: Presubmits
Change-Id: Ib3bd51923142b00100b49585ad88bc1292da2463
2022-01-11 10:31:11 -08:00
Yi-yo Chiang
27a309f627 Merge "Fix init_boot partition AVB signing" 2022-01-11 06:59:47 +00:00
Kelvin Zhang
6877e81467 Embed host liblz4.so in target_files
This file will be used by OTA generator to compress generated patches.
We need the host copy of LZ4 to ensure that compressed bytes matches
what the device would get if the compression were to be done on device.
For more details see go/lz4diff

Bug: 206729162
Test: m dist

Change-Id: I9c4ab772b001bf47da75cb87b028a1f27e2321a8
2022-01-10 12:12:21 -08:00
Jiyong Park
efbb6ffa00 Add min_sdk_version to BuildManifest.apk
sign_target_files_apks demands it.

Bug: 213823227
Test: run com.google.android.tradefed.ota.SigningToolTest#Testcase1_Signingtest
Change-Id: I1bba2b25a71449a57d284024e77fb76d1b79a0ee
2022-01-10 20:14:05 +09:00
Yi-Yo Chiang
33f973fd2a Fix init_boot partition AVB signing
Typo: 'BOARD_AVB_INIT_BOOT_IMAGE_KEY_PATH' ->
  'BOARD_AVB_INIT_BOOT_KEY_PATH'

Record avb_init_boot_* arguments to misc_info.txt

Add INIT_BOOT_SECURITY_PATCH to support per-partition SPL.

Bug: 203698939
Test: avbtool info_image --image init_boot.img
Change-Id: I63e082b1dd675138a6ab5cceb8814b3673d26b13
2022-01-09 16:28:25 +08:00
Yi-Yo Chiang
8193900f87 Change ifneq(,$(A) $(B)) to ifneq(,$(strip $(A) $(B)))
Else the branch condition would always evaluate to true, making the
other branch useless and wrong!

Bug: 211741246
Test: m dist
Change-Id: I4791712632cbe0d5a9e20962c8425dd20bbe0bfd
2022-01-08 15:59:02 +00:00
Victor Hsieh
fb3ef8a59f Generate .fsv_meta for more files
For system/framework, it now also includes *.jar.prof (needed by
odrefresh), *.vdex and <arch>/*.{odex,art} (for future-proof).

system/etc/classpaths/*.pb are also added so that we can run
derive_classpath to collect from.

system/etc/updatable-bcp-packages.txt is removed because it's no longer
used by ART.

Bug: 206869687
Test: see new files in `unzip -p $OUT/system/etc/security/fsverity/ \
      BuildManifest.apk assets/build_manifest.pb`
Change-Id: Id759f5caec8ba683af8629956b9268a4fbd74186
2022-01-07 14:12:11 -08:00
Cole Faust
64c2ddb619 Add TARGET_RECOVERY_FSTAB_GENRULE
This variable can be set instead of TARGET_RECOVERY_FSTAB
in order to specify a generated fstab file.

Bug: 201700692
Test: Presubmits
Change-Id: If0fae81ec53915e9ed4bab2e8b1a9f8376894537
2022-01-07 13:50:54 -08:00
Victor Hsieh
be1029af71 Add missing dependencies of fs-verity manifest APK
Otheriwse, the build complains about missing files when
PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA is enabled (aosp/1937717).

Bug: 206326351
Test: clobber, set PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true, build
Change-Id: I11d18914d63cab0b84ae711f2334747cb26ca234
2022-01-07 11:07:52 -08:00
Yi-yo Chiang
5709c4a93f Merge "Unconditionally copy the system build.prop into target_files archive" 2022-01-07 05:27:35 +00:00
Inseob Kim
135c1f144f Move fsverity metadata generation to Makefile
build_image.py has been handling fsverity metadata generation in the
packing step, but it can cause issues because the metadata files are
missing in the $OUT directory, and they only exist in result system.img.
This change moves the generation logic into Makefile, and makes the
metadata tracked by ninja graph.

Bug: 206326351
Test: PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true and build
Change-Id: I1f910d8ac6e2cc3c54f35916871733c632f18e44
2022-01-07 09:16:42 +09:00
Yi-Yo Chiang
9b2584170e Unconditionally copy the system build.prop into target_files archive
releasetools preconditions requires build metadata defined in
SYSTEM/build.prop even when building a system.img-less product.
Copy the SYSTEM/build.prop into the build artifact archive whenever
possible to make add_img_to_target_files happy.

Bug: 212486689
Bug: 213028932
Test: Dist build a system.img-less product. Product properties are
  read from SYSTEM/build.prop and no build error occurred.
Change-Id: I2ce7f8b8ae981eaf06e2d8d2485b55b4e975caa9
2022-01-07 03:29:14 +08:00
Treehugger Robot
e33e7e518c Merge "Fix build error on empty root folder" 2022-01-06 13:54:27 +00:00
Jacky Liu
bff997fd1f Merge "Add PRODUCT_EXTRA_OTA_KEYS to add extra ota keys in otacerts.zip" 2022-01-06 06:31:37 +00:00
Treehugger Robot
99bec02344 Merge "Calls check-and-set-avb-args() when the system.img exists" 2022-01-06 03:58:08 +00:00
Devin Moore
1c33419ed0 Merge "Add prebuilt init_boot.img to PREBUILT_IMAGES/" 2022-01-05 17:22:17 +00:00
Treehugger Robot
5203f2b1e0 Merge "Remove GKI_SIGNING args from recovery & debug boot image build rules" 2022-01-05 17:00:26 +00:00
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
Yi-Yo Chiang
cd6de3d8bb Remove GKI_SIGNING args from recovery & debug boot image build rules
These options are for certifying official GKI release, so they should
never be added to build command of recovery.img and boot-debug.img.

Also define gki_signing_signature_args in misc_info.txt iff.
BOARD_GKI_SIGNING_KEY_PATH is defined, so there's one less conditional.
We need to define it even if BOARD_GKI_SIGNING_SIGNATURE_ARGS is empty,
so that sign_target_files_apks.py can modify the option during image
signing.

Bug: 210367929
Test: Presubmit
Change-Id: I9546fcda796586d97af244955e15c1b8dc9f6d92
2022-01-05 02:59:45 +00:00
Devin Moore
cda41f0709 Add prebuilt init_boot.img to PREBUILT_IMAGES/
It was incorrectly being added to IMAGES/

Bug: 203698939
Test: m
Change-Id: I3c4ae46388a7f043c7bb22b78795277868422a01
2022-01-05 00:22:55 +00:00
Bowgo Tsai
e691aef7b1 Calls check-and-set-avb-args() when the system.img exists
Some targets, e.g., the newly added `gki_arm64`:
https://r.android.com/1935340, have no system.img.

To avoid the build error when making the vbmeta.img on a no-system-image
target, only sets system.img's AVB settings when it exists,.

Bug: 212486689
Test: `lunch gki_arm64-userdebug; make` with BOARD_AVB_ENABLE := true
Change-Id: I5e3c531e74116e421506a86ffce83848e7a9d6ea
2022-01-04 17:41:01 +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
SzuWei Lin
c230b0b0c9 Fix build error on empty root folder
If a build target does not contain system image, it doesn't
output anything to root folder. The patch fix the build error for
the case the root folder is empty.

Bug: 212486689
Test: make bootimage dist
Test: Build pass
Change-Id: I4f1376eb7e615f48171ed9c3057c5a78074abaa6
2021-12-30 13:48:01 +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