Commit graph

50896 commits

Author SHA1 Message Date
Dan Willemsen
8da52d4b9d Move TOP/TOPDIR to build/make/common/core.mk
So that they're set properly during dumpvars / product loading.

SHELL is already set in common/core.mk, so it's not necessary to be in
core/main.mk as well (which quickly loads core/config.mk, which loads
common/core.mk).

Test: get_build_var TOP
Test: get_build_var TOPDIR
Change-Id: I8179ac32628b74ccf29851dc53bf83cfb4b280fd
2019-08-08 10:58:09 -07:00
Steven Moreland
0b690ed6d9 Merge "-D__ANDROID_NDK__ for SDK builds." 2019-08-08 16:22:53 +00:00
vichang
aa407a85b7 Merge "Add com.android.i18n APEX module to PRODUCT_PACKAGES" 2019-08-08 11:06:53 +00:00
Tao Bao
69340f6885 Merge "releasetools: ota_from_target_files uses target_files_diff." 2019-08-08 04:07:51 +00:00
Treehugger Robot
0b8c15b249 Merge "Add "arm64-v8a-hwasan" to the supported ABI list in SANITIZE_TARGET=hwaddress builds." 2019-08-08 03:01:39 +00:00
Treehugger Robot
0c55b6d2cb Merge "Revert "Add product and system_ext partition for emulator"" 2019-08-07 23:44:58 +00:00
Justin Yun
b5570cf17b Revert "Add product and system_ext partition for emulator"
This reverts commit ef7e3f2623.

The configuration affects GSI to have separate partitions for product
and system_ext which was not intended.

Bug: 138742524
Bug: 138382074
Test: emulator; check boot
Change-Id: Ie621d6b49f22ee2775adf1c1497e812f840f8ba7
2019-08-07 23:44:41 +00:00
Steven Moreland
401a84071b -D__ANDROID_NDK__ for SDK builds.
The NDK is built like this. Having it for app builds within the Android
build system allows us to distinguish platform code from app code.

This is specifically to distinguish AIDL interfaces using libbinder_ndk.
'myBinder-ndk_platform' libs will use additional functionality that
'myBinder-ndk' libs won't use (in the future, these may be separate
variants with the same name, see b/121157555).

Bug: 136027762
Test: using this to distinuish code in NDK vs platform code
Change-Id: I27471b9184e8d67fc51c8eace317f92b3f0f3539
2019-08-07 14:45:03 -07:00
Treehugger Robot
c5cb45b7da Merge "Fix typo in error message in tools/fs_config/fs_config_generator.py." 2019-08-07 21:35:33 +00:00
Tao Bao
496748378d releasetools: ota_from_target_files uses target_files_diff.
The dependency was overlooked as the module was conditionally imported.

Bug: 63866463
Test: `m -j ota_from_target_files`; Run ota_from_target_files with
      `--log_diff` flag (on a non-A/B target).
Change-Id: I71eff2e55cc28fd649f0ca1b38da53907dac6597
2019-08-07 13:01:27 -07:00
Tao Bao
4c9527b314 Merge "Move make_recovery_path and sparse_img to modules." 2019-08-07 18:49:20 +00:00
Roland Levillain
5ca32dfec5 Fix typo in error message in tools/fs_config/fs_config_generator.py.
Test: n/a
Change-Id: I46682483803e1c7c71fb07157d0ef9c990152d93
2019-08-07 15:51:01 +01:00
Tao Bao
e11a46000c Move make_recovery_path and sparse_img to modules.
These two tools are only used within build system, so not adding them
to otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: Build a non-A/B target that calls make_recovery_patch.
Change-Id: Iaeddc98a2c4a27c6b49d91047500029e460db9e3
2019-08-06 23:27:48 -07:00
Tao Bao
3738f37e22 Merge "releasetools: merge_target_files sets verbose in main." 2019-08-07 02:19:01 +00:00
Treehugger Robot
431096605c Merge "Filter out VENDOR_PYTHONPATH from PYTHONPATH in aosp." 2019-08-07 00:40:05 +00:00
Tao Bao
abb806b3f0 releasetools: merge_target_files sets verbose in main.
The flag would otherwise be turned on unconditionally even when
importing merge_target_files as a module. As a result, `atest
releasetools_test` was broken / flaky prior to this change, as
PythonUnitTestResultParser doesn't like unexpected outputs in stderr.

Test: `atest releasetools_test releasetools_py3_test`
Change-Id: Ifd614c797d2cee3b33e4c2a7ad8e598850e9d60c
2019-08-06 14:13:19 -07:00
Tao Bao
7edc2b1994 Merge "releasetools: Build build_super_image as a lib." 2019-08-06 19:01:20 +00:00
Tao Bao
28dd0c83a2 Merge "releasetools: Drop the support for creating image archive from dir." 2019-08-06 18:45:17 +00:00
Tao Bao
a514c4ec22 Merge "releasetools: Don't write outputs if not in verbose mode." 2019-08-06 17:33:22 +00:00
Tao Bao
b7957f112b Merge "Build and use ota_from_target_files as a module." 2019-08-06 17:31:21 +00:00
Treehugger Robot
554245e73c Merge "Support m dist updatepackage" 2019-08-06 03:46:34 +00:00
Treehugger Robot
169b1cb897 Merge "VTS: Create vts-core suite and packaging rules" 2019-08-06 02:21:41 +00:00
Jim Tang
c4dba1d56e Filter out VENDOR_PYTHONPATH from PYTHONPATH in aosp.
Currently when switching between internal to aosp, PYTHONPATH will be
contaminated. This CL is to ensure PYTHONPATH will be as clean as
opening a new terminal and source/lunch.

Bug: 121106770

Test: internal:
$ source build/envsetup.sh; lunch; echo $PYTHONPATH| sed 's/:/\n/g'
will see VENDOR_PYTHONPATH in PYTHONPATH.

switch to aosp:
$ source build/envsetup.sh; lunch; echo $PYTHONPATH| sed 's/:/\n/g'
won't see VENDOR_PYTHONPATH in PYTHONPATH.

Change-Id: Id1916673000ee3fad55e9611d0c47cc80de86645
2019-08-06 09:17:24 +08:00
Dan Willemsen
9ae6495d91 Support m dist updatepackage
If you want the `dist` behavior, but only want to build the
updatepackage (you only need to be able to flash the device).

Test: m dist updatepackage
Change-Id: I921f9d96ab3f7df180601dac3fff2ff24185792d
2019-08-05 14:45:11 -07:00
Tao Bao
005305adf8 releasetools: Build build_super_image as a lib.
The lib will be shared by more users (e.g. add_img_to_target_files) in
follow-up changes.

Test: TreeHugger
Test: atest releasetools_test releasetools_py3_test
Change-Id: Iaa48bfc8c1dada41362d974773c124a001471ef8
2019-08-05 13:02:26 -07:00
Tao Bao
8821d64481 Build and use ota_from_target_files as a module.
Bug: 63866463
Test: TreeHugger
Test: m -j otapackage
Test: `m -j otatools-package`. Check bin/ota_from_target_files is
      available. Build an OTA package with standalone otatools.
Change-Id: I533dee1c6997d233601e7f4eae637ff5743ed637
2019-08-05 12:57:41 -07:00
Dan Willemsen
6240872250 Merge "Remove import_includes/export_includes" 2019-08-05 17:28:18 +00:00
Tao Bao
2aac9c9d6d releasetools: Drop the support for creating image archive from dir.
Taking an extracted target_files dir input is only needed for
add_img_to_target_files.py, in particular for the call from build
system. For the case of img_from_target_files.py, it goes much faster
with zip2zip (3m vs 7s in my local test). This CL drops the unneeded
code path in preparation for the switch to zip2zip.

Test: `python build/make/tools/releasetools/img_from_target_files.py \
         -v aosp_taimen-target_files.zip aosp_taimen-img-test.zip`
Change-Id: I7f85d7d629d6fd1621a082f94a11cac7c3e6bbf2
2019-08-02 16:02:32 -07:00
Daniel Norman
477d2894e4 Merge "Adds support for optionally generating vbmeta.img in merge_builds." 2019-08-02 23:00:46 +00:00
Tao Bao
718faed3dc releasetools: Don't write outputs if not in verbose mode.
The change in [1] allows brillo_update_payload to write to stdout/stderr
directly without buffering, to ensure dumping progress to screen
continously. However, it now unconditionally writes to stdout/stderr
even if caller doesn't specify `-v`. The behavior upsets
PythonUnitTestResultParser in [2], which doesn't want any unexpected
output from stderr for result parsing.

This CL updates the logic to only give continous outputs in verbose
mode.

[1] commit 2f7e11ef27
[2] https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/master/test_framework/com/android/tradefed/testtype/PythonUnitTestResultParser.java

Test: Run ota_from_target_files.py with `-v`. Check there's continous
      output from brillo_update_payload.
Test: `python -m unittest -v test_ota_from_target_files > /dev/null`
      doesn't show outputs from brillo_update_payload.
Change-Id: I3b851203ef011a5b4d982948cf52793f6fb6ad2d
2019-08-02 13:36:49 -07:00
Daniel Norman
276f06275b Adds support for optionally generating vbmeta.img in merge_builds.
Bug: 137853921
Bug: 138671115
Test: python -m unittest test_common
Test: python -m unittest test_add_img_to_target_files
Test: Ran 'merge_builds --build_vbmeta' for two devices, one with the
vbmeta struct on system.img and another with vbmeta_system.img. Flashed
the regenerated vbmeta.img files on devices, devices boot.

Change-Id: I8d7585c7af468be3d242d8aceeed6d27e6fc6d96
2019-08-02 20:13:03 +00:00
Treehugger Robot
c016c281c1 Merge "Handle zygote_32_64 in gsi_release.mk" 2019-08-02 08:19:33 +00:00
Tao Bao
1bc828c97e Merge "releasetools: Add FORCE_RUN_RELEASETOOLS." 2019-08-02 03:57:39 +00:00
Dan Willemsen
18ffd5891e Remove import_includes/export_includes
Now that ONE_SHOT_MAKEFILE no longer exists, we don't have to rely on
the filesystem to store this informtion.

This removes ~16.7k files from our build graph
(aosp-master/aosp_arm64-eng), though only about 600 of them were being
used in a normal build.

Test: treehugger
Change-Id: I3ac12f5ea7f11d25064109a0599bc5be1976fba5
2019-08-01 14:56:45 -07:00
Dan Willemsen
8b8b9b6bf8 Merge changes from topic "rm_ONE_SHOT_MAKEFILE"
* changes:
  Remove [jni_]link_type files
  Remove support for ONE_SHOT_MAKEFILE
2019-08-01 21:11:02 +00:00
Pirama Arumuga Nainar
8d8e3d6157 Merge "Explicitly add lld's relr relocation flags for Android Pie and above" 2019-08-01 19:54:11 +00:00
Tao Bao
7d223c6ddd releasetools: Add FORCE_RUN_RELEASETOOLS.
This allows test runner to take care of the external tools setup, then
to start the test without a lunch'd environment. This is needed before
having supports like python_test_helper that packs dependents into
releasetools_test module.

Bug: 138791766
Test: Don't lunch any target. Use `FORCE_RUN_RELEASETOOLS=1 python -m
      unittest -v test_add_img_to_target_files` and check there's no
      skipped testcases.
Change-Id: Iafeaba54fc228d8e1fc5ff3c91f7ffebef18ad7f
2019-08-01 12:22:54 -07:00
Dan Willemsen
f915d9d586 Merge "Add missing aapt2 dep in appcompat-files" 2019-08-01 18:22:23 +00:00
Luca Stefani
a239c67ed3 Add missing aapt2 dep in appcompat-files
* When soong_app_prebuilt calls appcompat-header
  with appcompat enabled aapt2 was missing

Test: m SystemUI
Change-Id: I26bcb507f68902ff95a1045dfeb22dd8d4913a92
2019-08-01 16:29:06 +02:00
SzuWei Lin
bcd7741e81 Handle zygote_32_64 in gsi_release.mk
64 bits GSI expects supporting both zygote_64_32 and zygote_32_64.

The patch adds including init.zygote32_64.rc in gsi_release.mk
direclty, and also revises all GSI releasing build targets.

Bug: 138625977
Test: build aosp_arm64-userdebug and has init.zygote32_64.rc
Test: build aosp_arm-userdebug and no init.zygote32_64.rc
Change-Id: Ia61db1315321798bae8902b35ddaa5e5f3e7dd3e
2019-08-01 11:57:18 +08:00
Treehugger Robot
9a1d60f5cb Merge "Add build script to create a self extracting archive with a click through license" 2019-08-01 02:17:33 +00:00
Chen Zhu
d42cabc727 Merge "Add Mainline Test Suite (MTS)." 2019-08-01 01:20:47 +00:00
Dan Willemsen
0df0f6bbf1 Remove [jni_]link_type files
Now that mm/ONE_SHOT_MAKEFILE have been removed, we can expect to know
about all of our dependencies at the end of the build.

This removes 19k nodes from our build graph (aosp-master
aosp_arm64-eng), though in a default build, only 3k of those are used.

Test: ALLOW_MISSING_DEPENDENCIES=true, then trigger a missing dependency
Test: treehugger
Test: create link_type files, then apply CleanSpec.mk, ensure they're removed
Change-Id: I9506331e4a9911d2f26e59a2f72a97aef1644073
2019-07-31 18:09:22 -07:00
Dan Willemsen
5c3fc2a792 Remove support for ONE_SHOT_MAKEFILE
Test: treehugger
Change-Id: Ie73418c186ec4c0e1c91078c133de8f8113295bf
2019-07-31 18:08:47 -07:00
Elliott Hughes
3c1bec04e0 Merge "Remove PRODUCT_IOT." 2019-08-01 00:32:04 +00:00
Chen Zhu
95b0913070 Add Mainline Test Suite (MTS).
Test: m mts && mts-tradefed run mts

Bug:123411735
Bug:126277867

Merged-In: Iba6bf89bd4457ed0f5c1eb3351bf5ffd6720441d
Change-Id: I889ace72980619884cb35359b9a18d7b2053fed8
2019-07-31 21:31:10 +00:00
Peter Collingbourne
6aea25d1aa Add "arm64-v8a-hwasan" to the supported ABI list in SANITIZE_TARGET=hwaddress builds.
Bug: 132905502
Bug: 133242086
Change-Id: Id4bd6691aa444895878391288d661e5eb43bb4a5
2019-07-31 20:18:46 +00:00
Chris Gross
04bc250d88 Merge "Clean-up CL for CL985267." 2019-07-31 16:11:23 +00:00
Treehugger Robot
1c8599376d Merge "Add product and system_ext partition for emulator" 2019-07-31 10:46:39 +00:00
Justin Yun
ef7e3f2623 Add product and system_ext partition for emulator
Build product and system_ext image and add them to super partition.

Bug: 138382074
Test: boot emulator and check system_ext partition mounted
Change-Id: Ifa67bd6ad475ac5912e8f919c7a771c9958bd5c2
Merged-In: Ifa67bd6ad475ac5912e8f919c7a771c9958bd5c2
2019-07-31 10:45:55 +00:00