diff --git a/Config.in b/Config.in index e47e534ef..5ffb93e0f 100644 --- a/Config.in +++ b/Config.in @@ -1,3 +1,97 @@ +menu "Branding" + +config INFIX_VENDOR + string "Vendor name" + default "KernelKit" + help + The name of the operating system vendor. This is the name of the + organization or company which produces the OS. + + This name is intended to be exposed in "About this system" UIs or + software update UIs when needed to distinguish the OS vendor from + the OS itself. It is intended to be human readable. + + Used for VENDOR_NAME in /etc/os-release and GNS3 appliance files. + +config INFIX_VENDOR_HOME + string "Vendor URL" + help + The homepage of the OS vendor. The value should be in RFC3986 + format, and should be "http:" or "https:" URLs. Only one URL shall + be listed in the setting. + + Optional, used for VENDOR_HOME in /etc/os-release + +config INFIX_NAME + string "Operating system name" + default "Infix" + help + Mandatory. Used for identifying the OS as NAME in /etc/os-release + and product_name in GNS3 appliance files. + +config INFIX_ID + string "Operating system identifier" + default "infix" + help + A lower-case string (no spaces or other characters outside of 0–9, + a–z, '.', '_' and '-') identifying the operating system, excluding + any version information and suitable for processing by scripts or + usage in generated filenames. + + Mandatory. Used for identifying the OS as ID in /etc/os-release and + in the generated image name: ID-ARCH-VERSION.img + +config INFIX_TAGLINE + string "Operating system tagline" + default "Infix — a Network Operating System" + help + Mandatory. Used for identifying the OS, e.g. as PRETTY_NAME in + /etc/os-release and description in the GNS3 appliance. + + This is also show at boot when the system init process starts. + +config INFIX_DESC + string "Operating system description" + help + Optional. Used for long description texts about the OS. E.g., + the GNS3 appliance file description field. Saved in the file + /etc/os-release as INFIX_DESC. + +config INFIX_HOME + string "Operating system URL" + help + Used for identifying the OS, e.g. as HOME_URL in /etc/os-release + +config INFIX_DOC + string "Operating system docs" + help + Optional. Main documentation URL, will be shown in /etc/os-release + as DOCUMENTATION_URL. + +config INFIX_SUPPORT + string "Operating system support" + help + Main support page for the operating system, if there is any. This + is primarily intended for operating systems which vendors provide + support for. May be a http:, https:, or mailto: URI. + + Optional. Shown, e.g., as SUPPORT_URL in /etc/os-release or + maintainer_email in .gns3a. + +config INFIX_OEM_PATH + string "Path to OEM br2-external" + help + A br2-external using Infix will likely want to version the branded + OS using their own GIT tags. Set this variable to point to the base + directory (absolute path) and the Infix post-build.sh will call `git + describe -C $INFIX_OEM_PATH`. + + Note: for release builds the global variable INFIX_RELEASE overrides + the version information derived from `git describe`. However, the + GIT version is always saved as the BUILD_ID in /etc/os-releases. + +endmenu + # For /etc/os-release, uses CondtionArchitechture= from systemd.unit(5) config INFIX_ARCH string diff --git a/board/common/Config.in b/board/common/Config.in index c3e59d34e..0eee51b8d 100644 --- a/board/common/Config.in +++ b/board/common/Config.in @@ -100,7 +100,7 @@ config DISK_IMAGE_RELEASE_URL menuconfig GNS3_APPLIANCE bool "GNS3 Appliance" select DISK_IMAGE - default y if BR2_x86_64 + default y help Create a GNS3 appliance description that, together with the disk image, can be imported into GNS3. diff --git a/board/common/genimage.cfg.in b/board/common/genimage.cfg.in index 70b6a8ec9..efd68295f 100644 --- a/board/common/genimage.cfg.in +++ b/board/common/genimage.cfg.in @@ -30,7 +30,7 @@ image var.ext4 { } } -image disk.img { +image @DISKIMG@ { size = @TOTALSIZE@ hdimage { partition-table-type = "gpt" diff --git a/board/common/lib.sh b/board/common/lib.sh index 1c8d7deeb..affa806e9 100644 --- a/board/common/lib.sh +++ b/board/common/lib.sh @@ -9,11 +9,20 @@ die() exit 1 } +# Find all matching key=value assignments in output/.config +# E.g., load_cfg DISK_IMAGE sets the following variables: +# +# DISK_IMAGE=y +# DISK_IMAGE_SIZE="512" +# etc. +# +# shellcheck disable=SC1090 load_cfg() { - local tmp=$(mktemp -p /tmp) + tmp=$(mktemp -p /tmp) - grep "$1" $BR2_CONFIG >$tmp - . $tmp - rm $tmp + grep -E "${1}.*=" "$BR2_CONFIG" >"$tmp" + . "$tmp" + + rm "$tmp" } diff --git a/board/common/mkdisk.sh b/board/common/mkdisk.sh index cc99b4a30..d2f5132c7 100755 --- a/board/common/mkdisk.sh +++ b/board/common/mkdisk.sh @@ -123,10 +123,11 @@ tmp=$BUILD_DIR/genimage.tmp total=$((512 << M)) bootoffs=$((32 << K)) bootdata= +diskimg=disk.img bootimg= bootpart= -while getopts "a:b:B:s:" opt; do +while getopts "a:b:B:n:s:" opt; do case ${opt} in a) arch=$OPTARG @@ -137,6 +138,9 @@ while getopts "a:b:B:s:" opt; do B) bootoffs=$(($OPTARG)) ;; + n) + diskimg=${OPTARG} + ;; s) total=$(size2int $OPTARG) ;; @@ -158,6 +162,7 @@ awk \ -vimgsize=$imgsize \ -vcfgsize=$cfgsize \ -vvarsize=$varsize \ + -vdiskimg=$diskimg \ -vbootimg="$bootimg" -vbootpart="$bootpart" \ '{ sub(/@TOTALSIZE@/, total); @@ -166,7 +171,7 @@ awk \ sub(/@IMGSIZE@/, imgsize); sub(/@CFGSIZE@/, cfgsize); sub(/@VARSIZE@/, varsize); - + sub(/@DISKIMG@/, diskimg); sub(/@BOOTIMG@/, bootimg); sub(/@BOOTPART@/, bootpart); }1' \ diff --git a/board/common/mkgns3a.sh b/board/common/mkgns3a.sh index 10837d6dc..89e4ab225 100755 --- a/board/common/mkgns3a.sh +++ b/board/common/mkgns3a.sh @@ -1,26 +1,66 @@ #!/bin/sh +# shellcheck disable=SC1091 +. "$TARGET_DIR/etc/os-release" if [ -n "$INFIX_RELEASE" ]; then rel="-${INFIX_RELEASE}" fi -NM="${1:-custom}${rel}" -RAM=${2:-512} -IFNUM=${3:-1} +ARCH=$1 +NM="${2:-custom}${rel}" +DISK=$3 +RAM=${4:-512} +IFNUM=${5:-1} + +# The aarch64 build currently has no "loader" but instead starts Linux +# directly, so we need to add a basic cmdline. +loader_args() +{ + if [ "$ARCH" == "aarch64" ]; then + cat <> Disk image MD5: $(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')" cat <"$BINARIES_DIR/${NM}.gns3a" { "name": "$NM", "category": "router", - "description": "Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling.", - "vendor_name": "KernelKit", - "vendor_url": "https://github.com/kernelkit/", - "product_name": "Infix", + "description": "$INFIX_DESC", + "vendor_name": "$VENDOR_NAME", + "vendor_url": "$VENDOR_HOME", + "product_name": "$NAME", "registry_version": 6, "status": "stable", - "maintainer": "KernelKit", - "maintainer_email": "kernelkit@googlegroups.com", - "usage": "Default console login is 'root', no password. For remote login, default user/pass: admin/admin also works.\n\nType 'help' for an overview of commands and relevant configuration files.\n\nThe /etc directory is writable, use the passwd tool after login as part of your set up.\nFor networking, classify interfaces as switchports with /etc/mactab, syntax: 'MAC-address eN', where N is the port number (1-MAX).\nTo set up bridging and management interfaces, use /etc/network/interfaces, and /etc/network/interfaces.d/", + "maintainer": "$VENDOR_NAME", + "maintainer_email": "${SUPPORT_URL#mailto:}", + "usage": "Default login, user/pass: admin/admin\n\nType 'help' for an overview of commands and relevant configuration files.\n\nFor Classic builds the following applies: the /etc directory is writable, use the passwd tool after login as part of your set up.\nFor networking, classify interfaces as switchports with /etc/mactab, syntax: 'MAC-address eN', where N is the port number (1-MAX).\nTo set up bridging and management interfaces, use /etc/network/interfaces, and /etc/network/interfaces.d/", "port_name_format": "eth{0}", "linked_clone": true, "qemu": { @@ -29,21 +69,24 @@ cat <"$BINARIES_DIR/${NM}.gns3a" "ram": ${RAM}, "cpus": 1, "hda_disk_interface": "virtio", - "arch": "x86_64", + "arch": "$ARCH", "console_type": "telnet", - "kvm": "allow" + $(loader_img) + $(loader_args) + "kvm": "$accel", + "options": "$opts" }, "images": [ { - "filename": "OVMF.fd", - "filesize": $(stat --printf='%s' "$BINARIES_DIR/OVMF.fd"), - "md5sum": "$(md5sum "$BINARIES_DIR/OVMF.fd" | awk '{print $1}')", + "filename": "$loader", + "filesize": $(stat --printf='%s' "$BINARIES_DIR/$loader"), + "md5sum": "$(md5sum "$BINARIES_DIR/$loader" | awk '{print $1}')", "version": "0.0" }, { - "filename": "disk.img", - "filesize": $(stat --printf='%s' "$BINARIES_DIR/disk.img"), - "md5sum": "$(md5sum "$BINARIES_DIR/disk.img" | awk '{print $1}')", + "filename": "$DISK", + "filesize": $(stat --printf='%s' "$BINARIES_DIR/$DISK"), + "md5sum": "$(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')", "version": "0.0" } ], @@ -51,8 +94,8 @@ cat <"$BINARIES_DIR/${NM}.gns3a" { "name": "0.0", "images": { - "bios_image": "OVMF.fd", - "hda_disk_image": "disk.img" + $(loader_img) + "hda_disk_image": "$DISK" } } ] diff --git a/board/common/post-build.sh b/board/common/post-build.sh index 4b90cbd2a..d6b67cdc5 100755 --- a/board/common/post-build.sh +++ b/board/common/post-build.sh @@ -7,19 +7,33 @@ if [ -n "${ID_LIKE}" ]; then ID="${ID} ${ID_LIKE}" fi -GIT_VERSION=$(git -C "$BR2_EXTERNAL_INFIX_PATH" describe --always --dirty --tags) +if [ -z "$GIT_VERSION" ]; then + infix_path="$BR2_EXTERNAL_INFIX_PATH" + if [ -n "$INFIX_OEM_PATH" ]; then + # Use version from br2-external OEM:ing Infix + infix_path="$INFIX_OEM_PATH" + fi + GIT_VERSION=$(git -C "$infix_path" describe --always --dirty --tags) +fi + +# Override VERSION in /etc/os-release and filenames for release builds +if [ -n "$INFIX_RELEASE" ]; then + VERSION="$INFIX_RELEASE" +else + VERSION=$GIT_VERSION +fi # This is a symlink to /usr/lib/os-release, so we remove this to keep # original Buildroot information. rm -f "$TARGET_DIR/etc/os-release" { - echo "NAME=\"Infix\"" - echo "VERSION=${GIT_VERSION}" - echo "ID=infix" + echo "NAME=\"$INFIX_NAME\"" + echo "ID=$INFIX_ID" + echo "PRETTY_NAME=\"$INFIX_TAGLINE\"" echo "ID_LIKE=\"${ID}\"" - echo "VERSION_ID=${GIT_VERSION}" - echo "BUILD_ID=\"${NAME} ${VERSION}\"" - echo "PRETTY_NAME=\"Infix by KernelKit\"" + echo "VERSION=\"${VERSION}\"" + echo "VERSION_ID=${VERSION}" + echo "BUILD_ID=\"${GIT_VERSION}\"" if [ "$INFIX_VARIANT_NETCONF" = "y" ]; then echo "VARIANT=\"Managed NETCONF\"" echo "VARIANT_ID=netconf" @@ -28,11 +42,25 @@ rm -f "$TARGET_DIR/etc/os-release" echo "VARIANT_ID=classic" fi echo "ARCHITECTURE=\"${INFIX_ARCH}\"" - echo "HOME_URL=https://github.com/KernelKit" + echo "HOME_URL=$INFIX_HOME" + if [ -n "$INFIX_VENDOR" ]; then + echo "VENDOR_NAME=\"$INFIX_VENDOR\"" + fi + if [ -n "$INFIX_VENDOR_HOME" ]; then + echo "VENDOR_HOME=\"$INFIX_VENDOR_HOME\"" + fi + if [ -n "$INFIX_DOC" ]; then + echo "DOCUMENTATION_URL=\"$INFIX_DOC\"" + fi + if [ -n "$INFIX_SUPPORT" ]; then + echo "SUPPORT_URL=\"$INFIX_SUPPORT\"" + fi + if [ -n "$INFIX_DESC" ]; then + echo "INFIX_DESC=\"$INFIX_DESC\"" + fi } > "$TARGET_DIR/etc/os-release" - -echo "Infix by KernelKit $GIT_VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version" +echo "$INFIX_TAGLINE $VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version" # Allow pdmenu (setup) and bash to be login shells, bash is added # automatically when selected in menuyconfig, but not when BusyBox @@ -46,13 +74,3 @@ grep -qsE '^/bin/true$$' "$TARGET_DIR/etc/shells" \ || echo "/bin/true" >> "$TARGET_DIR/etc/shells" grep -qsE '^/bin/false$$' "$TARGET_DIR/etc/shells" \ || echo "/bin/false" >> "$TARGET_DIR/etc/shells" - -# Menuconfig support for modifying Qemu args in release tarballs -cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/" -sed "s/default QEMU_aarch64/default QEMU_$BR2_ARCH/" \ - < "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in" \ - > "$BINARIES_DIR/Config.in" -rm -f "$BINARIES_DIR/qemu.cfg" -CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \ - "$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in" -rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old" diff --git a/board/common/post-image.sh b/board/common/post-image.sh index 57185e2fc..417f968f1 100755 --- a/board/common/post-image.sh +++ b/board/common/post-image.sh @@ -1,12 +1,19 @@ #!/bin/sh +# shellcheck disable=SC2086 + common=$(dirname "$(readlink -f "$0")") -. $common/lib.sh +. "$common/lib.sh" + +# shellcheck disable=SC1091 +. "$TARGET_DIR/etc/os-release" +load_cfg INFIX_ID load_cfg BR2_ARCH load_cfg BR2_DEFCONFIG load_cfg BR2_EXTERNAL_INFIX_PATH load_cfg BR2_TARGET_ROOTFS -NAME=infix-$(basename "$BR2_DEFCONFIG" _defconfig | tr _ - | sed 's/x86-64/x86_64/') +NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/') +diskimg=disk.img ver() { @@ -31,7 +38,7 @@ fi load_cfg DISK_IMAGE if [ "$DISK_IMAGE" = "y" ]; then ixmsg "Creating Disk Image" - + diskimg="${NAME}-disk.img" bootcfg= if [ "$DISK_IMAGE_BOOT_DATA" ]; then bootcfg="-b $DISK_IMAGE_BOOT_DATA -B $DISK_IMAGE_BOOT_OFFSET" @@ -44,16 +51,15 @@ if [ "$DISK_IMAGE" = "y" ]; then [ -f "$archive" ] || wget -O"$archive" "$DISK_IMAGE_RELEASE_URL" tar -xa --strip-components=1 -C "$BINARIES_DIR" -f "$archive" fi + $common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status" - $common/mkdisk.sh -a $BR2_ARCH -s $DISK_IMAGE_SIZE $bootcfg + $common/mkdisk.sh -a $BR2_ARCH -n $diskimg -s $DISK_IMAGE_SIZE $bootcfg fi load_cfg GNS3_APPLIANCE if [ "$GNS3_APPLIANCE" = "y" ]; then - load_cfg GNS3_APPLIANCE_RAM - load_cfg GNS3_APPLIANCE_IFNUM ixmsg "Creating GNS3 Appliance, $GNS3_APPLIANCE_RAM MiB with $GNS3_APPLIANCE_IFNUM ports" - $common/mkgns3a.sh $NAME $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM + $common/mkgns3a.sh $BR2_ARCH $NAME $diskimg $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM fi load_cfg FIT_IMAGE @@ -73,3 +79,14 @@ if [ "$BR2_TARGET_ROOTFS_SQUASHFS" = "y" ]; then ln -sf "$BINARIES_DIR/${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img" fi fi + +# Menuconfig support for modifying Qemu args in release tarballs +cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/" +sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \ + -e "s/@DISK_IMG@/$diskimg/" \ + < "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \ + > "$BINARIES_DIR/Config.in" +rm -f "$BINARIES_DIR/qemu.cfg" +CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \ + "$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in" +rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old" diff --git a/board/common/qemu/Config.in b/board/common/qemu/Config.in.in similarity index 95% rename from board/common/qemu/Config.in rename to board/common/qemu/Config.in.in index 58b4285a4..5a506e0e4 100644 --- a/board/common/qemu/Config.in +++ b/board/common/qemu/Config.in.in @@ -2,7 +2,7 @@ mainmenu "QEMU Virtualization" choice prompt "Target Architecture" - default QEMU_aarch64 + default @ARCH@ config QEMU_x86_64 bool "x86_64" @@ -64,7 +64,7 @@ endchoice config QEMU_MACHINE string default "qemu-system-aarch64 -M virt -cpu cortex-a72 -m 256M" if QEMU_aarch64 - default "qemu-system-x86_64 -M q35,accel=kvm -cpu host -m 512M" if QEMU_x86_64 + default "qemu-system-x86_64 -M q35,accel=kvm -cpu host -m 256M" if QEMU_x86_64 config QEMU_KERNEL string @@ -80,7 +80,7 @@ config QEMU_BIOS config QEMU_ROOTFS string - default "disk.img" if !QEMU_ROOTFS_INITRD + default "@DISK_IMG@" if !QEMU_ROOTFS_INITRD default "rootfs.squashfs" if QEMU_ROOTFS_INITRD config QEMU_DTB_EXTEND diff --git a/configs/aarch64_classic_defconfig b/configs/aarch64_classic_defconfig index c6aee7391..987c9715c 100644 --- a/configs/aarch64_classic_defconfig +++ b/configs/aarch64_classic_defconfig @@ -26,11 +26,14 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.5.6" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig" BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B sparx5_pcb135_emmc_no_psci" -BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/dts/microchip/sparx5_pcb135_emmc_no_psci.dts" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="alder/alder marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B microchip/sparx5_pcb135_emmc_no_psci" +BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/dts" +BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_STRACE=y +BR2_PACKAGE_STRESS_NG=y BR2_PACKAGE_JQ=y BR2_PACKAGE_MDIO_TOOLS=y BR2_PACKAGE_RNG_TOOLS=y @@ -46,6 +49,7 @@ BR2_PACKAGE_AVAHI=y # BR2_PACKAGE_AVAHI_AUTOIPD is not set BR2_PACKAGE_AVAHI_DAEMON=y BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y +BR2_PACKAGE_CHRONY=y BR2_PACKAGE_DHCPCD=y BR2_PACKAGE_DNSMASQ=y BR2_PACKAGE_DROPBEAR=y @@ -96,6 +100,10 @@ BR2_PACKAGE_HOST_RAUC=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y +INFIX_VENDOR_HOME="https://github.com/kernelkit" +INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling." +INFIX_HOME="https://github.com/kernelkit/infix/" +INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_VARIANT_CLASSIC=y BR2_PACKAGE_FACTORY=y BR2_PACKAGE_FINIT_SULOGIN=y diff --git a/configs/aarch64_defconfig b/configs/aarch64_defconfig index a095278f1..ea182f469 100644 --- a/configs/aarch64_defconfig +++ b/configs/aarch64_defconfig @@ -36,12 +36,12 @@ BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_STRACE=y BR2_PACKAGE_STRESS_NG=y BR2_PACKAGE_JQ=y -BR2_PACKAGE_MDIO_TOOLS=y BR2_PACKAGE_DBUS_CXX=y BR2_PACKAGE_DBUS_GLIB=y BR2_PACKAGE_DBUS_TRIGGERD=y BR2_PACKAGE_EUDEV_RULES_GEN=y # BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set +BR2_PACKAGE_MDIO_TOOLS=y BR2_PACKAGE_RNG_TOOLS=y BR2_PACKAGE_UBOOT_TOOLS=y BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT=y @@ -106,6 +106,11 @@ BR2_PACKAGE_HOST_RAUC=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y +INFIX_VENDOR_HOME="https://github.com/kernelkit" +INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling." +INFIX_HOME="https://github.com/kernelkit/infix" +INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" +INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" BR2_PACKAGE_CONFD=y BR2_PACKAGE_STATD=y BR2_PACKAGE_FACTORY=y @@ -120,5 +125,6 @@ BR2_PACKAGE_LOWDOWN=y BR2_PACKAGE_NET=y BR2_PACKAGE_TETRIS=y BR2_PACKAGE_QUERIERD=y +DISK_IMAGE_BOOT_BIN=y GNS3_APPLIANCE_RAM=512 GNS3_APPLIANCE_IFNUM=10 diff --git a/configs/x86_64_classic_defconfig b/configs/x86_64_classic_defconfig index 0674900db..4c2dd0b59 100644 --- a/configs/x86_64_classic_defconfig +++ b/configs/x86_64_classic_defconfig @@ -100,6 +100,10 @@ BR2_PACKAGE_HOST_RAUC=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y +INFIX_VENDOR_HOME="https://github.com/kernelkit" +INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling." +INFIX_HOME="https://github.com/kernelkit/infix/" +INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" INFIX_VARIANT_CLASSIC=y BR2_PACKAGE_FACTORY=y BR2_PACKAGE_FINIT_SULOGIN=y @@ -112,3 +116,4 @@ BR2_PACKAGE_FINIT_PLUGIN_TTY=y BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y BR2_PACKAGE_IFUPDOWN_NG=y BR2_PACKAGE_TETRIS=y +DISK_IMAGE_BOOT_BIN=y \ No newline at end of file diff --git a/configs/x86_64_defconfig b/configs/x86_64_defconfig index 7e563d416..50f7e423c 100644 --- a/configs/x86_64_defconfig +++ b/configs/x86_64_defconfig @@ -110,6 +110,11 @@ BR2_PACKAGE_HOST_RAUC=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y +INFIX_VENDOR_HOME="https://github.com/kernelkit" +INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling." +INFIX_HOME="https://github.com/kernelkit/infix/" +INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc" +INFIX_SUPPORT="mailto:kernelkit@googlegroups.com" BR2_PACKAGE_CONFD=y BR2_PACKAGE_STATD=y BR2_PACKAGE_FACTORY=y diff --git a/doc/branding.md b/doc/branding.md new file mode 100644 index 000000000..fbfa13977 --- /dev/null +++ b/doc/branding.md @@ -0,0 +1,66 @@ +Branding & Releases +=================== + +This document is for projects using Infix as a br2-external, i.e., OEMs. + + +Branding +-------- + +Branding is done in menuconfig, there are several settings affecting +it, most are in the Infix external subsection called "Branding", but +there is also `BR2_TARGET_GENERIC_HOSTNAME`, which deserves a +special mention. + +The hostname is used for the system default `/etc/hostname`, which +is the base name for the "unique:ified" hostname + the last three +octets of the base MAC[^1] address, e.g., `infix-c0-ff-ee`. This in +turn is the hostname that is set at first boot and also advertised +by device discovery protocols like SSDP, mDNS/SD and LLDP. + +See the help texts for the *Infix Branding* settings to understand +which ones are mandatory and which are optional, menuconfig does not +check this for you and you may end up with odd results. + +Verify the result after a build by inspecting: + + - `output/images/*`: names, missing prefix, etc. + - `output/target/etc/os-release`: this file is sourced by + other build scripts, e.g., `mkgns3a.sh`. For reference, see + https://www.freedesktop.org/software/systemd/man/os-release.html + +> **Note:** to get proper GIT revision (hash) from your composed OS, +> remember in menuconfig to set `INFIX_OEM_PATH`. When unset the +> Infix `post-build.sh` script defaults to the Infix base path. The +> revision is stored in the file `/etc/os-release` as BUILD_ID and +> is also in the file `/etc/version`. See below for more info. + +[^1]: The base MAC address is defined in the device's Vital Product + Data (VPD) EEPROM, or similar, which is used by the kernel to + create the system interfaces. This MAC address is usually also + printed on a label on the device. + + +Releases +-------- + +A release build requires the global variable `INFIX_RELEASE` to be set. +It can be derived from GIT, if the source tree is kept in GIT VCS. + +### `INFIX_RELEASE` + +This global variable **must be** a lower-case string (no spaces or +other characters outside of 0–9, a–z, '.', '_' and '-') identifying +the operating system version, excluding any OS name information or +release code name, and suitable for processing by scripts or usage +in generated filenames. + +Used for `VERSION` and `VERSION_ID` in `/etc/os-release` and +generated file names like disk images, etc. + +**Default:** generated using `git describe --always --dirty --tags`, +with an additional `-C $infix_path`. This variable defaults to the +Infix tree and can be changed by setting the menuconfig branding +variable `INFIX_OEM_PATH` to that of the br2-external. It is also +possible to set the `GIT_VERSION` variable in your `post-build.sh` +script to change how the VCS version is extracted.