Skip to content

Maintainer Yocto Layer Design Choices

Joseph Nobes edited this page Jul 2, 2025 · 4 revisions

Maintainer Yocto Layer Design Choices

This page is intended to document choices made during the development of the system's Yocto layer and other OS configuration, especially when such choices may have involved trade-offs of functionality. This is aimed at maintainers of the LOKI project rather than developers using it as a platform for their applications.

Hardware Drivers

MMC Cards

There are two MMC devices on the board:

  1. eMMC: The embedded card, used as the default boot device and as storage for some non-volatile config overrides
  2. SD: The Micro-SD card slot, optionally used as a boot device (typically for recovery)

Mountpoints

As of the new 2023 toolchain, these cards are mounted to /mnt/emmc and /mnt/sd to more clearly indicate which device is which. The old mountpoints were /mnt/sd-mmcblk0p1 and /mnt/sd-mmcblk1p1 respectively, and were created automatically.

The mountpoints are now created using fstab entries, which can be modified in project-spec/meta-user/recipes-core/base-files/base-files_%25.bbappend.

They are mounted with no sync option, so files are not immediately synced to the devices. This has some benefits: the system is more responsive, especially when interacting via the loki-update UI. It means that control is returned far quicker, and the remaining writing can take place in the background while completing other tasks, making it more efficient.

However, there are some limitations that users should be aware of:

Warning

Due to the lack of immediate sync, after uploading a new image to eMMC or SD the system must be synced by shutting down or rebooting in a controlled manner to prevent corrupting the boot files. The best way to to this is to restart via the UI, or otherwise log in over ssh and execute a command. This must be done before a power-on-reset.

This was considered a reasonable risk to take on the occasion that the image is updated, since most users ignorant of the file syncing should be using the web UI. Image upload is the only time this is an issue; the MMC cards are not otherwise written to routinely, and are not where the booted root filesystem is mounted from.

Clone this wiki locally