Le jeu. 30 janv. 2025 à 20:48, Tim Bird via lists.yoctoproject.org <tim.bird=sony....@lists.yoctoproject.org> a écrit :
> Hello YP users, > Hello, > Is there any way to tell what distribution or bitbake image name was used > by looking at the contents of an image. > > I recently built a distribution based on Poky, using 'bitbake > core-image-minimal'. > I had hoped that I could see this recorded somewhere in the image, so I > can distinguish > between that image and another image I sometimes use from Texas Instruments > while running on Linux inside the image. > > It doesn't look like YP populates /etc/os-release, where distribution > information > is normally stored. Is that right? > I was not aware but it looks like a de-facto standard pushed by systemd https://0pointer.de/blog/projects/os-release > Is there anywhere else inside the image where information about the distro > being built is stored? > /etc/os-release is not built/installed by default. You will have to install the "os-release" package to have on your image. For exemple, here is the content on a recent Poky: root@qemux86-64:~# cat /etc/os-release ID=poky NAME="Poky (Yocto Project Reference Distro)" VERSION="5.1 (styhead)" VERSION_ID=5.1 VERSION_CODENAME="styhead" PRETTY_NAME="Poky (Yocto Project Reference Distro) 5.1 (styhead)" CPE_NAME="cpe:/o:openembedded:poky:5.1" I'm relatively inexperience with YP. Is there somewhere in the build where > the bitbake command that was used to create the image is stored. Could > this or other data be used to synthesize an appropriate /etc/os-release > file? > See the above "os-release" package. If you need more precise build info, you may want to explore the "image-buildinfo" class https://docs.yoctoproject.org/dev/ref-manual/classes.html#image-buildinfo Regards, > Thanks, > -- Tim > > > > > > -- Yoann Congal Smile ECS - Tech expert
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#64684): https://lists.yoctoproject.org/g/yocto/message/64684 Mute This Topic: https://lists.yoctoproject.org/mt/110903643/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-