rk3588(s): add

Unfortunately the TF-A project does not currently have support for
the rk3588. Therefore, for the time-being, the only way to supply a
TPL/DDR-init for the rk3588 is to use the closed-source rkbin binaries
from Rockchip. If/when TF-A adds support for the rk3588 we can investigate
switching.

The rk3588 comes in two variants: rk3588 and rk3588s. The "s" option is a
stripped-down version of the rk3588. In the Linux kernel these two SoCs are
kept separate, with the rk3588 building on the rk3588s, so we've mimicked that
same behaviour here.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
[backported from f8af59dd7c ("rock-5b: add")]
[removed support for rock-5b since no decent linux-yocto support in kirkstone]
[removed KERNEL_FEATURES and kmeta since no decent linux-yocto support in kirkstone]
[renamed INIT_FIRMWARE_DEPENDS to ATF_DEPENDS]
[tested on downstream board with downstream kernel and u-boot]
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
This commit is contained in:
Trevor Woerner 2023-10-05 11:00:16 +02:00
parent 96bd90ed01
commit 3c7f532c2e
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,6 @@
MACHINEOVERRIDES =. "rk3588:"
# the rk3588s is a "stripped-down" version of the rk3588
# in the kernel's device-tree the rk3588 builds on top of the rk3588s
# so anything that is valid for the rk3588s is valid for the rk3588
require conf/machine/include/rk3588s.inc

View File

@ -0,0 +1,16 @@
MACHINEOVERRIDES =. "rk3588s:"
DEFAULTTUNE ?= "cortexa76-cortexa55-crypto"
require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc
require conf/machine/include/rockchip-defaults.inc
require conf/machine/include/rockchip-wic.inc
KBUILD_DEFCONFIG ?= "defconfig"
KERNEL_CLASSES = "kernel-fitimage"
KERNEL_IMAGETYPE = "fitImage"
PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin"
PREFERRED_PROVIDER_optee-os = "rockchip-rkbin"
UBOOT_SUFFIX ?= "itb"
UBOOT_ENTRYPOINT ?= "0x06000000"

View File

@ -0,0 +1,37 @@
DESCRIPTION = "Rockchip Firmware and Tool Binaries"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=15faa4a01e7eb0f5d33f9f2bcc7bff62"
SRC_URI = "git://github.com/rockchip-linux/rkbin;protocol=https;branch=master"
SRCREV = "b4558da0860ca48bf1a571dd33ccba580b9abe23"
PROVIDES += "trusted-firmware-a"
PROVIDES += "optee-os"
inherit bin_package deploy
S = "${WORKDIR}/git"
COMPATIBLE_MACHINE = ""
COMPATIBLE_MACHINE:rk3588s = "rk3588s"
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_install() {
# Nothing in this recipe is useful in a filesystem
:
}
PACKAGES = "${PN}"
ALLOW_EMPTY:${PN} = "1"
do_deploy() {
# Prebuilt TF-A
install -m 644 ${S}/bin/rk35/rk3588_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3588.elf
# Prebuilt OPTEE-OS
install -m 644 ${S}/bin/rk35/rk3588_bl32_v*.bin ${DEPLOYDIR}/tee-rk3588.bin
# Prebuilt U-Boot TPL (DDR init)
install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v*.bin ${DEPLOYDIR}/ddr-rk3588.bin
}
addtask deploy after do_install

View File

@ -7,6 +7,12 @@ do_compile:append:rock2-square () {
ATF_DEPENDS ??= ""
EXTRA_OEMAKE:append:rk3588s = " \
BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \
ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \
"
ATF_DEPENDS:rk3588s = " rockchip-rkbin:do_deploy"
EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
ATF_DEPENDS:rk3399 = " trusted-firmware-a:do_deploy"
EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"