board/common: artifact naming overhaul

With the introduction of the -classic defconfigs we need to also make
sure to name the resulting artifacts accordingly:

 - infix-$ARCH.{gns3a,img,pkg}
 - infix-$ARCH-classic.{gns3a,img,pkg}

For release builds the version (-23.02-$REV) will be appended before
the file suffix, e.g., infix-x86-64-classic-23.02-3.img

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-04-28 18:18:16 +02:00
parent 42dbc1feee
commit 5e15d85ff9
3 changed files with 27 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh
NM="infix-${1:-custom}"
NM="${1:-custom}"
RAM=${2:-512}
IFNUM=${3:-1}
+5 -4
View File
@@ -4,8 +4,9 @@ set -e
GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags)
arch=$1
sign=$2
name=$1
arch=$2
sign=$3
crt=$(ls $sign/*.crt)
key=$(ls $sign/*.key)
@@ -38,7 +39,7 @@ filename=rootfs.img
hooks=post-install
EOF
rm -f $BINARIES_DIR/infix-$arch.pkg
rm -f $BINARIES_DIR/$name.pkg
rauc --cert=$crt --key=$key \
bundle $work $BINARIES_DIR/infix-$arch.pkg
bundle $work $BINARIES_DIR/$name.pkg
+21 -4
View File
@@ -1,9 +1,24 @@
#!/bin/sh
common=$(dirname "$(readlink -f "$0")")
. $common/lib.sh
load_cfg BR2_DEFCONFIG
load_cfg BR2_EXTERNAL_INFIX_PATH
NAME=infix-$(basename "$BR2_DEFCONFIG" _defconfig | tr _ -)
ver()
{
[ -n "$RELEASE" ] || return
GITVER=$(git describe --tags --dirty)
if echo "$GITVER" |grep -q 'latest-'; then
latest=$(echo "$GITVER" | sed 's/latest-[0-9]*-\(g.*\)/\1/')
cd "$BR2_EXTERNAL_INFIX_PATH/buildroot" || exit 1
br2ver=$(git describe --tags --dirty | sed 's/..\([^-]*\).*/\1/g')
cd - || exit 1
GITVER=$br2ver-$latest
fi
printf "-%s" "$GITVER"
}
load_cfg BR2_ARCH
load_cfg SIGN_KEY
@@ -12,7 +27,7 @@ ixmsg "Signing SquashFS Image"
$common/sign.sh $BR2_ARCH $SIGN_KEY
ixmsg "Creating RAUC Update Bundle"
$common/mkrauc.sh $BR2_ARCH $SIGN_KEY
$common/mkrauc.sh $NAME $BR2_ARCH $SIGN_KEY
load_cfg DISK_IMAGE
load_cfg DISK_IMAGE_SIZE
@@ -25,9 +40,8 @@ load_cfg GNS3_APPLIANCE
if [ "$GNS3_APPLIANCE" = "y" ]; then
load_cfg GNS3_APPLIANCE_RAM
load_cfg GNS3_APPLIANCE_IFNUM
load_cfg BR2_DEFCONFIG
ixmsg "Creating GNS3 Appliance, $GNS3_APPLIANCE_RAM MiB with $GNS3_APPLIANCE_IFNUM ports"
$common/mkgns3a.sh $(basename $BR2_DEFCONFIG _defconfig | tr _ -) $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM
$common/mkgns3a.sh $NAME $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM
fi
load_cfg FIT_IMAGE
@@ -35,3 +49,6 @@ if [ "$FIT_IMAGE" = "y" ]; then
ixmsg "Creating Traditional FIT Image"
$common/mkfit.sh
fi
# For use outside of the build system, e.g., Qeneth
ln -sf rootfs.squashfs "$BINARIES_DIR/$NAME$(ver).img"