- Embedded Linux Development Using Yocto Project Cookbook(Second Edition)
- Alex González
- 105字
- 2021-06-30 19:21:29
Adding a custom formfactor file
Custom platforms can also define their own formfactor file with information that the build system cannot obtain from other sources, such as defining whether a touchscreen is available or defining the screen orientation. These are defined in the recipes-bsp/formfactor/ directory in our meta-bsp-custom layer.
To specify, for example, that our new machine contains a touchscreen, we could define a meta-bsp-custom/recipes-bsp/formfactor/formfactor_0.0.bbappend file to include a formfactor file as follows:
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
And the machine-specific meta-bsp-custom/recipes-bsp/formfactor/formfactor/wandboard-custom/machconfig file would be as follows:
HAVE_TOUCHSCREEN=1
An example patch that adds this custom formfactor can be found in the source code that accompanies the book.