Commit graph

1055 commits

Author SHA1 Message Date
Dan Willemsen
672e98fac8 Merge "Stop installing host packages via PRODUCT_PACKAGES" 2019-03-29 03:20:52 +00:00
Anton Hansson
cb8276fa93 Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.

Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
2019-03-22 13:25:20 +00:00
Dan Willemsen
2e79dafed1 Stop installing host packages via PRODUCT_PACKAGES
Test: treehugger
Change-Id: I24ac93f3558116f4ddd96d22ef9bbd47240fdd06
2019-03-20 10:29:42 -07:00
Vic Yang
51512c558c Add support for no-vendor-variant VNDK
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed.  Instead, the core variant
will be used by vendor binaries at runtime.

To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module.  This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed.  When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.

As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform.  We add native:platform_vndk for this.

Bug: 119423884
Test: With the corresponding Soong change, build with
      TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
      on it.  Build with no-vendor-variant VNDK and check the core
      variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
      dummy VNDK library and check build fails.

Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
2019-03-20 10:23:04 -07:00
Anton Hansson
f9b6cd6593 Merge "Fix missing modules check for dont_bother goals" 2019-03-20 10:11:50 +00:00
Treehugger Robot
22b9a4a207 Merge "Generate api.xml for every target build." 2019-03-19 19:18:16 +00:00
Anton Hansson
fa7ddae29b Fix missing modules check for dont_bother goals
Like If1f817d855cbe329b83caee9fdd68c2cce55f02b, but for
PRODUCT_PACKAGES, which is only enabled for a few builds.

Also share the ALLOW_MISSING_DEPENDENCIES check with the host
version.

Test: m product-graph
Change-Id: Iab55072e7d7c0fc9f4680cc515e139a5214dc3b4
2019-03-19 18:20:30 +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