Device profile: taunus-device
Every fact about the hardware lives in one TOML file per device: devices/<id>/device.toml, shipped as
/usr/share/taunus/device.toml. Programs never hard-code panel names, rotations, input devices, partitions or
mixer controls: apps, services and tools are the same on every device.
let profile = taunus_device::get()?; // read once per process
profile.display.rotation;
profile.audio.card;
TAUNUS_DEVICE_PROFILE=FILE points elsewhere (PC runs, tests).
Sections
| Section | Keys |
|---|---|
| top level | id, name, form_factor (tab | tv) |
[display] | output (DRM connector), rotation (0/90/180/270), backlight; [display.refresh] optional rates |
[touch] | name (input device), calibration (libinput matrix) |
[keys] | device (input device of the buttons), volume_up, volume_down, power, mute_switch, camera_cover |
[storage] | disk, partition names system, boot, userdata; root_label, data_label |
[usb] | manufacturer, product, serial_cmdline |
[audio] | card (ALSA id), volume_control, initial_volume |
[camera] | sensor_drivers; [camera.capture] the V4L2 pipeline |
Files that must stay files (udev rules, ALSA UCM, fstab) go in devices/<id>/overlay/, copied over the image. See
Porting to a new device.