Commit graph

1566 commits

Author SHA1 Message Date
Colin Cross
d30a949547 Merge "Use more variables from Soong" 2019-09-09 17:21:44 +00:00
Elliott Hughes
5602110d73 Remove unused $MD5SUM.
Test: treehugger
Change-Id: I63273b1602362a84beaf32d2260a0a4e35e6ef4d
2019-09-06 11:02:08 -07:00
Tao Bao
bce0264348 Merge "releasetools: img_from_target_files uses zip2zip."
am: f833a75283

Change-Id: I1731934e5585185167db9638c7b6652871fbf913
2019-08-30 12:29:42 -07:00
Tao Bao
57f8ed6b5e releasetools: img_from_target_files uses zip2zip.
Test: Build the following targets and check the built image archive.
      bonito-userdebug (contains flashable images);
      cf_x86_phone-userdebug (contains super.img);
      aosp_arm64-eng (contains VerifiedBootParams.textproto)
Test: m -j otatools-package; Check that zip2zip is included; Use
      bin/img_from_target_files to generate image archive.
Change-Id: I9f28765bd702849f0df309faebd6aa3072920536
2019-08-28 16:36:25 -07:00
Remi NGUYEN VAN
ff51a362fd Merge "Add a product build var for mainline module certs"
am: a7832d5543

Change-Id: I00c77685a3b630049a2f578258d54cdc6e973e3a
2019-08-15 01:11:22 -07:00
Treehugger Robot
a7832d5543 Merge "Add a product build var for mainline module certs" 2019-08-15 07:43:46 +00:00
Tao Bao
c1966a8bdd Makefile uses add_img_to_target_files module.
Also pack additional tools into otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: `m -j otatools-package`; Check the packed tools.
Change-Id: Ia21d143ca42b1cae8f04b5f0e0cdf6b719312117
(cherry picked from commit 1cf8bf0c14)
2019-08-14 10:44:53 -07:00
Tao Bao
1cf8bf0c14 Makefile uses add_img_to_target_files module.
Also pack additional tools into otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: `m -j otatools-package`; Check the packed tools.
Change-Id: Ia21d143ca42b1cae8f04b5f0e0cdf6b719312117
Merged-In: Ia21d143ca42b1cae8f04b5f0e0cdf6b719312117
2019-08-14 10:34:59 -07:00
Colin Cross
f272adb168 Use more variables from Soong
Remove more copies of variables that are computed by Soong.

Test: m checkbuild
Change-Id: If78d4650438cc91d00c691db2fc97c5b790d5648
2019-08-09 08:40:30 -07:00
Tao Bao
f882684d85 Merge "Move make_recovery_path and sparse_img to modules."
am: 4c9527b314

Change-Id: I13a67cfe58450696c37a0e7e4ecc3261d8bd7d5a
2019-08-07 13:15:15 -07:00
Remi NGUYEN VAN
87d0f2703f Add a product build var for mainline module certs
OEMs may need to have different device configurations that use different
signing configurations for mainline modules. The network stack mainline
module has a sepolicy context referencing its certificate, so the
generated plat_mac_permission.xml differs based on the module signing
configuration.

The added PRODUCT_MAINLINE_SEPOLICY_DEV_CERTIFICATES variable defines a
per-product directory for the certificates, so that which certificate to
use can be configured in the product makefile, instead of replacing the
certificate file itself.

This change is to be submitted together with another change in sepolicy
makefile.

Test: changed certificate path, m, verified plat_mac_permissions.xml has
      new certificate.
Bug: 134995443
Bug: 138097611

Change-Id: I863a9904d4a2ea2abad679ae0969d50e374f269d
2019-08-07 18:54:04 +09:00
Tao Bao
e11a46000c Move make_recovery_path and sparse_img to modules.
These two tools are only used within build system, so not adding them
to otatools.zip.

Bug: 63866463
Test: TreeHugger
Test: Build a non-A/B target that calls make_recovery_patch.
Change-Id: Iaeddc98a2c4a27c6b49d91047500029e460db9e3
2019-08-06 23:27:48 -07:00
Tao Bao
93d52312d3 Merge "Build and use ota_from_target_files as a module."
am: b7957f112b

Change-Id: I2c2d6d17f0b52c83a591ebe28b31076741b3e967
2019-08-06 11:00:19 -07:00
Tao Bao
8821d64481 Build and use ota_from_target_files as a module.
Bug: 63866463
Test: TreeHugger
Test: m -j otapackage
Test: `m -j otatools-package`. Check bin/ota_from_target_files is
      available. Build an OTA package with standalone otatools.
Change-Id: I533dee1c6997d233601e7f4eae637ff5743ed637
2019-08-05 12:57:41 -07:00
Dan Willemsen
58be946140 Merge changes from topic "rm_ONE_SHOT_MAKEFILE"
am: 8b8b9b6bf8

Change-Id: I5764b2ce848710584d2d837e9e33fb9fb71c8d33
2019-08-01 14:31:32 -07:00
Elliott Hughes
9dc7ad724f Merge "Remove PRODUCT_IOT."
am: 3c1bec04e0

Change-Id: I5a8d342ae43c478c164e89be49a1f5660a16a49b
2019-07-31 18:19:15 -07:00
Dan Willemsen
0df0f6bbf1 Remove [jni_]link_type files
Now that mm/ONE_SHOT_MAKEFILE have been removed, we can expect to know
about all of our dependencies at the end of the build.

This removes 19k nodes from our build graph (aosp-master
aosp_arm64-eng), though in a default build, only 3k of those are used.

Test: ALLOW_MISSING_DEPENDENCIES=true, then trigger a missing dependency
Test: treehugger
Test: create link_type files, then apply CleanSpec.mk, ensure they're removed
Change-Id: I9506331e4a9911d2f26e59a2f72a97aef1644073
2019-07-31 18:09:22 -07:00
Dan Willemsen
5c3fc2a792 Remove support for ONE_SHOT_MAKEFILE
Test: treehugger
Change-Id: Ie73418c186ec4c0e1c91078c133de8f8113295bf
2019-07-31 18:08:47 -07:00
Elliott Hughes
3c1bec04e0 Merge "Remove PRODUCT_IOT." 2019-08-01 00:32:04 +00:00
Dan Willemsen
93b7c1b547 Merge "Stop supporting wrapping the build with make"
am: d69e849c9b

Change-Id: If6e369f82348d9d7aebe37104072a6878f7281ea
2019-07-30 15:44:36 -07:00
Elliott Hughes
0548439172 Remove PRODUCT_IOT.
Test: treehugger
Change-Id: Ic214ebda6c65e7e51e39151b10f4ce965b35c121
2019-07-30 09:01:15 -07:00
Dan Willemsen
893948955d Stop supporting wrapping the build with make
The build servers are no longer using this. It's hard to search for
others using it -- I've cleaned them up as I've run across them, but
we'll just have to see who breaks once this goes in.

This was the last user of makeparallel, so we can remove it.

Test: make
Test: treehugger
Change-Id: If6df3f1a67d6a6df36afaa4b07cd88a48a364fe1
2019-07-29 22:43:35 -07:00
Ramy Medhat
42c010d0e2 Merge "Add RBE mk file to support bootstrapping RBE and setting relevant environment variables."
am: f7eb2f829c

Change-Id: I10d9c206a80d13b67c547a5955235caae625c59f
2019-07-23 05:19:31 -07:00
Ramy Medhat
f7eb2f829c Merge "Add RBE mk file to support bootstrapping RBE and setting relevant environment variables." 2019-07-23 11:49:10 +00:00
Elliott Hughes
4ef2129851 Merge "Remove unused BoardConfig variables."
am: 56bcff99a4

Change-Id: I9f2406879a242deddc66bdaf4b4608b5be12ffc6
2019-07-22 09:20:43 -07:00
Elliott Hughes
56bcff99a4 Merge "Remove unused BoardConfig variables." 2019-07-22 15:41:21 +00:00
Tao Bao
e8aa7dcf19 Merge "Build build_image and build_super_image as modules."
am: 25cf50f582

Change-Id: Idb34ce99b01fe432e0fe2f7824a87cc8fa3541bf
2019-07-19 07:40:39 -07:00
Elliott Hughes
2e6e73bb01 Remove unused BoardConfig variables.
Determined via codesearch.

Test: treehugger
Change-Id: I5138e1b2294d39e11b46f9e1751c41b842c1743b
2019-07-18 21:43:38 -07:00
Tao Bao
2bbb07c53c Build build_image and build_super_image as modules.
Bug: 63866463
Test: TreeHugger
Test: `atest releasetools_test`
Test: `atest releasetools_py3_test`
Change-Id: I2059a4ced709d1b2ee331a9aaaa5ca30db4ebf6b
2019-07-18 10:27:38 -07:00
Ramy Medhat
ec8b8dfa3e Add RBE mk file to support bootstrapping RBE and setting relevant
environment variables.

Test: Built aosp_arm-user with and without USE_RBE. With USE_RBE,
used a simple proxy script in place of rewrapper.

Change-Id: Ifb6bfd9f7292346f4750a6a409aa0def4e3c0363
2019-07-17 14:22:00 +00:00
Elliott Hughes
7a45e0ccb9 Merge "Stop building unnecessary tarballs."
am: 9a4b84de56

Change-Id: I9465ce123bc1d5ab9662069af6181dd7382eff57
2019-07-12 08:10:05 -07:00
Elliott Hughes
440c99f1f2 Stop building unnecessary tarballs.
Test: treehugger
Change-Id: Iaba2aa6d09ad891f37171cc76778d08c78c78f93
2019-07-12 05:04:12 +00:00
Justin Yun
8f11ad5d40 Merge "Rename product_services to system_ext"
am: b7a50ece30

Change-Id: I7a56d76d3543b2bc4b1d0b24e54e8dd82ab7f15a
2019-07-09 02:14:55 -07: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
TreeHugger Robot
218adad125 Merge "DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master" into stage-aosp-master 2019-07-02 07:40:58 +00:00
Tao Bao
48a2feb670 Change the condition for building super_empty.img.
This CL changes the condition for building super_empty.img from
PRODUCT_BUILD_SUPER_PARTITION to PRODUCT_USE_DYNAMIC_PARTITIONS, as a
follow-up to the change in [1].

With the CL in [1], it skips building super.img and super_empty.img both
when turning off PRODUCT_BUILD_SUPER_PARTITION. However, the latter
should be mandatory whenever dynamic partitions is enabled. Because
fastboot relies on this file to properly flash dynamic partitions. Plus,
the cost for building super_empty.img is much lower than the one for
super.img.

As part of the change, it'll write group info into target_files when
building with PRODUCT_BUILD_SUPER_PARTITION == false. It's the work for
target_files merging script to determine the values to be picked up. The
current logic in merge_target_files.py always uses the one from vendor
target_files. This CL adds a testcase to ensure the behavior.

[1] https://android-review.googlesource.com/c/platform/build/+/928756

Bug: 135752763
Test: `m dist` with a target that sets PRODUCT_BUILD_SUPER_PARTITION to
      false. Check the built artifacts contain super_empty.img. Verify
      that the build can be flashed properly.
Change-Id: I277f087eab45663a6c3b33333d16e9e576c1c25c
2019-06-28 14:23:53 -07:00
Tao Bao
b1b275873c Merge "Clean up the dependencies for user image creation." am: ec53f441fa
am: 8ae72adb4b

Change-Id: Ica87f15572d10b384e13436ec63572922df8de7c
2019-06-25 11:52:02 -07:00
Tao Bao
dba635a3b7 Clean up the dependencies for user image creation.
The dependency on MAKE_EXT4FS (mke2fs) has been covered by the rule for
MKEXTUSERIMG (mkuserimg_mke2fs):
https://android.googlesource.com/platform/system/extras/+/refs/heads/master/ext4_utils/Android.bp

The dependency on mksquashfs and img2simg comes from mksquashfsimage.sh,
which has been moved into mksquashfsimage's building rule.

This CL also fixes the ordering of INTERNAL_USERIMAGES_BINARY_PATHS,
which should come after adding all the binaries to
INTERNAL_USERIMAGES_DEPS.

Test: TreeHugger
Change-Id: I8b30bf87860d9711e88eecca4b76db72f5cd8241
2019-06-24 15:47:47 -07:00
Daniel Norman
c7c103514f Merge "Allows skipping building the super images for partial builds." am: 87ebb3013f
am: d3576727ea

Change-Id: I872f713f9f8ff30b3dd72643b07443894b5af451
2019-06-14 15:12:25 -07:00
Treehugger Robot
87ebb3013f Merge "Allows skipping building the super images for partial builds." 2019-06-14 21:42:33 +00:00
Daniel Norman
0bf940cace Allows skipping building the super images for partial builds.
Previously, setting PRODUCT_BUILD_SUPER_PARTITION to false for a partial
build (with PRODUCT_USE_DYNAMIC_PARTITIONS == true) would fail to
include necessary keys in misc_info.txt that are required when merging
two partial builds to create a dynamic-partition-enabled mixed build.

This change ensures these necessary keys are included even when
PRODUCT_BUILD_SUPER_PARTITION is false. Setting
PRODUCT_BUILD_SUPER_PARTITION to false causes partial builds to skip
building super.img and super_empty.img, instead relying on these images
to come from the final merged build.

Bug: 134764140
Test: Building & booting a dynamic-partition-enabled mixed build, and
inspecting partial builds' logs / out folder to ensure that
super.img/super_empty.img were not created.

Change-Id: I99431a9a342e9b0617510e250597f3024ef39322
2019-06-14 11:42:45 -07:00
Dan Willemsen
3b37c4cad4 Merge "Add missing dependencies to python scripts" am: 56bfae6402
am: 083777a4c9

Change-Id: I791359b0acebb29402c8ebb922c0a3b30717889c
2019-06-10 20:37:40 -07:00
Dan Willemsen
c84e4cb917 Add missing dependencies to python scripts
These were found when trying to run remotely on RBE with only the
sources depended upon available for each rule.

Bug: 130111713
Test: treehugger
Change-Id: Id763f8fc7dfbe60445f98604db3422147165f537
2019-06-10 23:58:49 +00:00
Tri Vo
afa741aaca Merge "Reland "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"" am: f4a8b6415f
am: f61d6b97dd

Change-Id: Ic6f3a7196f8b3e5b6801e63142f8bacaf99a4d52
2019-06-03 13:36:55 -07:00
Tri Vo
790db2fc79 Reland "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
Bug: 133196056
Test: m selinux_policy
Change-Id: I194167cc33ed9b0367dd3edfd5d954af5c1b4a13
2019-06-01 17:06:07 -07:00
Tao Bao
0fa45c308b Merge "Obsolete PRODUCT_STATIC_BOOT_CONTROL_HAL." am: f4d18a0d11
am: 91dda1066d

Change-Id: Ib5e242a2721a3d4b89f9065e3d5daf4bc0ab47e1
2019-05-30 10:17:09 -07:00
Tao Bao
84f88a473a Obsolete PRODUCT_STATIC_BOOT_CONTROL_HAL.
Bug: 34254109
Test: TreeHugger
Test: Define PRODUCT_STATIC_BOOT_CONTROL_HAL and see the expected
      failure after lunch.
Change-Id: I914b84e874fe14a25dcfe56b282c56f88934d07c
2019-05-29 11:38:16 -07:00
Dan Willemsen
bf5ce84a87 Merge changes from topic "rm_export" am: e246508e95
am: e09ef6ad2d

Change-Id: I8d82fa52e8043a0d4ecfd6b3762e63e2d17c4aa9
2019-05-28 18:30:22 -07:00
Tri Vo
d1d4eb15bd Merge "Revert "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"" am: 10d4c5066c
am: 0b5b966fc7

Change-Id: I0badda4d319e45446b3f24d6ddfd9e139e2061d1
2019-05-28 18:29:10 -07:00
Treehugger Robot
e246508e95 Merge changes from topic "rm_export"
* changes:
  Mark more BUILD_* as obsolete
  Obsolete BUILD_BROKEN_ANDROIDMK_EXPORTS
2019-05-29 01:17:01 +00:00
Tri Vo
10d4c5066c Merge "Revert "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"" 2019-05-29 01:12:15 +00:00
Tri Vo
02ae68ea63 Revert "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
This reverts commit bdd494aaa6.

Reason for revert: breaks build

Change-Id: I971f0feee3b23754f3c0f9edec05fb3ddfb737c3
2019-05-29 01:00:56 +00:00
Tri Vo
6ab285c407 Merge "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" am: 355a45a8de
am: 4af66c9caa

Change-Id: I6315bba2af349378e259a1eeb22e9e6979f59826
2019-05-28 17:17:51 -07:00
Tri Vo
355a45a8de Merge "Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" 2019-05-29 00:02:14 +00:00
Colin Cross
90df2efd53 Merge changes I09bf331f,I5eeef3ed am: f7d1a97c93
am: aae1dca7a9

Change-Id: I652201719c34f67cc2b3cdd0ba586cf984b73684
2019-05-28 09:58:03 -07:00
Colin Cross
f7d1a97c93 Merge changes I09bf331f,I5eeef3ed
* changes:
  Don't add dependency on missing optional shared libraries
  Add com.google.android.media.effects to missing uses-library list
2019-05-28 16:25:51 +00:00
Tri Vo
bdd494aaa6 Add 29.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 133196056
Test: m selinux_policy
Change-Id: I07166a3d2b3483507db47bdd2daa7a3ad35472ae
2019-05-25 17:35:53 -07:00
Dan Willemsen
3a1072a839 Obsolete BUILD_BROKEN_ANDROIDMK_EXPORTS
Bug: 73959648
Test: treehugger
Change-Id: Ibecc6eb97fef6924e5d909c0393d8dfaa62c7d1d
2019-05-25 17:12:12 -07: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
Dan Willemsen
6c39285306 Remove BUILD_BROKEN_ENG_DEBUG_TAGS
All users have been removed.

Test: treehugger
Change-Id: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
2019-05-24 18:17:15 -07:00
Colin Cross
b2a549bb85 Add com.google.android.media.effects to missing uses-library list
com.google.android.media.effects is no longer built.

Bug: 132357300
Test: m Gallery2
Change-Id: I5eeef3ed9f4875aa3c7a9ec1003944605ebe300b
2019-05-24 14:32:58 -07:00
Pete Gillin
0e4e6f52b3 Merge "Avoid targeting Java 9 for targets with SDK version up to 29." am: 42fe06b3c2
am: 7a383f586c

Change-Id: I750b6274d550d46e03f3863e6028abbd95456ed7
2019-05-21 03:42:10 -07:00
Pete Gillin
42fe06b3c2 Merge "Avoid targeting Java 9 for targets with SDK version up to 29." 2019-05-21 10:19:06 +00:00
Pete Gillin
58090478d7 Avoid targeting Java 9 for targets with SDK version up to 29.
Targets with sdk_version values up to and including 29 should not use
Java language level 9, even if EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true
is set.

This change keeps the make logic in sync with the soong logic in the
other change in this topic.

Bug: 131678633
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make droid tests docs cts java
Change-Id: Icd5db432f6b18486e8ede006c15a930c754ad4c2
2019-05-20 15:46:50 +01:00
Ian Pedowitz
c0183e5b70 Merge "Revert "Revert "Updating the platform sdk version for Q""" into qt-dev
am: 122a1136e6

Change-Id: Idaa679084002b521a5ae5652378e9922d17365e8
2019-05-15 13:15:05 -07:00
Anton Hansson
269dd013a5 Move default setting of a product variable
Should be in product_config.mk, before the variables are readonly'd, or
the default will fail to work.

Bug: 131576555
Test: set PRODUCT_SHIPPING_API_LEVEL := 29 in mainline_arm64.mk && lunch
Change-Id: I25faee7ec0a3fff17e1d08b834d868834effda36
2019-05-14 14:33:18 +01:00
Ian Pedowitz
bed3e5262e Revert "Revert "Updating the platform sdk version for Q""
This reverts commit 842119ab3a.

Reason for revert: Rolling forward for Q-Finalization

Bug: 129975435
Bug: 129943426
Test: Build
Change-Id: I651e3ec68a765d3867be5341751cd536ccbe604a
2019-05-11 10:01:39 -07:00
Pete Gillin
aa448d138b Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." 2019-05-10 11:50:08 +00:00
Pete Gillin
273b25f9fd Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy
from when the 8 -> 9 toolchain upgrade was happening. That migration
is done and the variable only affects the language level, so it should
have a name that reflects that. (The current situation would be
especially confusing if we started a 9 -> 11 toolchain upgrade,
presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11,
since the two settings look incompatible but are actually orthogonal.)

The current variable historically allowed a value or "1.8" which meant
"use the OpenJDK 9 toolchain but target language level 8". That value
no longer has any meaning and the new variable doesn't allow it.

Bug: 131678633
Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true`
Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53
Change-Id: Ic1f76a656bea30713b356a28e82f908a46933893
Test: Audit all mentions of the old string here and downstream
2019-05-09 15:30:39 +01:00
Tao Bao
d14c2f88df Use the installed vboot_signer.
Bug: 34738751
Test: Set `PRODUCT_SUPPORTS_VBOOT := true` and `m -j otatools-package`.
      Check the packed tools.
Test: Set `PRODUCT_SUPPORTS_VBOOT := true` and `m -j bootimage`.
Change-Id: Ia2ea475e3dc03cada1da524a299a21b8ad7ed536
2019-05-06 20:03:24 -07:00
Tao Bao
d5ab10eed4 Update the references to verity tools.
Test: `m -j dist` with aosp_marlin-userdebug
Test: `atest releasetools_test`
Test: Run signing with otatools.
Test: TreeHugger
Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7
2019-05-02 18:32:11 -07:00
Ian Pedowitz
842119ab3a Revert "RESTRICT AUTOMERGE Updating the platform sdk version for Q"
This reverts commit 5e0226b816.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: Ia3693b2a4907c4ca9be56cfe18fda35b8545abba
2019-05-02 00:55:38 +00:00
Suprabh Shukla
5e0226b816 RESTRICT AUTOMERGE Updating the platform sdk version for Q
Test: Builds, boots.

Bug: 129975435
Change-Id: I98d35b36c540a258e17d18210eb4e93717abacc6
2019-04-30 00:48:01 +00: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
Dan Willemsen
1d4a56f1a0 Obsolete BUILD_BROKEN_DUP_COPY_HEADERS
There are no remaining users.

Test: treehugger
Change-Id: I1fd5b933372e3ea391c121d265f41c35b832b206
2019-04-19 18:28:53 +00:00
Dan Willemsen
407ca587be Obsolete BUILD_BROKEN_PHONY_TARGETS
There are no remaining users.

Test: treehugger
Change-Id: Ice6f25a59265305e7e5d3dd041b16cd04674dd1e
2019-04-19 11:26:14 -07:00
Dan Willemsen
c1a836bab0 Merge changes from topic "make_deprecation"
* changes:
  Add infrastructure for deprecating module types
  Mark BUILD_* as readonly
2019-04-18 17:44:19 +00:00
Dan Willemsen
695849ec88 Add infrastructure for deprecating module types
Also start the deprecation for BUILD_HOST_TEST_CONFIG and
BUILD_TARGET_TEST_CONFIG, which have no users.

Bug: 130720555
Bug: 130723115
Bug: 130734993
Test: treehugger
Test: Add entries to DEFAULT_ERROR / OBSOLETE to manually test behavior
Change-Id: Icfdff43a29b6512494d44b9be11d178333505010
2019-04-17 17:02:20 -07:00
Dan Willemsen
bed1918841 Mark BUILD_* as readonly
Test: treehugger (build_test)
Change-Id: I2fddd43ebeaffd48246ab2fa289a19131094a1ac
2019-04-17 12:35:41 -07:00
Tom Cherry
6b28af30fb Remove TARGET_ROOT_OUT_SBIN / TARGET_ROOT_OUT_SBIN_UNSTRIPPED
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: Ia82d892adfffb6fa325d0c570ae7999e7bb28dc2
2019-04-17 11:12:32 -07:00
Dan Willemsen
0ab1be6fe2 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: Idf89b2e6a0b777adbfb6370ea34f35faee6d4965
2019-04-09 21:35:37 -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
Elliott Hughes
24e47858f2 Merge "Remove 'column' from modules target" 2019-04-04 20:17:05 +00:00
David Sehr
976c3c3651 Remove dalvik/dexdump and rename dexdump2
Complete the migration to use art/dexdump.

Bug: 22322814
Test: make -j 50 checkbuild test-art-host-dexdump
Change-Id: Ie69bed375dff79f66add5bdb6a8b1b7e14d8a173
2019-04-03 09:30:06 -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
Sasha Smundak
da25b691d3 Eliminate ENABLE_DEFAULT_TEST_LOCATION as it is always true
Bug: 117224272
Test: treehugger
Change-Id: Idd47ead31fcd89dbf728f140dc3353e5013ba352
2019-03-25 13:26:03 -07:00
Yifan Hong
889b1f7c0c Allow disabling building super partition for DAP devices
Previously:
if (DAP && !BUILD_SUPER) error;

Now:
if (BUILD_SUPER && !DAP) error;

This allows DAP devices to disable building super partition when the OEM
doesn't want to. The ability to build super partition shouldn't be
a requirement of enabling DAP; rather, building super partition requires
DAP to be enabled.

To do this on a device, PRODUCT_BUILD_SUPER_PARTITION should be set
to false explicitly. If it is unset, it will use the value of
PRODUCT_USE_DYNAMIC_PARTITIONS.

Bug: 127687287
Test: set PRODUCT_BUILD_SUPER_PARTITION to false and build dist

Change-Id: I25f1866e61d73affb445c1aec042cf53aac93583
2019-03-18 11:48:03 -07:00
Nelson Li
1f8357fe7d Revert "Revert "Build System: Solve dependency problem for test""
This reverts commit 6fe7f194b9.

Reason for revert: Fixed all build break.

Change-Id: I0a4842df1225399752515a4cd7a7c14173a5bf7b
2019-03-14 01:05:36 +00:00
Nelson Li
6fe7f194b9 Revert "Build System: Solve dependency problem for test"
This reverts commit 224e103308.

Reason for revert: Build Breakage in git_pi-dev-plus-aosp/docs @5366136
make -j110 docs showcommands dist DIST_DIR=/buildbot/dist_dirs/git_pi-dev-plus-aosp-linux-docs/5366136 checkbuild
FAILED:
 Dependencies in out found with no rule to create them:
 out/target/product/generic/data/app/CtsVerifierTester/CtsVerifierTester.apk
 out/target/product/generic/data/app/TradeFedTestApp/TradeFedTestApp.apk
 out/target/product/generic/data/app/TradeFedUiTestApp/TradeFedUiTestApp.apk
 15:53:46 stopping
and
make -j50 showcommands dist TARGET_PRODUCT=cf_x86_phone DIST_DIR=/buildbot/dist_dirs/git_master-linux-ndk_translation_all/5366149 ndk_translation_all
FAILED: ninja: 'out/target/product/vsoc_x86/data/nativetest/arm/arm_insn_tests_arm_static/arm_insn_tests_arm_static', needed by 'out/target/product/vsoc_x86/obj/PACKAGING/ndk_translation_tests_intermediates/arm_insn_tests_arm_static_result.xml', missing and no known rule to make it
15:55:38 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2

Change-Id: Idf95ef2e06526a0a31690420c923207db627605f
2019-03-11 16:48:29 +00:00
nelsonli
224e103308 Build System: Solve dependency problem for test
1. A test can add a runtime dependent test module by just setting
   LOCAL_REQUIRED_MODULES or LOCAL_TARGET_REQUIRED_MODULES. Then the dependent test
   module will be copied to testcase folder.
2. Do not install to $(TARGET_OUT_DATA) for testcase

BUG: 117224272

Test: 1. (a) vi cts/tests/tests/text/Android.mk
         (b) add LOCAL_REQUIRED_MODULES := CtsPrintTestCases
         (c) m -j CtsTextTestCases
         (d) Then, CtsPrintTestCases should also be built to testcase folder like below.
             ./target/product/generic_arm64/testcases/CtsPrintTestCases

Change-Id: I24ea3783486c54a05cfa9d3d0375b977afc230f8
2019-03-07 14:08:35 +08:00
Anton Hansson
d488d2d7d7 Move BoardConfig strip / READONLY marking
This moves the BoardConfig READONLY marking being product.mk's
responsibility to board_config.mk.

Also unify it with the BUILD_BROKEN_* setting handling, and
READONLY a few additional variables.

Test: build_test
Change-Id: Ifcfef588aa459223d6d7f017413d1681f341297f
2019-03-01 10:04:18 +00:00
Anton Hansson
192798513e Move combo makefile parsing
These files may be setting variables usually defined in the
BoardConfig. This moves that setting into board_config.mk so
that the relevant variables can be made readonly.

Test: build_test
Test: diff presubmit target_files vs base cl
Change-Id: I4dab09fa67c0f2e88a8ce1402a35b4ef5f8a0560
2019-03-01 09:54:33 +00:00
Anton Hansson
72e36f0278 Modify INTERNAL_KERNEL_CMDLINE instead of BOARD_ variant
The current modification of the variable within the build system
prohibits making the variable readonly.

Test: build_test
Test: boot blueline
Change-Id: Iec6058a163b5951db389d4adc0d9d0397431efb1
2019-02-27 14:29:01 +00:00
Anton Hansson
b9544694a5 Consolidate some BoardConfig variable checks
Move a few more variable stripping/sanity checking from
config.mk to board_config.mk

Test: build_test
Change-Id: I93fde7293de38398039dbb679b2399c8a68c190d
2019-02-27 14:07:43 +00:00
Anton Hansson
71b7f7fbd0 Add support for *_CPU_VARIANT_RUNTIME flags
Specified in the BoardConfig, and default to the value of the non
_RUNTIME variants.

These flags do not modify build-time compilation, but get written to
system properties on /vendor and can be inspected at runtime to
run/compile code for the specified cpu.

Migrate the bionic and ART cpu variant flags to use the new variables,
but leave the ART preopting using the non-_RUNTIME variants.

Bug: 120773446
Test: boot downstream device specifying CPU_VARIANT_RUNTIME flags
Test: grep dalvik.vm vendor/default.prop
Change-Id: Idc81110172582f38f84cca87f2eff140c5b5f9ac
2019-02-21 14:32:13 +00:00
Treehugger Robot
bee89836c7 Merge "DAP: system_as_root can't be true." 2019-02-14 02:09:20 +00:00
Yifan Hong
f84c7e5c8f DAP: system_as_root can't be true.
Test: builds
Change-Id: I3e47e9717c983703494abc8417526caf5955d2e4
Fixes: 124274480
2019-02-13 15:08:33 -08:00
Tom Cherry
e0f3ed5cd0 Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H
TARGET_FS_CONFIG_GEN has existed as the preferred mechanism for two
releases, so we finally deprecate TARGET_ANDROID_FILESYSTEM_CONFIG_H.

Test: build
Change-Id: I299a4d1d1d893ac16d6e6ce2ec4659bfcdc19095
2019-02-11 13:45:01 -08:00
Colin Cross
485c9cd400 Move hiddenapi singleton rules to Soong
Hiddenapi rules are now in build/soong/java/hiddenapi_singleton.go.
This effectively requires any module in PRODUCT_BOOT_JARS to be
defined in Soong.

Bug: 123645297
Test: m checkbuild
Change-Id: If72bd1c20b2014d0a3d400624d37fdb0a3052245
2019-02-05 21:38:55 -08:00
Yifan Hong
5cc9230914 Merge "Add kernel info to compatibility.zip" 2019-01-31 19:06:19 +00:00
Dan Willemsen
a734907705 Merge "Deprecate LOCAL_MODULE_TAGS := eng/debug" 2019-01-31 18:32:16 +00:00
Yifan Hong
770ab053b0 Add kernel info to compatibility.zip
Add kernel configs / version to verified_assembled_vendor_manifest.xml
so that the kernel of the incoming package can be checked against
the framework. Previously, the running kernel was used instead.

Bug: 111125947
Test: test_extract_kernel
Test: manual OTA on Pixel 3 from build:
      Android P (kernel version 4.9.96)
      to ToT build:
      device kernel version = (manually modified) framework requirement = latest,
      PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS = true

Change-Id: Id524a58e94bdb6bba348ca461c9d33614ce451a9
2019-01-30 13:28:03 -08:00
Paul Duffin
22efcc114e Merge "Remove REMOVE_OAHL_FROM_BCP flag" 2019-01-24 16:01:40 +00:00
Logan Chien
f42823aa7c Merge "Add prebuilt ELF binaries checker" 2019-01-23 07:21:17 +00:00
Dan Willemsen
9569ddd478 Deprecate LOCAL_MODULE_TAGS := eng/debug
Uses a new BUILD_BROKEN_ENG_DEBUG_TAGS variable that defaults to true
until we mark all of the broken targets, then we'll switch it to false.

These are fairly trivial to fix, so I don't expect to keep this flag
around for long.

Test: build_test on aosp and internal master; check logs
Change-Id: I6176fec265e78aecff965b7cf1636f831f68a140
2019-01-22 20:08:12 -08:00
Paul Duffin
fd24c9fe1f Remove REMOVE_OAHL_FROM_BCP flag
The REMOVE_OAHL_FROM_BCP flag is always set to true and is no longer
necessary so this change removes any uses of the flag.

Bug: 18027885
Test: cts/tests/signature/runSignatureTest.sh
Change-Id: Ied8c3315b29094ad6acee539520af3e4c9e79839
2019-01-22 14:16:12 +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
David Brazdil
fc274bab4d Replace hiddenapi-{public,private}-list.txt with a CSV file
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: If56c7ab8a4c3bbd33e447ef0dfd33f2c303a937c
2019-01-19 15:57:35 +00:00
Treehugger Robot
215e2c828c Merge changes I685ab841,I6ab7e488
* changes:
  Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
  Always package ext filesystem tools
2019-01-19 00:18:02 +00:00
Dan Willemsen
674952098b Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
These centralize the decisions on whether to build certain images or
not, and allow the product definition to override that choice.

There are a few use cases here:

 * For GSI-like cases, we only want to build the system image. This
   didn't really change, but it's somewhat simpler to configure, and
   easier to understand the build logic.

 * On the opposite side, when you're planning on using a GSI, the device
   specific build can only build the vendor images (or some other set).

 * Some cases (Fuchsia, etc) don't want to build any images, as they'll
   be distributing the build artifacts in their own packaging.

I suspect in the future, TARGET_BUILD_APPS may be able to be refactored
into the third use case.

Test: treehugger
Test: Create a product definition that includes nothing, try to build it.
Test: compare build-aosp_crosshatch.ninja and build-crosshatch.ninja before/after
Change-Id: I685ab841be3718d3dd7052c28ccd764bb6f1991a
2019-01-18 13:11:34 -08:00
Dan Willemsen
4a9a24481d Add PROGUARD_HOME and PROGUARD_DEPS
So that we can pass this into MAINDEXCLASSES.

Fixes: 122988865
Test: OUT_DIR=$HOME/out mmma frameworks/base/core/tests/hosttests/test-apps
Change-Id: I955d3de46d348e3573a6773f69149e7cabab8904
2019-01-17 23:04:27 -08:00
Colin Cross
49adea3bd8 Move hiddenapi to Soong
Perform hiddenapi CSV generation and dex encoding for Soong modules
in Soong.  This fixes an issue where dexpreopting was happening on
a different jar than was being installed.

Bug: 122856783
Test: m checkbuild
Change-Id: I24a235c63ff62fed7e1af9f2fd17e55b0c1598a5
2019-01-17 10:23:10 -08:00
Treehugger Robot
d148d61ccf Merge "Deprecate USER in favor of BUILD_USERNAME" 2019-01-11 22:32:57 +00:00
Tao Bao
519d18286e Don't build retrofit OTA package if vendor.img is unavailable.
We used to build retrofit full OTA package as long as
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is true. This doesn't work with AOSP
targets that have the flag set but without any available vendor image.

This CL detects such a condition and uses a separate flag to guard the
retrofit OTA building as well as the split super images generation.

Bug: 120852744
Test: `m -j dist` on blueline (w/ vendor images) and aosp_blueline (w/o
      vendor images).
Change-Id: I65726f24f8fc546be6802941a6a06590a3804c16
2019-01-07 12:22:48 -08:00
Yifan Hong
b3f5918890 Merge "Allow devices launched with DAP to override super partition name." 2019-01-07 18:26:17 +00:00
Yifan Hong
035c0ea0d4 Allow devices launched with DAP to override super partition name.
Test: on cuttlefish
Bug: 111801737
Change-Id: Ibb9b7132898d3c871186ded01432de4419809e7c
2019-01-04 16:03:50 -08:00
Dan Willemsen
0636428d43 Deprecate USER in favor of BUILD_USERNAME
Bug: 122270019
Test: treehugger, codesearch
2019-01-02 14:33:29 -08:00
Tor Norbye
cb58fa13df Switch apicheck over from doclava to metalava
Apicheck seems to only be used for signature file
conversion and diffing at this point.

Test: make dist
Not Yet Merged In Ib8c09ba7f85fbb48526132ca8cc85856d63ca407
Change-Id: I5ca70a019ef4f7828f0a566f7745fc2dbf673b2e
2019-01-01 13:18:04 -08:00
Colin Cross
8e0ff1c370 Add a flag to allow unbundled builds to build SDKs from source
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.

Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I9ebc08745409a817d831817cb282aba1de6d81bb
2018-12-18 22:43:16 -08:00
Colin Cross
6db5b0ea9a Move dexpreopting to Soong
Move the dexpreopting logic into Soong.  Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module.  Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.

This relands I59b20c931ee3e5a8d35eb30da4148691c5095502,
I39d580999947ee54cfefe875b57a028be5333bd7,
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and
Ica006a007d112c232311435aaac0c0e476232b67, with a minor
update to match the changes made to dexpreopt_gen arguments
and a fix to correctly keep dexpreopt disabled on mac builds.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
2018-12-17 13:46:17 -08:00
Colin Cross
b8901d7fb8 Revert "Move dexpreopting to Soong"
This reverts commit e736c58043.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
e736c58043 Move dexpreopting to Soong
Move the dexpreopting logic into Soong.  Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module.  Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.

Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
      only expected changes to dexpreopt outputs on system_other
      (.vdex files for privileged Soong modules no longer incorrectly
      contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
2018-12-12 17:21:22 -08:00
Yifan Hong
5df29604b9 Merge changes from topic "super_target_files"
* changes:
  add_img_to_target_files uses build_super_image
  Build super_empty with build_super_image.py
  Build super.img from images in target_files
2018-12-04 23:20:21 +00:00
Yifan Hong
2b891ac024 Build super.img from images in target_files
For non-retrofit (launch) devices, super.img is used for factory, so
source images should be from target_files.

In this change, build-superimage-target procedure is converted to a
more flexible script so that it can be built.

Bug: 119322123
Test: build target files for device launch with dynamic partitions
Change-Id: I6ee0cc3e145357dfc74be248f81f5f8f4e51fc5c
2018-12-03 11:33:44 -08:00
David Brazdil
8d8d4584f8 Merge "Replace hidden API lists with a single CSV" 2018-11-30 10:01:02 +00:00
Treehugger Robot
4681fc3803 Merge "Add ODM in valid_super_partition_list" 2018-11-30 00:39:51 +00:00
David Brazdil
59b6fd541d Replace hidden API lists with a single CSV
Combine existing hiddenapi-* txt files into a single CSV containing
a list of all class members and their corresponding flags.

Test: m, phone boots
Change-Id: I67f1b5f331b262e9b681d9a3c78c9e4cbb5ea082
2018-11-29 15:48:56 +00: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
Yifan Hong
9b743fa997 Add ODM in valid_super_partition_list
ODM can already be built with dynamic sizes (in that
build_image.py builds it correctly). Add it to the list of
valid dynamic partitions.

Test: builds
Change-Id: Ib5d1348530d2120e3af7dbe422ac3ebe6149b4fb
Fixes: 120047099
2018-11-28 12:42:36 -08:00
Treehugger Robot
b906ebb313 Merge "PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS: allow inheritance" 2018-11-21 00:41:44 +00:00
Yifan Hong
452d9267fc PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS: allow inheritance
Test: with this is true, build
     `verified_assembled_system_matrix.xml`;
      file includes kernel requirements
Change-Id: I833b4fefabefb2f0457171055afe5722981e3589
2018-11-20 11:50:52 -08:00
Yifan Hong
c767f7cbfc Add split super images to target_files.
Test: build target files package
Bug: 118506262
Change-Id: Iee6143987c9bfa6f2d287e20c06ea5ef25e82985
2018-11-20 11:17:39 -08:00
Yifan Hong
426e029980 Remove androidboot.logical_partitions kernel cmdline
Flag is not used anymore.
Fixes: 119286600
Test: boots

Change-Id: I47370369ccde6d504ea0c936a179c4a325302f8b
2018-11-19 22:38:35 +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
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
Dan Willemsen
9b7c1e4393 Fix pre-extracted PDKs
The PDK unzip logic does not place all the files in the same directory
it would place a zipfile, but instead inside a directory of the same
name:

  a/b/platform.zip!pdk.mk

turns into:

  a/b/platform/pdk.mk

So fix the PDK_FUISON_PLATFORM_DIR autodetection to take this into
account. Also don't create touch rules for the pre-extracted java files.

Bug: 118776469
Test: try building the PDK with PDK_FUSION_PLATFORM_ZIP set, and files extracted
Change-Id: Ib27d12aba773a5e6bd41fcbe8945a0bc31b8c281
2018-11-05 10:57:24 -08:00
Paul Duffin
79d8bf25ea Allow UnsupportedAppUsage annotations to be in separate target
Previously, all the UnsupportedAppUsage annotations were assumed to be
in the same target as was used at runtime. e.g. frameworks,
core-libart, etc. This change allows separate targets to be specified
in the EXTRA_HIDDENAPI_JARS. It is needed to avoid maintaining local
patches for those annotations in the libcore/ojluni/src/main/java code
which comes from upstream OpenJDK.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301
Change-Id: Icfadbe52601371f6a4cabef106750b16f6c6d4c8
2018-10-31 10:33:38 +00:00
Yifan Hong
a50b5e34a4 BOARD_{GROUP}_SIZE must not be empty.
Otherwise, OTA generation will fail.
Test: OTA generation
Test: do not define it, build error

Change-Id: I63da80bd35d1982db0510428560727c759212771
2018-10-25 16:23:42 -07:00
Dan Willemsen
3e8eb377db Stop passing DIST_DIR to Soong
Test: m dist
Change-Id: I812606595703299f5e333d4e62bc1abeaad15c05
2018-10-20 21:37:44 -07: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
Treehugger Robot
d3e8e5321f Merge "Clean up DIST_DIR usages, move to dist-for-goals" 2018-10-17 15:26:38 +00:00
Mathew Inwood
c948d1a101 Merge "Write greylist annotation metadata to a csv file." 2018-10-17 09:20:04 +00:00
Dan Willemsen
7537fd050f Clean up DIST_DIR usages, move to dist-for-goals
soong_ui now guarantees DIST_DIR is set in the environment, so remove
the default.

Use dist-for-goals instead of writing directly into DIST_DIR.

When building the system image, use DIST_DIR from the environment
instead of from make. This will eventually stop working, but this will
work for now.

Bug: 117463001
Test: m dist  (check gpl_source.tgz, logs/product_copy_files_ignored.txt)
Test: m out/target/product/generic/product_copy_files_ignored.txt
Change-Id: Ice557e0a148602cb8eb154efb747d416f0d0db59
2018-10-16 23:37:51 -07:00
Yifan Hong
422790ca3d Remove PRODUCT_USE_FASTBOOTD flag.
It is not used.
Test: builds

Change-Id: Iff5fbae524945cebd9c8911762e7fc7fb8ac19aa
2018-10-16 13:34:18 -07:00
Mathew Inwood
8c96298a92 Write greylist annotation metadata to a csv file.
Also add support for merging these into a single file elsewhere in the
build.

Test: m, inspect generated greylist.csv
Bug: 117314178
Change-Id: If28110fc1ed090222e55c274e8363110753d10f1
2018-10-16 12:06:02 +01:00
Dan Willemsen
7a5c5d730f Update for flags passed from Soong
Obsolete more GCC-specific flags, TARGET_(arm|thumb)_CFLAGS now contains
pre-filtered clang flags, and GLOBAL_CLANG_CFLAGS_NO_OVERRIDE now
contains all flags instead of just the clang additional flags.

Test: m
Change-Id: I068f155041e681068d38e1a5b6b04d354b85ccee
2018-10-07 19:43:23 -07:00
Yifan Hong
3f0d1ad451 Merge "Support "updatable groups"." 2018-10-04 22:21:57 +00:00
Yifan Hong
b43012f0ad Support "updatable groups".
* BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each
updatable group is a group of partitions that share the same pool of free
spaces.

* For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
    - BOARD_{GROUP}_SIZE: The maximum sum of sizes of all
      partitions in the group.
      If empty, no limit is enforced on the sum of sizes for this group.
    - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that
      belongs to this group.
      If empty, no partitions belong to this group, and the sum of sizes is
      effectively 0.

* BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined
by the device. It is now computed from all
BOARD_{GROUP}_PARTITION_PARTITION_LIST.

* Each 'updatable group' has its own pool of space for its
partitions to grow into. Enforce the following:
    * sum(all partitions) <= super partition (/ 2 for A/B)
    * For each group, sum(partitions in group) <= group size
    * sum(all group sizes) <= super partition (/ 2 for A/B)

Test: builds
Bug: 111610495
Change-Id: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Merged-In: I072b011714ec31a1d8813cc75edd27da3c6ff39a
2018-10-04 13:08:56 -07:00
David Anderson
b954afec0b Remove uuidgen.py and update lpmake parameters.
Bug: 117229984
Test: device builds with PRODUCT_USE_LOGICAL_PARTITIONS=true
Change-Id: Ib39d19726861dd79d90923163f9e594ed91da4ca
2018-10-03 14:24:34 -07:00
Dan Willemsen
95e91f8e39 Remove obsolete make settings
We turn off the default implicit and suffix rules with
--no_builtin_rules.

DELETE_ON_ERROR has no effect, ninja just keeps track of whether we've
successfully built it or not.

Test: build-aosp_arm.ninja is the same before/after
Change-Id: I2e407d4a12dd3a2af3e923fe3e1a3f7a6e2a463c
2018-09-28 10:27:48 -07:00
Yifan Hong
c49bddfb67 to-upper and to-lower move to strings.mk
So that config.mk can use these functions.
Test: builds

Change-Id: I6634226cbed56c34977803ff9c75b8d481c21c34
2018-09-24 14:45:41 -07:00
Nan Zhang
e06305123b Delete apidiff.mk
Also remove the msg.mk files used for old apicheck.

And export jdiff-doc.zip generated by Soong.

Test: api-stubs-docs-diff
Bug: b/78245848
Change-Id: I329aa375623a7b7a121d58314dab694a326c9f0f
2018-09-17 15:33:13 -07:00
Steven Moreland
c2e80afb28 Disallow accessing Treble _OVERRIDE reqs.
If something needs to distinguish between _OVERRIDE and non-_OVERRIDE,
it is a hack (these should be the same property).

Bug: 114488870
Test: m nothing (exercises this)
Test: searching all of these reqs in the code.
Change-Id: Idc22150a3179d025d7d95beafad39e8b07946ef8
2018-09-13 16:57:51 -07:00
Colin Cross
830eed81ab Use build/soong/scripts/strip.sh for Make modules
Replace the complicated rules in Make with calls the same strip.sh
script that Soong uses.

Bug: 113936524
Test: m checkbuild
Change-Id: If7beeb8381b5a9bc6e9ba15d443a834eb43fc0d4
2018-09-10 11:05:32 -07:00
Treehugger Robot
860f9d11a8 Merge "Use the new executable for mkuserimg_mke2fs" 2018-09-08 03:50:32 +00:00
Dan Willemsen
f063839de9 Remove GCC support from Make
Test: out/build-aosp_arm64.ninja is the same before/after
Test: build_test on downstream branches
Change-Id: If7f8c12f2f288b1e589689361f9457acae634882
2018-09-06 15:40:00 -07:00
Tianjie Xu
573322279a Use the new executable for mkuserimg_mke2fs
This is in line with the change of mkuserimg_mke2fs.sh to python binary.

Bug: 112555072
Bug: 63866463
Test: unittests pass
Change-Id: I82c0be1e5bbc685edc15120da73aa43fdc9f2f05
2018-09-05 20:52:47 +00:00
Treehugger Robot
48a575c029 Merge "Remove droiddoc.mk from Make!" 2018-09-05 17:48:43 +00:00
Nan Zhang
2132fbc7a8 Remove droiddoc.mk from Make!
Test: m -j
Bug: b/70351683, b/78245848
Change-Id: I3348461d742c45d5dae105d26a5c3e8680a08029
2018-09-04 10:54:11 -07:00
David Anderson
1ef03e2b79 Add super_empty.img to target-files and the update package.
super_empty.img is needed for "fastboot update" to work, as such, it
must be included in the update package. This change adds lpmake
parameters to misc_info.txt for add_img_to_target_files.py, and ensures
that lpmake is packaged with otatools.zip.

The build-superimage-target macro is now split into two functions - one
to generate the device-specific arguments, and another to build the full
command-line for convenience. The former is used to pass arguments
directly to add_img_to_target_files.

Bug: 113524256
Test: make updatepackage builds and includes super_empty.img
      make otatools includes lpmake

Change-Id: I25091c964b036beeea2a8b8f738e2c18937c1eb4
2018-08-30 16:02:23 -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
David Brazdil
b67402ecce Support hidden API whitelist generated by class2greylist
Libcore has support for annotating a virtual method which is known
to change its return type in a future release. This annotation is
recognized by the dexer and a future-proof bridge method is created.
This patch integrates changes in class2greylist to support this
annotation into the build system and generation of hidden API lists.

Calling class2greylist on each boot classpath module now produces two
text files instead of one: signatures for greylisting and now also
whitelisting. They are passed on to the hidden API list generating rules
in frameworks/base.

Bug: 112186571
Test: m appcompat, diff public-list.txt whitelist.txt
Change-Id: I9861203e6e07a17d50850892ec13880971457d11
2018-08-23 10:38:03 +01:00
Yu Shan
10be65dbc1 Use prebuilt nanopb_generator.py.
Use prebuilt nanopb_generator.py to avoid using the incompatible
version of libprotobuf-python on host.

Test: Local build tests.
Bug: 111798740
Change-Id: Iabca07eb13dbab183fbf85cb0dfe04ce33aa660c
(cherry picked from commit fa47daa47d)
2018-08-16 16:07:05 -07:00
Treehugger Robot
c272a99b5c Merge "Add support for /odm partition" 2018-08-16 03:37:36 +00:00
Treehugger Robot
72150c147e Merge "Remove proguard support" 2018-08-15 01:14:45 +00:00
Colin Cross
e3a4df80c8 Allow Soong to autogenerate test configs
Move the configuration for autogenerating test configs into Soong,
and add LOCAL_FULL_TEST_CONFIG so that Soong can specify the full
path to a generated test config.

Also add a java junit test config template.

Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Test: atest junit-params-test
Change-Id: I2e64bc33c949ab7b342be518f94a81a186fe9c07
2018-08-14 15:39:32 -07:00
yangbill
976c80ae86 ATest: Host native test config auto-gen support.
Autogenerate HostGTest test config for better user
experience of hostside native tests.

BUG: 80298359

Test: . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j
      . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j hello_world_test
      . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j CtsLiblogTestCases_list

Change-Id: Iee1db17f8957d3c1cd80c9aae1996a72b48413d9
2018-08-14 14:53:14 -07:00
Colin Cross
de684e84fb Merge "Remove TARGET_USES_MKE2FS" 2018-08-14 20:55:51 +00:00
Colin Cross
a110579e31 Remove TARGET_USES_MKE2FS
Nothing reads TARGET_USES_MKE2FS any more, mke2fs is always used.
Remove the requirement that TARGET_USES_MKE2FS is set, and remove
the places it is set.

Bug: 112241651
Test: m checkbuild
Change-Id: Ibdca062bbe7dcd19ba8f7ee7f8291ce746b74e65
2018-08-13 17:40:26 +00:00
Bowgo Tsai
e4e3018bf6 Adding constraints for first shipping API level >= 29
Do not allow setting BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE when
first shipping API level >= 29.

Bug: 112291283
Test: Checks it can cause build error when the condition is met

Change-Id: I3983bea89625f5ece303432b32bea277aee21a2b
2018-08-14 00:17:50 +08: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
Colin Cross
3ebfe7309f Remove proguard support
R8 is always used now.

Bug: 111885749
Test: m checkbuild
Change-Id: I9ae586c6360f2e3050422090b4e08f27ae167758
2018-08-07 11:22:17 -07: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
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
09e4e23a2f Merge "Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS."
am: 4f85bace12

Change-Id: I01718232aa2de09b46785d029bdd70ff59b8d9d6
2018-07-30 10:38:33 -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
Yifan Hong
0c3eb63eb3 Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS.
When it is true, all kernel requirements are enforced during OTA.
Otherwise:
- Kernel minor revision is not enforced.
- Kernel configs are not enforced.

Bug: 111840577
Test: `m dist` and inspect system_matrix.xml in OTA zip

Change-Id: I965ee5ef59ff48b600ebfab858ecf0909397fe6b
2018-07-27 12:42:11 -07:00
Yifan Hong
ebc041af56 productservices => product_services
Make names consistent.
Some things that does not change:
- productservicesimage target and intermediates

Test: build product services image
Bug: 111609632
Change-Id: I4c2b975e194577aad3d51b908b103880625deb5e
2018-07-26 17:19:02 -07:00
Yifan Hong
2843e2e16f Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk"
am: df899f64d0

Change-Id: Icdf456afba7d366373311b292b1675c3cce6bf4c
2018-07-26 15:09:53 -07:00
Treehugger Robot
df899f64d0 Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk" 2018-07-26 21:44:05 +00:00
Yifan Hong
78ae26132d BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk
... because variable checks should go there.

Test: pass
Change-Id: I484f928d848fd4f3b3936d1c7fd03976ee64feb2
2018-07-26 10:50:45 -07:00
Mathew Inwood
50f59655ba Merge "Build rules to derive greylists from annotations."
am: 48a7929962

Change-Id: I029776a9e31923b87e125ab0054b398d9c935bce
2018-07-26 01:37:29 -07:00
Mathew Inwood
48a7929962 Merge "Build rules to derive greylists from annotations." 2018-07-26 07:37:29 +00:00
Mathew Inwood
04c58dea0b Build rules to derive greylists from annotations.
Uses the new class2greylist tool to extract API descriptors from .class
files.

Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.

Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
2018-07-24 15:48:42 +01:00
Yifan Hong
fe421ed263 Merge changes from topic "board_partition_reserved_size"
am: 2d90c246a9

Change-Id: I460ea917b47a61acb0cbb0f17a867d15f61c7d6d
2018-07-23 11:58:52 -07:00
Yifan Hong
9c35a022e1 build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I00c1a96c09cf7bd9274b65ac0afc47462686171d
2018-07-20 16:51:26 -07:00
Yifan Hong
56a6c3bb34 build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I26aba694fd3d6a2feed7601524dde52569ba41e2
2018-07-20 16:51:26 -07: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
Tri Vo
60b687383d Merge "Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
am: 3e583e0b3d

Change-Id: I297a53cd1acd73250967c6a9669f876d68694354
2018-07-19 18:02:51 -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
Tri Vo
047c4d544c Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 72458734
Test: m selinux_policy
Change-Id: I5104c14bcc45067723080c229895c9a7771b2651
2018-07-18 13:24:43 -07:00