Skip to content

NeonGeckoCom/neon_debos

Repository files navigation

Embedded device images

This repo contains debos recipes for building base images for embedded voice assistant devices. Images generated here are intended to include all dependencies, drivers, and OS-level configuration that an assistant device might need, such as Camera Drivers, wifi-connect, QT packages, Vocal Fusion Drivers, etc.

Available Recipes

  • debian-base-image-rpi4.yml: Debian Bookworm image with updated RPi kernel, RPi userland binaries, libcamera, wifi-connect, SJ-201/Vocalfusion drivers, and a Splash Screen.

  • debian-neon-image-rpi4.yml: Debian base image with Neon Core, OVOS Shell, and associated overlays applied.

  • base-rootfs-rpi4.yml: Base rootfs build including recipes up to (excluding) #30. This does not build an image for deployment, but rather a compressed rootFS used by other recipes to avoid having to re-build mostly static dependencies (i.e. libcamera, Python, RPi firmware).

Repository Structure

Each directory contains numbered files or directories; earlier numbers correspond to earlier build stages, and associate files/directories between the top-level overlays, recipes, and scripts directories.

Top-level yml files specify recipes for building images for a particular combination of base OS and platform.

  • The overlays directory contains image root FS overlays.
  • The recipes directory contains go-debos recipes.
  • The scripts directory contains shell scripts that run in the image.

Within each directory, files are indexed roughly in the order they are indended to be run in, so a recipe starting with 03 should run before 04. Not all recipes are used for all builds.

Build Options

Several configuration options are available at build time; a brief summary of common parameters is listed here.

  • platform - The hardware platform to build for. Valid options include: rpi4.
  • device - The specific device to build for. Valid options include: mark_2, rpi4. In many cases, device will default to platform if not defined.
  • neon_core - A branch or version spec for neon_core to build.

Build instructions

To build a default image, use the included run_docker_debos.sh shell script.

Instructions for running debos natively can be found in the official readme.

Optionally update base image

The rpi4_base image is used as a starting point for other images. To manually build this, run build_base_image.sh. This step is generally unnecessary but may result in updated apt packages compared to the included base.

Other build tools

In addition to debos recipes, this repository also contains some relevant build tools

initramfs_build

This directory contains a base initrd.img, an overlay directory containing some customizations, and build_initramfs.sh to apply the overlay to the base initrd image. The output initramfs image can be used in image builds by moving it to: overlays/02-rpi4/boot/firmware/initramfs.

kernel_build

This directory contains a .config file with some customizations for a Linux kernel and build_kernel.sh to build a kernel using that config. Kernel files are applied in recipes/02-rpi4.yml.

Outputs

Each recipe will output several output files, named by the recipe name and time the image was created.

.img

The .img file output is an uncompressed image that may be written directly to some storage media.

Recipes may opt to remove this file since the .xz file can simply be decompressed to get this .img output.

.img.xz

The .img.xz file output is a compressed image. Most utilities, like Imager, can decompress and write these files in one step; this compression also shrinks files effectively for distribution.

.squashfs

The .squashfs file output is the root filesystem generated by the recipe. This file may be used for updates or testing, but it does not contain a kernel or boot partition.

Post-build configuration

The standard cmdline.txt (and config.txt for RPi) configuration files are included on the boot partition of outputs. Additionally, the build recipe 16-boot-network-config adds a service that will read network configuration from network.yaml (example below). If no networks have been configured and no wired connection is available, this configuration will be used; otherwise, it is ignored.

SSID: MyNetworkName
PSK: MyNetworkPassword