06-07-2018 10:20 PM
I'm following the instructions in document UG1165 v2016.2 in order to boot a Linux image from QSPI. According to UG1165, using PetaLinux, these actions must be taken:
Select Subsystem AUTO Hardware Settings->Advanced Bootable Images Storage Settings->boot image settings->Image Storage Media->primary flash
Select Advanced Bootable Images Storage Settings->kernel image settings->Image Storage Media->primary flash
What exactly are these PetaLinux options doing during the rebuild process? How can I do this using Yocto instead of PetaLinux?
06-08-2018 01:32 AM - edited 06-08-2018 01:37 AM
I inquired about this a couple of weeks ago but did not spend enough time on it to completely solve the problem
so far my understanding is you can program the QSPI flash from uboot with specific commands, userspace or through JTAG.
I don't work with yocto, I use buildroot, but that should be fairly close:
activate "QSPI_BOOT" in "boot media"
make sure Device driver -> SPI -> Zynq QSPI driver is active
now your uboot configuration should permit a reboot using QSPI as boot medium
if you want to flash from linux/userspace:
in my case the problem is /dev/mtdx do not exist, you need a proper zynq-qspi node in your devicetree which is not default, refer to
another option is to flash through JTAG but I don't know much about this. I don't know if JTAG permits direct access to flash memory or you need to pass through PS or PL. It is also not clear whether the flash memory is connected to PS only or both PS/PL and how bitstream/boot.bin are handled.
another option is to use uboot specific commands to access the QSPI flash, this could be a starting point
good luck, posting any of your results here would really be appreciated
08-16-2018 01:02 PM
Sorry for the late reply. I actually figured it out 2 months ago but have been so busy that I completely forgot that I left you hanging. I was able to enable all the necessary kernel settings in Yocto using menuconfig just as you suggested and then rebuilt the kernel. However, I also had to modify the u-boot source in order to change the rootfs size and also to make changes to the qspi boot parameters and then re-built u-boot.
Thanks for the help.