This change adds an initramfs module to mount the data partition and
restore the backup to the overlay. It is enabled by adding it to the
image-rauc-slot-initramfs recipe.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
[hfreyther: keep udev out of the dependencies]
The new version searches mounted slots for matching files referenced by
the new manifest. This avoids downloading files we already have on the
system.
Additionally, the new version includes better error handling and more
unit tests.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
Journald being the typical GNOME application is leaking memory left
and right. Let's backport some of the patches that were done in
later versions.
Fixes: SYS#1843
* use printf instead of echo
* add missing /etc/ for the udhcpc-default file
* add log-entries for all shell actions in the
post image setup
* generate comments in all files which are touched
Related: SYS#1774
We can not have sysmocom-backup-default and sysmocom-backup-data-default
installed at the same time. I don't want to play games with RREPLACE and
RPROVIDES either. So simply use one of the two files. Copy the two more
default values over to the other recipe.
The distro is included after the machine so we can not rely
on the DISTRO_VERSION here. Use the AVAILTUNES and see if the
core2-32 is listed and then pick it.
Create a sysmocom-nitb-rauc-image and create a rauc packagegroup
with the default depdencies and an include file to be used by
other images. This assumes that sysmocom-image.inc has been
included first.
Depending on the upstream version (dora or not) we need to
use either core2 or core2-32. Use a python block expression
to pick this depending on the distro version.
E.g. when using musl and trying to build the smallest possible
rootfs. Existing builds should not start to use these flags as
they would be likely to force a big rebuild.
While copying one build to a new directory we inherit most of
the config but it is better to collect this in a single place
so external contributors build with the same options we use.
With the ro image we have a cheap way to figure out which
files were changed. We can run cmp between the to be backed
up file. This way the stored data will be minimal in the
sense of changed files.
By using initramfs for the rescue we occupy 8mb + ~3mb for the
kernel and can reduce the size of that slot. With glibc it is
difficult to reduce this even further. Let's see if a uclibc
build can help us
In fido the old autoload feature doesn't work anymore and we
need to remove it. Otherwise our sysmobts.service file will
create the /dev/dspl.. /dev/fpgadl... firmware upload files
and we all think that firmware loading is working.
Splitt of the actual rescue root filesystem to
image-rauc-rescue-initramfs and build image-rauc-ubi using
kernel+initramfs (like normal rauc slots).
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
This reboots the system instead of starting a shell on boot problems.
Because the slot will only be marked as sucessfully booted as the last
step in a normal boot, repeated emergency boots will cause a fallback at
the boot chooser level to the other slot.
Testing this is possible by passing 'emergency' via the kernel command
line.