mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
Merge tag 'u-boot-dfu-20231103' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20231103 - Fix CRC chunk size in fastboot - Make size optional for dfu on mmc
This commit is contained in:
commit
563142350f
3 changed files with 17 additions and 2 deletions
|
@ -121,6 +121,11 @@ mmc
|
|||
|
||||
with
|
||||
|
||||
offset
|
||||
is the offset in the device (hexadecimal without "0x")
|
||||
size
|
||||
is the size of the access area (hexadecimal without "0x")
|
||||
or 0 which means whole device
|
||||
partid
|
||||
being the GPT or DOS partition index,
|
||||
num
|
||||
|
|
|
@ -386,6 +386,16 @@ int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char **argv, int a
|
|||
dfu->data.mmc.lba_size = third_arg;
|
||||
dfu->data.mmc.lba_blk_size = mmc->read_bl_len;
|
||||
|
||||
/*
|
||||
* In case the size is zero (i.e. mmc raw 0x10 0),
|
||||
* assume the user intends to use whole device.
|
||||
*/
|
||||
if (third_arg == 0) {
|
||||
struct blk_desc *blk_dev = mmc_get_blk_desc(mmc);
|
||||
|
||||
dfu->data.mmc.lba_size = blk_dev->lba;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for an extra entry at dfu_alt_info env variable
|
||||
* specifying the mmc HW defined partition number
|
||||
|
|
|
@ -289,8 +289,8 @@ int write_sparse_image(struct sparse_storage *info,
|
|||
|
||||
case CHUNK_TYPE_CRC32:
|
||||
if (chunk_header->total_sz !=
|
||||
sparse_header->chunk_hdr_sz) {
|
||||
info->mssg("Bogus chunk size for chunk type Dont Care",
|
||||
sparse_header->chunk_hdr_sz + sizeof(uint32_t)) {
|
||||
info->mssg("Bogus chunk size for chunk type CRC32",
|
||||
response);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue