Commit graph

1049 commits

Author SHA1 Message Date
Treehugger Robot
22b9a4a207 Merge "Generate api.xml for every target build." 2019-03-19 19:18:16 +00:00
Jared Lim
361e4439d0 Generate api.xml for every target build.
Test: make dist DIST_DIR=out/dist

Change-Id: I8cf7290c8a3757110761e9c852339b841c5d1748
2019-03-18 22:42:07 -07:00
Treehugger Robot
b6520ddcf1 Merge "Sets default value of ro.postinstall.fstab.prefix" 2019-03-19 05:02:58 +00:00
Bowgo Tsai
ddac7dcce1 Sets default value of ro.postinstall.fstab.prefix
ro.postinstall.fstab.prefix might be either "/system" or "/product",
to decide the location of the fstab.postinstall, used to mount
system_other partition on A/B devices.

  {ro.postinstall.fstab.prefix}/etc/fstab.postinstall

Bug: 112103720
Test: factory reset and boot device, checks cppreopt logs

Change-Id: Ib1e282752c37713e2220239f4f903453ce3c8bab
2019-03-14 16:03:04 +08:00
Dan Willemsen
c478ea3dac Fix m snod
Whenever we're not loading all makefiles, we shouldn't be checking that
all the host packages exist.

Test: m snod
Change-Id: If1f817d855cbe329b83caee9fdd68c2cce55f02b
2019-03-07 17:18:15 -08:00
Dan Willemsen
b952b5e4c3 Build everything in PRODUCT_HOST_PACKAGES
This should only add extra host packages that were in
PRODUCT_HOST_PACKAGES and not PRODUCT_PACKAGES.

That shouldn't be very many things -- user builds will build a few more
host tools that used to be in PRODUCT_PACKAGES_DEBUG, etc.

Test: treehugger
Change-Id: I6768b76db74ea049de90eef326d1e314eb4ef848
Merged-In: I6768b76db74ea049de90eef326d1e314eb4ef848
2019-03-06 15:41:19 -08:00
Dan Willemsen
3d05a08a6f Reland "First pass at creating PRODUCT_HOST_PACKAGES"
Adds icu-data_host_runtime_apex to fix unbundled builds which pull it in
via PRODUCT_PACKAGES, but are missing packages that would pull it in via
PRODUCT_HOST_PACKAGES.

Test: build/soong/build_test.bash
Test: in ub-timezonedata-master; tapas TimeZoneData; m
Change-Id: I1583c7582b386c3e8478711cb1df340518d763c1
Merged-In: I1583c7582b386c3e8478711cb1df340518d763c1
2019-03-06 14:46:06 -08:00
Yifan Hong
5a4696e460 Merge "Build ODM manifests and fragments for each SKU." 2019-03-01 18:32:32 +00:00
Anton Hansson
b5312392a0 Merge "Move ART cpu properties to /vendor" 2019-02-22 12:14:49 +00:00
Logan Chien
7d35910451 Merge "Refine lsdump_paths.txt dependencies" 2019-02-22 09:08:03 +00:00
Logan Chien
5f4e29b090 Refine lsdump_paths.txt dependencies
This commit moves $(LSDUMP_PATHS) from the prerequisite of
lsdump_paths.txt to the prerequisite of findlsdumps. This change makes
it possible to dump the list of lsdump files without actually building
all lsdump files.

Bug: 124829578
Test: make out/target/product/generic/lsdump_paths.txt
      # does not build the actual lsdump files
Test: make findlsdumps  # builds lsdump_paths.txt and all lsdump files
Change-Id: I924f1c0c61391e958521c376a061651f2a301adb
2019-02-22 10:55:44 +08:00
Anton Hansson
30851f2540 Move ART cpu properties to /vendor
System properties relating to the physical hardware belong
on the vendor partition. Move the ART-related cpu variant
sysprops there.

This also brings the ART sysprops in line with the equivalent
bionic sysprops.

Bug: 120773446
Test: make, boot
Test: grep dalvik.vm vendor/default.prop
Change-Id: I3f843a7070dd0d9148737e040fe87d6461977d09
2019-02-21 14:13:44 +00:00
xunchang
3b548b0302 Dump a copy of metadata file for full OTA
When building the full OTA file, write a copy of the metadata to the
dist dir. Then it will show up in the artifact of the build page for
users to parse.

Bug: 124783265
Test: make dist and check the output metadata
Change-Id: I2eb06bbf3cbb9f3653ca3352f3d601b09403d59d
2019-02-20 15:32:28 -08:00
Yifan Hong
b321665b9d Build ODM manifests and fragments for each SKU.
In BoardConfig.mk, ODM manifests can be specify as follows:

    # installed to /odm/etc/vintf/manifest.xml
    ODM_MANIFEST_FILES := device/foo/bar/odm_manifest.xml

    # installed to /odm/etc/vintf/manifest_baz.xml
    ODM_MANIFEST_SKUS := baz
    ODM_MANIFEST_BAZ_FILES := device/foo/bar/odm_manifest_baz.xml

This is preferred over PRODUCT_COPY_FILES because it uses
assemble_vintf to check manifest at build time.

Test: builds

Change-Id: I18517b8ba09d3271627d6f21b8250b1bfc9e5db3
2019-02-19 12:37:50 -08:00
Allen Hair
191f0e5b60 Generate API XML files from android stub targets instead of text input.
The resulting XMLs will contain more complete information (such as
whether or not a method is native) than is available in current.txt.

Bug: 124335876
Test: make PRODUCT-cf_x86_phone-userdebug showcommands dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true tests

Change-Id: Icb8999bcd6be28f3ec8ff6bffa33b261f0d20606
2019-02-13 17:48:00 -08:00
Anton Hansson
dce3f920f2 Move dump-products back to the config stage
It's unnecessary to run all the make file parsing to dump product
configs. Move the dumping to product_config.mk instead, but switch
the output to $(warnings) as stdout is a bit sensitive during
the config stage.

Test: multiproduct_kati -only-config dump-products
Change-Id: I8c7365c9f90ea2bf152b82dfb983bfb0cdcb1697
2019-02-11 21:19:54 +00:00
Dan Willemsen
fcdc0cb737 Fix aux_config warning
Don't declare targets during config files, as they're loaded in other
contexts as well. In this case, `droidcore` was not defined when we were
handling CleanSpec.mk files, leading to:

build/make/core/aux_config.mk:185: warning: real file "droidcore" depends on PHONY target "auxiliary"

Bug: 123583617
Test: m nothing; check for warnings
Change-Id: I71b8819deb81442810c7dd5c681ddb38a1171cff
2019-02-04 20:52:14 -08:00
Jiyong Park
1ba4c7f11e Reland "Add $(PRODUCT_OUT)/apex to the artifact path whitelist"
This reverts commit 4cf7cde9aa.

Bug: 120846816
Test: build/soong/build_test.bash -dist -products mainline_system_arm64
Test: lunch aosp_cf_x86_pasan-userdebug; m && SANITIZE_TARGET=address m

Change-Id: I6fbf23dcef450da17fafafa78def3816792d83c8
2019-01-30 12:32:49 +09:00
Anton Hansson
d5e069e405 Auto-include device_manifest.xml when necessary
It doesn't make sense to specify a DEVICE_MANIFEST_FILE but the
build not including it. The conditional definition of the module
makes it problematic to have it listed in the PRODUCT_PACKAGES
of a generic mk.

Test: build mainline_arm64 + mainline_system_arm64
Change-Id: I40e435ce114263ceabbd373d3d719318c592fc13
2019-01-25 13:50:47 +00:00
Logan Chien
9779c57cd0 Merge "Add $(SOONG_OUT_DIR)/ndk/% to artifact whitelist" 2019-01-23 07:22:43 +00:00
Logan Chien
86eeedbcc7 Add $(SOONG_OUT_DIR)/ndk/% to artifact whitelist
This commit adds `$(SOONG_OUT_DIR)/ndk/%` to artifact whitelist so that
when NDK stub libraries won't be blocked by artifact path requirements.

This commit does not break the integrity of artifact path requirements
because they are not installed to devices.

Bug: 123053270
Bug: 119084334
Test: lunch aosp_crosshatch-userdebug
Change-Id: Ieea76a8126269f53b0a58bd069b449a9f9b1263a
2019-01-21 14:34:19 +00:00
Logan Chien
0e53d887d6 Add prebuilt ELF binaries checker
This commit introduces a prebuilt ELF binaries checker.  The checker
will check:

1. Whether all DT_NEEDED shared libraries are specified in
   `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).

2. Whether all undefined symbols in the prebuilt binary can be resolved
   to defined symbols exported by its dependencies.

This ensures that prebuilt binaries won't silently become ABI
incompatible.

To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).

If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:

    check_elf_files: false,

Or, add the following setting to Android.mk:

    LOCAL_CHECK_ELF_FILES := false

Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8
2019-01-21 21:35:01 +08:00
Dan Willemsen
3b6f6fe8aa Stop using the files target for droidcore
This way if a BoardConfig.mk configures a specific image to exist (so it
doesn't end up as a folder on /system), but does not configure for it to
be created (like the device targets on AOSP that use a prebuilt), we
won't unnecessarily trigger the build system to build the contents.

Test: `m` before and after, comparing file lists
Test: check treehugger builds before/after
Change-Id: If0e4b958b3dfaa02771a5da70f970379635f904e
2019-01-14 21:46:31 -08:00
Michael Butler
4cf7cde9aa Revert "Add $(PRODUCT_OUT)/apex to the artifact path whitelist"
This reverts commit 3387e65686.

Reason for revert: Topic likely causing build failure on aosp_x86_64-eng in aosp_master:

"build/make/core/base_rules.mk:271: error: art/build/apex: MODULE.TARGET.SHARED_LIBRARIES.com.android.runtime.host.libart-compiler already defined by art/build/apex."

Change-Id: I2033828e7a13062b72d1d66a7f289cf5bb12b776
2019-01-11 20:24:25 +00:00
Jiyong Park
3387e65686 Add $(PRODUCT_OUT)/apex to the artifact path whitelist
$(PRODUCT_OUT)/apex is where shared libraries in APEXes get installed
into. The path can be considered as a fake path as the shared libraries
are installed there just to have symbol files for them under
$(PRODUCT_OUT)/symbols/apex for debugging purpose. Shared libraries in
APEXes are made available to the path at runtime by mounting APEXes via
apexd. The files under $(PRODUCT_OUT)/apex are never compiled into a
file system image (e.g. system.img)

Bug: 120846816
Test: build/soong/build_test.bash -dist -products mainline_system_arm64
Change-Id: I3727091214f08f945559fa5f0f1450e74c1a5c9b
2019-01-11 13:33:56 +09:00
Jeongik Cha
bdf0ec03b6 Merge "Dump and enforce certificate for apks" 2019-01-11 04:31:02 +00:00
Jeongik Cha
b2c4bb7e3d Dump and enforce certificate for apks
Dump the list of APKs that aren't located at system partition and signed
with system certificate.
And when enforcement option is enabled, it makes build error if there is
the apk that satisfies the condition above.

Bug: 74699609

Test: m -j
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/certificate_violation_modules.txt

Change-Id: I23c41f2665dd97abac3e77d1c82d81ff91b894eb
2019-01-10 11:37:22 +09:00
Dan Willemsen
63e48db6d1 Add BUILD_USERNAME and BUILD_HOSTNAME
These replace $USER and `hostname`, which will soon become stable values
due to sandboxing the build on Linux.

Bug: 122270019
Test: check build.prop
Change-Id: I7493e45a2a2defbdba5d82596cb91d68480f0187
2019-01-02 14:33:29 -08:00
Yifan Hong
e5d879a193 Allow space in BOARD_*_SIZE variables for dynamic partitions
Allow instances like:
BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GiB

Test: add trailing space to BOARD_SUPER_PARTITION_SIZE,
BOARD_(group)_SIZE, BOARD_*IMAGE_PARTITION_RESERVED_SIZE,
BOARD_SUPER_PARTITION_(device)_DEVICE_SIZE, build passes.

Fixes: 120042457
Change-Id: Ib7244e3fd2f782657c84cdb74e601ac96176571d
2018-11-28 15:33:17 -08:00
Treehugger Robot
01284abf21 Merge changes from topic "dp_sysprop"
* changes:
  ro.boot.dynamic_partitions: fix empty values
  Remove ro.boot.logical_partitions
2018-11-21 07:39:21 +00:00
Yifan Hong
4a37a03758 ro.boot.dynamic_partitions: fix empty values
When PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is empty, collapse-pairs will
write this line to build.prop:
ro.boot.dynamic_partitions=ro.boot.dynamic_partitions_retrofit=

... which is not what we want.
Test: build without dynamic partitions

Change-Id: I04c3c75fad20604657814b7f9cce2cc0635627ee
2018-11-20 16:06:17 -08:00
Yifan Hong
284b2b9fc9 Remove ro.boot.logical_partitions
Test: boots
Bug: 119286600
Change-Id: I0606c3989588de3afaacc170943eaca82c682085
2018-11-20 16:06:17 -08:00
Yifan Hong
50e7954ac9 Generate retrofit OTA.
Test: m otapackage -j, manual apply on top of P
Bug: 118506262

Change-Id: Iedc389a1058007a604de0482f2348a9ef0d5892a
2018-11-20 11:17:39 -08:00
Treehugger Robot
c6434d43ec Merge "Sort output in dump-files" 2018-11-19 17:43:00 +00:00
Anton Hansson
41b53a3c19 Sort output in dump-files
Makes it less frustrating to use.

Test: m dump-files
Change-Id: I84801f37e2e40a37d65d3f9ce7b19a84f3381a53
2018-11-19 14:33:19 +00:00
Dimitry Ivanov
d04107683b Merge "Enable overrides for shared libraries" 2018-11-17 09:03:04 +00:00
Anton Hansson
2f8e2b8e1f Merge "Disable artifact path requirements for asan builds" 2018-11-14 10:40:28 +00:00
Anton Hansson
2b4469a8a0 Disable artifact path requirements for asan builds
asan builds create many artifacts that normal builds do not, and
are only used for testing. Disable artifact requirements for them.

Bug: 119270428
Test: build internal asan product
Change-Id: I8692ee7e8916d40a8a787c3a07dcf7d677b19cab
2018-11-13 22:39:00 +00:00
Yifan Hong
b7ea9d3870 Merge changes from topic "dp_retrofit"
* changes:
  Add build flags for spanning the super partition across multiple block devices.
  logical partitions -> dynamic partitions
2018-11-13 20:29:18 +00:00
David Anderson
619fe2da5a Add build flags for spanning the super partition across multiple block devices.
This adds BOARD_SUPER_PARTITION_BLOCK_DEVICES, which must contain a list
of the (non-A/B suffixed) partitions that will comprise the super
partition. It is only intended for devices which cannot have a partition
named "super". For each entry, there must be a
BOARD_SUPER_PARTITION_x_DEVICE_SIZE variable defined with the exact size
of that partition (not its image size). The sum of these sizes must be
equal to BOARD_SUPER_PARTITION_SIZE.

Bug: 116802789
Test: device with BOARD_SUPER_PARTITION_BLOCK_DEVICES builds
Change-Id: I1a79c2e08ca99ce7e42207893ef3285caffecf44
2018-11-12 16:12:51 -08:00
dimitry
3142e2949d Enable overrides for shared libraries
Bug: http://b/114470065
Test: make
Change-Id: I084c98ca2630ad3f56504ca0f7f08cff14483872
2018-11-12 10:51:11 +01:00
Yifan Hong
c5c0124e7d logical partitions -> dynamic partitions
Reflect a name change.

* PRODUCT_USE_LOGICAL_PARTITIONS is deprecated and
will be removed in the future.

* ro.boot.dynamic_partitions is created. ro.boot.logical_partitions
will be removed once all the usage is removed.

Bug: 119286600
Test: builds

Change-Id: I5cb8bb1f5ebcee893fbef3a0f047c32de8773830
2018-11-09 16:02:59 -08:00
Anton Hansson
436d7b7336 Merge "Support disabling artifact path requirements" 2018-11-09 17:21:21 +00:00
Anton Hansson
dc6c216476 Support disabling artifact path requirements
Path requirements can get in the way when developing, so
provide a way to disable them on the command line.

Bug: 80410283
Bug: 119025354
Test: lunch mainline_arm64; DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m nothing
Change-Id: Ia44b73f3013a0ea218bd9a361037269c7557da9e
2018-11-09 13:45:18 +00:00
Treehugger Robot
1c7db31772 Merge "Build docs as part of checkbuild" 2018-11-07 18:21:32 +00:00
Colin Cross
7f1ca81e86 Build docs as part of checkbuild
Catch docs breakages in TreeHugger by building docs as part of
checkbuild targets.

Bug: 118815658
Test: m checkbuild
Change-Id: I7e71b176c680f269730d4bf98369a96138c0ee8a
2018-11-05 18:15:24 +00:00
Dan Shi
6fe5bf0adb Copy shared libraries used by tests to testcases directory
This change collects the shared libraries files used by tests in
suite, and deploy the files to testcases/lib*. The shared libraries then
can be zipped in general-tests.zip and device-tests.zip. And the host
test can be run in TradeFed host based on build artifacts.

Bug: 111486845
Test: m -j general-tests; m -j device-tests
Confirm the test can run in testcases directory:
out/host/linux-x86/testcases$ ./net_test_avrcp/x86_64/net_test_avrcp
unzip general-tests.zip, confirm net_test_avrcp can run.

Change-Id: I4f9322118aa4891226ea318cbd1bcee6ca48b050
2018-11-04 19:51:59 -08:00
David Brazdil
7bdde125b5 Remove 'ro.art.hiddenapi.warning' system property
Toasts/dialog have been removed, so this is now unused.

Test: m, phone boots
Change-Id: Ia0c443a2561f276514337365a7b7d991fd5183a8
2018-11-01 09:59:20 +00:00
Colin Cross
c66c317460 Merge changes from topics "soong-aar", "soong-bundle"
* changes:
  Store AAR path from Soong for dist
  Create bundle modules suitable for bundletool
  Dist bundle modules from Soong
2018-10-31 22:12:43 +00:00
Colin Cross
0fb8c97b02 Dist bundle modules from Soong
Dist bundle modules when requested by TARGET_BUILD_APPS.

Bug: 117295826
Test: tapas RecoveryLocalizer && m dist
Change-Id: Iad63ceafc2a60e6735b50eca65cc4859f9d71b52
2018-10-30 15:47:59 -07:00