From c08fe9f5227f439e8a9ac7f0d9f7d186bc449415 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 17 Aug 2023 16:31:09 +0200 Subject: [PATCH] post-image: Defer RAUC status file generation to disk image creation In the future we want to build disk images from builds where we haven't locally built Infix, we've just downloaded an existing release. In those cases we also have to create rauc.status, even though we're not creating a bundle. --- board/common/mkrauc-status.sh | 35 ++++++++++++++++++++++++++++++++++ board/common/mkrauc.sh | 36 +---------------------------------- board/common/post-image.sh | 4 +++- 3 files changed, 39 insertions(+), 36 deletions(-) create mode 100755 board/common/mkrauc-status.sh diff --git a/board/common/mkrauc-status.sh b/board/common/mkrauc-status.sh new file mode 100755 index 00000000..0560e79c --- /dev/null +++ b/board/common/mkrauc-status.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +# Bootstrap a RAUC status file showing the newly created image +# installed to both the primary and secondary slots. This then bundled +# in the aux partition in mkdisk.sh, so that RAUC (on the target) can +# always report the installed versions. +rauc info --no-verify --output-format=shell $1 >/tmp/rauc-$$.info +. /tmp/rauc-$$.info +rm /tmp/rauc-$$.info +tstamp=$(date -u +%FT%TZ) +cat <$work/rauc.info -. $work/rauc.info -tstamp=$(date -u +%FT%TZ) -cat >$work/rauc.status <"$BINARIES_DIR/rauc.status" $common/mkdisk.sh -a $BR2_ARCH -s $DISK_IMAGE_SIZE fi