element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Using Xilinx Tools Forum Booting from QSPI flash
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 4 replies
  • Subscribers 337 subscribers
  • Views 4690 views
  • Users 0 members are here
Related

Booting from QSPI flash

Former Member
Former Member over 10 years ago

Hello!

I am very new to Xilinx/Linux development and am running into a problem trying to boot PetaLinux from QSPI flash.

I used PetaLinux tools to build uBoot and kernel images and then I create boot.bin file like this:

petalinux-package --boot --force --fsbl zynq_fsbl.elf --fpga pre-build/linux/implementation/download.bit --u-boot --kernel

The line above creates a 14MB BOOT.BIN file with FSBL, FPGA program, uBoot, and linux kernel.

I copied BOOT.BIN and image.ub to SD card and it booted fine.

I then copied BOOT.BIN to QSPI flash of my Zed board:


================
U-Boot-PetaLinux-2> sf probe 0 0 0                                                                                 #connect to QSPI flash device
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
U-Boot-PetaLinux-2> mmcinfo && fatload mmc 0 ${netstart} ${boot_img}                      #connect to mmc and load boot image (BOOT.BIN) from mmc to ram address ${netstart}
Device: zynq_sdhci
Manufacturer ID: 27
OEM: 5048
Name: SD04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading BOOT.BIN
14316288 bytes read in 1224 ms (11.2 MiB/s)
U-Boot-PetaLinux-2> sf erase 0 0xDB0000                                                                      #14316288 bytes is 0xDA7300 in hex.  Aligned to 64K this gives 0xDB0000
SF: 14352384 bytes @ 0x0 Erased: OK
U-Boot-PetaLinux-2> sf write ${netstart} 0x0 0xDA7300                                                  #write 0xDA7300 (14316288) bytes from ${netstart} to flash starting at 0x0
SF: 14316288 bytes @ 0x0 Written: OK
#Verify that boot image saved correctly
U-Boot-PetaLinux-2> md ${netstart} c                                                                               #dump 12 words of memory starting at address ${netstart}
01000000: eafffffe eafffffe eafffffe eafffffe ................
01000010: eafffffe eafffffe eafffffe eafffffe ................
01000020: aa995566 584c4e58 00000000 01010000 fU..XNLX........
U-Boot-PetaLinux-2> sf read 0x02000000 0x0 0x100                                                       #read 256 bytes from flash address 0x0 to RAM address 0x02000000
SF: 256 bytes @ 0x0 Read: OK
U-Boot-PetaLinux-2> md 0x02000000 c                                                                            #dump 12 words from memory address 0x02000000
02000000: eafffffe eafffffe eafffffe eafffffe ................
02000010: eafffffe eafffffe eafffffe eafffffe ................
02000020: aa995566 584c4e58 00000000 01010000 fU..XNLX........
=====================================


I then power-down the board, change jumper settings to boot from QSPI flash and power the board back on.

The board boots into uBoot, but not into linux kernel.  I examined memory using iminfo command and it looks like there is no valid image at ${netstart} address where kernel is supposed to be loaded.

My best guess is that FSBL does not load kernel into RAM for some reason. 

Is there a way to configure FSBL or BOOT.BIN to make FSBL load kernel into RAM? 

Is there a better/proper way to boot from QSPI? 

I examined ZedBoard boot guide but there is not information there on how to create proper BOOT.BIN. 

I am hoping to find a way to use petalinux-config and petalinux-package to create QSPI-bootable image.

Thank you.

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 10 years ago

    I did figure out one possible solution:

    I used "Create Zynq Boot Image" tool from Xilinx SDK to create BOOT.BIN and manually specify load and startup address for image.ub

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    Hi Sasha,

    The problem is not with the FSBL, but rather with the configuration of u-boot.  You need to change the PetaLinux build to have u-boot load the FIT image from QSPI instead of the default of the SD card.   In your current configuration, you should be able to insert your SD card with the image.ub file on it, boot from QSPI and it will likely work.  That confirms you are simply reading the image from the wrong place.

    Have a look at the Booting PicoZed from QSPI and eMMC under the PicoZed reference designs.  In the QSPI booting chapter, it explains the steps you need to follow to get it to work entirely from QSPI.  The material was originally targeted at PicoZed because of the eMMC, but that section is applicable to any Zynq device.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100chithra
    0 100chithra over 8 years ago

    I am working with the following

          ZedBoard

          vivado 2014.4

    I written a counter program and generated bit stream and loaded to FPGA directly through J17(PROG) connector with default configuration to JP7 to JP11. 

    I want to make my program non volatile. I am very new to vivado and zedboard...

    Please help me by suggesting a proper procedure (software and Hardware) 

    Please excuse me for this basic question and help me out of this

    Thank you... 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jafoste4
    0 jafoste4 over 8 years ago

    Hello Chithra,

    My suggestions would be for you to download the Devleloping Zynq Software Speedway located here http://zedboard.org/course/developing-zynq%C2%AE-7000-all-programmable-soc-software-vivado-20152-and-20162

    In lab 6 and 7 it goes over how to put a application/HW platform in nonvolatile memory.

    --Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube