Commit graph

45 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Ying Wang
e238e5af4c am a9703989: am ae553143: Refactor a bit.
Merge commit 'a97039890e6a1999327cb3e9f2a28bf077a96e07'

* commit 'a97039890e6a1999327cb3e9f2a28bf077a96e07':
  Refactor a bit.
2010-08-27 15:52:03 -07:00
Ying Wang
a4b6db9bf0 am cef82129: am aa6dbe21: Try to fix system.img in update zip file.
Merge commit 'cef82129e1b2a26f883c20521d79175747eac434'

* commit 'cef82129e1b2a26f883c20521d79175747eac434':
  Try to fix system.img in update zip file.
2010-08-27 12:14:58 -07:00
Ying Wang
ae55314348 Refactor a bit.
Change-Id: I4573e7a5239536f49571d9222865e2526da573c8
2010-08-26 16:04:09 -07:00
Ying Wang
aa6dbe2144 Try to fix system.img in update zip file.
Change-Id: Ic4f1c7478a22b1f8134ac768904e437fcfea700a
2010-08-26 15:16:22 -07:00
Ying Wang
f5127dfc3d am 485bd44d: am d421f57d: Fix mkyaffs2image extra flags in the release tools.
Merge commit '485bd44d0d78f9f612075e17db1adb281741c84f'

* commit '485bd44d0d78f9f612075e17db1adb281741c84f':
  Fix mkyaffs2image extra flags in the release tools.
2010-08-25 21:21:43 -07:00
Ying Wang
d421f57d22 Fix mkyaffs2image extra flags in the release tools.
Change-Id: I806e3e85ef89941edf04352331e25730c491c470
2010-08-25 20:39:41 -07:00
Ying Wang
ee4bad51bc Disable CheckSize on ext partitions to fix build [DO NOT MERGE]
Original CL: 59920

Change-Id: I81437996670a61e10284293d25a08da8907ad296
2010-08-24 11:18:07 -07:00
Ying Wang
065521be4f Backport ext4 support from master [DO NOT MERGE]
ext4 support is needed by crespo.

Change-Id: I604cb9ada526ce8ba6b3648171ac1d614a5519a9
2010-08-23 11:34:40 -07:00
Colin Cross
48642604fd Disable CheckSize on ext partitions to fix build
Change-Id: I66c67f8bbd84eb9da988b4079ad4c36089c1c930
2010-08-03 22:54:30 -07:00
Ying Wang
ee81cd931c Pass partition size to mkuserimg.sh
Change-Id: Id6a53d8d552e8ce1bdf83fbb756724454e05e5c8
2010-08-03 18:05:25 -07:00
Doug Zongker
b4c7d32cba 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: I40e49e65f0d76f735259e4b4fef882322cd739da
2010-07-01 15:30:11 -07:00
Ying Wang
933abf15bc extfs support for img_from_target_files
Change-Id: Ie3df70426066bff467792b8528bc4528eb6afe15
2010-06-17 11:25:27 -07:00
Mike Ritter
e44fadeb49 Bug in Mac build where it gets confused over case, fix no longer needed. 2009-09-15 11:18:31 -07:00
Doug Zongker
fdd8e69c42 use the max image sizes from the target files zip
For some time now the build system has included all the max image
sizes in a file in the META directory.  Use these instead of needing
to parse the BoardConfig.mk file for the device at the time of
building an image or OTA package.
2009-08-03 17:27:48 -07:00
Doug Zongker
048e7ca15f fix archive files being created with perms 000
In python 2.5 and earlier, ZipFile.writestr(filename, data) results in
the file being added to the archive with permissions 000.  (See
http://svn.python.org/view?view=rev&revision=65235.)  Work around this
by creating a ZipInfo object and setting the permissions explicitly.
2009-06-15 14:31:53 -07:00
Doug Zongker
eef3944eb3 AI 144270: am: CL 144269 Relocate the new (google-indepedent) tools for signing and
building images & OTA packages out of vendor/google.
  No device code is touched by this change.
  Original author: dougz
  Merged from: //branches/cupcake/...

Automated import of CL 144270
2009-04-02 12:14:19 -07:00