Commit graph

3526 commits

Author SHA1 Message Date
Colin Cross
79a76ec581 Depend on PRODUCT_COPY_FILES that are not in images
If0e4b958b3dfaa02771a5da70f970379635f904e made `droidcore` stop
depending on `files` so that installed files from unbuilt images
would not be built.  That also disabled the dependency on installed
files that were not in any image, but the vendor notice file had
overly broad dependencies that caused them to still be built.
Icdb11d3c72b180cd02231e8dc98ae500d6566a98 made the vendor notice
file dependencies less broad, exposing the missing `droidcore`
dependencies.

Track the list of installed device files that are not included in any
image, built or unbuilt, and add them as a dependency for `droidcore`.

Bug: 225187583
Test: m checkbuild
Test: check dependency path to encryptionkey.img
Change-Id: I084158ffb52b353e9a3eca9ad06a68c80d3bd371
2022-03-22 09:25:58 -07:00
Colin Cross
a1de5df4bd Remove ALL_GENERATED_SOURCES
ALL_GENERATED_SOURCES contains the generated sources of modules
defined in Make.  They always have a path inside the intermediates
directories.  The only readers of ALL_GENERATED_SOURCES are filtering
for files in the output directories, and will never match anything.

Test: m checkbuild
Change-Id: Ic9af8761d445fa90088f838c385bd2aea3bc3048
2022-03-22 09:25:58 -07:00
Lucas Wei
e39d6af2de Merge "Make build support vendor_kernel_boot image" am: 8842016b30 am: 2dc9c52861 am: 3afd8feae8
Original change: https://android-review.googlesource.com/c/platform/build/+/2018599

Change-Id: I6fa0c4681ab6f974c97ac8112ad398de9f62d6a0
2022-03-22 14:33:50 +00:00
Lucas Wei
8842016b30 Merge "Make build support vendor_kernel_boot image" 2022-03-22 13:48:34 +00:00
Roman Kiryanov
b0eac167d9 Remove the oudated kernel from INTERNAL_EMULATOR_PACKAGE_FILES
The kernel referened is too old and we switched
to the GKI kernel which is located in kernel/prebuilts.

Bug: 225203974
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I02bd9cad70fafcdfda9a7540aa7f05b397023841
2022-03-21 11:18:09 -07:00
Nicolas Geoffray
b6bbdd546c Merge "Add /system/etc/preloaded-classes in the list of files with fsv_meta." am: 412185256f am: d021f26024 am: 802ae18bad
Original change: https://android-review.googlesource.com/c/platform/build/+/2032067

Change-Id: Iccf3ddc80a1f5491da956a5e194d56c39bd1e1c1
2022-03-21 10:06:58 +00:00
Nicolas Geoffray
412185256f Merge "Add /system/etc/preloaded-classes in the list of files with fsv_meta." 2022-03-21 08:35:18 +00:00
Bob Badour
83fd63b3c4 Merge "Add COVERAGE_ZIP to system notice deps." am: d25bf1ec38 am: 8696af283f am: 07b37916f5
Original change: https://android-review.googlesource.com/c/platform/build/+/2032466

Change-Id: Id5aa29aed46f0d676f8419b6cdbf2989dcd71762
2022-03-19 00:41:24 +00:00
Bob Badour
f252972462 Add COVERAGE_ZIP to system notice deps.
Fixes http://b/225282564

Test: lunch gki_arm64-user; make dist

Bug: 225282564
Change-Id: Iba0ea3ee53d3abbce9afff9a005e887ea64f63d1
2022-03-18 11:34:03 -07:00
Nicolas Geoffray
13f2821712 Add /system/etc/preloaded-classes in the list of files with fsv_meta.
Test: m
Bug: 162110941
Change-Id: Idbc0d602bbce9a3cbd68a84f0cc8e2dae05c8c1e
2022-03-18 17:28:14 +00:00
Treehugger Robot
dd780ca8d0 Merge "Notice files and non-module targets." 2022-03-16 20:05:07 +00:00
Colin Cross
27633a0152 Merge "Use Make path for system_linker_config" am: 6dc51855a4 am: c457a49f3a am: 55e2707fc8
Original change: https://android-review.googlesource.com/c/platform/build/+/2027110

Change-Id: I6323bb3ae6998d572bef144b71113540c3a6947f
2022-03-16 18:45:26 +00:00
Colin Cross
6dc51855a4 Merge "Use Make path for system_linker_config" 2022-03-16 17:24:00 +00:00
Lucas Wei
f57333f7fc Make build support vendor_kernel_boot image
Add vendor_kernel_boot image for vendors whose bootloader support
extra first stage booting kernel modules ramdisks. This benefit
kernel repo to build kernel-artifacts only image without Andorid
artifacts dependency.

Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: If07218b86a7751b3d452a172610af960f5f9ec74
2022-03-16 23:13:19 +08:00
Bob Badour
70c07dda93 Notice files and non-module targets.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m nothing reportmissinglicenses

Change-Id: Icdb11d3c72b180cd02231e8dc98ae500d6566a98
Merged-in: Icdb11d3c72b180cd02231e8dc98ae500d6566a98
2022-03-16 05:57:41 -07:00
Bob Badour
ebdefc0c76 Notice files and non-module targets.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m nothing reportmissinglicenses

Change-Id: Icdb11d3c72b180cd02231e8dc98ae500d6566a98
Merged-in: Icdb11d3c72b180cd02231e8dc98ae500d6566a98
2022-03-16 05:46:06 -07:00
Treehugger Robot
01907185bc Merge "Clear OS version and patch level fields for GKI boot images" am: 8131404331 am: 40783868d8 am: 6debab1cf8
Original change: https://android-review.googlesource.com/c/platform/build/+/2022898

Change-Id: Id4fc9227b45feb3d3366bfc791bcb9c4c2f3fb7d
2022-03-16 06:53:21 +00:00
Treehugger Robot
8131404331 Merge "Clear OS version and patch level fields for GKI boot images" 2022-03-16 05:37:43 +00:00
Treehugger Robot
c10c91f138 Merge "More non-module targets." am: 9a21773efe am: da66e2c46d am: 8dd153d008
Original change: https://android-review.googlesource.com/c/platform/build/+/2021235

Change-Id: I614698999fd63b8968f36baea32490ea1b8e4656
2022-03-16 04:05:23 +00:00
Treehugger Robot
9a21773efe Merge "More non-module targets." 2022-03-16 03:15:32 +00:00
Treehugger Robot
fa01103344 Merge "Add ota_extractor to otatools.zip" am: b945cd2890 am: ed3eeff610 am: a060f57ac6
Original change: https://android-review.googlesource.com/c/platform/build/+/2027304

Change-Id: Ic02ed906e025827e8fa66c3d42a4b4e55988958e
2022-03-16 00:23:24 +00:00
Treehugger Robot
b945cd2890 Merge "Add ota_extractor to otatools.zip" 2022-03-15 23:17:20 +00:00
Treehugger Robot
7b5638ba20 Merge "Package llvm-cov in llvm-profdata.zip (take 2)" am: 423e117fa2 am: 5dc3d4f43b am: b815c86cd6
Original change: https://android-review.googlesource.com/c/platform/build/+/2024705

Change-Id: Ic34114d6f123739627c2d2fd228d83b5147f307b
2022-03-15 22:50:41 +00:00
Colin Cross
d4a054fb40 Use Make path for system_linker_config
Use the Make path for system_linker_config instead of a variable
exported by Soong so that the license information is correctly
associated.

Test: m alllicensemetadata reportmissinglicenses
Change-Id: I3d375220d829b2ef88b500ef6c1ea6bf8f46e6ac
2022-03-15 15:07:07 -07:00
Kelvin Zhang
83eb9f7fb1 Add ota_extractor to otatools.zip
This is a newly added binary for extracting device images out of full
OTA package. Add to otatools.zip so that go/bts-image-sharing project
can use it.

Test: th
Bug: 221875271
Change-Id: If2bf85e89a2a12cc00f709dfd21a453c2d805d4f
2022-03-15 11:31:36 -07:00
James Chen
408b29216c Merge "Revert "Package llvm-cov in llvm-profdata.zip"" am: 1b8a1490a9 am: fe9c063243 am: 9c185aaed6
Original change: https://android-review.googlesource.com/c/platform/build/+/2026003

Change-Id: I3fd20f925dd4d4b8caf68961991ddf7f1cdb8472
2022-03-15 06:25:46 +00:00
Pirama Arumuga Nainar
4e3d6334da Package llvm-cov in llvm-profdata.zip (take 2)
Bug: http://b/214396112

It is needed for code coverage smoke test.  Retain the
`llvm-profdata.zip` name since it is used in Tradefed.

This fixes aosp/2017370 which incorrectly packaged llvm-profdata twice.

Test: `CLANG_COVERAGE=true m dist` and inspect llvm-profdata.zip
Change-Id: Ic1cbebff3f6fbea04a6c58c6d57557d0ffde14ae
2022-03-14 22:25:11 -07:00
James Chen
1b8a1490a9 Merge "Revert "Package llvm-cov in llvm-profdata.zip"" 2022-03-15 05:09:55 +00:00
James Chen
ccf5111f4a Revert "Package llvm-cov in llvm-profdata.zip"
This reverts commit bd4f7c7ce7.

Reason for revert: b/224640947

Change-Id: I0eee5e9b75ac39513e43448c3bb63f18545cbc49
2022-03-15 02:13:40 +00:00
Pirama Arumuga Nainar
9d55219c48 Merge "Package llvm-cov in llvm-profdata.zip" am: 72815bdf00 am: 25e6cc9560 am: 0f44776802
Original change: https://android-review.googlesource.com/c/platform/build/+/2017370

Change-Id: I68d070d81a2f249fe0ae41edb7c668b994ea52b2
2022-03-14 17:25:36 +00:00
Pirama Arumuga Nainar
72815bdf00 Merge "Package llvm-cov in llvm-profdata.zip" 2022-03-14 16:11:21 +00:00
Bowgo Tsai
662a2c610a Clear OS version and patch level fields for GKI boot images
GKI boot images will not set system version & SPL value in the
boot image header. They can be set by the device manufacturer
in the AVB properties instead.

Bug: 211741246
Test: build and `unpack_bootimg`
Change-Id: Ib357184636cb0c0c9b2a380ab3e3da7621d21790
2022-03-14 18:03:00 +08:00
Bob Badour
e9bdbc59f1 More non-module targets.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m alllicensemetadata reportmissinglicenses
Change-Id: Ifc4e3504edf3f48068ae88fe36c9f7660018dd5a
2022-03-10 11:31:07 -08:00
Treehugger Robot
886ae7e4db Merge "Sundry non-module targets" am: 2684184530 am: c61946a84b am: 7fe2fe6327
Original change: https://android-review.googlesource.com/c/platform/build/+/2019377

Change-Id: I932b7ffa19c96cc41a383f13d1fb990770eaab5f
2022-03-10 14:12:32 +00:00
Treehugger Robot
2684184530 Merge "Sundry non-module targets" 2022-03-10 13:01:40 +00:00
Bob Badour
2f66fd1bcc Sundry non-module targets
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771

Test: m systemlicense reportmissinglicense

Change-Id: Ie6350c3a61129d38c3901a9af9f5b4c05a7c2e2c
2022-03-09 18:12:26 -08:00
David Anderson
d15d508196 Merge "build_image: Remove mkerofsimage.sh." am: 060505fb4a am: c836e2e090 am: 0a132b5e2f
Original change: https://android-review.googlesource.com/c/platform/build/+/2008730

Change-Id: Ie7406b2257a96d04587b6117d038f058c76e785b
2022-03-09 11:20:29 +00:00
Pirama Arumuga Nainar
bd4f7c7ce7 Package llvm-cov in llvm-profdata.zip
It is needed for code coverage smoke test.  Retain the
`llvm-profdata.zip` name since it is used in Tradefed.

Test: `CLANG_COVERAGE=true m dist` and inspect llvm-profdata.zip
Change-Id: Icb48b0fa22deec8c3c49f0e5bb3ae33450883e0e
2022-03-08 23:09:53 -08:00
David Anderson
f54665f42a Add build flags for legacy EROFS support.
EROFS images by default will only work on newer kernels. Old versions of
5.4 and 4.19 need an extra flag to mkfs.erofs.

Add BUILD_EROFS_USE_LEGACY_COMPRESSION to force this flag.

Bug: 222373106
Test: build with BUILD_EROFS_USE_LEGACY_COMPRESSION enabled
Change-Id: I3818e14356beaa11073c6b9fea6a6ad999bba4aa
2022-03-04 14:47:17 -08:00
David Anderson
94ad5bb5ef build_image: Remove mkerofsimage.sh.
These wrapper scripts are difficult to maintain and there's not really
any value add. The argument strings don't match and every new build flag
has to be connected in an extra place.

Bug: 222715577
Test: make with EROFS enabled
Change-Id: Ie0e51cc30aa08b004d5d8345a2a2d885e193ffa9
2022-03-04 11:07:43 -08:00
Yi-yo Chiang
848c69ac7c Merge changes from topic "gki-avb-vts" am: 9d164b6300 am: e93bc67cf8 am: 4e8705b181
Original change: https://android-review.googlesource.com/c/platform/build/+/1999071

Change-Id: I52ab0dc87855a1822bdb50d014544cecf67d7431
2022-03-01 05:57:34 +00:00
Yi-yo Chiang
9d164b6300 Merge changes from topic "gki-avb-vts"
* changes:
  releasetools: Update T GKI certification scheme
  Update T GKI certification scheme
2022-03-01 04:47:47 +00:00
Treehugger Robot
05df4593f6 Merge "Remove ostensibly unused host tools notice." am: 1420aa099a am: 67ce808a50 am: 71530d3fee
Original change: https://android-review.googlesource.com/c/platform/build/+/2000192

Change-Id: Ia35f77857335f5368c4e70bbdecb3813790fc4e4
2022-02-25 19:55:27 +00:00
Treehugger Robot
1420aa099a Merge "Remove ostensibly unused host tools notice." 2022-02-25 18:30:02 +00:00
Jooyung Han
dc24373bc8 Merge "Replace pvmfw embedded public key" am: 4d0af554ce am: 474339443f am: ba28c6a1f5
Original change: https://android-review.googlesource.com/c/platform/build/+/1990892

Change-Id: I3a4aa38e87bff56823e4b395af688964aa5260da
2022-02-25 07:52:54 +00:00
Jooyung Han
4d0af554ce Merge "Replace pvmfw embedded public key" 2022-02-25 06:39:20 +00:00
Bob Badour
e0eb7e8e38 Remove ostensibly unused host tools notice.
Bug: 151177513

Test: m nothing reportmissinglicenses

Change-Id: Ia33d024bca5262a983b031c2751e7a14c501236e
2022-02-24 18:36:12 -08:00
Yi-Yo Chiang
2f7a108bf2 Update T GKI certification scheme
* Remove 'generic_ramdisk' certification, as we are not certifying
  'init_boot' anymore.
* Add a new 'boot' certificate that certifies the whole boot.img.
* The new 'boot' & existing 'generic_kernel' certificates are directly
  appended at the end of the boot.img, and the mkbootimg
  --boot_signature argument is removed.

Bug: 211741246
Test: m bootimage
Test: ./boot_signature_info.sh boot-5.10.img
Change-Id: I143680b1cab50a6915df56c8273f8741beaf1180
2022-02-24 21:47:51 +08:00
Treehugger Robot
60d85b4cee Merge "Adding BOOT_OS_VERSION for the AVB prop in a boot.img" am: 3f852994b4 am: fb9c2f2205 am: cc08c91fa8
Original change: https://android-review.googlesource.com/c/platform/build/+/1993718

Change-Id: Iac65ded6e2f65bc1c2a13af61b90a6cebdfa6c76
2022-02-23 17:33:05 +00:00
Andrew Scull
bbc930b008 Replace pvmfw embedded public key
The virt APEX payload public key needs to be embedded in pvmfw so that
is verifies the right set of images. As things are being resigned,
update that embedded key so that it matches the APEX.

Bug: 220018566
Test: sign_target_files_apks
Change-Id: I09be91275ec1d1aa6f921c54a96c5159571ddead
2022-02-23 16:27:57 +00:00
Bowgo Tsai
8c7f820512 Adding BOOT_OS_VERSION for the AVB prop in a boot.img
Devices using a prebuilt boot.img, e.g., a GKI, will re-sign
the boot.img to append AVB footers. Currently the value of
"com.android.build.boot.os_version" in the AVB footer is set
to the Android platform version. However, the GKI image might
be from another release branch, e.g., using a Android12-5.10
GKI in a Android 13 codebase.

Adding BOOT_OS_VERSION to allow specify the value separately.

Bug: 211364958
Test: make, then `avbtool info_image --image $OUT/boot.img`.
Change-Id: I335cc7b6c5a455d566f364df6a7dae79facc7a87
2022-02-22 15:00:22 +08:00
Treehugger Robot
b998ac9bfe Merge "Make it possible to avoid specifying boot partition sizes." am: b23cdfb12b am: 1e1777605a am: 1c855870b5
Original change: https://android-review.googlesource.com/c/platform/build/+/1989408

Change-Id: Ie31975f7fa77e9a7f4e45e62634a6ad2100cf7f9
2022-02-18 22:09:38 +00:00
Treehugger Robot
1a799adc5d Merge "Sort AB_OTA_PARTITIONS" am: 94daa8bfab am: 35630ea74e am: ec4ce2fcb4
Original change: https://android-review.googlesource.com/c/platform/build/+/1990850

Change-Id: Ibbb383a2842c4fbdc56d30be678fb849f013868f
2022-02-18 22:08:27 +00:00
Treehugger Robot
b23cdfb12b Merge "Make it possible to avoid specifying boot partition sizes." 2022-02-18 01:40:25 +00:00
Peter Collingbourne
730200ec86 Make it possible to avoid specifying boot partition sizes.
Virtual platforms may have no boot partition as such, so there
is no practical limit on the partition size. Therefore, make it
possible to omit the partition size (i.e. by omitting a definition of
BOARD_*BOOTIMAGE_PARTITION_SIZE), allowing unrestricted boot partition
sizes on those platforms.

The macro get-bootimage-partition-size needs to return an empty string
in the case where the variable is not defined in order for consumers
such as assert-max-image-size and get-hash-image-max-size that test
its result using $(if) to properly disable the size check in that
case. The indentation was causing the macro to return the string
"  " instead, which caused an unrequested size check to be inserted.
Fix it by removing the indentation.

A separate patch to avbtool makes it possible to omit the
--partition_size argument when passing --dynamic_partition_size.

Change-Id: Ie836feeb4c3e3b86d9c7950ff45933294cea9410
Bug: 142352330
2022-02-17 14:26:56 -08:00
Cole Faust
900999973e Sort AB_OTA_PARTITIONS
Some product config makefiles are being refactored for
the conversion to Starlark. In order to test that the
refactor doesn't cause any meaningful change, we test
that the ninja files are the same before/after the refactor.
Currently, they have differences in the order of AB_OTA_PARTIONS,
which shouldn't matter. In order to increase our confidence
and make the ninja files more stable, sort AB_OTA_PARTITIONS
before it's used.

Bug: 220169197
Test: Presubmits
Change-Id: I6a9f9f2990406d810577cf8930416925f2987311
2022-02-17 11:35:27 -08:00
Treehugger Robot
1ce4fa639e Merge "Add an misc_info.txt entry to customize VABC compression" am: 3c84e5f114 am: a1e8783ffd am: f76bbe1ddb am: 0d48483d39
Original change: https://android-review.googlesource.com/c/platform/build/+/1978746

Change-Id: I2b16400c876c49bfc3e6e3656c5bba2987c3a41b
2022-02-10 10:32:45 +00:00
Kelvin Zhang
fa91e98985 Add an misc_info.txt entry to customize VABC compression
Products can define PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD
to specify the compression algorithm they prefer, or "none"
for no compression at all.

Test: th
Change-Id: I4fa27bd2c87b8f46c51023168d079e9b47ce2924
2022-02-09 14:23:16 -08:00
Treehugger Robot
fead7b745f Merge "core & tools: system_dlkm: add dynamic partition" am: ef25de413e am: 0f5c34115c am: b4a4dee4c9 am: 144934f1fc
Original change: https://android-review.googlesource.com/c/platform/build/+/1963868

Change-Id: I122e7b631f692e9c5e05948e8fe25a24d4626f5d
2022-02-02 07:20:35 +00:00
Treehugger Robot
ef25de413e Merge "core & tools: system_dlkm: add dynamic partition" 2022-02-02 06:04:07 +00:00
Baligh Uddin
50afe214f0 Merge "Move pvmfw.img to PREBUILT_IMAGES temporarily" am: 1a95fc381c am: 4bfbb5f713 am: 014b99ee06 am: f9723ff858
Original change: https://android-review.googlesource.com/c/platform/build/+/1966606

Change-Id: I9a5e2f8b7edfbc0ffbb0628acca3b255a5138533
2022-02-01 20:57:51 +00:00
Baligh Uddin
f29a9a5058 Merge "Rename BUILT_PVMFWIMAGE_TARGET to PREBUILT_..." am: ed1041b8a2 am: 54278d0d8d am: fbbf9f3af1 am: 538e709690
Original change: https://android-review.googlesource.com/c/platform/build/+/1966609

Change-Id: I2bceab49159a46d06f51170510d2f29776a07eaf
2022-02-01 20:57:30 +00:00
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
Devin Moore
d080489639 Merge "Revert "Throw an error if androidboot.hardware is used for bootconfig"" am: c92ebe14f2 am: ab50d6e8b8
Original change: https://android-review.googlesource.com/c/platform/build/+/1741482

Change-Id: Id0774adb662382e1ef5c898e0f77a81a7573f3cb
2021-06-21 20:51:08 +00:00
Devin Moore
c92ebe14f2 Merge "Revert "Throw an error if androidboot.hardware is used for bootconfig"" 2021-06-21 18:22:31 +00:00
Devin Moore
5fe993f0cf Revert "Throw an error if androidboot.hardware is used for bootconfig"
This reverts commit 2e43e34d53.

The kernel bootconfig feature has been updated to handle mixed subkeys
and values, so androidboot.hardware is ok to use now.

Test: build and boot cuttlefish with 'hardware=cutf_vm'
Test: build and boot cuttlefish with 'androidboot.hardware=cutf_vm'
Bug: 191502832
Change-Id: I7c3f330a73abe6cf1fb7d14aaaa6cbc3e874a4aa
2021-06-18 13:42:48 -07:00
Inseob Kim
33c4475bb9 Directly create ramdisk dirs in ramdisk image rule am: adcdb2fbda am: 4836adea46
Original change: https://android-review.googlesource.com/c/platform/build/+/1733954

Change-Id: I574765db3f58ab415c8e42126477ddc22619fb53
2021-06-18 18:15:03 +00:00
Inseob Kim
4836adea46 Directly create ramdisk dirs in ramdisk image rule am: adcdb2fbda
Original change: https://android-review.googlesource.com/c/platform/build/+/1733954

Change-Id: Ie513f939725f5ccd5fb95c704b29f35c0a7bf8a4
2021-06-18 17:58:24 +00:00
Inseob Kim
389d81d13e Merge changes from topic "init_first_stage_soong"
* changes:
  Add BUILD_USES_RECOVERY_AS_BOOT to soong config
  Directly create ramdisk dirs in ramdisk image rule
  Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars
2021-06-18 17:12:23 +00:00
TreeHugger Robot
ae53a41a1f Merge changes Ie63d08ac,Ia7f8200c into sc-dev am: c66099dcc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/15008279

Change-Id: I99e71fbfc149099a7e2bcdd9b71a7281960f5310
2021-06-17 15:18:21 +00:00
Bill Peckham
d07e1c0077 Fix typo in droidcore-unbundled.
Test: manual inspection.
Bug: 191304308
Merged-In: Ie63d08acff0b9accfafd906a43bd18cbef5471a3
Change-Id: Ie63d08acff0b9accfafd906a43bd18cbef5471a3
2021-06-16 20:54:39 -07:00
Bill Peckham
184524a915 Fix typo in droidcore-unbundled.
Test: manual inspection.
Bug: 191304308
Change-Id: Ie63d08acff0b9accfafd906a43bd18cbef5471a3
2021-06-17 03:33:09 +00:00
Bill Peckham
315b98a73a Introduce droidcore-unbundled target
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.

Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
(cherry picked from commit 0a30cc41bc)
2021-06-16 19:54:07 +00:00
Bill Peckham
16da01fe20 Introduce droidcore-unbundled target
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.

Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Merged-In: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
2021-06-16 09:10:07 -07:00
Inseob Kim
adcdb2fbda Directly create ramdisk dirs in ramdisk image rule
These directories have been created with post install cmds of
init_first_stage. To migrate init_first_stage to Soong, the directory
rules are now written directly in ramdisk image rule.

Bug: 187196593
Test: "m installclean; m" and see ramdisk output
Change-Id: Ic76c325ce102347f20b282572e3edbb5b4359aaf
2021-06-16 20:58:59 +09:00
Devin Moore
d77608cbdf Merge "Add vendor-bootconfig.img to target-files-package" am: 55987b5745 am: 7651e75f37
Original change: https://android-review.googlesource.com/c/platform/build/+/1732636

Change-Id: I912001bd2615dc69e8046890c3d5294e48f18fa5
2021-06-10 21:39:35 +00:00
Devin Moore
55af5065dc Add vendor-bootconfig.img to target-files-package
INTERNAL_VENDOR_BOOTCONFIG_TARGET is a required dependency of
target-files-package so it can be built from a clean build.

Test: rm -rf out/target/product && m target-files-package
Bug: 190329824
Change-Id: I9873aee3c9fb303d2ad245b5433d13eb76ab55f9
2021-06-09 13:19:13 -07:00
Jaegeuk Kim
1f50a36c62 Missing required packages for f2fs when building ota package
Bug: 171942852
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ib2ecc0cf88d71f358bd04e6c4ac129607fe4054c
2021-06-08 19:12:15 -07:00
Jaegeuk Kim
01da65f93a Missing required packages for f2fs when building ota package
Bug: 171942852
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ib2ecc0cf88d71f358bd04e6c4ac129607fe4054c
Merged-In: Ib2ecc0cf88d71f358bd04e6c4ac129607fe4054c
2021-06-09 02:11:23 +00:00
Tianjie Xu
b195f48ce9 Merge "Check super size for factory OTA at build time" into sc-dev 2021-06-02 21:53:36 +00:00
Jaegeuk Kim
bce364b9ce Merge changes from topic "f2fs-system" into sc-dev
* changes:
  Enable f2fs compression for other partitions
  Enable --readonly for system compression
2021-06-01 18:09:07 +00:00
Jaegeuk Kim
d56fb727ba Merge changes from topic "f2fs-system"
* changes:
  Enable f2fs compression for other partitions
  Enable --readonly for system compression
2021-05-27 18:42:28 +00:00
Tianjie
16bcac122f Check super size for factory OTA at build time
For VAB launched device, factory OTA will write system_other
partition to the super image. So we want to check that
sum(dynamic partitions) + system_other + overhead <= super at
build time.

Since we don't know the overhead at build time, we might instead
check sum(all partitions) < super.

Bug: 185809374
Test: m check-all-partition-sizes, unittests
Change-Id: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
Merged-In: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
(cherry-picked from commit 294ec7d9e5)

Change-Id: I479d1b399a1639b595ae5d7f1481c771a3439e51
2021-05-26 14:43:35 -07:00
Tianjie Xu
f4ca0567dd Merge "Check super size for factory OTA at build time" 2021-05-26 21:33:14 +00:00
Jaegeuk Kim
91869cafe6 Enable f2fs compression for other partitions
Bug: 171942852
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I231f7a2b808cc792fd582cd444825e4a47722984
2021-05-26 13:11:28 -07:00
Bowgo Tsai
b23656df31 Support AVB signing for BOARD_PREBUILT_BOOTIMAGE
Devices using GKI architecture will use a prebuilt boot.img.
However, we should still sign this prebuilt boot.img with
device-specific AVB keys.

Steps to test the CL.
1. In a device BoardConfig.mk:

   # Uses a prebuilt boot.img
   TARGET_NO_KERNEL := true
   BOARD_PREBUILT_BOOTIMAGE := device/google/redbull/boot.img

   # Enable chained vbmeta for the boot image.
   # The following can be absent, where the hash descriptor of the
   # 'boot' partition will be stored then signed in vbmeta.img instead.
   BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
   BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA4096
   BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
   BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2

2. `make bootimage`, then `avbtool info_image --image $OUT/boot.img`,
    checks the image is re-signed with a device-specific key

3. `make dist` to generate out/dist/TF.zip

4. `unzip out/dist/TF.zip IMAGES/boot.img`

5. `avbtool info_image --image out/dist/IMAGES/boot.img`,
    checks the image is re-signed with a device-specific key

6. `sign_target_files_apks \
      --avb_boot_key=external/avb/test/data/testkey_rsa8192.pem \
      --avb_boot_algorithm=SHA256_RSA8192 \
      --avb_boot_extra_args="--prop test:sign" \
      ./out/dist/*-target_files-eng.*.zip signed.zip`, resign the TF.zip

7. `unzip signed.zip IMAGES/boot.img`, then use `avbtool info_image` to
   check the boot.img is re-signed with the --avb_boot_key in step 6.

Bug: 188485657
Test: above steps
Change-Id: I7ee8b3ffe6a86aaca34bbb7a8898a97b3f8bd801
Merged-In: I7ee8b3ffe6a86aaca34bbb7a8898a97b3f8bd801
(cherry picked from commit cf9ead8972)
2021-05-26 09:11:00 +08:00
Jaegeuk Kim
1369654d8d Enable f2fs compression for other partitions
Bug: 171942852
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I231f7a2b808cc792fd582cd444825e4a47722984
2021-05-25 14:54:45 -07:00
Bowgo Tsai
cf9ead8972 Support AVB signing for BOARD_PREBUILT_BOOTIMAGE
Devices using GKI architecture will use a prebuilt boot.img.
However, we should still sign this prebuilt boot.img with
device-specific AVB keys.

Steps to test the CL.
1. In a device BoardConfig.mk:

   # Uses a prebuilt boot.img
   TARGET_NO_KERNEL := true
   BOARD_PREBUILT_BOOTIMAGE := device/google/redbull/boot.img

   # Enable chained vbmeta for the boot image.
   # The following can be absent, where the hash descriptor of the
   # 'boot' partition will be stored then signed in vbmeta.img instead.
   BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
   BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA4096
   BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
   BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2

2. `make bootimage`, then `avbtool info_image --image $OUT/boot.img`,
    checks the image is re-signed with a device-specific key

3. `make dist` to generate out/dist/TF.zip

4. `unzip out/dist/TF.zip IMAGES/boot.img`

5. `avbtool info_image --image out/dist/IMAGES/boot.img`,
    checks the image is re-signed with a device-specific key

6. `sign_target_files_apks \
      --avb_boot_key=external/avb/test/data/testkey_rsa8192.pem \
      --avb_boot_algorithm=SHA256_RSA8192 \
      --avb_boot_extra_args="--prop test:sign" \
      ./out/dist/*-target_files-eng.*.zip signed.zip`, resign the TF.zip

7. `unzip signed.zip IMAGES/boot.img`, then use `avbtool info_image` to
   check the boot.img is re-signed with the --avb_boot_key in step 6.

Bug: 188485657
Test: above steps
Change-Id: I7ee8b3ffe6a86aaca34bbb7a8898a97b3f8bd801
2021-05-21 08:44:37 +00:00
Bowgo Tsai
b9af035ee7 BOARD_PREBUILT_BOOTIMAGE: removes the restriction of non system-as-root
Starting from Android 10, the system.img layout consists of
$TARGET_SYSTEM_OUT and $TARGET_ROOT_OUT, and is mounted by the
init as root. That is, system.img is always created as if
BOARD_BUILD_SYSTEM_ROOT_IMAGE was set.

  https://source.android.com/devices/bootloader/partitions/system-as-root

The previous concern is that there might be compatibility issues between
the ramdisk contained in boot.img with a newer system.img. But this is
no longer an issue after we always mount the system.img as root.

Bug: 187157581
Test: Tree Hugger
Change-Id: I4537e6ce6fb39b4b86caac82a13716abf515ffd6
Merged-In: I4537e6ce6fb39b4b86caac82a13716abf515ffd6
(cherry picked from commit 640544bd96)
2021-05-17 14:51:16 +08:00
Bowgo Tsai
640544bd96 BOARD_PREBUILT_BOOTIMAGE: removes the restriction of non system-as-root
Starting from Android 10, the system.img layout consists of
$TARGET_SYSTEM_OUT and $TARGET_ROOT_OUT, and is mounted by the
init as root. That is, system.img is always created as if
BOARD_BUILD_SYSTEM_ROOT_IMAGE was set.

  https://source.android.com/devices/bootloader/partitions/system-as-root

The previous concern is that there might be compatibility issues between
the ramdisk contained in boot.img with a newer system.img. But this is
no longer an issue after we always mount the system.img as root.

Bug: 187157581
Test: Tree Hugger
Change-Id: I4537e6ce6fb39b4b86caac82a13716abf515ffd6
2021-05-14 17:55:32 +08:00
Treehugger Robot
c79de76e3e Merge "Don't make dexpreopt_tools.zip when dex2oat isn't avilable" am: bf5d6238fe am: e9b9f7f0f7 am: 9fda600aa3
Original change: https://android-review.googlesource.com/c/platform/build/+/1705507

Change-Id: If5d80fcf192bace7c400bec76e77d55e2ea92af9
2021-05-14 03:02:57 +00:00
Tianjie
294ec7d9e5 Check super size for factory OTA at build time
For VAB launched device, factory OTA will write system_other
partition to the super image. So we want to check that
sum(dynamic partitions) + system_other + overhead <= super at
build time.

Since we don't know the overhead at build time, we might instead
check sum(all partitions) < super.

Bug: 185809374
Test: m check-all-partition-sizes, unittests
Change-Id: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
2021-05-13 17:41:52 -07:00
Jeongik Cha
62519def7b Don't make dexpreopt_tools.zip when dex2oat isn't avilable
Test: m
Bug: 158843648
Change-Id: Iae90ea60fc73f1a6202499528277fce7c950d9d3
2021-05-13 13:29:39 +09:00
Treehugger Robot
fdca5d9faa Merge "Target for tools to dexpreopt" am: 26bad544c5 am: ee88da65f5 am: 4beb444294
Original change: https://android-review.googlesource.com/c/platform/build/+/1688306

Change-Id: I91c8fd16af6707d159b448668082fed25d215531
2021-05-13 01:27:10 +00:00
Jeongik Cha
2522c36b4c Target for tools to dexpreopt
Bug: 158843648
Test: m droidcore
Change-Id: I580e2b3285cc524234859998a0e4e072ecaef072
2021-05-12 23:28:49 +09:00
Hamzeh Zawawy
8963e14abe Merge "Add new target for building rust fuzzers for haiku" am: 26e4d3ed11 am: 75a2f742a6 am: eaf6a6ce8d
Original change: https://android-review.googlesource.com/c/platform/build/+/1691405

Change-Id: Ib8b75ee242b94f03e2b54425a5a8ed6953ed86f2
2021-05-03 17:41:51 +00:00
hamzeh
5dfe7a214b Add new target for building rust fuzzers for haiku
Test: make haiku-rust
Change-Id: I0badb5c0ae4138abdbd3f9a404e8883f70ceb503
2021-04-29 13:28:04 -07:00
Treehugger Robot
8aa7710d01 Merge "Moving debug ramdisk resources under / of the ramdisk" am: 2c806a7c94 am: fe4b552210 am: c3e5165e82
Original change: https://android-review.googlesource.com/c/platform/build/+/1685172

Change-Id: If85fa35ccc2208a206e883f7b9f3b5f62a0df4fd
2021-04-28 18:59:06 +00:00
Treehugger Robot
2c806a7c94 Merge "Moving debug ramdisk resources under / of the ramdisk" 2021-04-28 16:27:34 +00:00
Treehugger Robot
610726689c Merge "Copy dexpreopt.config only if it exists" am: 5e5b52033c am: 66a74eb2cb am: e2421c5067
Original change: https://android-review.googlesource.com/c/platform/build/+/1685486

Change-Id: I1620ffd25e8ff59bc83858df10e4d10c6cba2411
2021-04-26 17:58:00 +00:00
Bowgo Tsai
610286a88f Moving debug ramdisk resources under / of the ramdisk
Currently the debug ramdisk resources might be under / or
/first_stage_ramdisk of the ramdisk, and is determined by
some BOARD variables, e.g., BOARD_USES_RECOVERY_AS_BOOT,
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT, etc.

To make a generic boot-debug.img that can work on both devices,
let's move the debug resources always under / of the ramdisk.

Bug: 186082603
Test: boot a device with boot-debug.img
Test: boot a device with vendor_boot-debug.img
Change-Id: I55dc8ff322f6b97e2d6dc1a4ee5935e863f2f835
2021-04-24 08:55:02 +08:00