From 62f5fe1596ead3fb86728512c672cba7c35f555f Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Tue, 28 Mar 2023 20:22:34 +0200 Subject: [PATCH] config: fix: replace undue `export` statements with `declare -g`; shellfmt --- config/boards/qemu-uboot-arm64.wip | 12 ++-- config/boards/qemu-uboot-x86.wip | 14 ++-- config/boards/rpi4b.conf | 20 +++--- config/boards/uefi-arm64.conf | 8 +-- config/boards/uefi-riscv64.conf | 8 +-- config/boards/uefi-x86.conf | 8 +-- config/boards/virtual-qemu.wip | 2 +- config/sources/amd64.conf | 29 ++++---- config/sources/arm64.conf | 15 ++-- config/sources/armhf.conf | 17 +++-- config/sources/common.conf | 16 ++--- config/sources/families/bcm2711.conf | 68 +++++++++---------- config/sources/families/imx6.conf | 6 +- config/sources/families/imx7d.conf | 4 +- .../families/include/meson64_common.inc | 4 +- .../sources/families/include/meson_common.inc | 4 +- .../families/include/rockchip64_common.inc | 4 +- .../families/include/sunxi64_common.inc | 26 +++---- .../sources/families/include/sunxi_common.inc | 30 ++++---- .../sources/families/include/uefi_common.inc | 8 +-- config/sources/families/media.conf | 10 +-- config/sources/families/mt7623.conf | 2 +- config/sources/families/mvebu.conf | 4 +- config/sources/families/mvebu64.conf | 18 ++--- config/sources/families/odroidxu4.conf | 2 +- config/sources/families/rk322x.conf | 6 +- config/sources/families/rk3399.conf | 2 +- config/sources/families/rk3568-odroid.conf | 2 +- config/sources/families/rk35xx.conf | 2 +- config/sources/families/rockchip-rk3588.conf | 2 +- config/sources/families/rockchip.conf | 6 +- config/sources/families/rockchip64.conf | 2 +- config/sources/families/rockpis.conf | 2 +- config/sources/families/s5p6818.conf | 2 +- config/sources/families/sun50iw9.conf | 4 +- config/sources/families/uefi-arm64.conf | 4 +- config/sources/families/uefi-riscv64.conf | 8 +-- config/sources/families/uefi-x86.conf | 6 +- config/sources/families/virtual.conf | 2 +- config/sources/families/zynq.conf | 2 +- config/sources/riscv64.conf | 19 +++--- 41 files changed, 203 insertions(+), 207 deletions(-) diff --git a/config/boards/qemu-uboot-arm64.wip b/config/boards/qemu-uboot-arm64.wip index d0679f085d..a54fa671c8 100644 --- a/config/boards/qemu-uboot-arm64.wip +++ b/config/boards/qemu-uboot-arm64.wip @@ -1,8 +1,8 @@ # qemu via uboot on arm64, for "virt" qemu machine type -export BOARD_NAME="uefi-arm64" -export BOARDFAMILY="uefi-arm64" -export KERNEL_TARGET="current,edge" +declare -g BOARD_NAME="uefi-arm64" +declare -g BOARDFAMILY="uefi-arm64" +declare -g KERNEL_TARGET="current,edge" -export UEFI_GRUB="skip" # Skip GRUB for this board -export SERIALCON="ttyS0" -export QEMU_UBOOT_BOOTCONFIG="qemu_arm64_defconfig" +declare -g UEFI_GRUB="skip" # Skip GRUB for this board +declare -g SERIALCON="ttyS0" +declare -g QEMU_UBOOT_BOOTCONFIG="qemu_arm64_defconfig" diff --git a/config/boards/qemu-uboot-x86.wip b/config/boards/qemu-uboot-x86.wip index 2758b1e55a..871879f5c6 100644 --- a/config/boards/qemu-uboot-x86.wip +++ b/config/boards/qemu-uboot-x86.wip @@ -1,11 +1,11 @@ # x86_64 via qemu + u-boot firmware, for q35 machine type -export UEFI_GRUB="skip" # Skip GRUB for this board -export BOARD_NAME="uefi-x86" -export BOARDFAMILY="uefi-x86" -export KERNEL_TARGET="current,edge" +declare -g UEFI_GRUB="skip" # Skip GRUB for this board +declare -g BOARD_NAME="uefi-x86" +declare -g BOARDFAMILY="uefi-x86" +declare -g KERNEL_TARGET="current,edge" -export SERIALCON="ttyS0" +declare -g SERIALCON="ttyS0" # u-boot's "x86_64" is incomplete; use the 32-bit version. -export QEMU_UBOOT_BOOTCONFIG="qemu-x86_defconfig" -export INITRD_ARCH='x86' # not really needed, but just in case +declare -g QEMU_UBOOT_BOOTCONFIG="qemu-x86_defconfig" +declare -g INITRD_ARCH='x86' # not really needed, but just in case diff --git a/config/boards/rpi4b.conf b/config/boards/rpi4b.conf index 252e8f176a..d578e29e70 100644 --- a/config/boards/rpi4b.conf +++ b/config/boards/rpi4b.conf @@ -1,9 +1,9 @@ # Broadcom BCM2711 quad core 1-8Gb RAM SoC USB3 GBE USB-C WiFi/BT -export BOARD_NAME="Raspberry Pi 4" -export BOARDFAMILY="bcm2711" -export KERNEL_TARGET="legacy,current,edge" -export FK__MACHINE_MODEL="Raspberry Pi 4 Model B" # flash kernel (FK) configuration -export ASOUND_STATE="asound.state.rpi" +declare -g BOARD_NAME="Raspberry Pi 4" +declare -g BOARDFAMILY="bcm2711" +declare -g KERNEL_TARGET="legacy,current,edge" +declare -g FK__MACHINE_MODEL="Raspberry Pi 4 Model B" # flash kernel (FK) configuration +declare -g ASOUND_STATE="asound.state.rpi" # Our default paritioning system is leaving esp on. Rpi3 is the only board that have issues with this. # Removing the ESP flag from the boot partition should allow the image to boot on both the RPi3 and RPi4. @@ -21,7 +21,7 @@ pre_initramfs_flash_kernel__write_raspi_config() { max_framebuffers=2 over_voltage=2 arm_freq=1800 - + [all] kernel=vmlinuz cmdline=cmdline.txt @@ -33,18 +33,18 @@ pre_initramfs_flash_kernel__write_raspi_config() { # enable audio (loads snd_bcm2835) dtparam=audio=on - + # bootloader logs to serial, second stage # enable_uart=1 - + # overclock. requires decent thermals. COMMENT OUT IF DON'T USE A GREAT COOLER OR HEATSINK. # over_voltage=6 # arm_freq=2000 - + # uncomment to disable wifi or bt. #dtoverlay=disable-wifi #dtoverlay=disable-bt - + # gpu and 3d stuff. gpu_mem=256 dtoverlay=vc4-fkms-v3d diff --git a/config/boards/uefi-arm64.conf b/config/boards/uefi-arm64.conf index 2af31c0647..c7e53bd2ab 100644 --- a/config/boards/uefi-arm64.conf +++ b/config/boards/uefi-arm64.conf @@ -1,6 +1,6 @@ # aarch64 via UEFI for all UEFI-enabled boards -export BOARD_NAME="UEFI arm64" -export BOARDFAMILY="uefi-arm64" -export KERNEL_TARGET="legacy,current,edge" +declare -g BOARD_NAME="UEFI arm64" +declare -g BOARDFAMILY="uefi-arm64" +declare -g KERNEL_TARGET="legacy,current,edge" -export BOOT_LOGO=desktop +declare -g BOOT_LOGO=desktop diff --git a/config/boards/uefi-riscv64.conf b/config/boards/uefi-riscv64.conf index d72d466624..ce4179857d 100644 --- a/config/boards/uefi-riscv64.conf +++ b/config/boards/uefi-riscv64.conf @@ -1,5 +1,5 @@ # riscv64 via UEFI for all UEFI-enabled boards -export BOARD_NAME="UEFI riscv64" -export BOARDFAMILY="uefi-riscv64" -export KERNEL_TARGET="legacy,current,edge" -export SERIALCON="ttyS0" +declare -g BOARD_NAME="UEFI riscv64" +declare -g BOARDFAMILY="uefi-riscv64" +declare -g KERNEL_TARGET="legacy,current,edge" +declare -g SERIALCON="ttyS0" diff --git a/config/boards/uefi-x86.conf b/config/boards/uefi-x86.conf index 0878060a7c..ec95fdf43c 100644 --- a/config/boards/uefi-x86.conf +++ b/config/boards/uefi-x86.conf @@ -1,6 +1,6 @@ # x86_64 via UEFI/BIOS for all boards -export BOARD_NAME="UEFI x86" -export BOARDFAMILY="uefi-x86" -export KERNEL_TARGET="legacy,current,edge" +declare -g BOARD_NAME="UEFI x86" +declare -g BOARDFAMILY="uefi-x86" +declare -g KERNEL_TARGET="legacy,current,edge" -export BOOT_LOGO=desktop +declare -g BOOT_LOGO=desktop diff --git a/config/boards/virtual-qemu.wip b/config/boards/virtual-qemu.wip index 812806b73f..cf97d223a6 100644 --- a/config/boards/virtual-qemu.wip +++ b/config/boards/virtual-qemu.wip @@ -7,7 +7,7 @@ # how to run on linux ##!/bin/bash # -#export image=armbian.img +#declare -g image=armbian.img #smp=4 #rams=1000M #bios=u-boot.bin diff --git a/config/sources/amd64.conf b/config/sources/amd64.conf index 6db00bddca..7c454bf0ff 100644 --- a/config/sources/amd64.conf +++ b/config/sources/amd64.conf @@ -8,27 +8,26 @@ # # 'common.conf' is already sourced when this arch is sourced. -export ARCH='amd64' # Debian name $(dpkg-architecture -qDEB_HOST_ARCH) -export ARCHITECTURE='x86_64' # "kernel" arch -export KERNEL_SRC_ARCH='x86' # kernel SRC_ARCH; there's two for x86_64 -export QEMU_BINARY='qemu-x86_64-static' # Hopefully you have this installed. -export MAIN_CMDLINE='' # we set it in common, it was not set before -export KERNEL_COMPILER=' ' # hack: use single space for host gcc. won't work on arm64 hosts -export KERNEL_USE_GCC=' ' # more hacks. -export KERNEL_IMAGE_TYPE='bzImage' # Ubuntu Standard -export KERNEL_INSTALL_TYPE='install' # the only one -export KERNEL_EXTRA_TARGETS='modules' # default is "modules dtb" but x86_64 has no DTB -export KERNEL_BUILD_DTBS="no" # amd64 has no DTBs. that I know of. -export UBOOT_USE_GCC='none' # required by configuration.sh -#export INITRD_ARCH=amd64 # Used by u-boot for mkimage in initramfs. No u-boot for x86 yet. +declare -g ARCH='amd64' # Debian name $(dpkg-architecture -qDEB_HOST_ARCH) +declare -g ARCHITECTURE='x86_64' # "kernel" arch +declare -g KERNEL_SRC_ARCH='x86' # kernel SRC_ARCH; there's two for x86_64 +declare -g QEMU_BINARY='qemu-x86_64-static' # Hopefully you have this installed. +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_IMAGE_TYPE='bzImage' # Ubuntu Standard +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. # Default to mainline [[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE if [[ "$(uname -m)" == "aarch64" ]]; then # Allow building amd64 on aarch64, but using system toolchain only - export KERNEL_COMPILER="x86_64-linux-gnu-" - export SKIP_EXTERNAL_TOOLCHAINS=yes + declare -g KERNEL_COMPILER="x86_64-linux-gnu-" + declare -g SKIP_EXTERNAL_TOOLCHAINS=yes fi true # make sure to exit with 0 status; this protects against shortcircuits etc above. diff --git a/config/sources/arm64.conf b/config/sources/arm64.conf index 9ff39b4b9e..41d52cee23 100644 --- a/config/sources/arm64.conf +++ b/config/sources/arm64.conf @@ -8,14 +8,13 @@ # # 'common.conf' is already sourced when this arch is sourced. -export ARCH='arm64' -export ARCHITECTURE='arm64' -export KERNEL_SRC_ARCH='arm64' -export QEMU_BINARY='qemu-aarch64-static' -export KERNEL_IMAGE_TYPE='Image' -export KERNEL_INSTALL_TYPE='install' -export NAME_KERNEL='Image' -export NAME_INITRD='uInitrd' +declare -g ARCH='arm64' +declare -g ARCHITECTURE='arm64' +declare -g KERNEL_SRC_ARCH='arm64' +declare -g QEMU_BINARY='qemu-aarch64-static' +declare -g NAME_KERNEL='Image' +declare -g NAME_INITRD='uInitrd' +declare -g KERNEL_IMAGE_TYPE='Image' [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-" [[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64 diff --git a/config/sources/armhf.conf b/config/sources/armhf.conf index 7eb3ca73bf..8c441c7a55 100644 --- a/config/sources/armhf.conf +++ b/config/sources/armhf.conf @@ -8,15 +8,14 @@ # # 'common.conf' is already sourced when this arch is sourced. -export ARCH='armhf' -export ARCHITECTURE='arm' -export KERNEL_SRC_ARCH='arm' -export QEMU_BINARY='qemu-arm-static' -[[ -z $KERNEL_IMAGE_TYPE ]] && export KERNEL_IMAGE_TYPE='zImage' -[[ -z $KERNEL_INSTALL_TYPE ]] && export KERNEL_INSTALL_TYPE='zinstall' -[[ -z $NAME_KERNEL ]] && export NAME_KERNEL='zImage' -export NAME_INITRD='uInitrd' -export INITRD_ARCH='arm' +declare -g ARCH='armhf' +declare -g ARCHITECTURE='arm' +declare -g KERNEL_SRC_ARCH='arm' +declare -g QEMU_BINARY='qemu-arm-static' +declare -g NAME_KERNEL='zImage' +declare -g NAME_INITRD='uInitrd' +declare -g INITRD_ARCH='arm' +declare -g KERNEL_IMAGE_TYPE='Image' [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER='arm-linux-gnueabihf-' [[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0' diff --git a/config/sources/common.conf b/config/sources/common.conf index a2acea1986..f75e8334c2 100644 --- a/config/sources/common.conf +++ b/config/sources/common.conf @@ -8,17 +8,17 @@ # # this is sourced before any other arch specific config file, always. see main-config.sh -export FAST_CREATE_IMAGE='yes' -export MAIN_CMDLINE='rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles' +declare -g FAST_CREATE_IMAGE='yes' +declare -g MAIN_CMDLINE='rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles' # boot loader configuration -[[ -z $BOOTSOURCE ]] && export BOOTSOURCE="$MAINLINE_UBOOT_SOURCE" -[[ -z $BOOTDIR ]] && export BOOTDIR="$MAINLINE_UBOOT_DIR" -[[ -z $BOOTBRANCH ]] && export BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:v2022.07"}" +[[ -z $BOOTSOURCE ]] && declare -g BOOTSOURCE="$MAINLINE_UBOOT_SOURCE" +[[ -z $BOOTDIR ]] && declare -g BOOTDIR="$MAINLINE_UBOOT_DIR" +[[ -z $BOOTBRANCH ]] && declare -g BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:v2022.07"}" # kernel configuration -[[ -z $KERNELDIR ]] && export KERNELDIR="$MAINLINE_KERNEL_DIR" -[[ -z $KERNELSOURCE ]] && export KERNELSOURCE="$MAINLINE_KERNEL_SOURCE" -[[ -z $KERNELBRANCH ]] && export KERNELBRANCH='branch:linux-6.0.y' +[[ -z $KERNELDIR ]] && declare -g KERNELDIR="$MAINLINE_KERNEL_DIR" +[[ -z $KERNELSOURCE ]] && declare -g KERNELSOURCE="$MAINLINE_KERNEL_SOURCE" +[[ -z $KERNELBRANCH ]] && declare -g KERNELBRANCH='branch:linux-6.0.y' true # make sure to exit with 0 status; this protects against shortcircuits etc above. diff --git a/config/sources/families/bcm2711.conf b/config/sources/families/bcm2711.conf index 0f1c33c8e7..87148a2149 100644 --- a/config/sources/families/bcm2711.conf +++ b/config/sources/families/bcm2711.conf @@ -7,47 +7,47 @@ # https://github.com/armbian/build/ # enable_extension "flash-kernel" -export LINUXFAMILY=bcm2711 -export ARCH=arm64 -export UEFI_FS_LABEL="RPICFG" # Windows/Mac users will see this if they mount the SD card. Configurable, but should be uppercase always -export SKIP_BOOTSPLASH="yes" # video is init-ed before us -export FK__PUBLISHED_KERNEL_VERSION="raspi" # flash kernel (FK) configuration -export FK__KERNEL_PACKAGES="" -export CPUMIN=500000 -export CPUMAX=2000000 -export GOVERNOR=ondemand +declare -g LINUXFAMILY=bcm2711 +declare -g ARCH=arm64 +declare -g UEFI_FS_LABEL="RPICFG" # Windows/Mac users will see this if they mount the SD card. Configurable, but should be uppercase always +declare -g SKIP_BOOTSPLASH="yes" # video is init-ed before us +declare -g FK__PUBLISHED_KERNEL_VERSION="raspi" # flash kernel (FK) configuration +declare -g FK__KERNEL_PACKAGES="" +declare -g CPUMIN=500000 +declare -g CPUMAX=2000000 +declare -g GOVERNOR=ondemand case "${BRANCH}" in ddk) - export RASPI_DISTRO_KERNEL=yes # This will cause board to include distro's prebuilt kernel, not from source + declare -g RASPI_DISTRO_KERNEL=yes # This will cause board to include distro's prebuilt kernel, not from source ;; legacy) - export RASPI_DISTRO_KERNEL=no - export KERNELSOURCE='https://github.com/raspberrypi/linux' - export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. For mainline caching. - export KERNELBRANCH="branch:rpi-5.15.y" - export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}" - export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" + declare -g RASPI_DISTRO_KERNEL=no + declare -g KERNELSOURCE='https://github.com/raspberrypi/linux' + declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNELBRANCH="branch:rpi-5.15.y" + declare -g KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}" + declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" ;; current) - export RASPI_DISTRO_KERNEL=no - export KERNELSOURCE='https://github.com/raspberrypi/linux' - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching. - export KERNELBRANCH="branch:rpi-6.1.y" - export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}" - export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" + declare -g RASPI_DISTRO_KERNEL=no + declare -g KERNELSOURCE='https://github.com/raspberrypi/linux' + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNELBRANCH="branch:rpi-6.1.y" + declare -g KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}" + declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" ;; edge) - export RASPI_DISTRO_KERNEL=no - export KERNELSOURCE='https://github.com/raspberrypi/linux' - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. For mainline caching. - export KERNELBRANCH="branch:rpi-6.2.y" - export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}" - export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" + declare -g RASPI_DISTRO_KERNEL=no + declare -g KERNELSOURCE='https://github.com/raspberrypi/linux' + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNELBRANCH="branch:rpi-6.2.y" + declare -g KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}" + declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}" ;; esac @@ -70,23 +70,23 @@ pre_flash_kernel__symlink_dtb_and_kernel() { extension_prepare_config__prepare_rpi_flash_kernel() { display_alert "Preparing bcm2711" "${RELEASE}, distro kernel?: ${RASPI_DISTRO_KERNEL}" "info" - export RASPI_DISTRO_KERNEL="${RASPI_DISTRO_KERNEL:-no}" # Include a distro-built kernel? - export SERIALCON="${RASPI_SERIALCON:-tty1}" # HDMI etc, not serial. most people don't have UART on rpi + declare -g RASPI_DISTRO_KERNEL="${RASPI_DISTRO_KERNEL:-no}" # Include a distro-built kernel? + declare -g SERIALCON="${RASPI_SERIALCON:-tty1}" # HDMI etc, not serial. most people don't have UART on rpi local usable_releases="jammy|kinetic|lunar" if [[ "$RELEASE" =~ ^(${usable_releases})$ ]]; then - export FK__EXTRA_PACKAGES="rpi-eeprom linux-firmware linux-firmware-raspi pi-bluetooth libraspberrypi-bin cloud-initramfs-growroot" + declare -g FK__EXTRA_PACKAGES="rpi-eeprom linux-firmware linux-firmware-raspi pi-bluetooth libraspberrypi-bin cloud-initramfs-growroot" if [[ "$RELEASE" =~ ^(jammy|kinetic)$ ]]; then # Add raspi-config for those releases that have it; it might be useful. - export FK__EXTRA_PACKAGES="${FK__EXTRA_PACKAGES} raspi-config" + declare -g FK__EXTRA_PACKAGES="${FK__EXTRA_PACKAGES} raspi-config" fi if [[ "${RASPI_DISTRO_KERNEL}" == "yes" ]]; then # and firmware. unset KERNELSOURCE # Make sure Armbian will not try to compile from source. - export FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-tools-raspi linux-raspi linux-image-raspi " + declare -g FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-tools-raspi linux-raspi linux-image-raspi " # Ubuntu Impish+ split the kernel modules, add the extra ones too. if [[ "$RELEASE" =~ ^(jammy|kinetic)$ ]]; then - export FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-modules-extra-raspi" + declare -g FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-modules-extra-raspi" fi fi else diff --git a/config/sources/families/imx6.conf b/config/sources/families/imx6.conf index ac6573498a..7c6bdcb7a0 100644 --- a/config/sources/families/imx6.conf +++ b/config/sources/families/imx6.conf @@ -18,21 +18,21 @@ case $BRANCH in legacy) - export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-5.15.y' ;; current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.1.y' ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.2.y' ;; diff --git a/config/sources/families/imx7d.conf b/config/sources/families/imx7d.conf index e2cb9729ea..98e5f33cf3 100644 --- a/config/sources/families/imx7d.conf +++ b/config/sources/families/imx7d.conf @@ -19,7 +19,7 @@ case $BRANCH in legacy) KERNELSOURCE='https://source.codeaurora.org/external/imx/linux-imx' - export KERNEL_MAJOR_MINOR="4.14" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.14" # Major and minor versions of this kernel. KERNELBRANCH='branch:imx_4.14.98_2.0.0_ga' KERNELDIR='linux-imx7' BOOTBRANCH='branch:imx_v2018.03_4.14.98_2.0.0_ga' @@ -27,7 +27,7 @@ case $BRANCH in ;; current) KERNELSOURCE='https://source.codeaurora.org/external/imx/linux-imx' - export KERNEL_MAJOR_MINOR="5.4" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.4" # Major and minor versions of this kernel. KERNELBRANCH='branch:imx_5.4.70_2.3.0' KERNELDIR='linux-imx7-current' BOOTBRANCH='branch:imx_v2020.04_5.4.70_2.3.0' diff --git a/config/sources/families/include/meson64_common.inc b/config/sources/families/include/meson64_common.inc index 6d99014fa8..47e9a9daaf 100644 --- a/config/sources/families/include/meson64_common.inc +++ b/config/sources/families/include/meson64_common.inc @@ -32,13 +32,13 @@ GOVERNOR=${GOVERNOR:-ondemand} case $BRANCH in current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching. KERNELBRANCH='branch:linux-6.1.y' KERNELPATCHDIR='meson64-current' ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. For mainline caching. KERNELBRANCH='branch:linux-6.2.y' KERNELPATCHDIR='meson64-edge' ;; diff --git a/config/sources/families/include/meson_common.inc b/config/sources/families/include/meson_common.inc index 7c2b0b13a9..d2c9c01e27 100644 --- a/config/sources/families/include/meson_common.inc +++ b/config/sources/families/include/meson_common.inc @@ -46,7 +46,7 @@ esac case $BRANCH in current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH="branch:linux-6.1.y" KERNELPATCHDIR='meson-'$BRANCH @@ -54,7 +54,7 @@ case $BRANCH in edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. KERNELBRANCH="branch:linux-6.2.y" KERNELPATCHDIR='meson-'$BRANCH diff --git a/config/sources/families/include/rockchip64_common.inc b/config/sources/families/include/rockchip64_common.inc index bf4ed82da1..effd6b8497 100644 --- a/config/sources/families/include/rockchip64_common.inc +++ b/config/sources/families/include/rockchip64_common.inc @@ -129,7 +129,7 @@ case $BRANCH in current) - export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. KERNELBRANCH="branch:linux-5.15.y" KERNELPATCHDIR='rockchip64-'$BRANCH LINUXFAMILY=rockchip64 @@ -139,7 +139,7 @@ case $BRANCH in edge) KERNELPATCHDIR='rockchip64-'$BRANCH - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH="branch:linux-6.1.y" LINUXFAMILY=rockchip64 LINUXCONFIG='linux-rockchip64-'$BRANCH diff --git a/config/sources/families/include/sunxi64_common.inc b/config/sources/families/include/sunxi64_common.inc index 9541cc39f7..822af79f88 100644 --- a/config/sources/families/include/sunxi64_common.inc +++ b/config/sources/families/include/sunxi64_common.inc @@ -7,31 +7,31 @@ # https://github.com/armbian/build/ # enable_extension "sunxi-tools" -export ARCH=arm64 -export ATF_TARGET_MAP="PLAT=$ATF_PLAT DEBUG=1 bl31;;build/$ATF_PLAT/debug/bl31.bin" -export BOOTDELAY=1 +declare -g ARCH=arm64 +declare -g ATF_TARGET_MAP="PLAT=$ATF_PLAT DEBUG=1 bl31;;build/$ATF_PLAT/debug/bl31.bin" +declare -g BOOTDELAY=1 -export BOOTPATCHDIR='u-boot-sunxi' -export BOOTENV_FILE='sunxi.txt' +declare -g BOOTPATCHDIR='u-boot-sunxi' +declare -g BOOTENV_FILE='sunxi.txt' UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-;;u-boot-sunxi-with-spl.bin}" -export BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd' -export LINUXFAMILY=sunxi64 +declare -g BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd' +declare -g LINUXFAMILY=sunxi64 case $BRANCH in legacy) - export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. - export KERNELBRANCH="tag:v5.15.104" + declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. + declare -g KERNELBRANCH="tag:v5.15.104" ;; current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. - export KERNELBRANCH="tag:v6.1.21" + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNELBRANCH="tag:v6.1.21" ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. - export KERNELBRANCH="tag:v6.2.8" + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNELBRANCH="tag:v6.2.8" ;; esac diff --git a/config/sources/families/include/sunxi_common.inc b/config/sources/families/include/sunxi_common.inc index 479efb3680..0bac196be2 100644 --- a/config/sources/families/include/sunxi_common.inc +++ b/config/sources/families/include/sunxi_common.inc @@ -7,32 +7,32 @@ # https://github.com/armbian/build/ # enable_extension "sunxi-tools" -export ARCH=armhf -export BOOTDELAY=1 -export BOOTPATCHDIR='u-boot-sunxi' +declare -g ARCH=armhf +declare -g BOOTDELAY=1 +declare -g BOOTPATCHDIR='u-boot-sunxi' UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-;;u-boot-sunxi-with-spl.bin}" -export BOOTSCRIPT="boot-sunxi.cmd:boot.cmd" -export BOOTENV_FILE='sunxi.txt' -export LINUXFAMILY=sunxi -export UBOOT_FW_ENV='0x88000,0x20000' # /etc/fw_env.config offset and env size -export ASOUND_STATE='asound.state.sunxi-next' -export GOVERNOR=ondemand +declare -g BOOTSCRIPT="boot-sunxi.cmd:boot.cmd" +declare -g BOOTENV_FILE='sunxi.txt' +declare -g LINUXFAMILY=sunxi +declare -g UBOOT_FW_ENV='0x88000,0x20000' # /etc/fw_env.config offset and env size +declare -g ASOUND_STATE='asound.state.sunxi-next' +declare -g GOVERNOR=ondemand case $BRANCH in legacy) - export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. - export KERNELBRANCH="tag:v5.15.104" + declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. + declare -g KERNELBRANCH="tag:v5.15.104" ;; current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. - export KERNELBRANCH="tag:v6.1.21" + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNELBRANCH="tag:v6.1.21" ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. - export KERNELBRANCH="tag:v6.2.8" + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNELBRANCH="tag:v6.2.8" ;; esac diff --git a/config/sources/families/include/uefi_common.inc b/config/sources/families/include/uefi_common.inc index ffe8227635..384dcdbec8 100644 --- a/config/sources/families/include/uefi_common.inc +++ b/config/sources/families/include/uefi_common.inc @@ -31,8 +31,8 @@ case "${BRANCH}" in declare -g DISTRO_GENERIC_KERNEL=no declare -g LINUXCONFIG="linux-uefi-${LINUXFAMILY}-${BRANCH}" - declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching. - declare -g KERNELBRANCH="branch:linux-6.1.y" # Branch or tag to build from. It should match MAJOR_MINOR + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNELBRANCH="branch:linux-6.1.y" # Branch or tag to build from. It should match MAJOR_MINOR declare -g KERNELPATCHDIR="uefi-${LINUXFAMILY}-${BRANCH}" # Might be empty. ;; @@ -40,8 +40,8 @@ case "${BRANCH}" in declare -g DISTRO_GENERIC_KERNEL=no declare -g LINUXCONFIG="linux-uefi-${LINUXFAMILY}-${BRANCH}" - declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. For mainline caching. - declare -g KERNELBRANCH="branch:linux-6.2.y" # Branch or tag to build from. It should match MAJOR_MINOR + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. For mainline caching. + declare -g KERNELBRANCH="branch:linux-6.2.y" # Branch or tag to build from. It should match MAJOR_MINOR declare -g KERNELPATCHDIR="uefi-${LINUXFAMILY}-${BRANCH}" # Might be empty. ;; esac diff --git a/config/sources/families/media.conf b/config/sources/families/media.conf index b976de9b9a..4cb81b1f10 100644 --- a/config/sources/families/media.conf +++ b/config/sources/families/media.conf @@ -38,7 +38,7 @@ case $BRANCH in if [[ $BOARD == station-p2 || $BOARD == station-m2 || $BOARD == bananapir2pro ]]; then KERNELSOURCE='https://github.com/150balbes/rockchip-kernel' - export KERNEL_MAJOR_MINOR="4.19" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.19" # Major and minor versions of this kernel. KERNELBRANCH='branch:kernel-4.19' KERNELPATCHDIR='station-p2-'$BRANCH LINUXFAMILY=station-p2 @@ -48,7 +48,7 @@ case $BRANCH in elif [[ $BOARD == jetson-nano ]]; then KERNELDIR='linux-nano' KERNELSOURCE='https://github.com/150balbes/Jetson-Nano' - export KERNEL_MAJOR_MINOR="4.9" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.9" # Major and minor versions of this kernel. KERNELBRANCH='branch:4.9.201' KERNELPATCHDIR='jetson-nano-'$BRANCH LINUXFAMILY=jetson-nano @@ -59,7 +59,7 @@ case $BRANCH in MODULES_INITRD="jetson-nano-legacy" else KERNELSOURCE='https://github.com/150balbes/rockchip-kernel' - export KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel. KERNELBRANCH='branch:kernel-5.10' LINUXFAMILY=media LINUXCONFIG='linux-media-'$BRANCH @@ -68,7 +68,7 @@ case $BRANCH in ;; current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH="branch:linux-6.1.y" LINUXCONFIG='linux-media-'$BRANCH KERNELPATCHDIR='media-'$BRANCH @@ -76,7 +76,7 @@ case $BRANCH in ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. KERNELBRANCH="branch:linux-6.2.y" KERNELPATCHDIR='media-'$BRANCH LINUXFAMILY=media diff --git a/config/sources/families/mt7623.conf b/config/sources/families/mt7623.conf index 7773dadd31..81495c97f0 100644 --- a/config/sources/families/mt7623.conf +++ b/config/sources/families/mt7623.conf @@ -17,7 +17,7 @@ case $BRANCH in legacy) - export KERNEL_MAJOR_MINOR="4.19" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.19" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-4.19.y' ;; diff --git a/config/sources/families/mvebu.conf b/config/sources/families/mvebu.conf index 2af87c5730..f3d3afeb75 100644 --- a/config/sources/families/mvebu.conf +++ b/config/sources/families/mvebu.conf @@ -20,14 +20,14 @@ case $BRANCH in current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.1.y' ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.2.y' LINUXCONFIG='linux-mvebu-edge' diff --git a/config/sources/families/mvebu64.conf b/config/sources/families/mvebu64.conf index 0a0abb6613..354058629a 100644 --- a/config/sources/families/mvebu64.conf +++ b/config/sources/families/mvebu64.conf @@ -17,7 +17,7 @@ enable_extension "c-plus-plus-compiler" # This is only used for non-Docker, since the Docker image already has it, since it includes compilers for all architectures. function add_host_dependencies__mvebu64_add_32_bit_c_compiler() { display_alert "Adding armhf C compiler to host dependencies" "for mvebu64 BLx compile" "debug" - export EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} gcc-arm-linux-gnueabi" # @TODO: convert to array later + declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} gcc-arm-linux-gnueabi" # @TODO: convert to array later } ARCH=arm64 @@ -37,7 +37,7 @@ else fi if [[ $BOARD = macchiatobin-doubleshot ]]; then - export SCP_BL2=$SRC/cache/sources/marvell-binaries/mrvl_scp_bl2.img + declare -g SCP_BL2=$SRC/cache/sources/marvell-binaries/mrvl_scp_bl2.img ATF_TARGET_MAP="USE_COHERENT_MEM=0 LOG_LEVEL=20 MV_DDR_PATH=$SRC/cache/sources/marvell-ddr SECURE=0 PLAT=a80x0_mcbin;;build/a80x0_mcbin/release/bl31.bin" UBOOT_TARGET_MAP="DEVICE_TREE=armada-8040-mcbin ;;flash-image.bin" @@ -56,13 +56,13 @@ case $BRANCH in current) - export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-5.15.y' ;; edge) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.1.y' ;; @@ -102,14 +102,14 @@ family_tweaks_bsp() { atf_custom_postprocess() { # prepare compilers for postprocess ubootdir="$SRC/cache/sources/u-boot-worktree/$BOOTDIR/${BOOTBRANCH##*:}" - export ATF1=$toolchain/$ATF_COMPILER + declare -g ATF1=$toolchain/$ATF_COMPILER if [[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]]; then - export TOOLCHAIN_NAME="arm-linux-gnueabi-" + declare -g TOOLCHAIN_NAME="arm-linux-gnueabi-" else - export TOOLCHAIN_NAME="arm-none-linux-gnueabihf-" + declare -g TOOLCHAIN_NAME="arm-none-linux-gnueabihf-" fi - export ATF2=$(find_toolchain "$TOOLCHAIN_NAME" "> 10.0")/$TOOLCHAIN_NAME - export BL33=$ubootdir"/u-boot.bin" + declare -g ATF2=$(find_toolchain "$TOOLCHAIN_NAME" "> 10.0")/$TOOLCHAIN_NAME + declare -g BL33=$ubootdir"/u-boot.bin" } uboot_custom_postprocess() { diff --git a/config/sources/families/odroidxu4.conf b/config/sources/families/odroidxu4.conf index fe858022a7..aeb9ded536 100644 --- a/config/sources/families/odroidxu4.conf +++ b/config/sources/families/odroidxu4.conf @@ -26,7 +26,7 @@ case $BRANCH in ;; edge) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.1.y' KERNELDIR='linux-odroidxu4' ;; diff --git a/config/sources/families/rk322x.conf b/config/sources/families/rk322x.conf index 064cd74d86..12bc03e88b 100644 --- a/config/sources/families/rk322x.conf +++ b/config/sources/families/rk322x.conf @@ -21,7 +21,7 @@ case $BRANCH in legacy) KERNELSOURCE='https://github.com/armbian/linux' - export KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. KERNELBRANCH='branch:stable-4.4-rk3288-linux-v2.x' KERNELDIR='linux-rockchip' @@ -29,14 +29,14 @@ case $BRANCH in current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.1.y' ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.2.y' ;; diff --git a/config/sources/families/rk3399.conf b/config/sources/families/rk3399.conf index 37ce606f75..e2aaf05438 100644 --- a/config/sources/families/rk3399.conf +++ b/config/sources/families/rk3399.conf @@ -13,7 +13,7 @@ case $BRANCH in legacy) KERNELSOURCE='https://github.com/friendlyarm/kernel-rockchip' - export KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. KERNELBRANCH='branch:nanopi4-linux-v4.4.y' KERNELDIR='linux-rockchip64' KERNELCONFIG='linux-rockchip64' diff --git a/config/sources/families/rk3568-odroid.conf b/config/sources/families/rk3568-odroid.conf index a38c420594..d484e72d30 100644 --- a/config/sources/families/rk3568-odroid.conf +++ b/config/sources/families/rk3568-odroid.conf @@ -22,7 +22,7 @@ SKIP_BOOTSPLASH="yes" case $BRANCH in edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel (for armbian-next) + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel (for armbian-next) KERNELBRANCH='branch:linux-6.2.y' KERNELPATCHDIR='archive/odroidm1-6.2' # Empty! Look ma, pure mainline! ;; diff --git a/config/sources/families/rk35xx.conf b/config/sources/families/rk35xx.conf index 5f63546c31..57880925f6 100644 --- a/config/sources/families/rk35xx.conf +++ b/config/sources/families/rk35xx.conf @@ -21,7 +21,7 @@ case $BRANCH in BOOTDIR='u-boot-rockchip64' KERNELSOURCE='https://github.com/armbian/linux-rockchip.git' KERNELBRANCH='branch:rockchip-5.10' - export KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel. KERNELDIR='linux-rockchip64' KERNELPATCHDIR='rk35xx-legacy' diff --git a/config/sources/families/rockchip-rk3588.conf b/config/sources/families/rockchip-rk3588.conf index 692869f25a..169cbd62c7 100644 --- a/config/sources/families/rockchip-rk3588.conf +++ b/config/sources/families/rockchip-rk3588.conf @@ -22,7 +22,7 @@ case $BRANCH in BOOTDIR='u-boot-rockchip64' KERNELDIR='linux-rockchip64' KERNELSOURCE='https://github.com/armbian/linux-rockchip' - export KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel. KERNELBRANCH='branch:rockchip-5.10' KERNELPATCHDIR='rockchip-rk3588-legacy' ;; diff --git a/config/sources/families/rockchip.conf b/config/sources/families/rockchip.conf index 35ad7e5d21..ac190bb394 100644 --- a/config/sources/families/rockchip.conf +++ b/config/sources/families/rockchip.conf @@ -28,7 +28,7 @@ case $BRANCH in legacy) KERNELSOURCE='https://github.com/armbian/linux' - export KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. KERNELBRANCH='branch:stable-4.4-rk3288-linux' KERNELDIR='linux-rockchip' @@ -36,14 +36,14 @@ case $BRANCH in current) - export KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.1.y' ;; edge) - export KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="6.2" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-6.2.y' ;; diff --git a/config/sources/families/rockchip64.conf b/config/sources/families/rockchip64.conf index fbf0a1f80c..32125763f3 100644 --- a/config/sources/families/rockchip64.conf +++ b/config/sources/families/rockchip64.conf @@ -13,7 +13,7 @@ case $BRANCH in legacy) KERNELDIR='linux-rockchip64' KERNELSOURCE='https://github.com/ayufan-rock64/linux-kernel' - export KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. KERNELBRANCH='tag:4.4.202-1237-rockchip-ayufan' KERNELPATCHDIR='rockchip64-'$BRANCH ;; diff --git a/config/sources/families/rockpis.conf b/config/sources/families/rockpis.conf index ce6e93d71c..13539cea3c 100644 --- a/config/sources/families/rockpis.conf +++ b/config/sources/families/rockpis.conf @@ -42,7 +42,7 @@ case $BRANCH in UBOOT_USE_GCC='< 8.0' BOOTDIR='u-boot-rockchip64' KERNELSOURCE='https://github.com/piter75/rockchip-kernel' - export KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.4" # Major and minor versions of this kernel. KERNELBRANCH='branch:rockpis-develop-4.4' KERNELDIR='linux-rockchip64' unset IDBLOADER_BLOB diff --git a/config/sources/families/s5p6818.conf b/config/sources/families/s5p6818.conf index 6c4bea2f13..47c47f5b89 100644 --- a/config/sources/families/s5p6818.conf +++ b/config/sources/families/s5p6818.conf @@ -18,7 +18,7 @@ ATF_COMPILE="no" case $BRANCH in legacy | current) KERNELSOURCE='https://github.com/armbian/linux' - export KERNEL_MAJOR_MINOR="4.14" # Major and minor versions of this kernel. See https://github.com/armbian/linux/blob/s5p6818/Makefile + declare -g KERNEL_MAJOR_MINOR="4.14" # Major and minor versions of this kernel. See https://github.com/armbian/linux/blob/s5p6818/Makefile KERNELBRANCH='branch:s5p6818' KERNELDIR='linux-mainline' ;; diff --git a/config/sources/families/sun50iw9.conf b/config/sources/families/sun50iw9.conf index d2a3691604..22fd691f64 100644 --- a/config/sources/families/sun50iw9.conf +++ b/config/sources/families/sun50iw9.conf @@ -18,7 +18,7 @@ case $BRANCH in LINUXFAMILY=sun50iw9 KERNELSOURCE='https://github.com/orangepi-xunlong/linux-orangepi.git' - export KERNEL_MAJOR_MINOR="4.9" # Major and minor versions of this kernel. + declare -g KERNEL_MAJOR_MINOR="4.9" # Major and minor versions of this kernel. KERNELBRANCH="branch:orange-pi-4.9-sun50iw9" KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH} KERNELDIR='linux-orangepi' @@ -85,7 +85,7 @@ family_tweaks_bsp() { uboot_custom_postprocess() { if [[ ${BRANCH} == legacy ]]; then - export PATH=$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH + declare -g PATH=$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH cp ${SRC}/packages/pack-uboot/${BOARDFAMILY}/bin/* . -r cp sys_config/sys_config_${BOARD}.fex sys_config.fex cp u-boot.bin u-boot.fex diff --git a/config/sources/families/uefi-arm64.conf b/config/sources/families/uefi-arm64.conf index 43227b06fb..a38d5496fe 100644 --- a/config/sources/families/uefi-arm64.conf +++ b/config/sources/families/uefi-arm64.conf @@ -7,7 +7,7 @@ # https://github.com/armbian/build/ # # Important: LINUXFAMILY and ARCH are defined _before_ including the common family include -export LINUXFAMILY="arm64" -export ARCH="arm64" +declare -g LINUXFAMILY="arm64" +declare -g ARCH="arm64" source "${BASH_SOURCE%/*}/include/uefi_common.inc" enable_extension "grub" diff --git a/config/sources/families/uefi-riscv64.conf b/config/sources/families/uefi-riscv64.conf index 0b64c46f3b..2b15ea0469 100644 --- a/config/sources/families/uefi-riscv64.conf +++ b/config/sources/families/uefi-riscv64.conf @@ -7,9 +7,9 @@ # https://github.com/armbian/build/ # # Important: LINUXFAMILY and ARCH are defined _before_ including the common family include -export UBOOT_USE_GCC="none" -export UEFI_GRUB_TERMINAL="gfxterm" -export LINUXFAMILY="riscv64" -export ARCH="riscv64" +declare -g UBOOT_USE_GCC="none" +declare -g UEFI_GRUB_TERMINAL="gfxterm" +declare -g LINUXFAMILY="riscv64" +declare -g ARCH="riscv64" source "${BASH_SOURCE%/*}/include/uefi_common.inc" enable_extension "grub-riscv64" diff --git a/config/sources/families/uefi-x86.conf b/config/sources/families/uefi-x86.conf index 468001f054..6c0aba2d2f 100644 --- a/config/sources/families/uefi-x86.conf +++ b/config/sources/families/uefi-x86.conf @@ -8,8 +8,8 @@ # # Important: LINUXFAMILY and ARCH are defined _before_ including the common family include [[ "$BUILD_DESKTOP" == yes && "$RELEASE" == jammy ]] && enable_extension "nvidia" -export UEFI_GRUB_TERMINAL="gfxterm" -export LINUXFAMILY="x86" -export ARCH="amd64" +declare -g UEFI_GRUB_TERMINAL="gfxterm" +declare -g LINUXFAMILY="x86" +declare -g ARCH="amd64" source "${BASH_SOURCE%/*}/include/uefi_common.inc" enable_extension "grub" diff --git a/config/sources/families/virtual.conf b/config/sources/families/virtual.conf index c8e59121fc..10473b3dd4 100644 --- a/config/sources/families/virtual.conf +++ b/config/sources/families/virtual.conf @@ -8,7 +8,7 @@ # BOOTBRANCH='tag:v2021.04' -export KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. +declare -g KERNEL_MAJOR_MINOR="5.15" # Major and minor versions of this kernel. KERNELBRANCH='branch:linux-5.15.y' ARCH=arm64 diff --git a/config/sources/families/zynq.conf b/config/sources/families/zynq.conf index 7bd0a14190..153960c032 100644 --- a/config/sources/families/zynq.conf +++ b/config/sources/families/zynq.conf @@ -11,7 +11,7 @@ SERIALCON='ttyPS0' LINUXFAMILY=zynq KERNELSOURCE='https://github.com/Xilinx/linux-xlnx.git' -export KERNEL_MAJOR_MINOR="5.4" # Major and minor versions of this kernel. See https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2020.2/Makefile +declare -g KERNEL_MAJOR_MINOR="5.4" # Major and minor versions of this kernel. See https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2020.2/Makefile KERNELBRANCH='tag:xilinx-v2020.2' KERNELDIR='linux-xlnx' KERNELPATCHDIR='zynq-'$BRANCH diff --git a/config/sources/riscv64.conf b/config/sources/riscv64.conf index bb012a5a77..454b0a9710 100644 --- a/config/sources/riscv64.conf +++ b/config/sources/riscv64.conf @@ -8,16 +8,15 @@ # # 'common.conf' is already sourced when this arch is sourced. -export ARCH='riscv64' -export ARCHITECTURE='riscv' -export KERNEL_SRC_ARCH='riscv' -export QEMU_BINARY='qemu-riscv64-static' -export KERNEL_IMAGE_TYPE='Image' -export KERNEL_INSTALL_TYPE='install' -export NAME_KERNEL='Image' -export NAME_INITRD='uInitrd' -export IMAGE_PARTITION_TABLE='gpt' -export SKIP_EXTERNAL_TOOLCHAINS='yes' +declare -g ARCH='riscv64' +declare -g ARCHITECTURE='riscv' +declare -g KERNEL_SRC_ARCH='riscv' +declare -g QEMU_BINARY='qemu-riscv64-static' +declare -g NAME_KERNEL='Image' +declare -g NAME_INITRD='uInitrd' +declare -g KERNEL_IMAGE_TYPE='Image' +declare -g IMAGE_PARTITION_TABLE='gpt' +declare -g SKIP_EXTERNAL_TOOLCHAINS='yes' [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER='riscv64-linux-gnu-' [[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER='riscv64-linux-gnu-'