Commit graph

188 commits

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