From 890d812b69eb8a6848e965455bcc5f4a031d60fa Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 11 Aug 2024 17:04:24 +0200 Subject: [PATCH] board/common: allow device specific compat strings for .pkg files This patch allows us to define the rauc manifest compatibility string with menuconfig. The INFIX_IMAGE_ID is a direct replacement for the previously composed "infix-$ARCH" in mkrauc.sh. For example, the compatibility string "infix-aarch64" is replaced for the NanoPi R2S with "infix-r2s" to ensure users get a proper warning if they try upgrading to an image that maybe boots, but is not likely to work. The CLI upgrade command gets a 'force' flag to override the compat string. Signed-off-by: Joachim Wiberg --- board/common/mkrauc.sh | 4 ++-- board/common/post-build.sh | 10 ++++++++++ board/common/post-image.sh | 5 ++++- configs/r2s_defconfig | 1 + src/klish-plugin-infix/xml/infix.xml | 6 +++++- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/board/common/mkrauc.sh b/board/common/mkrauc.sh index 7c71dbbb..ee97dc8c 100755 --- a/board/common/mkrauc.sh +++ b/board/common/mkrauc.sh @@ -5,7 +5,7 @@ set -e GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags) name=$1 -arch=$2 +compat=$2 sign=$3 crt=$(ls $sign/*.crt) @@ -25,7 +25,7 @@ cp -f $BINARIES_DIR/rootfs.itbh $work/rootfs.itbh cat >$work/manifest.raucm < + + + - rauc install $KLISH_PARAM_URI + force=${KLISH_PARAM_force:+--ignore-compatible} + rauc install $force $KLISH_PARAM_URI