- Jul 12, 2018
-
-
Gary Bisson authored
Signed-off-by:
Gary Bisson <gary.bisson@boundarydevices.com>
-
- May 30, 2018
-
-
Alex Kiernan authored
Introduce CONFIG_IMAGE_SPARSE and CONFIG_CMD_MMC_SWRITE so the "mmc swrite" command is separated from the fastboot code. Move image-sparse from common to lib so it's clear it's library code. Rename CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE to CONFIG_IMAGE_SPARSE_FILLBUF_SIZE and migrate it to Kconfig. Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Acked-by:
Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Alex Kiernan authored
Add the response string as a parameter to fastboot_okay/fail, instead of modifying a global, to match the contract expected by the AOSP U-Boot code. Signed-off-by:
Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- May 08, 2018
-
-
Jassi Brar authored
write_sparse_image could be useful for non-fastboot users. For ex a platform, without usb-device/fastboot support, could get sparse images over tftp and write using the mmc command. Or non-android systems could also leverage the sparse format. Towards that, this patch removes anything fastboot specific from the write_sparse_image implementation. Which includes making the function return integer as error code and calls for fastboot logging via an optional callback function 'mssg'. Signed-off-by:
Jassi Brar <jaswinder.singh@linaro.org>
-
Jassi Brar authored
'sz' has no use for write_sparse_image, remove it simplifying the api. Signed-off-by:
Jassi Brar <jaswinder.singh@linaro.org>
-
- Jun 27, 2016
-
-
Steve Rae authored
- increase the size of the fill buffer - testing has shown a 10x improvement when the sparse image has large CHUNK_TYPE_FILL chunks Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
In order to process the CHUNK_TYPE_DONT_CARE properly, there is a requirement to be able to 'reserve' a specified number of blocks in the storage media. Because of the special handling of "bad blocks" in NAND devices, this is implemented in a storage abstraction function. Signed-off-by:
Steve Rae <srae@broadcom.com> Reviewed-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Steve Rae authored
- update fastboot_okay() and fastboot_fail() This file originally came from upstream code. While retaining the storage abstraction feature, this is the second set of the changes required to resync with the cmd_flash_mmc_sparse_img() in the file aboot.c from https://us.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=LE.BR.1.2.1 Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
This file originally came from upstream code. While retaining the storage abstraction feature, this is the first set of the changes required to resync with the cmd_flash_mmc_sparse_img() in the file aboot.c from https://us.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=LE.BR.1.2.1 Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
This "session-id" alogrithm is not required, and currently corrupts the stored image whenever more the one "session" is required. Signed-off-by:
Steve Rae <srae@broadcom.com>
-
- Apr 12, 2016
-
-
Steve Rae authored
remove logging of the 'skipped' blocks Signed-off-by:
Steve Rae <srae@broadcom.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
Steve Rae authored
When 7bfc3b13 (sparse: Refactor chunk parsing function) was implemented, it dropped 99819458 (aboot: fix block addressing for don't care chunk type). This re-implements the required fix for the "don't care chunk type"... Signed-off-by:
Steve Rae <srae@broadcom.com> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
- Apr 11, 2016
-
-
Jeffy Chen authored
It may overflow in sparse_block_size_to_storage, use uint64_t instead in the calculation. Signed-off-by:
Jeffy Chen <jeffy.chen@rock-chips.com>
-
- Nov 12, 2015
-
-
Maxime Ripard authored
The Android sparse image format is currently supported through a file called aboot, which isn't really such a great name, since the sparse image format is only used for transferring data with fastboot. Rename the file and header to a file called "sparse", which also makes it consistent with the header defining the image structures. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Maxime Ripard authored
The fastboot client will split the sparse images into several chunks if the image that it tries to flash is bigger than what the device can handle. In such a case, the bootloader is supposed to retain the last offset to which it wrote to, so that it can resume the writes at the right offset when flashing the next chunk. Retain the last offset we used, and use the session ID to know if we need it or not. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Maxime Ripard authored
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>
-
Maxime Ripard authored
The current sparse image parser relies heavily on the MMC layer, and doesn't allow any other kind of storage medium to be used. Rework the parser to support any kind of storage medium, as long as there is an implementation for it. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Maxime Ripard authored
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>
-
Maxime Ripard authored
To check the alignment of the image blocks to the storage blocks, the current code uses a convoluted syntax, while a simple mod also does the work. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Maxime Ripard authored
The chunk parsing code was duplicating a lot of code among the various chunk types, while all of them could be covered by generic and simple functions. Refactor the current code to reuse as much code as possible and hopefully make the chunk parsing loop more readable and concise. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Maxime Ripard authored
The current sparse image format parser is quite tangled, with a lot of code duplication. Start refactoring it by moving the header parsing function to a function of its own. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Oct 27, 2014
-
-
Rob Herring authored
CHUNK_TYPE_DONT_CARE should skip over the specified number of blocks, but currently fails to increment the device block address. This results in filesystem images getting written incorrectly. Add the missing block address incrementing. Cc: Steve Rae <srae@broadcom.com> Signed-off-by:
Rob Herring <robh@kernel.org> Reviewed-by:
Steve Rae <srae@broadcom.com>
-
- Sep 16, 2014
-
-
Steve Rae authored
update to provide usable implementation to U-Boot Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
- port dprintf() to debug() - update formatting Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
- remove unnecessary functions Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
Add original file (pristine) from : https://www.codeaurora.org/cgit/quic/la/kernel/lk/plain/app/aboot/aboot.c?h=master [3b5092d20bd15a7a2879c13e9f64acc48d04af2d] Signed-off-by:
Steve Rae <srae@broadcom.com>
-