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 II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog Path II Programmable Week 3
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 4 Nov 2019 4:14 AM Date Created
  • Views 789 views
  • Likes 1 like
  • Comments 0 comments
  • ultra96-v2
  • path ii programmable
Related
Recommended

Path II Programmable Week 3

ralphjy
ralphjy
4 Nov 2019

Week 3 marks my start of the PetaLinux course.  Before I did that I needed to move the Xilinx development environment to another more powerful computer.  I now consider it somewhat of a miracle that I was able to get through the HW and SW courses using an i3 computer with 8GB of memory.  I moved the setup (VM and XIlinx tools) to a new i7 with 16GB of memory.  Setting up the VM for a second time went quickly and this time I installed Ubuntu 16.04.4 to insure that I was compatible with the Xilinx 2018_3 tools.  Getting a new Xilinx license also went smoothly.  Xilinx allows you to re-host an entitlement up to 5 times on a self-service basis.  If for some reason you needed to do it more than 5 times then you would need to ask for help (and I imagine give some justification).  The only requirement is that you agree to destroy the old license.  After going through the first few PetaLinux labs I realize that I probably could not have done this particular course with the old computer.  Doing a build on the new computer takes over 30 minutes.  It probably would have taken the better part of a day on the old computer if it worked at all.

 

Integrating Sensors on Ultra96 with PetaLinux 2018.3

 

Course Objectives

  1. Learn fundamentals of the PetaLinux and the Yocto build system
  2. Create PetaLinux user level applications to read sensors (uses Click Mezzanine & LCD Mini & LSM6DSL Click boards)
  3. Use PetaLinux tools:
    • Build PetaLinux for Ultra96
    • Customize and configure PetaLinux
    • Import existing Vivado hardware designs into PetaLinux
    • Add custom applications into PetaLinux
    • Create your own PetaLinux BSPs

 

PetaLinux is an embedded Linux OS plus applications.  In this case it has been customized for the Ultra96-V2.  It consists of a first stage bootloader (FSBL) that initializes the boot process, a security layer if required (ARM trusted Firmware), a second stage bootloader (U-Boot) to load the OS and applications, and finally the Linux OS.

image

 

PetaLinux uses a Yocto framework customize and build the embedded Linux distribution.  Yocto is an open source framework that uses a build tool called bitbake that uses structures called

image

The PetaLinux customized Yocto framework has just 6 commands: petalinux-create, petalinux-config, petalinux-build, petalinux-boot, petalinux-package, petalinux-util

image

 

Lab 1  Minimal Ultra96 PetaLinux

Experiment 1: Create, Configure and Build Minimal PetaLinux

  This experiment used the 3 commands petalinux-create, petalinux-config, and petalinux-build to develop a minimal Ultra96 PetaLinux image (missing devices like WiFI and Bluetooth).

  The petalinux-config gets the hardware description (in this case the HDF archive) and opens a configuration editor to allow modifying kernal settings such as device settings and boot media.

image

   We configure it to boot from the SD card and select the correct UART to interface through the JTAG/UART pod and the we exit and build the configuration from the command line.

 

Experiment 2: Preparing our SD Card

   The SD card needs to be set up in in a very specific configuration.  It needs 2 partitions, a BOOT partition for the boot files and a ROOT partition for the root file system.  This is accomplished using the fdisk command.

image

   One thing that I did not realize is that Xilinx requires that the boot partition be formatted as FAT32.  The root file system partition is required by Linux to formatted as EXT4.

   Once the partitions are formatted, we copy the files generated by the build process into the appropriate partitions.  And then run sync to flush the VM cache to write the files to the SD card.

 

Experiment 3: Boot Minimal PetaLinux on Ultra96

   Configure the Ultra96 boot switches to boot from SD and then power up while watching the boot messages via a terminal connected to the JTAG/UART pod.

   Everything booted fine and I logged in as root.   My first successful build!

 

Lab 2  Updating Fully Featured PetaLinux

Experiment 1: Updating Petalinux

  This just involved opening a pre-configured full featured HDF in Vivado and verifying that both of SPI 0's source selects were enabled because they are both need to interface the Click mezzanine card.

  Then a new petalinux project was created and confifured using this HDF.

 

Experiment 2: Customizing the PetaLinux Kernel using the Menu

   Enable the User mode SPI device driver support and update the system-user.dtsi file.

   Then build the new configuration.

 

Experiment 3: Customizing the PetaLinux root File System using the Menu

   Copy the new boot and rootfs files to the SD card.

   Boot the Ultra96 with the new image.

 

Lab 3  Connect with Ultra96 Using Wi-Fi

Experiment 1: Connect Ultra96 to a LAN with Wi-Fi

   When the Ultra96 boots with the new image it operates as a WiFi access point.  This lab connects to the access point and then uses a WiFi configuration program to configure the Ultra96 to connect to the local LAN.

   As I detailed in an earlier blog, I could not connect to the access point because the image had the incorrect wifi driver specified.  After I corrected that everything worked as expected.

 

Experiment 2: Secure Remote Login and File Transfer

   Once the LAN WiFi connection was established I then verified that I could establish an ssh connection and also do file transfers using filezilla.

 

Experiment 3: Interacting with the Internet

   Verified that I was able to ping URLs on the external WAN and the local LAN.

 

Experiment 4: Internet HTTP File Transfer

   Verified that I could pull files from URLs on the external WAN and the local LAN using wget.

 

Summary:

Very satisfying start to using PetaLinux.  Everything is starting to feel real, like I can finally start to do something useful.  The next lab, Lab 4, uses the mezzanine card and the LSM6DSL Click.  I received a shipment notification that the mezzanine card should be delivered in 2 days.  I'll use the down time to start trying to figure out my project.

  • Sign in to reply
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