diff --git a/Config.in b/Config.in index 5ffb93e0..7d2423cd 100644 --- a/Config.in +++ b/Config.in @@ -41,6 +41,17 @@ config INFIX_ID Mandatory. Used for identifying the OS as ID in /etc/os-release and in the generated image name: ID-ARCH-VERSION.img +config INFIX_IMAGE_ID + string "Operating system image name" + default "${INFIX_ID}-${BR2_ARCH}" + help + A lower-case string (no spaces or other characters outside of 0–9, + a–z, ".", "_" and "-"), for naming critical image files, directories + and archives containting the operating system. + + Mandatory. When INFIX_RELEASE is set, this string is appended to + the IMAGE_ID with a '-' separator. + config INFIX_TAGLINE string "Operating system tagline" default "Infix — a Network Operating System" diff --git a/board/common/post-build.sh b/board/common/post-build.sh index d6b67cdc..0957641e 100755 --- a/board/common/post-build.sh +++ b/board/common/post-build.sh @@ -34,6 +34,12 @@ rm -f "$TARGET_DIR/etc/os-release" echo "VERSION=\"${VERSION}\"" echo "VERSION_ID=${VERSION}" echo "BUILD_ID=\"${GIT_VERSION}\"" + if [ -n "$INFIX_IMAGE_ID" ]; then + echo "IMAGE_ID=\"$INFIX_IMAGE_ID\"" + fi + if [ -n "$INFIX_RELEASE" ]; then + echo "IMAGE_VERSION=\"$INFIX_RELEASE\"" + fi if [ "$INFIX_VARIANT_NETCONF" = "y" ]; then echo "VARIANT=\"Managed NETCONF\"" echo "VARIANT_ID=netconf" diff --git a/board/common/post-image.sh b/board/common/post-image.sh index 417f968f..ad47219a 100755 --- a/board/common/post-image.sh +++ b/board/common/post-image.sh @@ -12,7 +12,11 @@ load_cfg BR2_ARCH load_cfg BR2_DEFCONFIG load_cfg BR2_EXTERNAL_INFIX_PATH load_cfg BR2_TARGET_ROOTFS -NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/') +if [ -n "$IMAGE_ID" ]; then + NAME="$IMAGE_ID" +else + NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/') +fi diskimg=disk.img ver()