07-10-2018 09:22 AM - edited 07-10-2018 09:25 AM
I'm currently able to boot into U-Boot over JTAG, but I am having issues booting off QSPI or EMMC. I have generated the following `BOOT.bin` using `bootgen`:
$ du -b BOOT.bin 1227000 BOOT.bin
I am currently using Vivado 2017.4, but will give 2018.2 a try shortly.
QSPI from U-Boot
> sf probe 0 0 0
zynqmp_qspi_ofdata_to_platdata: CLK 300000000 SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
xsdb% stop xsdb% dow -data BOOT.bin 0x2000000 100% 1MB 0.4MB/s 00:02 Successfully downloaded BOOT.bin
> sf probe 0 0 0 SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB > sf erase 0 0x1000000 SF: 16777216 bytes @ 0x0 Erased: OK > sf write 0x2000000 0 0x1000000 device 0 whole chip SF: 16777216 bytes @ 0x0 Written: OK
Note that I also tried to just erase and write to the SPI flash based on the above size reported by `du`, but that led to similar results.
================= In Stage 2 ============ QSPI 24bit Boot Mode QSPI is in single flash connection QSPI is using 4 bit bus FlashID=0x1 0x20 0x18 SPANSION 128M Bits Multiboot Reg : 0x0 QSPI Reading Src 0x44, Dest FFFDCF94, Length 4 .QSPI Read Src 0x44, Dest FFFDCF94, Length 4 QSPI Reading Src 0x98, Dest FFFDCF98, Length 4 .QSPI Read Src 0x98, Dest FFFDCF98, Length 4 Image Header Table Offset 0xFFFFFFFF Authentication Enabled QSPI Reading Src 0xF, Dest FFFDCF9C, Length 4 .QSPI Read Src 0xF, Dest FFFDCF9C, Length 4 QSPI Reading Src 0xFFFFFFFC, Dest FFFDA0AC, Length EC0 .QSPI Read Src 0xFFFFFFFC, Dest FFFDA0AC, Length 4 .QSPI Read Src 0x0, Dest FFFDA0B0, Length EBC QSPI Reading Src 0xFFFFFFFF, Dest FFFF0040, Length FFFFFFFD XFSBL_ERROR_QSPI_LENGTH Boot Device Initialization failed 0x19 ================= In Stage Err ============ Fsbl Error Status: 0x00002019 Performing FSBL FallBack Perform�
QSPI using SDK utility
XIL_CSE_ZYNQ_UBOOT_QSPI_FREQ_HZ=10000000 \ program_flash -f BOOT.bin \ -fsbl fsbl.elf \ -flash_type qspi_dual_parallel \ -blank_check \ -verify \ -cable type xilinx_tcf url tcp:localhost:3121
... Performing Verify Operation... 0%...INFO: [Xicom 50-44] Elapsed time = 1 sec. Verify Operation unsuccessful. ERROR: Flash Operation Failed
Attempting to boot leads to the following:
... XFSBL_ERROR_QSPI_LENGTH Device Copy Failed Boot Device Initialization failed 0x19 ...
Booting from EMMC doesn't seem to be as well documented as booting from a SD card. The documentation states that the process is the same, but that doesn't seem right, since EMMC has hardware partitions including one or more intended for booting. Generating a image with a FAT filesystem on the first partition that contains `BOOT.bin` seems like a overly complicated solution and doesn't make use of the hardware partition that already exists and is designed for this purpose. Is the PMU ROM unable to load `BOOT.bin` from the EMMC hardware boot partition?
07-10-2018 12:16 PM
It looks like you are selecting the incorrect programming mode in the GUI. Your hardware indicates you are booting in QSPI single, your bootgen call shows qspi_dual_parallel.
On the wrap around, look at AR70021
07-10-2018 01:07 PM
You mean the wrong `-flash_type` when using the `program_flash` CLI?
program_flash -f BOOT.bin -fsbl fsbl.elf -flash_type qspi_single -blank_check -verify -cable type xilinx_tcf url tcp:localhost:3121
ZynqMP> Program Operation successful. INFO: [Xicom 50-44] Elapsed time = 12 sec. Performing Verify Operation... 0%...sf read FFFC0000 0 10000 device 0 offset 0x0, size 0x10000 SF: 65536 bytes @ 0x0 Read: OK ZynqMP> cmp.b FFFC0000 FFFD0000 10000 byte at 0x00000000fffc0000 (0xff) != byte at 0x00000000fffd0000 (0x0) Total of 0 byte(s) were the same ZynqMP> INFO: [Xicom 50-44] Elapsed time = 1 sec. Verify Operation unsuccessful. ERROR: Flash Operation Failed
07-11-2018 01:16 PM
Yes, the -flash_type must match the architecture of your QSPI in hardware. To enable enhanced debug messages in programming, add the XIL_CSE_ZYNQ_DISPLAY_UBOOT_MESSAGES environment variable and post the complete log.
The short time in verify looks suspicious Look at AR70148, the XIL_CSE_ZYNQ_UBOOT_QSPI_FREQ_HZ environment variable mentioned in this AR pertains to 2017.3 and 2017.4 .
07-16-2018 02:11 PM
07-16-2018 02:50 PM
07-16-2018 03:07 PM
@glenaI know that it is possible to boot off of eMMC. I'm currently booting off a eMMC hardware user partition with a FAT partition containing `BOOT.bin` followed by a ext4 partition that stores the Linux rootfs. I was wondering about the eMMC hardware boot partitions. For example,
"eMMC provides two boot partitions to provide fast access to boot code for improved system boot time. Booting from boot partitions can provide access to stored data in ~50ms, whereas booting from the user area can take hundreds of milliseconds. However, in order to utilize the boot partitions, the chipset must be able to support booting from the boot partition. Check with your chipset vendor to understand if booting from the e.MMC boot partitions is supported."
07-20-2018 09:33 AM
Booting from eMMC boot partitions is NOT supported.
07-20-2018 10:25 AM
@denistI'm sorry to hear that, but thanks for following up. It would certainly be helpful to note that in the appropriate Wiki articles, Technical Reference, and various guides.
I assume there's no plan to support it in the future?
07-23-2018 09:11 AM
No plans to change this for MPSoC.
01-07-2020 01:16 PM
I am trying to boot my ultrascale+ mpsoc by putting the boot.bin file in a emmc flash which is partitioned as FAT32. It boots without any issue. But when i add another partition to the emmc card which is blank just for me to keep user data later in the stage. The board stops booting. Can you highlight what could be the cause?
01-08-2020 06:32 AM
I'm not sure what tool you're using, but the "mbrCustom" partitions look suspicious. I assume in the functional layout you only have one MBR? Anyway, you should only create one MBR.
01-08-2020 07:23 AM
which windows tool you can recommend me for that. i need 3 partitions atleast. the first one will have the boot image. i used easeUS disk manager for this.