mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: remove source common.conf in arch configs; fix/protect against bash shortcircuits in arch configs
This commit is contained in:
@@ -1,50 +1,28 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2013-2021 Igor Pecovnik, igor.pecovnik@gma**.com
|
||||
#
|
||||
# This file is licensed under the terms of the GNU General Public
|
||||
# License version 2. This program is licensed "as is" without any
|
||||
# warranty of any kind, whether express or implied.
|
||||
#
|
||||
# This file is a part of the Armbian build script
|
||||
# https://github.com/armbian/build/
|
||||
# 'common.conf' is already sourced when this arch is sourced.
|
||||
|
||||
NAME_KERNEL="zImage"
|
||||
NAME_INITRD="uInitrd"
|
||||
MAIN_CMDLINE="rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian"
|
||||
INITRD_ARCH=arm
|
||||
QEMU_BINARY="qemu-arm-static"
|
||||
ARCHITECTURE=arm
|
||||
ARCH=armhf
|
||||
KERNEL_IMAGE_TYPE=Image
|
||||
CAN_BUILD_STRETCH=yes
|
||||
FAST_CREATE_IMAGE="yes"
|
||||
export ARCH='armhf'
|
||||
export ARCHITECTURE='arm'
|
||||
export QEMU_BINARY='qemu-arm-static'
|
||||
export NAME_KERNEL='zImage'
|
||||
export NAME_INITRD='uInitrd'
|
||||
export INITRD_ARCH='arm'
|
||||
export KERNEL_IMAGE_TYPE='Image'
|
||||
|
||||
if [ "$(uname -m)" = "aarch64" ]; then
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-linux-gnueabihf-"
|
||||
else
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-none-linux-gnueabihf-"
|
||||
fi
|
||||
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER='arm-linux-gnueabihf-'
|
||||
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
|
||||
[[ -z $BOOTSOURCE ]] && BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
||||
[[ -z $BOOTDIR ]] && BOOTDIR=$MAINLINE_UBOOT_DIR
|
||||
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2022.07'
|
||||
|
||||
if [ "$(uname -m)" = "aarch64" ]; then
|
||||
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
|
||||
[[ -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 $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
|
||||
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER='arm-none-linux-gnueabihf-'
|
||||
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2'
|
||||
fi
|
||||
[[ -z $KERNELDIR ]] && KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
[[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:linux-5.4.y'
|
||||
|
||||
## System toolchains don't have the -none- variant, remove it
|
||||
[[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]] && [[ "${UBOOT_COMPILER}" = *none* ]] && UBOOT_COMPILER="${UBOOT_COMPILER//-none-/-}"
|
||||
[[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]] && [[ "${ATF_COMPILER}" = *none* ]] && ATF_COMPILER="${ATF_COMPILER//-none-/-}"
|
||||
# System toolchains don't have the -none- variant, remove it
|
||||
[[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]] && UBOOT_COMPILER="${UBOOT_COMPILER//-none-/-}"
|
||||
[[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]] && ATF_COMPILER="${ATF_COMPILER//-none-/-}"
|
||||
|
||||
true # don't fail due to conditional above.
|
||||
true # make sure to exit with 0 status; this protects against shortcircuits etc above.
|
||||
|
||||
Reference in New Issue
Block a user