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
Path to Programmable 3
  • Challenges & Projects
  • Design Challenges
  • Path to Programmable 3
  • More
  • Cancel
Path to Programmable 3
Blog Path to Programmable III Training Blog #5 Use PetaLinux to Create bootable SD card
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Path to Programmable 3 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fyaocn
  • Date Created: 27 Jul 2023 1:21 AM Date Created
  • Views 3021 views
  • Likes 6 likes
  • Comments 3 comments
Related
Recommended

Path to Programmable III Training Blog #5 Use PetaLinux to Create bootable SD card

fyaocn
fyaocn
27 Jul 2023

Use PetaLinux to Create bootable SD card

Table of Contents

  • 1 Start Petalinux
  • 2 Create Petalinux Project
  • 3 Build Petalinux Project
  • 4 Packing Petalinux Project

1 Start Petalinux

This training session provide hardware design file for Ultra96v2,

image

but key file used in petalinx is BSP files, it shall be access from

https://avtinc.sharepoint.com/teams/ET-Downloads/Shared%20Documents/Forms/AllItems.aspx?id=%2Fteams%2FET%2DDownloads%2FShared%20Documents%2Fprojects%2Fpublic%5Frelease&p=true&ga=1

image

image

since petalinux has been installed, start petalinux environment with

source ~/tools/Xilinx/Petalinux/PetaLinux/2022.1/settings.sh 

image

2 Create Petalinux Project

Create petalinux project for petalinux-create command,

petalinux-create -t project -s u96v2_sbc_base_2021_2.bsp -n Lab1

image

change directory and the config the project with petalinux-config,

image

after a while the text format  GUI  appears, first line is ZYNQMP core configuration,

image

press enter and go into submenu,

image

go further the SD card settings

image

choose psu_sd_0, this part links with hardware design,

image

go back to config UART setting,

image

use psu_uart_1

image

press escape and exit the configuration,save the configuration file,

image

the configuration is OK. This is standard yocto configuration with customized Zynqmp core.

image

3 Build Petalinux Project

Build the project with petalinux-build,

petalinux-build -c avnet-image-minimal

image

most of the sdk file shall be download from github or third part web, it the link lost, build ceased with error,

image

if successful, the file needed for boot image is ready to included in images/linux.

cd images/linux

There are always web link lost in build process, so far is the lab training process.

There are solutions, download cache files from AMD xilinx website and redirect the mirror link, but that is 60G, take a while.

4 Packing Petalinux Project

Packing the files the with petalinux-package

petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit

to generate BOOT.BIN

Then prepare SD card with the following layout

  • Partition 1:
    • Format: FAT32
    • Size: 1GB
    • Label: boot
  • Partition 2:
    • Format: ext4
    • Size: 4GB or more
    • Label: rootfs

 Partition 1 use less then 500M, so it shall be >500M, copy BOOT.BIN and  image.ub here,

Partition 2 shall use image burner like echet, rufus or linux command dd as

sudo dd if=rootfs.ext4 of=/dev/sdX2
sync

Plug the SD card into the slot and boot the Ultra96 to run petalinux.

The FPGA bitstream is binding with the petalinux in build and packing process, if there is any changes in hardware design. Repeat the process.

  • Sign in to reply
Parents
  • prashanthgn.engineer
    prashanthgn.engineer over 2 years ago

    Nice mentioning step by step procedures

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • prashanthgn.engineer
    prashanthgn.engineer over 2 years ago

    Nice mentioning step by step procedures

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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