-
Notifications
You must be signed in to change notification settings - Fork 1
Yocto Open Embedded
http://downloads.yoctoproject.org/releases/yocto/
To include /etc/build in your image, modify local.conf or layer.conf with
INHERIT += "image-buildinfo"
MAGE_BUILDINFO_VARS = "DISTRO DISTRO_VERSION MACHINE IMAGE_NAME USER".
https://mender.io/blog/build-info-yocto-2
https://www.yoctoproject.org/docs/what-i-wish-id-known/
http://linuxgizmos.com/the-best-way-to-build-with-yocto-project-and-bitbake/
An example of vardepsexclude is in poky/meta/recipes-core/os-release/os-release.bb, where the BUILD_ID defaults to DATETIME variable. If that was not included as a vardepsexclude there would be parse errors.
VERSION_ID = "${DISTRO_VERSION}" PRETTY_NAME = "${DISTRO_NAME} ${VERSION}" BUILD_ID ?= "${DATETIME}" BUILD_ID[vardepsexclude] = "DATETIME"
poky/meta/recipes-core/os-release/os-release.bb
Produces the /etc/os-release file based on some conf/distro/<your-distro>.bb variables.
Openembedded builds a lot of things, you'll need decent disk space. Here's an example of a typical build tmp directory.
du -h -d1 tmp/ 844K tmp/log 87M tmp/stamps 4.0K tmp/hosttools 29M tmp/cache 16K tmp/sysroots 19M tmp/buildstats 17M tmp/sstate-control 9.6G tmp/deploy 1.6G tmp/work-shared 38G tmp/work 23M tmp/sysroots-components 8.0M tmp/pkgdata 60M tmp/sysroots-uninative 49G tmp/
Creating multiple packages using FILES_
A recipe can (and usually does) produce more than one package. The system isn't completely stupid so for example all the headers will automatically go into -dev package and all documentation goes into -doc, but often the recipe writer needs to make a decision on which package a specific file belongs to. This is done with the FILES_<packagename> += "/path/to/file" format.
The default values for FILES_* can be found in meta/conf/bitbake.conf but note that classes your recipe inherits may also modify the values: check the final values with bitbake -e <recipe>|grep ^FILES_
Courtesy of https://stackoverflow.com/questions/46071039/an-example-of-using-files-pn