UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor mkray
Visitor
605 Views
Registered: ‎03-27-2018

unable to boot linux OS from QSPI on ZC706 with Yocto flow

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?

0 Kudos
2 Replies
582 Views
Registered: ‎03-27-2014

Re: unable to boot linux OS from QSPI on ZC706 with Yocto flow

@mkray,

 

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:

 

in uboot

make menuconfig

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: 

 

  • the "flashcp" & "eraseall" system commands will be required, activate them in busybox or whatever environment manager you are currently using
  • then flashing will consist in something like 
    • flashcp u-boot-qspi.bin /dev/mtd0 -- flash bootloader
    • flashcp uImage /dev/mtd2  -- flash kernel
  • u-boot-qspi.bin being the result of uboot cross-compilation in the previous configuration

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

 

$linux-kernel/Documentation/devicetree/spi/spi-zynq-qspi.txt

 

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

G.W.,
NIST - Time Frequency metrology
0 Kudos
Highlighted
Visitor mkray
Visitor
440 Views
Registered: ‎03-27-2018

Re: unable to boot linux OS from QSPI on ZC706 with Yocto flow

G.W.,

 

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.

 

-mkray

0 Kudos