You're reading from Embedded Linux Development using Yocto Projects - Second Edition
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.
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
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:
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
and choose the target release, as shown in the following screenshot:Project name
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...
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.