Commit Graph

16 Commits

Author SHA1 Message Date
Koushik Dutta
ada3f3ba33 publish update-binary as a utility 2010-05-01 21:30:55 -07:00
Doug Zongker
60babf8ba7 delete files before symlinking; log error messages
The symlink() function should remove existing files before creating
symlinks, so scripts are idempotent.  Log messages when various system
calls fail (but don't make the whole script fail).
2009-09-18 15:11:24 -07:00
Doug Zongker
a3f89eabb7 add a run_program() function to edify
Handy for producing debugging OTA packages (eg, running sqlite3 or
whatever in recovery).
2009-09-10 14:20:53 -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
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
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
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
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