Commit graph

2550 commits

Author SHA1 Message Date
Steve Muckle
f84668e1da Enable non-v3 recovery image with v3 boot image
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.

Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
2020-04-14 13:03:58 -07:00
bohu
8fd437c80a emulator: enable vendor boot image
BUG: 149826779
Test: Build x86, x86_64, armv7 and arm64
make sure x86/64 boot to home screen;
armv7/arm64 can pass disk mounting stage

Change-Id: I258b69bd0cdc4fb0a99b1a04567051e8d32c389a
2020-04-06 14:05:28 +00:00
Treehugger Robot
40ddffe600 Merge "fix boot-test-harness.img build" 2020-04-03 15:33:31 +00:00
Steve Muckle
4866bd6bff fix boot-test-harness.img build
The recently added support for multiple kernels and boot.img files
missed the boot-test-harness.img.

Bug: 152464066
Change-Id: I6e146a0702bc933e0b62f36dc34aba913e57316f
2020-04-02 12:37:04 -07:00
Luca Stefani
033c7eb82f Reland: Remove empty newline in build.prop
Before:
cat build.prop

\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

After
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

Change-Id: I8365bb59ad22a3bd9fc1dc904ff2026ddd7abe06
Test: m
2020-04-01 12:55:27 +02:00
Tianjie Xu
a3541df291 Merge "Add aftl inclusion proof" 2020-03-31 22:12:46 +00:00
Bo Hu
c969dcc0b2 Merge "Revert "Remove empty newline in build.prop"" 2020-03-31 21:27:21 +00:00
Bo Hu
76a005da8d Revert "Remove empty newline in build.prop"
This reverts commit 96a79c6f65.

Reason for revert: b/152899887
original cl leads to build.prop getting longer and longer
from 60+ to 1k+ lines and keep increasing

Exempt-From-Owner-Approval:
BUG: 152899887

Change-Id: I83ed1702009278014c77d7e7a7305756041564de
2020-03-31 21:26:58 +00:00
Bill Peckham
19c3feb2d3 Build merged apexkeys.txt/apkcerts.txt by partition.
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.

Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
2020-03-30 22:33:27 +00:00
Oliver Nguyen
337f42e7d1 Merge "Export llvm-profdata for Clang coverage builds." 2020-03-30 20:38:22 +00:00
Luca Stefani
96a79c6f65 Remove empty newline in build.prop
Before:
cat build.prop

\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

After
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh

Change-Id: I55a9cdc9a93e2d72ba4db97fef4c5e8c67421026
Test: m
2020-03-27 12:38:25 +00:00
Treehugger Robot
1973f86ffd Merge "support multiple kernels, boot.img output" 2020-03-25 18:23:15 +00:00
Steve Muckle
b3dda77f2a support multiple kernels, boot.img output
In order to enable the delivery of multiple kernel variants with
a platform build, add support for generating boot.img files from
multiple kernels.

The BOARD_KERNEL_BINARIES macro may be defined as a list of kernel
binaries to be used (if not, the original behavior and assumption of a
single kernel binary is preserved). Each kernel binary filename
must begin with "kernel". Any extra text in the filename is appended
to the boot.img name, so "kernel-gz" would generate "boot-gz.img".

Bug: 151094943
Change-Id: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
2020-03-24 11:27:57 -07:00
Tianjie Xu
eaed60c1a1 Add aftl inclusion proof
The otatools should talk to the aftl server and append the inclusion
proofs when building the vbmeta image. We should only do this during the
signing process when the network is always available.

Also the inclusion proof doesn't impact the final vbmeta image size on
coral, where the final size is 8192 after padding. This is below the
physical image of 65536.

Bug: 147870995
Test: unit tests pass, run sign_target_file_apks
Change-Id: If84c6bf5198c9b05f5e0c16ae6335971915f47e3
2020-03-18 13:11:41 -07:00
Yifan Hong
69430e65fe Also check empty SKU if SKUS are not defined
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.

Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.

Bug: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
2020-03-17 20:27:32 -07:00
Yifan Hong
28ffd73591 Proper checks for vendor and ODM SKUs
If DEVICE_MANIFEST_FILE / ODM_MANIFEST_FILES is set, also include check
for empty vendor / odm SKU, respectively. Then, do cross product of
vendor SKUs and ODM skus, and check each possible combination.

Test: build with and without vendor skus
Test: m check-vintf-all
Bug: 148601741

Change-Id: I23cc81998e7afc36c43540bf6d615b4d4b288447
2020-03-13 18:32:07 -07:00
Aurimas Liutikas
cd80e3b9eb Remove unnecessary dependency.
This dependency is now defined in ALL_SDK_FILES.

Test: lunch sdk; make sdk
Change-Id: Ia740466e493d745d83039ba9991547a6c2d3bd2c
2020-03-12 16:12:27 -07:00
Oliver Nguyen
b02f7dbaa4 Export llvm-profdata for Clang coverage builds.
This tool must match the one used to compile the source code for
compatibility.

Bug: 143977934
Test: m CLANG_COVERAGE=true dist
Change-Id: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
2020-03-10 17:07:58 -07:00
Dan Willemsen
395358edae Trim down dont_bother_goals
This had caused the nodeps targets to break when I added the
auto-cleanup feature, as we wrote out smaller lists of what was
installed. The functionality of dont_bother_goals is also being fixed in
https://android-review.googlesource.com/c/platform/build/+/1250929/

But there's also no reason to have all of these targets in
dont_bother_goals, as they can just re-use the cached kati build graph.

Bug: 149460609
Test: m systemimage && m snod    <did not delete everything>
Test: m snod    <still see warning>
Test: codesearch for uses of MAKECMDGOALS and these targets
Change-Id: Ib8e7ba67e5ad980be4bdcf521c5156eea7941f97
2020-03-05 00:21:25 +00:00
Bob Badour
4b25c90e52 Partition the targets for notice files.
Partition the targets into those appearing in system images, those
appearing somewhere unreadable by the Settings UI, whose notices
must appear in a readable system image, and those not appearing
on the device thus not needing notices. Assert no other targets
appear under $(PRODUCT_OUT).

Test: manually built and tested phone image

Change-Id: If82cb36f98f8e6066d1c67bb4d15976be433d403
2020-02-26 16:49:28 -08:00
Treehugger Robot
733ad20963 Merge "do not clear output kernel module directory" 2020-02-21 01:02:09 +00:00
Steve Muckle
5e0ff33d0f do not clear output kernel module directory
When using an archive to provide kernel modules, the archive is directly
expanded into the output directory. The output directory is currently
removed prior to that to ensure no stale modules are present if they
were removed as part of a change in an incremental build.

Unfortunately if kernel modules are also provided via the regular
BOARD_*_KERNEL_MODULES macros, the removal of the output kernel module
directory will race with the copying of kernel modules in
BOARD_*_KERNEL_MODULES, resulting in some of those kernel modules not
being present in the output.

Kernel modules removed from BOARD_*_KERNEL_MODULES do not currently get
removed from the output directory in an incremental build anyway. So in
order to support using BOARD_*_KERNEL_MODULES and
BOARD_*_KERNEL_MODULES_ARCHIVE conurrently, take out the removal of the
output directory prior to archive expansion.

Bug: 149866863
Change-Id: Ib373650ddcb0fb5782a13d68a8869a9117e42ccc
2020-02-20 10:19:06 -08:00
Treehugger Robot
31d4a5aed7 Merge "Adding vendor_boot-debug.img" 2020-02-20 03:56:58 +00:00
Treehugger Robot
62eee30f34 Merge "Support empty jacoco-report-classes.jar" 2020-02-19 20:30:46 +00:00
Kyriakos Ispoglou
54839bb77e Merge "Add a new make target called haiku-line-coverage" 2020-02-19 19:07:20 +00:00
Treehugger Robot
6ed2deb9d5 Merge "build: Add vendor.prop and odm.prop capability" 2020-02-18 21:45:08 +00:00
Bowgo Tsai
6a68367e6e Adding vendor_boot-debug.img
Commit I30137c3caef91805d9143d404e5e4d06c0fccc30 adds boot-debug.img
to allow adb root with an user build GSI image.

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

Another commit I5b005097b73f59857c3a2f92d693b3e67ee8424e adds
vendor_boot.img to pair with a generic kernel image, the GKI boot.img.

To allow adb root for devices using a GKI, vendor_boot-debug.img is
introduced. The image combination used in VTS will be:

    Old devices without GKI:
      GSI system.img + boot-debug.img + vendor.img, etc.

    New devices with GKI:
      GSI system.img + GKI boot.img + vendor_boot-debug.img + vendor.img, etc.

Note that boot-debug.img still can be used on new devices for
non-compliance scenario.

Bug: 147849477
Test: lunch aosp_cf_x86_64_phone-userdebug; make vendorbootimage_debug
Test: `make dist`, checks that both vendor_boot-debug.img and
      vendor-ramdisk-debug.cpio.gz are in $OUT/ and out/dist.
Test: `make dist`, checks that installed-files-vendor-ramdisk-debug.{json,txt} are
       in $OUT/ and out/dist.
Change-Id: I66b662d8b1e5c619ed7bb81e40233fe9df363b27
2020-02-18 13:46:17 +08:00
Kyriakos Ispoglou
f00a0dbffc Add a new make target called haiku-line-coverage
This CL adds a new make target for line coverage, That is, by running
`make haiku-line-coverage` you can get a set of all profile (*.gcno) files
for all fuzz targets and for all critical components of Android,
packed into a zip called `line_coverage_profiles.zip`. Furthermore the set of
all fuzz targets are instrumented with line coverage and packed into
another zip called `line_coverage_fuzz_targets.zip`

To properly run the make target enable NATIVE_LINE_COVERAGE first:
NATIVE_LINE_COVERAGE=true NATIVE_COVERAGE=true COVERAGE_PATHS=* make haiku-line-coverage

Bug: b/148234755
Test: Make target buils successfully on master/aosp. Binaries tested on taimen
devices.

Change-Id: I6a1e11068119337628c2ae5ee3baf2fc394add05
2020-02-17 11:18:11 -08:00
Colin Cross
d81f4b3461 Support empty jacoco-report-classes.jar
If EMMA_INSTRUMENT is turned on but no APKs were built the rule to
collect jacoco-report-classes.jar would error with missing directories
and an empty zip file.  Switch to soong_zip, which doesn't error
on empty zip files, and hide the errors if $(TARGET_COMMON_OUT_ROOT)
or $(HOST_COMMON_OUT_ROOT) don't exist.

Test: m EMMA_INSTRUMENT=true TARGET_BUILD_APPS=Camera2
Change-Id: I09e30e37dc38f32f55b3f91bfc4d12c9e753083f
2020-02-14 10:36:47 -08:00
Tamas Petz
89418f058e core/Makefile: pass value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE
Regardless of the value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE
"use_dynamic_partition_size=true" is passed to build_image.sh.
Pass the value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE just like it is
done for other properties.

Test: 1. build a target with fixed partition sizes and
         "PRODUCT_USE_DYNAMIC_PARTITION_SIZE := false".
      2. check the value of "use_dynamic_partition_size" in the
         corresponding system_image_info.txt.
      3. repeat steps 1 and 2 with this fix and see the difference.

Change-Id: Ia121d3d67f554f8ae4e211ad4e2c381a43409f01
2020-02-10 11:34:48 +01:00
Rashed Abdel-Tawab
194ed8e88d build: Add vendor.prop and odm.prop capability
This replicates the longtime existing handling of system.prop,
as well as the recently added handling of product.prop.

Change-Id: I8ab2b29bd0b5f0f2bcc0928d6a2a871c40582d3f
2020-02-01 22:53:52 +00:00
Baligh Uddin
6a8234bf43 Add mke2fs.conf to otatools
BUG: 148452817
2020-01-29 17:42:59 -08:00
Yifan Hong
67f58406ee Merge "Disallow VINTF metadata for PRODUCT_COPY_FILES" 2020-01-30 00:50:59 +00:00
Baligh Uddin
0434412bcd Merge "Add explicitly merge_zips to otatools package" 2020-01-29 06:16:16 +00:00
Tianjie Xu
a25d76f2c8 Add explicitly merge_zips to otatools package
Since it's under soong/out/host, we need to explicitly copy it into the
otatools.zip

Bug: 146508800
Test: build and check otatools.zip
Change-Id: I83e201601cf03b6eb01ead912a78f22f750aa4be
2020-01-28 19:17:35 -08:00
Daniel Rosenberg
dac25a96df Merge "Add build properties to enable casefold and prj_quota" 2020-01-28 23:53:25 +00:00
Daniel Rosenberg
6cc2c81f4d Add build properties to enable casefold and prj_quota
This adds the ability to format f2fs and ext4 in a way that supports
casefolding and project quotas. Project quotas require wider inodes, and
thus cannot be enable apart from at build time. Casefolding can be
configured with f2fs.fsck/tune2fs later.

Both features are enabled via inheriting emulated_storage.mk in the
device.mk

Bug: 138322712
Bug: 138321217
Test: Enable on device with related patches, view fs configuration on /data
Change-Id: Ib1ab0589006ff1b3fb7478b7e9b0a8aad71e4b09
2020-01-27 12:45:47 -08:00
Tianjie Xu
eb8a0a0036 Add apexer and dependencies to otatools
We need them to extract and repack the apex file when signing
the apex.

Bug: 146508800
Test: build
Change-Id: Ib38055eac24f28ac59610d03275de05b77d3eeb0
2020-01-27 11:05:54 -08:00
Yifan Hong
5e57a778cd Disallow VINTF metadata for PRODUCT_COPY_FILES
VINTF metadata must be checked by defining
DEVICE_MANIFEST_FILE and friends, instead of being
copied with PRODUCT_COPY_FILES directly.

This can be worked arond with BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES.

Test: Add the following and see errors:

PRODUCT_COPY_FILES += \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/manifest/foo.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/manifest/foo.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/etc/vintf/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/etc/vintf/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/compatibility_matrix.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_ODM)/etc/manifest.xml \
    device/XXX/manifest.xml:$(TARGET_COPY_OUT_ODM)/etc/vintf/manifest.xml \

Test: test again with BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES := true

Bug: 147506249

Change-Id: Id75a9690b3c71fdc9a4e1b4e9be2caa63183cf7c
2020-01-24 15:07:35 -08:00
Yifan Hong
af9b0701e3 Do not check VINTF if no files
Do not check VINTF integrity / compatibility if
no files are built to /system/etc/vintf/* or /vendor/etc/vintf/*.

Test: m check-vintf-all on gsi_gms_arm64
Test: m check-vintf-all on coral

Fixes: 147749718
Fixes: 148007775

Change-Id: I874d1558e0b891b9d307eec536b1071d382a43f5
2020-01-21 13:21:52 -08:00
Yifan Hong
605ea043c8 Reland "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
This reverts commit d00ebcd740.

Reason for revert: reland CL

Test: m check-vintf-all

Change-Id: I6544197048a18745c80a954b9eccf69e7e438e9d
2020-01-14 14:25:31 -08:00
Yifan Hong
bcd46bc540 Reland "Add check-vintf-all target."
This reverts commit 152a783e2b.

Reason for revert: reland CL

Test: m check-vintf-all

Change-Id: I80fc789313edd3a9cc439a0b3a81e524e39b41b1
2020-01-14 14:25:16 -08:00
Harry Zhang
152a783e2b Revert "Add check-vintf-all target."
Revert submission 1202895-build_time_vintf

Reason for revert: Build breakage at b/147648187
Reverted Changes:
I9791abc44: Improve BUILT_ASSEMBLED_*_MANIFEST checks
I6ee79910d: Add check-vintf-all target.

Change-Id: I6d9fd1747eaea492a3ebfe98c13ea4a5a2d22a33
2020-01-14 18:40:23 +00:00
Harry Zhang
d00ebcd740 Revert "Improve BUILT_ASSEMBLED_*_MANIFEST checks"
Revert submission 1202895-build_time_vintf

Reason for revert: Build breakage at b/147648187
Reverted Changes:
I9791abc44: Improve BUILT_ASSEMBLED_*_MANIFEST checks
I6ee79910d: Add check-vintf-all target.

Change-Id: If580207415d6ca54eb5fc653efc54d07b086f804
2020-01-14 18:40:23 +00:00
Yifan Hong
8bdfe365d6 Improve BUILT_ASSEMBLED_*_MANIFEST checks
They are moved into check-vintf-all, which is more
accurate and do not require building full OS images.

Also move kernel check code down to check_vintf_compatible. There
is no assembled manifest to put kernel configs now, but they are still
required for build time OTA VINTF checks.

Test: builds
Test: change a vintf_fragment file to cause a conflict with main manifest file
(add health@2.0 to boot@1.1.xml), and check_vintf_vendor_log fails

Change-Id: I9791abc440a40e1537b4387eb67575ff2e22df08
2020-01-11 19:06:18 +00:00
Yifan Hong
850f8b5d77 Add check-vintf-all target.
Add target that checks VINTF compatibility of the current build
(in $PRODUCT_OUT) properly. The target:

- Doesn't require a full build
- Won't run for system-only AOSP targets

A verbose log is printed if `m check-vintf-compatible` is executed,
but it won't show up if `m` is executed.

(After this patch, adding product / system_ext matrices is as simple
as defining a vintf_compatibility_matrix in Soong, and VINTF
compatibility is properly checked.)

Test: m check-vintf-all
Test: delete */etc/vintf and m check-vintf-all
Test: m
Test: m check-vintf-all on device with vendor/odm and ODM SKU-specific
      manifests

Test: change manifest.xml to be incompatible and m check-vintf-all fails

Bug: 140280874
Bug: 140360109

Change-Id: I6ee79910d745d29cfc9b05b1435e26f91b7c10f7
2020-01-10 13:17:56 -08:00
Daniel Mentz
30652b3380 Add unpack_bootimg to otatools to modify boot.img
unpack_bootimg in conjunction with mkbootimg can be used to re-create
boot.img with a different kernel image and ramdisk.

Change-Id: I9615facc9335885989772a0dd7f08217e2143a45
2020-01-04 15:25:42 -08:00
Daniel Mentz
4d6017d519 Dist ramdisk-recovery.img and misc_info.txt
Dist ramdisk-recovery.img and misc_info.txt. This is useful for
re-creating boot.img without having to download a huge target_files zip
file.

Change-Id: I2e1c1d547c95ca3433f89c68428c0c98fa4d19cd
2019-12-23 18:35:17 +00:00
Jiyong Park
22195346dd apex-libs-absence checks are removed
The check is implemented in Soong via the apex_available property.
For a module that should be in the APEX named "foo" and shouldn't be in
any other APEX and also in the platform (the non-updatable part), the
property can be set to "foo" (without "//apex_available:platform")
to express the restriction and then Soong will enforce it.

Bug: 128708192
Test: m
Change-Id: Ia1aaaacd685f466447b61deae2849cb0aa83def3
2019-12-23 03:41:59 +00:00
Treehugger Robot
8e3bc2d4ce Merge "Adding missing dependencies for vbmetaimage-nodeps" 2019-12-16 04:47:56 +00:00