From c51b9732175339e1f4398464f17cc958a2226fd9 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 10 Jan 2026 02:16:08 +0100 Subject: [PATCH] drop `UBOOT_USE_GCC`, `KERNEL_USE_GCC`, `ATF_USE_GCC` completely - also `CRUST_USE_GCC` - those don't serve any purpose and cause confusion --- config/boards/odroidc1.conf | 1 - config/sources/amd64.conf | 2 - config/sources/arm64.conf | 4 -- config/sources/armhf.conf | 3 - config/sources/families/d1.conf | 1 - .../families/include/crust_firmware.inc | 1 - .../families/include/mvebu-helios4.inc | 2 - .../families/include/rockchip64_common.inc | 2 - config/sources/families/mvebu64.conf | 1 - config/sources/families/spacemit.conf | 1 - config/sources/families/thead.conf | 1 - config/sources/families/uefi-loong64.conf | 1 - config/sources/families/uefi-riscv64.conf | 1 - config/sources/loong64.conf | 2 - config/sources/riscv64.conf | 2 - lib/functions/configuration/main-config.sh | 4 -- lib/library-functions.sh | 61 ++++++++----------- 17 files changed, 26 insertions(+), 64 deletions(-) diff --git a/config/boards/odroidc1.conf b/config/boards/odroidc1.conf index c6cf04e78a..110cc8d57a 100644 --- a/config/boards/odroidc1.conf +++ b/config/boards/odroidc1.conf @@ -11,7 +11,6 @@ BOOTSOURCE='https://github.com/hardkernel/u-boot.git' BOOTBRANCH='branch:odroidc-v2011.03' BOOTPATCHDIR="legacy" UBOOT_COMPILER="arm-linux-gnueabi-" -UBOOT_USE_GCC='< 4.9' BOOTCONFIG="odroidc_config" BOOTSCRIPT="boot-odroid-c1.ini:boot.ini" diff --git a/config/sources/amd64.conf b/config/sources/amd64.conf index 568fb68667..35b9cca83a 100644 --- a/config/sources/amd64.conf +++ b/config/sources/amd64.conf @@ -19,10 +19,8 @@ declare -g PARTITION_TYPE_UUID_ROOT="4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709" # "Li declare -g MAIN_CMDLINE='' # we set it in common, it was not set before declare -g KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts -declare -g KERNEL_USE_GCC=' ' # more hacks. declare -g KERNEL_EXTRA_TARGETS='modules' # default is "modules dtb" but x86_64 has no DTB declare -g KERNEL_BUILD_DTBS="no" # amd64 has no DTBs. that I know of. -declare -g UBOOT_USE_GCC='none' # required by configuration.sh #declare -g INITRD_ARCH=amd64 # Used by u-boot for mkimage in initramfs. No u-boot for x86 yet. # Defaults, if not set by board or family. diff --git a/config/sources/arm64.conf b/config/sources/arm64.conf index d0989a150d..446c012c82 100644 --- a/config/sources/arm64.conf +++ b/config/sources/arm64.conf @@ -25,18 +25,15 @@ declare -g NAME_INITRD="${NAME_INITRD:-"uInitrd"}" [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-" [[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64 -[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0' if [ "$(uname -m)" = "aarch64" ]; then [[ $ATF_COMPILE != "no" && -z $ATF_COMPILER ]] && ATF_COMPILER="aarch64-linux-gnu-" [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-linux-gnu-" [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-" - [[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0' else [[ $ATF_COMPILE != "no" && -z $ATF_COMPILER ]] && ATF_COMPILER="aarch64-none-linux-gnu-" [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-none-linux-gnu-" [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-" - [[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2' export QEMU_CPU="cortex-a53" fi @@ -44,7 +41,6 @@ fi [[ $ATF_COMPILE != "no" && -z $ATFSOURCE ]] && ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware' [[ $ATF_COMPILE != "no" && -z $ATFDIR ]] && ATFDIR='arm-trusted-firmware' [[ $ATF_COMPILE != "no" && -z $ATFBRANCH ]] && ATFBRANCH='commit:af220ebbe467aa580e6b9ba554676f78ffec930f' -[[ $ATF_COMPILE != "no" && -z $ATF_USE_GCC ]] && ATF_USE_GCC='> 8.0' # System toolchains don't have the -none- variant, remove it UBOOT_COMPILER="${UBOOT_COMPILER//-none-/-}" diff --git a/config/sources/armhf.conf b/config/sources/armhf.conf index 2798e22fe9..3e161b2ff7 100644 --- a/config/sources/armhf.conf +++ b/config/sources/armhf.conf @@ -25,16 +25,13 @@ declare -g NAME_KERNEL="${NAME_KERNEL:-"zImage"}" declare -g NAME_INITRD="${NAME_INITRD:-"uInitrd"}" [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER='arm-linux-gnueabihf-' -[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0' if [ "$(uname -m)" = "aarch64" ]; then [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER='arm-linux-gnueabihf-' - [[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0' else # > 9.2 https://armbian.atlassian.net/browse/AR-557 #[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-none-linux-gnueabihf-" [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER='arm-none-linux-gnueabihf-' - [[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2' fi # System toolchains don't have the -none- variant, remove it diff --git a/config/sources/families/d1.conf b/config/sources/families/d1.conf index 43764916fd..4c25f3117d 100644 --- a/config/sources/families/d1.conf +++ b/config/sources/families/d1.conf @@ -14,7 +14,6 @@ BOOTPATCHDIR="u-boot-nezha" UBOOT_TARGET_MAP=";;u-boot.img" # Arm Trusted Firmware -declare -g ATF_USE_GCC="> 8.0" declare -g ATF_COMPILER="riscv64-linux-gnu-" declare -g ATFSOURCE="https://github.com/riscv-software-src/opensbi.git" declare -g ATFDIR="opensbi" diff --git a/config/sources/families/include/crust_firmware.inc b/config/sources/families/include/crust_firmware.inc index 00da8a3bd5..1ed88f06f6 100644 --- a/config/sources/families/include/crust_firmware.inc +++ b/config/sources/families/include/crust_firmware.inc @@ -12,7 +12,6 @@ if [[ -n "${CRUSTCONFIG}" ]]; then [[ -z $CRUSTSOURCE ]] && CRUSTSOURCE='https://github.com/crust-firmware/crust' [[ -z $CRUSTDIR ]] && CRUSTDIR='crust-sunxi-mainline' [[ -z $CRUSTBRANCH ]] && CRUSTBRANCH='tag:v0.6' - [[ -z $CRUST_USE_GCC ]] && CRUST_USE_GCC='> 9.1.0' [[ -z $CRUST_COMPILER ]] && CRUST_COMPILER='or1k-elf-' # Apply crust patches if crust is enabled diff --git a/config/sources/families/include/mvebu-helios4.inc b/config/sources/families/include/mvebu-helios4.inc index 372e9e3543..efd91fe323 100644 --- a/config/sources/families/include/mvebu-helios4.inc +++ b/config/sources/families/include/mvebu-helios4.inc @@ -22,8 +22,6 @@ case $BRANCH in ;spi;u-boot-with-spl.kwb:u-boot.flash ;uart;u-boot-with-spl.kwb:u-boot.uart" - UBOOT_USE_GCC='> 7.0' - OVERLAY_PREFIX='armada-388-helios4' ;; diff --git a/config/sources/families/include/rockchip64_common.inc b/config/sources/families/include/rockchip64_common.inc index e6902b39d4..05c8e03b15 100644 --- a/config/sources/families/include/rockchip64_common.inc +++ b/config/sources/families/include/rockchip64_common.inc @@ -170,10 +170,8 @@ prepare_boot_configuration() { ATF_COMPILER='aarch64-linux-gnu-' ATFDIR='arm-trusted-firmware' ATFBRANCH='tag:v2.13.0' # also adapt ATFPATCHDIR when changing this - ATF_USE_GCC='> 6.3' ATFPATCHDIR='atf-rockchip64/v2.13' # there's also v2.14 patches ready ATF_TARGET_MAP="M0_CROSS_COMPILE=arm-linux-gnueabi- PLAT=$BOOT_SOC bl31;;build/$BOOT_SOC/release/bl31/bl31.elf:bl31.elf" - ATF_TOOLCHAIN2="arm-linux-gnueabi-:< 10.0" [[ $BOOT_SCENARIO == tpl-blob-atf-mainline ]] && UBOOT_TARGET_MAP="BL31=bl31.elf idbloader.img u-boot.itb;;idbloader.img u-boot.itb" diff --git a/config/sources/families/mvebu64.conf b/config/sources/families/mvebu64.conf index 5818c9437e..12efda282f 100644 --- a/config/sources/families/mvebu64.conf +++ b/config/sources/families/mvebu64.conf @@ -29,7 +29,6 @@ declare -g OVERLAY_DIR="/boot/dtb/marvell/overlay" declare -g ATFSOURCE='https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git' declare -g ATFDIR='arm-trusted-firmware-espressobin' declare -g ATFBRANCH='tag:lts-v2.12.8' -declare -g ATF_USE_GCC='> 7.2' ATF_COMPILER='aarch64-linux-gnu-' diff --git a/config/sources/families/spacemit.conf b/config/sources/families/spacemit.conf index 354ed025ff..5a8e06ba12 100644 --- a/config/sources/families/spacemit.conf +++ b/config/sources/families/spacemit.conf @@ -12,7 +12,6 @@ declare -g LINUXFAMILY="spacemit" declare -g GOVERNOR="performance" # OpenSBI -declare -g ATF_USE_GCC="> 8.0" declare -g ATF_COMPILER="riscv64-linux-gnu-" declare -g ATFSOURCE="https://gitee.com/bianbu-linux/opensbi.git" declare -g ATFDIR="opensbi" diff --git a/config/sources/families/thead.conf b/config/sources/families/thead.conf index 56538e6391..14a2d771c0 100644 --- a/config/sources/families/thead.conf +++ b/config/sources/families/thead.conf @@ -14,7 +14,6 @@ BOOTBRANCH='branch:extlinux' BOOTPATCHDIR="legacy" UBOOT_TARGET_MAP=";;u-boot-with-spl.bin" UBOOT_COMPILER="riscv64-linux-gnu-" -UBOOT_USE_GCC='< 8.0' BOOTDIR='u-boot-thead' LINUXFAMILY="thead" diff --git a/config/sources/families/uefi-loong64.conf b/config/sources/families/uefi-loong64.conf index fecee3d096..a33de056ac 100644 --- a/config/sources/families/uefi-loong64.conf +++ b/config/sources/families/uefi-loong64.conf @@ -7,7 +7,6 @@ # https://github.com/armbian/build/ # # Important: LINUXFAMILY and ARCH are defined _before_ including the common family include -declare -g UBOOT_USE_GCC="none" declare -g UEFI_GRUB_TERMINAL="gfxterm" declare -g LINUXFAMILY="loong64" declare -g ARCH="loong64" diff --git a/config/sources/families/uefi-riscv64.conf b/config/sources/families/uefi-riscv64.conf index 6473f4b35f..81f2bbed7f 100644 --- a/config/sources/families/uefi-riscv64.conf +++ b/config/sources/families/uefi-riscv64.conf @@ -7,7 +7,6 @@ # https://github.com/armbian/build/ # # Important: LINUXFAMILY and ARCH are defined _before_ including the common family include -declare -g UBOOT_USE_GCC="none" declare -g UEFI_GRUB_TERMINAL="gfxterm" declare -g LINUXFAMILY="riscv64" declare -g ARCH="riscv64" diff --git a/config/sources/loong64.conf b/config/sources/loong64.conf index 3a2381bf3c..136fbeabb0 100644 --- a/config/sources/loong64.conf +++ b/config/sources/loong64.conf @@ -26,7 +26,5 @@ declare -g NAME_INITRD="${NAME_INITRD:-"initrd.img"}" [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER='loongarch64-linux-gnu-' [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER='loongarch64-linux-gnu-' -[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 13.0' -[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 13.0' true # make sure to exit with 0 status; this protects against shortcircuits etc above. diff --git a/config/sources/riscv64.conf b/config/sources/riscv64.conf index 63a1e36845..95778a07e1 100644 --- a/config/sources/riscv64.conf +++ b/config/sources/riscv64.conf @@ -26,8 +26,6 @@ declare -g NAME_INITRD="${NAME_INITRD:-"uInitrd"}" [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER='riscv64-linux-gnu-' [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER='riscv64-linux-gnu-' -[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0' -[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0' [[ -z $INITRD_ARCH ]] && INITRD_ARCH=riscv true # make sure to exit with 0 status; this protects against shortcircuits etc above. diff --git a/lib/functions/configuration/main-config.sh b/lib/functions/configuration/main-config.sh index 63b579f3db..06eab14061 100644 --- a/lib/functions/configuration/main-config.sh +++ b/lib/functions/configuration/main-config.sh @@ -358,10 +358,6 @@ function do_main_configuration() { } function do_extra_configuration() { - [[ -n $ATFSOURCE && -z $ATF_USE_GCC ]] && exit_with_error "Error in configuration: ATF_USE_GCC is unset" - [[ -z $UBOOT_USE_GCC ]] && exit_with_error "Error in configuration: UBOOT_USE_GCC is unset" - [[ -z $KERNEL_USE_GCC ]] && exit_with_error "Error in configuration: KERNEL_USE_GCC is unset" - declare BOOTCONFIG_VAR_NAME="BOOTCONFIG_${BRANCH^^}" # Branch name, uppercase BOOTCONFIG_VAR_NAME=${BOOTCONFIG_VAR_NAME//-/_} # Replace dashes with underscores [[ -n ${!BOOTCONFIG_VAR_NAME} ]] && BOOTCONFIG=${!BOOTCONFIG_VAR_NAME} diff --git a/lib/library-functions.sh b/lib/library-functions.sh index 7dfcaeea72..5fd7603811 100644 --- a/lib/library-functions.sh +++ b/lib/library-functions.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# This file is/was autogenerated by ./lib/tools/gen-library.sh; don't modify manually +# This file is/was autogenerated by lib/tools/gen-library.sh; don't modify manually # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" @@ -100,6 +100,15 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true # shellcheck source=lib/functions/artifacts/artifact-rootfs.sh source "${SRC}"/lib/functions/artifacts/artifact-rootfs.sh +# no errors tolerated. invoked before each sourced file to make sure. +#set -o pipefail # trace ERR through pipes - will be enabled "soon" +#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled +set -o errtrace # trace ERR through - enabled +set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled +### lib/functions/artifacts/artifact-uboot.sh +# shellcheck source=lib/functions/artifacts/artifact-uboot.sh +source "${SRC}"/lib/functions/artifacts/artifact-uboot.sh + # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled @@ -127,15 +136,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true # shellcheck source=lib/functions/artifacts/artifacts-reversion.sh source "${SRC}"/lib/functions/artifacts/artifacts-reversion.sh -# no errors tolerated. invoked before each sourced file to make sure. -#set -o pipefail # trace ERR through pipes - will be enabled "soon" -#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled -set -o errtrace # trace ERR through - enabled -set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled -### lib/functions/artifacts/artifact-uboot.sh -# shellcheck source=lib/functions/artifacts/artifact-uboot.sh -source "${SRC}"/lib/functions/artifacts/artifact-uboot.sh - # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled @@ -474,18 +474,18 @@ source "${SRC}"/lib/functions/compilation/packages/utils-dpkgdeb.sh #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled set -o errtrace # trace ERR through - enabled set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled -### lib/functions/compilation/patch/drivers-harness.sh -# shellcheck source=lib/functions/compilation/patch/drivers-harness.sh -source "${SRC}"/lib/functions/compilation/patch/drivers-harness.sh +### lib/functions/compilation/patch/drivers_network.sh +# shellcheck source=lib/functions/compilation/patch/drivers_network.sh +source "${SRC}"/lib/functions/compilation/patch/drivers_network.sh # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled set -o errtrace # trace ERR through - enabled set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled -### lib/functions/compilation/patch/drivers_network.sh -# shellcheck source=lib/functions/compilation/patch/drivers_network.sh -source "${SRC}"/lib/functions/compilation/patch/drivers_network.sh +### lib/functions/compilation/patch/drivers-harness.sh +# shellcheck source=lib/functions/compilation/patch/drivers-harness.sh +source "${SRC}"/lib/functions/compilation/patch/drivers-harness.sh # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" @@ -676,15 +676,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true # shellcheck source=lib/functions/general/extensions.sh source "${SRC}"/lib/functions/general/extensions.sh -# no errors tolerated. invoked before each sourced file to make sure. -#set -o pipefail # trace ERR through pipes - will be enabled "soon" -#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled -set -o errtrace # trace ERR through - enabled -set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled -### lib/functions/general/github-actions.sh -# shellcheck source=lib/functions/general/github-actions.sh -source "${SRC}"/lib/functions/general/github-actions.sh - # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled @@ -703,6 +694,15 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true # shellcheck source=lib/functions/general/git.sh source "${SRC}"/lib/functions/general/git.sh +# no errors tolerated. invoked before each sourced file to make sure. +#set -o pipefail # trace ERR through pipes - will be enabled "soon" +#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled +set -o errtrace # trace ERR through - enabled +set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled +### lib/functions/general/github-actions.sh +# shellcheck source=lib/functions/general/github-actions.sh +source "${SRC}"/lib/functions/general/github-actions.sh + # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled @@ -784,15 +784,6 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true # shellcheck source=lib/functions/host/docker.sh source "${SRC}"/lib/functions/host/docker.sh -# no errors tolerated. invoked before each sourced file to make sure. -#set -o pipefail # trace ERR through pipes - will be enabled "soon" -#set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled -set -o errtrace # trace ERR through - enabled -set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled -### lib/functions/host/external-toolchains.sh -# shellcheck source=lib/functions/host/external-toolchains.sh -source "${SRC}"/lib/functions/host/external-toolchains.sh - # no errors tolerated. invoked before each sourced file to make sure. #set -o pipefail # trace ERR through pipes - will be enabled "soon" #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled @@ -1176,4 +1167,4 @@ source "${SRC}"/lib/functions/rootfs/trap-rootfs.sh #set -o nounset ## set -u : exit the script if you try to use an uninitialised variable - one day will be enabled set -o errtrace # trace ERR through - enabled set -o errexit ## set -e : exit the script if any statement returns a non-true return value - enabled -# This file is/was autogenerated by ./lib/tools/gen-library.sh; don't modify manually +# This file is/was autogenerated by lib/tools/gen-library.sh; don't modify manually