Skip to contentSkip to conversation

scarthgap update

PATCH In review Trevor Woerner 2 participants 15 messages Sep 9, 2024 – Sep 13, 2024 Arm Rockchip

lore
Share & tools
lore
#0 lore raw

cover scarthgap update

From: Trevor Woerner <[email protected]>

Update the scarthgap branch with all the relevant patches from master.

The scarthgap branch did not get the UNPACKDIR changes that went into master/styhead, therefore any patches that addressed that change were not picked, and any patches that added features with UNPACKDIR were modified to revert back to WORKDIR.

On master, it took a couple patches to get the radxa-zero-3{e|w} machine added and working fully (i.e. with the kernel tag). All these patches were squashed together into one "add radxa zero 3" patch.

The rename of the mesa bbappend patch is not required on scarthgap for reasons similar to the UNPACKDIR feature.

Boot tested with:
- nanopi-r2s
- radxa-zero-3e
- rock-3a
- rock-5a
- rock-pi-4b
- rock-pi-s

Marcin Bober (1):
mesa: build panfrost for RK3566 boards

Quentin Schulz (3):
mesa: enable lima on all rk3328 boards
mesa: build panfrost for RK3568 boards
enable HW VPU decoding for SoCs that have stateless VPUs

Trevor Woerner (6):
user-selectable wic compression
rockchip-rkbin: bump SRCREV
radxa-zero-3{e|w}: add
README: sort MACHINE names
rauc demo: add
linux-torvalds-next: bump to next-20240904

 README                                        | 108 ++++++++++++++----
 .../rk-rauc-demo-features-check.bbclass       |   4 +
 conf/layer.conf                               |   4 +
 conf/machine/include/px30.inc                 |   2 +
 conf/machine/include/radxa-zero-3.inc         |   8 ++
 conf/machine/include/rk3066.inc               |   2 +
 conf/machine/include/rk3188.inc               |   2 +
 conf/machine/include/rk3288.inc               |   2 +
 conf/machine/include/rk3328.inc               |   2 +
 conf/machine/include/rk3399.inc               |   2 +
 conf/machine/include/rk3566.inc               |  23 ++++
 conf/machine/include/rk3568.inc               |   2 +
 conf/machine/include/rk3588s.inc              |   2 +
 conf/machine/include/rockchip-rauc.inc        |   4 +
 conf/machine/include/rockchip-wic.inc         |   7 +-
 conf/machine/radxa-zero-3e.conf               |   7 ++
 conf/machine/radxa-zero-3w.conf               |   7 ++
 .../recipes-bsp/u-boot/files/boot.cmd.in      |  51 +++++++++
 .../recipes-bsp/u-boot/files/uboot-rauc.cfg   |   8 ++
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |  26 +++++
 .../base-files/base-files_%.bbappend          |   2 +
 .../recipes-core/base-files/files/fstab       |   5 +
 .../rauc-bundles/files/development-1.cert.pem |  80 +++++++++++++
 .../rauc-bundles/files/development-1.key.pem  |  28 +++++
 .../rauc-bundles/rockchip-rauc-bundle.bb      |  14 +++
 .../recipes-core/rauc/files/ca.cert.pem       |  80 +++++++++++++
 .../recipes-core/rauc/files/system.conf       |  17 +++
 .../recipes-core/rauc/rauc-conf.bbappend      |   7 ++
 .../recipes-core/systemd/abd-partition.bb     |  26 +++++
 .../systemd/files/25-rootfsA.conf             |   4 +
 .../systemd/files/35-rootfsB.conf             |   7 ++
 .../recipes-core/systemd/files/45-data.conf   |   6 +
 .../recipes-core/systemd/files/data.mount     |  10 ++
 .../recipes-core/systemd/systemd_%.bbappend   |   3 +
 .../linux/linux-torvalds-next_%.bbappend      |   1 +
 recipes-bsp/rkbin/rockchip-rkbin_git.bb       |  18 ++-
 recipes-bsp/u-boot/u-boot_%.bbappend          |   4 +
 recipes-graphics/mesa/mesa_%.bbappend         |   4 +-
 .../linux/linux-torvalds-next_git.bb          |  25 ++++
 .../gstreamer1.0-plugins-bad_%.bbappend       |   1 +
 40 files changed, 585 insertions(+), 30 deletions(-)
 create mode 100644 classes-recipe/rk-rauc-demo-features-check.bbclass
 create mode 100644 conf/machine/include/radxa-zero-3.inc
 create mode 100644 conf/machine/include/rk3566.inc
 create mode 100644 conf/machine/include/rockchip-rauc.inc
 create mode 100644 conf/machine/radxa-zero-3e.conf
 create mode 100644 conf/machine/radxa-zero-3w.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/files/boot.cmd.in
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/files/uboot-rauc.cfg
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/u-boot_%.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/base-files/base-files_%.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/base-files/files/fstab
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/files/development-1.cert.pem
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/files/development-1.key.pem
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/rockchip-rauc-bundle.bb
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc/files/ca.cert.pem
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc/files/system.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc/rauc-conf.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/abd-partition.bb
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/25-rootfsA.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/35-rootfsB.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/45-data.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/data.mount
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/systemd_%.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-kernel/linux/linux-torvalds-next_%.bbappend
 create mode 100644 recipes-kernel/linux/linux-torvalds-next_git.bb
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
Signature · 1 line
2.44.0.478.g7774cfed6261
#1 lore raw

PATCH 1/10 mesa: enable lima on all rk3328 boards

From: Quentin Schulz <[email protected]>

lima is the open-source implementation for the GPU found on RK3328, it is therefore not specific to the Rock64 but all boards based on the RK3328.

---
 recipes-graphics/mesa/mesa_%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-graphics/mesa/mesa_%.bbappend +1 -1
index 58c25e7d61bf..a31d99b5c65b 100644
@@ -1,4 +1,4 @@
 PACKAGECONFIG:append:rk3288 = " kmsro panfrost"
+PACKAGECONFIG:append:rk3328 = " kmsro lima"
 PACKAGECONFIG:append:rk3399 = " kmsro panfrost"
-PACKAGECONFIG:append:rock64 = " kmsro lima"
 PACKAGECONFIG:append:px30 = " kmsro panfrost"
Signature · 1 line
2.44.0.478.g7774cfed6261
#2 lore raw

PATCH 2/10 mesa: build panfrost for RK3568 boards

In reply to Trevor Woerner

From: Quentin Schulz <[email protected]>

The RK356x SoC family (of which we currently only support RK3568) has a Bifrost GPU that is supported by open-source Panfrost Linux kernel and Mesa drivers, therefore let's build mesa with Panfrost support for RK3568.

---
 recipes-graphics/mesa/mesa_%.bbappend | 1 +
 1 file changed, 1 insertion(+)
recipes-graphics/mesa/mesa_%.bbappend +1 -0
index a31d99b5c65b..2d9ec2e676f7 100644
@@ -1,4 +1,5 @@
 PACKAGECONFIG:append:rk3288 = " kmsro panfrost"
 PACKAGECONFIG:append:rk3328 = " kmsro lima"
 PACKAGECONFIG:append:rk3399 = " kmsro panfrost"
+PACKAGECONFIG:append:rk3568 = " kmsro panfrost"
 PACKAGECONFIG:append:px30 = " kmsro panfrost"
Signature · 1 line
2.44.0.478.g7774cfed6261
#3 lore raw

PATCH 3/10 user-selectable wic compression

In reply to Trevor Woerner

For boards which build and boot wic images, the user can optionally specify a compression using the WIC_COMPRESSION_EXTENSION variable. By default "wic" images are built, but if the user would prefer, say "wic.xz" images, simply specify:

WIC_COMPRESSION_EXTENSION = ".xz"

in the configuration (e.g. conf/local.conf).

---
 README                                | 11 +++++++++++
 conf/machine/include/rockchip-wic.inc |  5 ++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
README +11 -0
index 605773d4ecd3..b21e92360dcc 100644
@@ -47,6 +47,7 @@ Status of supported boards:
 
 Notes:
 -----
+  rk3308 rkbin:
 	The latest ddr initializer for the rk3308 platform does not output
 	diagnostic messages to uart0. This causes a bunch of gibberish to
 	be printed to the console window which only becomes legible once
@@ -67,6 +68,16 @@ Notes:
 	
 	in the configuration (e.g. conf/local.conf).
 
+  wic compression:
+	For boards which build and boot wic images, the user can optionally specify
+	a compression using the WIC_COMPRESSION_EXTENSION variable. By default "wic"
+	images are built, but if the user would prefer, say "wic.xz" images, simply
+	specify:
+
+		WIC_COMPRESSION_EXTENSION = ".xz"
+
+	in the configuration (e.g. conf/local.conf).
+
 U-Boot Environment:
 ------------------
 	In order to configure U-Boot to be able to store its environment into the
conf/machine/include/rockchip-wic.inc +4 -1
index dab61d83ed2c..ebfc0cb96507 100644
@@ -5,7 +5,10 @@ require conf/machine/include/rockchip-rk-u-boot-env.inc
 
 SPL_BINARY ?= "idbloader.img"
 
-IMAGE_FSTYPES += "wic wic.bmap"
+# if you use the following variable, make sure to add the '.' e.g.
+# WIC_COMPRESSION_EXTENSION = ".xz"
+WIC_COMPRESSION_EXTENSION ?= ""
+IMAGE_FSTYPES += "wic${WIC_COMPRESSION_EXTENSION} wic.bmap"
 WKS_FILE ?= "rockchip.wks"
 WKS_FILE_DEPENDS ?= " \
 	e2fsprogs-native \
Signature · 1 line
2.44.0.478.g7774cfed6261
#4 lore raw

PATCH 4/10 rockchip-rkbin: bump SRCREV

In reply to Trevor Woerner

Update to a newer release.

rk3568:
- update DDR init from version 1.18 → 1.21

rk3588/s:
- the name of the DDR init changed due to upstream adjusting the frequency of the LPDDR5 to 2400MHz to "improve stability" [1]
- reference an exact version instead of using an '*'
- update DDR init from version 1.12 → 1.16

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

Link [1]: https://github.com/rockchip-linux/rkbin/commit/f02d10e468d8c783c45137d230ff33d42ca670b4

---
 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
#5 lore raw

PATCH 5/10 radxa-zero-3{e|w}: add

In reply to Trevor Woerner

The Radxa ZERO 3{e|w} are ultra-small, high-performance single board computers based on the Rockchip RK3566, with a compact form factor, and rich interfaces.

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

common 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
- 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

Radxa ZERO 3e specific tech specs:
- GbE

Radxa ZERO 3w specific tech specs:
- optional onboard eMMC (8/16/32/64 GB)
- IEEE 802.11 b/g/n/ac/ax(WiFi6), BT5.4 with BLE

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.

---
 README                                        |  2 ++
 conf/machine/include/radxa-zero-3.inc         |  8 ++++++
 conf/machine/include/rk3566.inc               | 21 ++++++++++++++++
 conf/machine/radxa-zero-3e.conf               |  7 ++++++
 conf/machine/radxa-zero-3w.conf               |  7 ++++++
 recipes-bsp/rkbin/rockchip-rkbin_git.bb       | 12 +++++++++
 recipes-bsp/u-boot/u-boot_%.bbappend          |  4 +++
 .../linux/linux-torvalds-next_git.bb          | 25 +++++++++++++++++++
 8 files changed, 86 insertions(+)
 create mode 100644 conf/machine/include/radxa-zero-3.inc
 create mode 100644 conf/machine/include/rk3566.inc
 create mode 100644 conf/machine/radxa-zero-3e.conf
 create mode 100644 conf/machine/radxa-zero-3w.conf
 create mode 100644 recipes-kernel/linux/linux-torvalds-next_git.bb
README +2 -0
index b21e92360dcc..909840de2c0d 100644
@@ -40,6 +40,8 @@ Status of supported boards:
 		orangepi-5-plus
 		rock-3a
 		rock-4c-plus
+		radxa-zero-3e
+		radxa-zero-3w
 	builds:
 		marsboard-rk3066
 		radxarock
conf/machine/include/radxa-zero-3.inc new file +8 -0
new file mode 100644
index 000000000000..1c6f972c1e31
@@ -0,0 +1,8 @@
+MACHINEOVERRIDES =. "radxa-zero-3:"
+
+require conf/machine/include/rk3566.inc
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-torvalds-next"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+UBOOT_MACHINE = "radxa-zero-3-rk3566_defconfig"
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 +7 -0
new file mode 100644
index 000000000000..37792cbf36a5
@@ -0,0 +1,7 @@
+#@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/radxa-zero-3.inc
+KERNEL_DEVICETREE = "rockchip/rk3566-radxa-zero-3e.dtb"
conf/machine/radxa-zero-3w.conf new file +7 -0
new file mode 100644
index 000000000000..5193d45e1f69
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: Radxa Zero 3W
+#@DESCRIPTION: The Radxa ZERO 3w 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/zero3w/
+
+require conf/machine/include/radxa-zero-3.inc
+KERNEL_DEVICETREE = "rockchip/rk3566-radxa-zero-3w.dtb"
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 +4 -0
index 862ca1377692..c939a487d294 100644
@@ -2,6 +2,10 @@ require u-boot-rockchip.inc
 
 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
+SRC_URI:radxa-zero-3 = "git://github.com/Kwiboo/u-boot-rockchip.git;protocol=https;branch=rk3xxx-2024.07;name=Kwiboo"
+SRCREV:radxa-zero-3 = "8cdf606e616baa36751f3b4adcfaefc781126c8c"
+SRCREV:radxa-zero-3: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 +25 -0
new file mode 100644
index 000000000000..6f3db7c61bdf
@@ -0,0 +1,25 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto-dev:"
+
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+ERROR_QA:remove = "buildpaths"
+DEFAULT_PREFERENCE = "-1"
+COMPATIBLE_MACHINE = "^$"
+COMPATIBLE_MACHINE:radxa-zero-3 = "radxa-zero-3"
+
+LINUX_VERSION = "6.10-rc3"
+KERNEL_VERSION_SANITY_SKIP = "1"
+PV = "${LINUX_VERSION}+git${SRCPV}"
+SRC_URI = " \
+	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;protocol=https;nobranch=1 \
+	file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta \
+	"
+# this is tag 'next-20240611'
+SRCREV = "a957267fa7e9159d3d2ee1421359ebf228570c68"
+
+inherit kernel
+inherit kernel-yocto
+require recipes-kernel/linux/linux-yocto.inc
Signature · 1 line
2.44.0.478.g7774cfed6261
#6 lore raw

PATCH 6/10 README: sort MACHINE names

In reply to Trevor Woerner

Previously the MACHINEs were listed in the order in which they were added to the layer. Going forward, separate the list into 32 vs 64 bit, sort each of those groups, while distinguishing between which boards support wic and which don't.

---
 README | 59 +++++++++++++++++++++++++++++++---------------------------
 1 file changed, 32 insertions(+), 27 deletions(-)
README +32 -27
index 909840de2c0d..6003e7c652fe 100644
@@ -18,34 +18,39 @@ Dependencies:
 Status of supported boards:
 --------------------------
 	builds and boots wic image:
-		nanopi-m4
-		nanopi-m4-2gb
-		rock-pi-e
-		rock-pi-4a
-		rock-pi-4b
-		rock-pi-4c
-		rock64
-		tinker-board
-		tinker-board-s
-		vyasa-rk3288
-		firefly-rk3288
-		nanopi-r4s
-		rock-5b
-		nanopi-r2s
-		nanopi-m4b
-		rock-pi-s
-		rock-5a
-		roc-rk3328-cc
-		roc-rk3308-cc
-		orangepi-5-plus
-		rock-3a
-		rock-4c-plus
-		radxa-zero-3e
-		radxa-zero-3w
+		32-bit:
+			firefly-rk3288
+			tinker-board
+			tinker-board-s
+			vyasa-rk3288
+
+		64-bit:
+			nanopi-m4
+			nanopi-m4-2gb
+			nanopi-m4b
+			nanopi-r2s
+			nanopi-r4s
+			orangepi-5-plus
+			radxa-zero-3e
+			radxa-zero-3w
+			roc-rk3308-cc
+			roc-rk3328-cc
+			rock-3a
+			rock-4c-plus
+			rock-5a
+			rock-5b
+			rock-pi-4a
+			rock-pi-4b
+			rock-pi-4c
+			rock-pi-e
+			rock-pi-s
+			rock64
+
 	builds:
-		marsboard-rk3066
-		radxarock
-		rock2-square
+		32-bit:
+			marsboard-rk3066
+			radxarock
+			rock2-square
 
 Notes:
 -----
Signature · 1 line
2.44.0.478.g7774cfed6261
#8 lore raw

PATCH 8/10 rauc demo: add

In reply to Trevor Woerner

Add an example of implementing rauc on a rockchip board. Adding the meta-rauc layer, adding 'rauc' to DISTRO_FEATURES, and enabling RK_RAUC_DEMO will build an image using the example provided in dynamic-layers/rk-rauc-demo.

This example uses a simple A/B + D scheme (i.e. two root partitions and a non-updated /data partition). Repartitioning occurs automatically on first boot thanks to systemd's 'repart' mechanism.

NOTE:
- this example only works with systemd

If you wish to provide your own implementation, simply add the meta-rauc layer, add 'rauc' to DISTRO_FEATURES, don't enable RK_RAUC_DEMO, and provide your own implementation in a separate layer.

---
 README                                        | 18 +++++
 .../rk-rauc-demo-features-check.bbclass       |  4 +
 conf/layer.conf                               |  4 +
 conf/machine/include/rockchip-rauc.inc        |  4 +
 conf/machine/include/rockchip-wic.inc         |  2 +
 .../recipes-bsp/u-boot/files/boot.cmd.in      | 51 ++++++++++++
 .../recipes-bsp/u-boot/files/uboot-rauc.cfg   |  8 ++
 .../recipes-bsp/u-boot/u-boot_%.bbappend      | 26 ++++++
 .../base-files/base-files_%.bbappend          |  2 +
 .../recipes-core/base-files/files/fstab       |  5 ++
 .../rauc-bundles/files/development-1.cert.pem | 80 +++++++++++++++++++
 .../rauc-bundles/files/development-1.key.pem  | 28 +++++++
 .../rauc-bundles/rockchip-rauc-bundle.bb      | 14 ++++
 .../recipes-core/rauc/files/ca.cert.pem       | 80 +++++++++++++++++++
 .../recipes-core/rauc/files/system.conf       | 17 ++++
 .../recipes-core/rauc/rauc-conf.bbappend      |  7 ++
 .../recipes-core/systemd/abd-partition.bb     | 26 ++++++
 .../systemd/files/25-rootfsA.conf             |  4 +
 .../systemd/files/35-rootfsB.conf             |  7 ++
 .../recipes-core/systemd/files/45-data.conf   |  6 ++
 .../recipes-core/systemd/files/data.mount     | 10 +++
 .../recipes-core/systemd/systemd_%.bbappend   |  3 +
 .../linux/linux-torvalds-next_%.bbappend      |  1 +
 23 files changed, 407 insertions(+)
 create mode 100644 classes-recipe/rk-rauc-demo-features-check.bbclass
 create mode 100644 conf/machine/include/rockchip-rauc.inc
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/files/boot.cmd.in
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/files/uboot-rauc.cfg
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/u-boot_%.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/base-files/base-files_%.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/base-files/files/fstab
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/files/development-1.cert.pem
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/files/development-1.key.pem
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/rockchip-rauc-bundle.bb
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc/files/ca.cert.pem
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc/files/system.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/rauc/rauc-conf.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/abd-partition.bb
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/25-rootfsA.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/35-rootfsB.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/45-data.conf
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/data.mount
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-core/systemd/systemd_%.bbappend
 create mode 100644 dynamic-layers/rk-rauc-demo/recipes-kernel/linux/linux-torvalds-next_%.bbappend
README +18 -0
index 6003e7c652fe..8ff006e942b9 100644
@@ -85,6 +85,24 @@ Notes:
 
 	in the configuration (e.g. conf/local.conf).
 
+  A/B updates with RAUC
+	This layer now contains one example of building an A/B update using RAUC.
+	Users are free to use/test this example, to optionally enable it, to build
+	their own update strategies based on this one, or to ignore it completely.
+	This example only works with
+
+		INIT_MANAGER = "systemd"
+
+	If you wish to use this example in your builds:
+	- enable 'systemd' as your init system
+	- add the meta-rauc layer to your build (with the corresponding branch)
+	- add 'rauc' to your DISTRO_FEATURES
+	- enable RK_RAUC_DEMO in your config
+
+	If you wish to implement your own RAUC update without using the example from
+	this layer, perform the same steps as above except for the step enabling
+	RK_RAUC_DEMO.
+
 U-Boot Environment:
 ------------------
 	In order to configure U-Boot to be able to store its environment into the
classes-recipe/rk-rauc-demo-features-check.bbclass new file +4 -0
new file mode 100644
index 000000000000..f6bc4ebffbc1
@@ -0,0 +1,4 @@
+inherit features_check
+
+REQUIRED_DISTRO_FEATURES:append:rk-rauc-demo = " systemd rauc"
+REQUIRED_MACHINE_FEATURES:append:rk-rauc-demo = " rk-u-boot-env"
conf/layer.conf +4 -0
index 68205dd7ea4c..03914d2952e1 100644
@@ -21,3 +21,7 @@ BBFILES_DYNAMIC += " \
     qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \
     qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \
 "
+BBFILES_DYNAMIC += " \
+    rauc:${LAYERDIR}/dynamic-layers/rk-rauc-demo/*/*/*.bb \
+    rauc:${LAYERDIR}/dynamic-layers/rk-rauc-demo/*/*/*.bbappend \
+"
conf/machine/include/rockchip-rauc.inc new file +4 -0
new file mode 100644
index 000000000000..a6f79503076b
@@ -0,0 +1,4 @@
+# 'RK_RAUC_DEMO' indicates the user wants to use the
+# rauc demo configuration from this layer
+OVERRIDES .= "${@ ':rk-rauc-demo' if bb.utils.to_boolean(d.getVar('RK_RAUC_DEMO'), False) else ''}"
+IMAGE_INSTALL:append:rk-rauc-demo = " abd-partition"
conf/machine/include/rockchip-wic.inc +2 -0
index ebfc0cb96507..0e0aa5d9b340 100644
@@ -2,6 +2,7 @@
 
 require conf/machine/include/rockchip-extlinux.inc
 require conf/machine/include/rockchip-rk-u-boot-env.inc
+require conf/machine/include/rockchip-rauc.inc
 
 SPL_BINARY ?= "idbloader.img"
 
@@ -9,6 +10,7 @@ SPL_BINARY ?= "idbloader.img"
 # WIC_COMPRESSION_EXTENSION = ".xz"
 WIC_COMPRESSION_EXTENSION ?= ""
 IMAGE_FSTYPES += "wic${WIC_COMPRESSION_EXTENSION} wic.bmap"
+IMAGE_FSTYPES:append:rk-rauc-demo = " ext4"
 WKS_FILE ?= "rockchip.wks"
 WKS_FILE_DEPENDS ?= " \
 	e2fsprogs-native \
dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/files/boot.cmd.in new file +51 -0

51 lines not on this page · raw message

dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/files/uboot-rauc.cfg new file +8 -0
new file mode 100644
index 000000000000..77b7164e0192
@@ -0,0 +1,8 @@
+CONFIG_CMD_BOOTDEV=y
+CONFIG_CMD_BOOTMETH=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SETEXPR_FMT=y
+CONFIG_BOOTSTD_DEFAULTS=n
+CONFIG_BOOTMETH_EXTLINUX=n
+CONFIG_BOOTMETH_EXTLINUX_PXE=n
+CONFIG_BOOTMETH_VBE=n
dynamic-layers/rk-rauc-demo/recipes-bsp/u-boot/u-boot_%.bbappend new file +26 -0
new file mode 100644
index 000000000000..7c77d595473d
@@ -0,0 +1,26 @@
+inherit rk-rauc-demo-features-check
+
+FILESEXTRAPATHS:prepend:rk-rauc-demo := "${THISDIR}/files:"
+
+DEPENDS:append:rk-rauc-demo = " u-boot-mkimage-native"
+SRC_URI:append:rk-rauc-demo = " \
+	file://uboot-rauc.cfg \
+	file://boot.cmd.in \
+	"
+
+do_compile:append:rk-rauc-demo() {
+	# create boot script
+	sed -e 's|@@KERNEL_BOOTFILE@@|${UBOOT_EXTLINUX_KERNEL_IMAGE}|' \
+	    "${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd"
+	mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" ${WORKDIR}/boot.scr
+
+	# tweak environment
+	echo "bootmeths=script extlinux" >> ${B}/u-boot-initial-env
+	echo "bootargsbase=${UBOOT_EXTLINUX_KERNEL_ARGS} ${UBOOT_EXTLINUX_CONSOLE}" >> ${B}/u-boot-initial-env
+}
+
+do_install:append:rk-rauc-demo() {
+	install -d ${D}/boot
+	install -m 0644 ${WORKDIR}/boot.scr ${D}/boot
+}
+FILES:${PN}-extlinux += "/boot/boot.scr"
dynamic-layers/rk-rauc-demo/recipes-core/base-files/base-files_%.bbappend new file +2 -0
new file mode 100644
index 000000000000..705979a17c3e
@@ -0,0 +1,2 @@
+inherit rk-rauc-demo-features-check
+FILESEXTRAPATHS:prepend:rk-rauc-demo := "${THISDIR}/files:"
dynamic-layers/rk-rauc-demo/recipes-core/base-files/files/fstab new file +5 -0
new file mode 100644
index 000000000000..3be093e457e9
@@ -0,0 +1,5 @@
+/dev/root            /                    auto       x-systemd.growfs                   1  1
+proc                 /proc                proc       defaults                           0  0
+devpts               /dev/pts             devpts     mode=0620,ptmxmode=0666,gid=5      0  0
+tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
+tmpfs                /var/volatile        tmpfs      defaults                           0  0
dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/files/development-1.cert.pem new file +80 -0

80 lines not on this page · raw message

dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/files/development-1.key.pem new file +28 -0
new file mode 100644
index 000000000000..80305f8291b1
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCsKw8FAtC7sEcF
+NnE8IA6ndo11wSNebHotlP88F9gLREgqggOSxf0zdgxCz02KyUd/r1J8FWw752DR
+BJckewcfVn1sPzHo+TZ7M1vPVOo3mKaxmh3alqEHFJwVgE3bDAOGzsc9clei2qDA
+jLKaoGrluF9S0vYnykj044brviSTaq9gaH8JO4GWzoUMY5PY+pHcUC53u7w4QumG
+2Kwz3ebUN2njAY0hj6lKfxWlqqm+/DaTpBAMGDMwBn8cE7OpxlfXa5ZFFef1jz1I
+4AhGT3/vFHeVJSWbFCGEJes3CwFI5vXBi2HGy4xrp9jS+THjgD946mpBbF1Ng6ZU
+DVvCDvbvAgMBAAECggEASphBYq9sltVyf/ytpRpSnxYLhmiPFXs0mIlE6Nl/3qnQ
+BrLcL3yfDuvntg6xjx9UXistNtvlUDMYzJcLkV/InzhPEVZ0HnfTth9zeOpWrI30
+M2EN7EZ1MGcqlVpI4U5cPM1cn+/proLBQYv0WnCEwFFY477JrkXDxG7MZ1mz6TaL
+IGcCCIUu1BxECngQ344eaKrSR5F2MtlxAl19Pt5QSPfmuMdmElrK6RtBjnKrDu1K
+fe6DCfObZ3nbG2fhFV4uTxhlTC9lUmfTQMKR79rLmHNKnbMx74kFNvy3XlT2l35I
+ZVfRMLPWph7yMom9v/Im3Q70uhJ1lxyqbbl/DFZVmQKBgQDVo19SqR/QeDIxPIPn
+XvVWzo5ml3KO/dVxA8sok6twr+G7yUeIUnuauYFA/tX/FS32azFRa/7GjUfoTx3q
+GHK43TBCMyEt0we6WwZb+FkWa/b/RBoyD/audrpmgDDi1+fXPs8bBvoO8/oju20D
+I6wOjSovcIMaeLo/+u3U6ShNQwKBgQDOTpoGMsQzXchZfDmxL61h3j4Gtjrl4BpU
+WhAkJ9U2BRpL8NSZLErn5ik8MwgK2ut+YdU7aogI0D6Gc+4zZoJDEbhhmPD9cprv
+LMyfAKoisR01OyU57mMSGQq0dfjmK6PfYJdX5sQJGkMFptNAJLTDoYtmXItSICoY
+1j5KTvwe5QKBgGytxmErjfakHoxzh3pdERuOylwgMPPS5xCt6FyE+pLBtmisFQqh
+QyXLtpgUy1IPOSmBED6mXJ4u4uSn0sTymPG3+8PBdOB12RmREqQYq2E/nQ/wWg8b
+ldbcqShZkATl5pfV6M+L9gtDS/1/bA5LyExCvbISX29I+R5xDSnhTlI3AoGBAJRK
+VVXtOa/+UhtYOpPMxGCbgZQLemxvWB2XmxCR/SRWKJ+7XOU4vCLSAoO93qMG1szB
+/6Y0ndFP9hFo1SfnH+ybmR+18ksLDKisV+xWavSCwI7Zk5l/a4C/tT0fqyeu6JyQ
+bliFjBVK5i/yyNfLSo9v16ZdENuYOQofPSjmezytAoGBALhwvtzgqvqGSXID2w5N
+ullK8ny3WRa1o5DLXuMV19CvknmrN/zmmjQLblKkdp9VBb7uo8czon+qL1ZZyywC
+W2BmHfGMPUyQHux4btsdJhlWcS7z7aYXM9QWiKlI+EKLHLILYk+LPIEf85sUcOZV
+eCBpViT7fv2iv/0L+mzjWtLA
+-----END PRIVATE KEY-----
dynamic-layers/rk-rauc-demo/recipes-core/rauc-bundles/rockchip-rauc-bundle.bb new file +14 -0
new file mode 100644
index 000000000000..5a42f59b821e
@@ -0,0 +1,14 @@
+DESCRIPTION = "Rockchip RAUC bundle generator"
+
+inherit bundle
+
+RAUC_BUNDLE_COMPATIBLE = "${MACHINE}"
+RAUC_BUNDLE_VERSION = "v20240512"
+RAUC_BUNDLE_DESCRIPTION = "RAUC Demo Bundle"
+RAUC_BUNDLE_FORMAT = "verity"
+RAUC_BUNDLE_SLOTS = "rootfs"
+RAUC_SLOT_rootfs = "core-image-base"
+RAUC_SLOT_rootfs[fstype] = "ext4"
+
+RAUC_KEY_FILE := "${THISDIR}/files/development-1.key.pem"
+RAUC_CERT_FILE := "${THISDIR}/files/development-1.cert.pem"
dynamic-layers/rk-rauc-demo/recipes-core/rauc/files/ca.cert.pem new file +80 -0

80 lines not on this page · raw message

dynamic-layers/rk-rauc-demo/recipes-core/rauc/files/system.conf new file +17 -0
new file mode 100644
index 000000000000..4945c67345c4
@@ -0,0 +1,17 @@
+[system]
+compatible=@MACHINE@
+bootloader=uboot
+data-directory=/data/
+
+[keyring]
+path=/etc/rauc/ca.cert.pem
+
+[slot.rootfs.0]
+device=/dev/disk/by-partlabel/rootfsA
+type=ext4
+bootname=A
+
+[slot.rootfs.1]
+device=/dev/disk/by-partlabel/rootfsB
+type=ext4
+bootname=B
dynamic-layers/rk-rauc-demo/recipes-core/rauc/rauc-conf.bbappend new file +7 -0
new file mode 100644
index 000000000000..5ff9de681f6c
@@ -0,0 +1,7 @@
+inherit rk-rauc-demo-features-check
+
+FILESEXTRAPATHS:prepend:rk-rauc-demo := "${THISDIR}/files:"
+
+do_install:prepend:rk-rauc-demo() {
+	sed -ie 's!@MACHINE@!${MACHINE}!g' ${WORKDIR}/system.conf
+}
dynamic-layers/rk-rauc-demo/recipes-core/systemd/abd-partition.bb new file +26 -0
new file mode 100644
index 000000000000..35037e9408de
@@ -0,0 +1,26 @@
+SUMMARY = "A/B+D partition definition for systemd's repart mechanism"
+LICENSE = "OSL-3.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/OSL-3.0;md5=438ec6d864bbb958a49df939a56511cf"
+
+inherit rk-rauc-demo-features-check systemd
+
+SYSTEMD_SERVICE:${PN} = "data.mount"
+
+S = "${WORKDIR}"
+
+SRC_URI = " \
+	file://data.mount \
+	file://25-rootfsA.conf \
+	file://35-rootfsB.conf \
+	file://45-data.conf \
+	"
+
+do_install() {
+	install -d ${D}${sysconfdir}/repart.d/
+	install -m 0644 ${WORKDIR}/25-rootfsA.conf ${D}${sysconfdir}/repart.d/
+	install -m 0644 ${WORKDIR}/35-rootfsB.conf ${D}${sysconfdir}/repart.d/
+	install -m 0644 ${WORKDIR}/45-data.conf ${D}${sysconfdir}/repart.d/
+
+	install -d ${D}${sysconfdir}/systemd/system
+	install -m 0644 ${WORKDIR}/data.mount ${D}${sysconfdir}/systemd/system/
+}
dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/25-rootfsA.conf new file +4 -0
new file mode 100644
index 000000000000..dba01e1ff863
@@ -0,0 +1,4 @@
+[Partition]
+Type=root
+Weight=250
+SizeMaxBytes=5G
dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/35-rootfsB.conf new file +7 -0
new file mode 100644
index 000000000000..31a7c06c17ff
@@ -0,0 +1,7 @@
+[Partition]
+Type=root
+Label=rootfsB
+Weight=250
+SizeMaxBytes=5G
+Format=ext4
+GrowFileSystem=yes
dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/45-data.conf new file +6 -0
new file mode 100644
index 000000000000..1aac59addc26
@@ -0,0 +1,6 @@
+[Partition]
+Type=root-secondary
+Label=data
+Weight=500
+Format=ext4
+GrowFileSystem=yes
dynamic-layers/rk-rauc-demo/recipes-core/systemd/files/data.mount new file +10 -0
new file mode 100644
index 000000000000..c81a55be1d1a
@@ -0,0 +1,10 @@
+[Unit]
+Description=data partition
+
+[Mount]
+What=/dev/disk/by-partlabel/data
+Where=/data
+Type=ext4
+
+[Install]
+WantedBy=multi-user.target
dynamic-layers/rk-rauc-demo/recipes-core/systemd/systemd_%.bbappend new file +3 -0
new file mode 100644
index 000000000000..cf6c188277db
@@ -0,0 +1,3 @@
+inherit rk-rauc-demo-features-check
+
+PACKAGECONFIG:append:rk-rauc-demo = " repart openssl"
dynamic-layers/rk-rauc-demo/recipes-kernel/linux/linux-torvalds-next_%.bbappend new file +1 -0
new file mode 100644
index 000000000000..1a51380f0db1
@@ -0,0 +1 @@
+require ${@ 'recipes-kernel/linux/linux-yocto_rauc.inc' if bb.utils.to_boolean(d.getVar('RK_RAUC_DEMO'), False) else ''}
Signature · 1 line
2.44.0.478.g7774cfed6261
#9 lore raw

PATCH 9/10 enable HW VPU decoding for SoCs that have stateless VPUs

In reply to Trevor Woerner

From: Quentin Schulz <[email protected]>

v4l2codecs is the gstreamer plugin for V4L2 stateless video hardware decoding. The Rockchip SoCs that have a VPU all seems to be based on Hantro, RKVDEC or RKVDECv2, all stateless encoding/decoding VPUs.

Therefore, let's enable VPU decoding in Gstreamer whenever possible, when the SoC supports it.

PX30, RK3066, RK3188, RK3288, RK3328, RK3399, RK356x and RK3588(s) all have at least one Hantro VPU.

RK3328, RK3399, RK356x and RK3588(s) all have at least one RKVDEC/RKVDECv2 VPU (though not necessarily supported in the upstream kernel just yet).

=== PX30
Tested on PX30 Ringneck with with Haikou+Haikou Video Demo adapter:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2slh264dec)
- gstreamer1.0-plugins-base (for parsebin)

A few frames are dropped every other second for 1080p but otherwise smooth.

=== RK3399
Tested on RK3399 Puma with Haikou:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_30fps_normal.mp4.zip

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2codecs)
- gstreamer1.0-plugins-base (for parsebin)

=== RK3588

Tested on a RK3588 Tiger with Haikou+Haikou Video Demo adapter - on a downstream v6.6 (upstream-based, not Rockchip BSP-based) with DSI patches - :

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slav1dec ! fakesink

with FILE storing the path to any AV1 file, e.g.
http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/cmaf/spark-8b-59.94fps/spark_606kbps_432p.mp4
https://woolyss.com/f/av1-nosound-chimera.mp4
https://woolyss.com/f/av1-opus-sita.webm

Needed packages are:
- gstreamer1.0-plugins-bad (for fakesink and v4l2slav1dec)
- gstreamer1.0-plugins-base (for parsebin)

For some reason though, waylandsink is very choppy. Combining fpsdisplaysink with fakesink shows a ~60fps when decoding the 432p file, ~24fps for the two others.
Note that 10b-depth isn't supported (at least in my setup).

---
 README                                        | 22 +++++++++++++++++++
 conf/machine/include/px30.inc                 |  2 ++
 conf/machine/include/rk3066.inc               |  2 ++
 conf/machine/include/rk3188.inc               |  2 ++
 conf/machine/include/rk3288.inc               |  2 ++
 conf/machine/include/rk3328.inc               |  2 ++
 conf/machine/include/rk3399.inc               |  2 ++
 conf/machine/include/rk3566.inc               |  2 ++
 conf/machine/include/rk3568.inc               |  2 ++
 conf/machine/include/rk3588s.inc              |  2 ++
 .../gstreamer1.0-plugins-bad_%.bbappend       |  1 +
 11 files changed, 41 insertions(+)
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
README +22 -0
index 8ff006e942b9..09f8691300f4 100644
@@ -103,6 +103,28 @@ Notes:
 	this layer, perform the same steps as above except for the step enabling
 	RK_RAUC_DEMO.
 
+  HW video decoding with gstreamer
+
+	Most Rockchip SoCs have some integrated VPU, either Hantro, RKVDEC or
+	RKVDECv2. Those are called stateless VPUs and they require tools to be
+	adapted so they can be used. Upstream ffmpeg doesn't support them (yet)
+	but gstreamer does, via the v4l2sl* plugins. However, by default those
+	aren't built in OE-Core. This layer enables these plugins by default for
+	all SoCs that have at least one VPU (at the time of writing, all SoCs
+	supported by this layer to the exception of RK3308).
+
+	If you wish to NOT build those plugins anymore, you can set
+
+		ENABLE_STATELESS_VPU_GST = "0"
+
+	in any appropriate conf file (or in a
+	gstreamer1.0-plugins-bad_%.bbappend in your own layer).
+
+	Note that this is only relevant for upstream-based Linux kernels as
+	Rockchip have developed their own ABI for their own kernel that isn't
+	compatible (see Rockchip Media Process Platform (MPP) and
+	downstream gstreamer-rockchip plugin for those kernels).
+
 U-Boot Environment:
 ------------------
 	In order to configure U-Boot to be able to store its environment into the
conf/machine/include/px30.inc +2 -0
index d78409ee5c7e..8173cb19be2c 100644
@@ -19,3 +19,5 @@ TFA_BUILD_TARGET = "bl31"
 
 UBOOT_SUFFIX ?= "itb"
 UBOOT_ENTRYPOINT ?= "0x06000000"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3066.inc +2 -0
index 026d5b556db7..a898309bbf88 100644
@@ -12,3 +12,5 @@ SERIAL_CONSOLES = "115200;ttyS2"
 KBUILD_DEFCONFIG = "multi_v7_defconfig"
 KERNEL_FEATURES:append:rk3066 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
 KERNEL_IMAGETYPE ?= "zImage"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3188.inc +2 -0
index 0120e2fd585f..554d4f1c904d 100644
@@ -12,3 +12,5 @@ SERIAL_CONSOLES = "115200;ttyFIQ0"
 KBUILD_DEFCONFIG = "multi_v7_defconfig"
 KERNEL_FEATURES:append:rk3188 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
 KERNEL_IMAGETYPE ?= "zImage"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3288.inc +2 -0
index 684e8645d176..06fda69a3eb7 100644
@@ -14,3 +14,5 @@ KERNEL_FEATURES:append:rk3288 = " bsp/rockchip/remove-non-rockchip-arch-arm.scc"
 KERNEL_IMAGETYPE ?= "zImage"
 
 UBOOT_SUFFIX ?= "bin"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3328.inc +2 -0
index 4ecd6814f9ba..e6f810dcd2ca 100644
@@ -20,3 +20,5 @@ TFA_BUILD_TARGET = "bl31"
 
 UBOOT_SUFFIX ?= "itb"
 UBOOT_ENTRYPOINT ?= "0x06000000"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3399.inc +2 -0
index 47f0560d1578..cd1be49064ed 100644
@@ -20,3 +20,5 @@ TFA_BUILD_TARGET = "bl31"
 
 UBOOT_SUFFIX ?= "itb"
 UBOOT_ENTRYPOINT ?= "0x06000000"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3566.inc +2 -0
index 586d68806df6..2522851fa392 100644
@@ -19,3 +19,5 @@ PREFERRED_PROVIDER_optee-os = "rockchip-rkbin"
 
 UBOOT_SUFFIX ?= "itb"
 UBOOT_ENTRYPOINT ?= "0x06000000"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3568.inc +2 -0
index 1da212a1530c..db188a311297 100644
@@ -19,3 +19,5 @@ PREFERRED_PROVIDER_optee-os = "rockchip-rkbin"
 
 UBOOT_SUFFIX ?= "itb"
 UBOOT_ENTRYPOINT ?= "0x06000000"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
conf/machine/include/rk3588s.inc +2 -0
index cd84461dab41..d349108fb973 100644
@@ -18,3 +18,5 @@ PREFERRED_PROVIDER_optee-os = "rockchip-rkbin"
 
 UBOOT_SUFFIX ?= "itb"
 UBOOT_ENTRYPOINT ?= "0x06000000"
+
+ENABLE_STATELESS_VPU_GST ?= "1"
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend new file +1 -0
new file mode 100644
index 000000000000..276230411e9c
@@ -0,0 +1 @@
+PACKAGECONFIG:append:rockchip = "${@' v4l2codecs' if bb.utils.to_boolean(d.getVar('ENABLE_STATELESS_VPU_GST'), False) else ''}"
Signature · 1 line
2.44.0.478.g7774cfed6261
#13 lore raw

PATCH 10/10 linux-torvalds-next: bump to next-20240904

In reply to Trevor Woerner

Bump kernel to tag "next-20240904".

---
 recipes-kernel/linux/linux-torvalds-next_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
recipes-kernel/linux/linux-torvalds-next_git.bb +3 -3
index 6f3db7c61bdf..b961b1408f09 100644
@@ -10,15 +10,15 @@ DEFAULT_PREFERENCE = "-1"
 COMPATIBLE_MACHINE = "^$"
 COMPATIBLE_MACHINE:radxa-zero-3 = "radxa-zero-3"
 
-LINUX_VERSION = "6.10-rc3"
+LINUX_VERSION = "6.11-rc6"
 KERNEL_VERSION_SANITY_SKIP = "1"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 SRC_URI = " \
 	git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;protocol=https;nobranch=1 \
 	file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta \
 	"
-# this is tag 'next-20240611'
-SRCREV = "a957267fa7e9159d3d2ee1421359ebf228570c68"
+# this is tag 'next-20240904'
+SRCREV = "fdadd93817f124fd0ea6ef251d4a1068b7feceba"
 
 inherit kernel
 inherit kernel-yocto
Signature · 1 line
2.44.0.478.g7774cfed6261
#7 lore raw

PATCH 7/10 mesa: build panfrost for RK3566 boards

In reply to Trevor Woerner

From: Marcin Bober <[email protected]>

The RK356x SoC family (of which we currently only support RK3568) has a Bifrost GPU that is supported by open-source Panfrost Linux kernel and Mesa drivers, therefore let's build mesa with Panfrost support for RK3566.

---
 recipes-graphics/mesa/mesa_%.bbappend | 1 +
 1 file changed, 1 insertion(+)
recipes-graphics/mesa/mesa_%.bbappend +1 -0
index 2d9ec2e676f7..00cc15c6221c 100644
@@ -1,5 +1,6 @@
 PACKAGECONFIG:append:rk3288 = " kmsro panfrost"
 PACKAGECONFIG:append:rk3328 = " kmsro lima"
 PACKAGECONFIG:append:rk3399 = " kmsro panfrost"
+PACKAGECONFIG:append:rk3566 = " kmsro panfrost"
 PACKAGECONFIG:append:rk3568 = " kmsro panfrost"
 PACKAGECONFIG:append:px30 = " kmsro panfrost"
Signature · 1 line
2.44.0.478.g7774cfed6261
#10 lore raw

Re: [yocto-patches] [meta-rockchip][scarthgap][PATCH 09/10] enable HW VPU decoding for SoCs that have stateless VPUs

In reply to Trevor Woerner

Hi Trevor,

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

From: Quentin Schulz <[email protected]>

v4l2codecs is the gstreamer plugin for V4L2 stateless video hardware decoding. The Rockchip SoCs that have a VPU all seems to be based on Hantro, RKVDEC or RKVDECv2, all stateless encoding/decoding VPUs.

Therefore, let's enable VPU decoding in Gstreamer whenever possible, when the SoC supports it.

PX30, RK3066, RK3188, RK3288, RK3328, RK3399, RK356x and RK3588(s) all have at least one Hantro VPU.

RK3328, RK3399, RK356x and RK3588(s) all have at least one RKVDEC/RKVDECv2 VPU (though not necessarily supported in the upstream kernel just yet).

=== PX30
Tested on PX30 Ringneck with with Haikou+Haikou Video Demo adapter:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink
Quoted 9 lines

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2slh264dec)
- gstreamer1.0-plugins-base (for parsebin)

Weston output is broken on Scarthgap. c.f. https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

A few frames are dropped every other second for 1080p but otherwise smooth.

=== RK3399
Tested on RK3399 Puma with Haikou:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink
Quoted 9 lines

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_30fps_normal.mp4.zip

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2codecs)
- gstreamer1.0-plugins-base (for parsebin)

Weston output is broken on Scarthgap. c.f. https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

=== RK3588

Tested on a RK3588 Tiger with Haikou+Haikou Video Demo adapter - on a downstream v6.6 (upstream-based, not Rockchip BSP-based) with DSI patches - :

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slav1dec ! fakesink
Quoted 9 lines

with FILE storing the path to any AV1 file, e.g.
http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/cmaf/spark-8b-59.94fps/spark_606kbps_432p.mp4
https://woolyss.com/f/av1-nosound-chimera.mp4
https://woolyss.com/f/av1-opus-sita.webm

Needed packages are:
- gstreamer1.0-plugins-bad (for fakesink and v4l2slav1dec)
- gstreamer1.0-plugins-base (for parsebin)

Stateless AV1 decoding is not available in the mesa release used on Scarthgap.

So...

RK3588 seems to have gained upstream support for VDPU121 which should allow h264, mpeg2 and vp8 decoding. Building a linux-next kernel after tag next-20240829 should have the support AFAICT.

So, I would retest RK3588 support for those video formats and drop the AV1 mention from the commit log as it for sure doesn't work because of the version of mesa in Scarthgap. We could backport later releases into meta-rockchip to gain support for it. I think this **may** be an idea once there's support for 24.1 and later merged into OE-Core because it brings Panthor (open-source GPU drivers) support to RK3588 which would be a shame not to have in an LTS. But let's see when that happens.

As for the issues with display on PX30 and RK3399, it seems those are supposed to be patched in newer releases of gstreamer, c.f. https://gitlab.freedesktop.org/wayland/weston/-/issues/839. Note that Robert said it would be fixed in gstreamer 1.22 but the linked patch
only made it to 1.23 (Scarthgap has 1.22, Styhead 1.24).

Considering what Robert said in the link above, I assume people using another compositor than weston may be fine on Scarthgap, so I would suggest to backport the patches I submitted in this series to scarthgap anyway? One is not forced to use weston to do VPU decoding. FYI, I gave ~30min at backporting the gstreamer patches to 1.22.11 but this is above my skill set today.

For those, I would just mention the issue in the README and commit log and maybe switch to fakesink in the commit log instead of waylandsink (and drop weston from the needed packages).

What do you think?

Cheers,
Quentin

#11 lore raw

Re: [yocto-patches] [meta-rockchip][scarthgap][PATCH 09/10] enable HW VPU decoding for SoCs that have stateless VPUs

Quoted 108 lines · Quentin Schulz via lists.yoctoproject.org

Hi Trevor,

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

From: Quentin Schulz <[email protected]>

v4l2codecs is the gstreamer plugin for V4L2 stateless video hardware decoding. The Rockchip SoCs that have a VPU all seems to be based on Hantro, RKVDEC or RKVDECv2, all stateless encoding/decoding VPUs.

Therefore, let's enable VPU decoding in Gstreamer whenever possible, when the SoC supports it.

PX30, RK3066, RK3188, RK3288, RK3328, RK3399, RK356x and RK3588(s) all have at least one Hantro VPU.

RK3328, RK3399, RK356x and RK3588(s) all have at least one RKVDEC/RKVDECv2 VPU (though not necessarily supported in the upstream kernel just yet).

=== PX30
Tested on PX30 Ringneck with with Haikou+Haikou Video Demo adapter:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink
Quoted 9 lines

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2slh264dec)
- gstreamer1.0-plugins-base (for parsebin)

Weston output is broken on Scarthgap. c.f.
https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

A few frames are dropped every other second for 1080p but otherwise smooth.

=== RK3399
Tested on RK3399 Puma with Haikou:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink
Quoted 9 lines

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_30fps_normal.mp4.zip

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2codecs)
- gstreamer1.0-plugins-base (for parsebin)

Weston output is broken on Scarthgap. c.f.
https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

=== RK3588

Tested on a RK3588 Tiger with Haikou+Haikou Video Demo adapter - on a downstream v6.6 (upstream-based, not Rockchip BSP-based) with DSI patches - :

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slav1dec ! fakesink
Quoted 9 lines

with FILE storing the path to any AV1 file, e.g.
http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/cmaf/spark-8b-59.94fps/spark_606kbps_432p.mp4
https://woolyss.com/f/av1-nosound-chimera.mp4
https://woolyss.com/f/av1-opus-sita.webm

Needed packages are:
- gstreamer1.0-plugins-bad (for fakesink and v4l2slav1dec)
- gstreamer1.0-plugins-base (for parsebin)

Stateless AV1 decoding is not available in the mesa release used on Scarthgap.

So...

RK3588 seems to have gained upstream support for VDPU121 which should allow h264, mpeg2 and vp8 decoding. Building a linux-next kernel after tag next-20240829 should have the support AFAICT.

So, I would retest RK3588 support for those video formats and drop the AV1 mention from the commit log as it for sure doesn't work because of the version of mesa in Scarthgap. We could backport later releases into meta-rockchip to gain support for it. I think this **may** be an idea once there's support for 24.1 and later merged into OE-Core because it brings Panthor (open-source GPU drivers) support to RK3588 which would be a shame not to have in an LTS. But let's see when that happens.

As for the issues with display on PX30 and RK3399, it seems those are supposed to be patched in newer releases of gstreamer, c.f.
https://gitlab.freedesktop.org/wayland/weston/-/issues/839. Note that Robert said it would be fixed in gstreamer 1.22 but the linked patch only made it to 1.23 (Scarthgap has 1.22, Styhead 1.24).

Considering what Robert said in the link above, I assume people using another compositor than weston may be fine on Scarthgap, so I would suggest to backport the patches I submitted in this series to scarthgap anyway? One is not forced to use weston to do VPU decoding.
FYI, I gave ~30min at backporting the gstreamer patches to 1.22.11 but this is above my skill set today.

Quoted 5 lines

For those, I would just mention the issue in the README and commit log and maybe switch to fakesink in the commit log instead of waylandsink (and drop weston from the needed packages).

What do you think?

To be clear, when I say I've run-tested this build I'm not implying I've tested every aspect, feature, and functionality of each chip. I've simply flashed an SD card, applied power, watched it boot to a prompt, log in, and run something simple like "uname -a" to verify it's using the scarthgap kernel and not the latest master. I'm not really in a position to test stateless VPU decoding or anything fancy like that :-)

If there aren't any issues or objections, perhaps I could start by applying the other patches in this series while considering what to do about this one? Maybe after the others are applied you'd like to have a go at making a scarthgap version of this patch (with all the proper commit messages etc)?

Best regards,
Trevor

#12 lore raw

Re: [yocto-patches] [meta-rockchip][scarthgap][PATCH 09/10] enable HW VPU decoding for SoCs that have stateless VPUs

Hi Trevor,

Quoted 122 lines · Trevor Woerner via lists.yoctoproject.org
Quoted 108 lines · Quentin Schulz via lists.yoctoproject.org

Hi Trevor,

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

From: Quentin Schulz <[email protected]>

v4l2codecs is the gstreamer plugin for V4L2 stateless video hardware decoding. The Rockchip SoCs that have a VPU all seems to be based on Hantro, RKVDEC or RKVDECv2, all stateless encoding/decoding VPUs.

Therefore, let's enable VPU decoding in Gstreamer whenever possible, when the SoC supports it.

PX30, RK3066, RK3188, RK3288, RK3328, RK3399, RK356x and RK3588(s) all have at least one Hantro VPU.

RK3328, RK3399, RK356x and RK3588(s) all have at least one RKVDEC/RKVDECv2 VPU (though not necessarily supported in the upstream kernel just yet).

=== PX30
Tested on PX30 Ringneck with with Haikou+Haikou Video Demo adapter:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink
Quoted 9 lines

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2slh264dec)
- gstreamer1.0-plugins-base (for parsebin)

Weston output is broken on Scarthgap. c.f.
https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

A few frames are dropped every other second for 1080p but otherwise smooth.

=== RK3399
Tested on RK3399 Puma with Haikou:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink
Quoted 9 lines

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_30fps_normal.mp4.zip

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2codecs)
- gstreamer1.0-plugins-base (for parsebin)

Weston output is broken on Scarthgap. c.f.
https://lore.kernel.org/all/[email protected]/

Quoted 8 lines

=== RK3588

Tested on a RK3588 Tiger with Haikou+Haikou Video Demo adapter - on a downstream v6.6 (upstream-based, not Rockchip BSP-based) with DSI patches - :

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slav1dec ! fakesink
Quoted 9 lines

with FILE storing the path to any AV1 file, e.g.
http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/cmaf/spark-8b-59.94fps/spark_606kbps_432p.mp4
https://woolyss.com/f/av1-nosound-chimera.mp4
https://woolyss.com/f/av1-opus-sita.webm

Needed packages are:
- gstreamer1.0-plugins-bad (for fakesink and v4l2slav1dec)
- gstreamer1.0-plugins-base (for parsebin)

Stateless AV1 decoding is not available in the mesa release used on Scarthgap.

So...

RK3588 seems to have gained upstream support for VDPU121 which should allow h264, mpeg2 and vp8 decoding. Building a linux-next kernel after tag next-20240829 should have the support AFAICT.

So, I would retest RK3588 support for those video formats and drop the AV1 mention from the commit log as it for sure doesn't work because of the version of mesa in Scarthgap. We could backport later releases into meta-rockchip to gain support for it. I think this **may** be an idea once there's support for 24.1 and later merged into OE-Core because it brings Panthor (open-source GPU drivers) support to RK3588 which would be a shame not to have in an LTS. But let's see when that happens.

As for the issues with display on PX30 and RK3399, it seems those are supposed to be patched in newer releases of gstreamer, c.f.
https://gitlab.freedesktop.org/wayland/weston/-/issues/839. Note that Robert said it would be fixed in gstreamer 1.22 but the linked patch only made it to 1.23 (Scarthgap has 1.22, Styhead 1.24).

Considering what Robert said in the link above, I assume people using another compositor than weston may be fine on Scarthgap, so I would suggest to backport the patches I submitted in this series to scarthgap anyway? One is not forced to use weston to do VPU decoding.
FYI, I gave ~30min at backporting the gstreamer patches to 1.22.11 but this is above my skill set today.

Quoted 5 lines

For those, I would just mention the issue in the README and commit log and maybe switch to fakesink in the commit log instead of waylandsink (and drop weston from the needed packages).

What do you think?

To be clear, when I say I've run-tested this build I'm not implying I've tested every aspect, feature, and functionality of each chip. I've simply flashed an SD card, applied power, watched it boot to a prompt, log in, and run something simple like "uname -a" to verify it's using the scarthgap kernel and not the latest master. I'm not really in a position to test stateless VPU decoding or anything fancy like that :-)

Quoted 2 lines

If there aren't any issues or objections, perhaps I could start by applying the other patches in this series while considering what to do about this one?

I haven't had the time to look at the other patches in depth just yet. But I agree with the suggestion of putting this one patch on hold.

I currently have this enabled in our vendor layer:
https://git.embedded.cherry.de/yocto-layers/meta-cherry-es.git/commit/?id=37422a2f8d2553701dfa80de2bde5537ffffa770
https://git.embedded.cherry.de/yocto-layers/meta-cherry-es.git/commit/?id=a72a8bbabd5721f25ccef369ac470ea5d27b864c
https://git.embedded.cherry.de/yocto-layers/meta-cherry-es.git/commit/?id=7c575990a66490e8907376a75c784b15c484b0c7

So I clearly am interested in having this work with meta-rockchip in the Scarthgap branch. It's on my TODO list. I also would like to test h264, mpeg2 and vp8 on RK3588 on Scarthgap too :)

So basically, I'm volunteering for this as I have professional interest in this, but if someone does this before I have time to handle it, I'll just review it whenever I have time :)

Quoted 3 lines

Maybe after the others are applied you'd like to have a go at making a scarthgap version of this patch (with all the proper commit messages etc)?

Sounds good to me.

I'll try to find time to review the other backports ASAP.

Cheers,
Quentin

#14 lore raw
In reply to Trevor Woerner
Quoted 33 lines · Trevor Woerner

From: Trevor Woerner <[email protected]>

Update the scarthgap branch with all the relevant patches from master.

The scarthgap branch did not get the UNPACKDIR changes that went into master/styhead, therefore any patches that addressed that change were not picked, and any patches that added features with UNPACKDIR were modified to revert back to WORKDIR.

On master, it took a couple patches to get the radxa-zero-3{e|w} machine added and working fully (i.e. with the kernel tag). All these patches were squashed together into one "add radxa zero 3" patch.

The rename of the mesa bbappend patch is not required on scarthgap for reasons similar to the UNPACKDIR feature.

Boot tested with:
- nanopi-r2s
- radxa-zero-3e
- rock-3a
- rock-5a
- rock-pi-4b
- rock-pi-s

Marcin Bober (1):
mesa: build panfrost for RK3566 boards

Quentin Schulz (3):
mesa: enable lima on all rk3328 boards
mesa: build panfrost for RK3568 boards
enable HW VPU decoding for SoCs that have stateless VPUs

Quoted 7 lines

Trevor Woerner (6):
user-selectable wic compression
rockchip-rkbin: bump SRCREV
radxa-zero-3{e|w}: add
README: sort MACHINE names
rauc demo: add
linux-torvalds-next: bump to next-20240904

All of these patches, except for 09/10, applied to meta-rockchip, scarthgap branch.