LmP Configuration

Container Preloading

Note

Preloading container images will increase the size of the system image considerably, especially if the containers have not been optimally constructed.

Refer to the official Docker documentation for best practices on writing Dockerfiles:

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

Container images can be preloaded onto a system image to avoid the need to pull these images from hub.foundries.io on the initial boot of a device. The device must still be registered in order to run these containers.

Enable Preloading of Containers

To enable preloading, set containers.preload to true to the factory-config.yml of the Factory.

containers:
  preload: true
Copy to clipboard

The Factory Definition contains more detailed information on the possible options in this schema.

Recipes

The following recipes are provided by meta-lmp and are available in the meta-lmp-base layer which is included via conf/bblayers.conf in lmp-manifest.git by default. These recipes provide advanced, configurable functionality to the LmP.

Enabling Recipes

This demonstration shows how to enable the lmp-auto-hostname recipe. This same process can be followed for all of the other recipes described on this page.

Click to Play                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
00:00-00:00

lmp-auto-hostname

Customize device hostnames at runtime, either by appending the serial number from the Device Tree of the hardware, or the mac address to the hostname.

How to Enable

Show details

Variables

LMP_HOSTNAME_MODE=<option>
Default: serial
serial

appends the serial number of the device.

Example Result: raspberrypi4-64-100000008305bbc3

mac

appends the mac address of a chosen network interface.

Example Result: raspberrypi4-64-dca6321669ea

LMP_HOSTNAME_NETDEVICE=<interface>
Default: eth0

if using mac mode, choses what network interface on devices to retrieve a mac address from.

Example Value: eth0 or wlan0

lmp-device-auto-register

Warning

Do not use this recipe in production. This recipe is only intended for usage in a development environment, such as the devel branch of the Factory, or another branch you have created for development purposes.

Creates a systemd oneshot service that will automatically register a device on first boot once it has internet connectivity. This is done by providing an API Token that has devices:create scope.

How to Enable

Show details

Variables

There are no variables for this recipe.