Use tempio to generate RAUC configuration files (#1797)

* Add tempio host package

tempio is a template helper using Go's template engine and sprig
functions.

* Use tempio to generate rauc manifest

* Use tempio to generate rauc system.conf
This commit is contained in:
Stefan Agner
2022-03-17 20:28:40 +01:00
committed by GitHub
parent dde7a7b809
commit 616c406e8e
22 changed files with 134 additions and 88 deletions

View File

@@ -0,0 +1,26 @@
[update]
compatible={{ env "ota_compatible" }}
version={{ env "ota_version" }}
[hooks]
filename=hook
hooks=install-check;
[image.boot]
filename=boot.vfat
hooks=install;
[image.kernel]
filename=kernel.img
{{- if eq (env "BOOTLOADER") "grub" }}
hooks=post-install;
{{- end }}
[image.rootfs]
filename=rootfs.img
{{- if eq (env "BOOT_SPL") "true" }}
[image.spl]
filename=spl.img
hooks=install
{{- end }}

View File

@@ -0,0 +1,45 @@
[system]
compatible={{ env "ota_compatible" }}
mountprefix=/run/rauc
statusfile=/mnt/data/rauc.db
bootloader={{ env "BOOTLOADER" }}
{{- if eq (env "BOOTLOADER") "grub" }}
{{- if eq (env "BOOT_SYS") "efi" }}
grubenv=/mnt/boot/EFI/BOOT/grubenv
{{- else }}
grubenv=/mnt/boot/grubenv
{{- end }}
{{- end }}
[keyring]
path=/etc/rauc/keyring.pem
[slot.boot.0]
device=/dev/disk/by-partlabel/hassos-boot
type=vfat
allow-mounted=true
{{- if eq (env "BOOT_SPL") "true" }}
[slot.spl.0]
device=/dev/disk/by-partlabel/hassos-boot
type=raw
{{- end }}
[slot.kernel.0]
device=/dev/disk/by-partlabel/hassos-kernel0
type=raw
bootname=A
[slot.rootfs.0]
device=/dev/disk/by-partlabel/hassos-system0
type=raw
parent=kernel.0
[slot.kernel.1]
device=/dev/disk/by-partlabel/hassos-kernel1
type=raw
bootname=B
[slot.rootfs.1]
device=/dev/disk/by-partlabel/hassos-system1
type=raw
parent=kernel.1