Commit graph

59476 commits

Author SHA1 Message Date
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
Yifan Hong
770234520d build_image relies on mkuserimg_mke2fs.
Add missing dependency.

Test: TH
Bug: 162921175
Change-Id: Ide1fe0b823e5e7a06c6c0252a5bef7bfaf6f7c28
2020-08-25 16:15:30 -07:00
Ram Muthiah
41a03d3aee Add prebuilt bootloader var and add bootloader to img zip
Needed to enable a prebuilt bootloader to make it to the dist and img
directories.

Added a flag to ensure only devices that request will have the update
package populated with a bootloader

Bug: 164917252
Test: local build and Treehugger build
Change-Id: Id67b7bddda14b51a523f794976591c6de04d71ca
2020-08-25 22:12:27 +00:00
Kelvin Zhang
2e41738566 Fix lint errors on ota_utils.py
Pylint reports lot of error on ota_utils.py, because some members of
OPTIONS object aren't defined. This CL moves some definition from
ota_from_target_files.py to ota_utils.py to fix these lint errors.

Test: Make an OTA package
Change-Id: I1e9f255d5919712b13329046c72650dfac184701
2020-08-25 15:58:24 -04:00
Jiyong Park
eccc461d00 Fix HOST_CROSS_OUT
Previously, HOST_CROSS_OUT was defined with the assumption that
windows_x86 is the only supported OS/Arch. In preparatio for Linux/ARM
support, HOST_CROSS_OUT is now defined using HOST_CROSS_OS and
HOST_CROSS_ARCH.

Bug: 159685774
Test: m

Change-Id: I0831c2885db37c44af4fd47bab8481bc885b4b7e
2020-08-25 11:01:11 +09:00
Treehugger Robot
59a4a06170 Merge "Set BOARD_KERNEL_MODULE_INTERFACE_VERSIONS for aosp_arm64" am: 5c9667d1ac
Original change: https://android-review.googlesource.com/c/platform/build/+/1392541

Change-Id: I91121c1be7872d9445612021deb03235811a0200
2020-08-24 23:40:02 +00:00
Treehugger Robot
5c9667d1ac Merge "Set BOARD_KERNEL_MODULE_INTERFACE_VERSIONS for aosp_arm64" 2020-08-24 23:06:59 +00:00
Yifan Hong
e5ab7a241b Set BOARD_KERNEL_MODULE_INTERFACE_VERSIONS for aosp_arm64
Test: m com.android.gki.boot-5.4_5.4-android12-0
Bug: 162888350
Change-Id: I8ac387cc52e498c2790c0b84e866a307fdd1ae8b
2020-08-24 12:23:27 -07:00