Add initial RiscV support (#4387)

* Add initial RISCV support

* Add UEFI edge and current kernel configs

* Cleanup and adjust packages

* Those files were in wrong path

* Fix locations

* Ubuntu images built

* Remove Debian support as its too fragile

* Remove Pinta as it doesn't work under riscv

* Limitation is only for building images

* Remove obsolete switch

* Cleanup major arch config files

* Support for Docker building
This commit is contained in:
Igor Pečovnik
2022-11-06 20:33:11 +01:00
committed by GitHub
parent de26797423
commit 3e701a857a
40 changed files with 18552 additions and 96 deletions

View File

@@ -1,44 +1,29 @@
#!/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/
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"
# include common config options
source "${BASH_SOURCE%/*}/common.conf"
if [ "$(uname -m)" = "aarch64" ]; then
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-linux-gnueabihf-"
else
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-none-linux-gnueabihf-"
fi
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'
[[ -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="${UBOOT_COMPILER//-none-/-}"
[[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]] && ATF_COMPILER="${ATF_COMPILER//-none-/-}"