Commit Graph

771 Commits

Author SHA1 Message Date
Tao Bao 41e5c4e065 releasetools: Use fixed timestamp in otacerts.zip.
am: 7ee3a96

* commit '7ee3a9678e7191c48f0ba4e04792fe97925c1aa1':
  releasetools: Use fixed timestamp in otacerts.zip.

Change-Id: I9e8260491819e00eea6f4eb55b1722ae1670ae85
2016-04-12 15:44:31 +00:00
Tao Bao 7ee3a9678e releasetools: Use fixed timestamp in otacerts.zip.
We were using zipfile.write() to write system/etc/security/otacerts.zip
when signing for release. It led to unexpected timestamp change in the
generated otacerts.zip and non-idempotent signed images when signing the
same target_files.zip.

Replace with common.ZipWrite() to always use a fixed timestamp.

Bug: 28122968
Change-Id: Ia6cf4b7d380cbf72ed7050ebb60c932dc8826d87
2016-04-11 23:10:00 -07:00
Mohamad Ayyash 230ef583b0 Merge "Use fs_config files for mksquashfs" into nyc-dev
am: b354a61

* commit 'b354a61f3ec3b4c6463aac2a80f23e5772b6b164':
  Use fs_config files for mksquashfs

Change-Id: I422bd6f5b8e7e587bec3caef1525497904268a96
2016-04-08 17:52:24 +00:00
Mohamad Ayyash 8837882fb9 Use fs_config files for mksquashfs
BUG: 27467028
Change-Id: I7648030ad4b31d70a5d439e9552fd2cbfe288b74
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-07 22:10:51 -07:00
Ying Wang be667a1128 Merge "Correct usage message for build_image.py" am: d63ec28
am: 334a418

* commit '334a4185a5ca29086963a8d450fb7a9e972cbd77':
  Correct usage message for build_image.py

Change-Id: Iee000ee9974b4cb7329fab87dc81fdba2affe93d
2016-04-07 22:24:15 +00:00
Ying Wang d63ec28bcf Merge "Correct usage message for build_image.py" 2016-04-07 21:51:21 +00:00
Maria Bornski 885dbb5111 Correct usage message for build_image.py
target_out_dir is now a required argument. Include this in the usage message.

Change-Id: If77d94ec5350b2c737d1dd1df28a51167b173058
2016-04-06 17:26:31 -07:00
Tao Bao 40361b2787 Merge "rangelib.py: Add parse_raw() method."
am: 973ce2f

* commit '973ce2f018a30b9bf1c282b48990e271b11dcb6a':
  rangelib.py: Add parse_raw() method.
2016-03-25 20:06:51 +00:00
Tao Bao 8179d68458 rangelib.py: Add parse_raw() method.
parse_raw() parses a string generated by RangeSet.to_string_raw().

>>> RangeSet.parse_raw(RangeSet("0-9").to_string_raw())
<RangeSet("0-9")>

Change-Id: Ia74daa30476d5e9ad73c368f4ecc64c755b734a5
2016-03-24 11:08:51 -07:00
David Zeuthen 1b61e038e6 Merge "Add support for Brillo Verified Boot."
am: 003bec4

* commit '003bec431cc133134bbb29040f6c01d3f608e6ee':
  Add support for Brillo Verified Boot.
2016-03-21 15:55:23 +00:00
David Zeuthen d995f4b04d Add support for Brillo Verified Boot.
The following variables are introduced

 BOARD_BVB_ENABLE: can be set to true to build boot.img and system.img
 files compatible with Brillo Verfied Boot.

 BOARD_BVB_ROLLBACK_INDEX: can be set to an integer to use for the
 rollback index.

 BOARD_BVB_KEY_PATH, BOARD_BVB_ALGORITHM: If set, the former must be a
 path to the private key used to sign the boot image and the latter must
 be the algorithm to use. If unset, a test-key stored in the tree will
 be used.

 BOARD_BVB_MAKE_BOOT_IMAGE_ARGS: Extra options to pass to 'bvbtool
 make_boot_image'.

 BOARD_BVB_SIGN_BOOT_IMAGE_ARGS: Extra options to pass to 'bvbtool
 sign_boot_image'.

 BOARD_BVB_ADD_IMAGE_HASHES_ARGS: Extra options to pass to 'bvbtool
 add_image_hashes'.

 BOARD_CUSTOM_BVBTOOL: Can be set to specify what bvbtool program to
 use.

The existing BOARD_KERNEL_CMDLINE variable is also used, as are existing
kernel and initrd-related variables. Therefore, simply adding

 BOARD_BVB_ENABLE := true

to an existing Makefile should do the trick.

Bug: 26185038
TEST=Added 'BOARD_BVB_ENABLE := true' to hardware/bsp/intel/soc/edison/soc.mk
  and built an image and then ran bvbtool's info_boot_image and
  info_image_hashes commands on the resulting boot.img and system.img
  files and verified that the information was correct. Also ran 'm dist'
  and verified that the boot.img and system.img files in the resulting
  target_files.zip file had similar information.

Change-Id: I08045ed8b0cbddc7c3acdd3a6f2c4bb75cb44bbc
2016-03-18 15:25:43 -04:00
Tao Bao 384dbd939c Merge "Revert "Revert "releasetools: Support OTAs that have OEM properties changes."""
am: fd52990

* commit 'fd529902f8731b028fac38b0c31a2c6d170c2726':
  Revert "Revert "releasetools: Support OTAs that have OEM properties changes.""
2016-03-16 19:21:49 +00:00
Tao Bao 3e30d97dde Revert "Revert "releasetools: Support OTAs that have OEM properties changes.""
This CL fixes the bug in [1] (copy-paste error) and reenables it.

We need to handle a special case that an OTA goes from a source build
without OEM properties to a target build with those properties (or vice
versa). Add support in OTA scripts to deal the case properly, by a)
using two oem_props variables to handle source and target builds
respectively; b) adjusting the fingerprint/thumbprint assertions to
allow a mix of both.

[1] commit c086370440

Change-Id: I98118d77d5a0ff694fa1ee33602b5ee5e048599b
2016-03-15 13:28:49 -07:00
Tao Bao a1dc633a7f Merge "Revert "releasetools: Support OTAs that have OEM properties changes.""
am: 3c37889299

* commit '3c37889299b7ab8df676fed7b8157484a7e5315a':
  Revert "releasetools: Support OTAs that have OEM properties changes."
2016-03-15 19:24:21 +00:00
Tao Bao 3c37889299 Merge "Revert "releasetools: Support OTAs that have OEM properties changes."" 2016-03-15 19:16:33 +00:00
Tao Bao 838c68fa1a Revert "releasetools: Support OTAs that have OEM properties changes."
Broke some builds.

This reverts commit c086370440.

Change-Id: If07006db412fea6c04f8698776a2ab418125a469
2016-03-15 19:16:18 +00:00
Tao Bao 122f8823be Merge "releasetools: Support OTAs that have OEM properties changes."
am: 61cebe79f4

* commit '61cebe79f4949217181431fb347b7577d74ecc75':
  releasetools: Support OTAs that have OEM properties changes.
2016-03-15 18:43:03 +00:00
Tao Bao 61cebe79f4 Merge "releasetools: Support OTAs that have OEM properties changes." 2016-03-15 18:33:20 +00:00
Sami Tolvanen a8c37be285 Revert "Revert "build: pass version and patch level to mkbootimg""
This reverts commit 494a9090f9.

Bug: 27498078
Bug: 22914603
Change-Id: Iee6a784271ec32c6bfcc0a6ad3f0395d82016df3
(cherry picked from commit 3303d909a1)
2016-03-15 11:23:56 -07:00
Sami Tolvanen 4abe19c584 Merge "Revert "Revert "build: pass version and patch level to mkbootimg"""
am: b1e99acb00

* commit 'b1e99acb00818c0dc244a4203106177eb28ca66b':
  Revert "Revert "build: pass version and patch level to mkbootimg""
2016-03-15 17:47:08 +00:00
Sami Tolvanen b1e99acb00 Merge "Revert "Revert "build: pass version and patch level to mkbootimg""" 2016-03-15 17:37:27 +00:00
Sami Tolvanen 3303d909a1 Revert "Revert "build: pass version and patch level to mkbootimg""
This reverts commit 494a9090f9.

Bug: 27498078
Bug: 22914603
Change-Id: Iee6a784271ec32c6bfcc0a6ad3f0395d82016df3
2016-03-15 16:49:30 +00:00
Sami Tolvanen b3038bedcd Merge "Revert "build: pass version and patch level to mkbootimg"" into nyc-dev 2016-03-14 15:49:15 +00:00
Sami Tolvanen 1bca9fb6d4 Revert "build: pass version and patch level to mkbootimg"
This reverts commit e555f77962.

Bug: 27580174
Change-Id: I0fd1ddb64d2fd4f91b0ecbc1ab8953a1324a10eb
2016-03-14 15:47:11 +00:00
Sami Tolvanen 478eb605b7 Merge "Revert "build: pass version and patch level to mkbootimg""
am: 926096eff6

* commit '926096eff685265912f3050bb43715cfa36df0aa':
  Revert "build: pass version and patch level to mkbootimg"
2016-03-11 00:24:23 +00:00
Sami Tolvanen 926096eff6 Merge "Revert "build: pass version and patch level to mkbootimg"" 2016-03-11 00:11:25 +00:00
Sami Tolvanen 494a9090f9 Revert "build: pass version and patch level to mkbootimg"
This reverts commit 8fb47f191f.

Bug: 27580174
Change-Id: Id87fd1e8da217438757d5a0fa4bbef7aea6770fc
2016-03-11 00:08:57 +00:00
Mohamad Ayyash 2b4ddff0eb Merge "Hook incremental ext4 image generation into build" into nyc-dev
am: 6a3185f23d

* commit '6a3185f23d820f31cc928d5467eda94f3a93e31c':
  Hook incremental ext4 image generation into build
2016-03-09 21:07:30 +00:00
Mohamad Ayyash 6a3185f23d Merge "Hook incremental ext4 image generation into build" into nyc-dev 2016-03-09 20:56:19 +00:00
Tao Bao 00ed831a11 resolve merge conflicts of 2ad8b97577 to nyc-dev
Change-Id: Ifa7501e58dd25e73ed760b1383a1873e4d449885
2016-03-08 21:39:13 -08:00
Tao Bao 7302eb7dd6 Use the update-binary in the source build for downgrade OTAs.
am: fa41fb2705

* commit 'fa41fb27054185b3fba0519d01dabd21444fe772':
  Use the update-binary in the source build for downgrade OTAs.
2016-03-09 05:27:36 +00:00
Tao Bao e6caa33438 Merge "Use the update-binary in the source build for downgrade OTAs."
am: 6be54d774b

* commit '6be54d774ba13c79e96b12b797e95bd5bdba0344':
  Use the update-binary in the source build for downgrade OTAs.
2016-03-09 03:32:44 +00:00
Tao Bao ff75c23086 releasetools: Fix the bug in AssertSequenceGood.
We use a bitset for blocks in the target image to assert a block hasn't
been touched before reading. Skip checking the blocks that are in the
source image only.

Bug: 27556903
Change-Id: I3a77292da673c813bd20d8dc177ff36419d8ecae
(cherry picked from commit dca2200c8a)
2016-03-08 19:01:26 -08:00
Tao Bao fa41fb2705 Use the update-binary in the source build for downgrade OTAs.
We used to use the update-binary from the target build when creating
incremental OTAs. But for downgrade OTAs, we should use the one in the
source build instead, which is actually newer.

Bug: 27556903
Change-Id: Ib6415729b979dbffdebdda24902f7f560942801a
(cherry picked from commit 4996cf03d2)
2016-03-08 18:48:40 -08:00
Tao Bao 4996cf03d2 Use the update-binary in the source build for downgrade OTAs.
We used to use the update-binary from the target build when creating
incremental OTAs. But for downgrade OTAs, we should use the one in the
source build instead, which is actually newer.

Bug: 27556903
Change-Id: Ib6415729b979dbffdebdda24902f7f560942801a
2016-03-08 17:57:40 -08:00
Sami Tolvanen e555f77962 build: pass version and patch level to mkbootimg
Add --os_version and --os_patch_level arguments to mkbootimg.

Needs matching changes from
  I57682611e0c27fec5ed284da7d9a788383ff98b1

Bug: 27498078
Bug: 22914603
Change-Id: I04e20b0de40d864aac92ac7bcf466a6cbde3d0e4
(cherry pick from commit 8fb47f191f)
2016-03-08 08:21:52 -08:00
Sami Tolvanen 01347fce66 Merge "build: pass version and patch level to mkbootimg" am: b32d845090
am: 450f15111c

* commit '450f15111ccd9fa54382e159a145954273f45b15':
  build: pass version and patch level to mkbootimg
2016-03-08 16:10:23 +00:00
Sami Tolvanen b32d845090 Merge "build: pass version and patch level to mkbootimg" 2016-03-08 16:02:24 +00:00
Tao Bao ae6864933d Merge "releasetools: Fix the bug in AssertSequenceGood." am: 236e664efa
am: cc9c8ce966

* commit 'cc9c8ce96639e0e7c100744703733ff3bb5c75ce':
  releasetools: Fix the bug in AssertSequenceGood.
2016-03-08 07:45:37 +00:00
Tao Bao 84bc4b78cc resolve merge conflicts of 08a3a32fa9 to nyc-dev
Change-Id: I6fd55b3d2bd0c396018163dd4f54970cb55432cd
2016-03-07 21:49:33 -08:00
Tao Bao bd25fcdc02 resolve merge conflicts of 177c610e7f to cw-e-dev
Change-Id: Iba7820247d0b53d7f9553290eb0db3547f31beda
2016-03-07 21:24:40 -08:00
Tao Bao 177c610e7f DO NOT MERGE releasetools: Support generating downgrade incremental OTAs.
Add --downgrade flag to ota_from_target_files.py script. It allows
generating an incremental OTA that updates from a newer build to an
older one (based on timestamp comparison). "post-timestamp" line in the
metadata file will be replaced by "ota-downgrade=yes". A data wipe will
always be enforced, so "ota-wipe=yes" will also be included in the
metadata file.

Bug: 26883782
Change-Id: Iaa05f662d948b7ab632a9fbb7051cc3f8bf68c21
(cherry picked from commit 5d1825664a)
2016-03-07 21:02:36 -08:00
Tao Bao c086370440 releasetools: Support OTAs that have OEM properties changes.
We need to handle a special case that an OTA goes from a source build
without OEM properties to a target build with those properties (or vice
versa). Add support in OTA scripts to deal the case properly, by a)
using two oem_props variables to handle source and target builds
respectively; b) adjusting the fingerprint/thumbprint assertions to
allow a mix of both.

Change-Id: Ib517c366730b967a974c89528df9d42887c92ec2
2016-03-07 13:14:49 -08:00
Sami Tolvanen 8fb47f191f build: pass version and patch level to mkbootimg
Add --os_version and --os_patch_level arguments to mkbootimg.

Needs matching changes from
  I57682611e0c27fec5ed284da7d9a788383ff98b1

Bug: 27498078
Bug: 22914603
Change-Id: I04e20b0de40d864aac92ac7bcf466a6cbde3d0e4
2016-03-07 11:55:22 -08:00
Tao Bao dca2200c8a releasetools: Fix the bug in AssertSequenceGood.
We use a bitset for blocks in the target image to assert a block hasn't
been touched before reading. Skip checking the blocks that are in the
source image only.

Change-Id: I3a77292da673c813bd20d8dc177ff36419d8ecae
2016-03-04 15:26:26 -08:00
Tao Bao a1d5fd2384 Merge "releasetools: Fix one missing case for --oem_no_mount." am: 4e677900f7
am: aa82bd62cb

* commit 'aa82bd62cb65ae91eadd53f2d37ac5b57c1fc584':
  releasetools: Fix one missing case for --oem_no_mount.
2016-03-04 19:32:02 +00:00
Tao Bao 1bb5a18918 releasetools: Fix one missing case for --oem_no_mount.
The CL in [1] added support for --oem_no_mount. It missed one place that
guards the OEM mounting.

[1] commit 8608cde944

Change-Id: I6ecaa94cd0866e0fd4fc88cb0aa3ebf55cde2968
2016-03-04 09:45:39 -08:00
Mohamad Ayyash f876555893 Hook incremental ext4 image generation into build
Allows passing the *.base_fs or *.map files for system and vendor in
INTERNAL_SYSTEM_BASE_FS_PATH and INTERNAL_VENDOR_BASE_FS_PATH variables
respectively.

Internal Design Doc: go/incremental-ext4
BUG: 26839493
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>

Change-Id: Ie57ef6dbfa6084268b6535fe0a673a3b4aaa6e2f
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-03-03 12:07:21 -08:00
Tao Bao 8cad831b39 resolve merge conflicts of 9baa993c07 to nyc-dev
Change-Id: Ifcfb2da03662ef1b6677c0974605189e2a8e3d20
2016-03-01 15:08:51 -08:00
Tao Bao 25e45b6d63 Merge "releasetools: Add --oem_no_mount option." am: 1e0367410d
am: f457860e46

* commit 'f457860e468dfa25b51980aa2aa37aeb77e9134a':
  releasetools: Add --oem_no_mount option.
2016-02-27 00:15:30 +00:00