[yocto] Run-time discovery of machine for image compatibility check

Daniel. danielhilst at gmail.com
Wed Sep 30 16:42:22 PDT 2015


Hi in my case I have a machine for each board and I choose the right
device-tree at "machine".conf. So MACHINE can be determined by the device
tree Im running.

Other option would be echoing the machine to /etc/issue of the image. I do
this with DISTRO_VERSION. You can use  ROOTFS_POSTPROCESS_COMMAND to
achieve this.

Regards
Em 30/09/2015 18:32, "Eystein Måløy Stenberg" <eystein at mender.io> escreveu:

> Hi,
>
> Before starting a bitbake build, we input the MACHINE variable in
> local.conf (e.g. MACHINE ?= beaglebone).
>
> Is there a way to detect this variable at run-time? I.e. if I have built
> the image, written it to a device, and I'm now logged in to it.
>
> The reason I want this is that I'm working on a project to deploy image
> updates (remotely), and I only want to write the image if the device is
> compatible with the image file. So I need to know both the
> hardware/board type and what the image target is (assuming this is the
> MACHINE variable alone). Then I will only write the image if they are
> the same.
>
> Also, do you think using the MACHINE variable is the right approach for
> this problem? Maybe someone has had a similar problem?
>
> I'm new to Yocto, sorry if I'm asking something obvious (but I could not
> find an answer in the docs).
>
> Thanks!
>
> --
>
> Eystein
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150930/c706ef3c/attachment.html>


More information about the yocto mailing list