Book Image

Using Yocto Project with BeagleBone Black

By : Hafiz Muhammad I Sadiq, Irfan Sadiq
Book Image

Using Yocto Project with BeagleBone Black

By: Hafiz Muhammad I Sadiq, Irfan Sadiq

Overview of this book

Table of Contents (17 chapters)
Using Yocto Project with BeagleBone Black
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Conditional selection based on layers


We can use BBFILE_COLLECTIONS to conditionally decide which recipes to include in our BBFILES. To do this, we need to use logic that is similar to the following in our layer.conf:

  1. Firstly, add the following two lines to our layer.conf file:

    BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes-*/*/*.bbappend' % layer \
                   for layer in BBFILE_COLLECTIONS.split())}"
    BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes-*/*/*.bb' % layer \
                   for layer in BBFILE_COLLECTIONS.split())}"
  2. Secondly, arrange your recipes-* directories under directories named according to other layers found in BBFILE_COLLECTION. For example, we might need to add some metadata that is specific only to it, and we want it applied only when we have meta-ti included in our bblayers.conf file. What we will do in this case is create a directory under our layer—say, test/meta-t/—and move all of the recipe-* directories specific to it under this directory. In the current configuration...