I am using a ZCU102 BSP pre-built image and trying to boot from an SD card, but QEMU hangs at the FSBL stage.
How can I avoid this?
QEMU hangs because the FSBL is trying to access I2C devices on the ZCU102 board for which QEMU does not have a model.
To work around this issue, compile FSBL without including the ZCU102 flag [-DXPS_BOARD_ZCU102].
Note: Petalinux by default appends the CFLAGS into the fsbl makefile in components/bootloader/zynqmp_fsbl with -DXPS_BOARD_ZCU102.
Steps to build the FSBL without the ZCU102 flag:
1) Open the Makefile in <petalinux-project>/components/bootloader/zynqmp_fsbl
2) Remove the FLAG -DXPS_BOARD_ZCU102 from CFLAGS and save the Makefile.
3) The next step is to build the FSBL alone with the changes made:
petalinux-build -c bootloader
4) This will build the FSBL and the updated FSBL elf is placed in <petalinux-project>/images/linux.