The version of MINGW we compile with has more advanced POSIX support.
Removing legacy MINGW workarounds as those are not needed anymore.
Change-Id: Id5d67176b719db6c3667be6d63c41432e0ba9f30
Signed-off-by: Rom Lemarchand <romlem@google.com>
Some devices use mkbootimg with weird args for which fastboot
only a hardcoded value.
Now fastboot recognizes those args.
Made handling of global vars more consistent.
Bug: 8341331
Change-Id: Ic09f148ccd0249f49935fdc63e517cf8ab2229bc
To prevent false error reports from e2fsck, update fastboot to erase
a partition identified as being ext4 partition before flashing an image
to it.
bug: 7259359
Change-Id: I85e9963aa8247b4b33fdd57f994cdb3ee72b670f
Move the help command handling before the call to open_device
so that is doesn't block when no device is connected.
Bug: 7078873
Change-Id: I4e9a4317bd72b4ceb4b9fc838eafd2e57b17a473
Change-Id: I7390867abd00036f19eb4d1a1ce23aa0aca50674
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Change the default sparse limit to disabled to prevent resparsing files
unless the bootloader or user specifies a sparse limit. Some
bootloaders issue an erase before every flash command, which causes
earlier parts of the downloaded image to get erased.
Change-Id: Iac6f3b05580aba8b82ed0f2f800979a49c33c691
"fastboot -w" would segfault because *argv was invalid when no
non-option arguments were specified. Check argc > 0 before
dereferencing argv.
Change-Id: I822a799e6a38e4e5c0a4eca48c6343b8a08a6185
Add support to fastboot for automatically using libsparse to break large
files, whether they are in sparse or normal format, into multiple sparse
files that can each fit into the target's memory. Allows flashing
images that are larger than the size of the available memory on the
target.
By default, any file over 512MB will be sparsed into 512MB chunks. The
limit can be modified with the -m argument, or sparsing can be forced
with -S or avoided with -N. If -m is not specified, the target can
override the default by implementing getvar:max-download-size
Change-Id: I6c59381c3d24475c4f2587ea877200b96971cbd7
Modify the fastboot argument parsing to use getopt_long. This
simplifies argument parsing, and permutes all the commands to the end of
argv to allow parsing them later.
Also moves usb initailization between argument and command processing,
to allow commands to query parameters over usb.
Change-Id: I883572f52c4190c80ee3b4aa4511ea2061a6b734
Ignore ANDROID_SERIAL when requesting to list devices, or else it is
impossible to list devices without unsetting the env var. Even
ANDROID_SERIAL= fastboot devices
or
fastboot -s "" devices
won't work.
Change-Id: Ie92f35bda852c6ecea4ebaefb75b8f18c10b6d0c
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>
For manufacturing and testing, there is a need to talk to
whatever device is connected to a given port on the host. This
change modifies fastboot's "-s" option to take either a serial
number or a device path. The device paths of the connected
devices can be listed using "fastboot -l devices" whose output
will resemble:
016B75D60A00600D usb:2-5 fastboot
AD3C12020173 usb:1-4.3 fastboot
The second column lists the device paths. If the -l option is
not given, the output from "fastboot devices" will be the same as
it used to be (i.e. the paths will not be printed).
Finally, note that the format of the device paths are platform
dependent. The example above is from Linux. On OS-X, the paths
will be "usb:" followed by hex digits. For Windows, the device
paths will be printed as "????????????" and the -s option will
not be able to select a device until someone implements the
underlying functionality in usb_windows.c.
Change-Id: I1f01b8f47acd32edb0ac18db107316a2c923bbde
Signed-off-by: Scott Anderson <saa@android.com>
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
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>
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
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
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
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
This patch adds Intel USB Vendor ID into the support
list for adb and fastboot.
Signed-off-by: Wu, Hao <hao.wu@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
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
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