Fix DFU updates on the zynqmp platform
cover Fix DFU updates on the zynqmp platform
When using DFU alt info via EFI capsule updates on an Ultra96 V2 board, dfu_alt_info is automatically set to write a boot.bin file to the SD card when in SD boot mode and not using multiboot. After the update is applied, the board reboots and does not come back up. When writing an upper-case BOOT.BIN file to the SD card instead, the board updates and comes back up successfully.
Jared Baur (1):
Write upper-case BOOT.BIN to zynqmp MMC
board/xilinx/zynqmp/zynqmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.42.0
PATCH 1/1 Write upper-case BOOT.BIN to zynqmp MMC
The zynqmp bootrom will not boot from an SD card with a fat32 fileystem with a lowercase boot.bin file on it. This means that using DFU to update the boot.bin file will render the device unusable since it is not written in upper-case.
--- board/xilinx/zynqmp/zynqmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/xilinx/zynqmp/zynqmp.c +2 -2
@@ -647,14 +647,14 @@ void set_dfu_alt_info(char *interface, char *devstr)case SD_MODE1 : bootseq =mmc_get_env_dev (); - len +=snprintf (buf + len,DFU_ALT_BUF_LEN ,"mmc %d=boot" , + len +=snprintf (buf + len,DFU_ALT_BUF_LEN ,"mmc %d=BOOT" , bootseq);if (multiboot) len +=snprintf (buf + len,DFU_ALT_BUF_LEN ,"%04d" , multiboot); - len +=snprintf (buf + len,DFU_ALT_BUF_LEN ,".bin fat %d 1" , + len +=snprintf (buf + len,DFU_ALT_BUF_LEN ,".BIN fat %d 1" , bootseq);#if defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME ) len += snprintf(buf + len, DFU_ALT_BUF_LEN, ";%s fat %d 1",
Signature · 1 line
2.42.0
Re: [PATCH 1/1] Write upper-case BOOT.BIN to zynqmp MMC
so 18. 11. 2023 v 19:47 odesílatel Jared Baur <[email protected]> napsal:
Quoted 5 lines
The zynqmp bootrom will not boot from an SD card with a fat32 fileystem with a lowercase boot.bin file on it. This means that using DFU to update the boot.bin file will render the device unusable since it is not written in upper-case.
Fat 32 is case-insensitive and case-preserving. It doesn't really matter if you have boot.bin or BOOT.BIN on SD.
Bootrom doesn't really care about it.
I tested it on zcu102 with boot.bin and BOOT.BIN and both cases are working for me.
Can you look at the partition type via fdisk?
Thanks,
Michal