Reader small image

You're reading from  Embedded Linux Development using Yocto Projects - Second Edition

Product typeBook
Published inNov 2017
Publisher
ISBN-139781788470469
Edition2nd Edition
Right arrow
Authors (2):
Otavio Salvador
Otavio Salvador
author image
Otavio Salvador

Otavio Salvador loves technology and started his free software activities in 1999. In 2002, he founded O.S. Systems, a company focused on embedded system development services and consultancy worldwide, creating and maintaining customized BSPs, and helping companies with their product developments challenges. This resulted in his joining the OpenEmbedded community in 2008, when he became an active contributor to the OpenEmbedded project.
Read more about Otavio Salvador

Daiane Angolini
Daiane Angolini
author image
Daiane Angolini

Daiane Angolini has been working with embedded Linux since 2008. She has been working as an application engineer at NXP, acting on internal development, porting custom applications from Android, and on-site customer support for i.MX architectures in areas such as the Linux kernel, u-boot, Android, Yocto Project, and user-space applications. However, it was on the Yocto Project that she found her place.
Read more about Daiane Angolini

View More author details
Right arrow

Chapter 3. Using Toaster to Bake an Image

Now that we know how to build an image using BitBake within Poky, we will learn how to do the same using Toaster. We are going to focus on the simplest usage of Toaster and also mention what else Toaster can do so you know about its capabilities.

What is Toaster?


Toaster is a web interface that's used to configure and run builds. It communicates with the BitBake and Poky build system to manage and gather information about builds, packages, and images.

There are two ways of using Toaster:

  • Locally: We can run Toaster as a local instance. This is suitable for single-user development, providing a graphic interface to the BitBake command lines and some build information.
  • Hosted: This is suitable for multiple users. When Toaster is set up as a hosted instance, its components can be spread across several machines so the users' builds are run on the Toaster build servers.

In this chapter, we are going to use Toaster as a local instance. If you want to use it as a hosted instance, please look at the following website: http://www.yoctoproject.org/docs/current/toaster-manual/toaster-manual.html.

Note

Bear in mind that every hosted service requires attention with its security. Think about this before using a hosted instance.

Installing Toaster


Toaster is written using the Python Django framework, so the easiest way of installing it is using Python's pip utility. We have already installed this when configuring our host machine in Chapter 2, Baking Our Poky-Based System, so we can install the rest of Toaster's requirements inside of Poky's directory:

$ pip3 install --user -r bitbake/toaster-requirements.txt

Starting Toaster


Once we have installed Toaster's requirements, we are ready to start its server. To do this, we should go to Poky's directory and run the following commands:

$ source oe-init-build-env
$ source toaster start

To access the Toaster web interface, open your favorite browser and enter http://127.0.0.1:8000.

Note

By default, Toaster starts on port 8000. The webport parameter allows a different port to be used, for example, $ source toaster start webport=8400.

Next, we see the starting page of Toaster:

Building an image to QEMU


Following the same steps used in Chapter 2, Baking Our Poky-Based System, we are going to build an image to the QEMU ARM emulation.

The first step is to create the first project, which is a collection of configurations and builds that have already been performed.

As we don't have a project, we need to start one. Create a Project name and choose the target release, as shown in the following screenshot:

After creating my-first-project, we can see the main project screen, as shown in the following screenshot:

While on the Configuration tab, go to Machine and change it to qemuarm:

After that, click the Image Recipes tab to choose the image you want to build. In this example, as used in Chapter 2, Baking Our Poky-Based System, we can build core-image-full-cmdline:

The following screenshot shows the build process:

The build process takes some time, but after that, we can see the built image along with some statistics:

We can also verify the generated set of files, as shown in...

Summary


In this chapter, we were introduced to Toaster and its basic features. We went through the process of installing and configuring Toaster, and we built and inspected an image.

In the next chapter, we are going to present some important BitBake concepts, and we believe these concepts are essential to really understand the Yocto Project as a whole. We will use BitBake and the command line for the rest of the book as they provide an internal view of all the concepts.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Embedded Linux Development using Yocto Projects - Second Edition
Published in: Nov 2017Publisher: ISBN-13: 9781788470469
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.
undefined
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

Authors (2)

author image
Otavio Salvador

Otavio Salvador loves technology and started his free software activities in 1999. In 2002, he founded O.S. Systems, a company focused on embedded system development services and consultancy worldwide, creating and maintaining customized BSPs, and helping companies with their product developments challenges. This resulted in his joining the OpenEmbedded community in 2008, when he became an active contributor to the OpenEmbedded project.
Read more about Otavio Salvador

author image
Daiane Angolini

Daiane Angolini has been working with embedded Linux since 2008. She has been working as an application engineer at NXP, acting on internal development, porting custom applications from Android, and on-site customer support for i.MX architectures in areas such as the Linux kernel, u-boot, Android, Yocto Project, and user-space applications. However, it was on the Yocto Project that she found her place.
Read more about Daiane Angolini