Commit Graph

62997 Commits

Author SHA1 Message Date
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 11e5f33e2c Merge "Update ota script to match init's logic" 2020-10-16 23:10:37 +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
Julien Desprez 5fefac293d Merge "Update location of some files while moving them" 2020-10-16 20:00:22 +00:00
Treehugger Robot 07445235a8 Merge "Enable uploading ramdisk to target img.zip" 2020-10-16 19:48:22 +00:00
Tianjie b37c5be8cc Update ota script to match init's logic
In aosp/1459042, init has updated it's logic to use
ro.build.version.release_or_codename for fingerprint calculation.
The ota script needs the same update for ota targeting to work
correctly.

As a best effort to support pre-S dev stage builds, use
ro.build.version.release for sdk version < 30.

Bug: 170968068
Bug: 158483506
Test: unit tests, generate an OTA for S build
Change-Id: I01ca8a3b7b8b58f94b10f90ed0d27e688a72b866
2020-10-16 11:46:03 -07: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
Makoto Onuki e1faea86f9 Merge "Remove unneed jar files from the system partition" 2020-10-16 15:41:16 +00: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 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
Makoto Onuki 90ac5ae188 Remove unneed jar files from the system partition
Fix: 170967644
Test: boot
Test: Make sure the following jar files are removed
$OUT/system/framework/service-blobstore.jar
$OUT/system/framework/service-jobscheduler.jar

Change-Id: Ia5351d9d3b1dda7bf96e95bbaad171cd8c3b49fc
Merged-in: Ia5351d9d3b1dda7bf96e95bbaad171cd8c3b49fc
2020-10-15 13:06:58 -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 f2ef765168 Merge "Add function to extract timestamp from boot image" 2020-10-15 19:32:45 +00: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
Patrice Arruda e98d29b4ad Merge "Source vendorsetup.sh scripts anywhere within the repo." 2020-10-14 19:02:11 +00:00
Martin Stjernholm a530fa9825 Merge "Rename com.android.art module." 2020-10-14 17:56:42 +00:00
Patrice Arruda aa4b824d25 Source vendorsetup.sh scripts anywhere within the repo.
When sourcing the envsetup.sh script from a deep directory
inside of the repo, the vendorsetup.sh scripts are not being
sourced. This was causing the ANDROID_ENABLE_METRICS_UPLOAD
not to be set and developer's metrics were not being uploaded.
Provided the top directory to each directory path. Also cleaned
up the function to handle whitespacing correctly.

Bug: b/169699936
Test: *Ran source ../../build/envsetup.sh from external/libchrome dir
      *Renamed repo dir to "aosp master" and source build/envsetup.sh
      *Ran the script in zsh command line interpretor
      *Ran the script in MacOS
Change-Id: I96eb73d50a1923cdda782792778b0d185a341cf9
2020-10-14 15:33:44 +00:00
Rupert Shuttleworth 870ff764a6 Merge "Add abazel() function to envsetup." 2020-10-13 22:33:29 +00: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
Devin Moore 761f5fe164 Merge "Update vndk list for android.hardware.common.fmq" 2020-10-13 14:58:08 +00:00
Martin Stjernholm 1cced44791 Rename com.android.art module.
Paving the way for renaming the ART release APEX to com.android.art.

Test: m
Bug: 169639321
Change-Id: I55af4b3dcba48757e7fb65d5d4bc7517c91ae80f
2020-10-13 14:37:19 +01:00
Anton Hansson 20f517e1c3 Merge "Remove apidiff task and droiddoc jdiff support" 2020-10-13 07:08:13 +00:00
Rupert Shuttleworth 131fa7d866 Add abazel() function to envsetup.
Test: Tested manually on Linux and macOS.

Change-Id: I17f061c2d9135a7a309fc0750cc44cb30d455bc7
2020-10-13 04:26:09 +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
Steve Muckle a5e1dc4b1c Merge "Revert^2 "use new GKI kernel location"" 2020-10-12 00:42:56 +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
Devin Moore 68a3cef45e Update vndk list for android.hardware.common.fmq
Change created with update-vndk-list.sh for the new package.

Test: m
Bug: 142326204
Change-Id: Iecd2ad2fc2f00c0214dc3ad4bf60661b492c5e4f
2020-10-09 13:48:01 -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
Steve Muckle 0f0fa1a07d Revert^2 "use new GKI kernel location"
a0281768fe

This revert includes a fix to use the lz4 variant of the kernel,
as was the case before, rather than the uncompressed one.

Bug: 170451791
Change-Id: Iaab082d8bba04df82d742d682251447f3e21fe9b
2020-10-09 10:32:57 -07:00
Pete Bentley f00bfe0105 Merge "Add clean step to remove Soong's host copies of libconscrypt_openjdk_jni.so" 2020-10-09 10:22:30 +00:00
Pete Bentley 4c9c891fc4 Add clean step to remove Soong's host copies of libconscrypt_openjdk_jni.so
An ABI incompatible change along with inability to
express the JNI dependency can result in build failures, see
b/170311371#comment8 for how to reproduce.  Tested by using that
repro and verifying this clean step fixes it.  Hopefully the
path being removed is correct for all host platforms.

Fixes: 170311371
Bug: 170389375
Test: As described above
Change-Id: I95ea952bf31d8e9caa8c42d21f2db1968cbe9097
2020-10-09 08:42:13 +00:00
Xiao Ma f07902e84f Merge "Revert "use new GKI kernel location"" 2020-10-09 07:35:33 +00:00
Xiao Ma a0281768fe Revert "use new GKI kernel location"
Revert "Update kernel to builds 6888926"

Revert submission 1454075-2020-10-07-gki-update

Reason for revert: Looks like this topic changes caused daily build broken, the error log as:

error: +out/target/product/emulator_arm64/boot.img too large (34934784 > 33484800)

I tried to revert this topic first and then feel free to revert revert it.

Reverted Changes:
Ie74ca26e8:use new GKI kernel location
Ibff0d9638:Update kernel to builds 6889747
I693476e82:Update kernel to builds 6888926
I35d7f320c:Update kernel to builds 6888926
Id221a7a30:Update kernel to builds 6888926
I4421dbf67:remove kernel, kernel modules from cuttlefish_kern...
I991f9a6af:Allow downstream devices to customize vendor modul...
I598630e09:load kernel, kernel modules from updated locations...

Bug: 170451791
Change-Id: I4d8f18a7c80eb92cb475c48e1dcf04ceabd08984
2020-10-09 07:22:45 +00:00
Steve Muckle 1d83969db8 Merge "use new GKI kernel location" 2020-10-09 05:34:46 +00:00
Joe Onorato f09dce28d3 Merge "Refactor OWNERS files in platform/build/make." 2020-10-09 03:59:38 +00:00