Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Embedded Linux Development with Yocto Project

You're reading from  Embedded Linux Development with Yocto Project

Product type Book
Published in Jul 2014
Publisher
ISBN-13 9781783282333
Pages 142 pages
Edition 1st Edition
Languages

Table of Contents (22) Chapters

Embedded Linux Development with Yocto Project
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Meeting the Yocto Project Baking Our Poky-based System Using Hob to Bake an Image Grasping the BitBake Tool Detailing the Temporary Build Directory Assimilating Packaging Support Diving into BitBake Metadata Developing with the Yocto Project Debugging with the Yocto Project Exploring External Layers Creating Custom Layers Customizing Existing Recipes Achieving GPL Compliance Booting Our Custom Embedded Linux References
Index

Chapter 14. Booting Our Custom Embedded Linux

It's time! We are now ready to boot our custom-made embedded Linux as we have learned the required concepts and gained enough knowledge about the Yocto Project and Poky. In this chapter, we practice what we have learned so far about using Poky with an external BSP, the Freescale ARM BSP, use it to generate an image for use with the Wandboard machine, and boot it using the SD card.

The same concepts can be applied to every other board, as long as a vendor provides a BSP layer to use with the Yocto Project.

We can see a list of the most commonly used BSP layers in this chapter. This should not be taken as a complete list, or as a definitive one, but we want to facilitate your search for the needed layer in case you have one board of a specific vendor next to you. This list is as follows, in alphabetic order:

  • Allwinner: This has the meta-allwinner layer

  • BeagleBoard: This has the meta-beagleboard layer

  • CuBox-i: This has the meta-fsl-arm-extra layer...

Exploring the Wandboard


The Wandboard is a not-for-profit low-cost Cortex-A9 processor, based on the Freescale i.MX6 SoC board with high-performance multimedia capabilities. The board is available in three versions, as shown in the following table:

Board version

Features

Wandboard Solo

Freescale i.MX6S processor (single-core)

512 MB RAM

Wandboard Dual

Freescale i.MX6DL processor (dual-core)

1 GB RAM

802.11n wireless and Bluetooth

Wandboard Quad

Freescale i.MX6Q processor (quad-core)

2 GB RAM

802.11n wireless and Bluetooth

SATA

The Wandboard is supported by the Wandboard community. More information is available at http://www.wandboard.org/. The following is an image of a Wandboard:

Discovering Freescale ARM BSP


The Wandboard board uses the Freescale i.MX6 SoC. To use it with the Yocto Project, we need to use BSP layers.

The needed BSP layers to enable Wandboard support in Yocto Project are the following:

  • meta-fsl-arm: This BSP layer adds support to Freescale's reference machines and provides the basic BSP support

  • meta-fsl-arm-extra: This BSP layer adds support to third-party boards based on Freescale's SoC, such as Wandboard, and requires meta-fsl-arm as it provides the base BSP support

Freescale BSP is supported by a community, and more information on it can be found at http://freescale.github.io/.

Using Wandboard with the Yocto Project


The modular structure of the Yocto Project gives us the freedom to include external BSP layers to extend a set of supported machines.

The first step to enable support for Wandboard is to download the metadata of the BSP layers.

From the directory where the Poky source code is cloned, please run the following command lines:

$: git clone --branch daisy https://github.com/Freescale/meta-fsl-arm-  extra.git 
$: git clone --branch daisy git://git.yoctoproject.org/meta-fsl-arm 

The final directory structure you should have is shown in the following figure:

After completing this, we must create the build directory we use for our builds. We can do this using the following command line:

$: source poky/oe-init-build-env build-wandboard 

Tip

The same procedure was first introduced in Chapter 2, Baking Our Poky-based System.

Some packages included in Freescale ARM BSP have proprietary property and are followed by a End-user License Agreement (EULA) that shows the legal...

Building an image for Wandboard


After we have the build directory and the BSP layers are properly set up, we can start the build. Inside the build-wandboard directory, we must call the following command:

$: MACHINE=wandboard-<variant> bitbake <image>

The MACHINE variable can be changed depending on the Wandboard we want to use or set in build/conf/local.conf. The machine names for the Wandboard variants are wandboard-solo, wandboard-dual, and wandboard-quad.

If we want to use the Wandboard Solo and build core-image-sato, which provides an embedded graphical environment, we should run the following command:

$: MACHINE=wandboard-solo bitbake core-image-sato 

The build process will take a while. It takes about 2 hours and about 10 Gigabytes in a workstation machine.

If you didn't accept the EULA or want a smaller image to build faster, you can build core-image-minimal instead. For this, use the following command:

$: MACHINE=wandboard-solo bitbake core-image-minimal

Booting Wandboard from the SD card


After the build process is over, the image will be available inside the build-wandboard/tmp/deploy/images/wandboard-solo/ directory. There are many files, but Freescale ARM BSP generates a ready-to-use SD card image.

The file we want to use is core-image-sato-wandboard-solo.sdcard or core-image-minimal.sdcard, depending on the image we built.

Note

Make sure your point to the right device and double check to not write in your hard disk.

In order to copy the generated image to the SD card, we should use the dd utility, as follows:

$: sudo dd if=core-image-sato-wandboard-solo.sdcard of=/dev/sdX bs=1M 

We can also use the following command:

$: sudo dd if=core-image-minimal-wandboard-solo.sdcard of=/dev/sdX  bs=1M 

After copying the content in the SD card, insert it into the SD card slot, connect the HDMI cable, and power on the machine. It should boot nicely.

Tip

There are two SD card slots in Wandboard. The primary slot is located in the CPU board, used for booting...

Summary


In this final chapter, we introduced two community projects, Wandboard and Freescale ARM BSP layers. We consolidated our Yocto Project knowledge by adding external BSP layers and using these in a real board with a generated image.

Throughout the book, we learned the needed background information for you to learn on your own any other aspect of the Yocto Project that you may need. You have the general understanding to know what is happening behind the scenes when you ask BitBake to build a recipe or an image. From now on, you are ready to free your mind and try new things. There are plenty of boards available, waiting for you to give them life. The ball is in your court now; here's where the fun begins!

lock icon The rest of the chapter is locked
You have been reading a chapter from
Embedded Linux Development with Yocto Project
Published in: Jul 2014 Publisher: ISBN-13: 9781783282333
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}