Commit graph

1191 commits

Author SHA1 Message Date
Elliott Hughes
440c99f1f2 Stop building unnecessary tarballs.
Test: treehugger
Change-Id: Iaba2aa6d09ad891f37171cc76778d08c78c78f93
2019-07-12 05:04:12 +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
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
Dan Willemsen
b88f792d25 Install shared library dependencies for 64-bit windows
Test: m host_cross_libandroidicu_64; see libs in out/host/windows-x86/lib64
Change-Id: Ibf816aeb96e70b70cfcb9b58df9605c3af87db39
2019-06-25 12:56:41 -07:00
Chen Zhu
ce72964fa1 Add Mainline Test Suite (MTS) to build.
Test: m mts

Bug: 126277867
Bug: 123411735
Change-Id: Iba6bf89bd4457ed0f5c1eb3351bf5ffd6720441d
2019-06-19 15:14:23 -07:00
Felix
b56b25157c core/main: Strip bitness before existence check
Strip bitness information for PRODUCT_PACKAGES and
PRODUCT_HOST_PACKAGES before checking against ALL_MODULES.

Also correct spelling: nonexistant -> nonexistent

Bug:
If PRODUCT_ENFORCE_PACKAGES_EXIST was set, the build system would
complain about nonexistent packages for e.g. HALs where the bitness was
specified using a suffix, such as android.hardware.audio@4.0-impl:32

Test:
Add android.hardware.audio@4.0-impl:32 to PRODUCT_PACKAGES, specify
PRODUCT_ENFORCE_PACKAGES_EXIST, ensure no whilelist is set.
"make systemimage vendorimage" -> No error.

Signed-off-by: Felix <google@ix5.org>
Change-Id: Id59460a19320aa9437b8805411a0d97fa6432633
2019-06-03 14:10:33 +02:00
Dan Willemsen
e048f7eff3 Remove BUILD_BROKEN_ENG_DEBUG_TAGS
All users have been removed.

Test: treehugger
Change-Id: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
Merged-In: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
2019-05-25 22:47:35 +00:00
Daniel Mentz
bacc040da0 Install radio image as part of droidcore
Previously, the radio image was only installed as part of "make dist".

Change-Id: Id497238930b5a155d1ae30fd7fb2203377c9741d
2019-05-24 17:50:27 +00:00
Dimitry Ivanov
f64b664d6c Merge "Fix typo in APEX_LIBS_ABSENCE_CHECK_EXCLUDE" 2019-05-24 08:26:36 +00:00
dimitry
c193ae4c04 Fix typo in APEX_LIBS_ABSENCE_CHECK_EXCLUDE
arm64 guest libraries are located in lib64/arm64

Bug: http://b/77159578
Test: lunch cf_x86_64_phone-userdebug in internal master; mm -j48 dist
Change-Id: I9f1f9426cbaed0a269126cb242e1a6df9249b167
2019-05-23 16:01:50 +02:00
Sasha Smundak
2748c61659 Remove unused (and currently broken) samplecode target.
Running 'm samplecode' fails with
"build/make/core/main.mk:1834: error: overriding commands for target
`out/target/common/samples/libsimplejni.so', previously defined at
build/make/core/main.mk:1834"
This proves that noone has been using 'samplecode' target at least since
the build started generating both 32- and 64-bit shared libraries by default,
because development/samples/SimpleJNI/jni/Android.mk defines libsimplejni.so
as 'sample', and the deleted code in core/main.mk causes duplicate rule in
such case.

Test: treehugger
Change-Id: I38a4c478fcb0e60793129fe2513a8cdc6d2c79fb
2019-05-22 20:01:49 -07:00
Colin Cross
ab83244472 Bypass LOCAL_*_REQUIRED_MODULES checks for ONE_SHOT_MAKEFILE
When ONE_SHOT_MAKEFILE is set, the targets of LOCAL_*_REQUIRED_MODULES
may not exist, so skip the error message.

Fixes: 131241991
Test: mmm cts/tests/signature/intent-check
Change-Id: I95c4c901610746854179af8486c8c4767dd18864
2019-05-17 23:10:26 +00:00
Martin Stjernholm
ff29b0fa3e Add libc_malloc_{debug,hooks}.so to the absence check.
They should only be in the Runtime APEX, c.f. discussion on
http://r.android.com/957159.

Test: build/soong/build_test.bash through Forrest
Bug: 124293228
Change-Id: I33e97a56e67c3f4734d14f38e0f1597b697a2604
2019-05-14 18:37:40 +01:00
Martin Stjernholm
6311b83cc2 Extend library absence check to Bionic libs and all ART debug libs.
(cherry picked from commit c2e0205927)

Test: m systemimage
Test: build_test on Forrest
Bug: 132289438
Merged-In: I1a25d8d45668638b7eb0d39ded9cad3ed30db33c
Change-Id: I5b89aa33d35022fdca7f19c98f1bae51c173a876
2019-05-10 16:14:58 +00:00
Martin Stjernholm
e954e3e47d Add the library absence check as a kati stage check.
(cherry picked from commit a5181f67a7)

Test: m systemimage
Test: build_test on Forrest
Bug: 132289438
Merged-In: I7a93cc0ac4480404a3d56c75eb43ae499e8a3a05
Change-Id: I6012e16bb02d4fea1cff51b20de94560da7a8d09
2019-05-10 16:14:50 +00:00
Martin Stjernholm
f26bef86ec Merge "Extend library absence check to Bionic libs and all ART debug libs." 2019-05-09 11:51:37 +00:00
Martin Stjernholm
e115e3cf07 Extend library absence check to Bionic libs and all ART debug libs.
Test: m systemimage
Test: build/soong/build_test.bash
Bug: 124293228
Change-Id: I1a25d8d45668638b7eb0d39ded9cad3ed30db33c
2019-05-09 01:07:56 +01:00
TreeHugger Robot
cfca3e591d Merge "Move ro.boot.dynamic_partitions to vendor/build.prop" into qt-dev 2019-05-08 23:28:51 +00:00
Hridya Valsaraju
ccd6279bef Move ro.boot.dynamic_partitions to vendor/build.prop
Bug: 132197773
Test: property present in vendor/build.prop

Currently, the property resides in product partition which gets
overwritten by the GSI image. Moving it to vendor will ensure
that the property is set even when a GSI image is flashed on the device.

Change-Id: I4d4a3c473194e15ba124a121f89bbb3ec1a73d19
Merged-In: I4d4a3c473194e15ba124a121f89bbb3ec1a73d19
2019-05-08 21:40:26 +00:00
Treehugger Robot
e591ef32a0 Merge "Move ro.boot.dynamic_partitions to vendor/build.prop" 2019-05-08 21:39:26 +00:00
Hridya Valsaraju
1fd498d748 Move ro.boot.dynamic_partitions to vendor/build.prop
Bug: 132197773
Test: property present in vendor/build.prop

Currently, the property resides in product partition which gets
overwritten by the GSI image. Moving it to vendor will ensure
that the property is set even when a GSI image is flashed on the device.

Change-Id: I4d4a3c473194e15ba124a121f89bbb3ec1a73d19
2019-05-08 16:22:06 +00:00
Martin Stjernholm
b0382f0319 Add the library absence check as a kati stage check.
Primarily for use with build_test during presubmit.

Moved the check to main.mk to avoid nonobvious dependency on
product_target_FILES from main.mk to Makefile.

Test: m systemimage
Test: build/soong/build_test.bash
Test: m out/target/product/taimen/system/lib/libdexfile.so; m systemimage;
  check that "find"-based check fails
Test: Add a system library to APEX_MODULE_LIBS; m systemimage;
  check that "product_target_FILES"-based check fails;
  env DISABLE_APEX_LIBS_ABSENCE_CHECK=true m systemimage;
  check that it works
Bug: 124293228
Change-Id: I7a93cc0ac4480404a3d56c75eb43ae499e8a3a05
2019-05-03 13:02:51 +01:00
Yifan Hong
75ed2e7f11 Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag.
If set to true,
- super.img is built from images in $PRODUCT_OUT
- super.img is built to $PRODUCT_OUT
- super.img is built when 'make'.

'make dist' still builds super image from images in target files to
intermediates directory.

This flag is useful for virtual devices, but isn't intended to be set for
actual devices. For actual devices, userspace fastboot should flash
super_empty.img and individual user images separately.

Test: on cuttlefish (flag is set),
      make            # generates $OUT/super.img
      make superimage # generates $OUT/super.img
Test: on real non-retrofit DAP device (flag is not set)
      make            # no super.img is generated
      make superimage # generates $OUT/obj/PACKAGING/.../super.img
      make dist       # generates out/dist/super.img

Bug: 113175337

Change-Id: Ieb81e4fbb663bb4b69e9962c3fa9f16b03aeb907
(cherry picked from commit acd862aed3)
Merged-In: Ieb81e4fbb663bb4b69e9962c3fa9f16b03aeb907
2019-04-29 16:41:32 -07:00
Yifan Hong
acd862aed3 Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag.
If set to true,
- super.img is built from images in $PRODUCT_OUT
- super.img is built to $PRODUCT_OUT
- super.img is built when 'make'.

'make dist' still builds super image from images in target files to
intermediates directory.

This flag is useful for virtual devices, but isn't intended to be set for
actual devices. For actual devices, userspace fastboot should flash
super_empty.img and individual user images separately.

Test: on cuttlefish (flag is set),
      make            # generates $OUT/super.img
      make superimage # generates $OUT/super.img
Test: on real non-retrofit DAP device (flag is not set)
      make            # no super.img is generated
      make superimage # generates $OUT/obj/PACKAGING/.../super.img
      make dist       # generates out/dist/super.img

Bug: 113175337

Change-Id: Ieb81e4fbb663bb4b69e9962c3fa9f16b03aeb907
2019-04-25 10:51:35 -07:00
Bowgo Tsai
d82a1549f1 Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.

File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.

It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.

Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.

Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
      are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
       in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-debug.img and $OUT/boot.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`

Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
Merged-In: I30137c3caef91805d9143d404e5e4d06c0fccc30
(cherry picked from commit 0013f55ef4)
2019-04-23 21:03:00 +08:00
Bowgo Tsai
0013f55ef4 Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.

File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.

It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.

Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.

Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
      are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
       in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-debug.img and $OUT/boot.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`

Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
2019-04-22 21:50:07 +08:00
David Brazdil
38cd7f3c8b Enable core platform API warnings on non-user builds
Core platform API violation reporting is disabled by default and can be
enabled by setting the persist.debug.dalvik.vm.core_platform_api_policy
property. Set it to "just-warn" for non-user builds and leave disabled
on user builds.

Test: builds, boots
Bug: 125701194
Change-Id: I2f4be42373de9fdbc71c3178de6d34e07809f13a
Merged-In: I2f4be42373de9fdbc71c3178de6d34e07809f13a
(cherry picked from commit f5b3fc854f)
2019-04-15 22:06:39 +01:00
David Brazdil
f5b3fc854f Enable core platform API warnings on non-user builds
Core platform API violation reporting is disabled by default and can be
enabled by setting the persist.debug.dalvik.vm.core_platform_api_policy
property. Set it to "just-warn" for non-user builds and leave disabled
on user builds.

Test: builds, boots
Bug: 125701194
Change-Id: I2f4be42373de9fdbc71c3178de6d34e07809f13a
2019-04-15 16:12:59 +01:00
Dan Willemsen
5606d2b53b Split ALL_MODULES.*.REQUIRED and friends between target/host
So that we actually respect different LOCAL_REQUIRED_MODULES for the
host and device versions instead of unioning them. That got particularly
problematic when LOCAL_SHARED_LIBRARIES is implicitly added to
LOCAL_REQUIRED_MODULES. We also used to walk through device-only modules
when filling out the list of required modules, which triggered even more
extra installations.

This also changes the requirements for PRODUCT_HOST_PACKAGES so that it
no longer accepts target-only phony modules (since we can now
differentiate them). They were all removed in previous patches.

Bug: 123925742
Fixes: 129719937
Test: treehugger; diff resulting builds
Test: diff list of product_target_FILES and product_host_FILES
Change-Id: I2ed8950320d31f5693323ad8cef6ec5b6780b7d4
Merged-In: I2ed8950320d31f5693323ad8cef6ec5b6780b7d4
(cherry picked from commit 8e96a794ac)
2019-04-10 17:04:48 -07:00
Dan Willemsen
8e96a794ac Split ALL_MODULES.*.REQUIRED and friends between target/host
So that we actually respect different LOCAL_REQUIRED_MODULES for the
host and device versions instead of unioning them. That got particularly
problematic when LOCAL_SHARED_LIBRARIES is implicitly added to
LOCAL_REQUIRED_MODULES. We also used to walk through device-only modules
when filling out the list of required modules, which triggered even more
extra installations.

This also changes the requirements for PRODUCT_HOST_PACKAGES so that it
no longer accepts target-only phony modules (since we can now
differentiate them). They were all removed in previous patches.

Test: treehugger; diff resulting builds
Test: diff list of product_target_FILES and product_host_FILES
Change-Id: I2ed8950320d31f5693323ad8cef6ec5b6780b7d4
2019-04-10 13:22:23 -07:00
Johan Harvyl
ca1dbcc809 Remove 'column' from modules target
The standard target modules stopped working when restrictions in
soong were introduced to which binaries are allowed to be used during
builds.

Listing a very large amount of modules in columns does not make it
more readable and harder to work with in tools so just drop it.

Bug: 129800175
Test: make modules

(cherry picked from commit 7005d4f4cc)

Change-Id: I317f6eb4ba5ea633264939a9a58f716bdb36596e
2019-04-04 13:19:51 -07:00
Johan Harvyl
7005d4f4cc Remove 'column' from modules target
The standard target modules stopped working when restrictions in
soong were introduced to which binaries are allowed to be used during
builds.

Listing a very large amount of modules in columns does not make it
more readable and harder to work with in tools so just drop it.

Bug: 129800175
Test: make modules
Change-Id: I26040479a03916161fb5d072de1af640d8080c7f
2019-04-03 07:41:43 -07:00
Anton Hansson
8adf501905 Merge "Access PRODUCT_ variables directly" 2019-03-29 16:54:47 +00:00
Anton Hansson
b5cec0d792 Merge "Automate the strip and assignment of PRODUCT_ vars" 2019-03-29 16:54:25 +00:00
Dan Willemsen
672e98fac8 Merge "Stop installing host packages via PRODUCT_PACKAGES" 2019-03-29 03:20:52 +00:00
Anton Hansson
8dab0a6f50 Access PRODUCT_ variables directly
This CL simplifies the PRODUCTS.$(INTERNAL_PRODUCT).X accesses of
product variables, and removes unnecessary stripping of them.

Replace: '\$\(PRODUCTS\.\$\(INTERNAL_PRODUCT\)\.([^\)]*)\)' with '$(\1)'
Replace: '\$\(strip\s*\$\(PRODUCT_([^\)]*)\)\)' with '$(PRODUCT_\1)'

A few minor manual tweaks.

Bug: 116769560
Test: presubmit
Change-Id: I70c54f1582e3cc780028535960147d99ebc2e0e1
2019-03-28 15:54:25 +00:00
Anton Hansson
13ea2a6a7d Automate the strip and assignment of PRODUCT_ vars
With this change, all PRODUCT_ variables are treated the same
when it comes to stripping and assigning them to their final
variable name. In the past, all the PRODUCT variables needed
to be listed in two places to achieve this.

The documentation previously attached to the strip/assignment
is moved to the PRODUCT_ variable list in product.mk.

Also refactor some of the default value logic to cope with
the new automation.

Many places in the build system that currently refer to
$(PRODUCTS.$(INTERNAL_PRODUCT).X) can now be modified to
use $(X) directly.

Bug: 116769560
Test: verified noop on PRODUCT_ variables on all products in the tree
Change-Id: I5677c355e81359b1d3c0db2a2232941097a05047
2019-03-28 15:26:49 +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
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
Dan Willemsen
ea898f1c53 Really mark sdk_addon as PHONY to fix m snod
When we're using a dont_bother_goals (including snod), we don't load
build/make/core/tasks/*.mk, so sdk_addon isn't defined as a PHONY rule.

This causes a build break because build/make/core/Makefile uses
dist-for-goals with sdk_addon. dist-for-goals requires its arguments to
be PHONY targets.

Test: m snod
Change-Id: I69937fe9360be57766d17ed4c28b5d2a1e348308
2018-10-26 11:17:25 -07:00
Dan Willemsen
6dbb33dfad Mark BUILD_NUMBER as obsolete, more vars as readonly
In preparation for moving BUILD_NUMBER and FILE_NAME_TAG handling to
soong_ui, mark BUILD_NUMBER as obsolete and FILE_NAME_TAG as readonly.

Later changes will remove BUILD_NUMBER entirely, and move FILE_NAME_TAG
handling into the kati packaging step via dist-for-goals renames.

Test: build_test on master
Change-Id: I0e340d32fe0cb6296d3b5a7fec349b50632d044e
2018-10-22 15:20:26 -07:00
Anton Hansson
2bfa7401c7 Merge "Re-add product_MODULES" 2018-10-22 12:28:56 +00:00
Dan Willemsen
78c40be560 Create a new kati packaging step; move dist
Instead of looking at `dist` and DIST_DIR directly in the Kati Build
step, always write out information about every call to dist, then create
the rules in another ckati run.

So instead of having:

  dist:    <goal> -> <dist> -> <output>
                \______________↑

  nodist:  <goal> -----------> <output>

Always use another phony target in the Kati Build step:

   <goal> ---> <output>
        \----> _dist_<goal>

Then in the packaging step (which is much faster), choose between dist
and no dist:

  dist:   _dist_<goal> -> <dist> -> <output>

  nodist: _dist_<goal>

Bug: 117463001
Test: m dist
Change-Id: Ic96bb6356740300dd3113f6ed699e6a619360c40
2018-10-20 21:44:44 +00:00
Dan Willemsen
7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00
Anton Hansson
dcb5ef1333 Re-submit "Add trailing slash to mainline path claims."
With a workaround for preopt files that get installed into an unknown
path. The BoardConfig defines whether the files go in /system_other,
so allow that.

This reverts commit 46bf4b510c.

Test: lunch mainline_arm64-userdebug; m nothing
Change-Id: Ia75670eb6e3730ad0ff17f5b81954b69f6cab22b
2018-10-17 16:40:29 +01:00
Anton Hansson
83ba31cd95 Allow a hint together with artifact path enforcement
This enables specifying a product-specific error message, to
accompany the otherwise potentially cryptic message.

Bug: 117637311
Bug: 80410283
Test: downstream product
Test: lunch mainline_arm64; m nothing
Change-Id: I9953d44d6338e5a79c5ed651716d3e39647ec87a
2018-10-16 07:41:02 +01:00
Anton Hansson
9cdf17241a Allow more relaxed artifact path req enforcement
Only enforce whitelist entries are unused if the enforcement variable
is set to "true" or "strict". If set to something else (e.g. "relaxed"),
allow redundant whitelist entries.

This also enables adding wildcard entries, which were previously
considered unused.

Test: downstream
Bug: 117637311
Bug: 80410283
Change-Id: I67a84f8ecfad5fa68c21ee728f1e3085ef89fbcf
2018-10-15 20:49:48 +01:00
Anton Hansson
f37a35cdd0 Re-add product_MODULES
This variable is depended on by vendor_module_check.mk

Bug: 117638909
Test: build_test
Change-Id: I93f7056b001ca803c88e1e1dfebe204f289c59ab
2018-10-12 11:34:29 +01:00
Anton Hansson
6961e53876 Create a dump-files phony target.
This is more convenient than the current always-off conditional,
because it doesn't require changing the build system to dump
the installed files.

Bug: 80410283
Test: m dump-files
Change-Id: I7d395750673aff07d2018ffce8321dd280b94ccf
2018-10-01 16:26:17 +01:00
Tao Bao
2790154041 Remove INCLUDE_TEST_OTA_KEYS.
This has been long dead since commit
17c83cf22c (2009).

Test: m checkbuild (via TreeHugger)
Test: No hit in code search.
Change-Id: I054241ae63436ade2f4e50ec2fc3757ae35635dd
2018-09-25 12:43:34 -07:00
Anton Hansson
948615083a Re-write the module override logic.
This makes the product-installed-files macro more accurately reflect
the files installed for a given product, as well as fixing bugs in
the previous implementation.

Specifically, the complete list of overrides found so far is stripped
in each round of expanding required modules. Previously, overrides were
stripped out *after* expanding required modules. This meant that for a
scenario where B depends on C, and A overrides B, C could get installed.
It's unclear if this was a problem in practice.

The other effect is that the offending artifacts txt is more accurate,
since overridden modules are now correctly removed.

Bug: 80410283
Test: build_test downstream
Change-Id: I8bfc7c40bedd5cb2afba567bae4b998f51770793
2018-09-13 07:51:08 +01:00
Anton Hansson
68c5fe4cca Move product-parts of tags_to_install
This makes the product-installed-files macro more accurate, as it will
now include the eng/debug/test/asan packages for each product involved
in the analysis.

It also fixes a bug, where packages in e.g. PRODUCT_PACKAGES_DEBUG
would not get their REQUIRED modules installed prior to this change
(I think).

Bug: 80410283
Test: diff modules_to_install on an internal product
Change-Id: I8e148454df2f96523bbed25e2695d050559968f1
2018-09-13 07:51:05 +01:00
Dan Willemsen
5c43a6925a Always define apps_only
Allows dist-for-goals entries to use always use apps_only, without
having to conditionalize on TARGET_BUILD_APPS, or cause errors on full
platform builds.

Test: EMMA_INSTRUMENT=true m dist
Change-Id: Id484ad2a650b8ad49880469f195080ef7fa8c814
2018-09-11 22:47:45 -07:00
Dan Willemsen
921f581bef Mark more sdk targets as PHONY
These are used in various dist-for-goal targets even if we're not
currently building the sdks, so they always need to be marked with
.PHONY.

Test: m dist
Change-Id: I1e11ae37c6d0fd6ef8a3e293cf7409773c1bf3ab
2018-09-10 15:14:09 -07:00
Tom Cherry
04552fed3b Merge "Support a first stage ramdisk via TARGET_RAMDISK_OUT" 2018-08-29 17:05:40 +00:00
Tom Cherry
d14b895665 Support a first stage ramdisk via TARGET_RAMDISK_OUT
Support a first stage ramdisk which will include the targets placed
into TARGET_RAMDISK_OUT.  This replaces the existing ramdisk on
existing devices.

All system images are now built to be mounted as the root dir.
Devices with a first stage ramdisk will switch root to the system
partition.

BOARD_BUILD_SYSTEM_ROOT_IMAGE remains and is used to specify if the
system partition is going to be directly used as rootfs without the
ramdisk.

Bug: 79173823
Bug: 79758715
Test: hikey boots, sailfish boots
Test: OTA walleye from P to master
Change-Id: Idbb2dccc6340b0235a4bef03e11e420a9ed154b6
2018-08-28 12:42:41 -07:00
Anton Hansson
688abdb981 Add substitution for product_services and odm.
This enables using PRODUCT_COPY_FILES with these partitions, which
otherwise doesn't work because the list of targets to build/install
contains placeholders.

Bug: 80741439
Test: make
Change-Id: I9d49a3bc5212139a96c58cf550680257811371e2
2018-08-28 15:45:01 +01:00
David Anderson
433f822d76 Build image for clean super partition.
This adds a new super_empty.img output to the build when
PRODUCT_USE_LOGICAL_PARTITIONS is true and a super partition size is
set. This will be used by fastboot flashall in fastbootd, since it needs
a record of the partition layout in case the super partition is corrupt
or not yet flashed.

Unlike the full super.img, super_empty.img is not a sparse image. It
contains the minimal data sequence needed to format the super partition.
It also does not contain partition sizes, since flashing is responsible
for choosing the correct partition size.

The full super.img (which contains embedded partition data) is still
available via "make dist".

Bug: 78793464
Test: super_empty.img generated when PRODUCT_USE_LOGICAL_PARTITIONS is
      true.
      mmm system/extras/partition_tools && lpdump super_empty.img works

Change-Id: I34e915a1fead806287dde554d190474785e52500
2018-08-22 11:40:22 -07:00
Anton Hansson
0de30815ff Merge "Fix dump-products." 2018-08-22 16:58:13 +00:00
Anton Hansson
ae6bf49575 Merge "Make FULL_BUILD not set for the dont_bother case." 2018-08-22 16:57:48 +00:00
Anton Hansson
9b8e6cf067 Fix dump-products.
m dump-products didn't print anything useful prior to this change,
however this was visible in the terminal:
15:18:58 Error dumping make vars: Failed to parse make line: "==== build/target/product/aosp_arm.mk ===="

Convert this goal to normal target instead, which apart from making
$(info) actually print something, considers the build successful
when running "m dump-products" too. This makes it easier to run with
e.g. multiproduct_kati.

Test: m dump-products
Change-Id: I944c87cd0fd323687690b0fcc3c37a8f37242cd9
2018-08-22 10:49:18 +01:00
Anton Hansson
85d8ce044f Make FULL_BUILD not set for the dont_bother case.
If dont_bother is set, we're not going to read all the module makefiles,
so the checks gated behind FULL_BUILD will fail.

Test: lunch mainline_system_arm64; m vnod
Change-Id: Ic7842f772edd6b6a6fdc427d018ea1dfe3cbfdbf
2018-08-22 10:49:03 +01:00
Tao Bao
e9d61b02e8 Rename INSTALLED_SYSTEMIMAGE to INSTALLED_SYSTEMIMAGE_TARGET.
This gives a consistent mapping between partition names and the image
targets (i.e. partition => INSTALLED_PARTITIONIMAGE_TARGET). This CL
also creates an alias for the old name so that device-specific Makefiles
that refer to INSTALLED_SYSTEMIMAGE would keep working.

This CL renames image-for-partitions to images-for-partitions, and
returns INSTALLED_SYSTEMIMAGE_TARGET for system. It doesn't change the
actual functionality, but allows substantially simplifying the rule.

Test: `m dist` with aosp_taimen-userdebug
Test: `m dist` with a target that uses super partition
Change-Id: I2954ee5d855c1652a33c640ee615649588d5bc04
2018-08-21 21:57:21 -07:00
Treehugger Robot
c272a99b5c Merge "Add support for /odm partition" 2018-08-16 03:37:36 +00:00
Tao Bao
1fa790cb53 Merge "Remove the hack that uses INSTALLED_RAMDISK_TARGET as INSTALLED_BOOTIMAGE_TARGET." 2018-08-15 17:59:47 +00:00
Tao Bao
10fc949873 Reland "Generate the list of installed files in recovery image."
This reverts commit 60a47827cb to reland
the change that generates installed-files-recovery.{txt,json}.

This CL addresses the previous issue by explicitly depending on
INSTALLED_BOOTIMAGE_TARGET or INSTALLED_RECOVERYIMAGE_TARGET. This
avoids the race condition between INSTALLED_{BOOT,RECOVERY}IMAGE_TARGET
and INSTALLED_FILES_FILE_RECOVERY. As a result, it will also give a
complete list of files that are installed to recovery ramdisk image.

Bug: 30414428
Test: `m dist` with aosp_taimen-userdebug. Check the generated files of
      $OUT/installed-files-recovery.{txt,json}.
Change-Id: I8bde0dafda7d8ed9c4113dc82553c4edc7f79548
2018-08-14 23:32:32 -07:00
Tao Bao
b1a2e353f2 Remove the hack that uses INSTALLED_RAMDISK_TARGET as INSTALLED_BOOTIMAGE_TARGET.
This also fixes the emulator build issue with `BOARFD_AVB_ENABLE := true`.

Bug: 78113934
Test: `m dist` with emulator builds.
Test: `m dist` with aosp_taimen-userdebug
Change-Id: I2089e0ab15885b4cfc16d4a7e8be3dd0b60ef46f
2018-08-14 16:17:12 -07:00
Tao Bao
60a47827cb Revert "Generate the list of installed files in recovery image."
This reverts commit 774f63db4a.

Bug: 112590987
Test: N/A
Change-Id: I7b1c642149d45071ae4c8c9a2cedc40b4e360397
2018-08-14 11:30:58 -07:00
Alex Light
1efb8a7a83 Merge "Revert "Build image for clean super partition."" 2018-08-14 16:34:26 +00:00
Alex Light
989b3ad859 Revert "Build image for clean super partition."
This reverts commit 8a72da6c63.

Reason for revert: breaks a build

Change-Id: I743a67757c560b5bb2b201612d0898276b6804b6
Test: None.
2018-08-14 16:25:52 +00:00
Treehugger Robot
6f08de7963 Merge "Build image for clean super partition." 2018-08-14 02:54:02 +00:00
David Anderson
8a72da6c63 Build image for clean super partition.
This adds a new super_empty.img output to the build when
PRODUCT_USE_LOGICAL_PARTITIONS is true and a super partition size is
set. This will be used by fastboot flashall in fastbootd, since it needs
a record of the partition layout in case the super partition is corrupt
or not yet flashed.

The full super.img (which contains embedded partition data) is still
available via "make dist".

Bug: 78793464
Test: super_empty.img generated when PRODUCT_USE_LOGICAL_PARTITIONS is
      true

Change-Id: I9f00b07e5b685a3230803fa1a5a569544d0ab625
2018-08-13 13:13:08 -07:00
Tao Bao
774f63db4a Generate the list of installed files in recovery image.
We're putting more files into recovery image since adding the support
for using shared libraries in recovery. This CL generates the list of
files to help understand the exact files installed there and their
sizes.

Bug: 112494634
Test: `m dist` with aosp_marlin-userdebug. Check the generated file at
      out/dist/installed-files-recovery.{txt,json}.
Change-Id: I7a9e05da52f95059a7d7adc85c74e888125ee66e
2018-08-13 09:19:17 -07:00
Bowgo Tsai
d624fa63d5 Add support for /odm partition
This CL is largely an adaptation of Change-Id
I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d

tools/vendor_buildinfo.sh is also renamed to tools/device_buildinfo.sh.
The caller then can invoke device_buildinfo.sh "vendor" | "odm" to
generate properties for vendor.img and odm.img, respectively.

It adds the following variables:

- BOARD_AVB_ODM_KEY_PATH
- BOARD_AVB_ODM_ALGORITHM
- BOARD_AVB_ODM_ROLLBACK_INDEX_LOCATION
- BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
- BOARD_ODMIMAGE_EXTFS_INODE_COUNT
- BOARD_ODMIMAGE_EXTFS_RSV_PCT
- BOARD_ODMIMAGE_PARTITION_SIZE
- BOARD_ODMIMAGE_JOURNAL_SIZE
- BOARD_ODMIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_ODMIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_ODMIMAGE
- BOARD_USES_ODMIMAGE
- LOCAL_ODM_MODULE
- PRODUCT_ODM_BASE_FS_PATH
- PRODUCT_ODM_VERITY_PARTITION
- PRODUCT_ODM_PROPERTIES
- TARGET_COPY_OUT_ODM
- TARGET_OUT_ODM
- TARGET_OUT_ODM_*

Bug: 64195575
Test: boot a Taimen with existing images

Test: `make odmimage` with
      - BOARD_AVB_ENABLE := true
      - BOARD_ODMIMAGE_PARTITION_SIZE := 62914560
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success

Test: `make odmimage` with
      - BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE := 10485760
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - BOARD_AVB_ENABLE := true
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success
      - PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true

Change-Id: I4dea7b567ec49a766c7a4683decaf81c7e921d55
2018-08-08 18:59:44 +08:00
Yifan Hong
d55225f8d6 Merge "Remove USE_LOGICAL_PARTITIONS override"
am: c0213682b3

Change-Id: I75667dfc3596cda7b8b640540f48964081107eb2
2018-08-01 11:40:43 -07:00
Yifan Hong
9a7d525849 Merge "Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags."
am: d1c308bf40

Change-Id: I834e75dcfc04af0dd8655027bfc251c3d0162815
2018-08-01 11:39:59 -07:00
Yifan Hong
a42e5f976d Remove USE_LOGICAL_PARTITIONS override
... so that its requirements does not fallback
on the overridden USE_LOGICAL_PARTITIONS, but
PRODUCT_USE_LOGICAL_PARTITIONS.

Test: m superimage -j
Change-Id: Ib14aaf83cc8bd4336125d503d11c69a60566530e
2018-08-01 18:29:44 +00:00
Yifan Hong
2dae5721d4 Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags.
Split the flag into PRODUCT_USE_DYNAMIC_PARTITION_SIZE
and PRODUCT_BUILD_SUPER_PARTITION. More sub-flags can be
added with the same way.

Also change some checks with USE_LOGICAL_PARTITIONS with
the appropriate sub-flags.

This allows easier device bring-up to fulfill the requirements
separately.

This also enables dynamic partition size without logical patition.
Originally, to enable BOARD_*_PARTITION_RESERVED_SIZE must also
enable PRODUCT_USE_LOGICAL_PARTITIONS. The patch fix the rule to
let dynamic partition size is able to be used independently.

Fixes: 111966003

Test: make superimage with PRODUCT_USE_LOGICAL_PARTITIONS
Change-Id: I45b29c87bf94356d8416bbd58a14c8982039c222
2018-08-01 00:39:13 +00:00
David Brazdil
6f4bc3437d Merge "Do not run veridex on unbundled app builds"
am: 7b59994751

Change-Id: Id7b05cfbf9707c54c80d04948b5d53af36a347c9
2018-07-31 09:06:18 -07:00
David Brazdil
7b59994751 Merge "Do not run veridex on unbundled app builds" 2018-07-31 16:01:58 +00:00
David Brazdil
825770ebad Do not run veridex on unbundled app builds
Unbundled app builds do not build the framework, only apps against
the prebuilt public API. Running veridex from the local tree does,
however, depend on the framework to generate the list of non-SDK
APIs. Disable veridex on such builds and remove appcompat.zip from
artifacts.

Test: make ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I16289adc7fc660109d61260e8a49e992228e727c
2018-07-31 15:15:27 +01:00
Yifan Hong
8883a739b3 Merge changes I1459d62f,I4c2b975e
am: bb937a6b69

Change-Id: Ifdedee1b0251bc9c2a8baf30d28b5d315b5c9e20
2018-07-30 11:35:33 -07:00
Yifan Hong
bb937a6b69 Merge changes I1459d62f,I4c2b975e
* changes:
  Build image for super partition
  productservices => product_services
2018-07-30 18:23:38 +00:00
Yifan Hong
48b23f3a0c Merge changes from topic "lrap_sysprop"
am: 9c1264417f

Change-Id: I82335d291a5ae0a7fe82bb6742652b018943c699
2018-07-30 10:41:10 -07:00
Yifan Hong
af9e7f04c3 ro.boot.logical_partitions moved to product image
Test: m productimage -j && cat $OUT/product/build.prop
Bug: 111909365
Change-Id: I62abd5602f6b2fe7eead9d636ffb7708df23fd02
2018-07-27 16:24:38 -07:00
Yifan Hong
37c0c7c82d Build image for super partition
... for bootstrapping / initializing the device.
Image is built to $(PRODUCT_OUT)/super.img when running
`m dist`. For A/B devices, the image contains other
partitions in the _a slot.

Change-Id: I1459d62f02b95f142dfb3b7608f88ec6801dbf37
Fixes: 111758129
Test: m superimage -j
2018-07-27 13:45:43 -07:00
Anton Hansson
b682674226 Merge "Don't apply path enforcements for non-full builds."
am: 362fff4fcd

Change-Id: I8578f069aa8b032832ef35dd78b973b517e6b547
2018-07-26 03:10:49 -07:00
Anton Hansson
362fff4fcd Merge "Don't apply path enforcements for non-full builds." 2018-07-26 10:02:44 +00:00
Dan Willemsen
76f0441dc0 Merge "Mark more targets as PHONY"
am: 6708f9507b

Change-Id: I4a23ba6f0043cef1406e40752d40b1228d0c8774
2018-07-24 15:37:00 -07:00
Treehugger Robot
6708f9507b Merge "Mark more targets as PHONY" 2018-07-24 22:24:37 +00:00
Anton Hansson
a5fa898189 Don't apply path enforcements for non-full builds.
The installed files lists are wildly inaccurate unless all the
makefiles in the tree have been parsed, so the "redundant whitelist"
computation will be too trigger-happy in this case.

Bug: 111757442
Test: mmm -j system/extras/partition_tools
Test: m out/target/product/generic_arm64/offending-artifacts.txt
Change-Id: Id3a9f61d2366de77cdedf9cb1e4e39f7d18ade6f
2018-07-24 13:52:55 +01:00
Anton Hansson
a94ba25840 Merge "Dump artifacts offending path reqs into a file"
am: 7b4b1b1548

Change-Id: Id661c2785ffddb053499cbfa3e0dd281cb609907
2018-07-24 02:20:02 -07:00
Anton Hansson
7b4b1b1548 Merge "Dump artifacts offending path reqs into a file" 2018-07-24 09:09:17 +00:00
Dario Freni
bf01d8301a Merge "Generate a zipfile with appcompat logs during dist."
am: 4abd9488ce

Change-Id: Ibdabbe448ef64634eb36de3f24d720efafaa440f
2018-07-24 01:51:04 -07:00
Dario Freni
4abd9488ce Merge "Generate a zipfile with appcompat logs during dist." 2018-07-24 08:45:36 +00:00
Dan Willemsen
7a1da0e43e Mark more targets as PHONY
So that we can start restricting non-phony targets to $OUT_DIR and
$DIST_DIR.

Test: add --writable=out/, see fewer warnings
Change-Id: I411fe4af732b1bce35d4a4c1e2a47b5f8a15e6b8
2018-07-24 01:21:12 -07:00
Yifan Hong
68ab6aeb52 Merge "Fix check on BOARD_SUPER_PARTITION_SIZE."
am: c4ae41b251

Change-Id: I23620bd45292e8cea385c2a2fa6322aa8f2e00c3
2018-07-23 15:57:33 -07:00