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  : Part2 : Build u-boot using Yocto
  • 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: 24 Sep 2014 3:48 PM Date Created
  • Views 1702 views
  • Likes 0 likes
  • Comments 0 comments
  • tusharp
  • Ubuntu
  • yocto
  • uboot
  • image
  • bitbake
  • freescale
  • imx6
  • riotboard
  • setup
  • riot
  • cortex-a9
  • poky
  • bsp
  • arm
  • linux
Related
Recommended

Riotboard Yocto  : Part2 : Build u-boot using Yocto

tusharp
tusharp
24 Sep 2014

Contents:

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


In the previous blog we have build & flashed a basic sdcard image and booted with Riotboard.

 

In this blog we shall manually fetch, configure, compile and build uboot using yocto bitbake tool .

 

Setting up yocto for Riotboard:

~$ cd fsl-arm-yocto-bsp

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

~/fsl-arm-yocto-bsp/build$

 

Checking for the available uboot recipes:

~/fsl-arm-yocto-bsp/build$ bitbake -s | grep  u-boot

24vtdhh.jpg

we will be using the last one u-boot-riotboard  (2013.04)

 

 

 

Bootloader source directory:
build/tmp/work/riotboard-poky-linux-gnueabi/u-boot-riotboard/2013.04-r0/git

 

Locating source directory through bitbake, this command can be used to locate source directory for other recipes also.

It will open the recipe source directory in a new terminal window with yocto variables defined.

~/fsl-arm-yocto-bsp/build$ bitbake -c devshell u-boot-riotboard


mhg7e0.jpg

 

 

Bootloader recipe location:
sources/meta-fsl-arm-extra/recipes-bsp/u-boot/u-boot-riotboard_2013.04.bb

14e5q3c.jpg

 

 

Lets build...

 

Clean up the previous build (if any)

~/fsl-arm-yocto-bsp/build$ bitbake u-boot-riotboard -c clean -f

This will remove everything (except log directory - temp) from the uboot build directory.

It is necessary as we want to have a fresh build from source.

 

Fetch uboot from source:

~/fsl-arm-yocto-bsp/build$ bitbake u-boot-riotboard -c fetch

The Riotboard has mainline uboot support.
So we can customise the recipe (check SRC_URI & bbappend in yocto) and get the latest support from mainline uboot.

If you are planning to modify uboot, Yocto has details steps for patching new recipes, check here.

 

 

Compiling uboot:

~/fsl-arm-yocto-bsp/build$ bitbake u-boot-riotboard -c compile

This will generate u-boot.imx file here :
/tmp/work/riotboard-poky-linux-gnueabi/u-boot-riotboard/2013.04-r0/image/boot

 

 

Deploy u-boot image files:

~/fsl-arm-yocto-bsp/build$ bitbake u-boot-riotboard -c deploy

This will make u-boot.imx available in deploy directories to be bundled with sdcard image.

 

If you get something like below but still want to rebuild it, force a rebuild by adding -f  to above commands.

104onf9.jpg

 

You can directly build the uboot directly and may not need above manual steps.

~/fsl-arm-yocto-bsp/build$ bitbake u-boot-riotboard -c deploy

 

After build procedure completed you will get uboot image in deploy/images folder.

2mq3sxz.jpg

 

I hope the above gives fair idea into the yocto recipe & directories and shows how a package (like uboot) is manually build.

Next time we shall see how the kernel is setup, build , configure and patched using yocto.

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