Merge tag 'u-boot-dfu-20260616' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20260616 CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/30480 Android: * Fix A/B slot selection when marked successful and tries = 0 Fastboot: * Handle partial blk_dwrite() as errors instead of success Usb Gadget: * Atmel: Use calloc() to initialize endpoint list
This commit is contained in:
+5
-2
@@ -289,11 +289,14 @@ int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info,
|
||||
slot = -1;
|
||||
for (i = 0; i < abc->nb_slot; ++i) {
|
||||
if (abc->slot_info[i].verity_corrupted ||
|
||||
!abc->slot_info[i].tries_remaining) {
|
||||
(!abc->slot_info[i].tries_remaining &&
|
||||
!abc->slot_info[i].successful_boot)) {
|
||||
log_debug("ANDROID: unbootable slot %d tries: %d, ",
|
||||
i, abc->slot_info[i].tries_remaining);
|
||||
log_debug("corrupt: %d\n",
|
||||
log_debug("corrupt: %d, ",
|
||||
abc->slot_info[i].verity_corrupted);
|
||||
log_debug("successful: %d\n",
|
||||
abc->slot_info[i].successful_boot);
|
||||
continue;
|
||||
}
|
||||
log_debug("ANDROID: bootable slot %d pri: %d, tries: %d, ",
|
||||
|
||||
@@ -263,7 +263,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
|
||||
/* Write new kernel size to boot image header */
|
||||
hdr->kernel_size = download_bytes;
|
||||
res = blk_dwrite(dev_desc, info.start, hdr_sectors, (void *)hdr);
|
||||
if (res == 0) {
|
||||
if (res != hdr_sectors) {
|
||||
pr_err("cannot writeback boot image header\n");
|
||||
fastboot_fail("cannot write back boot image header", response);
|
||||
return -1;
|
||||
@@ -275,7 +275,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
|
||||
sectors_per_page;
|
||||
res = blk_dwrite(dev_desc, kernel_sector_start, kernel_sectors,
|
||||
download_buffer);
|
||||
if (res == 0) {
|
||||
if (res != kernel_sectors) {
|
||||
pr_err("cannot write new kernel\n");
|
||||
fastboot_fail("cannot write new kernel", response);
|
||||
return -1;
|
||||
@@ -287,7 +287,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
|
||||
sectors_per_page;
|
||||
res = blk_dwrite(dev_desc, ramdisk_sector_start, ramdisk_sectors,
|
||||
ramdisk_buffer);
|
||||
if (res == 0) {
|
||||
if (res != ramdisk_sectors) {
|
||||
pr_err("cannot write back original ramdisk\n");
|
||||
fastboot_fail("cannot write back original ramdisk", response);
|
||||
return -1;
|
||||
|
||||
@@ -1201,7 +1201,7 @@ static struct usba_ep *usba_udc_pdata(struct usba_platform_data *pdata,
|
||||
struct usba_ep *eps;
|
||||
int i;
|
||||
|
||||
eps = malloc(sizeof(struct usba_ep) * pdata->num_ep);
|
||||
eps = calloc(pdata->num_ep, sizeof(struct usba_ep));
|
||||
if (!eps) {
|
||||
log_err("failed to alloc eps\n");
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user