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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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 Week #4 - End of The Training
  • 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: cmelement14
  • Date Created: 10 Nov 2019 1:55 AM Date Created
  • Views 534 views
  • Likes 5 likes
  • Comments 1 comment
  • ultra96-v2
  • path ii programmable
  • petalinux
Related
Recommended

Week #4 - End of The Training

cmelement14
cmelement14
10 Nov 2019

  • Introduction
  • Lab 1 - A Couple of Lessons Learned
  • Lab 2 - Redundant Constrain Files & Possible Missing Steps in Lab Instruction
  • Lab 3 - Wifi Setup & Network/Internet Access
  • Lab 4 - Remote Debug Linux Application
  • Lab 5 - IoT Application
  • Lab 6 - Discrepancies in Lab Instructions
  • Conclusion

 

 

Introduction

 

The is the last part of my training before building my own project. It blogs all PetaLinux training labs (Lab 1 to Lab 6). The first lab gave me a lot of headache. After a couple of issues being sorted out, the rest of this lab went smoothly. In the second lab, I built my own image but it doesn't work. I have to use the provided solution. I also doubt that there might be missing step(s) in the lab instructions. Lab 3 is about Wifi setup for Ultra96 and the lab instruction is very detailed. Lab 4 is about remotely debugging Linux application. Lab 5 is about building an IoT application. Last but not least, Lab 6 is about integrating a user application into rootfs. It may not be very useful for a system booting from a SD card, but it could be very useful for system booting from flash memory such as NAND, NOR or eMMMC.

 

 

 

Lab 1 - A Couple of Lessons Learned

 

The first lab is supposed to be a relative simple experiment creating a minimal PetaLinux on the Ultra96 platform, but it caused me a lot of trouble:

 

1. After I created a PetaLinux project and configured the system, unexpected error messages showed up (shown below). At first, no clue on what went wrong, so posted a question. While waiting for someone's help, I started browsing the project folder and found a couple of log files under the build folder: config.log and build.log. Both file told me my default python version is v3.x not v2.7.x which is required by PetaLinux tools. I changed the default python to v2.7.x but it still showed the similar issue.

 

$petalinux-config --get-hw-description=../

INFO: Getting hardware description...

INFO: Rename design_1_wrapper.hdf to system.hdf

[INFO] generating Kconfig for project

[INFO] menuconfig project

configuration written to /media/sf_shared/Xilinx/petalinux/2018_3/support_documents/v2/lab1_example/project-spec/configs/config

 

*** End of the configuration.

*** Execute 'make' to start the build or try 'make help'.

 

[INFO] sourcing bitbake

ERROR: Failed to source bitbake

ERROR: Failed to config project.

ERROR: Get hw description Failed!.

 

$ petalinux-build

[INFO] building project

[INFO] sourcing bitbake

ERROR: Failed to source bitbake

ERROR: Failed to build project

 

 


2. Did some google search and found this post which reported the same problem. Basically, creating PetaLinux project in VM shared folder doesn't work. I have to use VM local folder. I didn't give the VM a whole of disk space, that's why I was trying to create all projects in the VM shared folders. Vivado and SDK don't have any problem, but PetaLinux tools don't like the shared folders. Then I created the project in VM local drive and everything worked fine. However, as the lab instruction suggests, I probably need to remove the folder after the project is done because the project takes too much disk space (8.9GB for Lab 1).

image

 

I don't quite understand the warning message and don't know its impact to the generated image either. If somebody has any knowledge about this warning message, please share the info in the comment area.

WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:

[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

 

I used the built image and the system did boot up. I was able to login as root user.

 

 

 

Lab 2 - Redundant Constrain Files & Possible Missing Steps in Lab Instruction

 

Using Vivado to open the block design in the provided hardware project, it gave a critical warning message. The lab instruction says "Please ignore any warnings when opening the design". It seems the warning can be easily eliminated by removing the redundant constrain file shown below. Anyhow, the lab doesn't require regenerate the HDF file, so it doesn't matter fix the critical warning or not.

image

image

 

I followed the lab instructions and built my own image. It downloaded lots of files (shows 3501 files) when execute petalinux-build command. It took more than an hour to complete the build. It takes 34.5GB disk space in total.

image

 

The build spit out a few warnings, but it seems successful.

image

 

After creating the SD card, the first boot failed because of kernel crash (see the last line of the following screenshot). After going through the console message, I realized I didn't issue command

$sudo sync

and didn't wait long enough before ejecting the SD card.

image

 

After recreating the SD card, the boot still failed (it didn't show the login prompt no matter how many times I stroke Enter key).

image

 

Then the console spit out the following block of messages again and again. Based on the message, it seems my built image doesn't contain getty utility.

image

 

The getty should be part of busybox as shown below (captured from the provided solution). I suspect we need a specific configuration for busybox to include getty, but the lab instruction missed that part. I don't have much time to dig deep into it now, but maybe later.

image

 

The provided solution seems working fine, but the login prompt didn't automatically show up at the end of the booting process. I had to type Enter before I can see the login prompt.

image

 

 

 

Lab 3 - Wifi Setup & Network/Internet Access

 

This lab is pretty straightforward. I followed the instructions and everything went smoothly. Some people reported having difficulty to connect Ultra96's AP(P2P: WiFi Driver issue ), but I didn't observe the problem. As shown in the following screenshot, my system used wpa-driver wext.

image

 

I was able to set up Ultra96 Wifi using my home network. It was assigned IP address 192.168.1.214.

image

 

 

 

Lab 4 - Remote Debug Linux Application

 

I followed the lab instructions, but I noticed my compiled binary code size is greater than the size shown in the lab instruction. My version

shows 3169 bytes in total.

image

 

On the other hand, the size in lab instruction shows 3037 bytes in total. Even though the size difference, my version seems working fine.

image

 

I was able to make remote debug connection through Wifi network. Below shows the successful connection.

image

 

Regarding the release version of the same application, its size is reduced to 2917 bytes from 3169 bytes of debug version.

image

 

The .elf files for the debug and the release versions are different too. Their sizes are much greater than their corresponding code sizes as shown in the following two screenshots.

image

image

 

 

 

Lab 5 - IoT Application

 

This lab exercises an IoT application which logs temperature sensor data to IBM Bluemix server. Like the situation in the last lab, my version has different code size than that in the lab instruction. However, unlike in the last lab, my code size is actually smaller than that in the lab instruction. Really don't why they have different sizes even though we are using the same version of SDK. Maybe because we have different Linux minor versions?

image

 

image

 

The following screenshot shows my Ultra96 has a successful connection to IBM Bluemix.

image

 

 

Since my board was running for a while, the temperature was pretty stable and graph shows as a line. To avoid ESD discharge, I didn't touch the temperature sensor using my hand like others reported. ESD voltage is pretty high in winter time.

image

 

Answer to the question at the end of Lab 5: line 176 creating the string data to send to the IBM Bluemix server using MQTT protocol. Line 177 sends that data.

 

image

 

 

 

Lab 6 - Discrepancies in Lab Instructions

 

Lab 6 instruction is pretty clear but there are a couple of discrepancies really confusing people. First, in lsm6dsl-sensor.bb file, the instruction says add a line, but in its screenshot, that line becomes a comment line (as shown in the following screenshot). What is the point of adding a comment line in an instruction step?

 

image

 

Thus, in my opinion, the instruction is correct and the screenshot is incorrect. However, the provided solution also shows as a comment line. That's really confusing.

image

 

The other discrepancy I found is in the make file: the lab instruction uses variable APP while the screenshot shows variable app. The variable should be case-sensitive so the screenshot is incorrect again.

image

 

The correct make file content should look like this:

image

 

 

 

Conclusion

 

Thanks to our sponsors Avnet & Xilinx for providing training materials. Also thanks to Randall (rscasny) for organizing this great training. I learned a lot from this training. Through this training, I feel much more comfortable using Zynq UltraScale+ MPSoC devices. I know I just touched the tip of the iceberg. There's still a lot to learn in the future, but at least, I know where to start and where to dig deep into.

 

As an introductory course, the training material is adequate. The lab instructions are very detailed and easy to follow. I really recommend this course to anyone who wants to learn the Zynq UltraScale+ MPSoC devices. However, the material isn't perfect either. There are some typos and mistakes (please see my blogs for details).

  • Sign in to reply
  • rscasny
    rscasny over 5 years ago

    Charles,

     

    I read through your blog. Great job. Appreciate your efforts. Looking forward to your project.

     

    Randall

    --element14 team

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