Commit graph

940 commits

Author SHA1 Message Date
Yifan Hong
68ab6aeb52 Merge "Fix check on BOARD_SUPER_PARTITION_SIZE."
am: c4ae41b251

Change-Id: I23620bd45292e8cea385c2a2fa6322aa8f2e00c3
2018-07-23 15:57:33 -07:00
Yifan Hong
17dd45d689 Fix check on BOARD_SUPER_PARTITION_SIZE.
The original code doesn't use the size of images that
is calculated at build time, but instead use BOARD_*IMAGE_PARTITION_SIZE
variables. Update the logic to use the actual size of the images at
build time.

Test: builds with a device defining the value and
BOARD_SUPER_PARTITION_PARTITION_LIST := system vendor product productservices

Bug: 79106666
Change-Id: I07b3ee466482bd8f5cf709e13e16a7f187099aaf
2018-07-23 13:13:50 -07:00
Anton Hansson
78e36736fe Merge "Move dep on PRODUCT_COPY_FILES to main.mk" 2018-07-20 10:12:37 +00:00
Dario Freni
5f9ddc95a2 Merge "Add support for /product-services partition"
am: 3cf03b775a

Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
2018-07-20 02:09:37 -07:00
Dario Freni
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00:00
Anton Hansson
eccff5a946 Merge "Skip auto-gen rro packages for path requirements."
am: 5558838be1

Change-Id: I7335715433a80a79f02d0979290d1270d6d08403
2018-07-20 01:20:32 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Anton Hansson
c62d15f077 Skip auto-gen rro packages for path requirements.
The way these packages are currently added to the build is via
modifications in product makefiles inheriting from mainline_system,
but with have the side effect of changing the REQURIED modules for
the source of the auto-gen RRO package.

Whitelist auto-generated RRO packages from the path requirement checks
for now.

Bug: 80410283
Test: make
Change-Id: Ib070e28e0ef87a57adfaedf6456585e8bfa29dd3
2018-07-18 15:52:57 +01:00
Anton Hansson
404d33c578 Move dep on PRODUCT_COPY_FILES to main.mk
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.

Leave the declaration in Makefile for now.

Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
Merged-In: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
2018-07-18 14:05:20 +01:00
Anton Hansson
9fbe84ceee Move dep on PRODUCT_COPY_FILES to main.mk
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.

Leave the declaration in Makefile for now.

Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
2018-07-13 17:16:22 +01:00
Dan Willemsen
468206e4cd Merge "Add more status output"
am: 5787711e75

Change-Id: I0f6ee9a8ac4c04ed8effd2a2962503462954c360
2018-07-12 21:06:51 -07:00
Dan Willemsen
518373f8af Add more status output
soong_ui now parses the output from kati into "actions" to feed into the
unified status system. It also looks for errors and marks the enclosing
section as failed.

This adds a few more states so that error messages can be more
appropriately attributed - so that all errors at the end of the buid
aren't attributed to the last makefile read.

Test: m
Test: add some errors
Change-Id: I3abdb004c82e2b99822906910cd66123c11a5099
2018-07-11 12:00:56 -07:00
Anton Hansson
0b14a57aaf Merge "Make including missing modules an error."
am: 65dc646c76

Change-Id: I7cf277de314e06d84cc19c0def52cd035bbae51a
2018-07-09 23:37:57 -07:00
Anton Hansson
65dc646c76 Merge "Make including missing modules an error." 2018-07-10 06:28:41 +00:00
Luis Hector Chavez
930ceb30b9 Merge "Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE"
am: b676d6d609

Change-Id: I0e13f4327ce066a56f856985c07f1e8f4c373d24
2018-07-09 16:13:08 -07:00
Treehugger Robot
b676d6d609 Merge "Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE" 2018-07-09 23:04:32 +00:00
Luis Hector Chavez
ff48993ca6 Depend on the ramdisk/root files for BOARD_BUILD_SYSTEM_ROOT_IMAGE
When using BOARD_BUILD_SYSTEM_ROOT_IMAGE, there is no direct dependency
on the files that get typically added to the ramdisk.img apart from the
NOTICE.html dependency that some files have. This change explicitly adds
the ramdisk/root files as a dependencies of system.img so that the image
is recreated any time a file in the ramdisk changes. It also creates the
installed-files-root.txt file.

Bug: 62387674
Test: /init.rc is present in system.img's dependencies
Change-Id: I234cb8d8a648f8963610be519de1b70b7efe1fd7
2018-07-09 11:07:12 -07:00
Anton Hansson
1ebcbd51ee Make including missing modules an error.
Only enable it for the core build files rolling up to generic.mk
for now, and whitelist a couple of modules that are conditionally
defined.

Bug: 7456955
Bug: 80410283
Test: lunch generic; m
Test: lunch full; m
Change-Id: I5448769433d09eaf970c4231874ced3261a5c66b
2018-07-09 11:00:24 +01:00
Anton Hansson
e5a5f00b9e Merge "Add documentation for module resolution."
am: ce0d4aa328

Change-Id: I85aa55b9985e91001e56088579a376f46d9d03e5
2018-07-05 09:43:36 -07:00
Anton Hansson
eb3358cfa7 Add documentation for module resolution.
I found this in the CL description of
I5fda1a77f58814097b10b5ad2743ee25adfaecc4, and modified it slightly.

Bug: 111154853
Test: No
Change-Id: I984ac1a9521357af6b54340939dcde36988fc634
2018-07-05 16:31:33 +01:00
Anton Hansson
a85fbdb83d Merge "Include PRODUCT_COPY_FILES in artifact check."
am: 31cd1263d4

Change-Id: I51e0d60a634ddbf9597b9797e7d8208930908bfb
2018-06-26 02:55:12 -07:00
Anton Hansson
c0655eb042 Include PRODUCT_COPY_FILES in artifact check.
The product-installed-files macro is not really thorough - it only
includes packages, but not other files which are included as part of
the build. Extend it to also include PRODUCT_COPY_FILES.

Bug: 80410283
Test: downstream CL
Change-Id: I803c7a59e695c226fa413fa1602ec315ef9886a8
2018-06-25 19:17:42 +01:00
Yifan Hong
6423900f83 Merge "Add BOARD_SUPER_PARTITION_*"
am: 254bd9a10a

Change-Id: Iada0cb6fe92ecf090a3c37bb3bd73335a2e63a8c
2018-06-22 16:40:15 -07:00
Treehugger Robot
254bd9a10a Merge "Add BOARD_SUPER_PARTITION_*" 2018-06-22 23:33:14 +00:00
Yifan Hong
74d07ff8bd Add BOARD_SUPER_PARTITION_*
Test: builds
Test: build with BOARD_SUPER_PARTITION_SIZE and
      BOARD_SUPER_PARTITION_PARTITION_LIST defined

Bug: 79106666

Change-Id: Ifcd50ecab22ef096ff1eb386f8d87e16fffdcf5e
2018-06-22 10:25:54 -07:00
allenhair
2e627d5e7d Merge "Distribute XML formatted API files as part of the coverage build."
am: f2365aa2c5

Change-Id: I91c661d74e617f17553f27a39cb32496dd5acf4c
2018-06-21 11:52:01 -07:00
allenhair
f2365aa2c5 Merge "Distribute XML formatted API files as part of the coverage build." 2018-06-21 18:33:25 +00:00
Dan Willemsen
45883d45ec Merge "Deprecate implicit make rules"
am: 6d3acda913

Change-Id: Ic04398750a692d3bbae34b78420d61c6e5ee2356
2018-06-20 21:13:33 -07:00
Dan Willemsen
62db0f0945 Deprecate implicit make rules
Test: mm
Test: view docs in gitiles
Change-Id: I1ced4b4218c733b5b5b771d626b20eb6fb22f0df
2018-06-20 16:52:10 -07:00
Allen Hair
906da1b5df Distribute XML formatted API files as part of the coverage build.
Bug: 110485176
Test: m -j32 droid dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true tests
Change-Id: I151afde05de832cab06421ffe0829f07e60aceb8
2018-06-20 14:59:57 -07:00
Anton Hansson
a062b90c36 Merge "Add support enforcing all path requirements."
am: 9d2c04e39c

Change-Id: I95c562e020d9995130ff438bdc90f9d5b59128fc
2018-06-15 02:19:02 -07:00
Anton Hansson
9d2c04e39c Merge "Add support enforcing all path requirements." 2018-06-15 09:08:10 +00:00
Colin Cross
a81e5c743d Merge "Dist installed-files*.json"
am: 8b4c72dc1c

Change-Id: I13389075d4b3b87d23a96a194f17163a3ab22b03
2018-06-14 22:11:16 -07:00
Colin Cross
23dded0ffd Dist installed-files*.json
installed-files*.json provides hashes of each file, which will allow
a quick comparison of what has changed between builds.

Test: m checkbuild
Change-Id: I87f6c1fa89aaa83c7bcc7cbefb799e9e26d7bfa5
2018-06-14 14:51:20 -07:00
Anton Hansson
727e5d9f59 Merge "Add a new macro for products to make artifact path requirements."
am: 2b0ea222c1

Change-Id: I3bb0f6a885ef190c0eebc5cf73ac748ff25c4afd
2018-06-14 03:39:45 -07:00
Anton Hansson
427d855728 Add support enforcing all path requirements.
Setting PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS to be non-empty will
verify that when an inherited product file makes an path requirement
claim, no files other than the ones it produces are allowed inside its
paths. This allows more rigorous control of what goes where, and
specifically stops accidental inclusion of modules in the wrong places
(which is very easy to do otherwise).

In order to enable iterative improvements to current offenders, support
for a whitelist is also added (via the new
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST property). Verification is
done that this variable corresponds to exactly the list of current
offenders.

Example use:
  PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
  PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := system/priv-app/Dialer/Dialer.apk

Bug: 80410283
Test: In a downstream CL specifying the above.
Change-Id: I58047db08bde34da21759cfc55f398892b1c809a
2018-06-14 11:35:05 +01:00
Anton Hansson
6147e61699 Merge "Extract the product to file mapping logic to a macro."
am: df832133ad

Change-Id: Ic92eb8d9c9631f5eaac57bb4f41c157954f85193
2018-06-14 03:14:24 -07:00
Anton Hansson
837425b0c0 Add a new macro for products to make artifact path requirements.
When a product adds a path requirement, the build system will verify
that all its artifacts are produced inside these paths, and fail
otherwise.

The paths are all relative to PRODUCT_OUT, and the macro also supports
giving a whitelist, for known existing offenders in the hierarchy. The
build will fail if redundant whitelist entries are present.

Example invocation:
_paths := $(TARGET_COPY_OUT_SYSTEM)/
_whitelist := root/init root/init.rc
$(call require-artifacts-in-path $(_paths), $(_whitelist))

Bug: 80410283
Test: Downstream with a new product definition.
Change-Id: I235de681f65254087a42e345af69b2113b682072
2018-06-13 18:48:53 +01:00
Anton Hansson
5efe88df63 Extract the product to file mapping logic to a macro.
This way, the logic can be reused for multiple products during
the same build step. This will be used to track files output
by different subtrees in the product makefile hierarchy.

Bug: 80410283
Test: diff produt_FILES before and after
Change-Id: I6dd1cf586410b9809fdd9d75441128acb07cab08
2018-06-13 18:48:42 +01:00
Yifan Hong
b64f5b5145 Merge "Add ro.boot.logical_partitions" am: 78f3983e98
am: 6d3dbb927e

Change-Id: I9bd5760ffbb5e9dd76ae6376a23057504719046f
2018-05-29 13:07:30 -07:00
Yifan Hong
ebba19759d Add ro.boot.logical_partitions
Test: boot and getprop
Bug: 79885414
Change-Id: I2c1468a7a625deda8887106c3a087204a1ee8353
2018-05-29 11:17:45 -07:00
Alan Ma
4292ea6696 Merge "Add a build task for cts_instant" into pi-dev
am: 07d33802b3

Change-Id: Ide0ee7a30700a34823abed77493fba4f55458517
2018-05-21 13:30:41 -07:00
Alan Ma
c2e074c081 Add a build task for cts_instant
Test: With other CLs in the topic, run 'm -j30 cts_instant'

bug: 79750671
Change-Id: Ib0381017300108a22919892070540b9e7f92aaf9
2018-05-18 14:09:03 -07:00
Isaac Chen
a13b3153c1 Enable vndk_package if BOARD_VNDK_VERSION is set
This is a first attempt to enable build system support to include
vndk_package automatically (if BOARD_VNDK_VERSION is set), so devices
don't need to add it via PRODUCT_PACKAGE manually.

Bug: b/67002788
Test: Booted on the x86 emulator and a physical device and checked
      their /system/lib*/vndk-* directories for vndk_package libraries.
    # The commands below are for the x86 emulator:
    $ lunch aosp_x86_64-userdebug; m -j
Change-Id: Iea927b9535c7ee1b64ca130a4ac54f0fd8b3f758
Merged-In: Iea927b9535c7ee1b64ca130a4ac54f0fd8b3f758
(cherry picked from commit 5364f5a298)
2018-04-24 10:07:10 +08:00
Dan Willemsen
52e14a617d Merge "Add variables for configuring Soong plugins" into pi-dev 2018-04-17 19:35:35 +00:00
Andrew Hsieh
f88438aa37 Merge "Enable vndk_package if BOARD_VNDK_VERSION is set" into pi-dev
am: 0dd11dc0b5

Change-Id: I192316dd07972167e2d5e4a687e15f7f1611f0f8
2018-04-16 16:41:23 -07:00
Isaac Chen
5364f5a298 Enable vndk_package if BOARD_VNDK_VERSION is set
This is a first attempt to enable build system support to include
vndk_package automatically (if BOARD_VNDK_VERSION is set), so devices
don't need to add it via PRODUCT_PACKAGE manually.

Bug: b/67002788
Test: Booted on the x86 emulator and a physical device and checked
      their /system/lib*/vndk-* directories for vndk_package libraries.
    # The commands below are for the x86 emulator:
    $ lunch aosp_x86_64-userdebug; m -j
Change-Id: Iea927b9535c7ee1b64ca130a4ac54f0fd8b3f758
2018-04-13 15:33:44 +08:00
Dan Willemsen
79657520ee Add variables for configuring Soong plugins
See the Soong commit for detailed usage.

Bug: 76168832
Test: define some variables, use them
Change-Id: Ia8af5b6ec1cb3f12cbc1fee582a309eebb340b7c
Merged-In: Ia8af5b6ec1cb3f12cbc1fee582a309eebb340b7c
(cherry picked from commit eaacf5b285)
2018-04-11 15:31:35 -07:00
Dan Willemsen
fb3eeea64a Merge "Add variables for configuring Soong plugins" am: de61b23ffc
am: 3ae1f7af36

Change-Id: I5abe5931423d25a8314914bc81ba2a38a3439a94
2018-04-10 18:58:05 -07:00
Dan Willemsen
eaacf5b285 Add variables for configuring Soong plugins
See the Soong commit for detailed usage.

Bug: 76168832
Test: define some variables, use them
Change-Id: Ia8af5b6ec1cb3f12cbc1fee582a309eebb340b7c
2018-04-10 15:51:53 -07:00