| #
74322201 |
| 17-Mar-2016 |
Rob Herring <rob.herring@linaro.org> |
fastboot: allow retrieving fastboot variables from env
Some boards need to expose device specific variable through fastboot (to adpat the flashing script depending on hardware revision for example).
fastboot: allow retrieving fastboot variables from env
Some boards need to expose device specific variable through fastboot (to adpat the flashing script depending on hardware revision for example).
Provide a way to expose custom fastboot variables. Note that all variables meant to be exposed through fastboot should be be prefixed with 'fastboot.', the variable should not exceed 32 bytes (including the prefix and the trailing '\0') and the variable content should fit in the response buffer (60 bytes excluding the 'OKAY' prefix and the trailing '\0').
Signed-off-by: Rob Herring <rob.herring@linaro.org> [Boris Brezillon: add a commit message] Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Steve Rae <srae@broadcom.com>
show more ...
|
| #
fec26e72 |
| 24-Feb-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
|
| #
a18c2706 |
| 27-Jan-2016 |
Steve Rae <srae@broadcom.com> |
fastboot: update error and warning messages
Fix the formatting in error messages, and demote one error message to a warning, as it is only informational.
Signed-off-by: Steve Rae <srae@broadcom.com>
|
| #
192bc694 |
| 30-Dec-2015 |
Ben Whitten <ben.whitten@gmail.com> |
Fix GCC format-security errors and convert sprintfs.
With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal.
Simple uses of sprint
Fix GCC format-security errors and convert sprintfs.
With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal.
Simple uses of sprintf are also converted to use strcpy.
Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
bf8940d3 |
| 15-Oct-2015 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
fastboot: Implement NAND backend
So far the fastboot code was only supporting MMC-backed devices for its flashing operations (flash and erase).
Add a storage backend for NAND-backed devices.
Signe
fastboot: Implement NAND backend
So far the fastboot code was only supporting MMC-backed devices for its flashing operations (flash and erase).
Add a storage backend for NAND-backed devices.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
show more ...
|
| #
6c9e00ee |
| 15-Oct-2015 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
fastboot: Implement flashing session counter
The fastboot flash command that writes an image to a partition works in several steps:
1 - Retrieve the maximum size the device can download through the
fastboot: Implement flashing session counter
The fastboot flash command that writes an image to a partition works in several steps:
1 - Retrieve the maximum size the device can download through the "max-download-size" variable
2 - Retrieve the partition type through the "partition-type:%s" variable, that indicates whether or not the partition needs to be erased (even though the fastboot client has minimal support for that)
3a - If the image is smaller than what the device can handle, send the image and flash it.
3b - If the image is larger than what the device can handle, create a sparse image, and split it in several chunks that would fit. Send the chunk, flash it, repeat until we have no more data to send.
However, in the 3b case, the subsequent transfers have no particular identifiers, the protocol just assumes that you would resume the writes where you left it.
While doing so works well, it also means that flashing two subsequent images on the same partition (for example because the user made a mistake) would not work withouth flashing another partition or rebooting the board, which is not really intuitive.
Since we have always the same pattern, we can however maintain a counter that will be reset every time the client will retrieve max-download-size, and incremented after each buffer will be flashed, that will allow us to tell whether we should simply resume the flashing where we were, or start back at the beginning of the partition.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
3c8f98f5 |
| 15-Oct-2015 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
fastboot: Move fastboot response functions to fastboot core
The functions and a few define to generate a fastboot message to be sent back to the host were so far duplicated among the users.
Move th
fastboot: Move fastboot response functions to fastboot core
The functions and a few define to generate a fastboot message to be sent back to the host were so far duplicated among the users.
Move them all to a common place.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
a69fdc77 |
| 23-Oct-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
4adef270 |
| 15-Oct-2015 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
fastboot: Implement OEM format only when we have MMC support
The current fastboot support assumes that CONFIG_FASTBOOT_FLASH implies that we have an MMC in our system, which might not be the case if
fastboot: Implement OEM format only when we have MMC support
The current fastboot support assumes that CONFIG_FASTBOOT_FLASH implies that we have an MMC in our system, which might not be the case if we have some other storage device.
Change the configuration option protecting that call to FASTBOOT_FLASH_MMC_DEV, that makes much more sense.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
| #
6f4e0506 |
| 24-Jul-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
a588d99a |
| 20-Jul-2015 |
Paul Kocialkowski <contact@paulk.fr> |
usb: CONFIG_USB_FASTBOOT prefix replacement for consistency
FASTBOOT is defined both by CONFIG_USB_FUNCTION_FASTBOOT AND CONFIG_CMD_FASTBOOT, so it doesn't make much sense to have a CONFIG_USB_FASTB
usb: CONFIG_USB_FASTBOOT prefix replacement for consistency
FASTBOOT is defined both by CONFIG_USB_FUNCTION_FASTBOOT AND CONFIG_CMD_FASTBOOT, so it doesn't make much sense to have a CONFIG_USB_FASTBOOT prefix for fastboot-specific options, especially given that other config options for fastboot use the CONFIG_FASTBOOT prefix.
This replaces the CONFIG_USB_FASTBOOT prefix with CONFIG_FASTBOOT, for consistency.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
show more ...
|
| #
bc9071c9 |
| 04-Jul-2015 |
Paul Kocialkowski <contact@paulk.fr> |
usb: gadget: fastboot: Dequeue the previous IN request for the current request
Recent versions of the fastboot tool will query the partition type before doing an operation on a partition (such as er
usb: gadget: fastboot: Dequeue the previous IN request for the current request
Recent versions of the fastboot tool will query the partition type before doing an operation on a partition (such as erase, flash, etc). It will then submit the operation as soon as the response for the partition type is received.
Usually, the MUSB controller will see that the partition type request return status was read by the host at the very same time as the actual operation request is submitted by the host. However, the operation will be read first (int_rx is handled first in musb_interrupt) and after it is completed, the fastboot USB gadget driver will send another return status. Hence, this happens before the musb gadget framework has had a chance to handle the previous acknowledgement that the host read the return status and dequeue the request.
The host will then usually empty the FIFO by the time musb_interrupt gets around handling the return status acknowledgement (for the previous request, this is still on the same musb_interrupt call), so no other interrupt is generated and the most recent return status acknowledgement remains unaccounted for.
It will then be used as a response for the next command, and the proper response for it will be delayed to the next command, and so on.
Dequeuing the previous IN request in the fastboot code ensures that no previous return status remains. It is acceptable to do it since there is no callback to it anyways.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
show more ...
|
| #
94b385fa |
| 04-Jul-2015 |
Paul Kocialkowski <contact@paulk.fr> |
usb: gadget: fastboot: Request status and length check in rx handler
This avoids handling requests that have an error status or no data. In particular, this avoids showing unnecessary error messages
usb: gadget: fastboot: Request status and length check in rx handler
This avoids handling requests that have an error status or no data. In particular, this avoids showing unnecessary error messages when the USB gadget gets disconnected (e.g. with fastboot continue) and the fastboot USB gadget driver sends an error back to the host (that has disconnected already).
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
show more ...
|
| #
e2ec3e46 |
| 25-Feb-2015 |
Alexey Firago <alexey_firago@mentor.com> |
fastboot: add support for reboot-bootloader command
The "fastboot reboot-bootloader" command is defined to re-enter into fastboot mode after rebooting into bootloader. This command is usually used a
fastboot: add support for reboot-bootloader command
The "fastboot reboot-bootloader" command is defined to re-enter into fastboot mode after rebooting into bootloader. This command is usually used after updating bootloader via fastboot.
This commit implements only a generic side of the command - setting of the reset flag and then resetting. Setting of the reset flag is implemented using __weak fb_set_reboot_flag() function. The actual setting and checking of the reset flag should be implemented by a boot script and/or board/SoC specific code.
Signed-off-by: Alexey Firago <alexey_firago@mentor.com> Tested-by: Steve Rae <srae@broadcom.com> [Test HW: bcm28155_ap board]
show more ...
|
| #
9b5b60a0 |
| 05-Mar-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
57c6941b |
| 02-Mar-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
537cd072 |
| 13-Feb-2015 |
Dileep Katta <dileep.katta@linaro.org> |
usb: gadget: fastboot: Set the Serial Number for Fastboot Gadget
Configure the serial number using the serial# environment variable during the fastboot bind.
This enables "fastboot devices" to retu
usb: gadget: fastboot: Set the Serial Number for Fastboot Gadget
Configure the serial number using the serial# environment variable during the fastboot bind.
This enables "fastboot devices" to return the serial number for the attached devices.
Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Acked-by: Steve Rae <srae@broadcom.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
9e4b510d |
| 16-Feb-2015 |
Dileep Katta <dileep.katta@linaro.org> |
fastboot: OUT transaction length must be aligned to wMaxPacketSize
OUT transactions must be aligned to wMaxPacketSize for each transfer, or else transfer will not complete successfully. This patch m
fastboot: OUT transaction length must be aligned to wMaxPacketSize
OUT transactions must be aligned to wMaxPacketSize for each transfer, or else transfer will not complete successfully. This patch modifies rx_bytes_expected to return a transfer length that is aligned to wMaxPacketSize.
Note that the value of wMaxPacketSize and ep->maxpacket may not be the same value, and it is the value of wMaxPacketSize that should be used for alignment. wMaxPacketSize is passed depending on the speed of connection.
Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
89792381 |
| 17-Feb-2015 |
Dileep Katta <dileep.katta@linaro.org> |
usb: gadget: fastboot: Add fastboot erase
Adds the fastboot erase functionality, to erase a partition specified by name. The erase is performed based on erase group size, to avoid erasing other part
usb: gadget: fastboot: Add fastboot erase
Adds the fastboot erase functionality, to erase a partition specified by name. The erase is performed based on erase group size, to avoid erasing other partitions. The start address and the size is aligned to the erase group size for this.
Currently only supports erasing from eMMC.
Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
372d7dec |
| 26-Jan-2015 |
Rob Herring <robh@kernel.org> |
fastboot: add support for "oem format" command
Add "oem format" command to write partition table. This relies on the env variable partitions to contain the list of partitions as required by the gpt
fastboot: add support for "oem format" command
Add "oem format" command to write partition table. This relies on the env variable partitions to contain the list of partitions as required by the gpt command.
Note that this does not erase any data other than the partition table.
Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Steve Rae <srae@broadcom.com>
show more ...
|
| #
de195620 |
| 26-Jan-2015 |
Michael Scott <michael.scott@linaro.org> |
fastboot: add "fastboot oem" command support
Add code stub to handle "fastboot oem __" command. As unlock is a common fastboot command, distinguish that it is not implemented.
Signed-off-by: Michae
fastboot: add "fastboot oem" command support
Add code stub to handle "fastboot oem __" command. As unlock is a common fastboot command, distinguish that it is not implemented.
Signed-off-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Steve Rae <srae@broadcom.com>
show more ...
|
| #
4e0114d9 |
| 30-Dec-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
| #
7a7ffeda |
| 18-Dec-2014 |
Tom Rini <trini@ti.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
|
| #
267abc62 |
| 10-Dec-2014 |
Rob Herring <robh@kernel.org> |
fastboot: add support for continue command
The fastboot continue command is defined to exit fastboot and continue autoboot. This commit implements the continue command and the exiting of fastboot on
fastboot: add support for continue command
The fastboot continue command is defined to exit fastboot and continue autoboot. This commit implements the continue command and the exiting of fastboot only. Subsequent u-boot commands can be processed after exiting fastboot. Autoboot should implement a boot script such as "fastboot; mmc read <...>; bootm" to fully implement the fastboot continue function.
Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]
show more ...
|
| #
790af815 |
| 10-Oct-2014 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
|