Commit graph

3364 commits

Author SHA1 Message Date
Pierre-Clément Tosi
4bbb8dd86d Move pvmfw.img to PREBUILT_IMAGES temporarily
Move the image to PREBUILT_IMAGES to avoid breaking release key signing.

Bug: 216975821
Test: -
Change-Id: I686c6fec73a8383c10b17ab2af90767311cbae78
2022-02-01 15:06:26 +01:00
Pierre-Clément Tosi
37aa7e48c2 Rename BUILT_PVMFWIMAGE_TARGET to PREBUILT_...
Avoid the name as it is currently confusing given that we're not
actually building the image.

Bug: 216975821
Test: -
Change-Id: Ifac7047e72f590d6acb3997efa20f5f348e39491
2022-02-01 15:06:19 +01: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
Treehugger Robot
be522dbbfd Merge "Add a version code and version name to fsverity manifest APK" am: 766c5343e2 am: ff606ad9b6 am: 48e67cefd1 am: bf6c2242c0
Original change: https://android-review.googlesource.com/c/platform/build/+/1963641

Change-Id: Idc78b8c7553b47d52b08f20225079bc87181ca1f
2022-01-28 01:11:15 +00:00
Treehugger Robot
766c5343e2 Merge "Add a version code and version name to fsverity manifest APK" 2022-01-27 23:48:24 +00:00
Colin Cross
658172d982 Add a version code and version name to fsverity manifest APK
The post-build signing step expects to find a version code in every
APK, add the version code and version name.

Bug: 216584708
Test: manual
Change-Id: Ic43730df50ef32611d5b4159b46c8bbf9906e009
2022-01-27 12:46:22 -08:00
Treehugger Robot
7de906b12d Merge "core/Makefile: system_dlkm: Copy image for dist" am: 488c598f24 am: e906d8edc0 am: 92fce4ef97 am: f3176ffd3d
Original change: https://android-review.googlesource.com/c/platform/build/+/1958308

Change-Id: Ie378122ca53ed10ce4f74f6f475c8972f4dfad7d
2022-01-25 12:35:51 +00:00
Ramji Jiyani
034e777339 core/Makefile: system_dlkm: Copy image for dist
Add support to copy built system_dlkm to IMAGES;
or prebuilt image to PREBUILD_IMAGES for release
tools to pick up for the dist zip.

Bug: 200082547
Test: Manual builds:
      1. Set BOARD_USES_SYSTEM_DLKM_PARTITION
      2. Set BOARD_PREBUILT_SYSTEM_DLKM_IMAGE to external image
      - Check "m" builds the system_dlkm.img in both cases;
        and drops image at out/target/product/vsoc_x86_64/
      - Check that "m dist" can find the image in
        $(zip_root)/IMAGES and $(zip_root)/PREBUILT_IMAGES
Test: launch_cvd && atest vts_system_dlkm_partition_test
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I77dfcc51746fd97cb205aa9c139a08f5cdf3d9ea
2022-01-24 21:27:52 +00:00
Treehugger Robot
b5d007b2f8 Merge "core/Makefile: system_dlkm: Fix non avb dep typo" am: cf24fc2bf9 am: 5b6d4a2e13 am: 2de0ca59d6 am: b18796f9e5
Original change: https://android-review.googlesource.com/c/platform/build/+/1957899

Change-Id: Ib1394888b769622fe261cee1f41cde7b553c606c
2022-01-23 02:02:10 +00:00
Ramji Jiyani
107c452265 core/Makefile: system_dlkm: Fix non avb dep typo
$(MKFSEROFS) -> $(MKEROFS) in target dependency
for INSTALLED_SYSTEM_DLKM_IMAGE_TARGET in case
when AVB is not enabled.

Bug: 200082547
Test: TH
Test: atest vts_system_dlkm_partition_test
Fixes: 1065523a5e ("Add support to build system_dlkm.img")
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I03a4463b1fa01b95e706d623aa8a3888e37488d6
2022-01-22 20:38:49 +00:00
Ramji Jiyani
4bc5ce9872 Merge "Add support to build system_dlkm.img" am: 1a40ac361e am: f20e06e165 am: 42d87e1cd2 am: 067c1cbbea
Original change: https://android-review.googlesource.com/c/platform/build/+/1955977

Change-Id: Ia27bb4fc997f2a93be2a3254f44a3811c2f1229b
2022-01-22 11:13:38 +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
Yi-yo Chiang
14d0e73497 Merge changes from topic "gki-avb-vts" am: 8b4e2fd6c0 am: b45caeb134 am: f2c62d7ddb am: e3874400a1
Original change: https://android-review.googlesource.com/c/platform/build/+/1941496

Change-Id: I252c986a2e0a15df168a14ac4d31f19f9f0dc19b
2022-01-17 05:51:06 +00:00
Yi-yo Chiang
8b4e2fd6c0 Merge changes from topic "gki-avb-vts"
* changes:
  releasetools: Android T GKI certification scheme
  Android T GKI certification scheme
2022-01-17 04:52:28 +00:00
Muhammad Haseeb Ahmad
6cbc06d649 Merge "Add PHONY target to make haiku-java target" am: d562eb5f1c am: 2e44587697 am: aaa71e0ee6 am: b84ac93aed
Original change: https://android-review.googlesource.com/c/platform/build/+/1948125

Change-Id: I65491f59e2c6976ebf30a63ad036a248c81521e1
2022-01-14 19:36:57 +00:00
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
c697dd3c82 Merge "Generate .fsv_meta for more files" am: d36d4d8608 am: 0f84df6a5e am: bb37d74201 am: 5eb6ea9bf1
Original change: https://android-review.googlesource.com/c/platform/build/+/1941099

Change-Id: I8e03331dcc72045c63796b8a915a2cdb78cb56c5
2022-01-13 02:09:12 +00:00
Treehugger Robot
d36d4d8608 Merge "Generate .fsv_meta for more files" 2022-01-13 01:06:01 +00:00
Treehugger Robot
f935c8b4c2 Merge "Add TARGET_RECOVERY_FSTAB_GENRULE" am: 49c9d1867a am: 4a1fbf832d am: 3c2b365e23 am: a45477cc11
Original change: https://android-review.googlesource.com/c/platform/build/+/1941098

Change-Id: Iefdb3e7fb3bb7b5b10460bceb92b42bb140351b7
2022-01-12 22:09:16 +00:00
Treehugger Robot
49c9d1867a Merge "Add TARGET_RECOVERY_FSTAB_GENRULE" 2022-01-12 20:55:38 +00:00
Treehugger Robot
e165f3e2df Merge "Remove win_sdk" am: d6bdfb3993 am: 9bc76efb0c am: ff5f9c27aa am: ecb58be871
Original change: https://android-review.googlesource.com/c/platform/build/+/1944430

Change-Id: Ica48f449f3fc29d9732c015bcb3ffa1d0f9cd0a1
2022-01-11 23:36:27 +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
c23d3f78ad Merge "Fix init_boot partition AVB signing" am: 27a309f627 am: 85128a7fa0 am: d31e97cc6d am: 3d4a988016
Original change: https://android-review.googlesource.com/c/platform/build/+/1941494

Change-Id: I0f88b613396e0eef971b5c42f7aa5888b31fa9c1
2022-01-11 08:12:12 +00:00
Yi-Yo Chiang
44fb3619d1 Android T GKI certification scheme
New scheme is to certify kernel & ramdisk image separately, and
effectively decouple kernel & user space ramdisk image.

Under the new scheme, the --os_version and --os_patch_level boot header
field must be empty in order to maintain consistency.
Instead, these values must be in the vbmeta hash descriptor and
GKI certificate.

The new scheme also validates the image metadata, including the security
patch level.

The 'generic_kernel' certificate is associated with the 'boot' partition
and 'generic_ramdisk' certificate with 'init_boot' partition.

The 'generic_ramdisk' certificate may be packed into the 'boot' image if
product configuration doesn't have 'init_boot' image, this is only for
testing purposes and would be removed eventually.

Bug: 210367929
Bug: 211741246
Bug: 203698939
Test: unpack_bootimg --boot_img boot.img
Test: unpack_bootimg --boot_img init_boot.img
Test: avbtool info_image --image out/boot_signature
Change-Id: Iaf48a6e3d4b97fa6bfb5e1635a288b045baa248f
2022-01-11 15:14:38 +08:00
Yi-yo Chiang
27a309f627 Merge "Fix init_boot partition AVB signing" 2022-01-11 06:59:47 +00:00
Treehugger Robot
e34de5e509 Merge "Embed host liblz4.so in target_files" am: 21e7285926 am: e3b9f4919e am: 8b1e80dae2 am: 3ff2003a5f
Original change: https://android-review.googlesource.com/c/platform/build/+/1940645

Change-Id: I18c2687f036e57c74a9d2ec375072a016744b597
2022-01-10 23:52:17 +00:00
Victor Hsieh
9e12870560 Merge "Add min_sdk_version to BuildManifest.apk" am: 70ca7c6add am: 30afe79e30 am: 829fe6d623 am: 271ca249c3
Original change: https://android-review.googlesource.com/c/platform/build/+/1941946

Change-Id: I2c5281988a1bc9c14340d207c71275565eff866a
2022-01-10 21:17:34 +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
Treehugger Robot
aa9f3054a1 Merge "Change ifneq(,$(A) $(B)) to ifneq(,$(strip $(A) $(B)))" am: 6a95477b0f am: 4f8d04b603 am: d75823a4bf am: 4d1a91b455
Original change: https://android-review.googlesource.com/c/platform/build/+/1941497

Change-Id: I975fdc387f0eefd898dd0475521c9b43ffdc3e44
2022-01-08 19:17:50 +00: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
Treehugger Robot
17555f1157 Merge "Add missing dependencies of fs-verity manifest APK" am: d541c6c898 am: c10c51039e am: 51d95fc646 am: a96408cb32
Original change: https://android-review.googlesource.com/c/platform/build/+/1941183

Change-Id: Ic75c69859fef81740642f854400456810d34f343
2022-01-07 23:35:25 +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
8c6de6b0ec Merge "Unconditionally copy the system build.prop into target_files archive" am: 5709c4a93f am: 5efc0feefa am: c0db3151ce am: 94e499b4e2
Original change: https://android-review.googlesource.com/c/platform/build/+/1935974

Change-Id: I3e03404ad18edc127daef02d6f11b5b5aef14b92
2022-01-07 06:29:26 +00:00
Yi-yo Chiang
5709c4a93f Merge "Unconditionally copy the system build.prop into target_files archive" 2022-01-07 05:27:35 +00:00
Treehugger Robot
cfbdb4bd4a Merge "Move fsverity metadata generation to Makefile" am: 7c88c9c1e6 am: 2d6411ed06 am: eea503cf81 am: 9c4a78ceae
Original change: https://android-review.googlesource.com/c/platform/build/+/1937129

Change-Id: I8a3b44b5cd20af1089dccd61c041e8cd97638fda
2022-01-07 04:39:34 +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
2a9e4e85c6 Merge "Fix build error on empty root folder" am: e33e7e518c am: 7e2a59a139 am: 49aceda26d am: 2d8e1811af
Original change: https://android-review.googlesource.com/c/platform/build/+/1934213

Change-Id: If3251ca8d42b315eb68a8b5b915f26cb0de86913
2022-01-06 15:09:38 +00:00
Treehugger Robot
e33e7e518c Merge "Fix build error on empty root folder" 2022-01-06 13:54:27 +00:00
Jacky Liu
0e3352a241 Merge "Add PRODUCT_EXTRA_OTA_KEYS to add extra ota keys in otacerts.zip" am: bff997fd1f am: 4f9eb6b9e4 am: 429e1f339b am: 5f1bdb32ae
Original change: https://android-review.googlesource.com/c/platform/build/+/1934214

Change-Id: Ic9e4bdd75e95d6df1595e1371977a532ae830db3
2022-01-06 07:37:19 +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
e2d7185a0f Merge "Calls check-and-set-avb-args() when the system.img exists" am: 99bec02344 am: 7238491c1c am: a0e28118af am: 3f357470d2
Original change: https://android-review.googlesource.com/c/platform/build/+/1934176

Change-Id: I73827e38bf2f3a57affea93ba6c9745d3e5111c3
2022-01-06 05:09:00 +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
8f498f4694 Merge "Add prebuilt init_boot.img to PREBUILT_IMAGES/" am: 1c33419ed0 am: ba7dcae84b am: 92ff95e7a3 am: ddd21ed1da
Original change: https://android-review.googlesource.com/c/platform/build/+/1936571

Change-Id: Ie2ce394f76829451cc812ff62a2477dde4e516cc
2022-01-05 18:23:24 +00:00
Treehugger Robot
7d545aa727 Merge "Remove GKI_SIGNING args from recovery & debug boot image build rules" am: 5203f2b1e0 am: af48f4be53 am: 259deaacd8 am: dca625aed6
Original change: https://android-review.googlesource.com/c/platform/build/+/1934208

Change-Id: I32eeb7971a360c4654d040e5905bfa2959456354
2022-01-05 18:22:47 +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
Treehugger Robot
6d0db50091 Merge "Fix images-for-partitions() for 'init_boot'" am: 8beddf2e7e am: a2b19d4e51 am: 8949fd3676 am: 70ffb1e3ba
Original change: https://android-review.googlesource.com/c/platform/build/+/1934174

Change-Id: I62e9fc05d0fbe769550f68eb40cd5cd4efb9ece5
2022-01-05 02:21:38 +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
5847b680c8 Merge changes from topic "init_boot_img" am: 6363a04e79 am: 1368d81efa am: 2bc48d1025 am: fa9ffed08d
Original change: https://android-review.googlesource.com/c/platform/build/+/1920818

Change-Id: I0f56b8f39335731483ee004bc18a5153518f4423
2021-12-23 00:30:02 +00: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
Treehugger Robot
e99f6af5bf Merge "Add symlink for system_dlkm modules" am: 7dac6abb9a am: e5a33f0723 am: 4aaac8ce5d am: ab01212b4c
Original change: https://android-review.googlesource.com/c/platform/build/+/1906557

Change-Id: I9e98b0c99570c258207f0bfc391a424e4f38b8ca
2021-12-21 02:04:58 +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
f7d376104b Merge "Explicitly set EROFS compression parameter" am: 1f9408b2b2 am: 48b1b7e6f0 am: 89bdc4cc04 am: e64c26e8d4
Original change: https://android-review.googlesource.com/c/platform/build/+/1908390

Change-Id: If799e03bbeaa45c544a7355b78248ff85f60a201
2021-12-09 01:59:59 +00:00
Treehugger Robot
1f9408b2b2 Merge "Explicitly set EROFS compression parameter" 2021-12-09 00:40:36 +00:00
Treehugger Robot
6c14567d08 Merge "Add missing apksigner dependency" am: 1295bc5138 am: 37d01f684d am: e807b0639a am: 2f958913d9
Original change: https://android-review.googlesource.com/c/platform/build/+/1891388

Change-Id: I6d09052a823e2a2e55653b09f40dd4481ae514a0
2021-12-07 13:54:03 +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
Jerome Gaillard
aab6250eaf Merge "Use Android fonts as they are for layoutlib native" 2021-12-01 12:13:39 +00: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
Jerome Gaillard
cf713d429b Use Android fonts as they are for layoutlib native
Layoutlib native can handle fonts as the Android framework does. So
simply copy the Android fonts for layoutlib.

Exempt-From-Owner-Approval: experimental branch
Bug: 143073883
Test: layoutlib tests
Change-Id: Ida2e081d1b0737c70ea8621b23b5f0e729d5df35
Merged-In: Ida2e081d1b0737c70ea8621b23b5f0e729d5df35
2021-11-29 12:50:42 +00:00
Yifan Hong
c59eeaa272 Add recovery service_contexts. am: 276b8c0230
Original change: https://android-review.googlesource.com/c/platform/build/+/1891251

Change-Id: Ic397dc0036431b9bdb90ffbd2ba80f32288e1a6c
2021-11-18 05:01:37 +00: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
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
Treehugger Robot
523cf4e812 Merge "Skip building boot-(test-harness|debug).img if not needed" am: a83a19d41e
Original change: https://android-review.googlesource.com/c/platform/build/+/1823019

Change-Id: I5f65a446198f3d5e6e5218df88473179a73b5f90
2021-09-14 09:43:51 +00:00
Treehugger Robot
a83a19d41e Merge "Skip building boot-(test-harness|debug).img if not needed" 2021-09-14 09:09:56 +00:00
Bowgo Tsai
4bb4d1fb91 Skip building boot-(test-harness|debug).img if not needed
boot-(test-harness|debug).img is not needed for devices with
a /vendor_boot partition. They can use vendor_boot-(test-harness|debug).img
instead.

Bug: 196001476
Test: make then checks $OUT/*.img
Change-Id: If76df0329c96f718ebf0a0ac138cde3ae859a6c6
2021-09-09 19:04:55 +08:00
David Anderson
7700de1d52 Merge "Don't sparse right-sized ext4 and erofs images." am: c01c341b6a
Original change: https://android-review.googlesource.com/c/platform/build/+/1811336

Change-Id: Ia11cb981f28bec05ba4019a3a05126be5059697e
2021-09-08 22:40:41 +00:00
David Anderson
9e95a02a87 Don't sparse right-sized ext4 and erofs images.
When we introduced Dynamic Partitions, we stopped giving readonly
partitions fixed sizes. In addition we introduced deduplication for
ext4. These two factors greatly reduce the impact of sparse images,
since there aren't many fill blocks to optimize.

This patch disables sparsing for images that are rightsized and do not
explicitly specify extra reserved space. This makes the images a little
easier to work with from an engineering perspective. They no longer have
to be unsparsed to interact with any tooling. It also eases a potential
source of bugs, as b/184225422 is not reproducible with sparsing off.

On Pixel, the difference between the sparsed partitions and unsparsed is
12M (out of roughly 4G).

Bug: 198001223
Test: make, treehugger, make target-files-package
      dynamic partitions are no longer sparse images
Change-Id: I74459f8abe74a15a24ba5a40cf701e6af2db8179
2021-09-01 13:12:39 -07:00
David Anderson
36edc7ebb0 Merge "Fix generate-userimage-prop-dictionary getting called unnecessarily." am: d4bea32530
Original change: https://android-review.googlesource.com/c/platform/build/+/1811518

Change-Id: Ica0a92f398c4361cdb231b4d5d10e46d2265de47
2021-08-30 23:28:21 +00:00
David Anderson
d4bea32530 Merge "Fix generate-userimage-prop-dictionary getting called unnecessarily." 2021-08-30 23:17:16 +00:00
David Anderson
17063cfcb0 Fix generate-userimage-prop-dictionary getting called unnecessarily.
odm, odm_dlkm, vendor_dlkm call generate-userimage-prop-dictionary. This
appears to be inadvertent as it pulls in props from all the other
partitions. Instead, call generate-image-prop-dictionary which is
specific to one partition.

Bug: 198001223
Test: builds, treehugger green
Change-Id: Ib177c740068f1c087d517b363649551092038760
2021-08-27 16:50:30 -07:00
Saravana Kannan
d64f3cd203 Merge "Strip recovery kernel modules by default" am: d6dc4a1d3b
Original change: https://android-review.googlesource.com/c/platform/build/+/1803964

Change-Id: I12a5c72343ab1d9d0001135fc50e1fbfe234c17b
2021-08-27 19:49:54 +00:00
Saravana Kannan
d6dc4a1d3b Merge "Strip recovery kernel modules by default" 2021-08-27 19:30:15 +00:00
Treehugger Robot
50663123f6 Merge "Add zucchini to otatools.zip" am: cc303becee
Original change: https://android-review.googlesource.com/c/platform/build/+/1804259

Change-Id: I4f9c2bd8af7c53537e98c5cb343baaff46b75a23
2021-08-23 16:06:42 +00:00
Mark-PK Tsai
8c54396580 Strip recovery kernel modules by default
Strip recovery kernel modules by default which make
recovery.img smaller.
Also, add BOARD_DO_NOT_STRIP_RECOVERY_MODULES to make
it configurable like vendor modules did.

Change-Id: Id4e8c88b91dad38afc1fec5eae83fcb29c825be3
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
2021-08-23 18:04:05 +08:00
Kelvin Zhang
b673bbfbb2 Add zucchini to otatools.zip
Zucchini is a new diffing algorithm we plan to add to Android OTA, add
it to otatools.zip first.

Bug: 194237829
Test: th
Change-Id: I9561101decc2d13afb0a8d4329c3ecc044c96c9d
2021-08-20 10:09:20 -07: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
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
Jose "Pepe" Galmes
3f51d7ec7a Merge "Support for dexopt postprocessing in merge_target_files." am: 81005b13f7 am: 7386f15fbb
Original change: https://android-review.googlesource.com/c/platform/build/+/1774125

Change-Id: Iec6e9339afdd0da153ffe30b5914de8b18614a3c
2021-07-23 05:22:21 +00:00
Jose Galmes
9c8f6eb7e1 Support for dexopt postprocessing in merge_target_files.
When using the VSDK, dexopt is not applied during the vendor build.
To avoid a first-boot time regression, dexopt is applied during the
merge stage, by running dexopt on the vendor apps and rebuilding
the vendor image.

Bug: 188179859
Test: Tested in keystone with VSDK target
Change-Id: Ie8e2d0a82850a2901fa6f250433bcbb43f0a97f2
2021-07-22 13:39:10 -07:00
Yifan Hong
e649ffe283 Merge changes from topic "ota-package-nonab" am: ecef6fa224 am: 271896e081
Original change: https://android-review.googlesource.com/c/platform/build/+/1771589

Change-Id: I5f2d84e38e382ea4598b91a499df58a3c6b668e6
2021-07-20 03:27:20 +00:00
Yifan Hong
ecef6fa224 Merge changes from topic "ota-package-nonab"
* changes:
  Only build OTA package for non-A/B with recovery
  Reland "Build OTA when boot image exists even without kernel or recovery fstab"
2021-07-20 02:59:47 +00:00
Yifan Hong
f32f65c5a4 Only build OTA package for non-A/B with recovery
Change Id397ad097539 alone would break hikey build, which
is a non-A/B device with a boot image, but without recovery.

Do not build OTA in this case.

Test: lunch hikey && m dist
Fixes: 194018054
Bug: 193588301
Change-Id: I8d09ad5c62d44699eb910ff62d32044bd97e8e44
2021-07-19 10:38:25 -07:00
Yifan Hong
8c1e526fdd Reland "Build OTA when boot image exists even without kernel or recovery fstab"
This reverts commit bf77787cc9.

Reason for revert: relanding change

Test: see next CL
Bug: 193925883
Bug: 193588301

Change-Id: Id397ad0975390617bd277573f2cdba9a2677842d
2021-07-19 10:38:25 -07:00
Yifan Hong
8ac71d891a Merge "Revert "Build OTA when boot image exists even without kernel or recovery fstab"" am: fa26e5b8db am: f4494732f5
Original change: https://android-review.googlesource.com/c/platform/build/+/1771586

Change-Id: Ib5e2911aeabe2e923afed202bb688ab63d950882
2021-07-19 17:04:52 +00:00
Yifan Hong
fa26e5b8db Merge "Revert "Build OTA when boot image exists even without kernel or recovery fstab"" 2021-07-19 16:33:26 +00:00
Yifan Hong
bf77787cc9 Revert "Build OTA when boot image exists even without kernel or recovery fstab"
This reverts commit ff2e24d6f9.

Reason for revert: breaks build

Bug: 194018054
Change-Id: Ia7f0436d21dc07143f7fae6f90a73bb4f730e98d
2021-07-19 16:28:49 +00:00
Yifan Hong
49b198c105 Merge changes from topic "ota_for_generic_boot_image" am: d15c78090c am: 035f7a567e
Original change: https://android-review.googlesource.com/c/platform/build/+/1767047

Change-Id: I24d53771844a0eee3dcc2e1cd37ccbb48baa255e
2021-07-16 17:31:03 +00:00
Yifan Hong
ff2e24d6f9 Build OTA when boot image exists even without kernel or recovery fstab
On devices with a prebuilt boot image, TARGET_NO_KERNEL
may be set to enable signing, etc. In this case we still
want to build the OTA package.

Test: m otapackage on a device with generic boot image
      (where TARGET_NO_KERNEL is set)
Bug: 193588301
Change-Id: I4e5adc3f42a516ac0e2f66c313dbe34a469ebe05
2021-07-15 12:57:47 -07:00
Yifan Hong
b1627779fb Also extract kernel configs from boot image.
On devices with prebuilt generic boot image:
  TARGET_NO_KERNEL := true
  BOARD_PREBUILT_BOOTIMAGE is set
In this case, the process for extracting the kernel
config and version must also try extracting from the
prebuilt boot image.

Test: build on device with prebuilt boot image
Fixes: 193588301
Change-Id: I43dd8e206bcd1c9f3f5f51869f126791c50af01a
2021-07-15 12:57:47 -07: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
Treehugger Robot
c5670544e4 Merge "Removing AFTL integration from release tools." am: 389f5afb83 am: 0982fa8193
Original change: https://android-review.googlesource.com/c/platform/build/+/1744213

Change-Id: If916bc3562291268acc82624e8be8a778f3698b7
2021-06-29 15:04:05 +00:00
Jan Monsch
e147d481fe Removing AFTL integration from release tools.
Bug: 158639560
Test: Treehugger
Change-Id: I6949385e3448ad539099966c41ce99f156e3fdc4
2021-06-29 12:38:59 +00:00