Commit Graph

59483 Commits

Author SHA1 Message Date
Mark Salyzyn fbb45227c0 llkd: moved from optional to required component
The Live Lock Killer Daemon (llkd) has provided enough hero moments to
improve system stability, by providing actionable collection of data
to resolve kernel, and some user space, misbehaviors.  It is time to
move llkd to a required component.

NB: For llkd to be effective at finding real kernel live lock
conditions, system requirements are that there are no more un-waited
for Zombie processes, and that no kernel drivers use indeterminate
periods of uninterruptible sleep.  Any kernel and user space tasks
that are killed because of suspicious behavior, must themselves have
a benefactor to restart them if necessary.  If a true live lock is
discovered, data will be collected and the kernel will be panic'd to
recover from the situation.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 164946924
Test: llkd is ever present on a release build.
Change-Id: I986a8545252bc5b68d09a6a0f4f506a58998c8a0
2020-09-08 07:58:16 -07:00
Treehugger Robot 6a052b1118 Merge "Set PRODUCT_PRODUCT_VNDK_VERSION from product_config.mk" 2020-09-08 04:30:04 +00:00
Treehugger Robot cd2430855d Merge "fix a typo for single PRODUCT_PRODUCT_VNDK_VERSION" 2020-09-08 04:30:04 +00:00
Justin Yun 70f7dbaf21 Set PRODUCT_PRODUCT_VNDK_VERSION from product_config.mk
As a product variable, PRODUCT_PRODUCT_VNDK_VERSION cannot be defined
in config.mk. Instead it can be defined from product_config.mk.

Bug: 144534640
Test: check if the following command returns empty value
      $ PRODUCT_USE_PRODUCT_VNDK_OVERRIDE=false \
        get_build_var PRODUCT_PRODUCT_VNDK_VERSION
Change-Id: I304fb980610aec1dd5da05864b4c137997fc9aff
2020-09-07 19:29:45 +09:00
Kelvin Zhang 49fe034137 Merge "Generate partition timestamps in ota_from_target_files" 2020-09-04 12:22:22 +00:00
GeQi 6e44e3d1e4 fix a typo for single PRODUCT_PRODUCT_VNDK_VERSION
Bug: 144534640
Test: build

Signed-off-by: GeQi <geqi@xiaomi.com>
Change-Id: I5bf47abd70e84e89930846c25b2592dac1100082
2020-09-04 14:08:57 +08:00
Kelvin Zhang 39aea44a96 Generate partition timestamps in ota_from_target_files
Test: make an OTA package
Bug: 162553432
Change-Id: I17b9f1b24307255b1e5115de12fa516126b32365
2020-09-03 14:04:21 -04:00
Colin Cross b9d0a2d4d5 Merge changes I3aa24904,I1f942dc0,If51d0f53,Ie27bdbd2
* changes:
  Remove target-files-package from PARSE_TIME_MAKE_GOALS
  Make dist zip files depend on files instead of images
  Make dependencies of target-files.zip conditional
  Remove INSTALLED_VBMETAIMAGE_TARGET dependency from target-files.zip
2020-09-03 16:56:39 +00:00
Treehugger Robot 89d7b8aef7 Merge "AutoGen: Support NativeTest with vendor namespace." 2020-09-03 02:26:10 +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
Tim Van Patten 27ca29a3c7 Merge "Indicate ANGLE is present on devices" 2020-09-02 14:47:47 +00:00
Treehugger Robot 58c793ab0b Merge "Add ota_metadata_pb2 to otatools.zip" 2020-09-02 09:35:10 +00:00
Kelvin Zhang 4d50ea4dd7 Add ota_metadata_pb2 to otatools.zip
Sometimes tests are being run by executing python -m unittest *.py. In
that case, invocation will fail due to missing ota_metadata_pb2, which
is auto generated from ota_metadata.proto(added in recent change).

Bug: 166718341
Test: unzip otatools.zip and python releasetools/test_utils.py
Change-Id: I597c7ef6dbd8e46ccde020b3122cc38a8df28dc9
2020-09-01 16:58:08 -04:00
Tim Van Patten d38244210f Indicate ANGLE is present on devices
The system property ro.gfx.angle.supported needs to be enabled when
ANGLE is included in a build to indicate to the platform and CTS tests
that ANGLE is present on the device.

Test: atest CtsAngleIntegrationHostTestCases
Bug: 157670307
Merged-in: Ide4e3d8f78d3748d557a47ecd153d66694fd1e3a
Change-Id: I72ba8731fed36dbc594dae88aaa00a6299e8f4ae
2020-09-01 13:26:18 -06:00
Tianjie Xu f55227e25f Merge "Add per-partition build info into ota metadata" 2020-09-01 18:43:30 +00:00
Martin Stjernholm a24c0fe655 Merge "Preserve symlinks in the Soong prebuilt install steps for host binaries and shared libs." 2020-09-01 10:32:49 +00:00
Treehugger Robot 2a476f6908 Merge "Unset USE_GOMA when using RBE." 2020-09-01 06:23:02 +00:00
Treehugger Robot fbecdcf958 Merge changes I9663220b,I15ced0ac
* changes:
  Fix BOARD_PREBUILT_(VENDOR|ODM)_DLKMIMAGE support in target-files.zip
  Fix incorrect conditional comment in target-files.zip rule
2020-09-01 05:13:31 +00:00
Tianjie Xu 6f2a44a0d9 Merge "Add more enums to the ota type" 2020-09-01 03:16:59 +00:00
yangbill 85146e5e82 AutoGen: Support NativeTest with vendor namespace.
Set the TEST_ROOT to /data/local/tmp/tests/vendor if LOCAL_VENDOR_MODULE or
LOCAL_USE_VNDK be set, if not, set to /data/local/tmp.

Bug: 138450837
Test: atest binderVendorDoubleLoadTest
Change-Id: I66437816227458a4f5672146b0c9e465c843aa50
2020-09-01 10:33:47 +08: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
Treehugger Robot c73b31bf2a Merge "Add bootloader to droidcore if built" 2020-09-01 00:33:40 +00:00
Martin Stjernholm 49a4e9b52e Preserve symlinks in the Soong prebuilt install steps for host binaries
and shared libs.

If a prebuilt module file is a symlink in the .intermediates tree it is
preserved when copied to the final install location. This preserves
symlinks to prebuilt binaries, so that they are run from their prebuilt
source location and can find libraries in relative paths from there.

Symlinks are converted to absolute, to not fail if they are relative in
the source tree.

Test: m clean && m droid dist checkbuild
  with and without the change, then compare the lists of symlinks in
  the out/ trees
Test: build/soong/soong_ui.bash --make-mode \
    TARGET_PRODUCT=crosshatch_hwasan TARGET_BUILD_VARIANT=userdebug \
    droid SANITIZE_TARGET=hwaddress \
    continuous_instrumentation_tests_api_coverage \
    continuous_native_tests device-tests platform_tests
  check that libclang_rt.hwasan_static-aarch64-android.a isn't a
  symlink in out/target/product/crosshatch/obj
Bug: 145934348
Change-Id: I7600e5b0754f8ea6cd0ffc8e1ba6d39153f182aa
2020-09-01 00:24:54 +01:00
Tianjie 2bb14864e0 Add per-partition build info into ota metadata
As part of the ota metadata work to support partial update, we should
add the per-partition device name, fingerprint, and version to the ota
metadata.

Bug: 151088567
Bug: 166154730
Test: unit tests pass, generate a package
Change-Id: I7a71a4860aad651daf9e62df39c60d72727c14ff
2020-08-31 14:17:10 -07:00
Tianjie d5563371d4 Add more enums to the ota type
We'd better have a default type for enums. It's safe to change the
proto definition now since no one is parsing the new meta.

Also add the brick type for manually generated brick pkgs.

Bug: 166154730
Test: unit tests pass
Change-Id: Ie6d4e695c298313276b559601509c9a7a7ee91b1
2020-08-31 14:06:31 -07: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
Colin Cross 8b21e4e7d4 Merge "Delay platform availability error for ALLOW_MISSING_DEPENDENCIES=true" 2020-08-31 04:20:18 +00:00
Treehugger Robot 002863d698 Merge "Switch to aapt2" 2020-08-29 00:30:28 +00:00
Kelvin Zhang f5f3eaf01c Switch to aapt2
We already moved to aapt2 in Android.bp, no aapt binary in otatools.zip.
So tests should be updated accordingly.

Test: unittest
Change-Id: I29776d75e108e16bcceda49b8be47a338ee8bc1c
2020-08-28 17:40:29 -04:00
Colin Cross b0f3a4d04c Delay platform availability error for ALLOW_MISSING_DEPENDENCIES=true
The platform availability check was erroring incorrectly for the
libstatssocket module in master-art-host builds.  Nothing being
built depended on libstatssocket, but the check would still
error because libstatspull_test was defined in the branch but
unused in the build.

When ALLOW_MISSING_DEPENDENCIES=true is set and a module fails
the check add an additional dependency on a rule that prints
the error message.  This will show the error and fail the build
if an unavailable module is requested to be installed, while
allowing the build to proceed if there are no unavailable
modules in the dependency graph.

Fixes: 154888298
Test: m build-art-host TARGET_BUILD_UNBUNDLED=true ALLOW_MISSING_DEPENDENCIES=true libstatspull_test -k
Test: m build-art-host TARGET_BUILD_UNBUNDLED=true ALLOW_MISSING_DEPENDENCIES=true
Change-Id: I1d57afe60a75d65128e59f794243a0414cbc82f6
2020-08-28 13:32:20 -07:00
Treehugger Robot 947cb0fd87 Merge "Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES" 2020-08-28 04:26:49 +00:00
Ram Muthiah 2ad69ab090 Merge "Revert "Revert "Add prebuilt bootloader var and add bootloader t..."" 2020-08-28 04:04:24 +00:00
Treehugger Robot bcb644ee3f Merge "Fix HOST_CROSS_OUT" 2020-08-27 23:50:55 +00:00
Jaewoong Jung 3a4307d237 Merge "Deduplicate my_compat_dist entries globally." 2020-08-27 22:44:40 +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
Jaewoong Jung 046702a6ef Deduplicate my_compat_dist entries globally.
Fixes: 164319611
Test: m TARGET_PRODUCT=aosp_x86_64 mts dist
Change-Id: Ie47e355ded0ce0221988a405fc77546a4a752c38
2020-08-27 13:10:40 -07:00
Tianjie Xu 0068973f73 Merge "Define the protobuf for OTA metadata" 2020-08-27 18:21:29 +00:00
Tianjie a2076137a1 Define the protobuf for OTA metadata
Background in http://go/android-partial-updates. For partial update
(e.g. system-only) or devices with mixed build, the current
fingerprint & device name no longer suffice as the precondition to
install the package.

Therefore, we need to additionally include the per-partition build
props into the ota metadata. We also define a protobuf for the metadata
so it can be extended later. The metadata of the legacy format is also
kept for backward compatibility.

Bug: 151088567
Test: unittest pass, generate an OTA and check the result
Change-Id: I716f7da54a393cd340280dbddc3c92b3460f8ef8
2020-08-26 16:17:35 -07:00
Kelvin Zhang ff2c7454fe Merge "Fix lint errors on ota_utils.py" 2020-08-26 13:34:19 +00:00
Ramy Medhat fe66d3992b Unset USE_GOMA when using RBE.
Test: Ran rbesetup.sh after setting USE_GOMA
Change-Id: Idf6c1b4f7591aed96d5365e461260060004d4494
2020-08-26 05:47:33 -04: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
Treehugger Robot ff6d873873 Merge "build_image relies on mkuserimg_mke2fs." 2020-08-26 04:46:56 +00:00
Ram Muthiah 861f05fb83 Merge "Add prebuilt bootloader var and add bootloader to img zip" 2020-08-26 02:59:22 +00:00