/
rockchip-rk3588.conf
107 lines (93 loc) · 4.36 KB
/
rockchip-rk3588.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# 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/
#
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
BOOTSOURCE='https://github.com/radxa/u-boot.git'
BOOTBRANCH='branch:next-dev-v2024.03'
BOOTPATCHDIR="legacy/u-boot-radxa-rk3588"
OVERLAY_PREFIX='rockchip-rk3588'
ROCKUSB_BLOB="rk35/rk3588_spl_loader_v1.08.111.bin"
case $BRANCH in
legacy)
BOOTSCRIPT='boot-rk3588-legacy.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-rkr6'
KERNELPATCHDIR='rk35xx-legacy'
LINUXFAMILY=rk35xx
;;
vendor)
BOOTSCRIPT='boot-rk3588-legacy.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-rkr1'
KERNELPATCHDIR='rk35xx-vendor-6.1'
LINUXFAMILY=rk35xx
;;
vendor-boogie-panthor)
BOOTSCRIPT='boot-rk3588-legacy.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/rpardini/armbian-linux-rockchip-rk3588.git'
KERNELBRANCH='branch:armbian-rk-6.1-rkr1-plus-boogie-panthor-v6' # which is armbian/linux-rockchip#rk-6.1-rkr1 as-of 2024-04-01 plus boogie's panthor-v6 patches picked
KERNELPATCHDIR='rk35xx-vendor-boogie-panthor-6.1'
LINUXFAMILY=rk35xx
KERNELCONFIG='linux-rk35xx-vendor-boogie-panthor'
# Extra overrides, full firmware for blobs, and oibaf for mainline mesa; amazingfated multimedia-only (not panfork)
SERIALCON="ttyFIQ0" # so that rockchip64_common's SERIALCON hook won't default it to ttyS2
BOARD_FIRMWARE_INSTALL="-full" # Install full firmware, for blob required for panthor - huge @TODO add blob to armbian-firmware
enable_extension "mesa-oibaf" # Enable OIBAF repo for mainline mesa
enable_extension "rk-multimedia-amazingfate" # for chromium, widevine (glibc) & multimedia - NOT panfork
;;
edge)
LINUXFAMILY=rockchip-rk3588
LINUXCONFIG='linux-rockchip-rk3588-'$BRANCH
KERNEL_MAJOR_MINOR="6.8" # Major and minor versions of this kernel.
KERNELPATCHDIR='rockchip-rk3588-edge'
;;
collabora)
# Collabora's rk3588, where the action is these days
LINUXFAMILY=rockchip-rk3588
LINUXCONFIG='linux-rockchip-rk3588-'$BRANCH
KERNEL_MAJOR_MINOR="6.9" # Major and minor versions of this kernel.
KERNELPATCHDIR='rockchip-rk3588-collabora'
KERNELSOURCE='https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux.git'
KERNELBRANCH='branch:rk3588' # Rolling kernel branch, will be rebased
KERNEL_DRIVERS_SKIP+=(driver_rtw88) # This is a custom kernel, while the rtw88 driver patching expects pure mainline
;;
esac
prepare_boot_configuration
function add_host_dependencies__collabora_kernel() {
[[ "${BRANCH}" != "collabora" ]] && return 0
display_alert "Extra deps for collabora kernels" "bsdextrautils" "debug"
export EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} bsdextrautils" # @TODO: convert to array later
}
family_tweaks_bsp() {
:
}
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" "Extra CFLAGS for vendor u-boot building with gcc 13+" "info"
uboot_cflags_array+=("-Wno-error=enum-int-mismatch")
fi
# orangepi u-boot wont' build with gcc 12 due to 'the comparison will always evaluate as ‘true’ for the address of ‘clk’ will never be NULL [-Werror=address]'
if [[ ${gcc_major_version} -ge 12 ]]; then
display_alert "$BOARD" "Extra CFLAGS for vendor u-boot building with gcc 12+" "info"
uboot_cflags_array+=("-Wno-error=address")
fi
return 0
}