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

@@ -0,0 +1,4 @@
# riscv64 via UEFI for all UEFI-enabled boards
export BOARD_NAME="UEFI riscv64"
export BOARDFAMILY="uefi-riscv64"
export KERNEL_TARGET="current,edge"

View File

@@ -1,6 +1,5 @@
bc
chrony
cpufrequtils
debconf-utils
device-tree-compiler
dialog
@@ -9,7 +8,6 @@ figlet
fping
nala
ncurses-term
nocache
openssh-server
parted
psmisc

View File

@@ -2,7 +2,6 @@ cracklib-runtime
curl
htop
i2c-tools
iozone3
jq
libcrack2
lsof

View File

@@ -1,6 +1,5 @@
bc
chrony
cpufrequtils
debconf-utils
device-tree-compiler
dialog
@@ -8,7 +7,6 @@ fake-hwclock
figlet
fping
ncurses-term
nocache
openssh-server
parted
psmisc

View File

@@ -2,7 +2,6 @@ cracklib-runtime
curl
htop
i2c-tools
iozone3
jq
libcrack2
lsof

View File

@@ -1,6 +1,5 @@
bc
chrony
cpufrequtils
debconf-utils
device-tree-compiler
dialog
@@ -8,7 +7,6 @@ fake-hwclock
figlet
fping
ncurses-term
nocache
openssh-server
parted
psmisc

View File

@@ -2,7 +2,6 @@ cracklib-runtime
curl
htop
i2c-tools
iozone3
jq
libcrack2
lsof

View File

@@ -1,6 +1,5 @@
bc
chrony
cpufrequtils
debconf-utils
device-tree-compiler
dialog
@@ -8,7 +7,6 @@ fake-hwclock
figlet
fping
ncurses-term
nocache
openssh-server
parted
psmisc

View File

@@ -2,7 +2,6 @@ cracklib-runtime
curl
htop
i2c-tools
iozone3
jq
libcrack2
lsof

View File

@@ -1,6 +1,5 @@
bc
chrony
cpufrequtils
debconf-utils
device-tree-compiler
dialog
@@ -9,7 +8,6 @@ figlet
fping
nala
ncurses-term
nocache
openssh-server
parted
psmisc

View File

@@ -2,7 +2,6 @@ cracklib-runtime
curl
htop
i2c-tools
iozone3
jq
libcrack2
lsof

View File

@@ -106,7 +106,6 @@ pasystray
pavucontrol
pavucontrol-qt
pavumeter
pinta
policykit-1
policykit-desktop-privileges
printer-driver-all

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
gpiod
cpufrequtils
nocache

View File

@@ -0,0 +1,4 @@
box64
gpiod
cpufrequtils
nocache

View File

@@ -0,0 +1,4 @@
box86
gpiod
cpufrequtils
nocache

View File

@@ -1,16 +1,17 @@
export ARCH=amd64 # Debian name $(dpkg-architecture -qDEB_HOST_ARCH)
export ARCHITECTURE=x86_64 # "kernel" arch
export QEMU_BINARY="qemu-x86_64-static" # Hopefully you have this installed.
#!/bin/bash
# include common config options
source "${BASH_SOURCE%/*}/common.conf"
export ARCH='amd64' # Debian name $(dpkg-architecture -qDEB_HOST_ARCH)
export ARCHITECTURE='x86_64' # "kernel" arch
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_EXTRA_TARGETS="modules" # default is "modules dtb" but x86_64 has no DTB
#export INITRD_ARCH=amd64 # Used by u-boot for mkimage in initramfs. No u-boot for x86 yet.
export UBOOT_USE_GCC="none" # required by configuration.sh
# Default to mainline
[[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
export KERNEL_IMAGE_TYPE='bzImage' # Ubuntu Standard
export KERNEL_EXTRA_TARGETS='modules' # default is "modules dtb" but x86_64 has no DTB
export UBOOT_USE_GCC='none' # required by configuration.sh
if [[ "$(uname -m)" == "aarch64" ]]; then
# Explicitly disallow "reverse cross-compile". Go ask @the-Going why ;-)

View File

@@ -1,24 +1,19 @@
#!/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="Image"
NAME_INITRD="uInitrd"
MAIN_CMDLINE="rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian"
# include common config options
source "${BASH_SOURCE%/*}/common.conf"
export ARCH='arm64'
export ARCHITECTURE='arm64'
export QEMU_BINARY='qemu-aarch64-static'
export NAME_KERNEL='Image'
export NAME_INITRD='uInitrd'
export KERNEL_IMAGE_TYPE='Image'
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-"
[[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64
QEMU_BINARY="qemu-aarch64-static"
ARCHITECTURE=arm64
ARCH=arm64
KERNEL_IMAGE_TYPE=Image
CAN_BUILD_STRETCH=yes
FAST_CREATE_IMAGE="yes"
[[ -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-"
@@ -39,19 +34,6 @@ fi
[[ $ATF_COMPILE != "no" && -z $ATFBRANCH ]] && ATFBRANCH='commit:af220ebbe467aa580e6b9ba554676f78ffec930f'
[[ $ATF_COMPILE != "no" && -z $ATF_USE_GCC ]] && ATF_USE_GCC='> 8.0'
[[ -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'
[[ -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-/-}"
if [ "$(uname -m)" = "aarch64" ]; then
case "$(lsb_release -sc)" in
"bullseye" | "focal" | "hirsute" | "impish" | "jammy")
@@ -64,3 +46,7 @@ if [ "$(uname -m)" = "aarch64" ]; then
else
PKG_PREFIX=""
fi
# 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-/-}"

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-/-}"

View File

@@ -0,0 +1,14 @@
#!/bin/bash
export FAST_CREATE_IMAGE='yes'
export MAIN_CMDLINE='rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian'
# boot loader configuration
[[ -z $BOOTSOURCE ]] && export BOOTSOURCE="$MAINLINE_UBOOT_SOURCE"
[[ -z $BOOTDIR ]] && export BOOTDIR="$MAINLINE_UBOOT_DIR"
[[ -z $BOOTBRANCH ]] && export BOOTBRANCH='tag:v2022.10'
# 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'

View File

@@ -1,4 +1,3 @@
enable_extension "grub"
export SERIALCON="tty1" # Cant reasonably expect UEFI stuff to have a serial console. Customize if otherwise.
export SKIP_BOOTSPLASH="yes" # No splash.
export UEFI_GRUB_TIMEOUT=${UEFI_GRUB_TIMEOUT:-3} # Default 3-seconds timeout for GRUB menu.

View File

@@ -2,3 +2,4 @@
export LINUXFAMILY="arm64"
export ARCH="arm64"
source "${BASH_SOURCE%/*}/include/uefi_common.inc"
enable_extension "grub"

View File

@@ -0,0 +1,7 @@
# 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"
source "${BASH_SOURCE%/*}/include/uefi_common.inc"
enable_extension "grub-riscv64"

View File

@@ -4,3 +4,4 @@ export UEFI_GRUB_TERMINAL="gfxterm"
export LINUXFAMILY="x86"
export ARCH="amd64"
source "${BASH_SOURCE%/*}/include/uefi_common.inc"
enable_extension "grub"

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# include common config options
source "${BASH_SOURCE%/*}/common.conf"
export ARCH='riscv64'
export ARCHITECTURE='riscv'
export QEMU_BINARY='qemu-riscv64-static'
export NAME_KERNEL='Image'
export NAME_INITRD='uInitrd'
export KERNEL_IMAGE_TYPE='Image'
export IMAGE_PARTITION_TABLE='gpt'
export SKIP_EXTERNAL_TOOLCHAINS='yes'
[[ -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'

View File

@@ -59,6 +59,11 @@ uefi-x86 edge jammy cli
uefi-arm64 edge jammy cli beta yes
# uefi-riscv64
uefi-riscv64 current kinetic cli beta no
uefi-riscv64 edge kinetic cli beta yes
# OneCloud kernel only
onecloud current jammy cli beta no
onecloud edge jammy cli beta no

View File

@@ -53,6 +53,7 @@ RUN apt-get update \
flex \
gawk \
gcc-aarch64-linux-gnu \
gcc-riscv64-linux-gnu \
gcc-arm-linux-gnueabihf \
gcc-arm-linux-gnueabi \
gcc-arm-none-eabi \

136
extensions/grub-riscv64.sh Normal file
View File

@@ -0,0 +1,136 @@
# This runs *after* user_config. Don't change anything not coming from other variables or meant to be configured by the user.
function extension_prepare_config__prepare_grub-riscv64() {
display_alert "Prepare config" "${EXTENSION}" "info"
# Extension configuration defaults.
export DISTRO_GENERIC_KERNEL=${DISTRO_GENERIC_KERNEL:-no} # if yes, does not build our own kernel, instead, uses generic one from distro
export UEFI_GRUB_TERMINAL="${UEFI_GRUB_TERMINAL:-serial console}" # 'serial' forces grub menu on serial console. empty to not include
export UEFI_GRUB_DISABLE_OS_PROBER="${UEFI_GRUB_DISABLE_OS_PROBER:-}" # 'true' will disable os-probing, useful for SD cards.
export UEFI_GRUB_DISTRO_NAME="${UEFI_GRUB_DISTRO_NAME:-Armbian}" # Will be used on grub menu display
export UEFI_GRUB_TIMEOUT=${UEFI_GRUB_TIMEOUT:-0} # Small timeout by default
export UEFI_ENABLE_BIOS_AMD64="${UEFI_ENABLE_BIOS_AMD64:-no}" # Enable BIOS too if target is amd64
export UEFI_EXPORT_KERNEL_INITRD="${UEFI_EXPORT_KERNEL_INITRD:-no}" # Export kernel and initrd for direct kernel boot "kexec"
# User config overrides.
export BOOTCONFIG="none" # To try and convince lib/ to not build or install u-boot.
unset BOOTSOURCE # To try and convince lib/ to not build or install u-boot.
export IMAGE_PARTITION_TABLE="gpt" # GPT partition table is essential for many UEFI-like implementations, eg Apple+Intel stuff.
export UEFISIZE=256 # in MiB - grub EFI is tiny - but some EFI BIOSes ignore small too small EFI partitions
export BOOTSIZE=0 # No separate /boot when using UEFI.
export CLOUD_INIT_CONFIG_LOCATION="${CLOUD_INIT_CONFIG_LOCATION:-/boot/efi}" # use /boot/efi for cloud-init as default when using Grub.
export EXTRA_BSP_NAME="${EXTRA_BSP_NAME}-grub" # Unique bsp name.
export UEFI_GRUB_TARGET_BIOS="" # Target for BIOS GRUB install, set to i386-pc when UEFI_ENABLE_BIOS_AMD64=yes and target is amd64
export UEFI_GRUB_TARGET="riscv64-efi" # Default for x86_64
if [[ "${DISTRIBUTION}" == "Ubuntu" ]]; then
display_alert "Prepare config Ubuntu" "${EXTENSION}" "info"
local uefi_packages="efibootmgr efivar cloud-initramfs-growroot os-prober grub-efi-${ARCH}-bin grub-efi-${ARCH}"
elif [[ "${DISTRIBUTION}" == "Debian" && "${KERNEL_ONLY}" == "no" ]]; then
exit_with_error "${DISTRIBUTION} is not supported yet"
fi
DISTRO_KERNEL_PACKAGES=""
DISTRO_FIRMWARE_PACKAGES=""
export PACKAGE_LIST_BOARD="${PACKAGE_LIST_BOARD} ${DISTRO_FIRMWARE_PACKAGES} ${DISTRO_KERNEL_PACKAGES} ${uefi_packages}"
display_alert "Activating" "GRUB with SERIALCON=${SERIALCON}; timeout ${UEFI_GRUB_TIMEOUT}; BIOS=${UEFI_GRUB_TARGET_BIOS}" ""
}
pre_umount_final_image__install_grub() {
if [[ "${DISTRIBUTION}" == "Ubuntu" ]]; then
configure_grub
local chroot_target=$MOUNT
display_alert "Installing bootloader" "GRUB" "info"
# getting rid of the dtb package, if installed, is hard. for now just zap it, otherwise update-grub goes bananas
mkdir -p "$MOUNT"/boot/efi/dtb
cp -r "$MOUNT"/boot/dtb/* "$MOUNT"/boot/efi/dtb/
# add config to disable os-prober, otherwise image will have the host's other OSes boot entries.
cat <<- grubCfgFragHostSide >> "${MOUNT}"/etc/default/grub.d/99-armbian-host-side.cfg
GRUB_DISABLE_OS_PROBER=true
grubCfgFragHostSide
# copy Armbian GRUB wallpaper
mkdir -p "${MOUNT}"/usr/share/images/grub/
cp "${SRC}"/packages/blobs/splash/grub.png "${MOUNT}"/usr/share/images/grub/wallpaper.png
# Mount the chroot...
mount_chroot "$chroot_target/" # this already handles /boot/efi which is required for it to work.
sed -i 's,devicetree,echo,g' "$MOUNT"/etc/grub.d/10_linux >>"${DEST}"/"${LOG_SUBPATH}"/grub-n.log 2>&1
#cp -r $SRC/packages/blobs/jetson/boot.png "$MOUNT"/boot/grub
local install_grub_cmdline="sudo apt-get update; sudo apt-get install --reinstall grub; update-grub && grub-install --verbose --target=${UEFI_GRUB_TARGET} --no-nvram --removable"
display_alert "Installing GRUB EFI..." "${UEFI_GRUB_TARGET}" ""
chroot "$chroot_target" /bin/bash -c "$install_grub_cmdline" >>"$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || {
exit_with_error "${install_grub_cmdline} failed!"
}
# Remove host-side config.
rm -f "${MOUNT}"/etc/default/grub.d/99-armbian-host-side.cfg
local root_uuid
root_uuid=$(blkid -s UUID -o value "${LOOP}p2") # get the uuid of the root partition, this has been transposed
umount_chroot "$chroot_target/"
fi
}
pre_umount_final_image__900_export_kernel_and_initramfs() {
if [[ "${UEFI_EXPORT_KERNEL_INITRD}" == "yes" ]]; then
display_alert "Exporting Kernel and Initrd for" "kexec" "info"
# this writes to ${DESTIMG} directly, since debootstrap.sh will move them later.
# capture the $MOUNT/boot/vmlinuz and initrd and send it out ${DESTIMG}
cp "$MOUNT"/boot/vmlinuz-* "${DESTIMG}/${version}.kernel"
cp "$MOUNT"/boot/initrd.img-* "${DESTIMG}/${version}.initrd"
fi
}
configure_grub() {
[[ -n "$SERIALCON" ]] &&
GRUB_CMDLINE_LINUX_DEFAULT+=" console=${SERIALCON}"
[[ "$BOOT_LOGO" == "yes" || "$BOOT_LOGO" == "desktop" && "$BUILD_DESKTOP" == "yes" ]] &&
GRUB_CMDLINE_LINUX_DEFAULT+=" quiet splash plymouth.ignore-serial-consoles i915.force_probe=* loglevel=3" ||
GRUB_CMDLINE_LINUX_DEFAULT+=" splash=verbose i915.force_probe=*"
# Enable Armbian Wallpaper on GRUB
if [[ "${VENDOR}" == Armbian ]]; then
mkdir -p "${MOUNT}"/usr/share/desktop-base/
cat <<- grubWallpaper >> "${MOUNT}"/usr/share/desktop-base/grub_background.sh
WALLPAPER=/usr/share/images/grub/wallpaper.png
COLOR_NORMAL=white/black
COLOR_HIGHLIGHT=black/white
grubWallpaper
fi
display_alert "GRUB EFI kernel cmdline" "${GRUB_CMDLINE_LINUX_DEFAULT} distro=${UEFI_GRUB_DISTRO_NAME} timeout=${UEFI_GRUB_TIMEOUT}" ""
cat <<- grubCfgFrag >> "${MOUNT}"/etc/default/grub.d/98-armbian.cfg
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT}"
GRUB_TIMEOUT_STYLE=menu # Show the menu with Kernel options (Armbian or -generic)...
GRUB_TIMEOUT=${UEFI_GRUB_TIMEOUT} # ... for ${UEFI_GRUB_TIMEOUT} seconds, then boot the Armbian default.
GRUB_DISTRIBUTOR="${UEFI_GRUB_DISTRO_NAME}" # On GRUB menu will show up as "Armbian GNU/Linux" (will show up in some UEFI BIOS boot menu (F8?) as "armbian", not on others)
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD=keep
grubCfgFrag
if [[ "a${UEFI_GRUB_DISABLE_OS_PROBER}" != "a" ]]; then
cat <<- grubCfgFragHostSide >> "${MOUNT}"/etc/default/grub.d/98-armbian.cfg
GRUB_DISABLE_OS_PROBER=${UEFI_GRUB_DISABLE_OS_PROBER}
grubCfgFragHostSide
fi
if [[ "a${UEFI_GRUB_TERMINAL}" != "a" ]]; then
cat <<- grubCfgFragTerminal >> "${MOUNT}"/etc/default/grub.d/98-armbian.cfg
GRUB_TERMINAL="${UEFI_GRUB_TERMINAL}"
grubCfgFragTerminal
fi
}

View File

@@ -148,7 +148,6 @@ function do_main_configuration() {
[[ -z $OFFSET ]] && OFFSET=4 # offset to 1st partition (we use 4MiB boundaries by default)
ARCH=armhf
KERNEL_IMAGE_TYPE=zImage
CAN_BUILD_STRETCH=yes
ATF_COMPILE=yes
[[ -z $CRYPTROOT_SSH_UNLOCK ]] && CRYPTROOT_SSH_UNLOCK=yes
[[ -z $CRYPTROOT_SSH_UNLOCK_PORT ]] && CRYPTROOT_SSH_UNLOCK_PORT=2022

View File

@@ -47,6 +47,13 @@ prepare_host() {
hostdeps+=" distcc lib32ncurses-dev lib32stdc++6 libc6-i386"
grep -q i386 <(dpkg --print-foreign-architectures) || dpkg --add-architecture i386
if [[ $ARCH == "riscv64" ]]; then
hostdeps+=" gcc-riscv64-linux-gnu libncurses5-dev \
qtbase5-dev schedtool zstd debian-ports-archive-keyring"
fi
elif [[ $(dpkg --print-architecture) == arm64 ]]; then
hostdeps+=" gcc-arm-none-eabi libc6 libc6-amd64-cross qemu"