mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Only install gcc-or1k-bin package when building images with crust-firmware support
This commit is contained in:
32
config/sources/families/include/crust_firmware.inc
Normal file
32
config/sources/families/include/crust_firmware.inc
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
|
||||
#
|
||||
# This file is a part of the Armbian Build Framework
|
||||
# https://github.com/armbian/build/
|
||||
#
|
||||
declare -g CRUST_TARGET_MAP="scp;;build/scp/scp.bin"
|
||||
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTSOURCE ]] && CRUSTSOURCE='https://github.com/crust-firmware/crust'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTDIR ]] && CRUSTDIR='crust-sunxi-mainline'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTBRANCH ]] && CRUSTBRANCH='commit:c308a504853e7fdb47169796c9a832796410ece8'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUST_USE_GCC ]] && CRUST_USE_GCC='> 9.1.0'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUST_COMPILER ]] && CRUST_COMPILER='or1k-elf-'
|
||||
|
||||
# Apply crust patches if crust is enabled
|
||||
[[ -n "${CRUSTCONFIG}" ]] && BOOTPATCHDIR="${BOOTPATCHDIR} u-boot-sunxi-crust"
|
||||
|
||||
# complain about system not being supported for building crust image
|
||||
function add_host_dependencies__dont_try_to_build_crust_on_unsupported_systems() {
|
||||
if [[ -n "${CRUSTCONFIG}" ]] ; then
|
||||
if [[ -z $HOSTRELEASE || "bookworm sid jammy kinetic lunar vanessa vera" != *"$HOSTRELEASE"* ]] ; then
|
||||
if [[ $NO_HOST_RELEASE_CHECK == yes ]]; then
|
||||
display_alert "You are running on an unsupported system" "${HOSTRELEASE:-(unknown)}" "wrn"
|
||||
display_alert "Do not report any errors, warnings or other issues encountered beyond this point" "" "wrn"
|
||||
else
|
||||
exit_with_error "Unsupported build system for images with crust-firmware: '${HOSTRELEASE:-(unknown)}'"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -17,16 +17,8 @@ declare -g BOOTENV_FILE='sunxi.txt'
|
||||
UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-BINMAN_ALLOW_MISSING=1;;u-boot-sunxi-with-spl.bin}"
|
||||
declare -g BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
|
||||
declare -g LINUXFAMILY=sunxi64
|
||||
declare -g CRUST_TARGET_MAP="scp;;build/scp/scp.bin"
|
||||
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTSOURCE ]] && CRUSTSOURCE='https://github.com/crust-firmware/crust'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTDIR ]] && CRUSTDIR='crust-sunxi-mainline'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTBRANCH ]] && CRUSTBRANCH='commit:c308a504853e7fdb47169796c9a832796410ece8'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUST_USE_GCC ]] && CRUST_USE_GCC='> 9.1.0'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUST_COMPILER ]] && CRUST_COMPILER='or1k-elf-'
|
||||
|
||||
# Apply crust patches if crust is enabled
|
||||
[[ -n "${CRUSTCONFIG}" ]] && BOOTPATCHDIR="${BOOTPATCHDIR} u-boot-sunxi-crust"
|
||||
source "${BASH_SOURCE%/*}/crust_firmware.inc"
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
|
||||
@@ -18,16 +18,8 @@ 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
|
||||
declare -g CRUST_TARGET_MAP="scp;;build/scp/scp.bin"
|
||||
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTSOURCE ]] && CRUSTSOURCE='https://github.com/crust-firmware/crust'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTDIR ]] && CRUSTDIR='crust-sunxi-mainline'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUSTBRANCH ]] && CRUSTBRANCH='commit:c308a504853e7fdb47169796c9a832796410ece8'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUST_USE_GCC ]] && CRUST_USE_GCC='> 9.1.0'
|
||||
[[ -n "${CRUSTCONFIG}" && -z $CRUST_COMPILER ]] && CRUST_COMPILER='or1k-elf-'
|
||||
|
||||
# Apply crust patches if crust is enabled
|
||||
[[ -n "${CRUSTCONFIG}" ]] && BOOTPATCHDIR="${BOOTPATCHDIR} u-boot-sunxi-crust"
|
||||
source "${BASH_SOURCE%/*}/crust_firmware.inc"
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ function add_host_dependencies__sunxi_add_32_bit_c_compiler() {
|
||||
|
||||
# Install gcc-or1k-elf for crust compilation
|
||||
function add_host_dependencies__sunxi_add_or1k_c_compiler() {
|
||||
display_alert "Adding or1k C compiler to host dependencies" "for sunxi bootloader compile" "debug"
|
||||
declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} gcc-or1k-elf"
|
||||
if [[ -n "$HOSTRELEASE" && "bookworm sid jammy kinetic lunar vanessa vera" == *"$HOSTRELEASE"* ]] ; then
|
||||
display_alert "Adding or1k C compiler to host dependencies" "for sunxi bootloader compile" "debug"
|
||||
declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} gcc-or1k-elf"
|
||||
fi
|
||||
}
|
||||
|
||||
function fetch_sources_tools__sunxi_tools() {
|
||||
|
||||
Reference in New Issue
Block a user