Commit graph

1740 commits

Author SHA1 Message Date
Xu Chao
2b04bf4725 Move build-image-kernel-modules out of recovery macro
build-image-kernel-modules is defined under recovery macro
when build without recovery,the driver kos are not packed
into the vendor image

Test: build with TARGET_NO_RECOVERY on and set ko to be build
in BOARD_VENDOR_KERNEL_MODULES to see if kos are packed into
vendor image

Change-Id: I162ccb2fe50c09ece07b6b07e416721985228006
2017-07-21 15:25:17 -07:00
Steve Muckle
fb2714e61c fix builds on macOS when kernel modules are used
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.

Bug: 38268091
Test: run build with kernel modules on macOS
Merged-In: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
2017-07-21 15:24:51 -07:00
Tri Vo
ecf83a839f package modules.alias onto device
Test: device builds and boots, vendor/lib/modules/modules.alias appears
on device.
Merged-In: I668a396ccd11e4eb599e1f6aa2906400ac78f02b
Change-Id: I668a396ccd11e4eb599e1f6aa2906400ac78f02b
2017-07-21 15:24:21 -07:00
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
Jeff Vander Stoep
0b3fc37d7e Build split file_contexts for recovery
am: 4ff042c4aa

Change-Id: If9ff1b6b2ed152333eeb92a83d9bdbbacc431ed2
2017-06-13 17:59:05 +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
Bowgo Tsai
3e599ead66 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
2017-06-13 17:45:10 +08:00
Bowgo Tsai
7cd30041e9 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
2017-06-13 11:31:06 +08: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
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
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
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
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
Tao Bao
891c29766e Merge "Support re-generating DTBO image from add_img_to_target_files.py." am: 4536e45f66 am: b88e3f20a6
am: cdabed4ee8

Change-Id: Ic890baa277142baf355c1196afd7705c117761a3
2017-06-02 22:39:44 +00:00
Tao Bao
c633ed0230 Support re-generating DTBO image from add_img_to_target_files.py.
This is a step to enable signing a given target_files zip with release
keys.

When calling sign_target_files_apks.py, we will delete all the entries
under IMAGES/ in order to re-generate them (with the proper release
keys). In order to support that, we need to pack everything in need into
TF.zip.

Steps to test the CL.
a) Choose a target that has both AVB and DTBO enabled.
 $ m dist

b) Check IMAGES/dtbo.img and PREBUILT_IMAGES/dtbo.img both exist in the
   generated out/dist/TF.zip.

c) Remove the entries under IMAGES/ from the generated TF.zip.
 $ zip -d TF.zip IMAGES/\*

d) Re-generate the images with TF.zip.
 $ build/make/tools/releasetools/add_img_to_target_files.py TF.zip

e) Check that IMAGES/dtbo.img is re-generated, and it's identical to the
   image in b). Note that by default the re-generated image will carry a
   different footer, because of the random salt. This CL is verified by
   specifying the same salt.

Bug: 38315721
Test: see above.
Change-Id: I0bdc4e1cd4800962dc3902ca550dad6a8ca56c78
2017-06-01 20:07:33 -07:00
Tao Bao
8edb3c0962 Merge "Pack avbtool into otatools.zip." am: db5fa05429 am: 308b234593 am: 0c2bc7a7b1
am: ffa864c5ed

Change-Id: I36969a8dbb5cc9663028b65d09c42551e5b54a77
2017-06-01 07:33:00 +00:00
Tao Bao
ffa864c5ed Merge "Pack avbtool into otatools.zip." am: db5fa05429 am: 308b234593
am: 0c2bc7a7b1

Change-Id: I1f15f62536e3030bee7fec0fdacb1ef8ee57a69e
2017-06-01 07:30:30 +00:00
Tao Bao
3cba374da2 Pack avbtool into otatools.zip.
Also pack the test keys for easier testing.

Bug: 38315721
Test: m otatools-package and avbtool is present in otatools.zip.
Change-Id: Ieb63bf3f4bc211ef1f48ab278cb01b70845d06da
2017-05-31 10:20:25 -07:00
Bowgo Tsai
b3ce1ea72b Merge "Support signing custom images with AVB HASH or AVB HASHTREE" am: fe7aeb1de7 am: 16b64cbb58 am: 3989b738b8
am: b4c268eb7b

Change-Id: I516f6d60361e5397d32de0537dc1b1fa7bcc46a3
2017-05-31 03:42:56 +00:00
Bowgo Tsai
b4c268eb7b Merge "Support signing custom images with AVB HASH or AVB HASHTREE" am: fe7aeb1de7 am: 16b64cbb58
am: 3989b738b8

Change-Id: I11393e1833db97301ffdd31ec3db0968e87c1a24
2017-05-31 03:38:24 +00:00
Treehugger Robot
fe7aeb1de7 Merge "Support signing custom images with AVB HASH or AVB HASHTREE" 2017-05-31 03:24:25 +00:00
TreeHugger Robot
48c8af949b Merge "Makefile: support build and avb signing of dtbo img" into oc-dev 2017-05-31 00:50:37 +00:00
Tao Bao
6343317767 Merge "Makefile: Add the dependency for BUILT_OTATOOLS_PACKAGE." am: c6ad99c926 am: f5529878f8 am: c7b91ee05a
am: e6e6557135

Change-Id: I80e06807eb1676b5cc6830a310289d388d710d68
2017-05-30 23:41:49 +00:00
Tao Bao
e6e6557135 Merge "Makefile: Add the dependency for BUILT_OTATOOLS_PACKAGE." am: c6ad99c926 am: f5529878f8
am: c7b91ee05a

Change-Id: I2db86c959abd5f65b6a51b97da9f7475e9e26838
2017-05-30 23:31:07 +00:00
TreeHugger Robot
290b8c71e4 Merge "Add the option to reserve headroom for partition images. This is useful for device with low disk space with different build variants." into oc-dev 2017-05-30 18:03:15 +00:00
Yueyao Zhu
161fe38009 Makefile: support build and avb signing of dtbo img
Test: make with corresponding configurations in BoardConfig.mk
- dtbo.img is copied to the OUT directory
- avbtool info_image --image dtbo.img shows avb hashes
- avbtool info_image --image vbmeta.img shows dtbo partition info

Bug: 37730955
Change-Id: If3edaab860926c743f18fd031c911b076eb09fab
(cherry picked from commit 211c90158c)
2017-05-26 11:58:21 +08:00
Michael Schwartz
c3836ae388 Merge "Include Treble metadata on Treble enabled devices" into oc-dev am: 7858d310ce
am: 4db7b3ef88

Change-Id: I30d3600cd2e4093de7fb3b8b7598baa77d0c864d
2017-05-24 22:05:48 +00:00
Michael Schwartz
4db7b3ef88 Merge "Include Treble metadata on Treble enabled devices" into oc-dev
am: 7858d310ce

Change-Id: I4362d0d507022439dfcb0795d43233ccefaa6da5
2017-05-24 21:55:25 +00:00
Bowgo Tsai
7ea994b21c Support signing custom images with AVB HASH or AVB HASHTREE
`make custom_images` supports to build different kinds of *non-droid* images,
e.g., odm.img. Adding the support of signing them with either AVB HASH footer
or AVB HASHTREE footer. The user can use HASH for small images and
HASHTREE for large images.

Sample signing configurations:
 * AVB HASH footer:
   - CUSTOM_IMAGE_AVB_HASH_ENABLE := true
   - CUSTOM_IMAGE_AVB_ADD_HASH_FOOTER_ARGS := --append_to_release_string my_odm_image

 * AVB HASHTREE footer:
   - CUSTOM_IMAGE_AVB_HASHTREE_ENABLE := true
   - CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS := --fec_num_roots 8

 * Using custom signing key:
   - CUSTOM_IMAGE_AVB_ALGORITHM := SHA256_RSA2048
   - CUSTOM_IMAGE_AVB_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem

Bug: 36701014
Test: `make custom_images` with AVB HASH footer
Test: `make custom_images` with AVB HASHTREE footer
Test: `make droid` to check system.img is still properly signed with AVB HASHTREE
Test: `make droid` to check vendor.img is still properly signed with AVB HASHTREE

Change-Id: I8dc420e12e37e9a631345c0cd883339db05d489f
2017-05-24 14:21:03 +08:00
Tao Bao
e8ef8f70f8 Makefile: Add the dependency for BUILT_OTATOOLS_PACKAGE.
$ lunch aosp_marlin-userdebug
$ m otatools-package
$ echo "TEST" >> device/google/marlin/sepolicy/certs/app.x509.pem
$ m otatools-package

out/target/product/marlin/otatools.zip now contains an updated
app.x509.pem file.

Test: see above
Change-Id: I78a165e12a07c1b86a671a7ee1863a97fdea18c5
2017-05-23 18:25:29 -07:00
TreeHugger Robot
05573e7292 Merge "OTA metadata uses system_matrix.xml." 2017-05-22 23:27:14 +00:00
Michael Schwartz
cb5b8d2d47 Include Treble metadata on Treble enabled devices
Bug: 38431773
Test: `m -j dist` for bullhead and sailfish and inspect target_files
Change-Id: I55da654f42af08f27a79249177a0078b66cf1662
2017-05-22 14:02:27 -07:00
Julius D'souza
8756c0fedc Add the option to reserve headroom for partition
images. This is useful for device with low disk
space with different build variants.

This is a manual cherry-pick from aosp/master.

Bug: 37469715
Test: regular image builds successfully, errors occur
when the headroom size is greater than available
partition space.

Merged-In: I526cdd0f84981bbd16e3afcfe1cd7fc43dce98ef

Change-Id: I840d212bb46612074c43b39e94546901f60e4b4c
2017-05-19 14:27:28 -07:00
Tao Bao
bacb978007 Merge "Makefile: Remove the duplicate lines for OTATOOLS." into nyc-mr2-dev-plus-aosp am: 443d5fdf24
am: bec856bc46

Change-Id: I163269ff5e1de357fc4f436d8d0e71b6862ee292
2017-05-17 00:58:29 +00:00
Tao Bao
bec856bc46 Merge "Makefile: Remove the duplicate lines for OTATOOLS." into nyc-mr2-dev-plus-aosp
am: 443d5fdf24

Change-Id: I335bead53e07b5c1b7a54bd7f38dffb8c971db79
2017-05-17 00:55:28 +00:00
Jin Qian
3bac9b132e Makefile: copy mke2fs.conf to ota root
Bug: 34947454
Change-Id: I99999c4f56df295c0bb028daf3dcc0898176c5ed
(cherry picked from commit 53524b5da9)
2017-05-16 17:33:22 -07:00
Tao Bao
0618e639a8 Makefile: Remove the duplicate lines for OTATOOLS.
Test: lunch ryu-userdebug; m otatools-package gives the same
      otatools.zip.
Change-Id: I917ba210f6161f15424b3ade86f41d14a20c99aa
2017-05-16 15:04:38 -07:00
Yifan Hong
35b34ef176 OTA metadata uses system_matrix.xml.
This is to be in sync with ota_from_target_files.py.

Test: builds
Bug: 38321140
Change-Id: Id82f8fb740fa4162e670d38f326da7e0bde8c7ea
2017-05-15 18:07:09 -07:00
Yueyao Zhu
89c32567f4 Merge "add dtbo support for ota" am: 294d5c5f07 am: 793a9bb490 am: d2f336664c
am: 3a3d9c5837

Change-Id: Id22f24fda9c61fd77d9c27784a424b8afdfd7398
2017-05-15 17:04:55 +00:00
Yueyao Zhu
3a3d9c5837 Merge "add dtbo support for ota" am: 294d5c5f07 am: 793a9bb490
am: d2f336664c

Change-Id: I800efcf88ddb00d9624514b1c748e998f1ebd3e5
2017-05-15 17:01:55 +00:00
Yueyao Zhu
d2f336664c Merge "add dtbo support for ota" am: 294d5c5f07
am: 793a9bb490

Change-Id: Ia44e579c6c642ca745aa7d38ce73d3c89dd9a0c8
2017-05-15 16:59:56 +00:00
Treehugger Robot
294d5c5f07 Merge "add dtbo support for ota" 2017-05-15 16:49:46 +00:00
Steve Muckle
da87386b64 fix builds on macOS when kernel modules are used
am: f4ccb4f735

Change-Id: I36e404be2b8d5148947cbcd2afec249da0e24a92
2017-05-15 06:02:40 +00:00
Julius D'souza
57b7d6ff5d Merge "Add the option to reserve headroom for partition images. This is useful for devices with low disk space with different build variants." am: bba00b2cb9 am: e255054a08 am: b83a34bf9e
am: 86568d4acc

Change-Id: Idd5b471c93aafdb7d94fa16e872f55bd33bb2c27
2017-05-13 01:50:12 +00:00
Julius D'souza
86568d4acc Merge "Add the option to reserve headroom for partition images. This is useful for devices with low disk space with different build variants." am: bba00b2cb9 am: e255054a08
am: b83a34bf9e

Change-Id: I5ae85fbf49d7cfae4c72d5cdec2ee5cfc28e8d8e
2017-05-13 01:48:23 +00:00
Julius D'souza
b83a34bf9e Merge "Add the option to reserve headroom for partition images. This is useful for devices with low disk space with different build variants." am: bba00b2cb9
am: e255054a08

Change-Id: I3b37883b755e5d59aa6f7b5db7bd5cfc4ff12567
2017-05-13 01:46:23 +00:00
Treehugger Robot
bba00b2cb9 Merge "Add the option to reserve headroom for partition images. This is useful for devices with low disk space with different build variants." 2017-05-13 01:37:25 +00:00
Yueyao Zhu
889ee5e7d3 add dtbo support for ota
Test: make dist and locally push ota on a device
Change-Id: I920b98f20e248b437955b2a963eb69ed2ddb8d45
2017-05-12 17:50:46 -07:00
Steve Muckle
f4ccb4f735 fix builds on macOS when kernel modules are used
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.

Bug: 38268091
Test: run build with kernel modules on macOS
Merged-In: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
2017-05-12 16:28:26 -07:00
Steve Muckle
730624c16f fix builds on macOS when kernel modules are used
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.

Bug: 38268091
Test: run build with kernel modules on macOS
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
2017-05-12 14:56:42 -07:00
Vishwath Mohan
0a9845488b Merge "Selectively add _asan flavor suffix." am: e5143608df am: faea53a89b am: 8b4eaf5562
am: c20272d7ac

Change-Id: Icdb21774d8ea936658bc9bfc6c8e5f2ec9d8fa20
2017-05-10 00:36:25 +00:00
Vishwath Mohan
c20272d7ac Merge "Selectively add _asan flavor suffix." am: e5143608df am: faea53a89b
am: 8b4eaf5562

Change-Id: I9cf0694a66452109a56c693747e9e864af93b594
2017-05-10 00:25:06 +00:00
Vishwath Mohan
8b4eaf5562 Merge "Selectively add _asan flavor suffix." am: e5143608df
am: faea53a89b

Change-Id: I15293b3a98a54592027afd87f6b880a66ec340a3
2017-05-10 00:20:01 +00:00
Tri Vo
051900b1bb Merge "package modules.alias onto device" 2017-05-09 21:44:54 +00:00
Vishwath Mohan
9ebc278f91 Selectively add _asan flavor suffix.
This CL ensures that the _asan suffix is added to the build flavor
only when it doesn't already contain _asan (or _asan_coverage). This
correctly prevents it from appending an extra _asan to ASAN lunch
configs that already include it in the flavor, while allowing
sanitized targets for generic configs to behave as they used to.

Bug: 38145756
Test: _asan is correctly appended only for lunch configs that don't
already specify it in the build flavor.

Change-Id: Ia7d9356f717b97d1c64e3237ca31cc507f27734f
2017-05-09 09:54:49 -07:00
Tri Vo
c7477bc61f package modules.alias onto device
Test: device builds and boots, vendor/lib/modules/modules.alias appears
on device.
Change-Id: I668a396ccd11e4eb599e1f6aa2906400ac78f02b
2017-05-08 12:37:50 -07:00
Julius D'souza
001c676b81 Add the option to reserve headroom for partition images.
This is useful for devices with low disk space with different
build variants.

Bug: 37469715
Test: Regular image builds successfully, errors occur when
the headroom size is greater than available partition space.

Change-Id: I526cdd0f84981bbd16e3afcfe1cd7fc43dce98ef
2017-05-08 11:59:25 -07:00
Thierry Strudel
ff1984b27d Merge "core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE" am: e3f07c2adb am: c10b033077 am: 21e6dba8fa
am: fe9f539929

Change-Id: I41bb8bee87b623ec9ac6edf06c27373c08433d02
2017-05-04 22:46:43 +00:00
Thierry Strudel
fe9f539929 Merge "core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE" am: e3f07c2adb am: c10b033077
am: 21e6dba8fa

Change-Id: I3828790ad83e2eb3a3c97430bde5791875a13787
2017-05-04 22:43:12 +00:00
Thierry Strudel
21e6dba8fa Merge "core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE" am: e3f07c2adb
am: c10b033077

Change-Id: I8726d4f35bf9bc5272c01ee6cc2cf332df8ebfad
2017-05-04 22:39:42 +00:00
Thierry Strudel
d7bd1f216f core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE
Bug: 37960599
Test: 'make bootimage' works when BOARD_AVB_ENABLE is true
Change-Id: I02c2fa16c9df988fbe1e1d6cd13a62278fedea45
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-05-04 14:00:50 -07:00
Tao Bao
fe9b01c49e Merge "Add the missing dependency on payload generation script." am: 3465f2ad56 am: 1f632e7a5e am: 4752d3cbf5
am: 160da45f74

Change-Id: Ie5f47ae20518306e22c977ec36e35c35780d3ea9
2017-05-03 00:03:35 +00:00
Tao Bao
160da45f74 Merge "Add the missing dependency on payload generation script." am: 3465f2ad56 am: 1f632e7a5e
am: 4752d3cbf5

Change-Id: I6dd3d6b3d4679dfde950e105ad5049444d9928a0
2017-05-02 23:57:05 +00:00
Tao Bao
4752d3cbf5 Merge "Add the missing dependency on payload generation script." am: 3465f2ad56
am: 1f632e7a5e

Change-Id: I6fc7dc2b854f48e90db01ae0b08dca988e9799ce
2017-05-02 23:54:02 +00:00
Tao Bao
3465f2ad56 Merge "Add the missing dependency on payload generation script." 2017-05-02 23:42:44 +00:00
Yifan Hong
70a80f50dd Add device/fwk compatibility matrices to device. am: b5cbe22b84
am: d9842ea1c9

Change-Id: I911133b6c1a15ef738b40966955ae6d62dec9908
2017-05-02 07:45:16 +00:00
Yifan Hong
d9842ea1c9 Add device/fwk compatibility matrices to device.
am: b5cbe22b84

Change-Id: I739579f918fe233e153a6ef1dbce77f5863dd808
2017-05-02 07:42:41 +00:00
Jiyong Park
149099cce9 Revert unnecessary dependency to fs_config_dirs and fs_config_files
fs_config_dirs and fs_config_files are now correctly built even when we
build the vendor.img only. Therefore, reverting the old trick to force
build them.

Bug: 36071012
Bug: 36070427
Test: m -j 80 vendorimage creates fs_config_dirs and fs_config_files in
/vendor/etc

Change-Id: Ia69761ee25dae71650b8ccf3bcda16abfbd725f6
2017-05-02 14:59:30 +09:00
Yifan Hong
b5cbe22b84 Add device/fwk compatibility matrices to device.
Also renamed matrix.xml to compatibility_matrix.xml.

Test: make and ensure vendor/compatibility_matrix.xml is there.
Test: adb shell vintf (see matrices, compatible = true)

Bug: 37321309
Change-Id: I4ebbedf47a576a50a42df53b72e507ed31ef2e56
2017-05-01 21:49:18 -07:00
Jaekyun Seok
d89886846b Merge "Split vendor license notices into vendor partition" am: 9607ace215
am: e81fffa866

Change-Id: If5d496d890545146357b0dd2fec11e6e67fcbf38
2017-05-01 23:17:37 +00:00
Jaekyun Seok
9e7eab53c1 Split vendor license notices into vendor partition
Xml files will be generated instead of html files, and then Settings
will generate html file on runtime from xml files of partitions.

Test: build succeeded and tested on sailfish
Bug: 37099941
Merged-In: Id7899381a537b1947cbb6164ed2b4a98492334af
Change-Id: Id7899381a537b1947cbb6164ed2b4a98492334af
(cherry picked from commit 3b7560bf88)
2017-05-01 22:07:50 +00:00
Jaekyun Seok
035a49f301 Split vendor license notices into vendor partition
am: 3b7560bf88

Change-Id: Ib2926d1b97a5bdc9ef59738bd9e993487da0730d
2017-05-01 21:26:51 +00:00
Jaekyun Seok
3b7560bf88 Split vendor license notices into vendor partition
Xml files will be generated instead of html files, and then Settings
will generate html file on runtime from xml files of partitions.

Test: build succeeded and tested on sailfish
Bug: 37099941
Change-Id: Id7899381a537b1947cbb6164ed2b4a98492334af
2017-04-28 16:29:17 +09:00
Yueyao Zhu
28112f2bdd Merge "Makefile: support build and avb signing of dtbo img" am: 1a752acc89 am: 143b2be93e
am: 14fef78797

Change-Id: If8c047e8377c090fd739fdbdc5e80204b74bb1ce
2017-04-28 02:17:50 +00:00
Yueyao Zhu
14fef78797 Merge "Makefile: support build and avb signing of dtbo img" am: 1a752acc89
am: 143b2be93e

Change-Id: I58b393610a9f5cf3a241b325b9ce5afa3ddac962
2017-04-28 02:14:49 +00:00
Yueyao Zhu
211c90158c Makefile: support build and avb signing of dtbo img
Test: make with corresponding configurations in BoardConfig.mk
- dtbo.img is copied to the OUT directory
- avbtool info_image --image dtbo.img shows avb hashes
- avbtool info_image --image vbmeta.img shows dtbo partition info

Bug: 37730955
Change-Id: If3edaab860926c743f18fd031c911b076eb09fab
2017-04-27 14:49:39 -07:00
Tao Bao
e53c6e7200 Add the missing dependency on payload generation script.
For A/B OTAs, ota_from_target_files.py calls brillo_update_payload
script to generate the payload entry in an A/B OTA package.

Bug: 37443093
Test: lunch aosp_marlin-userdebug && rm
      out/host/linux-x86/bin/brillo_update_payload && m otapackage
Change-Id: I3845786b6c934c709f32e12a63cd6ea1f303d380
2017-04-19 21:30:15 -07:00
Bowgo Tsai
16ba563b71 AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true

Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
Merged-In: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
(cherry picked from commit 9b3776017f)
2017-04-15 13:57:42 +08:00
Bowgo Tsai
3f0fd3d085 AVB: support signing vendor.img
Uses avbtool to sign vendor.img if BOARD_AVB_ENABLE is set.
It also allows appending additional arguments to avbtool via
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS.

e.g.,
  BOARD_AVB_ENABLE := true
  BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS := --generate_fec

Bug: 35415839
Test: "make" with the above variables and use avbtool to check vbmeta is
      appended to vendor.img
Test: "make dist" with the above variables

Change-Id: I8ada38dff3def6d34613e77c67944def8a49f464
Merged-In: I8ada38dff3def6d34613e77c67944def8a49f464
(cherry picked from commit 8ee4a3db8c)
2017-04-15 13:57:21 +08:00
Bowgo Tsai
1c6d3e1b87 Merge changes Ieb58dd9a,I8ada38df am: 9ea5c1aad0 am: 225a18d07d
am: 13de7b5f0b

Change-Id: Ied184158f06af1fae79240299bad732e067e5fcd
2017-04-15 05:47:28 +00:00
Bowgo Tsai
13de7b5f0b Merge changes Ieb58dd9a,I8ada38df am: 9ea5c1aad0
am: 225a18d07d

Change-Id: I3b29829e64aca4d9dc5b04e1f3b5b4b49a6d0eb8
2017-04-15 05:44:26 +00:00
Yifan Hong
9c20c473ef Merge changes from topic 'assemble_vintf' into oc-dev
am: ffd66c35bf

Change-Id: I73f8430739e3d129716c3569c000433786099bf1
2017-04-15 01:31:39 +00:00
Bowgo Tsai
9b3776017f AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true

Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
2017-04-15 08:53:40 +08:00
Bowgo Tsai
8ee4a3db8c AVB: support signing vendor.img
Uses avbtool to sign vendor.img if BOARD_AVB_ENABLE is set.
It also allows appending additional arguments to avbtool via
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS.

e.g.,
  BOARD_AVB_ENABLE := true
  BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS := --generate_fec

Bug: 35415839
Test: "make" with the above variables and use avbtool to check vbmeta is
      appended to vendor.img
Test: "make dist" with the above variables

Change-Id: I8ada38dff3def6d34613e77c67944def8a49f464
2017-04-15 08:53:06 +08:00
Yifan Hong
aa21221f80 Use assemble_vintf to verify framework manifests.
Test: builds, and verify that system/manifest.xml is there.

Bug: 36681384 Runtime-Collectible information must be statically
collectible
Bug: 36983271 VINTF checked at build time

Change-Id: Ic3bb50211311fa423a2ad56bd2891cb57d7dc1a5
2017-04-14 16:29:55 -07:00
Michael Schwartz
b4baff4961 Merge "Rule to copy device manifest to device" into oc-dev
am: ceeaa7be20

Change-Id: Ibd3b2ffbc591e22682539e2cdb49b0b622549f54
2017-04-14 03:41:01 +00:00
Michael Schwartz
4d9cb56866 Rule to copy device manifest to device
The device manifest defines the collection of HAL interfaces exposed by
the vendor. Create a common rule so each target need not define their own.

Bug: 36810913
Test: Ran marlin build and inspected file was copied
Change-Id: I9f53796fdd85e706f91664d275aff6dbd785213f
2017-04-13 08:42:42 -07:00
Jin Qian
5738b9bb76 Makefile: copy mke2fs.conf to ota root
am: abcec5e0bf

Change-Id: Ia4deec66bf37bd052c811f6057828f27d8428023
2017-04-04 21:58:01 +00:00
Jin Qian
abcec5e0bf Makefile: copy mke2fs.conf to ota root
Bug: 34947454
Change-Id: I99999c4f56df295c0bb028daf3dcc0898176c5ed
(cherry picked from commit 53524b5da9)
2017-04-04 18:19:45 +00:00
Alex Deymo
4775eb67db Merge "Don't include the dev-key on IOT products." am: 41febee0cc am: b20d1d7a74
am: b83d6d50ab

Change-Id: I09c22951828599f7d0b3f290d0297bc06455528c
2017-04-04 00:57:10 +00:00
Alex Deymo
b83d6d50ab Merge "Don't include the dev-key on IOT products." am: 41febee0cc
am: b20d1d7a74

Change-Id: Id31abf9343870de33248269fe23b3c6c75ee7431
2017-04-04 00:53:08 +00:00
Alex Deymo
cec578c916 Don't include the dev-key on IOT products.
This patch updates the logic to use the PRODUCT_IOT variable instead of
BRILLO.

Bug: 36702887
Test: `make`; Image doesn't have the dev key.
Change-Id: I1751e97d8cdfeba83c7e4720a017a5f4dcfd49da
2017-04-03 15:04:35 -07:00
Andreas Gampe
e5339ae1d2 Build: Force system owner for ASAN in system
For tar-ed ASAN artifacts, enforce ownership by the system uid.

(cherry picked from commit 2c498a391b)

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I190cba3d160f15a89ef74f26e7aaa853a449929f
2017-03-31 16:44:09 -07:00
Andreas Gampe
3997bbf95c Merge "Build: Force system owner for ASAN in system" am: 542c3d57d0 am: dd8293b2e7
am: df187b1ba7

Change-Id: I52132d97446e625b80a6a3e967edb3bdc2345c9d
2017-03-31 19:58:58 +00:00
Andreas Gampe
df187b1ba7 Merge "Build: Force system owner for ASAN in system" am: 542c3d57d0
am: dd8293b2e7

Change-Id: I0ba058a16939b902d6f235524d26a21372568adf
2017-03-31 19:56:58 +00:00
Andreas Gampe
2c498a391b Build: Force system owner for ASAN in system
For tar-ed ASAN artifacts, enforce ownership by the system uid.

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I190cba3d160f15a89ef74f26e7aaa853a449929f
2017-03-31 03:04:19 +00:00
Andreas Gampe
a92434f4c0 Build: ASAN in system
Add build system support for asan.tar.bz in the system image. This
is triggered by SANITIZE_TARGET_SYSTEM=true.

(cherry picked from commit 039b5c779f)

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I725f99f16a8c9182b1c7ad26580c73d3708f8554
2017-03-29 18:36:24 -07:00
Andreas Gampe
2753b49718 Merge "Build: ASAN in system" am: 85473982fb am: 4ec27c88f5
am: 09ab1b8c67

Change-Id: Ic64295b6ec6437e20a66a75878d7f1a3d8c83aac
2017-03-30 01:25:53 +00:00
Andreas Gampe
09ab1b8c67 Merge "Build: ASAN in system" am: 85473982fb
am: 4ec27c88f5

Change-Id: Ied73489f4c7b1064b1dfd52c98c5989ac2c81646
2017-03-30 01:23:52 +00:00
Andreas Gampe
039b5c779f Build: ASAN in system
Add build system support for asan.tar.bz in the system image. This
is triggered by SANITIZE_TARGET_SYSTEM=true.

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I725f99f16a8c9182b1c7ad26580c73d3708f8554
2017-03-29 16:19:28 -07:00
Makoto Onuki
517d32d4da Add USE_FILESLIST_GO to switch to fileslist.go
fileslist.go is still disabled by default.  To enable, use:
USE_FILESLIST_GO=true m -j

Bug: 36274890
Test: Manual, with m -j

Change-Id: I722e17fa7fb6ba91e2b2c44cd7524d974cbe4a56
(cherry picked from commit 9fe97e231b)
2017-03-28 13:19:03 -07:00
Makoto Onuki
c99ba3fb96 Merge "Add USE_FILESLIST_GO to switch to fileslist.go" am: d625ef2894 am: 0a069a74c2
am: 6a05fb3d33

Change-Id: I9d49341e4e9145151a728160944276b43f83d76e
2017-03-28 16:58:23 +00:00
Makoto Onuki
6a05fb3d33 Merge "Add USE_FILESLIST_GO to switch to fileslist.go" am: d625ef2894
am: 0a069a74c2

Change-Id: I69bbc553b35df6f06366a6a25794d848e82f7f71
2017-03-28 16:54:22 +00:00
Makoto Onuki
d625ef2894 Merge "Add USE_FILESLIST_GO to switch to fileslist.go" 2017-03-28 16:41:05 +00:00
Steve Muckle
5c06e9702a Merge "Fix modules.dep breakage with multiple module dependencies" am: 73461abd0c am: 9c0198e6e9
am: f54833b9d9

Change-Id: I23e179b3442365eaa5862fb2a1f08b3d9f600279
2017-03-28 01:30:58 +00:00
Steve Muckle
f54833b9d9 Merge "Fix modules.dep breakage with multiple module dependencies" am: 73461abd0c
am: 9c0198e6e9

Change-Id: I4e1ecf13d31bec16a4fe44358c1dd8def0203916
2017-03-28 01:26:57 +00:00
Treehugger Robot
73461abd0c Merge "Fix modules.dep breakage with multiple module dependencies" 2017-03-28 01:11:39 +00:00
Steve Muckle
b74e0b9b0d Fix modules.dep breakage with multiple module dependencies
If a module has multiple dependencies, the current regexp for making
the dependencies absolute paths only modifies the first dependency.

Test: build sailfish with module configuration including multiple
      dependencies
Change-Id: I8f2b40c8c5ec228aa8f831086bcdd561c8714910
2017-03-27 13:48:28 -07:00
Dan Willemsen
60ff056b6f Merge "Fix fileslist for system other image" am: b05fe25b9f
am: eb90e156e1

Change-Id: Iab1644dafeeae80254d5a0c0aeabc9bff6cfc1e2
2017-03-24 23:19:42 +00:00
Makoto Onuki
9fe97e231b Add USE_FILESLIST_GO to switch to fileslist.go
fileslist.go is still disabled by default.  To enable, use:
USE_FILESLIST_GO=true m -j

Bug: 36274890
Test: Manual, with m -j

Change-Id: I722e17fa7fb6ba91e2b2c44cd7524d974cbe4a56
2017-03-24 16:12:16 -07:00
Dan Willemsen
5c8542e1b4 Fix fileslist for system other image
This got lost from the previous backport, since systemotherimage wasn't
in AOSP yet.

(The Merged-In is a random Change-Id only on master so that this only
merges up to master)

Test: lunch aosp_marlin-eng; m -j systemotherimage
Change-Id: I92c05f27c92d877f3b83e5c5ae2e76728eb162bd
Merged-In: Iafed66e19bc114552b0261dd299379dbb37873c6
2017-03-24 21:26:21 +00:00
Jiyong Park
06241051e8 Make telephony work on generic system image
Bug: 36070427
Test: modem is up and emergency call can be made
Change-Id: Ic09200943a7ae7c51e420c6485f3b1b95c702265
2017-03-24 08:47:47 +00:00
Dan Willemsen
bf9edaafc0 Merge "Depend on (bs|img)diff for target-files-package" am: 90151623fc am: e9e4001b34
am: 29651c25fa

Change-Id: If1f601510b7a33936c73d371a676bbcc509089f7
2017-03-24 07:33:13 +00:00
Dan Willemsen
29651c25fa Merge "Depend on (bs|img)diff for target-files-package" am: 90151623fc
am: e9e4001b34

Change-Id: Icb85efa78c4649a7f849dc5274a5a69413468966
2017-03-24 07:31:40 +00:00
Dan Willemsen
d79a08f9fb Depend on (bs|img)diff for target-files-package
add_img_to_target_files may use these to create the recovery patch, so
add a dependency. They were previously a transitive dependency through
the system image to the standalone recovery patch creation.

Bug: 36575896
Test: rm out/host/linux-x86/bin/imgdiff; m -j target-files-package
Change-Id: I2a43220e94c09393e88e1d9950032f5665a0d2ce
2017-03-23 22:09:06 -07:00
Dan Willemsen
f33d764b33 Merge "Ensure /system/vendor symlink exists in target-files-package" am: ac8b2ab702 am: 5179e70cc3
am: d54ba0b9ff

Change-Id: Iab5a3288253edeed370e58296594faa3239b0196
2017-03-23 22:06:32 +00:00
Dan Willemsen
d54ba0b9ff Merge "Ensure /system/vendor symlink exists in target-files-package" am: ac8b2ab702
am: 5179e70cc3

Change-Id: I3e834d540c4b59c1499db2bd425cce2ef39ad986
2017-03-23 22:01:33 +00:00
Dan Willemsen
f75d7fa8ea Ensure /system/vendor symlink exists in target-files-package
This used to happen in the system image creation, but the target-files
didn't really depend on the system image, so I removed that dependency.
But then we weren't creating the symlink all the time.

This should be safe to run in parallel with the same link step in the
system creation.

Bug: 36540023
Test: m -j target-files-package, ensure vendor symlink is created
      without system.img.
Change-Id: I37059fa1ce759a0870dc4c65c5515050992245e2
2017-03-23 13:22:46 -07:00
Dan Willemsen
e272d9c64a Merge changes I84e4f878,I37b65eb9 am: bfc4f5e339 am: f4b5c3139c
am: 92fe48a888

Change-Id: I8a653a18a012117300df711e3a4fd9faa46d32c5
2017-03-23 02:25:51 +00:00
Dan Willemsen
92fe48a888 Merge changes I84e4f878,I37b65eb9 am: bfc4f5e339
am: f4b5c3139c

Change-Id: Ica893d7c29751a29174b43f585d7f4723e46992b
2017-03-23 02:23:21 +00:00
Treehugger Robot
bfc4f5e339 Merge changes I84e4f878,I37b65eb9
* changes:
  Parallelize system*.img and target-files-package
  Add missing dependencies of targets-files-package
2017-03-23 02:16:35 +00:00
Dan Willemsen
ea8f68ed6c Merge "Speed up non-AB ota_from_target_files in the build system" am: 47ba4239c8 am: 02e29c5b48
am: 62fb821faf

Change-Id: Idb3a0c991efe712865db7343861212a74ea56b0a
2017-03-22 02:26:50 +00:00
Dan Willemsen
62fb821faf Merge "Speed up non-AB ota_from_target_files in the build system" am: 47ba4239c8
am: 02e29c5b48

Change-Id: Ifeea7db10217543d49bdd1cf1e657287b313521a
2017-03-22 02:25:18 +00:00
Dan Willemsen
47ba4239c8 Merge "Speed up non-AB ota_from_target_files in the build system" 2017-03-22 01:41:39 +00:00
Dan Willemsen
aadd499bc3 Parallelize system*.img and target-files-package
We don't actually need to build the system image before
target-files-package, we just need to make sure everything is present in
$(PRODUCT_OUT)/system. So switch the dependencies around.

This can't be done as easily for the vendor image, since it may be a
prebuilt, or we may need to install some kernel modules into
$(PRODUCT_OUT)/vendor when building vendor.img. It tends to be smaller
anyway, so the time savings isn't as big.

Test: Make sure the build server outputs the same files
Test: Ensure target-files-package is identical before/after.
Change-Id: I84e4f878491ab2b71582f4f49418dbfbba75590f
2017-03-21 16:36:14 -07:00
Dan Willemsen
653bea928a Add missing dependencies of targets-files-package
And move simple cases of $(ACP) to cp. That does change OTA/bin/updater
from 0640 to 0700, but that's more consistent anyways.

Test: m -j target-files-package; ensure it's the same before/after.
Change-Id: I37b65eb9ddccd2f360aa007f929ece35c9e44f9b
2017-03-21 16:32:43 -07:00
Nan Zhang
2deac67a86 Merge "Fixed the issue that dirname: META got zipped twice." am: 8b6458e9a9 am: e22afd4998
am: b7ef9849c3

Change-Id: I6b824a1ae1eb66a98aafc8c0148b0b49006edd8a
2017-03-21 22:40:23 +00:00
Dan Willemsen
cea5cd210e Speed up non-AB ota_from_target_files in the build system
We've just created the target files package and still have the extracted
directory, so pass that to ota_from_target_files so that it doesn't have
to re-extract what we just compressed.

This saves a little bit of time -- for bullhead-userdebug on internal
master, this brings the time to build an OTA from ~340s -> ~310s. Much
of the time is still spent generating and signing the OTA.

Test: lunch bullhead-userdebug; m -j otapackage
Test: bullhead-ota-*.zip is identical before/after
Change-Id: Ib51cf6b02123e9c49280e9957c6590645470a52c
2017-03-21 15:34:27 -07:00
Nan Zhang
b7ef9849c3 Merge "Fixed the issue that dirname: META got zipped twice." am: 8b6458e9a9
am: e22afd4998

Change-Id: Ied0d73ed404185b26fa69605b81beccdd8bad6ab
2017-03-21 22:33:24 +00:00
Treehugger Robot
8b6458e9a9 Merge "Fixed the issue that dirname: META got zipped twice." 2017-03-21 22:15:19 +00:00
Nan Zhang
cabecd9c55 Fixed the issue that dirname: META got zipped twice.
When building target-files-package, dir: META has to be copied first
to help early validation of the .zip file.

In order to prevent $(zip_root)/META from getting copied twice to $@.list,
use the method (find -path -prune -o -print) instead of (grep pattern -v).

Test: m target-files-package
Bug: b/31676493
Change-Id: Id6b4d77fb62aa136253de88573cc51a575b90be2
2017-03-21 20:07:41 +00:00
Dan Willemsen
a471822a57 Merge "Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE" am: d69837deea am: 6acc699303
am: ac6291f639

Change-Id: I3687f90010d283326d1d3c2ac545fb39b5996a21
2017-03-21 06:16:51 +00:00
Dan Willemsen
ac6291f639 Merge "Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE" am: d69837deea
am: 6acc699303

Change-Id: I382bbf77b3068b9d70a9cc2619d585938ac6718b
2017-03-21 06:12:51 +00:00
Dan Willemsen
05a2b931e9 Add LOCAL_VENDOR_MODULE as a synonym to LOCAL_PROPRIETARY_MODULE
The vendor image will have more than just proprietary modules in it
under Treble, so let's stop marking open source code as proprietary just
to move it to vendor.

Bug: 36452052
Test: compare build-aosp_arm.ninja before/after, no changes.
Test: Try defining LOCAL_VENDOR_MODULE / LOCAL_PROPRIETARY_MODULE in the
same and different ways, ensure it works.
Change-Id: I0ab046bcb7563a20d44ed00667e18497ef0873a8
2017-03-20 20:57:04 -07:00
Alex Klyubin
4ed1bc98d1 Merge "Add /file_contexts.bin only to devices which need it" am: 77dab1ed35 am: 47b3e3d92e
am: 932def3aaa

Change-Id: Ib5a66afee6df3017c4ede1610729f66ac445b189
2017-03-14 14:56:55 +00:00
Alex Klyubin
932def3aaa Merge "Add /file_contexts.bin only to devices which need it" am: 77dab1ed35
am: 47b3e3d92e

Change-Id: I739ae1146cde7826b8afe67252b67ec5366c08f0
2017-03-14 14:52:23 +00:00
TreeHugger Robot
d32f2916f5 Merge "Use BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for system props split" 2017-03-14 00:40:13 +00:00
Alex Klyubin
092c9025a9 Add /file_contexts.bin only to devices which need it
/file_contexts.bin is needed only by devices which do not have
PRODUCT_FULL_TREBLE set to true. Adding this file to devices which
have PRODUCT_FULL_TREBLE set to true causes confusion and wastes
about 800 kB of space.

/file_contexts.bin was being added unconditionally to all devices due
to the build system needing the combined file_contexts file for
host-side labelling of filesystems in images and for inclusion into
target files ZIP (again, to be used for host-side labelling later).

This change switches these targets to depend on the same file, but
from intermediates directory. As a result, everything continues to
work just fine, but without pulling in /file_contexts.bin. On devices
which need /file_contexts.bin, it is pulled in by
system/core/init/Android.mk.

Test: /file_contexts.bin still there on bullhead, but not there on
      sailfish with PRODUCT_FULL_TREBLE set to true.
Test: Clean build, device boots up with, no new denials.
      Reboot to recovery, recovery boots up fine too, no denials.
      This was tested on sailfish-eng and marlin-eng.
Bug: 36002414

Change-Id: I9bbbb08bbf7d874bba0bafcc19bcbf9eec564326
2017-03-13 13:28:34 -07:00
Alex Klyubin
bd6c1e0a7e Merge "Explicitly depend on sepolicy artifacts in recovery targets" am: cc6e84223b am: 05796fe8b3
am: 28fe90f09e

Change-Id: I5112be28a22f2e544d6b71629f29c0ad27d356a0
2017-03-13 18:33:43 +00:00
Alex Klyubin
28fe90f09e Merge "Explicitly depend on sepolicy artifacts in recovery targets" am: cc6e84223b
am: 05796fe8b3

Change-Id: Ic64fea6fe5c50c6b645544f5ebd903e287f7033d
2017-03-13 18:29:12 +00:00
Alex Klyubin
2a7171a71a Explicitly depend on sepolicy artifacts in recovery targets
This makes recoveryimage/bootimage targets explicitly depend on SELinux
policy artifacts needed by recovery. Prior to this change, the
dependency was contrived: these targets would rely on copying these
files from "root" directory, and then overwriting sepolicy file with
sepolicy.recovery.

Test: Clean build, flash, device boots up just fine. No new denials.
      Reboot into recovery, recovery boot up just fine, no denials.
      This was tested on bullhead (non A/B device) and sailfish (A/B
      device).
Bug: 33642277
Change-Id: Id2369253d0c7e02e079ae01ac7140b41880fd5ad
2017-03-13 08:43:02 -07:00
Tao Bao
86839ca639 Merge "releasetools: Drop the support for BBOTA v1 and v2." am: c3e3406125 am: a592924505
am: 03c64e425c

Change-Id: I634bc6d8cbfa4940b1d107248810e50beb8a9390
2017-03-10 19:39:19 +00:00
Tao Bao
03c64e425c Merge "releasetools: Drop the support for BBOTA v1 and v2." am: c3e3406125
am: a592924505

Change-Id: I3deb77262a7768d537711703e57892b2812d1e5d
2017-03-10 19:35:47 +00:00
Tao Bao
85bfe4ac8c Merge "releasetools: Remove dead functions in EdifyGenerator." am: c87b38f547 am: debedc3343
am: dc880f5122

Change-Id: I23189ca7272094c65dd3d8aa7ed28ad8b5a2606d
2017-03-09 20:36:48 +00:00
Tao Bao
dc880f5122 Merge "releasetools: Remove dead functions in EdifyGenerator." am: c87b38f547
am: debedc3343

Change-Id: I4a335ba2babcf30ff6f8549bc0c7f38cab17ec0c
2017-03-09 20:34:44 +00:00
Tao Bao
8fad03e771 releasetools: Drop the support for BBOTA v1 and v2.
BBOTA v1 and v2 (introduced in L and L MR1 respectively) don't support
resumable OTA. We shouldn't generate packages using v1/v2 at the risk of
bricking devices.

BBOTA v3 (since M) and v4 (since N) both support resumable OTAs. BBOTA
v4 additionally supports using FEC to possibly recover a corrupted
image.

Bug: 33694730
Test: Generate full and incremental OTAs w/ and w/o the CL. They should
      give identical packages (in v4).
Change-Id: Ib89d9cd63ba08e8e9aa4131bed18876b89d244c0
2017-03-09 12:25:46 -08:00
Tao Bao
f388104eaa releasetools: Remove dead functions in EdifyGenerator.
Remove the following functions that are needed for file-based OTAs only:
 - SetPermissions()
 - SetPermissionsRecursive()
 - MakeSymlinks()
 - DeleteFiles()
 - DeleteFilesIfNotMatching()
 - RenameFiles()
 - SkipNextActionIfTargetExists()

Bug: 35853185
Test: Verified there's no reference to these functions.
Change-Id: Iff24a9d705476211effaef28eed2a147fa5fcbce
2017-03-08 16:37:07 -08:00
Dan Willemsen
266b2c2f55 Merge changes Ia5ce6870,I155654cd am: c619f99e2f am: 6ffe13f8e7
am: 53d64224ab

Change-Id: Id25a30a8616d50a661fdd978e68e485e6ed81633
2017-03-08 20:57:48 +00:00
Dan Willemsen
53d64224ab Merge changes Ia5ce6870,I155654cd am: c619f99e2f
am: 6ffe13f8e7

Change-Id: Ie5f114fb34e95c189936d73472f502c82c292a9f
2017-03-08 20:54:48 +00:00
Dan Willemsen
c619f99e2f Merge changes Ia5ce6870,I155654cd
* changes:
  Zip after add_img_to_target_files
  Allow add_img_to_target_files to work on a directory
2017-03-08 20:45:56 +00:00
Sen Jiang
a142eae939 Merge "Put system_version in target_files.zip" am: 3838ae7e9b am: 75a7a591ba
am: f1f1266fb1

Change-Id: Ib01d1fa4ed6f082fa115f3a0df8f160bb0499e8b
2017-03-08 03:30:42 +00:00
Sen Jiang
f1f1266fb1 Merge "Put system_version in target_files.zip" am: 3838ae7e9b
am: 75a7a591ba

Change-Id: I24c3d03dd9c30ec67dc7f9231da392f811650b20
2017-03-08 03:28:11 +00:00
Sen Jiang
9b8e4ca518 Put system_version in target_files.zip
Bug: 35364984
Test: m dist
Change-Id: I309acb41eb85de239c4c1718e14d9442ca1b0408
(cherry picked from commit cea4d52d2fee19281e660943129e1ad3bdc51fef)
2017-03-07 17:40:27 -08:00
Dan Willemsen
2a5a34f6bd Zip after add_img_to_target_files
For aosp_marlin (on AOSP), this speeds up target files creation from
~57 seconds to ~15 seconds.

For marlin-userdebug (on internal master), this speeds up target files
creation from ~300 seconds to ~95 seconds.

This does make some minor changes to the resulting target_files zip:

* All of the META files are actually at the beginning of the zip now,
  previously the ones created by add_img_to_target_files would be at
  the end.
* The images are slightly larger. Go's zip implementation in soong_zip
  isn't quite as good as the `zip` tool.
* vendor_filesystem_config.txt isn't present if we're not building a
  vendor image.

Test: aosp_marlin target_files zip changes look reasonable
Test: marlin target_files zip changes look reasonable
Test: bullhead target_files zip changes look reasonable
Change-Id: Ia5ce6870b85559d65107c3b94332391b4b43a0ea
2017-03-07 15:28:42 -08:00
Steven Moreland
a971398525 Merge "Add vnod." am: 2b33e46593 am: 0e1913f4ff
am: f2d838a52e

Change-Id: I0770f7552d1fa9578824d1bb342e8021b3bb089f
2017-03-07 22:08:49 +00:00
Steven Moreland
f2d838a52e Merge "Add vnod." am: 2b33e46593
am: 0e1913f4ff

Change-Id: Ibea28328b1267cbcf7a326ace2c448f8a2b6b792
2017-03-07 22:01:49 +00:00
Steven Moreland
a2e734d786 Add vnod.
Short name for vendorimage-nodeps like snod.

Bug: 33356516
Test: works
Change-Id: Iad62aa5a021d603fa9cebe90f4e28cf09d5d49ae
2017-03-07 12:17:51 -08:00
Howard Chen
246e093ba8 Merge "Support kernel modules in vendor, recovery images" am: 2f6c2b44d0
am: 8fafc4a830

Change-Id: I9f76060dc6465ee6d111214a534b45ebc8aa2e4e
2017-03-04 03:44:36 +00:00
Treehugger Robot
2f6c2b44d0 Merge "Support kernel modules in vendor, recovery images" 2017-03-04 03:35:00 +00:00
Howard Chen
adbb9c30d1 Support kernel modules in vendor, recovery images
Support BOARD_VENDOR_KERNEL_MODULES which accepts a list of the
kernel module binaries. Binaries listed there are copied to
$(TARGET_OUT_VENDOR)/lib/modules and 'depmod' is executed to generate
the dependencies. BOARD_RECOVERY_KERNEL_MODULES is similarly
implemented to provide a way to specify kernel modules to be copied
to the recovery image.

Bug: 33305644
Test: android master build on marlin and load dummy modules
Merged-In: I0a58a270dbb0d2d38fd089f4abff66e62e14fac1
Change-Id: Ia5f429508ca3d7c77448358e42af6efa98fa8624
2017-03-03 18:35:30 -08:00
Alex Deymo
c9059c9ee9 Merge "Update product_id and product_version location." am: a57a2fd118 am: 4afbddcdf7
am: 5393f580b6

Change-Id: I89eac0d0d76baaebf5a43c2486321bbf666e0805
2017-03-04 01:56:57 +00:00
Alex Deymo
5393f580b6 Merge "Update product_id and product_version location." am: a57a2fd118
am: 4afbddcdf7

Change-Id: I9e9ce4046d7641df3e84d948ce9bc638f45bf8d8
2017-03-04 01:53:58 +00:00
Howard Chen
1756f8d69a Support kernel modules in vendor, recovery images
Support BOARD_VENDOR_KERNEL_MODULES which accepts a list of the
kernel module binaries. Binaries listed there are copied to
$(TARGET_OUT_VENDOR)/lib/modules and 'depmod' is executed to generate
the dependencies. BOARD_RECOVERY_KERNEL_MODULES is similarly
implemented to provide a way to specify kernel modules to be copied
to the recovery image.

Bug: 33305644
Test: android master build on marlin and load dummy modules
Change-Id: I0a58a270dbb0d2d38fd089f4abff66e62e14fac1
2017-03-03 14:40:04 -08:00
Alex Deymo
b4309d4f54 Update product_id and product_version location.
These files are used by the update console to determine the product
associated with a given target_files.zip.

Bug: 35804180
Bug: 33211225
Test: `make dist` generates a target_files.zip with these files.
Change-Id: I6066da07d76749ae64c26d5f661c7a6d06f3fb3d
2017-03-03 17:32:42 +00:00
Jaekyun Seok
fbc07f95fd Use BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for system props split
System props split should be controlled regardless of kernel config
because generic AOSP system image should not include any overrides
but it will be built without kernal.

Additionally we don't have any usecase only to split system build
properties, so we don't need to have two different flags for default
and build properties.

Test: building succeeded and tested with sailfish
Bug: 34116668
Change-Id: I24e909c533da509583a7e8be01f329f52d3820fc
2017-03-03 14:00:16 +09:00
TreeHugger Robot
880d4c8050 Merge "Split board-specific system properties into vendor partition" 2017-02-28 00:43:09 +00:00
Jaekyun Seok
4e3fcca9fd Split board-specific system properties into vendor partition
Test: building succeeded and tested on sailfish-userdebug
Bug: 35696968
Change-Id: Ia1e8013411da36583fbf0d2115c54ca5d5980e20
2017-02-27 13:35:37 +09:00
Tao Bao
13588392f9 Make the packaging of VBOOT_SIGNER tools conditional. am: 5e04c38bbd am: 36846f0b53 am: 9084561e77 am: aaadc6dddf am: 00fe184be3
am: 4df32cb42a

Change-Id: Icd6d3a329f7f20ff5a0b412c3b3999823fb2268c
2017-02-27 01:01:49 +00:00
Tao Bao
d31024a9c4 Revert "Revert "Build FUTILITY tool from futility-host."" am: 69ad150dd3 am: 56e0166eb8 am: 98eb433d99 am: e5609912f0 am: c0f5628788
am: 22bc9fddd2

Change-Id: If0976e308f8c27329f7eb390b46af817137b87eb
2017-02-27 01:01:35 +00:00
Tao Bao
4df32cb42a Make the packaging of VBOOT_SIGNER tools conditional. am: 5e04c38bbd am: 36846f0b53 am: 9084561e77 am: aaadc6dddf
am: 00fe184be3

Change-Id: I4363ed76a8a65892f0ca91af1aea43effac17a9b
2017-02-27 00:58:49 +00:00
Tao Bao
22bc9fddd2 Revert "Revert "Build FUTILITY tool from futility-host."" am: 69ad150dd3 am: 56e0166eb8 am: 98eb433d99 am: e5609912f0
am: c0f5628788

Change-Id: If9ddc04ca702facd86a49cd994fb98aebbde9a7b
2017-02-27 00:58:34 +00:00
Tao Bao
00fe184be3 Make the packaging of VBOOT_SIGNER tools conditional. am: 5e04c38bbd am: 36846f0b53 am: 9084561e77
am: aaadc6dddf

Change-Id: I3ab3a1bb9a79f863df47ab983f8b78464e5db824
2017-02-27 00:54:46 +00:00
Tao Bao
c0f5628788 Revert "Revert "Build FUTILITY tool from futility-host."" am: 69ad150dd3 am: 56e0166eb8 am: 98eb433d99
am: e5609912f0

Change-Id: Ib84b7a4d646c3623f35be52c188fd72ef26c0e8c
2017-02-27 00:54:33 +00:00
Tao Bao
aaadc6dddf Make the packaging of VBOOT_SIGNER tools conditional. am: 5e04c38bbd am: 36846f0b53
am: 9084561e77

Change-Id: Ic69e7510478741af9c8d9c7de89d038ce854eb88
2017-02-27 00:51:44 +00:00
Tao Bao
e5609912f0 Revert "Revert "Build FUTILITY tool from futility-host."" am: 69ad150dd3 am: 56e0166eb8
am: 98eb433d99

Change-Id: I46ba148c7fbc07ab54d156c6f89397190f740203
2017-02-27 00:51:32 +00:00
Tao Bao
9084561e77 Make the packaging of VBOOT_SIGNER tools conditional. am: 5e04c38bbd
am: 36846f0b53

Change-Id: I94e95a75c212ca062ffd6ff76e45f72f0a1ade9c
2017-02-27 00:48:14 +00:00
Tao Bao
98eb433d99 Revert "Revert "Build FUTILITY tool from futility-host."" am: 69ad150dd3
am: 56e0166eb8

Change-Id: If27ca67f70d7d4f9d50a9abd8687fc2734a2c882
2017-02-27 00:48:03 +00:00
Tao Bao
36846f0b53 Make the packaging of VBOOT_SIGNER tools conditional.
am: 5e04c38bbd

Change-Id: Ia22cfef3581e1ea5a2479fb01fb9e5ef000f5220
2017-02-27 00:44:43 +00:00
Tao Bao
56e0166eb8 Revert "Revert "Build FUTILITY tool from futility-host.""
am: 69ad150dd3

Change-Id: I380512827cde6d522ea2994cecf8045f66d242b9
2017-02-27 00:44:32 +00:00
Tao Bao
0873d8c71a Makefile: Add the missing dependency on FUTILITY. am: 1c4c8c4532 am: b9c4a17cf6 am: 6ea25dfd92
am: 84ec323c9b

Change-Id: I0aeb6692a0efdea595939106e65ada0d93f425a7
2017-02-26 18:54:42 +00:00
Tao Bao
84ec323c9b Makefile: Add the missing dependency on FUTILITY. am: 1c4c8c4532 am: b9c4a17cf6
am: 6ea25dfd92

Change-Id: I97b524989ab24fae5ecf97c13c58e338062ce936
2017-02-26 18:51:10 +00:00
Tao Bao
6ea25dfd92 Makefile: Add the missing dependency on FUTILITY. am: 1c4c8c4532
am: b9c4a17cf6

Change-Id: I040d079e7d63c621cd18cb738fe1724b81274a26
2017-02-26 18:47:41 +00:00
Tao Bao
b9c4a17cf6 Makefile: Add the missing dependency on FUTILITY.
am: 1c4c8c4532

Change-Id: I91adb6798764a78cba2e21072aea29dee532f157
2017-02-26 18:44:09 +00:00
Tao Bao
5e04c38bbd Make the packaging of VBOOT_SIGNER tools conditional.
Otherwise it may fail the targets that don't have
external/vboot_reference in the manifest.

Bug: 35467608
Test: lunch aosp_dragon-userdebug; m otatools-package
Test: lunch aosp_bullhead-userdebug; m otatools-package
Change-Id: I35700a4d7d0723992badcfb4a03be85d07a4b9a9
(cherry picked from commit d2aed4309a)
2017-02-25 09:23:43 -08:00
Tao Bao
69ad150dd3 Revert "Revert "Build FUTILITY tool from futility-host.""
This reverts commit b9186f2b52.

The cause of the earlier breakage has been identified and fixed by
commit 4b577413ff.

Bug: 35467608
Test: lunch ryu-userdebug; m otatools-package
Change-Id: I0ca329a3844b7d5d74443f7495b363e0f1c1c391
(cherry picked from commit 9b524ef60d)
2017-02-25 08:38:30 -08:00
Tao Bao
1c4c8c4532 Makefile: Add the missing dependency on FUTILITY.
Bug: 35467608
Test: lunch aosp_dragon-userdebug; m dist
Change-Id: If3824ac22926f3c3cc09d5b82cb0f6da4132f937
(cherry picked from commit 4b577413ff)
2017-02-25 08:32:48 -08:00
Tao Bao
53e0ce75e9 Merge "Fix the bad merge of conditionally packaging VBOOT_SIGNER tools CL." 2017-02-24 23:33:47 +00:00
Josh Gao
5794e3baac Merge "Statically link libwinpthread into windows binaries." am: 61d68b6152 am: aa19e7a2bb
am: f1ed0fb048

Change-Id: Ia1cb660fb8fee069884d4c42ded3a9ec1b002684
2017-02-24 21:14:27 +00:00
Josh Gao
f1ed0fb048 Merge "Statically link libwinpthread into windows binaries." am: 61d68b6152
am: aa19e7a2bb

Change-Id: I1f6ae14785d66e621ec8c07cc312655713e58436
2017-02-24 21:11:25 +00:00
Josh Gao
61d68b6152 Merge "Statically link libwinpthread into windows binaries." 2017-02-24 21:02:25 +00:00
Tao Bao
f52bdd758b Fix the bad merge of conditionally packaging VBOOT_SIGNER tools CL.
Commit d2aed4309a didn't get merged
correctly when flowing from AOSP into internal. It only added the new
lines but without deleting the old lines (due to an inconsistent revert
in internal branch).

Bug: 35467608
Test: lunch bullhead-userdebug; m otatools-package; verify the generated
      otatools.zip doesn't include VBOOT_SIGNER stuff.
Change-Id: I49064bb7beb1215543037cf94712d03b0c2537b2
2017-02-24 12:44:02 -08:00
Tao Bao
ee4ab96b00 resolve merge conflicts of e44f4e439d to nyc-mr2-dev-plus-aosp
am: 82b7b27d15

Change-Id: I00115a35f6d686b910e007c600edd1b6074fc1cc
2017-02-24 18:01:39 +00:00
Tao Bao
82b7b27d15 resolve merge conflicts of e44f4e439d to nyc-mr2-dev-plus-aosp
Change-Id: I6ef514b7338c589b5913d002e4608998d2cd738e
2017-02-24 09:55:17 -08:00
Josh Gao
4d9268e704 Statically link libwinpthread into windows binaries.
Statically link libwinpthread.a, so that we don't have to ship a
libwinpthread dll with all of our windows exectuables.

Bug: http://b/31665213
Test: wine adb.exe
Test: wine fastboot.exe
Change-Id: I96414e980d8894f8f6a58c1c7bbd9dc5e0f5169c
2017-02-23 17:56:44 -08:00
Tao Bao
d2aed4309a Make the packaging of VBOOT_SIGNER tools conditional.
Otherwise it may fail the targets that don't have
external/vboot_reference in the manifest.

Bug: 35467608
Test: lunch aosp_dragon-userdebug; m otatools-package
Test: lunch aosp_bullhead-userdebug; m otatools-package
Change-Id: I35700a4d7d0723992badcfb4a03be85d07a4b9a9
2017-02-23 14:32:44 -08:00
Tao Bao
9b524ef60d Revert "Revert "Build FUTILITY tool from futility-host.""
This reverts commit b9186f2b52.

The cause of the earlier breakage has been identified and fixed by
commit 4b577413ff.

Bug: 35467608
Test: lunch ryu-userdebug; m otatools-package
Change-Id: I0ca329a3844b7d5d74443f7495b363e0f1c1c391
2017-02-23 11:06:22 -08:00
Tao Bao
e433236bc3 Merge "Makefile: Add the missing dependency on FUTILITY." am: 4e429cccd6 am: 3dec68ea3f
am: a43edadb87

Change-Id: I2b33a8f7aa0c16a672db58ea98ce6e8beacea598
2017-02-23 18:56:40 +00:00
Tao Bao
a43edadb87 Merge "Makefile: Add the missing dependency on FUTILITY." am: 4e429cccd6
am: 3dec68ea3f

Change-Id: Ibc874c67971fa6cf7fba9cf6a4fde4c3f805dc1b
2017-02-23 18:54:45 +00:00
Tao Bao
4b577413ff Makefile: Add the missing dependency on FUTILITY.
Bug: 35467608
Test: lunch aosp_dragon-userdebug; m dist
Change-Id: If3824ac22926f3c3cc09d5b82cb0f6da4132f937
2017-02-22 22:54:49 -08:00
Colin Cross
78cb9787b9 Merge "Use ifndef or ifeq () instead of ifeq """ am: 1948f64dd5 am: f78a2f821c
am: 901057d95a

Change-Id: I4f641ce791d64c7fe78e9938462820e7cd3be419
2017-02-22 04:36:00 +00:00