element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
MicroZed Hardware Design PetaLinux SD boot
  • 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 11 replies
  • Subscribers 314 subscribers
  • Views 2008 views
  • Users 0 members are here
Related

PetaLinux SD boot

Former Member
Former Member over 10 years ago

I'm having trouble figuring out how to get the image I've created for the microZed 7020 to boot on it. It runs nicely in the qemu emulator but I can't get a valid system.bit.bin file. I've found some not quiet for microZed instructions to make a .bit.bin file, but I try using any of those files the boot process ends with a timeout on DMA when trying to load the FMGA.

For reference I'm using the Avnet-MicroZed-z7020-v2014.2.bsp file with the petalinux-create command, that appears to be the most correct one to use.

SD Boot without system.bit.bin:
Copying Linux from SD to RAM...
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SD04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Loading bitstream from SD/MMC/eMMC to RAM..
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SD04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading system.bit.bin
** Unable to read file system.bit.bin **
zynq-uboot>
]


With a system.bit.bin that I made using "bootgen -image test.bif -split bin -o i BOOT.BIN" but none of the .bit files I could find to convert with that matched the instructions so I think I'm doing something wrong there. But the boot attempts with that system.bit.bin all failed with:

Copying Linux from SD to RAM...
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SD04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Loading bitstream from SD/MMC/eMMC to RAM..
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SD04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading system.bit.bin
4045568 bytes read in 550 ms (7 MiB/s)
Error: Timeout waiting for DMA to complete.
fpga - loadable FPGA image support

Usage:
fpga [operation type] [device number] [image address] [image size]
fpga operations:
  dump  [dev]                   Load device to memory buffer
  info  [dev]                   list known device information
  load  [dev] [address] [size]  Load device from memory buffer
  loadb [dev] [address] [size]  Load device from bitstream buffer (Xilinx only)
  loadmk [dev] [address]        Load device generated with mkimage
        For loadmk operating on FIT format uImage address must include
        subimage unit name in the form of addr:<subimg_uname>
zynq-uboot>



Really I'm hoping someone just points me to the correct instructions for this.

  • Sign in to reply
  • Cancel
  • zedhed
    0 zedhed over 10 years ago

    Hi gpsat,

    I guess I am a bit confused by what you are trying to accomplish.  From what I see in your post above, it looks like there is a mix of methodologies being applied here.  Using system.bit.bin is an advanced alternate development methodology that we experimented with for MicroZed which allows the PL bitstream to be updated independent of the FSBL or U-Boot executables since the bitstream is loaded by U-boot rather than by the FSBL.

    If you want to follow the PetaLinux development methodology which is the one that Xilinx recommends, then eventually you will reach a step that will allow for your system FSBL, the PL bitstream, and the U-Boot executable to all be packaged into a boot.bin container file.  Once you have reached the point in the development process where you have all 3 of the precursor files built, the PetaLinux command to package them into boot.bin will be something like this:

    petalinux-package --boot --fsbl /tftpboot/zynq_fsbl.elf --fpga ../design_1_wrapper.bit --uboot=/tftpboot/u-boot.elf

    Using that approach, you will not need to use a system.bit.bin file and perhaps you are getting snagged by a stale U-Boot environment partition.  I saw another post from you here:

    http://microzed.org/content/open-source-linux-system-qspi-programming-tutorial-fails

    Please go through that other thread first since clearing the U-Boot environment variables might get you past this issue.  If it does not resolve your issue, let me know the details of what you find.

    Regards,

    -Kevin

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

    Okay, I'm not getting anything different now.

    I'm certain it's just that I haven't found a single guide for setting up the microZed that doesn't presume extensive petaLinux experience. And thus when the guides finish with "And now it's easy to put the files on the SD card and boot" I'm largely having to guess which files it's talking about.

    Can you point me to a guide that will step me though making those three files then deploying the result to the microZed?

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

    So I was wondering if the "MicroZed 7020 Open Source Linux In System QSPI Programming Tutorial" as mentioned in the other thread was what was poisoning the U-Boot env variabels, so I did the full wipe as described in the other thread then put the boot.bin created by the command you posted (petalinux-package ...) on a sd card and set the jumpers to boot from the SD card.

    Nothing happens, not a single character is printed to the terminal.



    While trying to think of things to get this all working I noticed I hadn't gone through the 4 tutorials (01_MicroZed_Zynq_Intro_2014_2_01 to 04_MicroZed_FSBL_Boot_2014_2_01) which I just did (except for the JTAG bits, not a piece of hardware we have lying around conveniently right now) and all of those worked fine.


    As to what my end goal is:
    We want linux on the mircoZed with a few applications of our writing doing their thing. The petaLinux flow of things looks really nice and reliable. As yet I'm not wanting to anything a non-standard way, I've gone as far as using a centos VM inside my Ubuntu box because of some issues running petalinux in ubuntu.


    So I'm currently wondering:
    A) What is the correct way to make those three precursor files?
    B) Is there meant to be any files along side the BOOT.BIN file on the SD card for booting from SD card?

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

    Hi gpsat,

    The simplest way to accomplish what you want is to download the PetaLinux 2014.2 BSP from the reference design/tutorial area for MicroZed, and then refer to the Xilinx User Guide 977 for 2014.2 to install the BSP.

    http://www.xilinx.com/support/documentation/sw_manuals/petalinux2014_2/ug977-petalinux-getting-started.pdf

    To build the system for a specific board, refer to the Xilinx User Guide 980:

    http://www.xilinx.com/support/documentation/sw_manuals/petalinux2014_2/ug980-petalinux-board-bringup.pdf

    If you prefer, there is a PetaLinux tutorial on ZedBoard.org for the Zynq Mini-ITX board.  While you cannot use the support files for the MicroZed, all of the software instructions are applicable.

    The only files you need to copy to the top-level directory of the microSD card are the BOOT.BIN and the image.ub.  Configure the mode switches for SD boot on your board and you should be all set.

    Ron

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

    Going through UG 977 they have this pearl of a line at the end of page 15:

    For Zynq, you can follow section Boot Pre-built Images from SD Card for Zynq to SD boot the rebuilt images. Instead of using the prebuilt image.ub, use the rebuilt one from <plnx-proj-root>/images/linux/image.ub

    It's just a shame that we haven't been told how to build a boot.bin file. But I bet that is only an issue because now I need to figure out how to deal with a larger image.ub.

    But if I can't solve that I'll start a new thread.

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

    Reduced the un-needed library files being included and now the image is small enough to fit in. Things are running, very happy.

    So now I have two questions remaining:
    a) How to increase the size limitations on the image, others don't appear to have gotten any help on that previously (http://zedboard.org/content/petalinux-boot-error-zedboard)
    b) How to deploy my image to the QSPI flash, sd cards aren't the most reliable of interfaces.

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

    Focusing on the size restriction first.

    The best set of instructions I could find was http://forums.xilinx.com/t5/Embedded-Linux/Petalinux-kernel-not-loading/m-p/502122#M10150 (post #3) but it is aimed at ZedBoard not microZed. But following those instructions doesn't help me.

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

    testing

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

    And here I was getting hopeful that someone had something to say.

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

    You can try reading this chapter "Booting Linux from QSPI" in the "Booting PicoZed using QSPI and eMMC" found here: http://zedboard.org/content/booting-picozed-using-qspi-and-emmc-v21 

    It tells you how to get the files into the qspi flash in detail, but the 'power up with the switches set to qpsi' step is a bit vague.  I am not sure if our board had the uboot env overwritten or corrupted, but there was no command that told it to boot from qspi, so I did it by hand, something like: echo Running QSPI Boot && sf probe 0 && sf read ${clobstart} 0x520000 0x880000 && bootm ${clobstart}

    The 0x520000 could be different in your system, you'd want to check the output of your 'cat /proc/mtd' command to see where the kernel partition starts.

    • 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