Commit graph

410 commits

Author SHA1 Message Date
Tao Bao
915e47aad5 am 948f67b0: am d0ca0549: am 8c76d1e0: Merge "Dump fingerprints into recovery log"
* commit '948f67b0e7b3863488fd4a12a6797311d4c30508':
  Dump fingerprints into recovery log
2015-04-10 04:35:11 +00:00
Tao Bao
948f67b0e7 am d0ca0549: am 8c76d1e0: Merge "Dump fingerprints into recovery log"
* commit 'd0ca05493bfe06cf166e4e215cd9bf38936fb344':
  Dump fingerprints into recovery log
2015-04-10 02:23:31 +00:00
Tao Bao
6c55a8adc8 Dump fingerprints into recovery log
No more guessing. We should have the info for OTA issues diagnosis.

Change-Id: I0ce919434444ab16a38cc7af818e64785509b0fb
2015-04-09 17:36:05 -07:00
Mohamad Ayyash
31bca0bea9 am e71b5560: am 347195da: am 6ddc3600: Merge "build_image.py: Verity support for flashing non partition spanning fs"
* commit 'e71b55606e2d0820f4a743f6c0e6b524f2354919':
  build_image.py: Verity support for flashing non partition spanning fs
2015-04-02 18:57:32 +00:00
Mohamad Ayyash
e71b55606e am 347195da: am 6ddc3600: Merge "build_image.py: Verity support for flashing non partition spanning fs"
* commit '347195da2ea801db95cf201fa7516bf392dc005a':
  build_image.py: Verity support for flashing non partition spanning fs
2015-04-02 18:37:05 +00:00
Mohamad Ayyash
6ddc360065 Merge "build_image.py: Verity support for flashing non partition spanning fs" 2015-04-02 18:18:21 +00:00
Tao Bao
521a8dbd18 am 93d46584: am ae26f5b0: am 53602955: Merge "Add support to sign bootable images with vboot_signer"
* commit '93d46584170a9aae1728cdb9010eef41e25b4d4a':
  Add support to sign bootable images with vboot_signer
2015-04-01 17:33:36 +00:00
Tao Bao
93d4658417 am ae26f5b0: am 53602955: Merge "Add support to sign bootable images with vboot_signer"
* commit 'ae26f5b002de956d495c4019b365040490ff18dd':
  Add support to sign bootable images with vboot_signer
2015-04-01 17:15:29 +00:00
Tao Bao
d95e9fd267 Add support to sign bootable images with vboot_signer
Add vboot properties to the dictionary file, which will be packed into
the target_files zip. Add support in packaging and OTA scripts to
sign the generated bootable images (boot.img and recovery.img) when
vboot is enabled.

Change-Id: I08758ced03d173219415bca762bbdb66c464a9f5
(cherry picked from commit 5d5a3bd9e8d8b14b71d1b2105417a2958d13d3d2)
2015-04-01 09:23:08 -07:00
Mohamad Ayyash
dd063528ed build_image.py: Verity support for flashing non partition spanning fs
Change-Id: Ic5f7b256ed9a31e99ebaebdf8a8a19ba9adcced3
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-04-01 00:50:39 +00:00
Dan Albert
3d4466f3d6 am 146366bf: am b6339d74: am f1a8c8c5: Merge "Fix up a few callers of GetTypeAndDevice."
* commit '146366bfb28e6f7c7b785188325fab40c4db000a':
  Fix up a few callers of GetTypeAndDevice.
2015-03-28 02:38:22 +00:00
Dan Albert
146366bfb2 am b6339d74: am f1a8c8c5: Merge "Fix up a few callers of GetTypeAndDevice."
* commit 'b6339d74fe575aa9e824ebb593c3064555a7af28':
  Fix up a few callers of GetTypeAndDevice.
2015-03-28 02:24:39 +00:00
Dan Albert
ebb19aa01a Fix up a few callers of GetTypeAndDevice.
Change-Id: I8f2d8d28b60715f917e9aceb8f851ad652034aa7
2015-03-27 19:11:53 -07:00
Dan Albert
f9aa358b4b am ee8323b6: Fix bad merge.
* commit 'ee8323b6297c9e0e27524805c53d0eb3b271bc93':
  Fix bad merge.
2015-03-28 00:02:13 +00:00
Dan Albert
ee8323b629 Fix bad merge.
Change-Id: Ifdb2a2999fe13f770c239f47330e8c2c44fdfdbe
2015-03-27 23:50:31 +00:00
Dan Albert
cd9ecc0258 resolved conflicts for merge of eecf00db to master
Change-Id: I7f268122c10152aff8ef59622edbba88db427fca
2015-03-27 16:37:23 -07:00
Dan Albert
eecf00db59 resolved conflicts for merge of 4c32aa3d to lmp-mr1-dev-plus-aosp
Change-Id: I32a06c88416e68ce628f642e0d025d1df5e227d7
2015-03-27 14:37:14 -07:00
Dan Albert
99e22a57d0 Merge "Make releasetools pylint clean." 2015-03-27 18:40:02 +00:00
Baligh Uddin
6c0618976c Merge "Add bootsigner path as an option" 2015-03-26 23:03:13 +00:00
Ying Wang
52ea2066a1 am abc748c1: am 6ff1b035: Merge "Support to build image of root file system with /system and ramdisk combined."
* commit 'abc748c11cbba71a99f306d318c74b5336b28730':
  Support to build image of root file system with /system and ramdisk combined.
2015-03-26 17:57:22 +00:00
Ying Wang
a2292c94d1 Support to build image of root file system with /system and ramdisk combined.
Added support to build system.img that combines contents of /system and
the ramdisk, and can be mounted at the root of the file system.
To enable this feature, define BoardConfig.mk variable:
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true

Ideally we would just change TARGET_OUT (the path of the staging system
directory) to under TARGET_ROOT_OUT. But at this point many places in
the build system assume TARGET_OUT is independent of TARGET_ROOT_OUT and
we can't make it easily configurable.
Instead this implementation takes the least intrusive approach:
We don't change TARGET_OUT or TARGET_ROOT_OUT. We just assemble a
temporary staging directory that contains contents of both TARGET_OUT
and TARGET_ROOT_OUT, in build_image.BuildImage() of
tools/releasetools/build_image.py.
When build_image.py is directly called from the makefile, we pass in the
parameters from the global dictionary; when build_image.BuildImage() is
called from add_img_to_target_files.py, we need to override values to
point to files extracted from the target_files zip file.
We need to combine the fs_config files of both /system and ramdisk,
when fs_config is enabled.

Also this change refactored build_image.BuildImage() by moving the extra
parameters to the image property dictionary.

(cherry-picked from commit 0eabd4f2c5)

Bug:19868522
Change-Id: Iafc467a0e3427b0d6ad3b575abcc98ddcc9ea0f1
2015-03-26 10:35:00 -07:00
Ying Wang
0eabd4f2c5 Support to build image of root file system with /system and ramdisk combined.
Added support to build system.img that combines contents of /system and
the ramdisk, and can be mounted at the root of the file system.
To enable this feature, define BoardConfig.mk variable:
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true

Ideally we would just change TARGET_OUT (the path of the staging system
directory) to under TARGET_ROOT_OUT. But at this point many places in
the build system assume TARGET_OUT is independent of TARGET_ROOT_OUT and
we can't make it easily configurable.
Instead this implementation takes the least intrusive approach:
We don't change TARGET_OUT or TARGET_ROOT_OUT. We just assemble a
temporary staging directory that contains contents of both TARGET_OUT
and TARGET_ROOT_OUT, in build_image.BuildImage() of
tools/releasetools/build_image.py.
When build_image.py is directly called from the makefile, we pass in the
parameters from the global dictionary; when build_image.BuildImage() is
called from add_img_to_target_files.py, we need to override values to
point to files extracted from the target_files zip file.
We need to combine the fs_config files of both /system and ramdisk,
when fs_config is enabled.

Also this change refactored build_image.BuildImage() by moving the extra
parameters to the image property dictionary.

Bug:19868522
Change-Id: Iafc467a0e3427b0d6ad3b575abcc98ddcc9ea0f1
2015-03-24 21:07:42 -07:00
Dan Albert
8b72aefb5a Make releasetools pylint clean.
This caught a few bugs/syntax errors (a few character classes were not
escaped properly in regex patterns, some indentation was illegal,
etc).

Change-Id: I50637607524e68c4fb9cad7167f58a46b8d26b2c
2015-03-24 11:05:16 -07:00
Dan Albert
30b5e49796 am 220a0332: am c47f47b7: am 5d60719e: Merge "Run ZipFile.testzip() during zipfile tests."
* commit '220a0332d318d0dcf7d3611c78084e066ada8e54':
  Run ZipFile.testzip() during zipfile tests.
2015-03-24 03:25:31 +00:00
Tao Bao
b5f5bd6e1b am 3e88a16b: am 2d139fcf: am 0488079d: Merge "Fix the computation of basefilename"
* commit '3e88a16b0e5eb0896d52b5c4e3488527d9a95f26':
  Fix the computation of basefilename
2015-03-24 03:25:24 +00:00
Greg Hackmann
6f2e506b31 am 3b88235d: am 9f201b18: am 088521ef: Merge "Allow system images larger than 2GiB, pt. 2"
* commit '3b88235d04156d8a0346d74b5d3a9575c3b02121':
  Allow system images larger than 2GiB, pt. 2
2015-03-24 02:59:31 +00:00
Tao Bao
228d947832 am 45aece22: am 62eed4d8: am b5901670: Merge "Fix the syntax error in the edify script generator"
* commit '45aece22330ec2621f2a72ef16675cfe128ae56b':
  Fix the syntax error in the edify script generator
2015-03-24 01:30:59 +00:00
Dan Albert
220a0332d3 am c47f47b7: am 5d60719e: Merge "Run ZipFile.testzip() during zipfile tests."
* commit 'c47f47b74f6ed6daa83e3f4357cf315a4b617f6e':
  Run ZipFile.testzip() during zipfile tests.
2015-03-24 00:18:47 +00:00
Dan Albert
5d60719e42 Merge "Run ZipFile.testzip() during zipfile tests." 2015-03-24 00:07:02 +00:00
Tao Bao
3e88a16b0e am 2d139fcf: am 0488079d: Merge "Fix the computation of basefilename"
* commit '2d139fcf2916ad6d0008cf32a2fc1c2899eda3ff':
  Fix the computation of basefilename
2015-03-23 23:58:49 +00:00
Dan Albert
d6d1beb88c Run ZipFile.testzip() during zipfile tests.
This still doesn't catch the issue that [1] fixes, but it's probably a
good idea anyway.

[1]: https://android-review.googlesource.com/#/c/143469/

Change-Id: Iaa607ec7450d605b26114bd81ea41a14c6613c0e
2015-03-23 16:54:39 -07:00
Tao Bao
eaf885b1d0 Fix the computation of basefilename
Change-Id: I156b182414ef5b33611955cbc019e208c771013a
2015-03-23 16:05:26 -07:00
Greg Hackmann
3b88235d04 am 9f201b18: am 088521ef: Merge "Allow system images larger than 2GiB, pt. 2"
* commit '9f201b18be8a4cecd27d7b5635c0892fbb00c591':
  Allow system images larger than 2GiB, pt. 2
2015-03-23 22:03:08 +00:00
Greg Hackmann
6701db8145 Allow system images larger than 2GiB, pt. 2
We need to patch zipfile during close() too, because it refers to the
ZIP64 file size threshold when writing out the central directory

Bug: 18015246
Bug: 19888174

Change-Id: I1b49d653d0831fcc2106808f86c929d7a2b22ff3
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-03-23 14:35:50 -07:00
Tao Bao
45aece2233 am 62eed4d8: am b5901670: Merge "Fix the syntax error in the edify script generator"
* commit '62eed4d8a9eb71181965e38dacabd13cee091da2':
  Fix the syntax error in the edify script generator
2015-03-23 03:43:30 +00:00
Tao Bao
3910ebf468 Fix the syntax error in the edify script generator
file_getprop() always expects two arguments.

Bug: 19881931
Change-Id: Icf5577ad34188991c03f68c1217642d3adc4201c
2015-03-22 14:20:48 -07:00
Tao Bao
b71d609061 am 928b851c: am ae978751: am 261e195d: Merge "Make the generated OTAs repeatable"
* commit '928b851ca178733ba61eef72a1b7e004f9a111e7':
  Make the generated OTAs repeatable
2015-03-20 03:33:21 +00:00
Tao Bao
928b851ca1 am ae978751: am 261e195d: Merge "Make the generated OTAs repeatable"
* commit 'ae9787514d5709dff766f4791c00a4875eebbf50':
  Make the generated OTAs repeatable
2015-03-20 03:27:55 +00:00
Tao Bao
b8c8717191 Make the generated OTAs repeatable
The generated OTAs are supposed to be repeatable. The use of dict in
blockimgdiff.py breaks the assumption for block-based OTAs. Fixed by
using OrderedDict instead.

Change-Id: I945bdc879912ba174ca330c152b1f8fc7ed211ac
2015-03-19 19:42:12 -07:00
Tao Bao
04ecdda5d0 am 48fe5b7c: am fc267120: am b7e5ab6f: Merge "Allow system images larger than 2GiB."
* commit '48fe5b7cadca3c945e81182411e9537cb11d81d3':
  Allow system images larger than 2GiB.
2015-03-19 21:30:20 +00:00
Tao Bao
48fe5b7cad am fc267120: am b7e5ab6f: Merge "Allow system images larger than 2GiB."
* commit 'fc2671201caeac485440c2aa146f35a99002bca2':
  Allow system images larger than 2GiB.
2015-03-19 21:24:59 +00:00
Dan Albert
8e0178d41b Allow system images larger than 2GiB.
Python 2.7's zipfile implementation wrongly thinks that zip64 is
required for files larger than 2GiB. We can work around this by
adjusting their limit. Note that `zipfile.writestr()` will not work
for strings larger than 2GiB. The Python interpreter sometimes rejects
strings that large (though it isn't clear to me exactly what
circumstances cause this). `zipfile.write()` must be used directly to
work around this.

This mess can be avoided if we port to python3.

The bug (b/19364241) in original commit has been fixed.

Bug: 18015246
Bug: 19364241
Bug: 19839468

(cherry picked from commit cd082d4bfe)

Change-Id: I7b5cc310e0a9ba894533b53cb998afd5ce96d8c6
2015-03-19 13:59:01 -07:00
Tao Bao
2c92413e72 Restrict the verification in block-based incremental OTAs
BlockImageDiff has three versions. Only the incremental OTAs generated
with the latest version (3) can be re-applied to the system that's
already on the target build. Otherwise, operations like move will make
unconditional changes and damage the system. During the verification
phase, abort the OTA update if BlockImageDiff is less than 3 and it
doesn't match the checksum of the source build.

Change-Id: Iaf834a2d99dfea0bb423a4a2aa09e8906424482d
(cherry picked from commit daebaa6ed3)
2015-03-18 16:13:10 -07:00
Tao Bao
aecbda7f26 resolved conflicts for merge of 22311914 to master
Change-Id: I8684191fa3efea0ed546bbad076f8760a13c5c81
2015-03-14 00:26:06 -07:00
Tao Bao
2231191482 resolved conflicts for merge of 6502ae93 to lmp-mr1-dev-plus-aosp
Change-Id: I3ffed7f5a32363d5a4481eebddff8feff3c4ebee
2015-03-13 22:40:38 -07:00
Tao Bao
dd2a5892e5 Restrict the verification in block-based incremental OTAs
BlockImageDiff has three versions. Only the incremental OTAs generated
with the latest version (3) can be re-applied to the system that's
already on the target build. Otherwise, operations like move will make
unconditional changes and damage the system. During the verification
phase, abort the OTA update if BlockImageDiff is less than 3 and it
doesn't match the checksum of the source build.

Change-Id: Ic630346eab2a993a84d0aeaacd7167ef62cc24f6
(cherry picked from commit daebaa6ed3)
2015-03-13 17:57:15 -07:00
Ying Wang
d4ca3b38d9 am 4cbc4b39: am ae61f50a: Support to configure and build multiple custom images.
* commit '4cbc4b392da57c34626af38a4ea0fe4dc115af57':
  Support to configure and build multiple custom images.
2015-03-14 00:31:44 +00:00
Ying Wang
ae61f50a68 Support to configure and build multiple custom images.
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
   PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
   Each makefile configures an image.
   For image configuration makefile foo/bar/xyz.mk, the built image
   file name
   will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
  - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
    etc.
  - CUSTOM_IMAGE_PARTITION_SIZE
  - CUSTOM_IMAGE_FILE_SYSTEM_TYPE
  - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
    accepted by BuildImage() in tools/releasetools/build_image.py.
  - CUSTOM_IMAGE_MODULES, a list of module names you want to include
    in the image; Not only the module itself will be installed to proper
    path in the image, you can also piggyback additional files/directories
    with the module's LOCAL_PICKUP_FILES.
  - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
    the image. <dest> is relativ to the root of the image.

To build all those images, run "make custom_images".

Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
(cherry picked from commit 5fcf1094f9)
2015-03-14 00:06:54 +00:00
Ying Wang
5fcf1094f9 Support to configure and build multiple custom images.
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
   PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
   Each makefile configures an image.
   For image configuration makefile foo/bar/xyz.mk, the built image
   file name
   will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
  - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
    etc.
  - CUSTOM_IMAGE_PARTITION_SIZE
  - CUSTOM_IMAGE_FILE_SYSTEM_TYPE
  - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
    accepted by BuildImage() in tools/releasetools/build_image.py.
  - CUSTOM_IMAGE_MODULES, a list of module names you want to include
    in the image; Not only the module itself will be installed to proper
    path in the image, you can also piggyback additional files/directories
    with the module's LOCAL_PICKUP_FILES.
  - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
    the image. <dest> is relativ to the root of the image.

To build all those images, run "make custom_images".

Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
2015-03-13 16:48:02 -07:00
Michael Runge
910b005f18 Do not use block_verify on target-files where feature is missing.
This will only be used when the block file format is at least
version 3.  For V1/V2 (L, L MR1) block versions, fall back to
the old range_sha1 check.

Bug: 19357591
Change-Id: I7cb178b70d48ec3c98cdb88ed1c94cf7797a01d0
(cherry picked from commit cad78c12fb)
2015-03-13 11:36:14 -07:00