Skip to contentSkip to conversation

rockchip-rkbin: bump SRCREV

PATCH Superseded Trevor Woerner 2 participants 6 messages Jun 13, 2024 Arm Rockchip

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 rockchip-rkbin: bump SRCREV

Update to a newer release.

Boot tested on:
- rock-3a
- rock-5a
- rock-5b

---
v2 changes:
- added
- break out the SRCREV bump and make it applicable to all builds/boards

---
 recipes-bsp/rkbin/rockchip-rkbin_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-bsp/rkbin/rockchip-rkbin_git.bb +3 -3
index 7929c6ac3a10..f9724ddd5cd5 100644
@@ -3,7 +3,7 @@ LICENSE = "Proprietary"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=15faa4a01e7eb0f5d33f9f2bcc7bff62"
 
 SRC_URI = "git://github.com/rockchip-linux/rkbin;protocol=https;branch=master"
-SRCREV = "b4558da0860ca48bf1a571dd33ccba580b9abe23"
+SRCREV = "a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0"
 
 PROVIDES += "trusted-firmware-a"
 PROVIDES += "optee-os"
@@ -42,7 +42,7 @@ do_deploy:rk3568() {
 	# 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
+	install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.21.bin ${DEPLOYDIR}/ddr-rk3568.bin
 }
 
 do_deploy:rk3588s() {
@@ -51,7 +51,7 @@ do_deploy:rk3588s() {
 	# 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
+	install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin ${DEPLOYDIR}/ddr-rk3588.bin
 }
 
 do_deploy() {
Signature · 1 line
2.44.0.478.g7774cfed6261
#1 lore raw

PATCH v2 2/2 radxa-zero-3e: add

The Radxa ZERO 3e is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor, and rich interfaces.

http://radxa.com/products/zeros/zero3e/

tech specs:
- Rockchip RK3566 (4x Arm Cortex-A55 @ 1.6GHz)
- Arm Mali-G52-2EE (OpenGL ES 1.1/2.0/3.0/3.1/3.2, Vulkan 1.1, OpenCL 2.0)
- LPDDR4 RAM (1/2/3/8 GB)
- µSD
- GbE
- 1x USB 2.0 Type C OTG, 1x USB 3.0 Type C Host
- 1x µHDMI (1080p @ 60fps)
- 1x MIPI CSI camera port
- colour-coded 40-pin GPIO (uart, spi, i2c, pcm/i2s, pwm, gpio)
- 72mm x 30mm

NOTE: currently support for this board requires a U-Boot fork for the bootloader, and linux-next for the kernel. Support will probably come in linux kernel 6.11-ish, at which point U-Boot will then use that kernel's device tree which means U-Boot support will come after the release of whichever kernel includes support for this board.

---
v2 changes:
- copy the rk3568-based bl31/bl32 pieces to have rk3566-based names so the rest of the infrastructure works without tweaks
- uncomment/implement the "remove-non-rockchip-arch" kernel scc
- order/sort items
- cleanup/fixup the linux-torvalds-next kernel recipe:
- sort oe items based on the style guide
- remove vestigial bits
- use a commit id instead of a tag name
- update license string
- add DEFAULT_PREFERENCE=-1
- add COMPATIBLE_MACHINE

---
 README                                        |  1 +
 conf/machine/include/rk3566.inc               | 21 ++++++++++++++++++
 conf/machine/radxa-zero-3e.conf               | 12 ++++++++++
 recipes-bsp/rkbin/rockchip-rkbin_git.bb       | 12 ++++++++++
 recipes-bsp/u-boot/u-boot_%.bbappend          |  5 +++++
 .../linux/linux-torvalds-next_git.bb          | 22 +++++++++++++++++++
 6 files changed, 73 insertions(+)
 create mode 100644 conf/machine/include/rk3566.inc
 create mode 100644 conf/machine/radxa-zero-3e.conf
 create mode 100644 recipes-kernel/linux/linux-torvalds-next_git.bb
README +1 -0
index b21e92360dcc..a9a040a4308d 100644
@@ -40,6 +40,7 @@ Status of supported boards:
 		orangepi-5-plus
 		rock-3a
 		rock-4c-plus
+		radxa-zero-3e
 	builds:
 		marsboard-rk3066
 		radxarock
conf/machine/include/rk3566.inc new file +21 -0
new file mode 100644
index 000000000000..586d68806df6
@@ -0,0 +1,21 @@
+SOC_FAMILY = "rk3566"
+
+DEFAULTTUNE ?= "cortexa55"
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
+require conf/machine/include/rockchip-wic.inc
+
+KBUILD_DEFCONFIG ?= "defconfig"
+KERNEL_FEATURES:append:rk3566 = " 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"
conf/machine/radxa-zero-3e.conf new file +12 -0
new file mode 100644
index 000000000000..3a39d6c12a1f
@@ -0,0 +1,12 @@
+#@TYPE: Machine
+#@NAME: Radxa Zero 3E
+#@DESCRIPTION: The Radxa ZERO 3e is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor, and rich interfaces.
+#http://radxa.com/products/zeros/zero3e/
+
+require conf/machine/include/rk3566.inc
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-torvalds-next"
+KERNEL_DEVICETREE = "rockchip/rk3566-radxa-zero-3e.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+UBOOT_MACHINE = "radxa-zero-3-rk3566_defconfig"
recipes-bsp/rkbin/rockchip-rkbin_git.bb +12 -0
index f9724ddd5cd5..1b71414e27ca 100644
@@ -14,6 +14,7 @@ S = "${WORKDIR}/git"
 
 COMPATIBLE_MACHINE = "^$"
 COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3566 = "rk3566"
 COMPATIBLE_MACHINE:rk3568 = "rk3568"
 COMPATIBLE_MACHINE:rk3588s = "rk3588s"
 
@@ -36,6 +37,17 @@ do_deploy:rk3308() {
 	install -m 644 ${S}/bin/rk33/rk3308_ddr_589MHz_uart?_m0_v*.bin ${DEPLOYDIR}/ddr-rk3308.bin
 }
 
+# NOTE: the following are not typos
+#       the rk3566 uses the same bl31/2 as the rk3568
+do_deploy:rk3566() {
+	# Prebuilt TF-A
+	install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3566.elf
+	# Prebuilt OPTEE-OS
+	install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3566.bin
+	# Prebuilt U-Boot TPL (DDR init)
+	install -m 644 ${S}/bin/rk35/rk3566_ddr_1056MHz_v1.21.bin ${DEPLOYDIR}/ddr-rk3566.bin
+}
+
 do_deploy:rk3568() {
 	# Prebuilt TF-A
 	install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf
recipes-bsp/u-boot/u-boot_%.bbappend +5 -0
index 1f5f63459627..dca43d2a4de0 100644
@@ -2,6 +2,11 @@ require u-boot-rockchip.inc
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
+SRC_URI:radxa-zero-3e = "git://github.com/Kwiboo/u-boot-rockchip.git;protocol=https;branch=rk3xxx-2024.07;name=Kwiboo"
+SRC_URI[Kwiboo.sha256sum] = "5d102a658262f6d2d4ea0664fe58b77db4a9eb1ebc89dbd8d6f5e75c9e563810"
+SRCREV:radxa-zero-3e = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+SRCREV:radxa-zero-3e:rk-u-boot-env = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+
 SRC_URI:append:rk-u-boot-env = " file://rockchip-enable-environment-mmc.cfg"
 SRCREV:rk-u-boot-env = "cdfcc37428e06f4730ab9a17cc084eeb7676ea1a"
 
recipes-kernel/linux/linux-torvalds-next_git.bb new file +22 -0
new file mode 100644
index 000000000000..88916587e259
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-dev:"
+
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEFAULT_PREFERENCE = "-1"
+COMPATIBLE_MACHINE = ""
+COMPATIBLE_MACHINE:radxa-zero-3e = "radxa-zero-3e"
+
+LINUX_VERSION = "6.10-rc3"
+PV = "${LINUX_VERSION}+git${SRCPV}"
+SRC_URI = " \
+	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;protocol=https;branch=master \
+	file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta \
+	"
+SRCREV = "a957267fa7e9159d3d2ee1421359ebf228570c68"
+
+inherit kernel
+inherit kernel-yocto
+require recipes-kernel/linux/linux-yocto.inc
Signature · 1 line
2.44.0.478.g7774cfed6261
Reviewed-by Tested-by on v2 1/2
#4 lore raw
In reply to Trevor Woerner

Hi Trevor,

Quoted 30 lines · Trevor Woerner via lists.yoctoproject.org

Update to a newer release.

Boot tested on:
- rock-3a
- rock-5a
- rock-5b

---
v2 changes:
- added
- break out the SRCREV bump and make it applicable to all builds/boards

---
  recipes-bsp/rkbin/rockchip-rkbin_git.bb | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -1
index 7929c6ac3a10..f9724ddd5cd5 100644
@@ -3,7 +3,7 @@ LICENSE = "Proprietary"
  LIC_FILES_CHKSUM = "file://LICENSE;md5=15faa4a01e7eb0f5d33f9f2bcc7bff62"
 
  SRC_URI = "git://github.com/rockchip-linux/rkbin;protocol=https;branch=master"
-SRCREV = "b4558da0860ca48bf1a571dd33ccba580b9abe23"
+SRCREV = "a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0"
 
  PROVIDES += "trusted-firmware-a"
  PROVIDES += "optee-os"

recipes-bsp/rkbin/rockchip-rkbin_git.bb do_deploy:rk3568() { · line 45

Quoted 5 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -1
@@ -42,7 +42,7 @@ do_deploy:rk3568() {
  	# 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
+	install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.21.bin ${DEPLOYDIR}/ddr-rk3568.bin

What about using '*' like the others? e.g.

install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v*.bin ${DEPLOYDIR}/ddr-rk3568.bin

recipes-bsp/rkbin/rockchip-rkbin_git.bb do_deploy:rk3588s() { · line 54

Quoted 9 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -1
  }
 
  do_deploy:rk3588s() {
@@ -51,7 +51,7 @@ do_deploy:rk3588s() {
  	# 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
+	install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin ${DEPLOYDIR}/ddr-rk3588.bin

Same here, maybe we want to keep '*' in there?

It'd be nice to put in the commit log that the binary prefix changed in commit https://github.com/rockchip-linux/rkbin/commit/f02d10e468d8c783c45137d230ff33d42ca670b4 where they changed the frequency of LPDDR5 to 2400MHz to "improve stability" as justification in the commit log.

Otherwise, looks good to me.

Tested myself with master U-Boot on RK3588 Jaguar, compiled by hand outside of Yocto.

Thanks!
Quentin

#2 lore raw

Re: [yocto-patches] [meta-rockchip][PATCH v2 2/2] radxa-zero-3e: add

In reply to Trevor Woerner

Hi Trevor,

Quoted 54 lines · Trevor Woerner via lists.yoctoproject.org

The Radxa ZERO 3e is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor, and rich interfaces.

http://radxa.com/products/zeros/zero3e/

tech specs:
- Rockchip RK3566 (4x Arm Cortex-A55 @ 1.6GHz)
- Arm Mali-G52-2EE (OpenGL ES 1.1/2.0/3.0/3.1/3.2, Vulkan 1.1, OpenCL 2.0)
- LPDDR4 RAM (1/2/3/8 GB)
- µSD
- GbE
- 1x USB 2.0 Type C OTG, 1x USB 3.0 Type C Host
- 1x µHDMI (1080p @ 60fps)
- 1x MIPI CSI camera port
- colour-coded 40-pin GPIO (uart, spi, i2c, pcm/i2s, pwm, gpio)
- 72mm x 30mm

NOTE: currently support for this board requires a U-Boot fork for the bootloader, and linux-next for the kernel. Support will probably come in linux kernel 6.11-ish, at which point U-Boot will then use that kernel's device tree which means U-Boot support will come after the release of whichever kernel includes support for this board.

---
v2 changes:
- copy the rk3568-based bl31/bl32 pieces to have rk3566-based names so the rest of the infrastructure works without tweaks
- uncomment/implement the "remove-non-rockchip-arch" kernel scc
- order/sort items
- cleanup/fixup the linux-torvalds-next kernel recipe:
- sort oe items based on the style guide
- remove vestigial bits
- use a commit id instead of a tag name
- update license string
- add DEFAULT_PREFERENCE=-1
- add COMPATIBLE_MACHINE

---
  README                                        |  1 +
  conf/machine/include/rk3566.inc               | 21 ++++++++++++++++++
  conf/machine/radxa-zero-3e.conf               | 12 ++++++++++
  recipes-bsp/rkbin/rockchip-rkbin_git.bb       | 12 ++++++++++
  recipes-bsp/u-boot/u-boot_%.bbappend          |  5 +++++
  .../linux/linux-torvalds-next_git.bb          | 22 +++++++++++++++++++
  6 files changed, 73 insertions(+)

create mode 100644 conf/machine/include/rk3566.inc create mode 100644 conf/machine/radxa-zero-3e.conf create mode 100644 recipes-kernel/linux/linux-torvalds-next_git.bb

README +0 -0
index b21e92360dcc..a9a040a4308d 100644

README Status of supported boards: · line 43

Quoted 4 lines
README +1 -0
@@ -40,6 +40,7 @@ Status of supported boards:
  		orangepi-5-plus
  		rock-3a
  		rock-4c-plus
+		radxa-zero-3e

Maybe you want to order those alphabetically as well? (But they absolutely aren't right now, so maybe another commit or... never :) )

Quoted 63 lines
README +0 -0
  	builds:
  		marsboard-rk3066
  		radxarock
conf/machine/include/rk3566.inc new file +21 -0
new file mode 100644
index 000000000000..586d68806df6
@@ -0,0 +1,21 @@
+SOC_FAMILY = "rk3566"
+
+DEFAULTTUNE ?= "cortexa55"
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
+require conf/machine/include/rockchip-wic.inc
+
+KBUILD_DEFCONFIG ?= "defconfig"
+KERNEL_FEATURES:append:rk3566 = " 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"
conf/machine/radxa-zero-3e.conf new file +12 -0
new file mode 100644
index 000000000000..3a39d6c12a1f
@@ -0,0 +1,12 @@
+#@TYPE: Machine
+#@NAME: Radxa Zero 3E
+#@DESCRIPTION: The Radxa ZERO 3e is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor, and rich interfaces.
+#http://radxa.com/products/zeros/zero3e/
+
+require conf/machine/include/rk3566.inc
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-torvalds-next"
+KERNEL_DEVICETREE = "rockchip/rk3566-radxa-zero-3e.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+UBOOT_MACHINE = "radxa-zero-3-rk3566_defconfig"
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -0
index f9724ddd5cd5..1b71414e27ca 100644
@@ -14,6 +14,7 @@ S = "${WORKDIR}/git"
 
  COMPATIBLE_MACHINE = "^$"
  COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3566 = "rk3566"
  COMPATIBLE_MACHINE:rk3568 = "rk3568"
  COMPATIBLE_MACHINE:rk3588s = "rk3588s"
 
@@ -36,6 +37,17 @@ do_deploy:rk3308() {
  	install -m 644 ${S}/bin/rk33/rk3308_ddr_589MHz_uart?_m0_v*.bin ${DEPLOYDIR}/ddr-rk3308.bin
  }

recipes-bsp/rkbin/rockchip-rkbin_git.bb do_deploy:rk3308() { · line 48

Quoted 10 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +9 -0
 
+# NOTE: the following are not typos
+#       the rk3566 uses the same bl31/2 as the rk3568
+do_deploy:rk3566() {
+	# Prebuilt TF-A
+	install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3566.elf
+	# Prebuilt OPTEE-OS
+	install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3566.bin
+	# Prebuilt U-Boot TPL (DDR init)
+	install -m 644 ${S}/bin/rk35/rk3566_ddr_1056MHz_v1.21.bin ${DEPLOYDIR}/ddr-rk3566.bin

Here you could use '*' instead of the version, up to you.

Quoted 10 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +2 -0
+}
+
  do_deploy:rk3568() {
  	# Prebuilt TF-A
  	install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
index 1f5f63459627..dca43d2a4de0 100644

recipes-bsp/u-boot/u-boot_%.bbappend require u-boot-rockchip.inc · line 6

Quoted 5 lines
recipes-bsp/u-boot/u-boot_%.bbappend +2 -0
@@ -2,6 +2,11 @@ require u-boot-rockchip.inc
 
  FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
+SRC_URI:radxa-zero-3e = "git://github.com/Kwiboo/u-boot-rockchip.git;protocol=https;branch=rk3xxx-2024.07;name=Kwiboo"
+SRC_URI[Kwiboo.sha256sum] = "5d102a658262f6d2d4ea0664fe58b77db4a9eb1ebc89dbd8d6f5e75c9e563810"

Is this actually used? I thought the git fetcher could handle corruption on its own?

recipes-bsp/u-boot/u-boot_%.bbappend require u-boot-rockchip.inc · line 9

Quoted 3 lines
recipes-bsp/u-boot/u-boot_%.bbappend +3 -0
+SRCREV:radxa-zero-3e = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+SRCREV:radxa-zero-3e:rk-u-boot-env = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+

Still don't like that we share the same recipe for essentially different source code, but up to you.

Just being curious, did you check the generic-rk3568 defconfig in upstream U-Boot?

Quoted 9 lines
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
  SRC_URI:append:rk-u-boot-env = " file://rockchip-enable-environment-mmc.cfg"
  SRCREV:rk-u-boot-env = "cdfcc37428e06f4730ab9a17cc084eeb7676ea1a"
 
recipes-kernel/linux/linux-torvalds-next_git.bb new file +0 -0
new file mode 100644
index 000000000000..88916587e259

recipes-kernel/linux/linux-torvalds-next_git.bb line 9

Quoted 9 lines
recipes-kernel/linux/linux-torvalds-next_git.bb new file +9 -0
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-dev:"
+
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEFAULT_PREFERENCE = "-1"
+COMPATIBLE_MACHINE = ""

This doesn't work, I already made the same mistake some time ago in meta-rockchip :)

https://git.yoctoproject.org/meta-rockchip/commit/?id=36b07ec60c94eeeaa4866cc876bd6f7f8fd823e0

It needs to be "^$"

recipes-kernel/linux/linux-torvalds-next_git.bb line 17

Quoted 8 lines
recipes-kernel/linux/linux-torvalds-next_git.bb new file +8 -0
+COMPATIBLE_MACHINE:radxa-zero-3e = "radxa-zero-3e"
+
+LINUX_VERSION = "6.10-rc3"
+PV = "${LINUX_VERSION}+git${SRCPV}"
+SRC_URI = " \
+	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;protocol=https;branch=master \
+	file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta \
+	"

You could provide a comment here stating which linuix-next tag this commit is referring to.

Looks good to me otherwise,

Cheers,
Quentin

#5 lore raw
In reply to Quentin Schulz
Quoted 39 lines · Quentin Schulz via lists.yoctoproject.org

Hi Trevor,

Quoted 28 lines · Trevor Woerner via lists.yoctoproject.org

Update to a newer release.

Boot tested on:
- rock-3a
- rock-5a
- rock-5b

---
v2 changes:
- added
- break out the SRCREV bump and make it applicable to all builds/boards

---
  recipes-bsp/rkbin/rockchip-rkbin_git.bb | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -1
index 7929c6ac3a10..f9724ddd5cd5 100644
@@ -3,7 +3,7 @@ LICENSE = "Proprietary"
  LIC_FILES_CHKSUM = "file://LICENSE;md5=15faa4a01e7eb0f5d33f9f2bcc7bff62"
  SRC_URI = "git://github.com/rockchip-linux/rkbin;protocol=https;branch=master"
-SRCREV = "b4558da0860ca48bf1a571dd33ccba580b9abe23"
+SRCREV = "a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0"
  PROVIDES += "trusted-firmware-a"
  PROVIDES += "optee-os"

recipes-bsp/rkbin/rockchip-rkbin_git.bb do_deploy:rk3568() { · line 45

Quoted 5 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -1
@@ -42,7 +42,7 @@ do_deploy:rk3568() {
  	# 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
+	install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v1.21.bin ${DEPLOYDIR}/ddr-rk3568.bin

What about using '*' like the others? e.g.

Quoted 2 lines

install -m 644 ${S}/bin/rk35/rk3568_ddr_1560MHz_v*.bin ${DEPLOYDIR}/ddr-rk3568.bin

Wasn't it just yesterday you were advocating strongly *against* using tags for this exact same reason? (i.e. they can move)

These components won't change unless we do a SRCREV bump, and if we do a SRCREV bump I'd prefer to see which ones, specifically, change so they can be explicitly tested.

Quoted 11 lines

recipes-bsp/rkbin/rockchip-rkbin_git.bb do_deploy:rk3588s() { · line 54

Quoted 8 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -1
  }
  do_deploy:rk3588s() {
@@ -51,7 +51,7 @@ do_deploy:rk3588s() {
  	# 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
+	install -m 644 ${S}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin ${DEPLOYDIR}/ddr-rk3588.bin

Same here, maybe we want to keep '*' in there?

Quoted 4 lines

It'd be nice to put in the commit log that the binary prefix changed in
commit https://github.com/rockchip-linux/rkbin/commit/f02d10e468d8c783c45137d230ff33d42ca670b4
where they changed the frequency of LPDDR5 to 2400MHz to "improve stability"
as justification in the commit log.

Good idea.

Quoted 23 lines

Otherwise, looks good to me.

Tested myself with master U-Boot on RK3588 Jaguar, compiled by hand outside of Yocto.

U-Boot compilation

Thanks!
Quentin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#320): https://lists.yoctoproject.org/g/yocto-patches/message/320
Mute This Topic: https://lists.yoctoproject.org/mt/106651708/900817
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13168745/900817/63955952/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Re: [yocto-patches] [meta-rockchip][PATCH v2 2/2] radxa-zero-3e: add

In reply to Quentin Schulz
Quoted 186 lines · Quentin Schulz via lists.yoctoproject.org

Hi Trevor,

Quoted 54 lines · Trevor Woerner via lists.yoctoproject.org

The Radxa ZERO 3e is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor, and rich interfaces.

http://radxa.com/products/zeros/zero3e/

tech specs:
- Rockchip RK3566 (4x Arm Cortex-A55 @ 1.6GHz)
- Arm Mali-G52-2EE (OpenGL ES 1.1/2.0/3.0/3.1/3.2, Vulkan 1.1, OpenCL 2.0)
- LPDDR4 RAM (1/2/3/8 GB)
- µSD
- GbE
- 1x USB 2.0 Type C OTG, 1x USB 3.0 Type C Host
- 1x µHDMI (1080p @ 60fps)
- 1x MIPI CSI camera port
- colour-coded 40-pin GPIO (uart, spi, i2c, pcm/i2s, pwm, gpio)
- 72mm x 30mm

NOTE: currently support for this board requires a U-Boot fork for the bootloader, and linux-next for the kernel. Support will probably come in linux kernel 6.11-ish, at which point U-Boot will then use that kernel's device tree which means U-Boot support will come after the release of whichever kernel includes support for this board.

---
v2 changes:
- copy the rk3568-based bl31/bl32 pieces to have rk3566-based names so the rest of the infrastructure works without tweaks
- uncomment/implement the "remove-non-rockchip-arch" kernel scc
- order/sort items
- cleanup/fixup the linux-torvalds-next kernel recipe:
- sort oe items based on the style guide
- remove vestigial bits
- use a commit id instead of a tag name
- update license string
- add DEFAULT_PREFERENCE=-1
- add COMPATIBLE_MACHINE

---
  README                                        |  1 +
  conf/machine/include/rk3566.inc               | 21 ++++++++++++++++++
  conf/machine/radxa-zero-3e.conf               | 12 ++++++++++
  recipes-bsp/rkbin/rockchip-rkbin_git.bb       | 12 ++++++++++
  recipes-bsp/u-boot/u-boot_%.bbappend          |  5 +++++
  .../linux/linux-torvalds-next_git.bb          | 22 +++++++++++++++++++
  6 files changed, 73 insertions(+)

create mode 100644 conf/machine/include/rk3566.inc create mode 100644 conf/machine/radxa-zero-3e.conf create mode 100644 recipes-kernel/linux/linux-torvalds-next_git.bb

README +0 -0
index b21e92360dcc..a9a040a4308d 100644

README Status of supported boards: · line 43

Quoted 4 lines
README +1 -0
@@ -40,6 +40,7 @@ Status of supported boards:
  		orangepi-5-plus
  		rock-3a
  		rock-4c-plus
+		radxa-zero-3e

Maybe you want to order those alphabetically as well? (But they absolutely aren't right now, so maybe another commit or... never :) )

Quoted 60 lines
README +0 -0
  	builds:
  		marsboard-rk3066
  		radxarock
conf/machine/include/rk3566.inc new file +21 -0
new file mode 100644
index 000000000000..586d68806df6
@@ -0,0 +1,21 @@
+SOC_FAMILY = "rk3566"
+
+DEFAULTTUNE ?= "cortexa55"
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
+require conf/machine/include/rockchip-wic.inc
+
+KBUILD_DEFCONFIG ?= "defconfig"
+KERNEL_FEATURES:append:rk3566 = " 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"
conf/machine/radxa-zero-3e.conf new file +12 -0
new file mode 100644
index 000000000000..3a39d6c12a1f
@@ -0,0 +1,12 @@
+#@TYPE: Machine
+#@NAME: Radxa Zero 3E
+#@DESCRIPTION: The Radxa ZERO 3e is an ultra-small, high-performance single board computer based on the Rockchip RK3566, with a compact form factor, and rich interfaces.
+#http://radxa.com/products/zeros/zero3e/
+
+require conf/machine/include/rk3566.inc
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-torvalds-next"
+KERNEL_DEVICETREE = "rockchip/rk3566-radxa-zero-3e.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+UBOOT_MACHINE = "radxa-zero-3-rk3566_defconfig"
recipes-bsp/rkbin/rockchip-rkbin_git.bb +1 -0
index f9724ddd5cd5..1b71414e27ca 100644
@@ -14,6 +14,7 @@ S = "${WORKDIR}/git"
  COMPATIBLE_MACHINE = "^$"
  COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3566 = "rk3566"
  COMPATIBLE_MACHINE:rk3568 = "rk3568"
  COMPATIBLE_MACHINE:rk3588s = "rk3588s"
@@ -36,6 +37,17 @@ do_deploy:rk3308() {
  	install -m 644 ${S}/bin/rk33/rk3308_ddr_589MHz_uart?_m0_v*.bin ${DEPLOYDIR}/ddr-rk3308.bin

recipes-bsp/rkbin/rockchip-rkbin_git.bb do_deploy:rk3308() { · line 47

Quoted 10 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +9 -0
  }
+# NOTE: the following are not typos
+#       the rk3566 uses the same bl31/2 as the rk3568
+do_deploy:rk3566() {
+	# Prebuilt TF-A
+	install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3566.elf
+	# Prebuilt OPTEE-OS
+	install -m 644 ${S}/bin/rk35/rk3568_bl32_v*.bin ${DEPLOYDIR}/tee-rk3566.bin
+	# Prebuilt U-Boot TPL (DDR init)
+	install -m 644 ${S}/bin/rk35/rk3566_ddr_1056MHz_v1.21.bin ${DEPLOYDIR}/ddr-rk3566.bin

Here you could use '*' instead of the version, up to you.

recipes-bsp/u-boot/u-boot_%.bbappend require u-boot-rockchip.inc · line 4

Quoted 13 lines
recipes-bsp/rkbin/rockchip-rkbin_git.bb +2 -0
+}
+
  do_deploy:rk3568() {
  	# Prebuilt TF-A
  	install -m 644 ${S}/bin/rk35/rk3568_bl31_v*.elf ${DEPLOYDIR}/bl31-rk3568.elf
recipes-bsp/u-boot/u-boot_%.bbappend +2 -0
index 1f5f63459627..dca43d2a4de0 100644
@@ -2,6 +2,11 @@ require u-boot-rockchip.inc
  FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+SRC_URI:radxa-zero-3e = "git://github.com/Kwiboo/u-boot-rockchip.git;protocol=https;branch=rk3xxx-2024.07;name=Kwiboo"
+SRC_URI[Kwiboo.sha256sum] = "5d102a658262f6d2d4ea0664fe58b77db4a9eb1ebc89dbd8d6f5e75c9e563810"

Is this actually used? I thought the git fetcher could handle corruption on its own?

recipes-bsp/u-boot/u-boot_%.bbappend require u-boot-rockchip.inc · line 9

Quoted 3 lines
recipes-bsp/u-boot/u-boot_%.bbappend +3 -0
+SRCREV:radxa-zero-3e = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+SRCREV:radxa-zero-3e:rk-u-boot-env = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+

Still don't like that we share the same recipe for essentially different source code, but up to you.

Just being curious, did you check the generic-rk3568 defconfig in upstream U-Boot?

Quoted 8 lines
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
  SRC_URI:append:rk-u-boot-env = " file://rockchip-enable-environment-mmc.cfg"
  SRCREV:rk-u-boot-env = "cdfcc37428e06f4730ab9a17cc084eeb7676ea1a"
recipes-kernel/linux/linux-torvalds-next_git.bb new file +0 -0
new file mode 100644
index 000000000000..88916587e259

recipes-kernel/linux/linux-torvalds-next_git.bb line 9

Quoted 9 lines
recipes-kernel/linux/linux-torvalds-next_git.bb new file +9 -0
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-dev:"
+
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+DEFAULT_PREFERENCE = "-1"
+COMPATIBLE_MACHINE = ""

This doesn't work, I already made the same mistake some time ago in meta-rockchip :)

Quoted 3 lines

https://git.yoctoproject.org/meta-rockchip/commit/?id=36b07ec60c94eeeaa4866cc876bd6f7f8fd823e0

It needs to be "^$"

D'oh!

Quoted 12 lines

recipes-kernel/linux/linux-torvalds-next_git.bb line 17

Quoted 9 lines
recipes-kernel/linux/linux-torvalds-next_git.bb new file +8 -0
+COMPATIBLE_MACHINE:radxa-zero-3e = "radxa-zero-3e"
+
+LINUX_VERSION = "6.10-rc3"
+PV = "${LINUX_VERSION}+git${SRCPV}"
+SRC_URI = " \
+	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;protocol=https;branch=master \
+	file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta \
+	"

You could provide a comment here stating which linuix-next tag this commit is referring to.

Sounds good.

I'm going to send a v3 that also includes the radxa-zero-3w, which is very similar.

Quoted 15 lines

Looks good to me otherwise,

Cheers,
Quentin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#321): https://lists.yoctoproject.org/g/yocto-patches/message/321
Mute This Topic: https://lists.yoctoproject.org/mt/106651710/900817
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto-patches/leave/13168745/900817/63955952/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-