Book Image

Yocto for Raspberry Pi

By : TEXIER Pierre-Jean, Petter Mabäcker
Book Image

Yocto for Raspberry Pi

By: TEXIER Pierre-Jean, Petter Mabäcker

Overview of this book

The Yocto Project is a Linux Foundation workgroup, which produces tools (SDK) and processes (configuration, compilation, installation) that will enable the creation of Linux distributions for embedded software, independent of the architecture of embedded software (Raspberry Pi, i.MX6, and so on). It is a powerful build system that allows you to master your personal or professional development. This book presents you with the configuration of the Yocto Framework for the Raspberry Pi, allowing you to create amazing and innovative projects using the Yocto/ OpenEmbedded eco-system. It starts with the basic introduction of Yocto's build system, and takes you through the setup and deployment steps for Yocto. It then helps you to develop an understanding of Bitbake (the task scheduler), and learn how to create a basic recipe through a GPIO application example. You can then explore the different types of Yocto recipe elements (LICENSE, FILES, SRC_URI, and so on). Next, you will learn how to customize existing recipes in Yocto/OE layers and add layers to your custom environment (qt5 for example).
Table of Contents (18 chapters)
Yocto for Raspberry Pi
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
3
Mastering Baking with Hob and Toaster

The Raspberry Pi connection


For the connection with our Raspberry Pi, we just have to connect it to the main connectors, I2C1_SDA and I2C1_SCL, as shown in this pin diagram:

The Nunchuck's protocol

The Wii Nunchuck contains a controller that communicates through the i2c bus. In order to know where to store bytes written to it, the first byte must be an 8-bit register address. In other words, each write() operation to the Nunchuck requires one register address byte, followed by data bytes.

For a write operation, the first byte sent to the Nunchuck tells it where to start (the START condition).

Encryption

The Nunchuck is designed to provide a specific encrypted link. However, this can be disabled through the following process:

  • Write 0x55 to the Nunchuck's 0xF0 register

  • Pause

  • Write 0x00 to the Nunchuck's 0xFB register

Write

Pause

Write

  

0xF0

0x55

-

0xFB

0x00

Note that if you own a white Nunchuck, the process will be different:

  • Write 0x00 to the Nunchuck's 0x40 register

Write

 

0x40

0x00...