element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Blog Riotboard Yocto  : Part1 : Environment setup and initial build
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
RIoTboard requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tusharp
  • Date Created: 22 Sep 2014 6:55 PM Date Created
  • Views 2248 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
  • ismail.zemni.a
    ismail.zemni.a over 7 years ago in reply to ismail.zemni.a

    Seems that user has not access to sqlite database, to fix this run:

    yocto@yocto-vm:/home/fsl-arm-yocto-bsp/build$ sudo chown -R yocto ../.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ismail.zemni.a
    ismail.zemni.a over 7 years ago

    I followed steps above and I have this error:

    yocto@yocto-vm:/home/fsl-arm-yocto-bsp/build$ bitbake fsl-image-fb

    ERROR: Error parsing configuration files

    Traceback (most recent call last):

      File "/home/fsl-arm-yocto-bsp/sources/poky/bitbake/lib/bb/cookerdata.py", line 227, in CookerDataBuilder.parseBaseConfiguration():

                 try:

        >            self.parseConfigurationFiles(self.prefiles, self.postfiles)

                 except SyntaxError:

      File "/home/fsl-arm-yocto-bsp/sources/poky/bitbake/lib/bb/cookerdata.py", line 289, in CookerDataBuilder.parseConfigurationFiles(prefiles=[], postfiles=[]):

                 if data.getVar("BB_WORKERCONTEXT", False) is None:

        >            bb.fetch.fetcher_init(data)

                 bb.codeparser.parser_cache_init(data)

      File "/home/fsl-arm-yocto-bsp/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 472, in fetcher_init(d=<bb.data_smart.DataSmart object at 0xb6bd4a0c>):

                     pass

        >        revs.clear()

             else:

      File "/home/fsl-arm-yocto-bsp/sources/poky/bitbake/lib/bb/persist_data.py", line 147, in SQLTable.clear():

             def clear(self):

        >        self._execute("DELETE FROM %s;" % self.table)

        

      File "/home/fsl-arm-yocto-bsp/sources/poky/bitbake/lib/bb/persist_data.py", line 66, in SQLTable._execute(*query=('DELETE FROM BB_URI_HEADREVS;',)):

                     try:

        >                return self.cursor.execute(*query)

                     except sqlite3.OperationalError as exc:

    OperationalError: unable to open database file

     

    This is my first use of yocto, can anyone have an idea how to fix it?

     

    Thanks in advance,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • deepesh-agarwal
    deepesh-agarwal over 7 years ago in reply to tusharp

    Thanks Tushar image , will this build support 1080p video decoding ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • tusharp
    tusharp over 7 years ago in reply to deepesh-agarwal

    here

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

    Build successfully completed! Next is to run the command:

    To flash sdcard image :

    cd tmp/deploy/images/riotboard

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


    And watch the screen.


    This was the last text display after success!

    NOTE: Preparing runqueue

    NOTE: Executing SetScene Tasks

    NOTE: Executing RunQueue Tasks

    WARNING: lttng-modules: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel.

    WARNING: Failed to fetch URL http://ftp.de.debian.org/debian/pool/main/m/mklibs/mklibs_0.1.38.tar.gz, attempting MIRRORS if available

    WARNING: nbench-byte: No generic license file exists for: freely in any provider

    WARNING: nbench-byte: No generic license file exists for: distributable in any provider

    NOTE: Tasks Summary: Attempted 4000 tasks of which 2415 didn't need to be rerun and all succeeded.

     

     

    Summary: There were 5 WARNING messages shown.

    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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube