Reader small image

You're reading from  Embedded Linux Development using Yocto Projects - Second Edition

Product typeBook
Published inNov 2017
Publisher
ISBN-139781788470469
Edition2nd Edition
Right arrow
Authors (2):
Otavio Salvador
Otavio Salvador
author image
Otavio Salvador

Otavio Salvador loves technology and started his free software activities in 1999. In 2002, he founded O.S. Systems, a company focused on embedded system development services and consultancy worldwide, creating and maintaining customized BSPs, and helping companies with their product developments challenges. This resulted in his joining the OpenEmbedded community in 2008, when he became an active contributor to the OpenEmbedded project.
Read more about Otavio Salvador

Daiane Angolini
Daiane Angolini
author image
Daiane Angolini

Daiane Angolini has been working with embedded Linux since 2008. She has been working as an application engineer at NXP, acting on internal development, porting custom applications from Android, and on-site customer support for i.MX architectures in areas such as the Linux kernel, u-boot, Android, Yocto Project, and user-space applications. However, it was on the Yocto Project that she found her place.
Read more about Daiane Angolini

View More author details
Right arrow

Changing recipe feature configuration


One supported mechanism to simplify feature set customization for recipes is PACKAGECONFIG. It provides a way to enable and disable the recipe features. For example, say the recipe has the following configuration:

PACKAGECONFIG ?= "feature1"
PACKAGECONFIG[feature1] = "--enable-feature1,--disablefeature1, feature1depends"
PACKAGECONFIG[feature2] = "--enable-feature2,--disablefeature2, feature2depends"

The recipe has two features, feature1 and feature2. For each configuration option, there is a string to define how to enable the feature on autoconf, how to disable the feature on autoconf, and the new dependencies in case the option is enabled.

We can create a .bbappend file that expands the PACKAGECONFIG variable's default value to enable feature2 as well, as shown here:

PACKAGECONFIG += "feature2"

Note

In order to add the same feature to the build/conf/local.conf file, we can use PACKAGECONFIG_pn-<recipename>_append = 'feature2'.

More detailed information...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Embedded Linux Development using Yocto Projects - Second Edition
Published in: Nov 2017Publisher: ISBN-13: 9781788470469

Authors (2)

author image
Otavio Salvador

Otavio Salvador loves technology and started his free software activities in 1999. In 2002, he founded O.S. Systems, a company focused on embedded system development services and consultancy worldwide, creating and maintaining customized BSPs, and helping companies with their product developments challenges. This resulted in his joining the OpenEmbedded community in 2008, when he became an active contributor to the OpenEmbedded project.
Read more about Otavio Salvador

author image
Daiane Angolini

Daiane Angolini has been working with embedded Linux since 2008. She has been working as an application engineer at NXP, acting on internal development, porting custom applications from Android, and on-site customer support for i.MX architectures in areas such as the Linux kernel, u-boot, Android, Yocto Project, and user-space applications. However, it was on the Yocto Project that she found her place.
Read more about Daiane Angolini