aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
blob: c9ad84c248578cd93aeb368f064e58ecf08ca383 (plain)
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
# Rockchip RK3399 compiles some M0 firmware which requires an arm-none-eabi GCC
# toolchain
DEPENDS:append:rk3399 = " gcc-arm-none-eabi-native"

COMPATIBLE_MACHINE:append:rk3399 = "|rk3399"
COMPATIBLE_MACHINE:append:rk3328 = "|rk3328"
COMPATIBLE_MACHINE:append:px30 = "|px30"

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "\
    file://0001-dram-Fix-build-with-gcc-11.patch \
    file://0001-plat_macros.S-Use-compatible-.asciz-asm-directive.patch \
    file://0001-pmu-Do-not-mark-already-defined-functions-as-weak.patch \
"


# code bloats with clang and results in error below now
# | aarch64-yoe-linux-musl-ld: region `PMUSRAM' overflowed by 3928 bytes
# this needs fixing until then use gcc
TOOLCHAIN:rk3399 = "gcc"

fixup_baudrate() {
	:
}

fixup_baudrate:rk3399() {
	sed -i "s/#define RK3399_BAUDRATE\s\+.*/#define RK3399_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/rk3399/rk3399_def.h
}

fixup_baudrate:px30() {
	sed -i "s/#define PX30_BAUDRATE\s\+.*/#define PX30_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/px30/px30_def.h
}

do_patch[postfuncs] += "fixup_baudrate"