Commit Graph

25289 Commits

Author SHA1 Message Date
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
Paul Duffin 58d6758ea1 Merge "Move boot jars package check to Soong" 2020-10-30 10:06:46 +00:00
Alistair Delva 38d49ca61a Merge "Allow flashing erofs system imgs" 2020-10-30 06:41:25 +00:00
Daniel Norman b8d52a2fdc Finds APK shared UID violations when merging target files.
This involved moving the find-shareduid-violation.py script to
releasetools to simplify the cross-tool usage. This new location aligns
this script with other similar python host tools.

In a future change this violation file will be used to check for
shared UID violations across the input build partition boundary.

Bug: 171431774
Test: test_merge_target_files
Test: Use merge_target_files.py to merge two partial builds,
      observe shared UID violations file contents in the result.
Test: m dist out/dist/shareduid_violation_modules.json
      (Checking that existing behavior in core/tasks is presereved)
Change-Id: I7deecbe019379c71bfdbedce56edac55e7b27b41
2020-10-29 09:33:26 -07:00
Paul Duffin bbd4fae4d7 Move boot jars package check to Soong
Passes the SKIP_BOOT_JARS_CHECK property through to Soong and removes
the boot jars check. Moves the check_boot_jars directory containing the
script and data file into build/soong/scripts.

Test: m check-boot-jars - for failing and passing cases
      verified manually that apart from path differences the same
      files (same check sum) were checked in both old make checks and
      the new Soong ones
Bug: 171479578
Change-Id: I61c128806065befce239bbdd5491567827e1b2f5
2020-10-29 11:07:55 +00:00
Yo Chiang e73c5a074d Fix missing required dependency caused by circular dependency
Fix a bug where if module A requires module B, and for whatever reason
module A and B have some common installed files, then all required
dependencies of the common files would be lost.

For example:
```
 # A requires B
ALL_MODULES.A.INSTALLED := a
ALL_MODULES.B.INSTALLED := a b
```

Right now the build system wouldn't generate any dependency for `a`.
However the correct behavior should be: `a` has a order-only dependency
on `b`.

Bug: 157444528
Test: Check generated build-*.ninja
Change-Id: Iec60231f6597ec46077393d1defa109b9c07b208
2020-10-29 10:48:17 +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
Joseph Murphy 77c15cb2d4 Changes Robolectric test suite tag to its own value to enable filtering these in ATP.
Bug: b/157635117
Change-Id: I7748ccbef3dd44d1a4a79e9ded5182607c83a20b
2020-10-28 01:09:18 +00: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 3b27e9104b Merge "Remove duplicate quotation marks in apkcerts list." 2020-10-26 19:05:00 +00:00
Yifan Hong a7a900e256 Merge "Export BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT to Soong" 2020-10-24 01:08:16 +00: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
Dan Shi e4d4188e4f Merge "Make *TS to include NOTICE file by default" 2020-10-23 16:09:35 +00:00
Martin Stjernholm 48d34d8ac0 Merge "Rename ART release APEX to com.android.art." 2020-10-23 10:03:24 +00:00
Dan Shi 413a53066b Make *TS to include NOTICE file by default
Bug: 170487545
Test: none
Change-Id: Ib3f726b847bc2123f0b564d0c3a8f5584720c021
2020-10-22 21:29:37 -07:00
Dan Shi 0b8473591c Merge "Package host shared lib for art-host-tests" 2020-10-22 17:39:58 +00:00
Dan Shi cb8655c3b9 Package host shared lib for art-host-tests
Bug: 169111770
Test: m art-host-tests
Change-Id: Ic5a9740977cd9a1f6bdfbbfef81116f7a3cf5e8a
2020-10-21 21:28:34 -07:00
Yifan Hong 21f97e27be Export BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT to Soong
Test: pass
Bug: 156098440
Change-Id: I84f26f7f12c53c0cc120c8122e75f68571794ac7
2020-10-21 15:44:03 -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
Julien Desprez b4553b74d7 Merge "Remove the hosttestlib.jar as it shouldn't be needed" 2020-10-21 17:55:15 +00:00
Martin Stjernholm c21bd0a42c Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: Ib2e87f9ddb8ea5e7ceb2db0ea12566c0bd58ca75
Merged-In: Ib2e87f9ddb8ea5e7ceb2db0ea12566c0bd58ca75
2020-10-21 15:41:02 +01: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
Treehugger Robot 8d9added3c Merge "Add BUILD_BROKEN_ENFORCE_SYSPROP_OWNER" 2020-10-21 00:26:34 +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
Julien Desprez 8d5158fdf0 Remove the hosttestlib.jar as it shouldn't be needed
This jar is not needed anymore

Test: make cts
Bug: 171326035
Change-Id: Idb4a6ff0b848b3d813bc0aba97ce9214a9532f44
2020-10-20 13:22:43 -07: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
Treehugger Robot fd8dae609f Merge "Revert "Remove env-var-allowlist"" 2020-10-20 19:58:46 +00:00
Daniel Norman 6a93af91dc Merge "Removes usage of TARGET_NO_VENDOR_BOOT." 2020-10-20 17:18:01 +00: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
Kousik Kumar 92f32615ed Revert "Remove env-var-allowlist"
Revert "Add -fdebug-compilation-dir option"

Revert submission 1461902-debug-compilation-dir

Reason for revert: "-Xclang" isn't being uniformly respected everywhere. For example, in ".S" compilations, when I pass `-Xclang -fdebug-compilation-dir=.", the assembler seems to be ignoring it and then inserting the `pwd` into the command, however when I pass "-fdebug-compilation-dir=.", it strips out the path to the current working directory.
This indicates that we need to update re-client's input processor so that we can pass -fdebug-compilation-dir=. without "-Xclang" and then remove `PWD` setting.
For now, I'll update this patch to pass both "-fdebug-compilation-dir=." and `PWD` and when RBE side fix is done, I'll remove `PWD` in a separate CL.

Reverted Changes:
Ib0f271e55:Add -fdebug-compilation-dir option
Ifa0592af5:Remove env-var-allowlist

Change-Id: I7c690b3e00d37dbcc8fbaa66dda49f39032be3ab
2020-10-20 05:52:49 +00:00
Yifan Hong d7c6f4f966 Merge "Revert "Check system manifest against frozen data."" 2020-10-20 03:10:15 +00:00
Yifan Hong ace5d21b67 Merge "Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT" 2020-10-20 01:51:11 +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
Inseob Kim 9d281d9271 Add BUILD_BROKEN_ENFORCE_SYSPROP_OWNER
In terms of sepolicy rules, every property should have an apporpriate
owner attribute, which can be one of: system_property_type,
product_property_type, or vendor_property_type. This will be enforced
for devices launching with S or later. Devices launching with R or
eariler can relax this by setting following under BoardConfig.mk:

BUILD_BROKEN_ENFORCE_SYSPROP_OWNER := true

See system/sepolicy/public/te_macros for more details.

Bug: 131162102
Test: system/sepolicy/tools/build_policies.sh
Change-Id: Iee05fc15beac1ccf61da4ea901a85b9d4068e0ca
2020-10-19 13:31:58 +09: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
Tianjie Xu 4df8556158 Merge "Make the ro.build.version.release consistent between device build prop & partition build prop" 2020-10-16 23:10:37 +00:00
Daniel Norman ad6293c098 Removes usage of TARGET_NO_VENDOR_BOOT.
- true -> PRODUCT_BUILD_VENDOR_BOOT_IMAGE=false
- false -> (removed, uses default option which builds vendor-boot.img
            if BOARD_BOOT_HEADER_VERSION>=3)

Bug: 170423509
Test: Inspect build artifacts from treehugger.
Change-Id: Id16fbda7fdfc70d62db389d6efb5201cb0d6d4e3
2020-10-16 15:10:21 -07:00
Julien Desprez 5fefac293d Merge "Update location of some files while moving them" 2020-10-16 20:00:22 +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 bea507259c Merge "Add build property to enable fscompression" 2020-10-16 06:06:14 +00:00
Kousik Kumar 3a7a960a86 Merge "Remove env-var-allowlist" 2020-10-16 05:52:51 +00:00
Tianjie e88ac677c5 Make the ro.build.version.release consistent between device build prop & partition build prop
The ro.build.version.release has updated to use the last stable platform
version in go/ab/10260813. But the logic for per-partition build prop
has never been updated. This mismatch eventually reflects in the
device's build fingerprints and cause confusion. This cl updates the
partition build props to match the behavior of the top level build props.

Also the device's fingerprints is heavily used in static analysis, e.g.
ota targeting, the change to its computation may cause unexpected effects.

Bug: 170968068
Bug: 158483506
Test: build system image for coral, check the build prop
Change-Id: Icf741c915f2eba970258979efc274e424187ac69
2020-10-15 18:31:00 -07: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 82b113d9c7 Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT controls whether GSI AVB keys are built
to vendor_boot. On devices without a dedicated recovery partition, GSI AVB
keys used to be built in boot. They are device-specific, so they should be
moved to vendor_boot.

Test: pass
Bug: 156098440
Change-Id: I0a5eaa1b39e88fcca9837c7aa3f475be47d5b0f2
2020-10-15 14:58:34 -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 d381f7336a Add GKI global variable.
Add BOARD_USES_GENERIC_KERNEL_IMAGE to be the global variable to
indicate the device uses GKI image.

Test: pass

Bug: 156098440

Change-Id: Ica553bbdb791e25dfa9bafb524ab2de5e3f8720d
2020-10-15 14:58:34 -07:00
Julien Desprez 79af9880ec Update location of some files while moving them
Test: make cts
Bug: 170967708
Change-Id: Icd7fa608eb7488574456e9409e0efefa909c92ea
2020-10-15 14:09:39 -07:00
Kousik Kumar 405847ac19 Remove env-var-allowlist
We no longer need to set PWD variable with the introduction of
`-fdebug-compilation-dir`, so removing env var allowlist of PWD variable
to RBE.

Change-Id: Ifa0592af519b6cc4364ee653f1a2174fd680bac1
2020-10-15 15:53:13 -04: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
Steven Moreland 1162536936 Merge "Reflect MALLOC_ZERO_CONTENTS default true." 2020-10-13 16:49:16 +00:00
Anton Hansson 20f517e1c3 Merge "Remove apidiff task and droiddoc jdiff support" 2020-10-13 07:08:13 +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
Steven Moreland 38c8824187 Reflect MALLOC_ZERO_CONTENTS default true.
See corresponding build/soong change. This change sets the android
platform to zero all heap allocations by default. To give some
intuition for why this is no so underperformant, zeroing memory is one
way of priming caches.

The main goal of this is to prevent accidental reliance on allocations
being zero, which is UB in C++. In some situations, allocations are
almost always guaranteed to be 0, and so resulting flakes can be
extremely rare.

Bug: 131355925
Test: allocated memory successfully getting zerod
Change-Id: I8c27fbc8c06420a15d022eb810595599d1e56aa0
2020-10-12 18:44:05 +00:00
Yifan Hong c75a3c5434 Merge "Add <ramdisk>/system/etc/ramdisk/build.prop." 2020-10-12 18:37:43 +00:00
Martin Stjernholm dee171a859 Merge "Make the build fail when the executable prebuilt target check fails." 2020-10-12 09:24:38 +00:00
Treehugger Robot 6d34f734ae Merge changes from topic "board-system-ext-sepolicy"
* changes:
  soong_config: Support SYSTEM_EXT* sepolicy vars
  soong_config: Plat->SystemExt*SepolicyDirs
2020-10-12 03:49:24 +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
Treehugger Robot 9b7cce9417 Merge "Various fixes to PRODUCT_BUILD_<IMAGE> variables." 2020-10-09 17:37:39 +00:00
Joe Onorato f09dce28d3 Merge "Refactor OWNERS files in platform/build/make." 2020-10-09 03:59:38 +00:00
Dan Shi a98b188e50 Merge "Add missing target-native-copy-pairs util" 2020-10-09 03:31:30 +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
Joe Onorato ba048cb758 Refactor OWNERS files in platform/build/make.
Pulls out all of the per-file rules into their relevant directories
and includes platform/build/soong:/OWNERS as the authoritative
list of approvers.

Test: treehugger
Bug: 170407947
Change-Id: Icb885fc25a638f2f5134f6223df656ef4438bb67
2020-10-08 16:14:44 -07: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 fa1349600e Merge "Revert "Add timestamp to ramdisk."" 2020-10-08 22:28:43 +00:00
Yifan Hong 0bbbc93c31 Revert "Add timestamp to ramdisk."
This reverts commit 7a532ab1e9.

Reason for revert: conflicts with device-specific sepolicy

Bug: 170364317
Bug: 170411692
Change-Id: I9e7094e5f7be6f2c53ed27c658530370d794a5e2
2020-10-08 22:14:44 +00:00
Anton Hansson 351a317cd5 Remove apidiff task and droiddoc jdiff support
Nothing uses these anymore.

Bug: 158465496
Test: m
Change-Id: Iaef4f7ca7e5d21b1850d7491247f13782c9bb23a
2020-10-08 19:06:21 +01:00
Dan Shi ab42cd0eb9 Add missing target-native-copy-pairs util
The function was in test/framework/build/utils/vtslab_package_utils.mk
It was removed as part of the cleanup of vts10.
Function target-native-copy-pairs is still used to package kernel native
tests.

Bug: 170339160
Test: m vts
Change-Id: I0097022f05fc9adc47a664c63a8341040b4af106
2020-10-08 10:13:40 -07: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
Treehugger Robot 396b0a2074 Merge "Add timestamp to ramdisk." 2020-10-08 03:50:37 +00:00
Jesse Hall a16690c38c Skip unneeded notice files for DATA modules.
Non-installable generated intermediate data modules can have
notice files attached when they're defined in the same LOCAL_PATH
as the installable module that depends on them. This makes uninstallable
DATA modules silently ignore the fact that the build doesn't know where
to install the notice file.

Bug: 160248517
Test: build
Change-Id: I09a8a253dda52c2d78a1ebc0c33cd96e3505e2e3
Merged-In: I09a8a253dda52c2d78a1ebc0c33cd96e3505e2e3
2020-10-07 14:01:12 -07:00
Martin Stjernholm bf4e8f4708 Make the build fail when the executable prebuilt target check fails.
Amends https://r.android.com/1439191; I realised echo-error doesn't
imply a false status.

Test: m art-check-{release,debug,testing}-apex-gen-fakebin
  without https://r.android.com/1441933.
Bug: 169375644
Change-Id: Ice75aeab30120e781df50a28c3dce3874ec0bfd1
2020-10-07 21:04:51 +01:00
Felix Elsner d7df770c4a soong_config: Support SYSTEM_EXT* sepolicy vars
The new variable name reflects its actual usage.

Keep compatibility with BOARD_PLAT_* because it has been a
convention for years. Also add warning messages for BOARD_PLAT_*
variables via KATI_deprecated_var.

Test: `make selinux_policy` with
      `SYSTEM_EXT_{PUBLIC,PRIVATE_SEPOLICY_DIRS}` set,
      observe additions in `$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/selinux`

Signed-off-by: Felix Elsner <google@ix5.org>
Change-Id: I58c64839cc513ae082cd3ee3c1e108843ea7439e
2020-10-07 15:56:52 +08:00
Felix Elsner 501ca68fd5 soong_config: Plat->SystemExt*SepolicyDirs
Align with changes in build/soong and system/sepolicy.

Test: build

Signed-off-by: Felix Elsner <google@ix5.org>
Change-Id: I73b773a4fb0bd626a989251d5c61381fcafaa1eb
2020-10-07 15:56:03 +08:00
Yifan Hong 7a532ab1e9 Add timestamp to ramdisk.
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 boot/etc/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

Change-Id: I94b993ce3214356036d038b6db57c4e1b755c111
2020-10-06 16:10:38 -07:00
The Android Open Source Project a4c45b8d52 DO NOT MERGE - Merge RP1A.201005.006
Bug: 168212094
Merged-In: Id3cbd4d6528f827eba6ac410ba2eb92d91d40901
Change-Id: Ic9c7b4d7339ab624418c1fbc95e66674cffdef71
2020-10-06 16:48:22 +00:00
Treehugger Robot 70b4738324 Merge "Remove build tasks for vts10" 2020-10-06 03:30:31 +00:00
Jooyung Han a00c0f1f23 Merge "Use file_contexts for flattened apexes" 2020-10-06 03:26:14 +00:00
Treehugger Robot b1fbb747b8 Merge "tasks: find-sharedui-violation: Partition location" 2020-10-06 02:14:47 +00:00
Dan Shi 82c4cb74c6 Remove build tasks for vts10
Bug: 169581727
Test: build
Change-Id: I865553ae07bc6eac3b90f87a494537102c398280
2020-10-05 10:17:21 -07: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
Po-Chien Hsueh e3b44f551c Filter out host paths on platform-availability-check errors
If a module, which is installed to both the host and the platform,
fails the platform-availability-check, the build system might use
the host install path to report errors. Filter out the host install
path so that the platform install path is used.

Bug: 169393514
Test: make
Change-Id: Ib39715ffc45cc32e3bd7ce5f2a3725d243f3237f
2020-09-30 08:18:03 +00:00
Yifeng Zeng d17bffd01f Copy generated $(SOONG_OUT_DIR)/module_bp_java_deps.json file to dist when SOONG_COLLECT_JAVA_DEPS flag is set.
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true SOONG_COLLECT_JAVA_DEPS=true TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist DIST_DIR=/usr/local/google/home/yifengzeng/temp EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device" tests

Bug: 168755196
Change-Id: Id13d3a4579734bc70bc0ce3463a05ee9a052f1dc
2020-09-28 23:16:51 +00:00
android-build-team Robot ea883a88bf Version bump to RP1A.201105.002 [core/build_id.mk]
Change-Id: Ia242f24f086a1b16507923f96ae8eb76983172d9
2020-09-28 20:59:20 +00:00
Martin Stjernholm 0de50208a3 Merge "Do not chmod the symlink target when a prebuilt binary is symlinked." 2020-09-28 13:02:33 +00:00