Search code examples
embedded-linuxyoctobeagleboneblack

About yocto /etc/os-release versioning


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


Solution

  • 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.