Commit graph

14 commits

Author SHA1 Message Date
JP Abgrall
30ae5806e9 fastboot: Change -w to format after the erase of userdata & cache
If the bootloader doesn't support formatting of those partitions
(either because it doesn't support the getvar commands needed or
the partition type is not supported), the errors are printed but
doesn't halt processing of subsequent commands.

Change-Id: I816ac2e5e7593846fcb4fd39c793a8dbdd996f6f
Signed-off-by: Mike J. Chen <mjchen@google.com>
2012-05-07 20:25:24 -07:00
Anatol Pomazau
5ae3f93f3b Remove trailing whitespaces
Change-Id: I6f83333a6ee0fbc562a12bb9555c43a44c98768e
2012-02-28 07:21:08 -08:00
Anatol Pomazau
c8ba5366da Implement 'fastboot format' command
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.

Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:

 - get size of partition
 - create an empty filesystem image
 - erase the partition
 - flush empty fs to the partition

This command applicable only for ext4 filesystem and checks the
partition type before formatting it.

Change-Id: I8529bc3485739487f0d91312f7c0ab1a6e5d8b44
2012-02-17 16:29:58 -08:00
Mike Lockwood
ca2074b78d Revert "Implement 'fastboot format' command"
until Windows support is done

This reverts commit 452e11885a.
2012-02-13 09:57:19 -08:00
Anatol Pomazau
452e11885a Implement 'fastboot format' command
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.

Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:

 - get size of partition
 - create an empty filesystem image
 - erase the partition
 - flush empty fs to the partition

This command applicable only for ext4 filesystem and checks the
partition type before formatting it.

Change-Id: Ifa42deaa66c3cb96ff786a73c3fadad92658f395
2012-02-11 11:02:40 -08:00
Anatol Pomazau
6f53225ef9 Revert "Implement 'fastboot format' command"
This reverts commit 230d160a71
2012-02-03 18:20:02 -08:00
Anatol Pomazau
230d160a71 Implement 'fastboot format' command
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.

Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:

 - get size of partition
 - create an empty filesystem image
 - erase the partition
 - flush empty fs to the partition

This command applicable only for ext4 filesystem and checks the
partition type before formatting it.

Change-Id: I8529bc1dc64237f1f0d91312f7c0ab1a6e5d8b44
2012-02-03 16:07:18 -08:00
Anatol Pomazau
21311f87c6 Revert "Implement 'fastboot format' command"
This reverts commit 049dff53ef
2012-02-03 10:57:46 -08:00
Anatol Pomazau
049dff53ef Implement 'fastboot format' command
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.

Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:

 - get size of partition
 - create an empty filesystem image
 - erase the partition
 - flush empty fs to the partition

This command applicable only for ext4 filesystem and checks the
partition type before formatting it.

Change-Id: I8529bc1dc64698f1f0d91312f7c0ab1a6e5d8b44
2012-01-25 13:55:39 -08:00
Wink Saville
b98762f782 Teach fastboot to allow required variables per product.
This is needed for products like xoom-cdma and xoom-cdma-lte.
The xoom-cdma-lte product requires an lte baseband binary but
it's not needed for xoom-cdma.

This is implemented by allowing an optional product parameter
to "required" statements. The parameter is separated from
"required" by a colon so the version-baseband-2 requirment in
board-info.txt for stingray becomes:

 require-for-product:xoom-cdma-lte version-baseband-2=ltedc_u_03.25.00|ltedc_u_03.19.00

In the above statement, only xoom-cdma-lte requires version-baseband-2
and the baseband can be lte_u_03.25.00 or lte_u_03.19.00. For other
products version-baseband-2 will be ignored.


Change-Id: I786bec5f5661c2243d87925b064fc6124d3cffa1
2011-04-04 17:54:59 -07:00
Brian Carlstrom
eb31c0bdc0 fastboot should return non-zero exit code on error
When using fastboot in scripts, it currently is necessary to parse the
output for FAILED messages and possible other indications of
error. This happens relatively often, for example when there are radio
update issues. Fortunately, fb_execute_queue already has a notion that
an error has occured which is used to abort the queue execution.

This change makes the status value be returned from fb_execute_queue
to main which can then return it as an exit status. usage cases were
also changed to return 1.

Note the code already returned 1 for error in one other case when
there was a problem with boot, so there is a precedent for return 1 on
error in this program.

Change-Id: Ib0463b08c8f2569495e248dd84e331f7e3691039
2010-04-23 12:45:38 -07:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00