Commit graph

551 commits

Author SHA1 Message Date
Jesse Zhao
7ca20d1a1c Fix the error that free_string is not defined.
Change-Id: I7490a91ea930daaf194dad0c8b3a3357558b4770
Bug:19573713
2015-03-02 17:21:38 -08:00
Justin Harrison
d2d9747199 am b89ec381: am 070eea05: am ffd4fee9: Merge "Revert "Allow system images larger than 2GiB."" into lmp-mr1-dev
* commit 'b89ec38113a22d09b0832ed2d3cb8fc413a14a75':
  Revert "Allow system images larger than 2GiB."
2015-02-13 20:44:23 +00:00
Justin Harrison
b89ec38113 am 070eea05: am ffd4fee9: Merge "Revert "Allow system images larger than 2GiB."" into lmp-mr1-dev
* commit '070eea05f2f2d47aa873fd1e79160eb8529a0eb8':
  Revert "Allow system images larger than 2GiB."
2015-02-13 20:37:10 +00:00
Justin Harrison
ffd4fee911 Merge "Revert "Allow system images larger than 2GiB."" into lmp-mr1-dev 2015-02-13 18:48:17 +00:00
Justin Harrison
2de68bbbf4 Revert "Allow system images larger than 2GiB."
This reverts commit cd082d4bfe.

Change-Id: Ie63e1ba70d907d2849164871bc7ec71c245f7af9
2015-02-13 18:47:51 +00:00
Michael Runge
cad78c12fb 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
2015-02-11 19:28:08 -08:00
Baligh Uddin
e204868f1f Add bootsigner path as an option
Change-Id: I71e8cb96b7a33cc02897fc24f6f3f61c7608bfe3
2015-02-11 15:43:02 +00:00
Jesse Zhao
4ec52a93d8 am 234d122e: am c6af9b8f: am 28b2b00a: Merge "Update vendor fingerprint." into lmp-mr1-dev
* commit '234d122ea62a43aa3a1d6cfbf11a75e5dbe3f8e0':
  Update vendor fingerprint.
2015-02-09 04:14:09 +00:00
Dan Albert
39a68ab310 am f8f91c94: am 3907eaf8: am cd082d4b: Allow system images larger than 2GiB.
* commit 'f8f91c94706a953f91bf75e919b4302db6a9a99f':
  Allow system images larger than 2GiB.
2015-02-09 04:14:08 +00:00
Jesse Zhao
234d122ea6 am c6af9b8f: am 28b2b00a: Merge "Update vendor fingerprint." into lmp-mr1-dev
* commit 'c6af9b8f4a09cc4208ad119218f57022d6fead5b':
  Update vendor fingerprint.
2015-02-07 00:06:13 +00:00
Dan Albert
f8f91c9470 am 3907eaf8: am cd082d4b: Allow system images larger than 2GiB.
* commit '3907eaf8b7c6f7209c4cb11a6b8b66a34f292151':
  Allow system images larger than 2GiB.
2015-02-07 00:06:10 +00:00
Jesse Zhao
28b2b00adb Merge "Update vendor fingerprint." into lmp-mr1-dev 2015-02-06 22:21:06 +00:00
Dan Albert
cd082d4bfe 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.

Bug: 18015246
Change-Id: I8a476d99c5efdef6ea408373b706e9fbd3a798be
2015-02-06 13:24:06 -08:00
Jesse Zhao
2625d27151 Update vendor fingerprint.
Change-Id: I5d4abdff8b7b13e01271440f4d4f2ffe1b015b71
Bug: 19257598
2015-02-06 09:50:06 -08:00
Sami Tolvanen
cac671a9d1 Change transfer list format to include block hashes
Add source and target block hashes as parameters to transfer list
commands that copy or patch data to a partition. This allows the
updater to verify the status of each command in the transfer list
and makes resuming block based OTAs possible. Due to the changes,
update the transfer list version to 3.

Needs matching changes from
  I1e752464134aeb2d396946348e6041acabe13942

Bug: 18262110
Change-Id: Ia5c56379f570047f10f0aa7373a1025439495c98
2015-01-30 11:34:27 +00:00
Jesse Zhao
5827eec013 am fbc8c145: am 0c9384d5: Merge "verify system and vendor image together before patching." into lmp-mr1-dev
* commit 'fbc8c1454e8f2167635398078bb53033dc90f15d':
  verify system and vendor image together before patching.
2015-01-28 23:42:18 +00:00
Jesse Zhao
75bcea0267 verify system and vendor image together before patching.
Change-Id: Ia43657ed6cd8860b0edb78cc2dd6388c761e1f8b
Bug: 17919909
2015-01-07 21:44:09 +00:00
David Turner
7a864af1b7 am aa112716: Merge "build_image: Set file system labels on disk images"
* commit 'aa112716067167d58d1db37aaf8adc49b83b59a1':
  build_image: Set file system labels on disk images
2015-01-07 20:28:17 +00:00
Christoffer Dall
8ed01f3816 build_image: Set file system labels on disk images
When building images set the mount point (data,cache,system) as the
filesystem label on the generated image.  This is required for the
Android Emulator.

IMPORTANT: This depends on the following patch to system/extras/:

    https://android-review.googlesource.com/#/c/120047/

which has already been submitted to AOSP and merged into the
internal tree.

Change-Id: Iaeb45462570c26d37980f1cc5d8a1b929e476c89
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-01-05 17:49:37 +01:00
Michael Runge
2b800123c4 am 34a1bdeb: am ea1dc699: Merge "Rewrite ro.vendor.build.fingerprint/thumbprint on signing" into lmp-mr1-dev
* commit '34a1bdeb333ab15ddc3840ac3e5d1e8c3245d44a':
  Rewrite ro.vendor.build.fingerprint/thumbprint on signing
2014-12-15 22:46:33 +00:00
Michael Runge
e07c75a86b Rewrite ro.vendor.build.fingerprint/thumbprint on signing
This should also indicate release-keys.

Bug: 18281807

Change-Id: I8d2568ca346625b91384f7e639d9c92e97587755
2014-12-09 13:54:52 -08:00
Michael Runge
3deca9e5df am f3761585: am 60f56e7d: am 996d8f48: Merge "Add support for tuning partitions" into lmp-sprout-dev
* commit 'f37615859e369c774841eafdb225a5f02259e1ee':
  Add support for tuning partitions
2014-11-24 18:06:36 +00:00
Michael Runge
60f56e7d15 am 996d8f48: Merge "Add support for tuning partitions" into lmp-sprout-dev
* commit '996d8f48a1b3e6e3a63344633546ff294cc67071':
  Add support for tuning partitions
2014-11-24 02:37:02 +00:00
Michael Runge
3e286645ba Add support for tuning partitions
Allow a simple mechanism to call tune2fs to modify an existing
partition without reformatting.

Bug: 18430740
Change-Id: I9210355b6bfec74d002d1f40b930330740f379a5
2014-11-21 00:46:03 -08:00
Ying Wang
e91b83d5e6 Support journal size board config variables.
A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks)
in its BoardConfig.mk.
To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0".

BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in
similar way.

Bug: 18430740

(cherry picked from commit f3b86357e2)

Change-Id: Icc6c7e1b3be25b8e21b6a737492d944428e4a35a
2014-11-19 13:48:30 -08:00
Ying Wang
f1021dcb61 am 6ead56be: am f3b86357: Support journal size board config variables.
* commit '6ead56bed56e3927575726bdebf8511e44f6fb47':
  Support journal size board config variables.
2014-11-19 19:28:23 +00:00
Ying Wang
f3b86357e2 Support journal size board config variables.
A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks)
in its BoardConfig.mk.
To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0".

BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in
similar way.

Bug: 18430740
Change-Id: I0594814fe19ffc54dff41ec2464e2e3a802b9419
2014-11-18 18:19:43 -08:00
Ying Wang
8cbb0eac18 am 5520d930: Merge "sign_target_files_apks: fix recovery patch generation"
* commit '5520d930c8e78a3bea4eeba9d0430d1c3f19dba8':
  sign_target_files_apks: fix recovery patch generation
2014-11-14 19:01:35 +00:00
Michael Runge
100a9f0720 am 11d21015: am f178d364: Merge "Allow images to be readded to target-files" into lmp-dev
* commit '11d210154d71a229e20eaebd6f9ea580b0c7f036':
  Allow images to be readded to target-files
2014-11-14 07:19:58 +00:00
Michael Runge
2e0d8fcf08 Allow images to be readded to target-files
There may be cases where various partitions were
modified (such as extra signing of boot/recovery)
which require the system partition to be regenerated
with a new recovery patch script.  Allow a request
for the recovery patch to be rebuilt, and for
missing images to be readded to the existing images.

Change-Id: Ie93c5bc1161a0d5002002dca23e07742ce2ba468
2014-11-13 22:55:35 -08:00
Paul Lawrence
a37b2bb236 Fix the build
Bug: 15984840
Bug: 18120110
Change-Id: I0224d5a31e03b711953d9496ecb00b6d88b8ef4c
2014-11-14 02:04:33 +00:00
Sami Tolvanen
8d212ea873 DO NOT MERGE: Change verity key formats
Change boot, recovery, and verity metadata signing keys to use the
same PKCS8 / X.509 PEM format as the other signing keys, and update
build scripts to use correct arguments for the updated signing
tools.

Bug: 15984840
Bug: 18120110
Change-Id: I23ed5a004ecdad6cf7696487935ad5031eb8adf8
(cherry picked from commit 72d90eb189)
2014-11-13 23:23:31 +00:00
Andrew Boie
d083f0b72f sign_target_files_apks: fix recovery patch generation
When rebuilding recovery, the boot images created for patching
purposes still were being signed with the old verity key and
not the new one specified on the command line.

In addition, the replacement verity public key in the boot ramdisk
wasn't being used.

Change-Id: I451e17d1cf08c507580c4b58134c1069532740e8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-11-11 22:17:11 -08:00
Michael Runge
c9594afa93 am 63f01de8: Add post-install verification phase
* commit '63f01de81892aa4e40b517464b3d9ca7db666c9d':
  Add post-install verification phase
2014-10-29 18:51:51 +00:00
Michael Runge
63f01de818 Add post-install verification phase
Verify the SHA sum of all patched and extracted files after
a file system remount.

Bug: 18145574

Change-Id: I2f053d085543e10e39153a774542d37ee0a238bd
2014-10-29 02:54:51 +00:00
Michael Runge
46fe30eff7 am fb8886db: get_stage in updater takes one param, not two.
* commit 'fb8886db6858388af5082268fd023b8a44fb87ea':
  get_stage in updater takes one param, not two.
2014-10-23 21:57:12 +00:00
Michael Runge
10ba565431 am 7cd99bad: Allow info_dict from target_files to specify mount options
* commit '7cd99bad210455dc57702b7cbf674a588a5eb028':
  Allow info_dict from target_files to specify mount options
2014-10-23 21:57:10 +00:00
Michael Runge
fb8886db68 get_stage in updater takes one param, not two.
Change-Id: I09a77eda5a1691080b1ae074d2e94d233eca7150
2014-10-23 13:51:04 -07:00
Michael Runge
7cd99bad21 Allow info_dict from target_files to specify mount options
This will allow safer mount options to be added per mount FS
type, to better ensure data is written during an OTA.
Bug: 18079773, 18092222

Change-Id: I1e3e4fd4639c6fd263e550b770cc3c858ef1e03b
2014-10-22 18:38:49 -07:00
Doug Zongker
641bfeddf3 am e18eb508: add support for the \'fill\' chunk type to sparse_img
* commit 'e18eb50850201e573084a0cd8e1199d877170b64':
  add support for the 'fill' chunk type to sparse_img
2014-10-16 05:52:53 +00:00
Michael Runge
92946baa03 am 9d641c41: Merge "Fix public/private key options on sign_target_files_apks" into lmp-dev
* commit '9d641c41db732c4e9e7a5dac074197f1a9d40bcc':
  Fix public/private key options on sign_target_files_apks
2014-10-16 05:52:17 +00:00
Doug Zongker
e18eb50850 add support for the 'fill' chunk type to sparse_img
Bug: 17987996
Change-Id: Ia661e87877e52274a991ceb77bbed93b7e6218f2
(cherry picked from commit 629c7cc84d)
2014-10-15 23:38:34 +00:00
Michael Runge
947894f87e Fix public/private key options on sign_target_files_apks
The if statements appear to check for public_signing
and then calls the private_signing function, and vice
versa.

Change-Id: I4511b9bcf0e03b9ba49b69eb80db84cf31d77020
2014-10-14 20:58:38 -07:00
Doug Zongker
e985f6f4d8 fix transfer list for full OTAs
The erase command we insert at the top for full OTAs was getting
inserted in the wrong place for version 2.

Change-Id: I9caf03a40efbdba79f3428f73e50d4319d9ba371
2014-09-25 16:39:45 -07:00
Doug Zongker
846cb3a9e6 add unit tests for rangelib
Change-Id: I3b77e849007259e697da56bd493ae5b553b901d1
2014-09-25 16:39:32 -07:00
Doug Zongker
623381880a generate version 2 blockimgdiff files
Generate version 2 of the block_image_update transfer list format.
This improves patch size by a different strategy for dealing with
out-of-order transfers.  If transfer A must be done before transfer B
due to B overwriting A's source but we want to do B before A, we
resolve the conflict by:

  - before B is executed, we save ("stash") the overlapping region (ie
    the blocks B will overwrite that A wants to read)

  - when A is executed, it will read those parts of source data from
    the stash rather than from the image.

This reverses the ordering constraint; with these additions now B
*must* go before A.  The implementation of the stash is left up to the
code that executes the transfer list to apply the patch; it could hold
stashed data in RAM or on a scratch disk such as /cache, if available.

The code retains the ability to build a version 1 block image patch;
it's needed for processing older target-files.

Change-Id: Ia9aa0bd45d5dc3ef7c5835e483b1b2ead10135fe
2014-09-25 16:39:14 -07:00
Michael Runge
560569a617 If oem_fingerprint_props is empty, ignore.
There may be cases where there is an OEM partition
but it has no effect on the OTA itself.  In these
cases, ignore an empty value from the misc_info.txt

Change-Id: I5f467e873030765af12810a07ddd5f302ca8cc0b
2014-09-18 15:12:45 -07:00
Doug Zongker
b34fcce08c explicitly check the superblock for differences
When generating incrementals for the system and vendor partitions,
check the first block (which contains the superblock) of the partition
to see if it's what we expect.  If this check fails, give an explicit
log message about the partition having been remounted R/W (the most
likely explanation) and the need to flash to get OTAs working again.

Bug: 17393999
Change-Id: Ifd2132b428dbc4907527291712690204a3664ac0
2014-09-11 09:38:01 -07:00
Doug Zongker
8544877399 select default search_path by platform
Bug: 17443175
Change-Id: I2b8b0a3b56e667b749ac167a6d09dc973ecf8419
2014-09-09 15:11:13 -07:00
Baligh Uddin
bdc2e3186f Add java_args as a valid option
Bug: 17393134
Change-Id: If2749d03b5d409a08d415a829dd21f986cac1789
2014-09-06 00:37:54 +00:00
Baligh Uddin
339ee4968a Add jvm args option. I rather not hardcode some large value just for Volantis. This can easily be passed in from sign-build.sh and should be a no-op for any other tools
Bug: 17393134
Change-Id: Ic2325d7c1e1e7292c9339e169efbed526f82263c
2014-09-05 18:29:47 +00:00
Doug Zongker
424296a4e8 add missing AOSP copyright notices
Change-Id: Idc812db30b259a55702f8728197f957f2d24d978
2014-09-02 08:53:09 -07:00
Doug Zongker
ab7ca1d286 refactor BlockDifference into common
Move BlockDifference into common and make its script generation code
more complete, so that it can be use by releasetools.py to do diffs on
baseband images.

Bug: 16984795
Change-Id: Iba9afc1c7755458ce47468b5170672612b2cb4b3
2014-08-26 13:12:11 -07:00
Doug Zongker
4d0bfb4f40 remove unused xdelta3/xz utilities
This was part of the original block-based OTA mechanism.

Bug: 16987495
Change-Id: I5bd6599829ee6084a8da1f0b14af87aabf07c130
2014-08-26 13:11:56 -07:00
Doug Zongker
5f9c28cad4 fix build
Change-Id: I1e503406129343bbfddacc1150c81e403b47778c
2014-08-26 13:11:37 -07:00
Doug Zongker
fc44a515d4 new block OTA system tools
Replace the xdelta/xz-based block OTA generation with a new system
based on the existing bsdiff/imgdiff tools.

Bug: 16984795
Change-Id: Ia9732516ffdfc12be86260b2cc4b1dd2d210e886
2014-08-26 13:10:25 -07:00
Doug Zongker
6f1d031b39 take bootable images from target_files if present
Now that we're building and saving images in the target_files at build
time, we should use those images instead of rebuilding them.

Bug: 17201052
Change-Id: I459e650f66f1e0bdf01ad54df9e34f36bf2ee899
2014-08-22 10:25:57 -07:00
Geremy Condra
95ebe7a09b Use the specified verity key to sign boot and recovery OTA images.
This ensures that when the verity key is rotated to a release key
both the boot and recovery images will be correctly signed. It does
mean that they will both be signed with the same key for now, but
as that doesn't change the threat model separating them is just a
distant nice-to-have.

Bug: 15725238
Change-Id: I5b75e4346fe0655065643ab553431690cc1a8cb0
2014-08-20 20:17:01 +00:00
Geremy Condra
f19b365cc9 Add support for switching to verity release keys.
Bug: 15725238
Change-Id: I8f92210fd854b5a2567cf76aaecb5be02c3f9293
2014-08-20 00:05:23 +00:00
Benoit Fradin
a45a8682fa BuildBootImage: Add secondstage image support [DO NOT MERGE]
The AOSP bootimage format allows the use of a second stage image
however the BuildBootableImage function does not allows the "second"
optional argument. This patch adds the support of this argument.

Bug: 17035158

Change-Id: I8ed9d9e56449945c2d42fc908269921c394f68c0
Signed-off-by: Benoit Fradin <benoit.fradin@intel.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-08-14 11:24:54 -07:00
Doug Zongker
f21cb5a219 save file block allocations in target_files
make_ext4fs can now output a file listing the blocks used for each
file in the image.  Request this file and save it in the target_files;
it will be used for future improvements to block OTAs.

Bug: 16984795
Change-Id: Id1e60465e3b5a9d126a7934b4d089cf34d8fec44
2014-08-12 17:09:38 -07:00
Doug Zongker
f83400896d add 5 minute timeout on binary patch construction
When making bsdiff/imgdiff patches, give up after 5 minutes.  (On
certain large files it can take hours to build a patch, if it ever
even completes.)

Change-Id: I123c06f8194f85f6f4e640f7eb31c7746f76ba4d
2014-08-05 10:39:37 -07:00
Doug Zongker
56d91dd07f Merge "fall back to generating full OTA if incremental fails" into lmp-dev 2014-08-01 17:53:35 +00:00
Doug Zongker
62d4f18a30 fall back to generating full OTA if incremental fails
Block incremental OTA generation can currently fail on some
target-files pairs.  Fall back to generating a full OTA so that the
script succeeds rather than failing.

Change-Id: Ide70395d1f3759aa2076bd173836f6a5e5b397c0
2014-08-04 16:06:43 -07:00
Ying Wang
a961a09e59 Fix error: 'NoneType' object is not iterable
Change-Id: I5a54edbed0e5e5481a570b93c07d50f6ca3e18e0
2014-07-29 11:42:37 -07:00
Doug Zongker
3c84f56948 store images in target-files
Store sparse images in the target-files, and use those (when they're
available) for building block OTAs.

- New script add_img_to_target_files is added to make the images and
  add them to the IMAGES/ subdir in the target-files.  It gets run
  from the Makefile when building a target-files.

- img_from_target_files becomes mostly vestigial: it creates the
  img.zip by just copying the images out of the target-files.  (It
  still knows how to build images for use on older target-files.)

- ota_from_target_files uses images from the target-files in
  preference to rebuilding images from the source files.

- sign_apk_target_files builds images and includes them in its output
  target files (even if the input target-files didn't have them).

Bug: 16488065
Change-Id: I444e0d722d636978209467ffc01750a585c6db75
2014-07-31 11:06:30 -07:00
Daniel Rosenberg
f4eabc3961 Added support for building verified vendor partition
Change-Id: I762724800ccab3a365e6d2efdf86cd9c394818eb
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2014-07-14 22:55:22 +00:00
JP Abgrall
4d09dcb2c6 releasetools: only allow yaffs to have no userdata image size (fix build)
In the past, there was an exception for ext-base fs types to
deal with the lack of image size.
Back then it was only yaffs and ext*.
So now we explicitely only allow yaffs to have no userdata image size.

Change-Id: Ie354ee6222a58228dbcce2c6934971a0737422af
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-26 21:15:39 -07:00
Ying Wang
f5770d78da resolved conflicts for merge of 240e136e to master
Change-Id: Ic6e2cbe593914ddb613454581964c5d3d443b9d5
2014-06-19 10:32:35 -07:00
Ying Wang
240e136efd am 318c8e76: am 17c6426e: Merge "Document the worker_threads option."
* commit '318c8e76ee8f47fb9f077e419713cf4dbb454788':
  Document the worker_threads option.
2014-06-19 17:16:39 +00:00
JP Abgrall
5bfed5a320 core+tools: support specifying F2FS as the fstype for userdata
- Support TARGET_USERIMAGES_USE_F2FS.
- Support BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE.
- Support "userdata_fs_type" in the prop dict.
- Update build_image to recognize f2fs and call the correct command.

Change-Id: If31cc8bd235f93a4c7814fab36e6e2d13d3037ad
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-17 13:32:14 -07:00
Doug Zongker
c8b4e849f1 full support for OTA of vendor partitions
Make vendor partition a first-class member of the OTA system (for
target_files that contain a VENDOR/ subdirectory).

Build vendor images in a way that is compatible with block-based OTA.
Support updating the vendor partition in both full and incremental,
block and file OTAs.  In most cases this is handled by refactoring the
existing code to handle the system partition to handle either, and
then calling it twice.

Currently we don't support incremental OTAs from a target-files
without a VENDOR subdirectory to one with one, or vice versa.  To add
or remove a vendor partition a full OTA will need to be done.

Bug: 15544685
Change-Id: I9cb9a1267060bd9683a9bea19b43a26b5a43800d
2014-06-16 15:39:54 -07:00
Doug Zongker
8282282122 use fs_config and file_contexts from target_files
When building images, we want to use the file_contexts and fs_config
data contained in the target_files zip, rather than whatever happens
to be in the current client.

Change-Id: I13df2405898039f5a9b4bb4837147e76b31b068a
2014-06-16 09:24:41 -07:00
Doug Zongker
1113e38195 test block patch more realistically
Read and write the same file when testing block patches, which can
turn up errors that don't show up otherwise.  (And will appear on the
device.)

Change-Id: Ic9b8d93ec980d13163b135f619af589f41433d7f
2014-06-13 10:38:32 -07:00
Martin Blumenstingl
374e114d16 Document the worker_threads option.
Change-Id: I44775493bedc0c7224c2c4ef06330bdb1430a1b6
2014-06-11 23:03:44 +02:00
Doug Zongker
4b9596fe00 configure progress bar during block OTA script generation
Emit script commands to produce a more accurate progress bar (for full
block OTAs) and a working progress bar (for incremental block OTAs) --
ones that are driven by the progress callback from the thing actually
writing the system image.

Change-Id: Ifca10be68cfdaab7135d23515bd0ae5be2f98a16
2014-06-09 14:15:45 -07:00
Ying Wang
1343ec169c am b75fe469: am eafdd2cd: Fix emulator builds
* commit 'b75fe4696e847ef49aa9b11693243c00de497808':
  Fix emulator builds
2014-06-04 22:24:51 +00:00
Ying Wang
eafdd2cd87 Fix emulator builds
which don't have boot.img.

Change-Id: Id97a53c5356d435d9c70107ef047bed003769e22
2014-06-04 15:16:17 -07:00
Ying Wang
3a9cb0ca11 Merge "Allow to build the update.zip for emulator build." 2014-06-04 17:40:45 +00:00
Ying Wang
dc7ff05427 am bc080d51: am 2a386e0c: Allow to build the update.zip for emulator build.
* commit 'bc080d510f022da8055b89b85e02d91e74c3757d':
  Allow to build the update.zip for emulator build.
2014-06-04 17:26:00 +00:00
Ying Wang
2a386e0cfb Allow to build the update.zip for emulator build.
img_from_target_files.py just skips the boot.img and recovery.img since
there is no kernel or recovery.fstab for emulator.

Bug: 15383279
Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
2014-06-04 17:04:14 +00:00
Michael Runge
4eb9e61c24 Merge "Add sprout support to signing tools" 2014-06-03 22:32:38 +00:00
Michael Runge
dc2661afe2 Add sprout support to signing tools
Bug: 15379701

Change-Id: Ied8329e1162250cc5509b65ef8bf0b5a9ddda3c3
2014-06-03 15:30:40 -07:00
Ying Wang
f8824aff68 Allow to build the update.zip for emulator build.
img_from_target_files.py just skipps the boot.img and recovery.img since
there is no kernel or recovery.fstab for emulator.

Bug: 15383279
Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
2014-06-03 14:07:27 -07:00
Geremy Condra
e8e982afd3 Fix salt for verity tree generation.
Prior to this change salts were randomly generated, causing OTAs
to fail when they tried to check whether the system they were
installing on was binary identical to the source from which they
were generated.

Bug: 15018770
Change-Id: I86fffe2264a0c263aaf47112fb82fa71240e3403
2014-05-16 19:14:30 -07:00
Geremy Condra
15d5348e6c Reopen temporary system image to avoid stale data.
NamedTemporaryFile's aggressive caching behavior can cause an issue
where changes made by another process aren't visible even after the
fseek() below or a flush(). To avoid this, simply open the file
again and read from the fresh version.

This fixes an issue where verity metadata written by append2simg
doesn't become visible to img_from_target_files.

Change-Id: I291fb3a95d5b532218ac6205ecc9e9b4f3a36bd4
2014-05-13 20:23:54 -07:00
Geremy Condra
c10320eef3 Merge "Add verity support to make dist." 2014-05-12 17:00:58 +00:00
Geremy Condra
5b5f4958d8 Add verity support to make dist.
Without this, system images will be built that do not contain the
necessary bits for verification.

Change-Id: I87c15282b26377d7a2a1540e3d0e30b0299622e3
2014-05-10 18:31:07 -07:00
Michael Runge
4f12fceead Add missing quotation mark in assertion
Change-Id: I3e76997fe257bfccb7d61dcc1273e014cdb55a41
2014-05-09 14:14:42 -07:00
Doug Zongker
91a99c28e0 fix ota script to generate non-block commands correctly
If you had a target_files without a recovery patch and specified
--block (which should have no effect without a patch), it would have
omitted some necessary commands from the OTA script.

Change-Id: I96e79cd561ebf09cfe53792d1cc558cc71479869
2014-05-09 13:16:50 -07:00
Doug Zongker
af845256f1 assert recovery finger/thumbprints, not system
Block OTAs don't have the system partition mounted and so can't use
file_getprop on the system partition.  Make assertions look at the
recovery system finger/thumbprints, which should be the same as the
ones on the system partition (even for sprout devices).

Change-Id: Ie5d329d13beab4b428e37f75da9b9e1b8ceb35bc
2014-05-09 08:29:05 -07:00
Ed Heyl
3e92fd0fba Fix build: Revert "Add verity support to make dist."
This reverts commit 5dee206d8e.

Change-Id: I6f4f536c127d3e5dcb6594efb193231cd8dece7e
2014-05-09 05:53:54 +00:00
Geremy Condra
5dee206d8e Add verity support to make dist.
Without this, system images will be built that do not contain the
necessary bits for verification.

Change-Id: Icaa636085dbfd386424c90dfbe404c5960df0fe4
2014-05-06 18:06:18 -07:00
Michael Runge
0a2ce08f66 Merge "Support block OTA + OEM partition" 2014-05-05 19:57:56 +00:00
Michael Runge
c6e3afd26d Support block OTA + OEM partition
Change-Id: I9e662098569a43b05279908e6833e9552a7abe3a
2014-05-05 12:22:12 -07:00
Colin Cross
e8eef02cca Merge "verity: switch to C++ version of build_verity_tree" 2014-05-02 23:52:16 +00:00
Michael Runge
6e836116f7 Add support for verifying OEM properties.
A separate OEM file must be specified to provide the expected
values for these properties.  The list of properties comes from
the "oem_fingerprint_properties" list in misc_info.txt

Bug: b/13367676

Change-Id: I1a3eaf108492132cf6f595a5d1c9f7e0c3cb3142
2014-05-01 17:37:57 -07:00
Colin Cross
477cf2b029 verity: switch to C++ version of build_verity_tree
The C++ version avoids the need to unsparse the image to generate
the verity image, and is much faster for images with large regions
of don't care (treated as zeroes).

Change-Id: I8396b08a5fdb93f27d8c71c9c1ac23cb75cf1f7f
2014-04-28 17:19:13 -07:00
Ying Wang
b8888432f0 Set up rules to build oem.img
To build oem.img:
- You must define BOARD_OEMIMAGE_PARTITION_SIZE in your BoardConfig.mk
- The file system type will be the same as system.img and userdata.img.
- To install a module to oem.img, use "LOCAL_OEM_MODULE := true"
- run "make -j48 showcommands oem_image dist". By default it's not
  built.

Bug: 13367676
Change-Id: I1a26d4d0c61b72ecffe60279667b1b3de050780d
2014-04-28 09:43:51 -07:00
Ying Wang
c73e461537 Fix variable name.
Change-Id: Ie7439f71cf7fd2eeacd45a5d6625e610dad8bfbe
(cherry picked from commit 1a1dfcb5fcb6eda11d8dbf5df02f0083853dd5c1)
2014-04-15 22:31:54 +00:00
Ying Wang
114b46f15d Accomodate to the import syntax in build.prop.
Bug: 14024566
Change-Id: I71692244fabcd4d12f65849ffa027295b3a2a79a
(cherry picked from commit 092fea0d3e644573d7f0dbfe6692f42431f83c5c)
2014-04-15 20:28:53 +00:00
Doug Zongker
2a99239920 Merge "test block system image patch at build time" 2014-03-06 16:39:20 +00:00
Doug Zongker
922206ec2a move data wipe to end of OTA package
Now that OTA packages can be downloaded to /data, if they include a
data wipe we should do that last.

Change-Id: I75102fb2ff85d0f0110d55dfca06ec5f38104850
2014-03-04 13:16:24 -08:00
Doug Zongker
32b527d6cb test block system image patch at build time
After building a patch for the system image (for incremental block
OTAs), apply it to a local copy of the file and test that it succeeds.
This is an imperfect test as it's using the local client's
syspatch_host, which may differ from the syspatch library actually
used in the target build, but it's somewhat better than nothing.

Change-Id: Ic0001b0145881e2ebd4b5b36ce9b5bcebd76deb4
2014-03-04 10:03:02 -08:00
Doug Zongker
5fad2039bb handle don't care regions in the system image
The system partitions has regions that we shouldn't write and can't
depend on the contents of.  Adds a new script to generate a map of
these regions (using the sparse image as input), and include the map
in the package zip so it can be used when writing or patching the
system partition.

Also fixes a bug where the wrong SELinux file contexts are used when
generating incrementals.

Change-Id: Iaca5b967a3b7d1df843c7c21becc19b3f1633dad
2014-03-03 10:57:23 -08:00
Doug Zongker
25568486e5 add option to specify updater binary, for development
Change-Id: I5f239afff70c87fb16ddc4b8abefa7bbcda6040d
2014-03-03 10:21:27 -08:00
Doug Zongker
26e6619c37 add --block flag to ota_from_target_files
Add the --block flag to this script to control whether block-based OTA
packages are generated (defaults to off).  Make the full OTA package
produced by "make otapackage" continue to produce a block-based OTA.

Also fix a problem where block incremental OTAs didn't ever succeed,
and the --no_signing option never worked.

Change-Id: I610d0b4abed4b8b65fbe8ce0abaeec6cf52e14a1
2014-02-20 13:30:44 -08:00
Geremy Condra
d75d7128ce Merge "Add support for block incremental OTAs" 2014-02-20 21:10:39 +00:00
Geremy Condra
36bd365625 Add support for block incremental OTAs
Change-Id: Ie72015e34ed8d7595a5c74c8df41cba73275afab
2014-02-20 12:54:17 -08:00
Doug Zongker
4abfeaa358 Merge "rebuild recovery patch in sign_target_files_apks" 2014-02-20 16:33:36 +00:00
Doug Zongker
cf6d5a9074 bump releasetools python requirement to 2.7
These scripts already use some post-2.4 features, so let's make it
official: Python 2.7 is needed to run them.

Change-Id: I256e9ed99b0b62abe4e22a7b1f811acb7419e88e
2014-02-18 10:57:07 -08:00
Doug Zongker
412c02fffb rebuild recovery patch in sign_target_files_apks
The target_files zip should now contain the recovery-from-boot patch
and the script to install it.  This means that sign_target_files_apks,
which generates a signed target_files from an unsigned target_files,
now needs to recompute the patch and script (taking into account the
key replacement, property changes, etc., that it does) so its output
contains the correct patch.

Change-Id: I18afd73864ba5c480b7ec11de19d1f5e7763a8c0
2014-02-13 10:58:24 -08:00
Ying Wang
64a55babf2 Fix typo.
Change-Id: I01a1762fe449e02ff80a5ea7a3ee1c529e5da902
2014-02-05 12:15:06 -08:00
Ying Wang
d89ffa8623 Fix emulator builds
which don't have boot.img.

Change-Id: Id97a53c5356d435d9c70107ef047bed003769e22
2014-02-05 11:29:34 -08:00
Doug Zongker
01ce19c95f make full OTAs block based
Instead of writing individual files and fixing up their metadata, make
full OTAs contain a system image and simply write it to the block
device.

This is only done for target-files that already contain the recovery
flashing information, older target-files still get a file-based full
OTA.

Bug: 12893978
Change-Id: If7586083c8f275e24fec49d260af5b5aff4a0a88
2014-02-04 14:04:42 -08:00
Doug Zongker
c9253822ea add recovery update code to system images
Currently, the "img" zip files generated by the build system lack the
script and data needed to rewrite the recovery partition, while the
"ota" zip files do (when installed).

In order to move towards block-based OTAs, we want the result of
flashing an image and the result of installing the corresponding OTA
package to be identical.

Generate the recovery-from-boot patch and install script as part of
the process of building the target-files.  This requires breaking the
code to generate that out of ota_from_target_files into its own tool
that we can run from the Makefile.  (ota_from_target_files can still
do this, so it continues to work with older target-files.)

Bug: 12893978
Change-Id: I80e62268840780b81216e548be89b47baf81b4ac
2014-02-04 13:50:35 -08:00
Ying Wang
eb18125f2f am 0064dceb: am a8d15474: am 04cff708: resolved conflicts for merge of 7382ec7d to klp-dev-plus-aosp
* commit '0064dceb198788e237bbc10931c54b9a35275976':
  ota_from_target_files: Add an option to not sign OTA packages
2014-01-28 00:13:04 +00:00
Ying Wang
04cff70804 resolved conflicts for merge of 7382ec7d to klp-dev-plus-aosp
Change-Id: Ic414d3ec8b52b1045125e1b76deae8a4a59a5e52
2014-01-27 15:56:45 -08:00
Doug Zongker
eb0a78afc0 prefer releasetools.py from target_files zip
If the target_files zip for the target build contains a
META/releasetools.py (which it has since Nov 2013), prefer that over
using a releasetools.py from the local client.

Explicitly specifying the device-specific extensions path via
command-line options takes priority over both of the above mechanisms.

Change-Id: Ia068b0e2e06ede7da89ebe4315cdec592eb8995e
2014-01-27 10:03:23 -08:00
Takeshi Kanemoto
e153b34643 ota_from_target_files: Add an option to not sign OTA packages
Sometimes it is useful to be able to tell ota_from_target_files
to not sign the output zip file. For instance, the private
release key may not be available when ota_from_target_files
is executed; similarly the release tools may not be available
or executable where the private key is stored.

This change adds an option, '--no_signing', to simply output the
unsigned OTA zip file, instead of spuriously signing it with the
test key even though the zip file would need to be re-signed later
with a different key.

Change-Id: I1f3c4dc8ffa35ce85478f848b147aff3d40fe283
2014-01-27 15:01:04 +09:00
Michael Runge
52ad1d7043 am 1a4520a5: am d961b7d0: am 5636d07a: am a80542db: am 4038aa8f: Enabled incrementals to patch + rename moved files
* commit '1a4520a5680a05a360986b260d15e170ed899da5':
  Enabled incrementals to patch + rename moved files
2013-12-26 23:50:25 +00:00
Michael Runge
5636d07a29 am a80542db: am 4038aa8f: Enabled incrementals to patch + rename moved files
* commit 'a80542dbf4f193c59525b8749871bcdf4ae4283a':
  Enabled incrementals to patch + rename moved files
2013-12-26 15:33:27 -08:00
Michael Runge
4038aa8fff Enabled incrementals to patch + rename moved files
Change-Id: I551fc5291847e3ace15361c203d86f566c26da97
2013-12-16 11:29:51 -08:00
Ying Wang
c4b1577d6e resolved conflicts for merge of 1b53b6a7 to master
Change-Id: Id08fb8de4f136596fd39b651446ec96fc952427a
2013-12-11 15:27:46 -08:00
Ying Wang
d532077a8f am d270230f: Merge "sign_target_files_apks: rewrite build.prop correctly in eng builds"
* commit 'd270230fa49311901d8797a9e77865c37857d028':
  sign_target_files_apks: rewrite build.prop correctly in eng builds
2013-12-11 15:15:10 -08:00
Andrew Boie
73d5abbd3f sign_target_files_apks: rewrite build.prop correctly in eng builds
In eng builds, ro.display.id has many space separated items and was
resulting in an error when trying to rewrite it as 'value' gets
turned into a list and never converted back to a string.

Change-Id: I6c8633ed2eb52c56a4097992a32d53d80df4f844
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-12-11 13:23:15 -08:00
Doug Zongker
1ad7adeaa7 some builds don't have a build.prop?
Change-Id: I31ab106a1934ff4bb7076c184f4d7581336e16da
2013-12-06 11:53:27 -08:00
Doug Zongker
df12406ad8 Merge "fix timestamps in images to the build date" 2013-12-06 19:27:58 +00:00
Geremy Condra
6e8f53c276 Fix unsparse image reuse bug.
This would cause an existing sparse image to be reused by a
subsequent build, leading to verity failures.

Change-Id: I2082df3dfba014515c9267e02189fe9987a56830
2013-12-05 17:09:18 -08:00
Doug Zongker
850b80780d fix timestamps in images to the build date
Pass the -T option to mkuserimg.sh to set all timestamps in the system
image (and any other ext4 image we build) to the value of
ro.build.date.utc for the build.  This makes images produced from a
given target_files bit-identical.

Change-Id: Ibba5fa7a610f476209ef61708729cfd79dece0b6
2013-12-05 15:54:55 -08:00
Doug Zongker
b00398a07e am a6fadb61: am 57c9ffef: am 9b23f2cd: add option to generate two-step recovery files
* commit 'a6fadb61cae38089bc534f3cb995b98689f796cb':
  add option to generate two-step recovery files
2013-12-03 17:06:04 +00:00
Doug Zongker
a6fadb61ca am 57c9ffef: am 9b23f2cd: add option to generate two-step recovery files
* commit '57c9ffef30a6f34e126d8e89a08d208b05cc4901':
  add option to generate two-step recovery files
2013-12-03 08:58:11 -08:00
Doug Zongker
9b23f2cd78 add option to generate two-step recovery files
When run with the -2 option, ota_from_target_files will generate a
package (full or incremental) that does some extra reboots in order to
install the new recovery first, so that the rest of the installation
is done with the new recovery.  This can be useful if (say) the
package installation needs some features from the newer kernel.

For incremental packages, the verification phase is still done with
the old recovery.

This is only supported on devices where the misc partition is EMMC
(not MTD).

Two-step packages are slower to install and possibly confusing to
users (they will see their device reboot four times instead of twice),
so only use this option if necessary.

Change-Id: I3267d905e5e8eb1a1eb61bf48255b8b24ffc4ad1
2013-11-27 11:27:55 -08:00
Dave Langemak
cb067ad2f6 am c3644114: am 8ea83e90: am 96f56b6f: Merge "Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."" into klp-dev
* commit 'c3644114805150eef2f5035085878e5f860c7436':
  Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."
2013-11-21 22:59:47 -08:00
Dave Langemak
c364411480 am 8ea83e90: am 96f56b6f: Merge "Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."" into klp-dev
* commit '8ea83e902d931591af37e747763e768e7a6990be':
  Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."
2013-11-21 17:16:26 -08:00
Dave Langemak
96f56b6fcb Merge "Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."" into klp-dev 2013-11-22 01:08:53 +00:00
Michael Runge
90c60d3b92 Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."
This reverts commit 37335b4238.

Change-Id: I61cc125d3b08eaa300a7774b6607dbb43f0e7148
2013-11-22 00:52:51 +00:00
Geremy Condra
1f50400241 Fix a misnamed variable to fix the build.
Change-Id: Ia69d48ace0a6c10c5e6ea06714e52b8c937e213f
2013-11-17 18:10:55 -08:00
Geremy Condra
fd6f7513f8 Add support for verity builds to the build system.
Change-Id: I3ef908d8d52ec88de453b161bbc3f198517a72f1
2013-11-17 16:09:34 -08:00
Baligh Uddin
40d2cfc01e am 38f1aed0: am dcc645eb: am dd00a967: Merge "Revert the revert. (its time to sign MR1)" into klp-dev
* commit '38f1aed01d7bfeba6368d321f1233fa2b7903cb5':
  Revert the revert. (its time to sign MR1)
2013-11-12 19:28:54 -08:00
Baligh Uddin
38f1aed01d am dcc645eb: am dd00a967: Merge "Revert the revert. (its time to sign MR1)" into klp-dev
* commit 'dcc645ebb1a87982d2a067b8584ff167ae2c5287':
  Revert the revert. (its time to sign MR1)
2013-11-12 16:46:48 -08:00
Baligh Uddin
dd00a9677b Merge "Revert the revert. (its time to sign MR1)" into klp-dev 2013-11-13 00:38:47 +00:00
Baligh Uddin
beb6afdee2 Revert the revert. (its time to sign MR1)
Revert "Waiting till post MR0 - this impacts signing tools for MR0."

This reverts commit a7b5c4a7dc.

Bug: 11334314
Change-Id: I89f8996161e4258b80bf2d0bc7817f0e8e32df13
2013-11-13 00:23:10 +00:00
Michael Runge
c5d3cb362c am 3b44339d: am 37335b42: Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
* commit '3b44339d6a443fde57db4ae84a7e46823da6d162':
  Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
2013-11-07 16:13:15 -08:00
Michael Runge
3b44339d6a am 37335b42: Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
* commit '37335b42385970d957d48056145a3d4c4dbc6087':
  Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
2013-11-07 15:00:42 -08:00
Michael Runge
37335b4238 Enable incremental builder to find files that moved, and
try to process them via patch + rename, instead of
delete + add.

b/11437930

Change-Id: Ie70632a2fa0a13d4bb259f61c620bb01812494e5
2013-11-07 11:36:03 -08:00
Baligh Uddin
aa4a34ec1f am 31469e36: am a7b5c4a7: Waiting till post MR0 - this impacts signing tools for MR0.
* commit '31469e36e078e044e883aeb103888af3411e9691':
  Waiting till post MR0 - this impacts signing tools for MR0.
2013-10-23 18:32:47 -07:00
Baligh Uddin
31469e36e0 am a7b5c4a7: Waiting till post MR0 - this impacts signing tools for MR0.
* commit 'a7b5c4a7dc77a0896d6314828b9ce85f82d103e8':
  Waiting till post MR0 - this impacts signing tools for MR0.
2013-10-23 18:30:01 -07:00
Baligh Uddin
a7b5c4a7dc Waiting till post MR0 - this impacts signing tools for MR0.
Revert "Modify release tools to replace certs in MMAC files."

This reverts commit a6e0466ab5.

Change-Id: Ib7819185bad119013f307ce4301d5f02190e14ed
2013-10-23 16:53:43 +00:00
Robert Craig
a6e0466ab5 Modify release tools to replace certs in MMAC files.
Added support to perform a string replace of specified
dev keys with release keys when using the release tool
scripts.

Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>

(cherry picked from commit 817c574d75)

Change-Id: I51be8d62945436d3f374f51867295c5b792d4b53
Bug: 11334314
2013-10-22 13:54:46 -07:00
Ying Wang
717ee5ab0e am 13871a8f: resolved conflicts for merge of 65d5e788 to klp-dev-plus-aosp
* commit '13871a8f500b0f9a5e167be3487c1e8d1f92f327':
  Fix parsing string parameters in BOARD_MKBOOTIMG_ARGS
2013-09-13 17:56:51 -07:00
Ying Wang
13871a8f50 resolved conflicts for merge of 65d5e788 to klp-dev-plus-aosp
Change-Id: Iad8793c5e53b239425e9bba1b6a925265ff8d130
2013-09-13 17:50:29 -07:00
Nick Kralevich
69fecd43c1 am 46f00b61: am b5d4c0df: Merge "Update OTA to understand SELinux labels and capabilities" into klp-dev
* commit '46f00b6167f4c23dd4874abe9377bac85e965b2f':
  Update OTA to understand SELinux labels and capabilities
2013-09-10 13:17:18 -07:00
Nick Kralevich
46f00b6167 am b5d4c0df: Merge "Update OTA to understand SELinux labels and capabilities" into klp-dev
* commit 'b5d4c0df503966f2a050af64dfa15c84f2e12c15':
  Update OTA to understand SELinux labels and capabilities
2013-09-10 13:14:54 -07:00
Nick Kralevich
0eb17d9447 Update OTA to understand SELinux labels and capabilities
Update the OTA generation script to understand SELinux file
labels and file capabilities.

Make fs_config aware of SELinux labels and file capabilities, and
optionally output those elements whenever we output the
UID / GID / file perms. The information is emitted as a key=value pair
to allow for future extensibility.

Pass the SELinux file label and capabilities to the newly created
set_metadata() and set_metadata_recursive() calls. When the OTA
script fixes up filesystem permissions, it will also fix up the SELinux
labels and file capabilities.

If no SELinux label and capabilities are available for the file, use
the old set_perm and set_perm_recursive calls.

Bug: 8985290
Bug: 10183961
Bug: 10186213
Change-Id: I4fcfb2c234dbfb965cee9e62f060092a4274d22d
2013-09-10 12:30:43 -07:00
Jianxun Zhang
098494981d Fix parsing string parameters in BOARD_MKBOOTIMG_ARGS
The existing logic in common.py breaks string arguments incorrectly:
e.g. --para1 val1 --para2 "val2 is a string" will be output as:

'--para', 'val1, '--para2', 'val2' 'is' 'a' 'string'

This will cause mkbootimg command fails due to the invalid arguments
generated from the wrong parsing.

The patch fixes this issue to get:

'--para', 'val1, '--para2', 'val2 is a string'

Change-Id: Ia34ec357550f11ae9d6adc719d86a0c6a9099fbc
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
2013-08-27 15:31:13 -07:00
Ying Wang
430a46c024 am a3ee330a: am fa67740a: am 25977365: Merge "mkbootimg: Support custom mkbootimg implementation"
* commit 'a3ee330ac52e188c9545c022552572e0e9541577':
  mkbootimg: Support custom mkbootimg implementation
2013-08-19 14:31:17 -07:00
Ying Wang
a3ee330ac5 am fa67740a: am 25977365: Merge "mkbootimg: Support custom mkbootimg implementation"
* commit 'fa67740ae41fc068d9a9b5fbf5a7a06c36dbbdb1':
  mkbootimg: Support custom mkbootimg implementation
2013-08-19 14:29:32 -07:00
Bjorn Andersson
612e2cd0e8 mkbootimg: Support custom mkbootimg implementation
Support using custom mkbootimg to allow boards to specify custom
boot image formats. Also export this as the environment variable
MKBOOTIMG to the *_from_target_files releasetools scripts.

Change-Id: I2084273b1175de097fb7da5c4f2264ea8014d74f
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
2013-08-09 16:29:02 -07:00
Doug Zongker
bbd6073430 fix sign_target_files_apks on non-user builds
Not that these should ever be signed, but still, it shouldn't crash.

Change-Id: I2b837e2c77f6e81743f93c96f361fc187b4fb82b
2013-08-09 13:20:36 -07:00
Ying Wang
412bc2329f am 0a7e26e2: am a3f69c93: Merge "Modify release tools to replace certs in MMAC files."
* commit '0a7e26e29dfb5efbb008ced7509931e5e5eb4d71':
  Modify release tools to replace certs in MMAC files.
2013-08-09 12:47:17 -07:00
Robert Craig
817c574d75 Modify release tools to replace certs in MMAC files.
Added support to perform a string replace of specified
dev keys with release keys when using the release tool
scripts.

Change-Id: Id0e945b0d62720c41f5ca9764a00de4bcdecaab4
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-08-09 07:20:52 -04:00
Doug Zongker
a8608a7f7c distinguish signed and unsigned user builds in UI
Add "dev-keys" or "test-keys" to the value of ro.build.display.id for
user builds.  (This is the property that is displayed under "Build
number" in the Settings UI.)  Modify the signing script to remove the
keys tag from this value when signing.

Change-Id: I3d9d92056f8567d7f84b1be047619be7c6e4c419
2013-07-23 11:51:04 -07:00
T.R. Fullhart
37e1052c99 Add support for using custom signapk.jar.
Details:
* New --signapk_path, --extra_signapk_args, --java_path.
* New --public_key_suffix, --private_key_suffix so you can change the filenames.
* Fixes raising exceptions on error.

Change-Id: I0b7014b6d779d52ae896f95dfecb1bcccf536cf4
(cherry picked from commit a28acc6972)
2013-06-05 22:17:59 +00:00
T.R. Fullhart
e9a1f47e65 Merge "Add support for using custom signapk.jar." 2013-06-05 17:50:40 +00:00
T.R. Fullhart
a28acc6972 Add support for using custom signapk.jar.
Details:
* New --signapk_path, --extra_signapk_args, --java_path.
* New --public_key_suffix, --private_key_suffix so you can change the filenames.
* Fixes raising exceptions on error.

Change-Id: I0b7014b6d779d52ae896f95dfecb1bcccf536cf4
2013-06-05 09:57:55 -07:00
Doug Zongker
0d92f1f13a improve OTA failure messages
Replace OTA script constructs of the form:

   assert(foo);

with

   foo || abort("sensible message");

so that the log and the on-screen display is somewhat more accessible
to non-experts.  (assert() displays the source code of the false
expression 'foo'.)

Change-Id: Ic99448e4466561d305b167cd4d5c1f0f2dbadcce
2013-06-03 12:07:12 -07:00
Kenny Root
e2e9f613b5 Fix signing process for SELinux file_contexts
When not building locally and just using a target-files.zip from some
other build, it still tries to access the file_contexts from the out/
directory. This change instead looks at the unzipped target-files.zip
hierarchy to grab that information.

Bug: 9191141
Change-Id: I6ea12e82d6c6376fcada412314c5eefc97ff4853
2013-05-29 14:38:48 -07:00
Ying Wang
a0febe5e6d Support to build vendor.img
Bug: 8341435
Change-Id: I2db7970936984d38aed35054e3f695d298f4e512
2013-03-25 09:53:16 -07:00
Ying Wang
d7321d31ac Skip userdata.img only if partition size is not give for extfs.
We still build yaffs2 images which don't need partition size.

Change-Id: I9c7f45069f25868666a257cee044faecf1a8781a
2013-03-15 10:32:29 -07:00
Ying Wang
6a42a25429 Run e2fsck only when building images with the target files.
With this change, e2fsck is run only when you build the update.zip file,
which is built when "dist" is among the make command.

Bug: 7591683
Change-Id: I446b71d5aa9295aff3af622f115175f769746615
2013-02-27 13:54:02 -08:00
Ken Sumrall
3b07cf1277 Add unified fstab support to release tools
Update the release tools to be able to handle the new unified fstab.

Change-Id: Id9d1810c89aba415e83ae2fc586520f148ec73ef
2013-02-21 16:26:46 -08:00
Ying Wang
a7c8f72b40 Use the correct size key
At this point, userdata_size has been converted to partition_size in
build_image.ImagePropFromGlobalDict().

Change-Id: Ida6be1905ca3109c2660274a16359a9f3fbcd94d
2012-11-27 11:29:11 -08:00
Ying Wang
69e9b4d6d1 Run e2fsck on built sparse images.
Bug: 7591683
Change-Id: Id1cba79f7840aab1f0327cb741eda655b45d1b46
2012-11-27 09:57:17 -08:00
Ying Wang
4e3f44f356 Skip userdata.img if no size is provided when building images from target files
Change-Id: Iab5c510fcc7608c4b109781e6595ab8964f4c543
2012-11-19 10:38:44 -08:00
Doug Zongker
b32161a2a5 change recovery partition construction to use resource .dat
When /system/etc/recovery-resource.dat is available, use it to
construct the recovery-from-boot patch.

Change-Id: I1575f7d284711323186ca6823842eb2a866fd890
2012-08-21 10:33:44 -07:00
Doug Zongker
1eb74dd9a0 load SYSTEM/build.prop into the info_dict
Change-Id: Ic747106ba11773ffc9c2eebc163cfd22b1d7a4d5
2012-08-16 16:19:00 -07:00
Doug Zongker
24cd280328 allow diff program to be selected explicitly
Change-Id: I1d8df9cc3ed35cc5983bc50fc13975db32072dbe
2012-08-14 16:36:15 -07:00
Doug Zongker
d513160b76 add extra args to mkbootimg
Arrange to take $(BOARD_MKBOOTIMG_ARGS) and pass it to all invocations
of mkbootimg from within make, and to store it in the target_files so
it can be used by future invocations of img_from_target_files and
ota_from_target_files.

Bug: 6918260
Change-Id: I7130ac52e96bd51d4d8b80ca036635e1626f01f1
2012-08-02 15:03:41 -07:00
Doug Zongker
fffe1d5e9c use the file uid/gid/mode saved in the target_files
When building a bootable image with mkbootfs, use the set of file
metadata that's stored in the target_files zip (when available),
rather than whatever is built into the mkbootfs binary at the time the
image is built.

Bug: 6435132
Change-Id: If6c59149bdbcc9a67e5ab9161398f355bd1f511d
2012-05-03 16:15:29 -07:00
Kenny Root
f32dc71e49 resolved conflicts for merge of a86fcc29 to master
Change-Id: I3868c19bfd309b5b43b5642152a120931fe37315
2012-04-09 14:59:04 -07:00
Stephen Smalley
56882bf9b4 Support the setting of file security contexts in OTA and update packages.
Pass the file_contexts configuration to the releasetools scripts
so that the security contexts of files can be properly set for OTA
and update packages.

Requires Ica5fb73d6f2ffb981b74d1896538988dbc4d9b24

Change-Id: I5a63fd61a7e74d386d0803946d06bcf2fa8a857e
2012-04-06 15:35:41 -04:00
Doug Zongker
1807e700a5 don't generate retouch commands in OTA scripts
Doing ASLR at OTA time is now obsolete; we can stop emitting this code
in OTA scripts.

Change-Id: I2bcf8ef0697ea5590120f89dcd302f273daf531e
2012-02-28 12:21:08 -08:00
Andrew Boie
0f9aec837f releasetools: Fix image size checking
A block of code that should be evaluated for all
image types was instead only being run for yaffs
partitions.

Change-Id: I83ccbd7fa3c1bc02b9bba0832701ecc258e40a7d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-02-21 12:45:23 -08:00
Doug Zongker
e5ff5907be add device-specific hooks at start of OTA phases
Change-Id: I47534e6d40e7918ee8cb9e87d76d9030b9273708
2012-01-17 10:55:37 -08:00
Doug Zongker
bd2dadc21a check entire recovery partition on startup
Checksum the entire recovery partition at boot time to see if we need
to rewrite it, rather than just the first 2kb.

Bug: 5668350
Change-Id: I777754f92e8da630ae3c09bb0d4c41884ff62f39
2011-12-02 13:55:57 -08:00
Doug Zongker
0276d18873 check entire recovery partition on startup
Checksum the entire recovery partition at boot time to see if we need
to rewrite it, rather than just the first 2kb.

Bug: 5668350
Change-Id: I777754f92e8da630ae3c09bb0d4c41884ff62f39
2011-12-02 10:46:59 -08:00
Doug Zongker
402839d17a am 29ea81eb: am 4a84a13e: am a5f534df: use frozensets to represent APK cert sets
* commit '29ea81eb977699a2b026f08d13f213a7d216cb7e':
  use frozensets to represent APK cert sets
2011-11-11 20:36:58 -08:00
Doug Zongker
a5f534df07 use frozensets to represent APK cert sets
Change-Id: Ic92c83be0c3f6a76bf1bd21f0216cd1b87586959
2011-11-11 09:51:37 -08:00
Ying Wang
9f8e8db188 Build cache.img on demand
Bug: 5153694
To build cache.img, set BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE (required,
ext4 only for now), BOARD_CACHEIMAGE_PARTITION_SIZE (optional) in
BoardConfig.mk.

Change-Id: I1d8b91646aa1dba88285e008ad3335768bcbddd2
2011-11-10 14:30:34 -08:00
Doug Zongker
4906f456a4 am 53bef54c: am 4b87f575: am 278c9781: to be upgraded, APKs must have exactly the same set of certs
* commit '53bef54cfff0cb9c6a67494b3e385a9617f75d03':
  to be upgraded, APKs must have exactly the same set of certs
2011-11-10 16:14:42 +00:00
Doug Zongker
278c9781ec to be upgraded, APKs must have exactly the same set of certs
Change-Id: I0d528d3d55e5ee553e57e63ed1f998172c6306f8
2011-11-09 10:32:23 -08:00
Ying Wang
c0debb9b5e Revert "Build cache.img."
This reverts commit 531bdb546a.
2011-11-02 11:19:28 -07:00
Ying Wang
531bdb546a Build cache.img.
Change-Id: I3dbe7afa4934fa718ba20605eebd2e3ce2ae82ab
2011-11-01 10:44:19 -07:00
Ying Wang
bd93d425ae Unify the user image building code
Bug: 5398808

Before this change we have duplicate code in the Makefile and the
python-based releasetool. That's a real headache to maintain.

Change-Id: I8ddf04a79c6886540e89d990f723d8f77c9dd883
2011-10-31 17:11:35 -07:00
Jeff Davidson
033fbe28c2 Support signing target_files without a recovery.fstab.
Change-Id: I7d6f511c69d589bf035ac3eb7eeee4b0e0505faa
2011-10-26 18:16:13 -07:00
Doug Zongker
b11e2d78ec add missing parameter to ReplaceOtaKeys
Change-Id: Ib596235a8e3b3588d363fea82b92b69895ee5408
2011-10-05 11:23:06 -07:00
Doug Zongker
831840e51b change OTA tools to handle variable dev keys
The signing and OTA-building tools now understand the
default_sys_dev_certificate value which may be present in the
META/misc_info.txt file of the target-files packages.

Change-Id: I64f09ec0b77a5184b6ddb74019255518776ee773
2011-10-04 16:02:01 -07:00
Doug Zongker
b40a58e4b3 allow APKs to be signed with multiple certs
The Package Manager handles this now.  To share a UID, all packages
must be signed with exactly the same set of certs.

Change-Id: I2fd08923f55f02ae2f1d503266ab124be2472921
2011-09-29 13:22:57 -07:00
Doug Zongker
e92f15a858 patch the /system/build.prop file last
Works around a problem observed on a retail device: incremental update
from build 1 to build 2 partially completed, leaving a mix of files
from the two builds.  (Why it booted into the regular system instead
of recovery to restart update installation is still a mystery.)
build.prop was one of the files updated, so the device reported itself
as having build 2.  The device hobbled along for months in this state,
until build 3 was released and the 2-to-3 incremental package
repeatedly failed (because some of the files it was trying to patch
were build 1).

This change makes updating build.prop the very last thing does by an
incremental update script, so if installation is aborted and the
regular system starts (and works at all), it will continue reporting
itself as build 1 and be sent the 1-to-2 OTA package again.

Change-Id: I1edc1dcef2bd2495b6fd96517c2f4c574b994f27
2011-08-26 13:46:40 -07:00
Ying Wang
bed0a19583 am 6d38bdfc: resolved conflicts for merge of a74a4811 to honeycomb-plus-aosp
* commit '6d38bdfc7b9ff699370b4a40dcbdddce0ea713b8':
  sha module is deprecated
2011-08-11 16:59:48 -07:00
Ying Wang
6d38bdfc7b resolved conflicts for merge of a74a4811 to honeycomb-plus-aosp
Change-Id: I8400ac2bead6aa1a9902d44bf65906084ad353ad
2011-08-11 16:55:00 -07:00
david
cad0bb9f62 sha module is deprecated
This patch removes the deprecated warnings from the python
scripts.

Change-Id: I052a0aab3fb28dd1d78de1307edafda6b6c35e5f
2011-08-10 17:48:04 -07:00
Doug Zongker
02da210a5c pass blobs to write_raw_image() instead of using temp file
Change-Id: I73b71541596612552d52a8f7b1ccdd74451ac6fc
2011-04-12 15:50:17 -07:00
Ying Wang
eb68729bf3 am 080ed92e: Merge "Close inherited PIPE before doing work" into gingerbread
* commit '080ed92e77fc7c24ca3bac1a1dc06057390bfdb8':
  Close inherited PIPE before doing work
2011-03-15 18:21:20 -07:00
Ying Wang
080ed92e77 Merge "Close inherited PIPE before doing work" into gingerbread 2011-03-15 17:49:05 -07:00
Ying Wang
70d6ec5f9b resolved conflicts for merge of 0a1f3236 to honeycomb-plus-aosp
Change-Id: I6596f4a65a99eed98bdca2d8a6840bc378297b6d
2011-03-07 11:07:12 -08:00
Ying Wang
0a1f3236e3 am a73b6561: Drop support for target files with no recovery.fstab.
* commit 'a73b6561cee39ad416f4af327dbe72ec565d2423':
  Drop support for target files with no recovery.fstab.
2011-03-04 17:13:04 -08:00
Ying Wang
a73b6561ce Drop support for target files with no recovery.fstab.
Change-Id: I099298cfffc2546975732a3bf0df60f96ccbdac4
Meanwhile don't build the ota and update zip files if no recovery.fstab
found.
2011-03-04 14:42:13 -08:00
Doug Zongker
369985c6f2 remove vestigial WriteFirmwareImage function
Nothing calls this, and the updater function it calls no longer
exists.  The HTC-device-specific thing it used to do was moved to HTC
extension libraries.

Change-Id: I2252adf44ea0c5beb6e9379215d7337880f66f68
2011-03-02 10:57:06 -08:00
Doug Zongker
ca855e9c0a increase java heap size when signing packages
Large OTA packages are causing signapk to run out of memory.

Change-Id: I511b9b5fb2d303805006ca76458f44bf72faeff2
2011-02-23 09:25:01 -08:00
Doug Zongker
086cbb0acb read partition length from recovery.fstab
Don't hardcode magical partition behavior in the script generator.

Change-Id: I4aeea022f8a32a7c9f316be2c2514510344ca0e0
2011-02-23 09:04:33 -08:00
Ying Wang
7e6d4e45d9 Close inherited PIPE before doing work
Gmake in Darwin has file descriptor leak.
In a full build, ota_from_target_files will inherits
more than 2000 open PIPEs from gmake and fails in a call to select.select().
This change fixes the build by closing the PIPEs before doing real work.

Change-Id: Ie7035d7add0b1da3afb6bf9c2009d40f8c7d29b3
2011-02-10 11:36:43 -08:00
Doug Zongker
e121d6acf4 support TARGET_EXTRA_RECOVERY_KEYS
Specifying one or more key files (without .x509.pem extension) as
TARGET_EXTRA_RECOVERY_KEYS causes them to be included as acceptable
keys for recovery packages.  They are *not* included in otacerts.zip,
so actual downloaded over-the-air packages can't use them, but they
can be used to sign sideload-only packages.

Bug: 3413359
Change-Id: I6f248ffa35f0c6b125dd8a7517493017e236c776
2011-02-01 14:13:52 -08:00
Doug Zongker
6ae5381670 fix check_target_files_signatures
common.UnzipTemp now returns a 2-tuple instead of just a string.

Bug: 3398407
Change-Id: Ifd0408283aaa15752caa549f4510a0a3db03c3fd
2011-01-27 10:20:27 -08:00
Doug Zongker
55d932840f support use of prebuilt bootable images
img_from_target_files now, with the -z flag, will produce an output
zip with only the bootable partitions (boot and recovery).

img_ and ota_from_target_files can take, instead of a simple
"target_files.zip", a name of the form
"target_files.zip+bootable_images.zip", where the second zip contains
bootable images that should be used instead of building them from the
target_files.zip.  (This should be the zip produced by the above -z
flag, perhaps with the images messed with in some way, such as by an
unnamed OEM's extra signature wrapper for their "secure boot"
process.)

Bug: 3391371
Change-Id: Iaf96dfc8f30e806ae342dcf3241566e76ae372d4
2011-01-25 17:07:09 -08:00
Michael Chan
b43ac8fc2f Fix build break
Change-Id: Ie07f042a9f25bf3329cf2cea8fdeea3e208da775
2011-01-19 21:12:41 -08:00
Ken Sumrall
a67616acfd Teach the build system to reserve the last 16 Kbytes of /data for the crypto footer
If making /data and it's an EMMC interface, reserve the last 16 Kbytes
of the partition for the crypto footer.

Change-Id: Ia2c0bb53a545f074e79fc9d6ac04faee75fb9be4
2011-01-19 17:14:51 -08:00
Ying Wang
085a14698b Product-configurable sparse ext images.
Also pass extfs sparse image flag to the release tool.

Change-Id: I79a6a71873634a231aa8990cee22374259601505
2010-12-28 13:41:33 -08:00
Ying Wang
f9bbfb5772 Close inherited PIPE before doing work
Gmake in Darwin has file descriptor leak.
In a full build, ota_from_target_files will inherits
more than 2000 open PIPEs from gmake and fails in a call to select.select().
This change fixes the build by closing the PIPEs before doing real work.

Change-Id: Ife021382198642a97bbbf0b623e4f24f3d86b2b2
2010-12-13 16:25:36 -08:00
Ying Wang
c5a07ce038 Pass extfs sparse image flag to the release tool.
Change-Id: Icb2a1c4fddb2b6153298ba1b849016aa3d792773
2010-11-17 17:45:36 -08:00
Ying Wang
421b46e0cb resolved conflicts for merge of 18c00c5c to master
Change-Id: I7f6870b654e24a268a14b9c47eb8d384993273f2
2010-09-28 10:45:54 -07:00
Ying Wang
026f1451ce Fix userdata partition's ext4 mount point to data.
Bug: 3041475
Change-Id: I07306cd9c90072626dfc132d6655618ae70e64be
2010-09-27 17:49:03 -07:00
Doug Zongker
e1c292a06b am 8317e664: am 96a57e73: make info_dict and GetTypeAndDevice available to device extensions
Merge commit '8317e66433903badaec8ebd2b9ec2b8153f3d612'

* commit '8317e66433903badaec8ebd2b9ec2b8153f3d612':
  make info_dict and GetTypeAndDevice available to device extensions
2010-09-26 15:17:44 -07:00
Doug Zongker
96a57e7377 make info_dict and GetTypeAndDevice available to device extensions
Change-Id: I3aa04cb6d7988fc1fdd7f179634b09ceab5749fb
2010-09-26 14:57:41 -07:00
Doug Zongker
f2ab290550 accommodate both new and old target-files when creating incrementals
(cherry-picked from gingerbread.)

Change-Id: I925bf122b0012302a85c0b6f04cca48eb694b0c4
2010-09-22 10:17:31 -07:00
Doug Zongker
780c237270 accommodate both new and old target-files when creating incrementals (do not merge)
Change-Id: Ibc211164bf1dee8275e15d10cbe81b63d666069f
2010-09-22 10:12:54 -07:00
Doug Zongker
539db3b845 resolved conflicts for merge of e1daf61d to master
Change-Id: Idf5767f68dd19b51940ea69528cdd389b04d56b9
2010-09-21 20:10:32 -07:00
Doug Zongker
ad806982c1 arg: system_size, not system_img
Change-Id: Iba5d10204c93159a4f12ea8e8d8687db5b9dd5ca
2010-09-21 17:22:14 -07:00
Doug Zongker
33a4b08b15 fall back to MTD if no recovery.fstab is present
Needed for non-device builds (like for the emulator) to work.

Change-Id: I5fdbfb3af34821811744e8ce5bf1eff8df344c73
2010-09-21 16:12:55 -07:00
Doug Zongker
c0434ac8b5 add recovery.fstab as dependency so it triggers rebuild (do not merge)
Make recovery image depend on the fstab file so it gets rebuilt when
fstab changes.  Add support for "emmc" fstab partition type to
edify_generator.

Change-Id: Ic5df4e86c24321bf7d82a644e3e4770352e4f64b
2010-09-21 14:26:36 -07:00
Doug Zongker
9ce0fb6e59 support for per-partition fs_type
Include the recovery.fstab file in the recovery image.  Remove the
global fs_type and partition_type values from the target-files
key/value dict, and parse the recovery.fstab file instead to find
types for each partition.

(Cherrypicked from gingerbread w/some edits to resolve conflicts.)

Change-Id: Ic3ed85ac5672d8fe20280dacf43d5b82053311bb
2010-09-21 14:13:11 -07:00
Doug Zongker
258bf46ea6 support for per-partition fs_type (do not merge)
Include the recovery.fstab file in the recovery image.  Remove the
global fs_type and partition_type values from the target-files
key/value dict, and parse the recovery.fstab file instead to find
types for each partition.

Change-Id: I35ee2dd0989441dc2a704b63c1b32e598049acb5
2010-09-21 09:55:29 -07:00
Doug Zongker
cb269124bb am 25df2a98: am 6be030af: Merge "remove remaining refs to max_image_sizes" into gingerbread
Merge commit '25df2a980d87f011fe702b6209c3b71b2824fc18'

* commit '25df2a980d87f011fe702b6209c3b71b2824fc18':
  remove remaining refs to max_image_sizes
2010-09-17 08:24:37 -07:00
Doug Zongker
1684d9c0cf remove remaining refs to max_image_sizes
Change-Id: I7e4686bc06f9c3eab2df34d092021c549738b217
2010-09-17 07:45:30 -07:00
Doug Zongker
b984ae51e5 resolved conflicts for merge of 813ad17a to master
Change-Id: I3fc84babbbcab712c5e38a0c8b815115ba89375f
2010-09-16 23:13:11 -07:00
Doug Zongker
37974731fc consolidate target_files metadata into one key-value file
Instead of separate files for recovery api version, tool extensions,
and mkyaffs2 options, put those all in the generic key-value file.

Change-Id: Ib642311632844d52e4895fd4747093fc7e86232d
2010-09-16 17:44:38 -07:00
Doug Zongker
486de126e3 only do size check for yaffs images; fix incremental info dict
Change-Id: Ic862000a23b93289604b0737bfcaf8d461f36ff8
2010-09-16 14:01:56 -07:00
Doug Zongker
9b3944ed8c am 4d197be3: am ec5ffbab: allow partition sizes in hex (when prefixed with 0x)
Merge commit '4d197be33970a163e8e38ba1b685718784498e43'

* commit '4d197be33970a163e8e38ba1b685718784498e43':
  allow partition sizes in hex (when prefixed with 0x)
2010-09-16 13:08:25 -07:00
Doug Zongker
ec5ffbabd3 allow partition sizes in hex (when prefixed with 0x)
Change-Id: I806879fd496304c449ff5315b0ef48fd766d6428
2010-09-16 13:01:26 -07:00
Doug Zongker
f127eb709b resolved conflicts for merge of 2cb8d5eb to master
Change-Id: I3b1aec1aee7c6bfcee2e978b4755b2bae9e480c4
2010-09-16 12:38:40 -07:00
Doug Zongker
c77a9ad444 store user-visible image sizes in target-files
Do the yaffs-specific adjustments to image sizes in common.CheckSize,
instead of baking it into the image size stored in the target-files
package.  Remove the special fs_type flag and fold it into the
"info_dict" we have for saving key-value pairs from the build system.

Change-Id: I6e63f3330f6277d9a946b22e66cadeb51203ba14
2010-09-16 12:29:17 -07:00
Doug Zongker
c19a8d5590 support for ext4/EMMC in target_files and OTA generation
Move the image sizes into a more generic key-value file.  Make them
optional.  Add additional key/value pairs describing what kind of
filesystem the device uses.  Pass new fs-type-related arguments in
edify scripts when mounting and reformatting partitions.

Don't include all the init.*.rc files from the regular system in
recovery -- they aren't needed, and break recovery on some devices.

Change-Id: Ic1c651f754ed00ba1cffe8cf56c43f7f3b0ebfd7
2010-09-16 11:34:31 -07:00
Doug Zongker
d3b5916be6 resolved conflicts for merge of 8ae62ec7 to master
Change-Id: Ieb424d1a8467ca13dae43190387e1137c1e396c9
2010-09-13 14:37:20 -07:00
Doug Zongker
ea5d7a9de7 move File and Difference classes into common script
This makes them accessible from device-specific extensions (so they
can be used to send radio images as binary patches, for instance).

Change-Id: I2f2174b93b4265abf9400f9e5a0982caca0771e9
2010-09-12 15:26:16 -07:00
Doug Zongker
5c3dc2ad44 am 9314823c: am 93d574f8: Merge "return to using subprocess for running commands" into gingerbread
Merge commit '9314823c06d4434bf18d589c2fdea490428becf8'

* commit '9314823c06d4434bf18d589c2fdea490428becf8':
  return to using subprocess for running commands
2010-09-03 14:35:49 -07:00
Doug Zongker
93d574f8c5 Merge "return to using subprocess for running commands" into gingerbread 2010-09-03 14:31:03 -07:00
Doug Zongker
39a984550f return to using subprocess for running commands
Reverts Ic4f1c747 and fixes the problem by splitting the extra_flags
argument (it wasn't working before because it was getting one argument
"-c 4096 -s 128" instead of four arguments "-c", "4096", "-s", "128"
and mkyaffs2image apparently just ignores that bogus argument?)

Change-Id: Ib1e08d634aa68bfab0f7e09680d407f2cee0797d
2010-09-03 14:15:34 -07:00
Doug Zongker
c60c1bafa0 resolved conflicts for merge of a4a50996 to master
Change-Id: I52c617ff43aaf9e86b8fb7a2e9c305127566971a
2010-09-03 13:22:38 -07:00
Doug Zongker
c637db16d8 remove remaining amend support
Remove the remaining (unused and untested) support for generating
amend scripts.  This means that you won't be able to OTA directly from
cupcake to gingerbread.

Change-Id: Iaf5295db92a42b336960d05295f48b67cb729337
2010-09-03 11:58:31 -07:00