Reader small image

You're reading from  Yocto for Raspberry Pi

Product typeBook
Published inJun 2016
PublisherPackt
ISBN-139781785281952
Edition1st Edition
Concepts
Right arrow
Authors (2):
TEXIER Pierre-Jean
TEXIER Pierre-Jean
author image
TEXIER Pierre-Jean

Pierre-Jean TEXIER has been an embedded Linux engineer at Amplitude Systèmes (Amplitude Systèmes was a pioneer in the marketing of Ytterbium femtosecond lasers) since 2014 where he maintains a custom system on chip i.MX6 with the Yocto project (meta-fsl-arm), which is made by a French company: EUKREA. He is a graduate of ESTEI school at Bordeaux where he spent 3 years as a student in order to become an embedded Linux Engineer. He is a big ardent of the world of free software and the embedded world. His knowledge background includes C/C++, Yocto, Linux, Bash, Kernel development but he is also open to trying new things and testing new technologies. First, I want to thank my patience wife for her during my writing sessions. I also give thanks my parents and my brother, who without them, this book possibly would not have happened. I would also like to thank all of the mentors that I've had over the years. Mentors such as Cyril SAGONERO, Sylvain LE HENAFF, Pierre BORDELAIS, Vincent POULAILLEAU, Fabrice BONNET, Jean-Claude PERESSINOTTO, Pierre AUBRY. Without learning from these teachers, there is not a chance I could be doing what I do today. To finish I would like to thanks Eric MOTTAY the CEO of Amplitude Systèmes, Luca TESTA the head of Electronics team at Amplitude Systèmes for his trust, Hitesham WOODHOO, Alexandre GAMONET, Kevin PINTO and Guillaume MACHINET For the various discussions about the raspberry pi during coffee breaks.
Read more about TEXIER Pierre-Jean

Petter Mabäcker
Petter Mabäcker
author image
Petter Mabäcker

Petter Mabcker is a senior software developer specializing in embedded Linux systems. For the past 8 years, he has been working with embedded Linux professionally. Currently, Petter works as a Scrum Master and senior software developer at Ericsson AB. Additionally, his knowledge includes C/C++, shell scripting, Yocto Project (including BitBake and OpenEmbedded), Scrum, and Git. In 2013, Petter started the small business Technux, which he runs as a side project in parallel with his duties at Ericsson. Some of the focus areas of the business are open source embedded Linux projects, such as the Yocto Project, together with different projects that involve the Raspberry Pi. As part of the work with Technux, Petter works as a contributer to the Yocto Project (including the Raspberry Pi BSP layer, known as meta-raspberrypi).
Read more about Petter Mabäcker

View More author details
Right arrow

Chapter 2.  Building our First Poky Image for the Raspberry Pi

In this chapter, we will try to understand the basic concepts of the Poky workflow. Using the Linux command line, we will proceed with the different steps required to download, configure, and prepare the Poky Raspberry Pi environment and generate an image that can be used by the target.

Installing the required packages for the host system


The steps necessary for the configuration of the host system depend on the Linux distribution used. Indeed, it is advisable to use one of the Linux distributions maintained and supported by Poky. This is to avoid wasting time and energy in setting up the host system. Currently, the Yocto Project is supported on the following distributions:

  • Ubuntu 12.04 (LTS)

  • Ubuntu 13.10

  • Ubuntu 14.04 (LTS)

  • Fedora release 19 (Schrödinger's Cat)

  • Fedora release 21

  • CentOS release 6.4

  • CentOS release 7.0

  • Debian GNU/Linux 7.0 (Wheezy)

  • Debian GNU/Linux 7.1 (Wheezy)

  • Debian GNU/Linux 7.2 (Wheezy)

  • Debian GNU/Linux 7.3 (Wheezy)

  • Debian GNU/Linux 7.4 (Wheezy)

  • Debian GNU/Linux 7.5 (Wheezy)

  • Debian GNU/Linux 7.6 (Wheezy)

  • openSUSE 12.2

  • openSUSE 12.3

  • openSUSE 13.1

Note

Even if your distribution is not listed here, it does not mean that Poky will not work, but the outcome is not guaranteed. Throughout this book, you will be presented with instructions for using Poky with the Ubuntu distribution...

Building the Poky image


At this stage of development, let's have a look at the available images and certified compatible for our platform (.bb files).

Choice of image

Poky provides several pre-designed image recipes that we can use to build our own binary image. We can check the list of available images by running the following command from the poky directory:

$ ls meta*/recipes*/images/*.bb

All the recipes provide images that are, in essence, sets of unpacked and configured packages, generating a filesystem that we can use on actual hardware (for further information about different images, you can visit ( http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-images ).

Next, here's a brief representation of available images:

We can add the layers proposed by meta-raspberry to all of these layers:

$ ls meta-raspberrypi/recipes-core/images/*.bb
rpi-basic-image.bb
rpi-hwup-image.bb
rpi-test-image.bb
  • rpi-hwup-image.bb: This is an image based on core-image-minimal.

  • rpi-basic...

Booting the image on the Raspberry Pi


We now come to what is surely the most anticipated moment of this chapter: the moment where we boot our Raspberry Pi with a fresh Poky image.

You just have to insert your SD card into a slot, connect the HDMI cable to your monitor, and connect the power supply (it is also recommended to used a mouse and keyboard to shut down the device, unless you plan on just pulling the power and possibly corrupting the boot partition).

After connecting the power supply, you should see the Raspberry Pi splash screen:

Note

The login for the Yocto/Poky distribution is root.

Summary


In this chapter, we learned the steps required to set up Poky and get our first image built. We ran that image on the Raspberry Pi, which gave us a good overview of the available capabilities.

In the next chapter, you will be introduced to Hob, which provides a human-friendly interface for Bitbake. We will use it to build an image and customize it further. After that, you will be introduced to another tool, Toaster, which is a web interface for Bitbake.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Yocto for Raspberry Pi
Published in: Jun 2016Publisher: PacktISBN-13: 9781785281952
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
TEXIER Pierre-Jean

Pierre-Jean TEXIER has been an embedded Linux engineer at Amplitude Systèmes (Amplitude Systèmes was a pioneer in the marketing of Ytterbium femtosecond lasers) since 2014 where he maintains a custom system on chip i.MX6 with the Yocto project (meta-fsl-arm), which is made by a French company: EUKREA. He is a graduate of ESTEI school at Bordeaux where he spent 3 years as a student in order to become an embedded Linux Engineer. He is a big ardent of the world of free software and the embedded world. His knowledge background includes C/C++, Yocto, Linux, Bash, Kernel development but he is also open to trying new things and testing new technologies. First, I want to thank my patience wife for her during my writing sessions. I also give thanks my parents and my brother, who without them, this book possibly would not have happened. I would also like to thank all of the mentors that I've had over the years. Mentors such as Cyril SAGONERO, Sylvain LE HENAFF, Pierre BORDELAIS, Vincent POULAILLEAU, Fabrice BONNET, Jean-Claude PERESSINOTTO, Pierre AUBRY. Without learning from these teachers, there is not a chance I could be doing what I do today. To finish I would like to thanks Eric MOTTAY the CEO of Amplitude Systèmes, Luca TESTA the head of Electronics team at Amplitude Systèmes for his trust, Hitesham WOODHOO, Alexandre GAMONET, Kevin PINTO and Guillaume MACHINET For the various discussions about the raspberry pi during coffee breaks.
Read more about TEXIER Pierre-Jean

author image
Petter Mabäcker

Petter Mabcker is a senior software developer specializing in embedded Linux systems. For the past 8 years, he has been working with embedded Linux professionally. Currently, Petter works as a Scrum Master and senior software developer at Ericsson AB. Additionally, his knowledge includes C/C++, shell scripting, Yocto Project (including BitBake and OpenEmbedded), Scrum, and Git. In 2013, Petter started the small business Technux, which he runs as a side project in parallel with his duties at Ericsson. Some of the focus areas of the business are open source embedded Linux projects, such as the Yocto Project, together with different projects that involve the Raspberry Pi. As part of the work with Technux, Petter works as a contributer to the Yocto Project (including the Raspberry Pi BSP layer, known as meta-raspberrypi).
Read more about Petter Mabäcker