mirror of https://github.com/armbian/build.git
79 lines
2.8 KiB
Plaintext
79 lines
2.8 KiB
Plaintext
#
|
|
# 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/
|
|
#
|
|
# shellcheck source=config/sources/families/include/rockchip64_common.inc
|
|
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
|
|
|
|
BOOTSOURCE='https://github.com/radxa/u-boot.git'
|
|
BOOTBRANCH='branch:next-dev-v2024.10' # Always use same version as rk35xx, they share a patch dir
|
|
BOOTPATCHDIR="legacy/u-boot-radxa-rk35xx"
|
|
OVERLAY_PREFIX='rockchip-rk3588'
|
|
|
|
case $BRANCH in
|
|
|
|
legacy)
|
|
display_alert "WARNING: 'legacy' branch" "is deprecated and slated for removal. Please switch to another branch unless you know what you're doing :)" "wrn"
|
|
BOOTSCRIPT='boot-rk35xx.cmd:boot.cmd'
|
|
BOOTDIR='u-boot-rockchip64'
|
|
declare -g KERNEL_MAJOR_MINOR="5.10" # Major and minor versions of this kernel.
|
|
declare -g -i KERNEL_GIT_CACHE_TTL=120 # 2 minutes; this is a high-traffic repo
|
|
KERNELSOURCE='https://github.com/armbian/linux-rockchip.git'
|
|
KERNELBRANCH='branch:rk-5.10-rkr8'
|
|
KERNELPATCHDIR='rk35xx-legacy'
|
|
LINUXFAMILY=rk35xx
|
|
;;
|
|
|
|
vendor)
|
|
BOOTSCRIPT='boot-rk35xx.cmd:boot.cmd'
|
|
BOOTDIR='u-boot-rockchip64'
|
|
declare -g KERNEL_MAJOR_MINOR="6.1" # Major and minor versions of this kernel.
|
|
declare -g -i KERNEL_GIT_CACHE_TTL=120 # 2 minutes; this is a high-traffic repo
|
|
KERNELSOURCE='https://github.com/armbian/linux-rockchip.git'
|
|
KERNELBRANCH='branch:rk-6.1-rkr5.1'
|
|
KERNELPATCHDIR='rk35xx-vendor-6.1'
|
|
LINUXFAMILY=rk35xx
|
|
;;
|
|
esac
|
|
|
|
prepare_boot_configuration
|
|
|
|
pre_config_uboot_target__warn_modern_hosts() {
|
|
# Check if building Radxa U-Boot on a host other than Ubuntu Jammy
|
|
if [[ "${BOOTSOURCE}" == "https://github.com/radxa/u-boot.git" ]]; then
|
|
if [[ "${HOSTRELEASE}" != "jammy" ]]; then
|
|
display_alert "Building Rockchip BSP U-Boot from Radxa repository" "on Ubuntu ${HOSTRELEASE} (newer than Jammy) can lead to unintended bugs" "wrn"
|
|
fi
|
|
fi
|
|
}
|
|
|
|
family_tweaks_bsp() {
|
|
:
|
|
}
|
|
|
|
function extension_prepare_config__enable_mesa_vpu() {
|
|
# Auto-enable mesa-vpu for RK3588 GPU acceleration
|
|
enable_extension "mesa-vpu"
|
|
}
|
|
|
|
# Additional CFLAGS were previously needed to disable certain errors when building vendor U-Boot.
|
|
# This is now fixed in Radxa U-Boot sources, but left here (commented out) for reference in case new errors appear in the future.
|
|
|
|
# function post_config_uboot_target__downgrade_gcc_errors_to_warnings() {
|
|
# declare -i gcc_major_version=0
|
|
# gcc_major_version=$(gcc -dumpversion | cut -d. -f1)
|
|
# display_alert "$BOARD" "GCC major version: ${gcc_major_version}" "debug"
|
|
#
|
|
# # Rockchip/Radxa U-Boot wont' build with GCC 13 due to enum-int-mismatch
|
|
# if [[ ${gcc_major_version} -ge 13 ]]; then
|
|
# display_alert "$BOARD" "Adding extra CFLAGS to fix vendor U-Boot building with GCC 13+" "info"
|
|
# uboot_cflags_array+=("-Wno-error=enum-int-mismatch")
|
|
# fi
|
|
#
|
|
# return 0
|
|
# }
|