Commit Graph

2935 Commits

Author SHA1 Message Date
Robin Hsu 3e51f4234c Enable system partition compression
* Prerequisites: external/f2fs-tools: sload compression support
* Must work with corresponding changes in system/extras repository
* If Board config does not change, it falls back to old behavior,
  i.e. no compression for the system partition
* Kernel f2fs compression support is a prerequisite if the Board config
  enables the compression (see below)
* Necessary board config change
 (e.g. device/<vendor>/<product>/BoardConfig-common.mk)

BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := f2fs
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 200000000
BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS := true
BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS := <sload compress sub-options>

Setting BOARD_SYSTEMIMAGE_FILE_SYSTEM_COMPRESS to true enables both the
compression support when the initial empty file system be made (mkfs.f2fs)
and the compression flag (-c) when the system image files be side-loaded
by sload.

Sload compress sub-options (i.e. options other than -c) will be provided
by BOARD_SYSTEMIMAGE_F2FS_SLOAD_COMPRESS_FLAGS.   If it is not given, or
is empty, the default sub-options will be used

Please refer to the sload.f2fs manual page.

Setting BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE to f2fs is trivially necessary.

* File system table (fstab), notably the file 'fstab.hardware', should
  also changed:
  - The file type must be changed to f2fs
  - Perhaps also other f2fs-specific options

Bug: 170918499
Test: Pixel4a userdebug build (from build id 6918751)
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: Id9d67b5cb35dc806e06ff1320e89114abc996a28
2020-12-09 07:24:55 +08:00
Anton Hansson cd8fa36cbb Move rule for certificate_violation_modules.txt
It was in the middle of some other logic in main.mk

Put it in Makefile instead next to the other "information" dist txt
files.

Test: make and diff certificate_violation_modules.txt
Change-Id: I5b73a0f89ccf3de69e7608a0568d2b4b6f37e98c
2020-12-08 21:12:36 +00:00
Treehugger Robot e1365ce0b1 Merge "Add option include a pvmfw partition" am: d7bf548967
Original change: https://android-review.googlesource.com/c/platform/build/+/1513771

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibd4f75d386f47e5a88d56d7b8039d5eb8c2018d3
2020-12-07 22:48:16 +00:00
Andrew Scull 9b103e49e9 Add option include a pvmfw partition
Protected KVM relies on protected VM firmware (pvmfw) to bootstrap the
trust in protected VMs. This firmware is AVB protected and stored in the
pvmfw partition.

Test: build a target with BOARD_PREBUILT_PVMFWIMAGE set, saw the image
      included in the product files and used avbtool to check the footer
      and vbmeta.img details.
Bug: 171280178
Change-Id: I4d6a1819f307c77ca60c0dd3dff39ee28cece4f6
2020-12-07 12:31:23 +00:00
Yo Chiang b179ae612d Merge "Add phony target to check all PCF ELF prebuilts" am: ad4dae71cf
Original change: https://android-review.googlesource.com/c/platform/build/+/1311493

Change-Id: I9b97245b1b1a894cd87b396bd0ef4bd1aab46290
2020-12-04 04:11:48 +00:00
Yo Chiang ad4dae71cf Merge "Add phony target to check all PCF ELF prebuilts" 2020-12-04 02:49:33 +00:00
Treehugger Robot ae2bf41268 Merge "Make installed-files-recovery.txt depend on rsync timestamp" am: ed41c73db5
Original change: https://android-review.googlesource.com/c/platform/build/+/1515806

Change-Id: I9f2a5e377c7a46ad5efeb7acaa42ef21b58b5cbd
2020-12-03 17:06:29 +00:00
Treehugger Robot ed41c73db5 Merge "Make installed-files-recovery.txt depend on rsync timestamp" 2020-12-03 16:42:25 +00:00
Treehugger Robot 2875f607e3 Merge "Adds host_init_verifier to otatools.zip" am: d955bc1288
Original change: https://android-review.googlesource.com/c/platform/build/+/1515821

Change-Id: Ia662cc0bb2dba840247de7d69229d2fb5ad20345
2020-12-03 08:22:53 +00:00
Treehugger Robot d955bc1288 Merge "Adds host_init_verifier to otatools.zip" 2020-12-03 07:10:21 +00:00
Daniel Norman ee33b4ea51 Adds host_init_verifier to otatools.zip
This is needed after
commit 21c34f78e8
which starts calling host_init_verifier in merge_target_files,
a binary in releasetools.

Test: m otatools
Change-Id: Iee762de9fd6f890b5cc26ee5507da2f3f284fc14
2020-12-02 16:18:25 -08:00
Colin Cross 359f421d3b Make installed-files-recovery.txt depend on rsync timestamp
Files are copied into the recovery installation directory by a rule
that runs rsync.  The previous logic tried to avoid racing with the
rsync rule by depending on the final packaged recovery image, but
if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set then
INSTALLED_RECOVERYIMAGE_TARGET is left empty and no dependency was
added.  Depend on the timestamp file used as the output of the rule
that runs rsync instead.

Test: query dependencies of installed-files-recovery.txt
Fixes: 173772240
Change-Id: I5ec77a6933e3a83fe4e4819e0e246017d824d8a5
2020-12-02 23:19:29 +00:00
Xin Li 4bc4ff3c11 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I880b5dfb7bfea4b6abef9fcb603abcb383d84f42
Change-Id: I3c3385a1c58004f1ee6124de0c86dfff614a3bf6
2020-12-02 00:03:31 -08:00
Kiyoung Kim 36481e0b34 Generate system stub library list at build time
List of stub libraries from system (and bionic APEX) is currently
managed in static file. This change generates the list at build time and
adds to the system config so linkerconfig can use it.

Bug: 172889962
Test: Build cuttlefish and confirmed list is generated in
/system/etc/linker.config.pb

Change-Id: Idd5a93442f398dd8e88c767c694ddae64d1bb713
2020-12-01 15:33:09 +09:00
Petri Gynther 6ff5201ce9 Add installed-files-vendor-ramdisk.txt
Add installed-files-vendor-ramdisk.txt build artifact, so that it is
easy to see what files landed on the vendor ramdisk.

Test: clean build, inspect installed-files-vendor-ramdisk.txt
Change-Id: Ie84d06dc968ad972ab2bfa79db4d1839ba09e09f
2020-11-20 16:59:57 -08:00
Treehugger Robot a39ec91fbe Merge "Revert "Mount generic ramdisk as readwrite."" 2020-11-17 01:11:36 +00:00
Yifan Hong 187e975927 Merge changes from topic "gki_vintf_level"
* changes:
  Pass kernel release file to check_vintf.
  Pass kernel version file to check_vintf.
2020-11-16 23:48:47 +00:00
Treehugger Robot d320cbc6d0 Merge "Dump BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST into misc_info.txt" 2020-11-16 17:43:57 +00:00
Treehugger Robot fc65231af1 Merge "Support PRODUCT_BUILD_VBMETA_IMAGE for target files" 2020-11-16 13:59:41 +00:00
Yifan Hong b95d02eac9 Pass kernel release file to check_vintf.
check_vintf now accepts a file that contains the full kernel
release string as the first half of --kernel. Use it.

With this patch, BOARD_KERNEL_VERSION can be a full kernel release
string like 5.4.42-something, or 5.4.42-android12-0-something.

The content of target_files/META/kernel_version.txt also contains the
full kernel release, not just the kernel version.

Bug: 161317193
Test: m check-vintf-all
Change-Id: I3b52639f557532077894d9356c745c16b41dd91c
2020-11-13 18:45:03 -08:00
Yifan Hong 72e78f21b2 Pass kernel version file to check_vintf.
check_vintf now accept a path to a file that contains the kernel
version string. Use it.

Test: m check-vintf-all and manual inspect
Bug: 161317193
Change-Id: I4812c93f352686d73c5832d59e43a297d93e67a2
2020-11-13 18:45:03 -08:00
Bowgo Tsai 8218225794 Support PRODUCT_BUILD_VBMETA_IMAGE for target files
Currently we support skip building vbmeta.img when
PRODUCT_BUILD_VBMETA_IMAGE is set to false, which is used
when generating a system-only or vendor-only build artifacts.

However, when using `make dist` to build target files,
vbmeta.img is still generated. This change fixes this by
passing the related info to misc_info.txt for the release
tool to skip building vbmeta.img when necessary.

To make this happen, a device config should:
 1. Set PRODUCT_BUILD_VBMETA_IMAGE := false
 2. Remove 'vbmeta' from AB_OTA_PARTITIONS:
     AB_OTA_PARTITIONS += \
	 boot \
	 system \
    -    vbmeta \
	 dtbo \
	 product \
	 system_ext \
         vbmeta_system

Bug: 161659370
Test: `make dist` and checks the target file does not include vbmeta.img
Change-Id: Iddca9fe0b171a50a80e5a88aa462e118f18a7e6f
2020-11-13 11:28:17 +08:00
Yifan Hong bc685f920c Revert "Mount generic ramdisk as readwrite."
This reverts commit 78b55b2244.

Reason for revert: Replaced by Ib99aca13d4d:
ANDROID: GKI: build in a kernel command line of "rw"

Prebuilt is checked in at Ie34b5b017:
Update kernel to builds 6964541

Fixes: 171512004
Test: TH

Change-Id: I2aec88cc22483a6b3a671fc664d465624a14e5b0
2020-11-12 20:06:54 +00:00
Kelvin Zhang 5a65f69ae6 Dump BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST into misc_info.txt
Cuttlefish doesn't support updating the vendor partition. So we change
ota_from_target_files to only generate updates for partitions in
BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST. This CL puts the prop in
misc_info.txt, which will be read by ota scrips

Bug: 171999375
Test: mm -j
Change-Id: I4d9c97c717cb73806f95684b3bc81ef285ccbb8b
2020-11-11 14:23:00 -05:00
Yifan Hong 49968aa137 aosp_arm64 Copy boot image from $OUT to target files
If BOARD_COPY_BOOT_IMAGE_TO_TARGET_FILES is defined,
in target files, instead of rebuilding the boot image, copy the boot
image already built in $OUT to target files package directly so that
they are the same package.

Define BOARD_COPY_BOOT_IMAGE_TO_TARGET_FILES for aosp_arm64.

The GKI APEX is built using the boot image in $OUT. If the boot image in
$OUT is different from the boot image in target files, aka the generic
boot image we release, the GKI APEX we built is invalid.

If another device needs to copy $OUT/boot.img to target files, it can
define BOARD_COPY_BOOT_IMAGE_TO_TARGET_FILES.

Fixes: 172682114
Test: lunch aosp_arm64 &&
Change-Id: I10fc7a5aa36e976dbeaf25434239687455bba061
2020-11-10 12:55:40 -08:00
Yifan Hong 0674a6e04d Extract boot image from prebuilt apex
Test: m bootimage && file $OUT/boot.img
Bug: 169361394
Change-Id: Id88fd452be8bea82805bde81e407cf6b991120d0
2020-11-09 18:45:42 -08:00
Yo Chiang 336883a64f Add phony target to check all PCF ELF prebuilts
Add phony target check-elf-prebuilt-product-copy-files that asserts
PRODUCT_COPY_FILES doesn't have ELF prebuilts.
This helps triage PCF ELF errors by providing a convenient target to
check / list all errors.

Bug: 140560012
Bug: 156534160
Test: lunch aosp_cf_x86_phone
Test: m USE_NDK_TRANSLATION_BINARY=true \
  check-elf-prebuilt-product-copy-files -k
Change-Id: Ic7fa43c10b0c30b3b1d9b7c2fae75cc6ea4a3513
2020-10-31 06:46:31 +00:00
Yifan Hong d2ae9989cd Merge changes I7bd61f74,Ia84e604a,I75e13b92,I0db2af20,I4feac435
* changes:
  Mount generic ramdisk as readwrite.
  Do not put GENERIC_KERNEL_CMDLINE in recovery image.
  Move common code out of the conditional.
  Remove device-specific bits if recovery_as_boot
  Do not assume GKI just with vendor_boot.
2020-10-30 16:52:28 +00:00
Alistair Delva 38d49ca61a Merge "Allow flashing erofs system imgs" 2020-10-30 06:41:25 +00:00
Yifan Hong 78b55b2244 Mount generic ramdisk as readwrite.
With this change, first stage init can prepare and move
resources to accomodate devices with and without a dedicated
recovery partition.

Test: build with and without recovery partition, and manually inspect
Bug: 171512004

Change-Id: I7bd61f74c16ee77f3f05dc208e0f3cfe81e302b0
2020-10-28 17:05:18 -07:00
Yifan Hong 78860164d0 Do not put GENERIC_KERNEL_CMDLINE in recovery image.
The GENERIC_KERNEL_CMDLINE should only be in the generic boot image.
If device uses recovery-as-boot, it never uses generic boot image
because on devices with generic boot image, recovery resources are
moved to vendor_boot instead.

Bug: 171512004
Test: builds

Change-Id: Ia84e604a8ded28af39c7f1861ff5d3b3af55849f
2020-10-28 17:05:18 -07:00
Yifan Hong c56931c173 Move common code out of the conditional.
Test: builds
Change-Id: I75e13b929dbdb31785a59898579ed14bcc3eef60
2020-10-28 17:05:18 -07:00
Yifan Hong 3941a876de Remove device-specific bits if recovery_as_boot
On legacy devices (launched with R and below), if device:
- has a vendor_boot partition, and
- uses recovery_as_boot

Then, when building the recovery/boot partition, the
device-specific bits, including dtb/kernel base/pagesize should
be moved to vendor_boot.

Previously, it is incorrectly assumed that A/B => recovery_as_boot.
In reality, we do have A/B devices with a dedicated recovery partition.

Note that for devices that uses GKI (BOARD_USES_GENERIC_KERNEL_IMAGE),
recovery_as_boot is never set to true. Instead, recovery resources
are moved to vendor_boot. On these devices, the conditional
'vendor_boot && recovery-as-boot' is always false. Hence:

- If the device has a dedicated recovery partition, it should use V3 header,
  and dtb/base/pagesize won't be in recovery header.
- If device does not have a dedicated recovery partition, the recovery
  image won't be built.

Test: builds
Change-Id: I0db2af20470cbe8a21044a984cccf264590aaccf
2020-10-28 17:05:18 -07:00
Yifan Hong 46aff099d2 Do not assume GKI just with vendor_boot.
This change ensures changes to GENERIC_KERNEL_CMDLINE only affects
devices that explicitly says it uses GKI/generic boot image.

In details, if the device has vendor_boot, but does not explicitly
specify that it uses GKI/generic boot image, do not include
GENERIC_KERNEL_CMDLINE in boot. boot cmdline is left empty
in this case.

The old logic:
- If device uses GKI *OR* has vendor_boot:
  boot uses GENERIC_KERNEL_CMDLINE, and do not include kernel base
  and pagesize.
  - If device has vendor_boot, INTERNAL_KERNEL_CMDLINE, kernel base
    and pagesize goes in vendor_boot.
- If device does not use GKI nor have vendor_boot:
  boot uses INTERNAL_KERNEL_CMDLINE, and includes kernel base and
  pagesize.

The new logic:
- If using GKI, boot uses GENERIC_KERNEL_CMDLINE. Remove kernel base
   and pagesize because they are device-specific.
- If not using GKI:
  - If building vendor_boot, INTERNAL_KERNEL_CMDLINE, base and
    pagesize goes in vendor_boot; boot does not have cmdline, base or
    pagesize.
  - Otherwise, put them in boot

Comparison of the code before and after:
- If device uses GKI,
  - For boot partition:
    - cmdline continues to be GENERIC_KERNEL_CMDLINE
    - kernel base and pagesize continues to be excluded
  - For vendor_boot partition:
    - cmdline continues to be INTERNAL_KERNEL_CMDLINE
    - kernel base and pagesize continues to be included
- If device does not use GKI:
  - If device has a vendor_boot partition:
    - For boot partition:
      * cmdline changes from GENERIC_KERNEL_CMDLINE to empty
      - kernel base and pagesize continues to be excluded
    - For vendor_boot partition:
      - cmdline continues to be INTERNAL_KERNEL_CMDLINE
      - kernel base and pagesize continues to be included
  - If device does not have a vendor_boot partition:
    - For boot partition:
      - cmdline continues to be INTERNAL_KERNEL_CMDLINE
      - kernel base and pagesize continues to be included

Test: builds
Bug: 171512004

Change-Id: I4feac435698f43ac299b430bff66147057865a62
2020-10-28 17:05:18 -07:00
Gao Xiang 961041ac80 Allow flashing erofs system imgs
Bug: 158339527
Test: build & boot
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Change-Id: Ie74db8ebcd7214ffbec49d42b305b2f3ac2e8c9d
2020-10-28 01:24:39 +08:00
Jaewoong Jung 7b634d345d Remove duplicate quotation marks in apkcerts list.
Fixes: 160845661
Test: Modify dialer cert string && m apkcerts-list
Change-Id: I9da8dd70185057b2e13793dd14387223dc29b052
2020-10-23 14:02:16 -07:00
Tianjie Xu f692346758 Merge "Generate partial ota update package if the board defines it" 2020-10-21 20:19:10 +00:00
Yifan Hong ffb2a7f9da Merge "Build boot image if BOARD_KERNEL*_BOOTIMAGE_PARTITION_SIZE" 2020-10-21 18:34:31 +00:00
Jingwen Chen 7d7f94547a symlink_outputs: Add .KATI_SYMLINK_OUTPUTS to build/make/core
Test: m
Bug: 160568334

Change-Id: Ie6fb4f16bb77845787d277857e17e6aac0a8c11a
2020-10-21 08:55:10 +00:00
Yifan Hong ebe65f8c0a Build boot image if BOARD_KERNEL*_BOOTIMAGE_PARTITION_SIZE
Also gets the correct partition size and checks correctly.

Test: build aosp_arm64

Change-Id: I004e4b04d225d72db1904b983a6d03a916406085
2020-10-20 15:53:12 -07:00
Yifan Hong 9873891bd0 Merge "Do not build recovery-resource.dat if move_recovery_res_to_vendor_boot" 2020-10-20 22:26:15 +00:00
Tianjie 6bd3b1a7f1 Generate partial ota update package if the board defines it
Many partners have asked for platform support of system-only update.
So we config cuttlefish as an example to support the partial ota
updates. Also make such package available on the build server.
This allows continuous test to ensure the e2e update flow is working.

Bug: 170921953
Test: generate & apply a partial update, check output in presubmit
Change-Id: I79d0abeb1b2be18e6ff88f0455b6de6540a37794
2020-10-20 15:17:33 -07:00
Yifan Hong 3dd40ccebe Merge "Reland "Check system manifest against frozen data."" 2020-10-20 20:25:21 +00:00
Yifan Hong ef7a971ded Do not build recovery-resource.dat if move_recovery_res_to_vendor_boot
If recovery resources are moved to vendor_boot, it also means
there's no recovery image to install. Don't build
recovery-resource.dat in this case.

Test: builds with cuttlefish with GKI
Bug: 156098440
Change-Id: I86db08d2dede6af644afadac54ff8beb853f4933
2020-10-20 13:18:04 -07:00
Yifan Hong 7a157b0319 Reland "Check system manifest against frozen data."
This reverts commit 8197702d73.

Test: lunch cf_x86_auto && m check-vintf-all 

Reason for revert: auto targets fixed in the same topic

Change-Id: I193416a4d0718e5790eb54e5c0674edc2d975632
2020-10-20 17:08:11 +00:00
Yifan Hong d7c6f4f966 Merge "Revert "Check system manifest against frozen data."" 2020-10-20 03:10:15 +00:00
Yifan Hong 8197702d73 Revert "Check system manifest against frozen data."
This reverts commit 843240c81a.

Reason for revert: breaks devices with cameraserver

Change-Id: Idedad49276fb928346cee68133e643602b79cd7a
Fixes: 171262706
2020-10-20 01:07:24 +00:00
Yifan Hong fe386d15f8 Merge "Check system manifest against frozen data." 2020-10-19 21:24:29 +00:00
Treehugger Robot 6a2135b6e6 Merge changes from topic "split_ramdisk"
* changes:
  Exclude board cmdline/dtb/pagesize/base in generic boot image
  Add BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT.
  Add BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE.
  Add GKI global variable.
2020-10-17 00:40:54 +00:00
Enrico Granata 1605938e8c Enable uploading ramdisk to target img.zip
For some devices, the img.zip package needs to contain the ramdisk
in order to enable device-specific flashing to work properly

This change adds a new flag BOARD_IMG_USE_RAMDISK to the possible
device Makefile configuration. If set to true, the build process
will insert ramdisk.img in the target-files.zip and img.zip
build outputs of "m dist". No change will occur for builds
that do not use this flag, or set it to a non-true value.

Bug: 168642807
Test: lunch trout_arm64-userdebug, m dist with and w/out
      BOARD_IMG_USE_RAMDISK added to Makefile;
      lunch aosp_cf_arm64-phone-userdebug, m dist
Change-Id: Id29408551cd41c11b96157248e238324a327043d
Merged-In: Id29408551cd41c11b96157248e238324a327043d
2020-10-16 10:02:02 -06:00
Jaegeuk Kim ed754fb339 Add build property to enable fscompression
Bug: 162253911
Bug: 110272315
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I3cb7d0a055a7f83c9d0321d2b16f11f40a74f7aa
Merged-In: I3cb7d0a055a7f83c9d0321d2b16f11f40a74f7aa
2020-10-15 17:10:25 -07:00
Yifan Hong aad34e5b7e Exclude board cmdline/dtb/pagesize/base in generic boot image
When building with BOARD_USES_GENERIC_KERNEL_IMAGE, even if BUILDING_VENDOR_BOOT_IMAGE
is not set, do not include board-specific cmdline, dtb, page size, and base in the
generic boot image.

This change drops buildvariant=* in the cmdline of the generic boot
image

Bug: 156098440
Test: manual. Deliberately set BOARD_KERNEL_CMDLINE for aosp_arm64 and
      ensure it doesn't go into the boot image.
Change-Id: I846f600058a4a9b349d55c9773d6dd81bbe49312
2020-10-15 14:58:34 -07:00
Yifan Hong 881df39d23 Add BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT.
This variable indicates whether recovery resources are moved to
vendor_boot. If true:

- $OUT/recovery.img will not be built
- $OUT/recovery/root will be included in vendor_boot ramdisk

Bug: 156098440
Test: set to true and check output
Test: `m target-files-package` and manually inspect output
Change-Id: I56dda56bab7def1540f4fb506323e3e605620cd4
2020-10-15 14:58:34 -07:00
Yifan Hong 63c5ca19ab Add BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE.
BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE removes kernel from the
recovery image.

Test: build recovery image and unpack_bootimg
Test: build target files and unpack_bootimg IMAGES/recovery.img
      on device with GKI and dedicated recovery partition.

Bug: 156098440

Change-Id: I5f37d74ed954b26fe3dd778708b6ab9cfdc51f1e
2020-10-15 14:58:34 -07:00
Yifan Hong 125d0b63b9 Add function to extract timestamp from boot image
Also add toybox to otatools list.

Bug: 169169031
Test: build OTA
Change-Id: Ib14dbf46a8385ccf2a9c5a9c6f4e7fa9399cf0ba
2020-10-15 19:32:39 +00:00
Yifan Hong 843240c81a Check system manifest against frozen data.
Test: m check-vintf-all
Bug: 37226359
Change-Id: I5ca5decedc101adf02792d0358b8e4ca102f1354
2020-10-14 21:07:05 -07:00
Treehugger Robot f3d4f2f26b Merge "Builds boot-debug.img if INSTALLED_BOOTIMAGE_TARGET." 2020-10-13 20:59:42 +00:00
Treehugger Robot cfa39194ad Merge "Package proguard_usage.zip files in jacoco-report-classes-all.jar" 2020-10-12 20:03:30 +00:00
Daniel Norman af67081218 Builds boot-debug.img if INSTALLED_BOOTIMAGE_TARGET.
This causes boot-debug.img to build if its main dependency
INSTALLED_BOOTIMAGE_TARGET (boot.img) is defined.

This fixes an issue where boot-debug.img was missing when
BUILDING_BOOT_IMAGE=false, but boot.img exists because the board uses
recovery as boot.

Bug: 170644849
Test: Build target that sets PRODUCT_BUILD_BOOT_IMAGE and
      PRODUCT_BUILD_RECOVERY_IMAGE false,
      observe no boot-debug.img.
Test: Build target that sets BOARD_USES_RECOVERY_AS_BOOT,
      observe boot-debug.img.
Change-Id: Ic887ea93d4c5181eca0f82c3cdf3ce3b72f4c185
2020-10-12 11:45:48 -07:00
Yifan Hong c75a3c5434 Merge "Add <ramdisk>/system/etc/ramdisk/build.prop." 2020-10-12 18:37:43 +00:00
Colin Cross e8ac9951d8 Package proguard_usage.zip files in jacoco-report-classes-all.jar
The coverage infrastructure will use the proguard_usage.zip files
to filter out classes that were stripped by R8.

Test: forrest
Bug: 170337718
Change-Id: Ia7c07770ff520aaf0a8de213edbe22d6fca5b98a
2020-10-09 18:41:58 -07:00
Yifan Hong 49ccbb3729 Merge "Build otatools files before building OTA packages." 2020-10-09 18:06:43 +00:00
Yifan Hong 33fd5d4277 Add <ramdisk>/system/etc/ramdisk/build.prop.
Add a build.prop file for ramdisk. Properties uses the
name ro.[product.]bootimage*.

These ro.[product.]bootimage.* properties are also included in recovery
properties.

The file is installed to system/etc/ramdisk/build.prop under ramdisk.

On devices with dedicated recovery partition, the file is
installed to ramdisk/, which is installed to the ramdisk in the boot
image. The file is NOT installed to recovery/root to prevent
collision.

On devices with recovery_as_boot, in addition to ramdisk/, it is also
installed to recovery/root, which is installed to the ramdisk in the
boot image.

Test: m bootimage and inspect output
Bug: 169169031
Bug: 162623577
Bug: 170411692
Bug: 170364317

Change-Id: Ica6515b2a4e0f4a7fe4440434a3d7085fde64387
2020-10-09 00:48:37 +00:00
Daniel Norman 42879ff536 Various fixes to PRODUCT_BUILD_<IMAGE> variables.
- Introduces PRODUCT_BUILD_VENDOR_BOOT_IMAGE.
  - Controls vendor_boot.img, replacing TARGET_NO_VENDOR_BOOT.
  - Matches the naming convention of other similar vars.
- Guards boot-debug.img behind BUILDING_BOOT_IMAGE
- Restructures BUILDING_BOOT_IMAGE to give priority to
  PRODUCT_BUILD_BOOT_IMAGE, as do other partitions.
- ^ for BUILDING_RECOVERY_IMAGE.

Test: PRODUCT_BUILD_{BOOT,RECOVERY,VENDOR_BOOT}_IMAGE := false
      m dist
      Observe no boot, boot-debug, recovery, or vendor_boot images.
Bug: 169968221
Bug: 170423509
Change-Id: I629bf08ba08e5db14c1bf92bb338fb3ce59d5b73
2020-10-08 22:31:52 +00:00
Yifan Hong 5c1b199b87 Build otatools files before building OTA packages.
Test: m otapackage, then check $ANDROID_HOST_OUT

Bug: 169169031
Change-Id: I0d943d6c5b4054783094c8eb38c6660e9c49e201
2020-10-08 09:51:36 -07:00
Jooyung Han a00c0f1f23 Merge "Use file_contexts for flattened apexes" 2020-10-06 03:26:14 +00:00
Yifan Hong fb54beb4f4 Merge "Fix boot-* to kernel-* dependency" am: 871e3c6032 am: eddd0d6967
Original change: https://android-review.googlesource.com/c/platform/build/+/1442279

Change-Id: Ia1d7ed6f106085438a2c9f1ee5c7e7e6875ffa18
2020-10-02 19:51:06 +00:00
Yifan Hong 871e3c6032 Merge "Fix boot-* to kernel-* dependency" 2020-10-02 18:43:12 +00:00
Yifan Hong 3e0b5d0355 Fix boot-* to kernel-* dependency
For example, if BOARD_KERNEL_BINARIES contains kernel-5.4, make sure
boot-5.4.img depends on kernel-5.4.

Test: remove kernel-5.4 from out directory then build boot image
Fixes: 169725104
Change-Id: I85624f3595c1a698bc27d19c73349138bb6e9e8c
2020-09-30 11:54:04 -07:00
Jooyung Han b27c2e8af9 Use file_contexts for flattened apexes
Because flattened apexes are installed in /<partition>/apex, associated
file_contexts file should be modified to accommodate path changes and
also merged into target-wide file_contexts.bin file.

Soong now emits modified file_contexts via LOCAL_FILE_CONTEXTS, and
these files are collected into a temporary file_contexts.modules.tmp
file, which is used as an additional input of file_contexts.bin.

Bug: 166518492
Test: m file_contexts.bin
      check the contents of file_contexts.concat.tmp file
Change-Id: I002a2294af9e06baeaf54bc5a9a5380d23b8a3da
2020-09-23 15:43:58 +00:00
Treehugger Robot c28696a085 Merge "remove unusued line_coverage.mk and build target" am: 89e9c8fbf1 am: 25d8e36d8e
Original change: https://android-review.googlesource.com/c/platform/build/+/1433466

Change-Id: I7cb7a2d99207e044b4bfe2aed81a14e557ac9cf2
2020-09-22 05:23:29 +00:00
Kris Alder d78384a42d remove unusued line_coverage.mk and build target
These are no longer used in favor of clang-coverage-based solutions.

Bug: 162767128
Test: n/a
Change-Id: I8014b6b5ec5d46789e19dc399c1aa8ebd79a3012
2020-09-21 23:19:53 +00:00
Bill Yi cf9e7f1929 Merge mainline-release 6664920 to master - DO NOT MERGE
Merged-In: I4bbc4aca7e21839ac5afd59cc3a13bf102138dd0
Change-Id: If6a82875aafd5d9d92763042e96b6f186efce004
2020-09-17 21:56:55 -07:00
Yifan Hong b9700337c6 Merge "Revert "Add modules partition."" am: 4e501b58b8 am: d90e24d120
Original change: https://android-review.googlesource.com/c/platform/build/+/1427713

Change-Id: I044ded925d9a011a6e31ef2b36967fe0cac380a5
2020-09-16 23:33:28 +00:00
Yifan Hong d90e24d120 Merge "Revert "Add modules partition."" am: 4e501b58b8
Original change: https://android-review.googlesource.com/c/platform/build/+/1427713

Change-Id: I57769fd76a42e5450ce284da0c81540d5d081b90
2020-09-16 23:23:13 +00:00
Yifan Hong 4e501b58b8 Merge "Revert "Add modules partition."" 2020-09-16 22:45:54 +00:00
Yifan Hong c08cbf0f4a Revert "Add modules partition."
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: Iec1d9421bbfeb114fb705f85d910c6def1f211b6
2020-09-15 19:09:26 +00:00
Bill Yi 5dc03ed7b4 Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE
Merged-In: I91b91ce6a1d3924bf575ed8c0da8e51116462e00
Change-Id: I5e265b127f1a85cb12b07fffae4ad32fa6fd1130
2020-09-13 07:58:37 -07:00
Joe Onorato 55c090ebe0 Merge changes I4a43604b,I7200f5f9,If3402a0a
* changes:
  Add CSV output of remaining makefiles for bp converstion
  Refactor the mongo main() into a class in mk2bp_catalog.py
  Add per-partition summaries and "easy" transitions to mk2bp_catalog
2020-09-11 05:46:48 +00:00
Yifan Hong b1e66600c0 Merge "Add modules partition." 2020-09-11 00:25:24 +00:00
Joe Onorato 3198607cfd Add CSV output of remaining makefiles for bp converstion
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.csv
Change-Id: I4a43604b2d536387c787b02a4627a0ad9e2a6ff9
2020-09-10 14:09:29 -07:00
Yifan Hong c0f187f5f9 Add modules partition.
Modules partition is a dynamic read-write partition.
- AVB is not enabled on the partition
- OTA is file-based; see follow up CL for details
- No build prop files; in particular, no build fingerprint
- No fs_config
- No notice files; notice files are included in individual APEXes

Test: build on CF
Bug: 163543381

Change-Id: Ie397b9ec61dfd1c158450d050196024604854d4d
2020-09-09 15:00:02 -07:00
Colin Cross b7c32f9021 Merge changes I3aa24904,I1f942dc0,If51d0f53,Ie27bdbd2 am: b9d0a2d4d5
Original change: https://android-review.googlesource.com/c/platform/build/+/1414178

Change-Id: I2b847ec608567e0125586ccf02cc1b16d9ebe645
2020-09-03 17:11:02 +00:00
Colin Cross 4cca7b1e20 Merge "Use rules to create partition compatibility symlinks" am: 801e69696e
Original change: https://android-review.googlesource.com/c/platform/build/+/1412822

Change-Id: Ic6613b9da1c1174ac63e1b6f1ea440b2c242fa99
2020-09-02 23:35:07 +00:00
Colin Cross e0dbbd4e9e Remove target-files-package from PARSE_TIME_MAKE_GOALS
It isn't doing anything useful that would be necessary to reparse the
Makefiles for.

Test: m target-files-package
Change-Id: I3aa2490480de8dbe0e57fe36221088c3f18017cb
2020-09-02 23:16:28 +00:00
Colin Cross cda30c73c9 Make dist zip files depend on files instead of images
Depend on the files instead of images so that the dist zip files
can run in parallel with the image generation rules.

Test: treehugger
Change-Id: I1f942dc0ce0a2cbc5288c1f0633ea1019e77f91c
2020-09-02 23:16:20 +00:00
Colin Cross 43f2eb286a Make dependencies of target-files.zip conditional
Depend on the files going into the images instead of the images
themselves when the images are not prebuilts.  This will allow
paralellizing image generation with target-files.zip.

Test: treehugger
Test: m installclean && m target-files-package has same files before and after
Change-Id: If51d0f53602c08bd946ec34a2edae6f9d95f7bf8
2020-09-02 23:16:12 +00:00
Colin Cross 8d900929c7 Remove INSTALLED_VBMETAIMAGE_TARGET dependency from target-files.zip
Remove the INSTALLED_VBMETAIMAGE_TARGET, which depends on all the
other images, it is no longer necessary after
If1eff317621882994e7dcbf37cd35f5bfa16b69a.  This will allow the
next change to parallelize target-files.zip with the image generation
rules.

Test: treehugger
Change-Id: Ie27bdbd2d414e9b475823639a1b3944fe0756d2a
2020-09-02 23:16:04 +00:00
Colin Cross 801e69696e Merge "Use rules to create partition compatibility symlinks" 2020-09-02 23:15:50 +00:00
Xin Li 37a9f38115 Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:03:45 +00:00
Colin Cross 6af7cbe855 Fix BOARD_PREBUILT_(VENDOR|ODM)_DLKMIMAGE support in target-files.zip
BOARD_PREBUILT_ODM_DLKMIMAGE support seems to have been forgotten
in target-files.zip, and BOARD_PREBUILT_ODM_DLKMIMAGE support had
a typeo.

Test: treehugger
Change-Id: I9663220b43f0df4f39a7ef432ad4cfec39803a20
2020-09-01 01:26:50 +00:00
Colin Cross a6de2ada15 Fix incorrect conditional comment in target-files.zip rule
Test: none
Change-Id: I15ced0acc9cf6f56c5094bb8e5aaa3957a9648cb
2020-09-01 01:26:33 +00:00
Ram Muthiah 9fe40ca37b Add bootloader to droidcore if built
Non-dist builds don't copy out the bootloader.
This change fixes that.

Bug: 167160541
Bug: 164917252
Test: local build
Change-Id: I9bab9ba3455e8abee9e7a38bff431a142e7d5a57
2020-08-31 19:31:50 +00:00
Xin Li c2fd58fe67 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ie00dbea32e074838466eeed00f316250c2b4f3c2
Change-Id: I9ee3441fd4d063b9dd489cb1b01d3dbc11332457
2020-08-29 01:19:44 -07:00
Ram Muthiah 2ad69ab090 Merge "Revert "Revert "Add prebuilt bootloader var and add bootloader t..."" 2020-08-28 04:04:24 +00:00
Colin Cross bd3821451a Use rules to create partition compatibility symlinks
Creating the symlinks between partitions (e.g /system/vendor to /vendor)
inside the packaging rules requires duplicating the creation in the
system.img rule as well as in the the target-files.zip rule, which can
cause the target-files.zip rule to fail in soong_zip when the symlink
is removed and recreated by the system.img rule.

Now that our Ninja fork supports symlinks in the build graph, move
the symlink creating to their own rules and add them to the list
of files that the image creation and packaging rules depend on.

Fixes: 161280160
Test: m nothing
Test: treehugger
Change-Id: I0f4d16b57b3052efb12a1f086506f1298c22ec84
2020-08-27 15:06:23 -07:00
Ram Muthiah 0c4a352409 Revert "Revert "Add prebuilt bootloader var and add bootloader t..."
Revert submission 1411608-revert-1402265-cf-x86-bootloader-XGKLNEQAPF

Reason for revert: Breakage originally caused by change was fixed. Refer to tracking bug for details.
Reverted Changes:
I89e95d4a6:Revert "Add prebuilt bootloader var and add bootlo...
I8fe199351:Revert "Added bootloader binary to cf x86 based ta...

Bug: 166380489
Bug: 164917252
Test: local build and Treehugger build
Change-Id: Ia895aedd77f2ec825aefecaf74c6dfc1ce631c93
2020-08-27 13:18:24 -07:00
Ankit Goyal 3c94b2710a Merge "Revert "Add prebuilt bootloader var and add bootloader to img zip"" 2020-08-26 06:54:34 +00:00
Ankit Goyal 6805873751 Revert "Add prebuilt bootloader var and add bootloader to img zip"
Revert submission 1402265-cf-x86-bootloader

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=adt3-userdebug&lkgb=6791187&lkbb=6791249&fkbb=6791216, bug 166380489
Reverted Changes:
Id67b7bddd:Add prebuilt bootloader var and add bootloader to ...
Id713eaf20:Added bootloader binary to cf x86 based targets

Change-Id: I89e95d4a6a0534c8217785be9b90632fa110bc41
2020-08-26 06:40:59 +00:00
Ram Muthiah 861f05fb83 Merge "Add prebuilt bootloader var and add bootloader to img zip" 2020-08-26 02:59:22 +00:00