NeonGeckoCom / neon_debos

Debos build files for Neon OS
Apache License 2.0
1 stars 8 forks source link

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

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.

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.

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.

uboot_build

This directory contains a script to build a u-boot image for the Orange Pi 5. This builds u-boot.itb and idbloader.img for the Orange Pi 5.

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