Build Your Image

NetModule provides its own meta layer for customized image generation.

Project Setup

Netmodule Meta Layer

Meta Layer

Description

Repository

meta-netmodule-distro

  • Distribution specfic contents

  • Distribution configurations

  • NetModule image recipes

  • Firmware update tool

  • Disk expansion tool

  • General applications recipes

  • Example local.conf file

meta-netmodule-distro

meta-netmodule-bsp

  • Distribution specific contents

  • Machine confguration files

  • U-Boot recipes

  • Linux kernel recipe

  • Applications recipes for interface support

  • General low level applications recipes

meta-netmodule-bsp

meta-netmodule-wlan

  • Wlan module firmware

  • Wireless regulatory databases

  • WPA supplicant

  • Wireless tools

meta-netmodule-wlan

Additional Layers and Bitbake

Following additional resources are required:

Setup workspace

Start new build project with cloning all required git repositories:

  1. Clone the nm-oem-linux repository

  2. Move into the cloned repository and run git submodule init then git submodule update

  3. Your workspace should now look similar as in the snippet below:

.
├── bitbake
├── build
├── env
├── meta-netmodule-bsp
├── meta-netmodule-distro
├── meta-netmodule-wlan
├── meta-openembedded
├── meta-updater
├── openembedded-core
└── README.md

Configure project

Start to source environment: . ./env/distro/ostree-image select your hardware in the prompt. You will be moved to the build directory.

Build NetModule reference images

NetModule provides several reference images depends on use case:

Image

Description

netmodule-linux-image

Standard reference image. Contains required applications, drivers and tools to use interfaces, network connectivities and sensors.

netmodule-linux-image-dev

Based on netmodule-linux-image and extended with helpful development tools for low level access (e.g. direct access on i2c bus) and generic debug tools like strace and gdb.

netmodule-linux-image-minimal

Minimal ramdisk based image for simple bring up or can be used for emmc operations like device flashing or data recovery.

Images recipes location

Images recipes are located in layer meta-netmodule-distro:

meta-netmodule-distro/recipes-core/images/
├── includes
│   ├── firmware.inc
│   └── image-preprocessing.inc
├── initramfs-ostree-image.bbappend
├── netmodule-linux-image.bb
├── netmodule-linux-image-dev.bb
├── netmodule-linux-image-mdev.bb
├── netmodule-linux-image-minimal.bb
├── netmodule-linux-image-oem.bb
└── nmcontainer-python3.bb

Building with shared state

It is highly recommended to use the yocto shared state from NetModule to speed up build time. Also some closed source tools like “lpa” will only be available through sstate. The sstate will provide already built packages directly from our servers as long as the recipes configurations are the same.

To build using our sstate, make sure that all the layers are matching the submodule hashes from our releases and make sure that the following line is present in your local.conf:

SSTATE_MIRRORS = "file://.* https://nmrepo.netmodule.com/chbe/oem-linux-sstate/PATH"

Images build instructions

Start image build after sourcing environment with:

bitbake netmodule-linux-image

Images deploy location

Built images are located in deploy directory.::

<project root>/build/tmp/deploy/images/<hw type e.g. am335x-nmhw21>/