mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Merge tag 'u-boot-dfu-20240910' of https://source.denx.de/u-boot/custodians/u-boot-dfu
CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/22302 - Fix ANDROID_AB_BACKUP_OFFSET unit
This commit is contained in:
@@ -139,8 +139,13 @@ static int ab_control_store(struct blk_desc *dev_desc,
|
||||
{
|
||||
ulong abc_offset, abc_blocks, ret;
|
||||
|
||||
abc_offset = offset +
|
||||
offsetof(struct bootloader_message_ab, slot_suffix) /
|
||||
if (offset % part_info->blksz) {
|
||||
log_err("ANDROID: offset not block aligned\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
abc_offset = (offset +
|
||||
offsetof(struct bootloader_message_ab, slot_suffix)) /
|
||||
part_info->blksz;
|
||||
abc_blocks = DIV_ROUND_UP(sizeof(struct bootloader_control),
|
||||
part_info->blksz);
|
||||
|
||||
@@ -986,7 +986,8 @@ config ANDROID_AB_BACKUP_OFFSET
|
||||
help
|
||||
If non-zero, a backup bootloader message starting at this offset in
|
||||
the partition will tried in the event that the primary one (starting
|
||||
at offset 0) fails its checksum.
|
||||
at offset 0) fails its checksum. The offset is in bytes and must be
|
||||
multiple of the block size.
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user