Commit Graph

1477 Commits

Author SHA1 Message Date
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
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
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
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