Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Embedded Linux Development Using Yocto Project Cookbook

You're reading from   Embedded Linux Development Using Yocto Project Cookbook Practical recipes to help you leverage the power of Yocto to build exciting Linux-based systems

Arrow left icon
Product type Paperback
Published in Jan 2018
Publisher
ISBN-13 9781788399210
Length 456 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alex Gonzalez Alex Gonzalez
Author Profile Icon Alex Gonzalez
Alex Gonzalez
Arrow right icon
View More author details
Toc

Table of Contents (7) Chapters Close

Preface 1. The Build System FREE CHAPTER 2. The BSP Layer 3. The Software Layer 4. Application Development 5. Debugging, Tracing, and Profiling 6. Other Books You May Enjoy

Installing support for NXP hardware

In this recipe, we will install the FSL community BSP Yocto release that adds support for NXP hardware to our Yocto installation.

Getting ready

With so many layers, manually cloning each of them and adding them to your project's conf/bblayers.conf file is cumbersome. The community uses the repo tool developed by Google for their community Android to simplify the installation of Yocto.

To install repo in your host system, type in the following commands:

$ mkdir -p ${HOME}/bin/
$ curl https://storage.googleapis.com/git-repo-downloads/repo >
${HOME}/bin/repo
$ chmod a+x ${HOME}/bin/repo

The repo tool is a Python utility that parses an XML file, called manifest, with a list of Git repositories. The repo tool is then used to manage those repositories as a whole.

How to do it...

For an example, we will use repo to download all the repositories listed in the previous recipe to our host system. For that, we will point it to the FSL community BSP manifest for the Rocko release:

<?xml version="1.0" encoding="UTF-8"?> 
<manifest> 
 
  <default sync-j="4" revision="master"/> 
 
  <remote fetch="https://git.yoctoproject.org/git" name="yocto"/> 
  <remote fetch="https://github.com/Freescale" name="freescale"/> 
  <remote fetch="https://github.com/openembedded" name="oe"/> 
 
  <project remote="yocto" revision="rocko" name="poky" path="sources/poky"/> 
  <project remote="yocto" revision="rocko" name="meta-freescale" path="sources/meta-freescale"/> 
 
  <project remote="oe" revision="rocko" name="meta-openembedded" path="sources/meta-openembedded"/> 
 
  <project remote="freescale" revision="rocko" name="fsl-community-bsp-base" path="sources/base"> 
    <linkfile dest="README" src="README"/> 
    <linkfile dest="setup-environment" src="setup-environment"/> 
  </project> 
 
  <project remote="freescale" revision="rocko" name="meta-freescale-3rdparty" path="sources/meta-freescale-3rdparty"/> 
  <project remote="freescale" revision="rocko" name="meta-freescale-distro" path="sources/meta-freescale-distro"/> 
  <project remote="freescale" revision="rocko" name="Documentation" path="sources/Documentation"/> 
 
</manifest> 

The manifest file shows all the installation paths and repository sources for the different components that are going to be installed.

How it works...

The manifest file is a list of the different layers that are needed for the FSL community BSP release. We can now use repo to install it. Run the following:

$ mkdir /opt/yocto/fsl-community-bsp
$ cd /opt/yocto/fsl-community-bsp
$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b rocko
$ repo sync  
You can optionally pass a -jN argument to sync if you have a multicore machine for multithreaded operations; for example, you could pass repo sync -j8 in an eight-core host system.

There's more...

To list the hardware boards supported by the different layers, we may run:

$ ls sources/meta-freescale*/conf/machine/*.conf

And to list the newly introduced target images, use the following:

$ ls sources/meta-freescale*/recipes*/images/*.bb  

The FSL community BSP release introduces the following new target images:

  • fsl-image-mfgtool-initramfs: This is a small, RAM-based initramfs image used with the NXP manufacturing tool
  • fsl-image-multimedia: This is a console-only image that includes the gstreamer multimedia framework over the framebuffer
  • fsl-image-multimedia-full: This is an extension of fsl-image-multimedia, that extends the gstreamer multimedia framework to include all available plugins
  • fsl-image-machine-test: This is an extension of fsl-image-multimedia-full for testing and benchmarking

The release includes a sources/Documentation repository with buildable documentation. To build, we first need to install some host tools as follows:

$ sudo apt-get install libfreetype6-dev libjpeg8-dev python3-dev python3-pip python3-sphinx texlive-fonts-recommended texlive-latex-extra zlib1g-dev fonts-liberation                                                         
$ sudo pip3 install reportlab sphinxcontrib-blockdiag  

And then we can build the different documents by entering its sub-directory, and build an HTML document with:

$ make singlehtml  

Or a PDF version with:

$ make latexpdf  

For example, to build the release notes in both HTML and PDF versions we do:

$ cd /opt/yocto/fsl-community-bsp/sources/Documentation/release-notes
$ make latexpdf singlehtml  

The documents can be found inside the build/latex and build/singlehtml directories.

See also

You have been reading a chapter from
Embedded Linux Development Using Yocto Project Cookbook - Second Edition
Published in: Jan 2018
Publisher:
ISBN-13: 9781788399210
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 R$50/month. Cancel anytime