From: Trevor Woerner <twoerner@gmail.com>
To: anthony.t.davies@gmail.com
Cc: yocto@lists.yoctoproject.org
Subject: Re: [meta-rockchip] [PATCH] Add support for the Radxa Rock-3a based on rk3568
Date: Thu, 5 Oct 2023 20:19:21 -0400 [thread overview]
Message-ID: <20231006001921.GA38163@localhost> (raw)
In-Reply-To: <20231005224543.1040062-1-anthony.t.davies@gmail.com>
On Fri 2023-10-06 @ 09:45:44 AM, anthony.t.davies@gmail.com wrote:
> From: Anthony Davies <anthony.t.davies@gmail.com>
>
> Added appropriate inc files and machine.conf
>
> Modified rockchip-rkbin_git.bb to allow machine overrides on
> do_deploy.
>
> I have tested this patch on my own rock-3a
This commit message is lacking. Take a look at some of the other commits
adding new machines and try to follow suit.
>
> Signed-off-by: Anthony Davies <anthony.t.davies@gmail.com>
> ---
> README | 1 +
> conf/machine/include/rk3568.inc | 17 ++++++++++
> conf/machine/rock-3a.conf | 12 +++++++
> recipes-bsp/rkbin/rockchip-rkbin_git.bb | 16 ++++++++-
> recipes-bsp/u-boot/u-boot%.bbappend | 43 ++++++++++++++++---------
> 5 files changed, 73 insertions(+), 16 deletions(-)
> create mode 100644 conf/machine/include/rk3568.inc
> create mode 100644 conf/machine/rock-3a.conf
>
> diff --git a/README b/README
> index 8104474..aa1c834 100644
> --- a/README
> +++ b/README
> @@ -30,6 +30,7 @@ Status of supported boards:
> vyasa-rk3288
> firefly-rk3288
> nanopi-r4s
> + rock-3a
> rock-5b
> nanopi-r2s
> builds:
> diff --git a/conf/machine/include/rk3568.inc b/conf/machine/include/rk3568.inc
> new file mode 100644
> index 0000000..5382b58
> --- /dev/null
> +++ b/conf/machine/include/rk3568.inc
> @@ -0,0 +1,17 @@
> +MACHINEOVERRIDES =. "rk3568:"
> +DEFAULTTUNE ?= "cortexa55"
> +
> +require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
> +require conf/machine/include/rockchip-defaults.inc
> +require conf/machine/include/rockchip-wic.inc
> +
> +KBUILD_DEFCONFIG ?= "defconfig"
> +KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"
> +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"
> diff --git a/conf/machine/rock-3a.conf b/conf/machine/rock-3a.conf
> new file mode 100644
> index 0000000..452bde0
> --- /dev/null
> +++ b/conf/machine/rock-3a.conf
> @@ -0,0 +1,12 @@
> +#@TYPE: Machine
> +#@NAME: Radxa Rock3a
> +#@DESCRIPTION: ROCK3 is a series of Rockchip RK3566/RK3568 based SBC(Single Board Computer) and Compute Module by Radxa.
> +#https://wiki.radxa.com/Rock3
> +
> +require conf/machine/include/rk3568.inc
> +
> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-dev"
> +KERNEL_DEVICETREE = "rockchip/rk3568-rock-3a.dtb"
> +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
> +
> +UBOOT_MACHINE = "rock-3a-rk3568_defconfig"
> diff --git a/recipes-bsp/rkbin/rockchip-rkbin_git.bb b/recipes-bsp/rkbin/rockchip-rkbin_git.bb
> index 7fefb01..273f394 100644
> --- a/recipes-bsp/rkbin/rockchip-rkbin_git.bb
> +++ b/recipes-bsp/rkbin/rockchip-rkbin_git.bb
> @@ -14,6 +14,7 @@ S = "${WORKDIR}/git"
>
> COMPATIBLE_MACHINE = ""
> COMPATIBLE_MACHINE:rk3588s = "rk3588s"
> +COMPATIBLE_MACHINE:rk3568 = "rk3568"
>
> PACKAGE_ARCH = "${MACHINE_ARCH}"
>
> @@ -25,7 +26,16 @@ do_install() {
> PACKAGES = "${PN}"
> ALLOW_EMPTY:${PN} = "1"
>
> -do_deploy() {
> +do_deploy:rk3568() {
> + # Prebuilt TF-A
> + install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf
> + # Prebuilt OPTEE-OS
> + install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3568.bin
> + # Prebuilt U-Boot TPL (DDR init)
> + install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin ${DEPLOYDIR}/ddr-rk3568.bin
> +}
> +
> +do_deploy:rk3588s() {
> # Prebuilt TF-A
> install -m 644 ${S}/bin/rk35/rk3588_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3588.elf
> # Prebuilt OPTEE-OS
> @@ -34,4 +44,8 @@ do_deploy() {
> install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v*.bin ${DEPLOYDIR}/ddr-rk3588.bin
> }
>
> +do_deploy() {
> +# Needed as a default perhaps a bb.fatal with a message saying an override needs to be set
> +}
> +
> addtask deploy after do_install
> diff --git a/recipes-bsp/u-boot/u-boot%.bbappend b/recipes-bsp/u-boot/u-boot%.bbappend
> index e79c471..5af86aa 100644
> --- a/recipes-bsp/u-boot/u-boot%.bbappend
> +++ b/recipes-bsp/u-boot/u-boot%.bbappend
> @@ -1,25 +1,38 @@
> +do_compile:append:rock2-square () {
> + # copy to default search path
> + if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
> + cp ${B}/spl/${SPL_BINARY} ${B}
> + fi
> +}
> +
> +DEPENDS:append:rock-pi-4 = " gnutls-native"
> # various machines require the pyelftools library for parsing dtb files
> DEPENDS:append = " python3-pyelftools-native"
> -DEPENDS:append:rock-pi-4 = " gnutls-native"
>
> -EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
> -EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"
> -EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
> +INIT_FIRMWARE_DEPENDS ??= ""
> +
> EXTRA_OEMAKE:append:rk3588s = " \
> BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \
> ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \
> "
> +INIT_FIRMWARE_DEPENDS:rk3588s = " rockchip-rkbin:do_deploy"
> +INIT_FIRMWARE_DEPENDS:rk3568 = " rockchip-rkbin:do_deploy"
>
> -INIT_FIRMWARE_DEPENDS ??= ""
> -INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"
> -INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy"
> +EXTRA_OEMAKE:append:rk3568 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3568.elf"
> +ATF_DEPENDS:append:rk3568 = " trusted-firmware-a:do_deploy"
> +EXTRA_OEMAKE:append:rk3568 = " ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3568.bin"
> +ATF_DEPENDS:append:rk3568 = " rockchip-rkbin:do_deploy"
> +
> +EXTRA_OEMAKE:append:rk3588s = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf"
> +ATF_DEPENDS:append:rk3588s = " trusted-firmware-a:do_deploy"
> +EXTRA_OEMAKE:append:rk3588s = " ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin"
> +ATF_DEPENDS:append:rk3588s = " rockchip-rkbin:do_deploy"
> +
> +EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
> INIT_FIRMWARE_DEPENDS:rk3399 = " trusted-firmware-a:do_deploy"
> -INIT_FIRMWARE_DEPENDS:rk3588s = " rockchip-rkbin:do_deploy"
> -do_compile[depends] .= "${INIT_FIRMWARE_DEPENDS}"
> +EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf"
> +INIT_FIRMWARE_DEPENDS:rk3328 = " trusted-firmware-a:do_deploy"
> +EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf"
> +INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"
>
> -do_compile:append:rock2-square () {
> - # copy to default search path
> - if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
> - cp ${B}/spl/${SPL_BINARY} ${B}
> - fi
> -}
> +do_compile[depends] .= "${INIT_FIRMWARE_DEPENDS}"
You need to rebase your patch on top of the latest master. This u-boot patch
is reverting the most recent changes in addition to adding your changes.
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-10-06 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 22:45 [meta-rockchip] [PATCH] Add support for the Radxa Rock-3a based on rk3568 anthony.t.davies
2023-10-06 0:19 ` Trevor Woerner [this message]
2023-10-06 23:29 ` Anthony Davies
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231006001921.GA38163@localhost \
--to=twoerner@gmail.com \
--cc=anthony.t.davies@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.