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
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Blog Riotboard Yocto  : Part1 : Environment setup and initial build
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tusharp
  • Date Created: 22 Sep 2014 6:55 PM Date Created
  • Views 6946 views
  • Likes 1 like
  • Comments 36 comments
  • tusharp
  • Ubuntu
  • yocto
  • image
  • bitbake
  • freescale
  • imx6
  • riotboard
  • embedded
  • setup
  • riot
  • recipes
  • cortex-a9
  • bsp
  • mx-6s
  • arm
  • linux
Related
Recommended

Riotboard Yocto  : Part1 : Environment setup and initial build

tusharp
tusharp
22 Sep 2014

Contents:

Part1 : Environment setup and initial build  <-- You are here
Part2 : Build u-boot using Yocto
Part3 : Build Kernel using Yocto
Part4 : Package Development using Yocto
Part5 : Application Development using ADT

 

In this blog series we will walk you through the process of getting BSP source archives, cross-compiling , generating binaries for targets , developing system packages and creating sdcard for targets  using yocto tool.

 

 

A bit on yocto:

The Yocto Project is an open source project that provides templates, tools and methods to create custom Linux-based systems for embedded products.

The framework helps in cross-compilation by providing tools and packages for the build process and generation of images for target platform.

The yocto toolset has a number of recipes and it is maintained by the Yocto community and developed by Freescale for i.MX platforms.

 

 

In this blog we will build a sdcard image for  Riotboard using available sources on Yocto project.

I am using an Ubuntu 14.04 32bit host for this activity.

 

Updating host system with  required packages to support yocto build framework.

sudo apt-get install gawk wget git-core diffstat unzip texinfo libsdl1.2-dev build-essential chrpath\

    sed wget cvs subversion git-core coreutils \

    unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \

    python-pysqlite2 diffstat help2man make gcc build-essential \

    g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \

    mercurial autoconf automake groff libtool xterm curl lzop asciidoc

 

We need to have a tool to pull the packages, we are using repo here :

wget https://raw.github.com/android/tools_repo/stable/repo 

sudo mv repo /bin/repo 

sudo chmod 0755 /bin/repo

 

 

downloading yocto sources from official repository:

mkdir ~/fsl-arm-yocto-bsp

cd ~/fsl-arm-yocto-bsp

sudo repo init -u git://github.com/embest-tech/fsl-arm-yocto-bsp.git -b embest_imx-3.10.17-1.0.0_ga

repo sync

not using sudo in the above repo command will result in below error :

2uyixlf.jpg

 

 

Next we need to configure yocto to generate BSP images for Riotboard

~/fsl-arm-yocto-bsp$ MACHINE=riotboard source fsl-setup-release.sh -b build -e fb

 

A directory named build will be created inside  fsl-arm-yocto-bsp .

This contains the layers/directories used by bitbake to search for recipe while building package/image.

These recipe files can be configured (later in the blog series) according to our requirement.

 

The Riotboard config  is at : “sources/meta-fsl-arm-extra/conf/machine/riotboard.conf ”

 

 

the local.conf in build/conf can be configured to add more libraries to image (we will see that later)

local.conf

~/fsl-arm-yocto-bsp/build$ cat conf/local.conf | grep 'MACHINE\|THREAD\|IMAGE'

MACHINE ??= 'riotboard'

EXTRA_IMAGE_FEATURES = "debug-tweaks"

BB_NUMBER_THREADS = '4'

IMAGE_INSTALL_append = " mysql5 "

 

Lets build

~/fsl-arm-yocto-bsp/build$ bitbake fsl-image-fb

 

You will get a warning like below, which can be safely ignored

8z061e.jpg

 

The build will take couple of hours image ,

 

after build you will get below images in build/tmp/deploy/images/riotboard

 

Image Name

Description

u-boot.imx

bootloader

uImage

Kernel image

uImage-imx6solo_RIoTboard.dtb

Device Tree blob

fsl-image-fb-riotboard.tar.bz2

RootFileSystem

fsl-image-fb-riotboard.sdcard

Sdcard Image

 

Now the above image is ready to be flashed.

 

To flash sdcard image :

cd tmp/deploy/images/riotboard

sudo dd if=fsl-image-fb-riotboard.sdcard of=/dev/mmcblk0 bs=1M

 

make sure the boot switch is set to boot from sdcard

image

 

 

For more instructions on sdcard setup, check here.

flashing sdcard image from windows, check here.

  • Sign in to reply
  • rwp908
    rwp908 over 11 years ago

    Thanks for the fast response. I have made the changes and the Yocto baking continues as soon it has completed the build will report the results. Heading to Amazon to buy the book!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to rwp908

    Based on the name, I'm assuming that imx-test-hdcp-3.10.17-1.0.0.bin is a test for HDCP - High-bandwidth Digital Content Protection - and falls into the broad category of "stuff I don't need"  Since I can't locate it or a replacement, I removed it from the dependencies

     

    fsl-arm-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-fsl-demos/recipes-fsl/packagegroup/packagegroup-fsl.bbappend

    Removed the line: imx-test-hdcp \

     

    After this, I got a successful build.  Unfortunately, I mucked with a lot of other things before settling on this solution so I'm generating a clean build to confirm the fix.

     

    I don't have any real recommendations for alternatives to Yocto for the RiotBoard. Online references are pretty sparse.  There is a brief PACKT book on Yocto - http://www.amazon.com/Embedded-Linux-Development-Yocto-Project-ebook/dp/B00LO2GFM0/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rwp908
    rwp908 over 11 years ago

    It has position me to the next area as you stated above and results are below! 

     

    What do you recommend on building your own kernel from scratch and just a simple one to build a foundation and to build upon that I can test out on my Riot Boards?  Currently using Eclipse as my C/C++ development IDE and Flyswatter 2 for JTAG scans. If you recommend books or links greatly appreciate.

     

     

    NOTE: Preparing runqueue

    NOTE: Executing SetScene Tasks

    NOTE: Executing RunQueue Tasks

    WARNING: Failed to fetch URL http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//imx-test-hdcp-3.10.17-1.0.0.bin;fsl-eula=true, attempting MIRRORS if available

    ERROR: Fetcher failure: Fetch command failed with exit code 8, output:

    http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//imx-test-hdcp-3.10.17-1.0.0.bin:

    2015-03-28 21:02:01 ERROR 404: Not Found.

     

     

    ERROR: Function failed: Fetcher failure for URL: 'http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//imx-test-hdcp-3.10.17-1.0.0.bin;fsl-eula=true'. Unable to fetch URL from any source.

    ERROR: Logfile of failure stored in: /home/rwp908/fsl-arm-yocto-bsp/build/tmp/work/riotboard-poky-linux-gnueabi/imx-test-hdcp/3.10.17-1.0.0-r0/temp/log.do_fetch.19953

    ERROR: Task 1667 (/home/rwp908/fsl-arm-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-bsp/imx-test/imx-test-hdcp_3.10.17-1.0.0.bb, do_fetch) failed with exit code '1'

    NOTE: Tasks Summary: Attempted 2353 tasks of which 2338 didn't need to be rerun and 1 failed.

    Waiting for 0 running tasks to finish:

     

     

    Summary: 1 task failed:

      /home/rwp908/fsl-arm-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-bsp/imx-test/imx-test-hdcp_3.10.17-1.0.0.bb, do_fetch

    Summary: There were 2 WARNING messages shown.

    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

    rwp908@rwp908Tosiba2:~/fsl-arm-yocto-bsp/build$ ^C

    rwp908@rwp908Tosiba2:~/fsl-arm-yocto-bsp/build$

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to rwp908

    Assuming that the updated checksums are correct, they can be replaced in the recipe

    /fsl-arm-yocto-bsp/sources/meta-openembedded/meta-oe/recipes-support/evtest/evtest_1.25.bb

     

    Replace lines:

    SRC_URI[archive.md5sum] = "770d6af03affe976bdbe3ad1a922c973"

    SRC_URI[archive.sha256sum] = "3d34123c68014dae6f7c19144ef79ea2915fa7a2f89ea35ca375a9cf9e191473"

     

    With the updated checksums:

    SRC_URI[archive.md5sum] = "0ef3fe5e20fa2dee8994827d48482902"

    SRC_URI[archive.sha256sum] = "6e93ef54f0aa7d263f5486ce4a14cac53cf50036bfd20cf045fef2b27ee6664b"

     

    Sadly, this just gets to the next issue - an inability to retrieve

    http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//imx-test-hdcp-3.10.17-1.0.0.bin:

    which has apparently disappeared from Freescale.com

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rwp908
    rwp908 over 11 years ago

    The above worked!

     

    Yet another one in the way.

     

    NOTE: Preparing runqueue

    NOTE: Executing SetScene Tasks

    NOTE: Executing RunQueue Tasks

    WARNING: Checksum failure encountered with download of http://cgit.freedesktop.org/~whot/evtest/snapshot/evtest-1.25.tar.bz2;name=archive - will attempt other sources if available

    WARNING: Renaming /home/rwp908/fsl-arm-yocto-bsp/downloads/evtest-1.25.tar.bz2 to /home/rwp908/fsl-arm-yocto-bsp/downloads/evtest-1.25.tar.bz2_bad-checksum_0ef3fe5e20fa2dee8994827d48482902

    ERROR: Fetcher failure for URL: 'http://cgit.freedesktop.org/~whot/evtest/snapshot/evtest-1.25.tar.bz2;name=archive'. Checksum mismatch!

    File: '/home/rwp908/fsl-arm-yocto-bsp/downloads/evtest-1.25.tar.bz2' has md5 checksum 0ef3fe5e20fa2dee8994827d48482902 when 770d6af03affe976bdbe3ad1a922c973 was expected

    File: '/home/rwp908/fsl-arm-yocto-bsp/downloads/evtest-1.25.tar.bz2' has sha256 checksum 6e93ef54f0aa7d263f5486ce4a14cac53cf50036bfd20cf045fef2b27ee6664b when 3d34123c68014dae6f7c19144ef79ea2915fa7a2f89ea35ca375a9cf9e191473 was expected

    If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:

    SRC_URI[archive.md5sum] = "0ef3fe5e20fa2dee8994827d48482902"

    SRC_URI[archive.sha256sum] = "6e93ef54f0aa7d263f5486ce4a14cac53cf50036bfd20cf045fef2b27ee6664b"

    Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.

     

     

    ERROR: Function failed: Fetcher failure for URL: 'http://cgit.freedesktop.org/~whot/evtest/snapshot/evtest-1.25.tar.bz2;name=archive'. Unable to fetch URL from any source.

    ERROR: Logfile of failure stored in: /home/rwp908/fsl-arm-yocto-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/evtest/1.25-r0/temp/log.do_fetch.19245

    ERROR: Task 1733 (/home/rwp908/fsl-arm-yocto-bsp/sources/meta-openembedded/meta-oe/recipes-support/evtest/evtest_1.25.bb, do_fetch) failed with exit code '1'

    NOTE: Tasks Summary: Attempted 2339 tasks of which 2314 didn't need to be rerun and 1 failed.

    Waiting for 0 running tasks to finish:

     

     

    Summary: 1 task failed:

      /home/rwp908/fsl-arm-yocto-bsp/sources/meta-openembedded/meta-oe/recipes-support/evtest/evtest_1.25.bb, do_fetch

    Summary: There were 3 WARNING messages shown.

    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

    rwp908@rwp908Tosiba2:~/fsl-arm-yocto-bsp/build$

    • 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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube