[yocto] Image specific configuration files

Alexander Kanavin alex.kanavin at gmail.com
Fri Jun 1 01:53:02 PDT 2018


2018-06-01 8:46 GMT+03:00 Damien LEFEVRE <lefevre.da at gmail.com>:
> For the same MACHINE I create the following images:
> - myimage-production
> - myimage-rnd
> - myimage-retail
>
> The production one has production assisted tools for flashing peripheral HW,
> testing vital HW components, writing some serial numbers, etc.
>
> The rnd one has more packages than the retail one just to help rnd work and
> debugging in device, but none of the rnd image extra packages.
>
> The retail one has the final product image.
>
> I'm using web and FTP servers. I would like for the rnd version of the image
> to have a different nginx configuration to set the root directory to a
> development folder, or set an alias.

Make two separate recipes for the configuration, and list one, or the
other in the image recipes.

Alternatively, do the needed tweaks via ROOTFS_POSTPROCESS_COMMANDS.

> Furthermore, I'll have different variant of the device where only the device
> SW changes but the platform is identical. So I'll end up with
> - myimage2-production
> - myimage2-rnd
> - myimage2-retail
>
> I know how to make MACHINE based configuration. How could I do this in my
> nginx.bbappend based on image name?

You can't. If you are issuing 'bitbake nginx', how would bitbake know
to what image the nginx packages would eventually go?

Alex


More information about the yocto mailing list