Commit graph

50941 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
f5c3510081 Merge "Add libprofile-extras to all link steps when NATIVE_COVERAGE is enabled." 2019-07-09 15:32:48 +00:00
SzuWei Lin
df09892cdb Revise GSI targets to inherit from mainline_system directly
The patch seperates gsi_common.mk to aosp_product.mk and
gsi_release.mk. Let GSI targets can be inherit with 3 parts:

- system: mainline_system.mk
- product: aosp_product.mk
- vendor: none or emulator vendor makefiles

aosp_product.mk includes the AOSP packages/settings will be in
the product partition.

GSI targets also includes the gsi_release.mk, which contains
the special settings for the GSI for releasing, ex.
skip_mount.cfg, extra VNDK, etc. After the patch, the build
targets inherit from aosp_$arch.mk will not apply these special
settings anymore.

The gsi_common.mk, legacy_gsi_common.mk and aosp_$arch_ab.mk will
be phased out later.

Bug: 135502030
Test: build gsi_arm64-userdebug and aosp_arm64-userdebug, compare
Test: root, system and vendor in out folder with/without the patch
Change-Id: Ic604ac91ba9a704e6507bac324d19bbf68063464
2019-07-09 18:13:22 +08:00
Treehugger Robot
b7a50ece30 Merge "Rename product_services to system_ext" 2019-07-09 08:58:04 +00:00
Justin Yun
6151e3f1ea Rename product_services to system_ext
Bug: 134359158
Test: build and check if system_ext.img is created
Change-Id: I67f2e95dd29eac6a28e07e24ea973d3a134c3bfc
2019-07-09 08:57:19 +00:00
Tao Bao
ca82fc90f7 Additionally run releasetools_test with Python 3.
Bug: 131631303
Test: TreeHugger
Test: `atest releasetools_test`
Test: `atest releasetools_py3_test`
Change-Id: Ie00f48835aae41bc69ab8554b856a62aa3b497cc
2019-07-09 05:14:31 +00:00
Tao Bao
6e3ae4e849 Merge "releasetools: Make merge_target_files and its test Python 3 compatible." 2019-07-09 03:58:32 +00:00
Treehugger Robot
98b9c5dded Merge "Build: Fix test data no present in test suite zip files." 2019-07-09 00:26:41 +00:00
android-build-team Robot
8b4bc55df0 Make change and version bump to PPRL.190705.004
Change-Id: I585ce2af3e9a673a7e2ca2b89e79df24e3cd2c0d
2019-07-08 23:37:47 +00:00
Tao Bao
2ad4b82d45 releasetools: Make merge_target_files and its test Python 3 compatible.
And a few minor clean-ups to the styling.

Bug: 131631303
Test: python -m unittest test_merge_target_files
Test: python3 -m unittest test_merge_target_files
Test: Use `python merge_target_files` to merge two target_files zips.
Test: Use `python3 merge_target_files` to merge two target_files zips.
Change-Id: I8502dfb243408f658d022e8d5e5fbb60066e4ff0
2019-07-08 16:06:15 -07:00
Pirama Arumuga Nainar
b8f898ef88 Add libprofile-extras to all link steps when NATIVE_COVERAGE is enabled.
libprofile-extras has a wrapper to getenv() that appends the effective
userid (euid) of the current process to GCOV_PREFIX.  This avoids
conflicts and permissions issues when multiple processes try to
create/access the same directories and files under /data/misc/trace.

This library needs to be added and the -Wl,--wrap,getenv flag needs to
be passed to all link steps.  Since Android.mk does not propagate flags
and libraries across dependencies, this change just adds the library and
flag to all non-static-library Android.mk modules.  As a consequence,
*ALL* binaries created via Android.mk will have the signal handler and
property watcher thread in libprofile-extras but they are no-ops in
non-coverage-enabled binaries.

The dependency is added early enough in core/binary.mk so that the
LOCAL_SOONG_LINK_TYPE resolutions occur correctly.

Test: Verify that coverage files are written to
/data/misc/trace/<euid>/proc/... instead of /data/misc/trace/proc/...

Change-Id: I4d5f849c15e9a278253f2148185ddf3ab2878e2f
2019-07-08 15:13:31 -07:00
android-build-team Robot
b0faf21d08 Make change and version bump to PPRL.190705.003
Change-Id: I4ec9960a04017fec11dbe056da3f8e2fe513174a
2019-07-08 18:37:30 +00:00
Treehugger Robot
09736b4aaf Merge "Split merge_target_files function" 2019-07-08 06:33:18 +00:00
Kiyoung Kim
7cbeda728d Split merge_target_files function
Split merge_target_files function into several steps, so we can increate
readability and add conditional flows for other *SSI mixed build with less effort

Test: m -j & atest passed
Change-Id: I558f9dd5bca31b132a09cb36d9dfcd30c92efbc9
2019-07-08 12:13:05 +09:00
nelsonli
068d101077 Build: Fix test data no present in test suite zip files.
my_installed_test_data (LOCAL_TEST_DATA) no present in test
 suite zip files for device tests

Bug: 135957483
Test: 1. Remove the patch aosp/1008195
      2. m general-tests
      3. unzip general-tests.zip
      4. data files should exist in target/testcases/toybox-tests

Change-Id: I3f0a4d87e284c809625843d55dc5d35ef77e79bb
2019-07-05 23:52:45 +08:00
Bill Peckham
150c4b1f32 Merge "Move definition of create-vendor-odm-symlink within BUILDING_VENDOR_IMAGE" 2019-07-04 03:16:04 +00:00
Bill Peckham
1f9b8f0cc6 Move definition of create-vendor-odm-symlink within BUILDING_VENDOR_IMAGE
When we build the system image separately from the vendor image, we need the
/vendor/odm link (if any) to be created in the vendor build, not the system
build. This change moves the create-vendor-odm-symlink function outside the
BUILDING_SYSTEM_IMAGE gaurd, and inside the BUILDING_VENDOR_IMAGE gaurd.

Bug: 136516335
Test: Build vendor image, verify that /vendor/odm -> /odm
Change-Id: I6edf5d6d1fa0b2f632f67113f69a49b43f719941
2019-07-03 15:58:48 -07:00
Daniel Norman
28142690ba Merge "Uses the KNOWN_HIDL_INTERFACES file in host_init_verifier." 2019-07-01 21:15:38 +00:00
Yifan Hong
f166825c4c Merge "Change the condition for building super_empty.img." 2019-07-01 20:51:38 +00:00
Treehugger Robot
4d77e4da45 Merge "Modify build to put dumpcoverage agent into /system/lib" 2019-06-28 22:41:14 +00:00
Tao Bao
48a2feb670 Change the condition for building super_empty.img.
This CL changes the condition for building super_empty.img from
PRODUCT_BUILD_SUPER_PARTITION to PRODUCT_USE_DYNAMIC_PARTITIONS, as a
follow-up to the change in [1].

With the CL in [1], it skips building super.img and super_empty.img both
when turning off PRODUCT_BUILD_SUPER_PARTITION. However, the latter
should be mandatory whenever dynamic partitions is enabled. Because
fastboot relies on this file to properly flash dynamic partitions. Plus,
the cost for building super_empty.img is much lower than the one for
super.img.

As part of the change, it'll write group info into target_files when
building with PRODUCT_BUILD_SUPER_PARTITION == false. It's the work for
target_files merging script to determine the values to be picked up. The
current logic in merge_target_files.py always uses the one from vendor
target_files. This CL adds a testcase to ensure the behavior.

[1] https://android-review.googlesource.com/c/platform/build/+/928756

Bug: 135752763
Test: `m dist` with a target that sets PRODUCT_BUILD_SUPER_PARTITION to
      false. Check the built artifacts contain super_empty.img. Verify
      that the build can be flashed properly.
Change-Id: I277f087eab45663a6c3b33333d16e9e576c1c25c
2019-06-28 14:23:53 -07:00
Anton Hansson
bf95d43dc6 Merge "Move board config variable from mainline_system" 2019-06-28 09:31:40 +00:00
Tao Bao
63cf1326da Merge "releasetools: Prefer the avbtool specified in target_files." 2019-06-28 01:18:21 +00:00
Kiyoung Kim
4ec56d9214 Merge "Add Linkerconfig to base system target" 2019-06-28 00:46:42 +00:00
Tao Bao
e4f07795e4 Merge "releasetools: Make additional modules Python 3 compatible." 2019-06-27 23:52:50 +00:00
Daniel Norman
ce664b0a37 Uses the KNOWN_HIDL_INTERFACES file in host_init_verifier.
This file is used to check that each interface in an init_rc file is a
known hidl_interface.

Test: Adding a misspelling to an init_rc's interface line and observing
build failure.
Bug: 77646540
Change-Id: I30c2dff29679b95085b5c76f6d68e4d794f965e9
2019-06-27 15:54:43 -07:00
Treehugger Robot
c1d847e885 Merge "copy kernel modules to ramdisk, add modules.load[.recovery]" 2019-06-27 21:52:56 +00:00
Tao Bao
f6e8d46e2f Merge "releasetools: Clean up check_target_files_signatures.py." 2019-06-27 21:36:14 +00:00
Tom Cherry
fdbd55d259 Merge "Switch host_init_verifier to getopt()" 2019-06-27 21:09:07 +00:00
Tao Bao
2a917796b5 Merge "releasetools: Add sanity test for sign_apex." 2019-06-27 17:35:29 +00:00
Tao Bao
a67e12d66f releasetools: Clean up check_target_files_signatures.py.
And make it Python 3 compatibile.

Bug: 131631303
Test: python check_target_files_signatures.py target-files.zip
Test: python3 check_target_files_signatures.py target-files.zip
Change-Id: I38e868c3124387f5543ad68c92c75917e40b7d8f
2019-06-27 10:24:10 -07:00
Kavi Gupta
7185f8cc2d Modify build to put dumpcoverage agent into /system/lib
This location allows the agent to be attached to arbitrary processes.

It only makes sense to include libdumpcoverage.so on coverage builds,
as these are the only builds that have any information to be dumped.

Test: manual, used examples in README (see other CL) to test whether
it works on a userdebug_coverage build on cuttlefish

Change-Id: Ib2fece1b41a3b5d16c8a2a444c5486137e475fda
2019-06-27 09:28:39 -07:00
Tom Cherry
f0bc919754 Switch host_init_verifier to getopt()
Test: build, including init script verification, works
Change-Id: Ia786cdf14eb9449ad2d5a6ac9b571c6be709f1e5
2019-06-27 09:21:53 -07:00
Tao Bao
a370545a2c releasetools: Make additional modules Python 3 compatible.
Bug: 131631303
Test: `python -m unittest test_sign_target_files_apks`
Test: `python3 -m unittest test_sign_target_files_apks`
Test: `python -m unittest test_add_img_to_target_files`
Test: `python3 -m unittest test_add_img_to_target_files`
Test: `python -m unittest test_ota_from_target_files`
Test: `python3 -m unittest test_ota_from_target_files`
Test: `python -m unittest test_validate_target_files`
Test: `python3 -m unittest test_validate_target_files`
Test: Run `python3 ota_from_target_files.py` to generate an OTA.
Test: Run `python3 sign_target_files_apks.py` to sign a target_files.
Change-Id: I56b45bbcbf7aa83e690785a9640c0212e45d12d8
2019-06-27 09:05:48 -07:00
Mathieu Chartier
14c01bea97 Merge "Revert "Revert "Remove option to create boot image based on preloaded classes""" 2019-06-27 15:56:52 +00:00
Anton Hansson
6ce59eb4f6 Merge "Remove lmk.log_stats sysprop from mainline_system" 2019-06-27 08:28:18 +00:00
Kiyoung Kim
6b261101e4 Merge "Set INSTALLED_BOOTIMAGE_TARGET in case of TARGET_NO_KERNEL is true and BOARD_PREBUILT_BOOTIMAGE is set." 2019-06-27 05:44:33 +00:00
Kiyoung Kim
ca019895ef Add Linkerconfig to base system target
Add Linkerconfig to base system target

Bug: 135004088
Test: m -j & Tested from device
Change-Id: I02a3b58854c2f19866f42ba22541737c132daa44
2019-06-27 09:44:58 +09:00
Kiyoung Kim
fc195fee44 Merge "Create common.LoadDictionaryFromFile" 2019-06-27 00:27:49 +00:00
Tao Bao
1ac886e181 releasetools: Prefer the avbtool specified in target_files.
This allows a consistent logic in using the avbtool which could be
board-specific.

Test: `atest releasetools_test`
Test: Run sign_target_files_apks.py on a target_files.zip.
Change-Id: I8cd93b8e71146985734f85c31f4662f5e2e9534c
2019-06-26 17:18:48 -07:00
Tao Bao
c9c1b864ba releasetools: Add sanity test for sign_apex.
This ensures a matching interface between sign_apex and apex_utils.

The test apex `testdata/foo.apex` is generated by running
`system/apex/apexer/runtests.sh`.

Test: python -m unittest test_sign_apex
Test: atest releasetools_test
Change-Id: I7c14b1df2a3038ad206aa3e5aac084c47baaa00b
2019-06-26 17:17:09 -07:00
Steve Muckle
474e4d04a3 copy kernel modules to ramdisk, add modules.load[.recovery]
Build support exists to copy a set of kernel modules to the recovery,
vendor, and odm images. Extend similar support for copying kernel
modules to the ramdisk via BOARD_RAMDISK_KERNEL_MODULES. If
BOARD_USES_RECOVERY_AS_BOOT, then BOARD_RAMDISK_KERNEL_MODULES is
added to the set of modules to be copied to recovery.

Libmodprobe now supports reading a list of kernel modules to be loaded.
Enable the creation of modules.load and modules.load.recovery files.
These files contain the contents of
BOARD_[RAMDISK|VENDOR|ODM|RECOVERY]_KERNEL_MODULES_LOAD, or if those
variables are not set, the contents of
BOARD_[RAMDISK|VENDOR|ODM|RECOVERY]_KERNEL_MODULES (indicating all
modules should be loaded by default). This allows for
optional customization of the set of modules to be loaded by
libmodprobe and the order they are loaded in.

Bug: 130585369
Change-Id: I9340787d31d71aebc8552344675d9696c189a8a1
2019-06-26 17:16:30 -07:00
Mathieu Chartier
a5828f21f8 Revert "Revert "Remove option to create boot image based on preloaded classes""
Test: make
Test: build/soong/scripts/build-ndk-prebuilts.sh

This reverts commit 7139459ac7.

Change-Id: I7449e57cdcaccc60decca2df929b1b9e920f5904
2019-06-26 14:43:57 -07:00
Tao Bao
90f638d842 Merge "releasetools: Clean up additional modules for Python 3 compatibility." 2019-06-26 18:01:57 +00:00
Tianjie Xu
4e5591ffb9 Add update_host_simulator to otatools
Therefore, we can access the tool in tradefed test. And partners can also
run simulation without a git repo.

Bug: 131911365
Test: build otatools-package
Change-Id: Ibfeeab360517e129f47f18372bfa236b437bce9b
2019-06-26 10:57:01 -07:00
Anton Hansson
c4f11be520 Move board config variable from mainline_system
This variable setting belongs in a board config, not
a product makefile.

Test: presubmit
Change-Id: I41e342ce841ec7aea69ff62aaefdc748cbf28d04
2019-06-26 18:07:05 +01:00
Colin Cross
1aa3ff6fea Merge "Don't pass --legacy by default to aapt2 compile" 2019-06-26 17:05:34 +00:00
Mathieu Chartier
669f3983fd Merge "Revert "Remove option to create boot image based on preloaded classes"" 2019-06-26 16:52:45 +00:00
Mathieu Chartier
7139459ac7 Revert "Remove option to create boot image based on preloaded classes"
This reverts commit 633009b659.

Reason for revert: NDK build broken

Change-Id: I3e470ccf42b6d50c534c53c2b14150506d6226e8
2019-06-26 16:45:01 +00:00
Mathieu Chartier
5abcba9f43 Merge "Remove option to create boot image based on preloaded classes" 2019-06-26 15:56:36 +00:00
Anton Hansson
fd81f696ed Remove lmk.log_stats sysprop from mainline_system
It is now set on the /product partition by relevant devices.

Bug: 135569569
Test: lunch mainline_system_arm64; inspect system/etc/prop.default
Change-Id: I34696977f584a65741c6002e6688d86e66a1f121
2019-06-26 15:49:10 +01:00