Commit Graph

13433 Commits

Author SHA1 Message Date
Dimitry Ivanov 7caea14111 Enable linker warning toast for userdebug/eng builds
We did not want this to appear for dogfood devices before
because it was noisy, most of popular apps fixed this
problem and it should be much less noisy.

Bug: http://b/62455348
Test: make
Change-Id: Icd28e9ef87f2d1edf456d178741c67ef42670ae1
2017-06-22 14:53:10 -07:00
TreeHugger Robot c74abeba1f Merge "Use make functions to convert a text to lower case" into oc-dr1-dev 2017-06-21 16:26:45 +00:00
TreeHugger Robot 680b29e718 Merge "AVB: support chain partition signing" into oc-dr1-dev 2017-06-21 16:26:25 +00:00
Bowgo Tsai fbcd0412c7 Use make functions to convert a text to lower case
We cannot cache the result of ($shell ...) and we have to run these on
every build even if we don't have to re-read the makefiles. Replace it
with make functions $(substr $(substr ... )).

Bug: 38399657
Test: `make` pass, flash images from $OUT and boot device with chain partitions
Merged-In: I6d4ff8e487931ba25008a2a881401a8951d4049e
Change-Id: I6d4ff8e487931ba25008a2a881401a8951d4049e
(cherry picked from commit e615afd6d0)
2017-06-21 10:22:59 +08:00
Bowgo Tsai f636a80888 AVB: support chain partition signing
Current build system will include AVB metadata from each partition and
store them into /vbmeta partiton when BOARD_AVB_ENABLE is set, which makes
each partition tightly-coupled.

Add the support for 'chain partition':
  - The vbmeta of each partition is stored on the same partition itself.
  - The public key used to verify each partition is stored in /vbmeta.

For example, the following build variables are required to enable chain
partition for system partition:
  - BOARD_AVB_SYSTEM_KEY_PATH := path/to/system_private_key
  - BOARD_AVB_SYSTEM_ALGORITHM := SHA512_RSA8192
  - BOARD_AVB_SYSTEM_ROLLBACK_INDEX := 1
  - BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 2

The corresponding settings will be added into META/misc_info.txt for
build_image.py and/or add_img_to_target_files.py:
  - avb_system_key_path=path/to/system_private_key
  - avb_system_algorithm=SHA512_RSA8192
  - avb_system_add_hashtree_footer_args=--rollback_index 1
  - avb_system_rollback_index_location=2

To enable chain partition for other partitions, just replace SYSTEM with
BOOT, VENDOR and/or DTBO in the build variables.

Also switch from  `avbtool make_vbmeta_image --setup_rootfs_from_kernel system.img ...`
to `avbtool add_hashtree_footer --image system.img --setup_as_rootfs_from_kernel...`
when BOARD_BUILD_SYSTEM_ROOT_IMAGE is true. This works for both chained
and no-chained:
  - chained: `avbtool add_hashtree_footer --setup_as_rootfs_from_kernel` will
    add dm-verity kernel cmdline descriptor to system.img
  - no-chained: `avbtool make_vbmeta_image --include_descriptors_from_image
    system.img` will include the kernel cmdline descriptor from system.img into
    vbmeta.img

Bug: 38399657
Test: `make` pass, flash images from $OUT and boot device without chain partitions
Test: `make` pass, flash images from $OUT and boot device with chain partitions
Test: `make dist` pass, flash images from TF.zip and boot device without chain partitions
Test: `make dist` pass, flash images from TF.zip and boot device with chain partitions
Test: follow the same steps in
      https://android-review.googlesource.com/#/c/407572/

Change-Id: I344f79290743d7d47b5e7441b3a21df812a69099
Merged-In: I344f79290743d7d47b5e7441b3a21df812a69099
(cherry picked from commit 3e599ead66)
2017-06-21 10:22:38 +08:00
Yifan Hong 84cbe4353c LOCAL_PROPRIETARY_MODULE implies LOCAL_USE_VNDK
Test: m -j -k BOARD_VNDK_VERSION=true

Bug: 37342627

Change-Id: I6bb878eeb2a7b2cb4392fd60bc397e35ad51a6e2
Merged-In: I6bb878eeb2a7b2cb4392fd60bc397e35ad51a6e2
2017-06-20 15:42:54 -07:00
Nicolas Geoffray 8be30c47d7 Merge "Add a new PRODUCT variable for forcing 'speed' preopt." into oc-dev
am: 0081d76597

Change-Id: I81039c2b5d1ae202e4cbca43e98322e15ab5c3e9
2017-06-15 14:42:18 +00:00
Nicolas Geoffray 0081d76597 Merge "Add a new PRODUCT variable for forcing 'speed' preopt." into oc-dev 2017-06-15 14:06:10 +00:00
Nicolas Geoffray c3ffeddc59 Add a new PRODUCT variable for forcing 'speed' preopt.
bug: 35872915
Test: build

(cherry picked from commit 4a0ad4ac61)

Change-Id: Idfea3c379a2b1dab30ee94a58ffe86d508f8522f
2017-06-15 12:40:15 +01:00
TreeHugger Robot 7f0e79b146 Merge "Align size of vbmeta image to 4k boundary" into oc-dr1-dev 2017-06-14 04:13:42 +00:00
Bowgo Tsai 53cf999923 Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" when making vbmeta.img.

Bug: 38454093
Test: build vbmeta.img and check it's being padded.
Change-Id: Id3ba6bf9998755bae75ec8b272ceccf59f4b8666
Merged-In: Id3ba6bf9998755bae75ec8b272ceccf59f4b8666
(cherry picked from commit 7cd30041e9)
2017-06-14 10:14:24 +08:00
Hung-ying Tyan d9657ef5be Merge "Revert "Revert "Move /default.prop to /system/etc/prop.default""" into oc-dev 2017-06-14 02:13:51 +00:00
TreeHugger Robot 6652dd9005 Merge "Updating the BUILD_ID to OC for oc-dev branch." into oc-dev 2017-06-13 19:43:02 +00:00
Jeff Vander Stoep 716b768594 Build split file_contexts for recovery
am: 4ff042c4aa

Change-Id: I9eff1afef9e427c2e97a64b663a029ef33a8ac4a
2017-06-13 18:00:03 +00:00
Jeff Vander Stoep 4ff042c4aa Build split file_contexts for recovery
Bug: 62564629
Test: build and flash marlin. Successfully switch between regular
    and recovery modes

Change-Id: I67ae2f59ca1868cfe777de0d4f0c4e3c2d99329d
2017-06-13 15:39:29 +00:00
Dolly Dhariwal 3e7387a34e Updating the BUILD_ID to OC-DR1 for oc-dr1-dev branch.
Bug: None
Test: Build and flashed AIO device
Change-Id: I53047dbc0b89c2b3afe5d2af3c0532968f60b893
Merged-In: I796d7490f39f817af8f2ec5bea86593182bfcbe2
2017-06-13 15:14:45 +00:00
Hung-ying Tyan a6b68e72b1 Revert "Revert "Move /default.prop to /system/etc/prop.default""
This reverts commit 88c9dddd0f.

Bug: 37815285
Bug: 62525809
Test: Tested with ag/2400523 and ag/2400524. Booted pixel phones,
      checked the location of prop.default, verified the symlink,
      checked a few properties via adb shell and manually tested
      a few apps (Camera, Maps etc).
      sign_target_files_apks.py was tested with:
      sign_target_files_apks -o -e DynamiteLoader.apk= -e DynamiteModulesA.apk= \
        -e DynamiteModulesB.apk= -e DynamiteModulesC.apk= -e DynamiteModulesD.apk= \
        -e GoogleCertificates.apk= out/dist/*-target_files-*.zip signed-target_files.zip
      Booted to recovery and ran 'adb sideload' successfully.

Change-Id: I2ddf287f42360d1a7c7a22f08e7b9e203e7e603a
2017-06-13 21:18:04 +08:00
Dolly Dhariwal 14a9d76026 Updating the BUILD_ID to OC for oc-dev branch.
Bug: None
Test: Build and flashed AIO device
Change-Id: I0c87c33b8fb6cbaf71cdb90ce86097bfb31f4137
Merged-In: I53047dbc0b89c2b3afe5d2af3c0532968f60b893
2017-06-13 06:24:35 +00:00
Tao Bao d4b25e481e Merge "Revert "Move /default.prop to /system/etc/prop.default"" into oc-dev 2017-06-12 19:39:54 +00:00
Tao Bao 88c9dddd0f Revert "Move /default.prop to /system/etc/prop.default"
This reverts commit fad00e4318.

init fails to read default.prop under recovery:
init: Couldn't load properties from /default.prop: Too many symbolic links encountered

Bug: 62525809
Change-Id: I133e9025693e3e01278ec73c8d08860fc89d314b
2017-06-12 17:00:42 +00:00
Adam Seaton d2d14aa0ea Updating security string to 2017-08-05
am: d6e984f9e3

Change-Id: I99f6d08450167c1b3d91e89818f07f2c0e0e2a24
2017-06-09 20:14:29 +00:00
Adam Seaton d6e984f9e3 Updating security string to 2017-08-05 2017-06-09 10:50:47 -07:00
Hung-ying Tyan fc00134c1e Merge "Move /default.prop to /system/etc/prop.default" into oc-dev 2017-06-09 08:04:37 +00:00
Hung-ying Tyan fad00e4318 Move /default.prop to /system/etc/prop.default
This patch tries to fix the problem where the default properties need
to go with the system image especially on non-AB devices where
/default.prop is on the ramdisk image. A symlink is created at
/default.prop for backward compatibility.

Bug: 37815285
Test: Tested with ag/2376383. Booted pixel phones, checked the location
      of prop.default, verified the symlink, checked a few properties
      (via adb shell getprop) and manually tested a few apps (Camera,
      Maps etc).
      sign_target_files_apks.py was tested with:
      sign_target_files_apks -o -e DynamiteLoader.apk= -e DynamiteModulesA.apk= \
          -e DynamiteModulesB.apk= -e DynamiteModulesC.apk= -e DynamiteModulesD.apk= \
          -e GoogleCertificates.apk= out/dist/*-target_files-*.zip signed-target_files.zip

Change-Id: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
2017-06-09 13:00:58 +08:00
TreeHugger Robot faa7a4a716 Merge "Use different versions for framework compatibility matrix" into oc-dr1-dev 2017-06-09 00:46:21 +00:00
Dan Willemsen f37088fb3d Add mising AAPT2 dependency
Bug: 33381544
Test: m clean; mma -j with a prebuilt aar using aapt2
Change-Id: Ie41def84aa35f3774abd6d713fb4a75d63a88876
Merged-In: Ie41def84aa35f3774abd6d713fb4a75d63a88876
(cherry picked from commit c401a62d81)
2017-06-08 10:19:10 -07:00
Dan Willemsen 6d38503400 More aapt2 aar prebuilt fixes
Ensure aar/res exists, otherwise aapt2 may fail with an error.

Bug: 33381544
Test: Attempt to build aar prebuilt
Change-Id: Ifbeed546fe1a3a48c3dae33f95b04acc559f5b30
Merged-In: Ifbeed546fe1a3a48c3dae33f95b04acc559f5b30
(cherry picked from commit 7a1ad6c8a0)
2017-06-07 18:48:31 -07:00
Dan Willemsen 1130dc496e Use framework resources for prebuilt aars with aapt2
Bug: 33381544
Test: Attempt to build prebuilt aar
Change-Id: Ia283252dff6e55dd80c7c01da9b0aa51990b6af4
Merged-In: Ia283252dff6e55dd80c7c01da9b0aa51990b6af4
(cherry picked from commit 470e0e14cd)
2017-06-07 18:48:25 -07:00
Dan Willemsen 2f3af252eb Don't attempt to write to / for aar prebuilts
This path needs to be set if we're going to build aar prebuilts with
aapt2.

Bug: 33381544
Test: Attempt to build an aar prebuilt with LOCAL_USE_AAPT2 := true, it
      doesn't fail writing to /

Change-Id: I28c85736986221607a1d7a295ff1522b993a2049
Merged-In: I28c85736986221607a1d7a295ff1522b993a2049
(cherry picked from commit 48845257dc)
2017-06-07 18:48:19 -07:00
Yifan Hong f61b430e62 Use different versions for framework compatibility matrix
Keyed on MATRIX_LEVEL_OVERRIDE, FULL_TREBLE, SHIPPING_API_LEVEL,
and SDK_VERSION.

Bug: 62136051

Test: m system_compatibility_matrix.xml -j; \
    grep -e"gatekeeper" -B1 $OUT/system/compatibility_matrix.xml; \
    grep -e"oemlock" -B1 $OUT/system/compatibility_matrix.xml

bullhead: gatekeeper is optional, no oemlock (legacy.xml)
marlin without COMP_LEVEL_OVERRIDE: gatekeeper is not optional,
        no oemlock (26.xml)
marlin with COMP_LEVEL_OVERRIDE: gatekeeper is not optional,
        oemlock exists (current.xml)
new devices with COMP_LEVEL_OVERRIDE: same as above.

Change-Id: Icf7269df91950a8c3585a7e5f0022e6737954b77
2017-06-07 19:27:35 +00:00
Baligh Uddin 910e08c023 DO NOT MERGE ANYWHERE - Set MAX_PLATFORM_VERSION to OPD1 on oc-dr1-dev
Bug: 38436796
2017-06-07 10:19:42 -07:00
Dan Willemsen 9a81523e8f Merge "Fix ALLOW_MISSING_DEPENDENCIES in PDK builds" am: 8340ae35a7 am: c1fa14696a am: f6eef888f4
am: bd98d429ce

Change-Id: Ic8e75f2a4cb7741bbca8f2e190c58eee219290c7
2017-06-07 01:48:47 +00:00
Dan Willemsen bd98d429ce Merge "Fix ALLOW_MISSING_DEPENDENCIES in PDK builds" am: 8340ae35a7 am: c1fa14696a
am: f6eef888f4

Change-Id: If5cf8057c9536f05cf224a71edcd290b7347be58
2017-06-07 01:46:46 +00:00
Dan Willemsen f6eef888f4 Merge "Fix ALLOW_MISSING_DEPENDENCIES in PDK builds" am: 8340ae35a7
am: c1fa14696a

Change-Id: Ic7b597595a7373f6fb971860ee42de75ebeda3d2
2017-06-07 01:44:17 +00:00
Treehugger Robot 8340ae35a7 Merge "Fix ALLOW_MISSING_DEPENDENCIES in PDK builds" 2017-06-07 01:34:02 +00:00
Yi Kong 9c07c3397a Merge "Switch to clang-4053586" am: 1923ed7f41 am: 7315435dce am: 1eb2339708
am: 46ba92a0d9

Change-Id: I4fc181d742236a02f94725a142b874b67ff67cff
2017-06-06 21:31:09 +00:00
Yi Kong 46ba92a0d9 Merge "Switch to clang-4053586" am: 1923ed7f41 am: 7315435dce
am: 1eb2339708

Change-Id: I70feed0bb65455848faf7accdf18a4becb4c25ed
2017-06-06 21:26:11 +00:00
Yi Kong 1eb2339708 Merge "Switch to clang-4053586" am: 1923ed7f41
am: 7315435dce

Change-Id: Ide9ecce1c40f2af538c06df9aad1263aae22ae6b
2017-06-06 21:22:05 +00:00
Robert Quattlebaum 22b005354f Merge "Revert "Support for android.net.lowpan and LoWPAN Service"" 2017-06-06 21:10:52 +00:00
Yi Kong 1923ed7f41 Merge "Switch to clang-4053586" 2017-06-06 21:09:43 +00:00
Ian Pedowitz 014dd199f0 Merge "Revert "Revert "OC-DR is 8.0.1""" 2017-06-06 21:05:54 +00:00
Robert Quattlebaum 350911d726 Revert "Support for android.net.lowpan and LoWPAN Service"
This reverts commit b2cbafe06e.

Change-Id: Ib78a2ff1878900508db2d3dad0704182b75e9330
2017-06-06 21:03:23 +00:00
TreeHugger Robot 3f2be14109 Merge "Support for android.net.lowpan and LoWPAN Service" 2017-06-06 20:25:55 +00:00
Ian Pedowitz 71b832169f Revert "Revert "OC-DR is 8.0.1""
This reverts commit 780cd459dc.

Bug: 62187941
Bug: 38502482
Change-Id: I036cc43c1f2aa5317ae1131dc31a1f96caa5081f
2017-06-06 15:47:48 +00:00
Tao Bao 6d1b2bc139 Merge "Remove three board_avb_* args from META/misc_info.txt." am: 401b1d2509 am: 6466063839 am: 26912a3a57
am: f6737d7506

Change-Id: If0c59cc150e6b8dfa90548a39ce7e5bb5ac53c7b
2017-06-05 20:29:07 +00:00
Tao Bao f6737d7506 Merge "Remove three board_avb_* args from META/misc_info.txt." am: 401b1d2509 am: 6466063839
am: 26912a3a57

Change-Id: Ief85e4efe05855b4486ed7e2f8bac22302ddd6a9
2017-06-05 20:24:06 +00:00
Tao Bao 26912a3a57 Merge "Remove three board_avb_* args from META/misc_info.txt." am: 401b1d2509
am: 6466063839

Change-Id: I239961ab6849929be67f99271c9a8d3348305bf0
2017-06-05 20:18:05 +00:00
Tao Bao 3ebfddeabe Remove three board_avb_* args from META/misc_info.txt.
board_avb_algorithm and board_avb_key_path are overlapping with
avb_signing_args. In core/Makefile, only avb_signing_args (i.e.
INTERNAL_AVB_SIGNING_ARGS) will be used in the AVB-signing command. It
covers the contents in board_avb_{algorithm,key_path}. We should do the
same thing in tools/releasetools to avoid potential inconsistency.

This CL cleans up the logic in tools/releasetools, by always using
avb_signing_args. This also allows easier signing key replacement (so we
can replace the key/algorithm/signer in 'avb_signing_args').

board_avb_system_add_hashtree_footer_args is unused in releasetools
script, and the same information has been covered by
system_avb_add_hashtree_footer_args. This CL removes this arg as well.

Test: `m dist`. Then a) check the removed three args no longer exist in
      META/misc_info.txt; b) check that rebuilding images with
      add_img_to_target_files.py uses the same parameters.
Change-Id: I7db890b5c942de5b6868d8d1ebf937586d4729c0
2017-06-05 10:33:52 -07:00
Yi Kong dd65f96c3d Switch to clang-4053586
Bug: 37423073
Test: Build on multiple devices
Change-Id: Ic1a5f515db66275ee96fb6a614ffbb719bb91859
2017-06-02 22:13:01 -07:00
Tao Bao 11401cee5d Merge "Support re-generating DTBO image from add_img_to_target_files.py." am: 4536e45f66 am: b88e3f20a6 am: cdabed4ee8
am: 891c29766e

Change-Id: If6aa956c2d5355c7ce0ab93cb9a2d4e93a629501
2017-06-02 22:46:44 +00:00