Commit graph

1537 commits

Author SHA1 Message Date
Jeff Gaston
a72da88c31 Merge "Update to latest jacoco usage" am: 483fae7430 am: 6264b662f3
am: 7ce0d9c1e7

Change-Id: Id57cc47edc61a7e30dc4fcf4f113ee9ce85a4b7f
2017-07-17 20:52:40 +00:00
Jeff Gaston
7ce0d9c1e7 Merge "Update to latest jacoco usage" am: 483fae7430
am: 6264b662f3

Change-Id: Icd22319fb34575925c140e619b5f099fa68b0ab0
2017-07-17 20:48:40 +00:00
Jeff Gaston
6264b662f3 Merge "Update to latest jacoco usage"
am: 483fae7430

Change-Id: Ibc94d5ba6db7690441825dd655b6cb26d989b78d
2017-07-17 20:44:10 +00:00
Jeff Gaston
483fae7430 Merge "Update to latest jacoco usage" 2017-07-17 20:36:39 +00:00
Tianjie Xu
a4caab580c Merge "Generate brotli compressed {}.new.dat for full OTA" am: 1b28eca1a1 am: a07a04c737
am: 4b53a17756

Change-Id: If03919b9012f4a693e895b02a0c148eeb0a4da5e
2017-07-14 23:34:39 +00:00
Tianjie Xu
4b53a17756 Merge "Generate brotli compressed {}.new.dat for full OTA" am: 1b28eca1a1
am: a07a04c737

Change-Id: I5f2b92791a759def118c6aa70a3e0777a9e8da85
2017-07-14 23:30:32 +00:00
Tianjie Xu
a07a04c737 Merge "Generate brotli compressed {}.new.dat for full OTA"
am: 1b28eca1a1

Change-Id: I3474e8efb634513fbc4876e5c272cf56b3443e12
2017-07-14 23:27:21 +00:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Tianjie Xu
b0a29ad8c2 Generate brotli compressed {}.new.dat for full OTA
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)

Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
2017-07-14 10:53:21 -07:00
Howard Chen
f07747f71f Merge "Add a make maco to convert string to upper case" am: 8eff2d7c8e am: fd380f20cb
am: 0b2aebab08

Change-Id: I50966ed3c8e3f6bee41484e2d7a77d5471f0bf89
2017-07-06 03:55:24 +00:00
Howard Chen
0b2aebab08 Merge "Add a make maco to convert string to upper case" am: 8eff2d7c8e
am: fd380f20cb

Change-Id: Id2f55d548088375eaf38f6b809be9e804adaf83b
2017-07-06 03:52:53 +00:00
Howard Chen
fd380f20cb Merge "Add a make maco to convert string to upper case"
am: 8eff2d7c8e

Change-Id: I86260216cea1c2a6d46599481e19e0063ae576a8
2017-07-06 03:50:54 +00:00
Howard Chen
8eff2d7c8e Merge "Add a make maco to convert string to upper case" 2017-07-06 03:46:07 +00:00
Bowgo Tsai
412138338e Merge "Align size of vbmeta image to 4k boundary" am: efb6fddf39
am: 95202bcba6

Change-Id: I9b9a5faf158157fbb34d18c4e7107e137411634d
2017-07-06 01:00:41 +00:00
Bowgo Tsai
95202bcba6 Merge "Align size of vbmeta image to 4k boundary"
am: efb6fddf39

Change-Id: I4ace791408c92f55bc55f2fbf72dfef3ab363a70
2017-07-06 00:58:16 +00:00
Treehugger Robot
efb6fddf39 Merge "Align size of vbmeta image to 4k boundary" 2017-07-06 00:29:52 +00:00
Colin Cross
373a13c0ca Merge "Provide make variables for java binaries" am: 5e19557eb9 am: e885ccf0df
am: d8a22925f5

Change-Id: I8681d9c889018fe656f5ef4cc380d1a3af8c325f
2017-07-01 01:45:16 +00:00
Colin Cross
d8a22925f5 Merge "Provide make variables for java binaries" am: 5e19557eb9
am: e885ccf0df

Change-Id: I28f7e020e23c629ef303222c3a8489fc6aa541d6
2017-07-01 01:40:45 +00:00
Colin Cross
e885ccf0df Merge "Provide make variables for java binaries"
am: 5e19557eb9

Change-Id: Ib1be7da98214e3b6c27867b80005e18cc68a0d33
2017-07-01 01:36:14 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Bowgo Tsai
cea12fa14d Merge "Align size of vbmeta image to 4k boundary" into oc-dr1-dev
am: 415024dcba

Change-Id: I5ddfec3ba7bccd028255ae9729b29606ab220cfd
2017-06-30 16:39:41 +00:00
Bowgo Tsai
0556231cae Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" in BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS
instead of INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS. The former setting will
be propogated to `make dist` while the latter is only used for `make`.

Bug: 38454093
Test: `make dist` and check vbmeta.img is being padded.
Merged-In: I929288b218761a4637a2a2ef0679d3ff85c70731
Change-Id: I929288b218761a4637a2a2ef0679d3ff85c70731
(cherry picked from commit 9e95beab31)
2017-07-01 00:34:02 +08:00
Bowgo Tsai
9e95beab31 Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" in BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS
instead of INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS. The former setting will
be propogated to `make dist` while the latter is only used for `make`.

Bug: 38454093
Test: `make dist` and check vbmeta.img is being padded.
Change-Id: I929288b218761a4637a2a2ef0679d3ff85c70731
2017-06-30 12:13:15 +08:00
Howard Chen
b83b205265 Add a make maco to convert string to upper case
There's already a to-lower function. Add a to-upper function to make
it complete.

Bug:36012197
Test: `make` pass, flash images from $OUT and boot device with chain
partitions

Change-Id: I39fe8c277a3cf6b87fc3c411eeab2fa5fb40007b
2017-06-29 16:18:47 +08:00
Tao Bao
47743957f3 Merge "Allow packing custom radio images into target_files zip." am: 9ea6a8b817 am: ce10b6e2f3
am: 1612f02ff2

Change-Id: If03509584275c1c0fc1f72f44cfb8fbfdfd4125b
2017-06-29 03:22:35 +00:00
Tao Bao
1612f02ff2 Merge "Allow packing custom radio images into target_files zip." am: 9ea6a8b817
am: ce10b6e2f3

Change-Id: I3b6f7ade42f58baa722e2ee3df81efac48a5b653
2017-06-29 03:19:02 +00:00
Tao Bao
ce10b6e2f3 Merge "Allow packing custom radio images into target_files zip."
am: 9ea6a8b817

Change-Id: Ifdcdfa2214e4fa75bb0c7a5df1cb1796814fa7bc
2017-06-29 03:16:17 +00:00
Hung-ying Tyan
331fd11216 Merge "Move /default.prop to /system/etc/prop.default" into oc-dr1-dev
am: 3b7460eda9

Change-Id: I8b610498ddae48f93e7d9e23225b7361d4e0f8b7
2017-06-28 06:31:17 +00:00
TreeHugger Robot
3b7460eda9 Merge "Move /default.prop to /system/etc/prop.default" into oc-dr1-dev 2017-06-28 06:28:10 +00:00
Tao Bao
95a95c3a5e Allow packing custom radio images into target_files zip.
Radio images are added to INSTALLED_RADIOIMAGE_TARGET, which by default
will be packed under RADIO/ in a target_files zip. This CL introduces
BOARD_PACK_RADIOIMAGES that allows additionally copying them into
IMAGES/, which will then be included into <product>-img.zip.

Bug: 62195105
Test: Define BOARD_PACK_RADIOIMAGES and `m dist`. Check the generated
      target_files zip and <product>-img.zip.
Change-Id: I3deafd2dfecd1d4dbfdfc2d002fc40ef22fb60ea
2017-06-27 13:50:12 -07:00
Hung-ying Tyan
7eb6a926ad 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/2416542. 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
      Booted to recovery and ran 'adb sideload' successfully.
Change-Id: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
Merged-In: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
(cherry-picked from 4fbbe4578bb10d54292d9b243edf4999fddf1c93)
2017-06-27 15:10:32 +08:00
Hung-ying Tyan
f829b40c48 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/2416542. 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
      Booted to recovery and ran 'adb sideload' successfully.
Change-Id: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
2017-06-27 15:05:17 +08:00
Chris Fries
ec462e6f90 Merge "Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS" am: ccac0f861b am: ba0be93555
am: abd4388b4c

Change-Id: Ife96fb48d2547136559d18ef7412f3939bbdf852
2017-06-21 23:19:13 +00:00
Chris Fries
abd4388b4c Merge "Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS" am: ccac0f861b
am: ba0be93555

Change-Id: I1b6a9b8f05d10738267a51da65bd404242885e6c
2017-06-21 23:16:31 +00:00
Chris Fries
df0387ddab Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS
.. in order to let the system_other image use it.

Bug: 33203383 Can't build target on mac
Change-Id: Iac2faf0ebdcc933675afbec2301d5d455aa33501
2017-06-21 16:19:35 -05:00
Colin Cross
08447ecb65 Merge "Add make sync target" am: 564ce0fa53 am: 5d848ba50a
am: 38e8c8bc8c

Change-Id: Icb76f4f3aebdc181c29e6ada0e60e138b21d8b5f
2017-06-21 03:06:46 +00:00
Colin Cross
38e8c8bc8c Merge "Add make sync target" am: 564ce0fa53
am: 5d848ba50a

Change-Id: I384460e7373aec904a4779d8af1648f20c004ff8
2017-06-21 03:00:47 +00:00
Treehugger Robot
564ce0fa53 Merge "Add make sync target" 2017-06-21 02:42:28 +00:00
Bowgo Tsai
c1ccae5009 Merge "Use make functions to convert a text to lower case" am: cd46f1012e am: 5a7d87afce
am: 98e356910f

Change-Id: I4b2676842f25f4bc4e59c8be307892f22e53de95
2017-06-21 02:23:58 +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
Bowgo Tsai
98e356910f Merge "Use make functions to convert a text to lower case" am: cd46f1012e
am: 5a7d87afce

Change-Id: I5da050178795dce0333b74ca91a7c18968ea5bd7
2017-06-21 02:18:31 +00:00
Colin Cross
91a52277b0 Add make sync target
make sync will build everything necessary to adb sync system
and vendor, without wasting time rebuilding system.img and
vendor.img.

Test: m -j sync
Change-Id: I91c0012eed6d58a338393cc375056a30e2a24b09
2017-06-20 16:57:52 -07:00
Bowgo Tsai
e615afd6d0 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
Change-Id: I6d4ff8e487931ba25008a2a881401a8951d4049e
2017-06-20 17:44:00 +08:00
Bowgo Tsai
f184e3a35b Merge "AVB: support chain partition signing" am: 0effed4b94 am: dcad0945ab
am: abbba2c832

Change-Id: I0ffdd31bad14c42afddf8180bf7d1e5e8a0f841d
2017-06-20 07:10:04 +00:00
Bowgo Tsai
abbba2c832 Merge "AVB: support chain partition signing" am: 0effed4b94
am: dcad0945ab

Change-Id: I5bc9f2dcc94b2db846d9956c0def6b3c9910b2c5
2017-06-20 07:07:33 +00: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
e408b4ceb2 Merge "Align size of vbmeta image to 4k boundary" am: 6b126fb7bc
am: e7151a57aa

Change-Id: I0a4dbbe18574e1c2037b185c7e3794033da2c974
2017-06-14 02:14:41 +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
Jeff Vander Stoep
716b768594 Build split file_contexts for recovery
am: 4ff042c4aa

Change-Id: I9eff1afef9e427c2e97a64b663a029ef33a8ac4a
2017-06-13 18:00:03 +00:00