Commit graph

6930 commits

Author SHA1 Message Date
Doug Zongker
23412e6f14 fix compile warnings in recovery, change images
gcc 4.4 complains about some of the recovery ui functions not being
declared.  To include the header, we have to fix the 'volatile'
declaration (otherwise there's a compiler error).

Move the dream-specific images to vendor/htc/dream, make the default
images a generic phone.
2009-07-23 10:36:43 -07:00
Doug Zongker
608fa02e1a resolved conflicts for merge of 64893ccc to master 2009-07-15 18:10:28 -07:00
Doug Zongker
64893ccc09 remove amend
Yank all the code to install OTA packages out of the recovery binary
itself.  Now packages are installed by a binary included in the
package (run as a child of recovery), so we can make improvements in
the installation process without waiting for a new release to use
them.
2009-07-14 16:58:42 -07:00
Doug Zongker
c457ff6436 am bec02d57: skip over all-zero blocks when reading MTD partition
Merge commit 'bec02d57fb85cc7dd0196a54b0e9530e306623ac'

* commit 'bec02d57fb85cc7dd0196a54b0e9530e306623ac':
  skip over all-zero blocks when reading MTD partition
2009-07-02 15:24:19 -07:00
Doug Zongker
bec02d57fb skip over all-zero blocks when reading MTD partition
We fail to detect certain bad blocks (marked in the factory as bad, I
think?) when reading mtd partitions.  These come back as a block of
all zeros.  Since it's fairly unlikely a legitimate boot or recovery
block will contain 128k of zeros, change mtdutils to skip over such
blocks.

Arve says https://review.source.android.com/10535 may be a long-term
fix for this, but he isn't yet sure.
2009-07-01 12:09:29 -07:00
Android (Google) Code Review
fc382dfc75 am d8f7c9b8: Merge change 5545 into donut
Merge commit 'd8f7c9b85e25fab93fef2221a84b60edc2e7b837'

* commit 'd8f7c9b85e25fab93fef2221a84b60edc2e7b837':
  remove updater from the user system image
2009-06-29 16:39:15 -07:00
Android (Google) Code Review
d8f7c9b85e Merge change 5545 into donut
* changes:
  remove updater from the user system image
2009-06-26 14:42:37 -07:00
Doug Zongker
ad3db099d5 remove updater from the user system image
updater (which is only needed in OTA packages) is getting included in
/system/bin, where it just takes up (quite a bit of) space.  Use the
hack of including it only in eng builds so it's not there for user
builds.
2009-06-26 13:38:55 -07:00
Doug Zongker
898ef399d3 am 0bbfe3d9: fix off-by-one error in set_perm()
Merge commit '0bbfe3d901885c1f0ab006e8d4cc1029c44a7376'

* commit '0bbfe3d901885c1f0ab006e8d4cc1029c44a7376':
  fix off-by-one error in set_perm()
2009-06-25 14:34:03 -07:00
Doug Zongker
0bbfe3d901 fix off-by-one error in set_perm()
We were inadvertently skipping over the first filename in the list of
arguments.
2009-06-25 13:37:31 -07:00
Doug Zongker
4275c3cfc8 am fbf3c10e: improve updater progress bar
Merge commit 'fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454'

* commit 'fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454':
  improve updater progress bar
2009-06-24 17:39:16 -07:00
Doug Zongker
fbf3c10e45 improve updater progress bar
Let recovery accept set_progress commands to control progress over the
'current segment' of the bar.  Add a set_progress() builtin to the
updater binary.
2009-06-24 09:36:20 -07:00
Doug Zongker
2b0fdc6571 add device extension mechanism to updater
Allow devices (in BoardConfig.mk) to define additional static
libraries to be linked in to updater, to make device-specific
functions available in edify scripts.  Modify the updater makefile to
arrange for device libraries to register their edify functions.
2009-06-22 14:00:44 -07:00
Doug Zongker
b128f54d0d add function for device-specific wipe data features
Some devices want to do special things when recovery wipes data (eg,
wipe data in their baseband processor as well).  Add a hook in the
device-specific recovery library that gets called when data is wiped.

Also add an amend root for the "mbm" partition.
2009-06-18 15:07:14 -07:00
Doug Zongker
f8aaf0a77f am 47cace98: add file_getprop() to updater
Merge commit '47cace98369f60df2351a65801c8065bb7f9dbf0'

* commit '47cace98369f60df2351a65801c8065bb7f9dbf0':
  add file_getprop() to updater
2009-06-18 12:57:25 -07:00
Doug Zongker
47cace9836 add file_getprop() to updater
Add a function to read a property from a ".prop"-formatted file
(key=value pairs, one per line, ignore # comment lines and blank
lines).  Move ErrorAbort to the core of edify; it's not specific to
updater now that errors aren't stored in the app cookie.
2009-06-18 10:11:50 -07:00
Doug Zongker
d683785ec9 resolved conflicts for merge of fb2e3af3 to master 2009-06-17 22:07:13 -07:00
Doug Zongker
fb2e3af3f9 let the "firmware" command take the file straight from the package
To do a firmware-install-on-reboot, the update binary tells recovery
what file to install before rebooting.  Let this file be specified as
"PACKAGE:<foo>" to indicate taking the file out of the OTA package,
avoiding an extra copy to /tmp.  Bump the API version number to
reflect this change.
2009-06-17 18:12:16 -07:00
Doug Zongker
e77e091522 am e3da02e7: add less_than_int, greater_than_int to edify
Merge commit 'e3da02e7bcfd85c543419e7590a3c86f64d8cc8a'

* commit 'e3da02e7bcfd85c543419e7590a3c86f64d8cc8a':
  add less_than_int, greater_than_int to edify
2009-06-15 14:28:17 -07:00
Doug Zongker
84cbfb6cb4 am d9c9d10d: fixes to edify and updater script
Merge commit 'd9c9d10d9da76f067d3955bea71f7bb39e859fa5'

* commit 'd9c9d10d9da76f067d3955bea71f7bb39e859fa5':
  fixes to edify and updater script
2009-06-14 21:12:26 -07:00
Doug Zongker
cf2b2a2e8f am 8edb00c9: edify extensions for OTA package installation, part 2
Merge commit '8edb00c990e563e6f91b278a212f2edf877cf763'

* commit '8edb00c990e563e6f91b278a212f2edf877cf763':
  edify extensions for OTA package installation, part 2
2009-06-14 20:49:32 -07:00
Doug Zongker
e3da02e7bc add less_than_int, greater_than_int to edify
Add functions less_than_int() and greater_than_int() that interpret
their args as ints and do the comparison.  ("<" and ">" operators, if
implemented, should do string comparison.)  This lets us do the build
time check currently done by the check_prereq binary.
2009-06-12 16:13:52 -07:00
Doug Zongker
d9c9d10d9d fixes to edify and updater script
A few more changes to edify:

  - fix write_raw_image(); my last change neglected to close the write
    context, so the written image was corrupt.

  - each expression tracks the span of the source code from which it
    was compiled, so that assert()'s error message can include the
    source of the expression that failed.

  - the 'cookie' argument to each Function is replaced with a State
    object, which contains the cookie, the source script (for use with
    the above spans), and the current error message (replacing the
    global variables that were used for this purpose).

  - in the recovery image, a new command "ui_print" can be sent back
    through the command pipe to cause text to appear on the screen.
    Add a new ui_print() function to print things from scripts.
    Rename existing "print" function to "stdout".
2009-06-12 14:05:03 -07:00
Doug Zongker
8edb00c990 edify extensions for OTA package installation, part 2
Adds more edify functions for OTAs:

  is_mounted getprop apply_patch apply_patch_check apply_patch_space
  write_raw_image write_firmware_image package_extract_file

This allows us to install radios, hboots, boot images, and install
incremental OTA packages.

Fixes a couple of dumb bugs in edify itself:

  - we were doubling the size of the function table each time it was
    *not* full, rather than each time it was full

  - "no such function" errors weren't visible to the parser, so they
    didn't prevent execution of the script.
2009-06-12 09:40:37 -07:00
Doug Zongker
32eb0a8c87 am 9dbc027b: fix sim build in donut, too
Merge commit '9dbc027b5f540bcf23c968398f8a70e92abd56cd'

* commit '9dbc027b5f540bcf23c968398f8a70e92abd56cd':
  fix sim build in donut, too
2009-06-12 08:25:49 -07:00
Doug Zongker
6c301e244d am 9931f7f3: edify extensions for OTA package installation, part 1
Merge commit '9931f7f3c1288171319e9ff7d053ebaad07db720'

* commit '9931f7f3c1288171319e9ff7d053ebaad07db720':
  edify extensions for OTA package installation, part 1
2009-06-12 08:25:38 -07:00
Doug Zongker
9dbc027b5f fix sim build in donut, too 2009-06-11 17:32:55 -07:00
Doug Zongker
c3885fabda fix simulator build by excluding more of recovery 2009-06-11 17:05:58 -07:00
Doug Zongker
9931f7f3c1 edify extensions for OTA package installation, part 1
Adds the following edify functions:

  mount unmount format show_progress delete delete_recursive
  package_extract symlink set_perm set_perm_recursive

This set is enough to extract and install the system part of a (full)
OTA package.

Adds the updater binary that extracts an edify script from the OTA
package and then executes it.  Minor changes to the edify core (adds a
sleep() builtin for debugging, adds "." to the set of characters that
can appear in an unquoted string).
2009-06-11 16:25:29 -07:00
Doug Zongker
cbb9129345 fix error from change 3606
When I changed the definition of device_perform_action() in response
to a reviewer comment, I forgot to change this implementation.
2009-06-11 14:57:53 -07:00
Doug Zongker
ddd6a2865d split out device-specific recovery UI code into vendor directories
Take some device-specific details of the recovery UI (eg, what keys to
press to bring up the interface and perform actions, exact text of the
menu, etc.) and split them out into separate C functions.  Arrange to
take implementations of those functions from the appropriate vendor
directory at build time.  Provide a default implementation in case no
vendor-specific one is available.
2009-06-11 14:50:33 -07:00
Android (Google) Code Review
d9d9d1785a am 9b9c2114: Merge change 3514 into donut
Merge commit '9b9c2114bd7d02200ce43cb9ec513473079dfad9'

* commit '9b9c2114bd7d02200ce43cb9ec513473079dfad9':
  core of edify, an eventual replacement for amend
2009-06-10 08:12:32 -07:00
Android (Google) Code Review
9b9c2114bd Merge change 3514 into donut
* changes:
  core of edify, an eventual replacement for amend
2009-06-10 08:10:29 -07:00
Doug Zongker
37bee62aef core of edify, an eventual replacement for amend
Edify is a simple scripting language for OTA installation, to be used
when we move to OTAs being installed via binaries shipped with the
package.
2009-06-09 17:37:19 -07:00
Rebecca Schultz Zavin
573fd7b68b Force the fb into 16 bpp mode in case the hw has some other default.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-06-05 16:58:36 -07:00
Doug Zongker
825915dc6c am b2ee9201: allow OTA package to provide binary instead of script
Merge commit 'b2ee9201be583b17ddbf0eaa69a37545f992b565'

* commit 'b2ee9201be583b17ddbf0eaa69a37545f992b565':
  allow OTA package to provide binary instead of script
2009-06-05 00:29:47 -07:00
Doug Zongker
b2ee9201be allow OTA package to provide binary instead of script
Allow installation of OTA packages which do not contain an
update-script, but instead contain an update-binary.
2009-06-04 16:45:32 -07:00
Doug Zongker
8caf81fa24 am f28c916e: remove unused permissions scheme from amend
Merge commit 'f28c916e73ee9f643c67c70d059c70381d774cb0'

* commit 'f28c916e73ee9f643c67c70d059c70381d774cb0':
  remove unused permissions scheme from amend
2009-06-03 08:39:37 -07:00
Doug Zongker
f28c916e73 remove unused permissions scheme from amend
Amend (aka the recovery command language) had a half-implemented
scheme of limiting which commands OTA packages were allowed to
execute.  It's not clear what this was ever supposed to be good for.
Remove it.
2009-06-02 15:41:00 -07:00
Doug Zongker
9d5be8488f am 07e1dca7: don\'t say "install complete" when it really isn\'t
Merge commit '07e1dca7068284c4f3013550335029eb72b39b82'

* commit '07e1dca7068284c4f3013550335029eb72b39b82':
  don't say "install complete" when it really isn't
2009-06-01 14:35:16 -07:00
Doug Zongker
07e1dca706 don't say "install complete" when it really isn't
Change the recovery UI so that when there is a hboot or radio update
pending (which the user most do a home+back reboot to actually
install), the UI tells them so, instead of saying "Install from sdcard
complete."
2009-05-28 19:02:45 -07:00
Doug Zongker
985d95f9f4 am 1c4ceae: undo temporary alignment hack
Merge commit '1c4ceae38f3fd7eb1e451d430acb5d99f257b0f9'

* commit '1c4ceae38f3fd7eb1e451d430acb5d99f257b0f9':
  undo temporary alignment hack
2009-05-08 12:22:51 -07:00
Doug Zongker
1c4ceae38f undo temporary alignment hack
Remove the memory alignment that mysteriously made OTA installs work,
in anticipation of a kernel that fixes the actual problem.  Handle
EINTR properly.
2009-05-08 09:43:28 -07:00
Doug Zongker
1c10ff34b5 am 683c462: align data passed to write() on 32k boundaries
Merge commit '683c4628039a8cb6dad1a086fae23a7d71438414'

* commit '683c4628039a8cb6dad1a086fae23a7d71438414':
  align data passed to write() on 32k boundaries
2009-05-06 11:31:43 -07:00
Doug Zongker
683c462803 align data passed to write() on 32k boundaries
In donut, OTA installation often encounters the write() system call
doing short writes -- which is legal but unexpected -- or failing with
ENOSPC when plenty of space is available.  Passing aligned memory
buffers to write() appears to prevent (or at least reduce the
frequency) of these problems.  b/1833052 has been filed to look at the
underlying problem, but this change aligns buffers we use with write()
so we can OTA for now (or see if this problem still occurs).
2009-05-06 08:40:28 -07:00
Doug Zongker
0f03d1408d am 596271f: handle short writes when unzipping files
Merge commit '596271fa71d79e3eec03c7cf6ac76cb026dd8578'

* commit '596271fa71d79e3eec03c7cf6ac76cb026dd8578':
  handle short writes when unzipping files
2009-04-29 21:20:20 -07:00
Doug Zongker
596271fa71 handle short writes when unzipping files
minzip fails if write() doesn't write all the data in one call.
Apparently this was good enough before, but it causes OTAs to fail all
the time now (maybe due to the recently-submitted kernel)?  Change
code to attempt continuing after short writes.
2009-04-29 17:35:34 -07:00
Jean-Baptiste Queru
7fce23fbb5 Merge donut into master 2009-04-22 18:33:11 -07:00
Jean-Baptiste Queru
f554ceb050 merge cupcake into donut 2009-04-22 17:56:50 -07:00
Jean-Baptiste Queru
29fcea1564 Merge donut into master 2009-04-22 17:12:09 -07:00