Reputation: 175
i try to implement /etc/os-release in my beaglebone yocto after some attempt in my google. i added following in my configuration files
local.conf
INHERIT += "image-buildinfo"
BUILD_ID = "${@time.strftime('%Y-%m-%d %H:%M:%S',time.localtime())}"
IMAGE_BUILDINFO_VARS = "DISTRO DISTRO_VERSION MACHINE IMAGE_NAME USER"
in os-release.bb
INHERIT += "image-buildinfo"
BUILD_ID = "${@time.strftime('%Y-%m-%d %H:%M:%S',time.localtime())}"
IMAGE_BUILDINFO_VARS = "DISTRO DISTRO_VERSION MACHINE IMAGE_NAME USER"
I was expecting /etc/os-release or /usr/lib/os-release build successfully upon bitbake run completely , but i don't see both of them in my images.
Am i missing anything?or i misinterpret on any concept? Sorry for the rookies question, i am trying to exploring yocto
Upvotes: 2
Views: 5178
Reputation: 11
You can add it by following method CORE_IMAGE_EXTRA_INSTALL += "os-release lsb-release"
Upvotes: 1
Reputation: 346
INHERIT += "image-buildinfo"
generates a /etc/build
file and not /etc/os-release
that you're looking for
See this official section of mega-manual
Upvotes: 3
Reputation: 1373
Could it be you still have to tell Yocto to use the os-release recipe?
With a os-release.bbappend you can modify the recipe that is part of openembedded-core. There are a few examples how to do at that webpage. A good one is e.g. the one used in meta-yoe.
But all this is just telling Yocto how to build the recipe. You still have to tell Yocto to add it to your image.
This can be done in the local.conf file or e.g. the recipes-images/images/your-image.bb
file or in a packagegroup. The first solution is the quick and dirty one.
Upvotes: 3