Commit graph

1021 commits

Author SHA1 Message Date
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