Skip to contentSkip to conversation

luckfox-lyra-plus: add

PATCH In review Marcin Bober 3 participants 5 messages Jan 27 – Jan 29 1 message not in the archive Arm Rockchip

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 luckfox-lyra-plus: add

The Luckfox Lyra Plus is ultra-small, tri-core single board computer based on the Rockchip RK3506G2, with a very compact form factor.

---
 README                                        |  1 +
 conf/machine/include/rk3506.inc               | 20 +++++++++++++
 conf/machine/include/rk3568.inc               |  1 -
 conf/machine/include/rk3588s.inc              |  1 -
 conf/machine/luckfox-lyra-plus.conf           | 27 +++++++++++++++++
 recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb   |  9 ++++++
 .../rkbin/rockchip-rkbin-optee-os_git.bb      |  5 ++++
 recipes-bsp/rkbin/rockchip-rkbin.inc          |  1 +
 recipes-bsp/u-boot/u-boot-rockchip.inc        |  2 ++
 recipes-bsp/u-boot/u-boot_%.bbappend          |  4 +++
 recipes-kernel/linux/linux-armbian_git.bb     | 29 +++++++++++++++++++
 11 files changed, 98 insertions(+), 2 deletions(-)
 create mode 100644 conf/machine/include/rk3506.inc
 create mode 100644 conf/machine/luckfox-lyra-plus.conf
 create mode 100644 recipes-kernel/linux/linux-armbian_git.bb
README +1 -0
index 6bceba0..3991415 100644
@@ -23,6 +23,7 @@ Status of supported boards:
 			tinker-board
 			tinker-board-s
 			vyasa-rk3288
+			luckfox-lyra-plus
 
 		64-bit:
 			nanopi-m4
conf/machine/include/rk3506.inc new file +20 -0
new file mode 100644
index 0000000..e204283
@@ -0,0 +1,20 @@
+MACHINEOVERRIDES =. "rk3506:"
+SOC_FAMILY = "rk3506"
+DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv7a/tune-cortexa7.inc
+require conf/machine/include/rockchip-wic.inc
+
+PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os"
+
+KBUILD_DEFCONFIG ?= "rk3506_defconfig"
+KERNEL_CLASSES = "kernel-fitimage"
+KERNEL_IMAGETYPE ?= "fitImage"
+
+UBOOT_SUFFIX ?= "itb"
+UBOOT_ENTRYPOINT ?= "0x02800000"
+UBOOT_EXTLINUX_FDT = "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}"
conf/machine/include/rk3568.inc +0 -1
index bcf9dd8..12f0ba2 100644
@@ -10,7 +10,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa55.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"
 
conf/machine/include/rk3588s.inc +0 -1
index 6ec344a..d0654c1 100644
@@ -9,7 +9,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc
 require conf/machine/include/rockchip-wic.inc
 
 KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3588s = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"
 KERNEL_CLASSES = "kernel-fitimage"
 KERNEL_IMAGETYPE ?= "fitImage"
 
conf/machine/luckfox-lyra-plus.conf new file +27 -0
new file mode 100644
index 0000000..529a472
@@ -0,0 +1,27 @@
+#@TYPE: Machine
+#@NAME: Luckfox Lyra Plus
+#@DESCRIPTION: RK3506G2 based Linux Micro Development Board
+#https://www.luckfox.com/Luckfox-Lyra-Plus
+
+require conf/machine/include/rk3506.inc
+
+KERNEL_DEVICETREE ?= "rk3506g-luckfox-lyra-plus-sd.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+PREFERRED_PROVIDER_virtual/kernel = "linux-armbian"
+EXTERNAL_KERNEL_DEVICETREE = "${DEPLOY_DIR_IMAGE}/devicetree"
+
+UBOOT_MACHINE = "luckfox-lyra-rk3506_defconfig"
+
+MACHINE_FEATURES = " \
+  rtc \
+  screen \
+  serial \
+  usbgadget \
+  usbhost \
+  vfat \
+"
+
+KERNEL_FEATURES += " \
+  cfg/fs/ext4.scc \
+  features/cgroups/cgroups.scc \
+"
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +9 -0
index 3227a53..7f654ff 100644
@@ -10,6 +10,15 @@ do_deploy:rk3308() {
 	install -m 644 ${S}/bin/rk33/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3308.bin
 }
 
+DDRBIN_VERS:rk3506 ?= "v1.02"
+DDRBIN_FILE:rk3506 ?= "rk3506_ddr_750MHz_${DDRBIN_VERS}.bin"
+
+do_deploy:rk3506() {
+	# Prebuilt U-Boot TPL (DDR init)
+	install -m 644 ${S}/bin/rk35/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3506.bin
+	install -m 644 ${S}/bin/rk35/rk3506_tee_v1.23.bin ${DEPLOYDIR}/tee-rk3506.bin
+}
+
 DDRBIN_VERS:rk3566 ?= "v1.23"
 DDRBIN_FILE:rk3566 ?= "rk3566_ddr_1056MHz_${DDRBIN_VERS}.bin"
 
recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +5 -0
index 6d25368..cbd376c 100644
@@ -9,6 +9,11 @@ do_deploy:rk3308() {
 	install -m 644 ${S}/bin/rk33/rk3308_bl32_v*.bin ${DEPLOYDIR}/tee-rk3308.bin
 }
 
+do_deploy:rk3506() {
+	# Prebuilt OPTEE-OS
+	install -m 644 ${S}/bin/rk35/rk3506_tee_v*.bin ${DEPLOYDIR}/tee-rk3506.bin
+}
+
 # NOTE: the following are not typos
 #       the rk3566 uses the same bl32 as the rk3568
 do_deploy:rk3566() {
recipes-bsp/rkbin/rockchip-rkbin.inc +1 -0
index 9264db9..8dfdc09 100644
@@ -11,6 +11,7 @@ S = "${WORKDIR}/git"
 
 COMPATIBLE_MACHINE = "^$"
 COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3506 = "rk3506"
 COMPATIBLE_MACHINE:rk3566 = "rk3566"
 COMPATIBLE_MACHINE:rk3568 = "rk3568"
 COMPATIBLE_MACHINE:rk3588s = "rk3588s"
recipes-bsp/u-boot/u-boot-rockchip.inc +2 -0
index 2b5bbd7..67c4418 100644
@@ -11,7 +11,9 @@ do_compile[depends] .= "${TFA_DEPENDS}"
 ROCKCHIP_TPL:closed-tpl = "${DEPLOY_DIR_IMAGE}/ddr-${SOC_FAMILY}.bin"
 # SOC_FAMILY for RK3588S is rk3588s but it should use the binaries from rk3588
 ROCKCHIP_TPL:closed-tpl:rk3588s = "${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin"
+ROCKCHIP_TEE:closed-tpl:rk3506 = "${DEPLOY_DIR_IMAGE}/tee-rk3506.bin"
 EXTRA_OEMAKE:append:closed-tpl = " ROCKCHIP_TPL=${ROCKCHIP_TPL}"
+EXTRA_OEMAKE:append:closed-tpl:rk3506 = " TEE=${ROCKCHIP_TEE}"
 
 INIT_FIRMWARE_DEPENDS ??= ""
 INIT_FIRMWARE_DEPENDS:closed-tpl = " rockchip-rkbin-ddr:do_deploy"
recipes-bsp/u-boot/u-boot_%.bbappend +4 -0
index 08e1730..fc6a36e 100644
@@ -8,6 +8,10 @@ DEPENDS:append:rk3308 = " u-boot-tools-native"
 DEPENDS:append:rock-pi-4 = " gnutls-native"
 DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native"
 
+BRANCH:luckfox-lyra-plus = "rk3506"
+SRC_URI:luckfox-lyra-plus = "git://source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=${BRANCH}"
+SRCREV:luckfox-lyra-plus = "c6782a37feee4a8aee08d321c01b4ca0b0562f0b"
+
 do_compile:append:rock2-square () {
 	# copy to default search path
 	if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
recipes-kernel/linux/linux-armbian_git.bb new file +29 -0
new file mode 100644
index 0000000..42dad4f
@@ -0,0 +1,29 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+
+LINUX_VERSION = "6.1.115"
+KBRANCH = "rk-6.1-rkr5.1"
+SRCREV_kernel = "b908c7339f51eddcfe8402cd15d1e1f8f4e67c29"
+SRCREV_yocto-meta = "7545dc5bc77560f4b1b6efc47b56e953dc86572d"
+PV = "${LINUX_VERSION}"
+
+SRC_URI = " \
+	git://github.com/armbian/linux-rockchip.git;name=kernel;protocol=https;branch=${KBRANCH} \
+	git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=yocto-meta;branch=yocto-6.1;destsuffix=kernel-meta;protocol=https \
+"
+
+DEPENDS += "lzop-native"
+FIT_KERNEL_COMP_ALG ?= "lzo"
+FIT_KERNEL_COMP_ALG_EXTENSION ?= ".lzo"
+
+COMPATIBLE_MACHINE:luckfox-lyra-plus = "luckfox-lyra-plus"
+
+inherit kernel
+inherit kernel-yocto
+require recipes-kernel/linux/linux-yocto.inc
+
+INSANE_SKIP:${PN}-src += "buildpaths"
#1 lore raw

Hi Marcin,

Quoted 28 lines · Marcin Bober via lists.yoctoproject.org

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The Luckfox Lyra Plus is ultra-small, tri-core single board computer based on the Rockchip RK3506G2, with a very compact form factor.

---
  README                                        |  1 +
  conf/machine/include/rk3506.inc               | 20 +++++++++++++
  conf/machine/include/rk3568.inc               |  1 -
  conf/machine/include/rk3588s.inc              |  1 -
  conf/machine/luckfox-lyra-plus.conf           | 27 +++++++++++++++++
  recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb   |  9 ++++++
  .../rkbin/rockchip-rkbin-optee-os_git.bb      |  5 ++++
  recipes-bsp/rkbin/rockchip-rkbin.inc          |  1 +
  recipes-bsp/u-boot/u-boot-rockchip.inc        |  2 ++
  recipes-bsp/u-boot/u-boot_%.bbappend          |  4 +++
  recipes-kernel/linux/linux-armbian_git.bb     | 29 +++++++++++++++++++
  11 files changed, 98 insertions(+), 2 deletions(-)

create mode 100644 conf/machine/include/rk3506.inc create mode 100644 conf/machine/luckfox-lyra-plus.conf create mode 100644 recipes-kernel/linux/linux-armbian_git.bb

README +0 -0
index 6bceba0..3991415 100644

README Status of supported boards: · line 26

Quoted 4 lines
README +1 -0
@@ -23,6 +23,7 @@ Status of supported boards:
                         tinker-board
                         tinker-board-s
                         vyasa-rk3288
+                       luckfox-lyra-plus

Please keep the list ordered alphabetically.

Quoted 12 lines
README +0 -0
                 64-bit:
                         nanopi-m4
conf/machine/include/rk3506.inc new file +3 -0
new file mode 100644
index 0000000..e204283
@@ -0,0 +1,20 @@
+MACHINEOVERRIDES =. "rk3506:"
+SOC_FAMILY = "rk3506"
+DEFAULTTUNE = "cortexa7thf-neon-vfpv4"

conf/machine/include/rk3506.inc line 13

Quoted 10 lines
conf/machine/include/rk3506.inc new file +10 -0
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv7a/tune-cortexa7.inc
+require conf/machine/include/rockchip-wic.inc
+
+PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os"
+

Ooooh, I believe this would mean OP-TEE OS blob from Rockchip can be used with upstream U-Boot? Have you actually tried? This would be interesting for me for https://lore.kernel.org/yocto-patches/[email protected]/ to check if I got it right for rockchip-rkbin-optee-os as well.

Is OP-TEE OS *required* on rk3506 to be able to boot? Do you know?

Essentially, with the patch series listed above applied, you would need to set RK_UBOOT_TEE = "1" and then U-Boot would automatically add the necessary dependency and add the correct filepath to the TEE environment variable.

conf/machine/include/rk3506.inc line 14

Quoted 1 line
conf/machine/include/rk3506.inc new file +1 -0
+KBUILD_DEFCONFIG ?= "rk3506_defconfig"

Usually we would rather have multi_v7_defconfig and if needed apply .scc+.cfg config fragments (see what's been done for nanopi-r4s).

conf/machine/include/rk3506.inc line 17

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+KERNEL_CLASSES = "kernel-fitimage"
+KERNEL_IMAGETYPE ?= "fitImage"
+

Isn't a FIT image the default when you include rockchip-defaults? See RK_KERNEL_FITIMAGE variable.

conf/machine/include/rk3506.inc line 20

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+UBOOT_SUFFIX ?= "itb"
+UBOOT_ENTRYPOINT ?= "0x02800000"
+UBOOT_EXTLINUX_FDT = "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}"

isn't that already handled with RK_KERNEL_FITIMAGE from within conf/machine/include/rockchip-extlinux.inc (you may then want to require this file).

conf/machine/include/rk3568.inc require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc · line 13

Quoted 9 lines
conf/machine/include/rk3568.inc +0 -1
index bcf9dd8..12f0ba2 100644
@@ -10,7 +10,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

This has nothing to do with adding support for this new device no?

conf/machine/include/rk3588s.inc require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc · line 12

Quoted 12 lines
conf/machine/include/rk3568.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
conf/machine/include/rk3588s.inc +0 -1
index 6ec344a..d0654c1 100644
@@ -9,7 +9,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3588s = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

This has nothing to do with adding support for this new device no?

Quoted 9 lines
conf/machine/include/rk3588s.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
conf/machine/luckfox-lyra-plus.conf new file +0 -0
new file mode 100644
index 0000000..529a472

conf/machine/luckfox-lyra-plus.conf line 10

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +10 -0
@@ -0,0 +1,27 @@
+#@TYPE: Machine
+#@NAME: Luckfox Lyra Plus
+#@DESCRIPTION: RK3506G2 based Linux Micro Development Board
+#https://www.luckfox.com/Luckfox-Lyra-Plus
+
+require conf/machine/include/rk3506.inc
+
+KERNEL_DEVICETREE ?= "rk3506g-luckfox-lyra-plus-sd.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+PREFERRED_PROVIDER_virtual/kernel = "linux-armbian"

I believe we only take boards which are supported by linux-yocto or linux-yocto-dev from the master branch of OE-Core. I don't even see patches on the linux-rockchip mailing list

Quoted 7 lines
conf/machine/luckfox-lyra-plus.conf new file +7 -0
+EXTERNAL_KERNEL_DEVICETREE = "${DEPLOY_DIR_IMAGE}/devicetree"
+
+UBOOT_MACHINE = "luckfox-lyra-rk3506_defconfig"
+
+MACHINE_FEATURES = " \
+  rtc \
+  screen \

conf/machine/luckfox-lyra-plus.conf line 27

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +10 -0
+  serial \
+  usbgadget \
+  usbhost \
+  vfat \
+"
+
+KERNEL_FEATURES += " \
+  cfg/fs/ext4.scc \
+  features/cgroups/cgroups.scc \
+"

KERNEL_FEATURES must be listed in the kernel recipe not in the machine.

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

Quoted 8 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +0 -0
index 3227a53..7f654ff 100644
@@ -10,6 +10,15 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3308.bin
  }
 

Wait.... This doesn't exist anymore. Against which branch did you develop this patch?

The master branch has a completely different mechanism which is much more automatic than what's needed below.

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

Quoted 7 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +7 -0
+DDRBIN_VERS:rk3506 ?= "v1.02"
+DDRBIN_FILE:rk3506 ?= "rk3506_ddr_750MHz_${DDRBIN_VERS}.bin"
+
+do_deploy:rk3506() {
+       # Prebuilt U-Boot TPL (DDR init)
+       install -m 644 ${S}/bin/rk35/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3506.bin
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v1.23.bin ${DEPLOYDIR}/tee-rk3506.bin

This is TEE, not DRAM init blob so shouldn't be deployed in this recipe.

Quoted 37 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +2 -0
+}
+>   DDRBIN_VERS:rk3566 ?= "v1.23"
  DDRBIN_FILE:rk3566 ?= "rk3566_ddr_1056MHz_${DDRBIN_VERS}.bin"
 
recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +5 -0
index 6d25368..cbd376c 100644
@@ -9,6 +9,11 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/rk3308_bl32_v*.bin ${DEPLOYDIR}/tee-rk3308.bin
  }
 
+do_deploy:rk3506() {
+       # Prebuilt OPTEE-OS
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v*.bin ${DEPLOYDIR}/tee-rk3506.bin
+}
+
  # NOTE: the following are not typos
  #       the rk3566 uses the same bl32 as the rk3568
  do_deploy:rk3566() {
recipes-bsp/rkbin/rockchip-rkbin.inc +1 -0
index 9264db9..8dfdc09 100644
@@ -11,6 +11,7 @@ S = "${WORKDIR}/git"
 
  COMPATIBLE_MACHINE = "^$"
  COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3506 = "rk3506"
  COMPATIBLE_MACHINE:rk3566 = "rk3566"
  COMPATIBLE_MACHINE:rk3568 = "rk3568"
  COMPATIBLE_MACHINE:rk3588s = "rk3588s"
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
index 2b5bbd7..67c4418 100644

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 17

Quoted 7 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +2 -0
@@ -11,7 +11,9 @@ do_compile[depends] .= "${TFA_DEPENDS}"
  ROCKCHIP_TPL:closed-tpl = "${DEPLOY_DIR_IMAGE}/ddr-${SOC_FAMILY}.bin"
  # SOC_FAMILY for RK3588S is rk3588s but it should use the binaries from rk3588
  ROCKCHIP_TPL:closed-tpl:rk3588s = "${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin"
+ROCKCHIP_TEE:closed-tpl:rk3506 = "${DEPLOY_DIR_IMAGE}/tee-rk3506.bin"
  EXTRA_OEMAKE:append:closed-tpl = " ROCKCHIP_TPL=${ROCKCHIP_TPL}"
+EXTRA_OEMAKE:append:closed-tpl:rk3506 = " TEE=${ROCKCHIP_TEE}"
 

I think you only want

ROCKCHIP_TEE:rk3506

and

EXTRA_OEMAKE:append:rk3506

as I believe TEE has nothing to do with whether we're using a DRAM init blob?

Also, this isn't working because you forgot to add the dependency on optee-os (see do_compile[depends] .= "${TFA_DEPENDS}" for how we have the dependency for trsuted-firmware-a on Aarch64).

Quoted 7 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
  INIT_FIRMWARE_DEPENDS ??= ""
  INIT_FIRMWARE_DEPENDS:closed-tpl = " rockchip-rkbin-ddr:do_deploy"
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
index 08e1730..fc6a36e 100644

recipes-bsp/u-boot/u-boot_%.bbappend DEPENDS:append:rk3308 = " u-boot-tools-native" · line 14

Quoted 7 lines
recipes-bsp/u-boot/u-boot_%.bbappend +4 -0
@@ -8,6 +8,10 @@ DEPENDS:append:rk3308 = " u-boot-tools-native"
  DEPENDS:append:rock-pi-4 = " gnutls-native"
  DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native"
 
+BRANCH:luckfox-lyra-plus = "rk3506"
+SRC_URI:luckfox-lyra-plus = "git://source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=${BRANCH}"
+SRCREV:luckfox-lyra-plus = "c6782a37feee4a8aee08d321c01b4ca0b0562f0b"
+

That's a BIG no-no.

Have a separate recipe for this.

Knowing Jonas, there are chances this branch will get rebased, so I don't think we want this at all.

I see patches on the U-Boot mailing list for RK3506 support in U-Boot, see https://lore.kernel.org/u-boot/[email protected]/ and Jonas "promised" a v2. Maybe work with him on getting the v2 sent upstream?

recipes-kernel/linux/linux-armbian_git.bb

Quoted 8 lines
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
  do_compile:append:rock2-square () {
         # copy to default search path
         if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
recipes-kernel/linux/linux-armbian_git.bb new file +0 -0
new file mode 100644
index 0000000..42dad4f

I'll let Trevor speak his mind here but I don't think Armbian Linux kernel is something we're interested in supporting. Work with upstream to get the board supported in upstream Linux and then we can have it here.

Cheers,
Quentin

#2 lore raw

Thank you, Quentin, for your thorough review!

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

Hi Marcin,

Quoted 28 lines · Marcin Bober via lists.yoctoproject.org

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The Luckfox Lyra Plus is ultra-small, tri-core single board computer based on the Rockchip RK3506G2, with a very compact form factor.

---
  README                                        |  1 +
  conf/machine/include/rk3506.inc               | 20 +++++++++++++
  conf/machine/include/rk3568.inc               |  1 -
  conf/machine/include/rk3588s.inc              |  1 -
  conf/machine/luckfox-lyra-plus.conf           | 27 +++++++++++++++++
  recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb   |  9 ++++++
  .../rkbin/rockchip-rkbin-optee-os_git.bb      |  5 ++++
  recipes-bsp/rkbin/rockchip-rkbin.inc          |  1 +
  recipes-bsp/u-boot/u-boot-rockchip.inc        |  2 ++
  recipes-bsp/u-boot/u-boot_%.bbappend          |  4 +++
  recipes-kernel/linux/linux-armbian_git.bb     | 29 +++++++++++++++++++
  11 files changed, 98 insertions(+), 2 deletions(-)

create mode 100644 conf/machine/include/rk3506.inc create mode 100644 conf/machine/luckfox-lyra-plus.conf create mode 100644 recipes-kernel/linux/linux-armbian_git.bb

README +0 -0
index 6bceba0..3991415 100644

README Status of supported boards: · line 26

Quoted 4 lines
README +1 -0
@@ -23,6 +23,7 @@ Status of supported boards:
                         tinker-board
                         tinker-board-s
                         vyasa-rk3288
+                       luckfox-lyra-plus

Please keep the list ordered alphabetically.

Quoted 12 lines
README +0 -0
                 64-bit:
                         nanopi-m4
conf/machine/include/rk3506.inc new file +3 -0
new file mode 100644
index 0000000..e204283
@@ -0,0 +1,20 @@
+MACHINEOVERRIDES =. "rk3506:"
+SOC_FAMILY = "rk3506"
+DEFAULTTUNE = "cortexa7thf-neon-vfpv4"

conf/machine/include/rk3506.inc line 13

Quoted 10 lines
conf/machine/include/rk3506.inc new file +10 -0
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv7a/tune-cortexa7.inc
+require conf/machine/include/rockchip-wic.inc
+
+PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os"
+

Ooooh, I believe this would mean OP-TEE OS blob from Rockchip can be used with upstream U-Boot? Have you actually tried? This would be interesting for me for https://lore.kernel.org/yocto-patches/[email protected]/
to check if I got it right for rockchip-rkbin-optee-os as well.

Is OP-TEE OS *required* on rk3506 to be able to boot? Do you know?

Essentially, with the patch series listed above applied, you would need to set RK_UBOOT_TEE = "1" and then U-Boot would automatically add the necessary dependency and add the correct filepath to the TEE environment variable.

conf/machine/include/rk3506.inc line 14

Quoted 1 line
conf/machine/include/rk3506.inc new file +1 -0
+KBUILD_DEFCONFIG ?= "rk3506_defconfig"

Usually we would rather have multi_v7_defconfig and if needed apply .scc+.cfg config fragments (see what's been done for nanopi-r4s).

conf/machine/include/rk3506.inc line 17

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+KERNEL_CLASSES = "kernel-fitimage"
+KERNEL_IMAGETYPE ?= "fitImage"
+

Isn't a FIT image the default when you include rockchip-defaults? See RK_KERNEL_FITIMAGE variable.

conf/machine/include/rk3506.inc line 20

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+UBOOT_SUFFIX ?= "itb"
+UBOOT_ENTRYPOINT ?= "0x02800000"
+UBOOT_EXTLINUX_FDT = "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}"

isn't that already handled with RK_KERNEL_FITIMAGE from within conf/machine/include/rockchip-extlinux.inc (you may then want to require this file).

conf/machine/include/rk3568.inc require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc · line 13

Quoted 9 lines
conf/machine/include/rk3568.inc +0 -1
index bcf9dd8..12f0ba2 100644
@@ -10,7 +10,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

This has nothing to do with adding support for this new device no?

conf/machine/include/rk3588s.inc require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc · line 12

Quoted 12 lines
conf/machine/include/rk3568.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
conf/machine/include/rk3588s.inc +0 -1
index 6ec344a..d0654c1 100644
@@ -9,7 +9,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3588s = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

This has nothing to do with adding support for this new device no?

Quoted 3 lines
conf/machine/include/rk3588s.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
Quoted 10 lines

conf/machine/luckfox-lyra-plus.conf line 4

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +4 -0
new file mode 100644
index 0000000..529a472
@@ -0,0 +1,27 @@
+#@TYPE: Machine
+#@NAME: Luckfox Lyra Plus
+#@DESCRIPTION: RK3506G2 based Linux Micro Development Board
+#https://www.luckfox.com/Luckfox-Lyra-Plus

Usually I would be excited about a tiny rockchip-based SBC with hardwired ethernet. But a new SoC based on CortexA7 (i.e. 32-bit)?? And no SDcard?

Hopefully someone comes out with something new to replace the zero-3e which appears to be out of production.

Quoted 142 lines

conf/machine/luckfox-lyra-plus.conf line 10

Quoted 6 lines
conf/machine/luckfox-lyra-plus.conf new file +6 -0
+
+require conf/machine/include/rk3506.inc
+
+KERNEL_DEVICETREE ?= "rk3506g-luckfox-lyra-plus-sd.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+PREFERRED_PROVIDER_virtual/kernel = "linux-armbian"

I believe we only take boards which are supported by linux-yocto or linux-yocto-dev from the master branch of OE-Core. I don't even see patches on the linux-rockchip mailing list

Quoted 7 lines
conf/machine/luckfox-lyra-plus.conf new file +7 -0
+EXTERNAL_KERNEL_DEVICETREE = "${DEPLOY_DIR_IMAGE}/devicetree"
+
+UBOOT_MACHINE = "luckfox-lyra-rk3506_defconfig"
+
+MACHINE_FEATURES = " \
+  rtc \
+  screen \

conf/machine/luckfox-lyra-plus.conf line 27

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +10 -0
+  serial \
+  usbgadget \
+  usbhost \
+  vfat \
+"
+
+KERNEL_FEATURES += " \
+  cfg/fs/ext4.scc \
+  features/cgroups/cgroups.scc \
+"

KERNEL_FEATURES must be listed in the kernel recipe not in the machine.

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

Quoted 8 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +0 -0
index 3227a53..7f654ff 100644
@@ -10,6 +10,15 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3308.bin
  }
 

Wait.... This doesn't exist anymore. Against which branch did you develop this patch?

The master branch has a completely different mechanism which is much more automatic than what's needed below.

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

Quoted 7 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +7 -0
+DDRBIN_VERS:rk3506 ?= "v1.02"
+DDRBIN_FILE:rk3506 ?= "rk3506_ddr_750MHz_${DDRBIN_VERS}.bin"
+
+do_deploy:rk3506() {
+       # Prebuilt U-Boot TPL (DDR init)
+       install -m 644 ${S}/bin/rk35/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3506.bin
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v1.23.bin ${DEPLOYDIR}/tee-rk3506.bin

This is TEE, not DRAM init blob so shouldn't be deployed in this recipe.

Quoted 37 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +2 -0
+}
+>   DDRBIN_VERS:rk3566 ?= "v1.23"
  DDRBIN_FILE:rk3566 ?= "rk3566_ddr_1056MHz_${DDRBIN_VERS}.bin"
 
recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +5 -0
index 6d25368..cbd376c 100644
@@ -9,6 +9,11 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/rk3308_bl32_v*.bin ${DEPLOYDIR}/tee-rk3308.bin
  }
 
+do_deploy:rk3506() {
+       # Prebuilt OPTEE-OS
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v*.bin ${DEPLOYDIR}/tee-rk3506.bin
+}
+
  # NOTE: the following are not typos
  #       the rk3566 uses the same bl32 as the rk3568
  do_deploy:rk3566() {
recipes-bsp/rkbin/rockchip-rkbin.inc +1 -0
index 9264db9..8dfdc09 100644
@@ -11,6 +11,7 @@ S = "${WORKDIR}/git"
 
  COMPATIBLE_MACHINE = "^$"
  COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3506 = "rk3506"
  COMPATIBLE_MACHINE:rk3566 = "rk3566"
  COMPATIBLE_MACHINE:rk3568 = "rk3568"
  COMPATIBLE_MACHINE:rk3588s = "rk3588s"
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
index 2b5bbd7..67c4418 100644

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 17

Quoted 7 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +2 -0
@@ -11,7 +11,9 @@ do_compile[depends] .= "${TFA_DEPENDS}"
  ROCKCHIP_TPL:closed-tpl = "${DEPLOY_DIR_IMAGE}/ddr-${SOC_FAMILY}.bin"
  # SOC_FAMILY for RK3588S is rk3588s but it should use the binaries from rk3588
  ROCKCHIP_TPL:closed-tpl:rk3588s = "${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin"
+ROCKCHIP_TEE:closed-tpl:rk3506 = "${DEPLOY_DIR_IMAGE}/tee-rk3506.bin"
  EXTRA_OEMAKE:append:closed-tpl = " ROCKCHIP_TPL=${ROCKCHIP_TPL}"
+EXTRA_OEMAKE:append:closed-tpl:rk3506 = " TEE=${ROCKCHIP_TEE}"
 

I think you only want

ROCKCHIP_TEE:rk3506

and

EXTRA_OEMAKE:append:rk3506

as I believe TEE has nothing to do with whether we're using a DRAM init blob?

Also, this isn't working because you forgot to add the dependency on optee-os (see do_compile[depends] .= "${TFA_DEPENDS}" for how we have the dependency for trsuted-firmware-a on Aarch64).

Quoted 7 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
  INIT_FIRMWARE_DEPENDS ??= ""
  INIT_FIRMWARE_DEPENDS:closed-tpl = " rockchip-rkbin-ddr:do_deploy"
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
index 08e1730..fc6a36e 100644

recipes-bsp/u-boot/u-boot_%.bbappend DEPENDS:append:rk3308 = " u-boot-tools-native" · line 14

Quoted 7 lines
recipes-bsp/u-boot/u-boot_%.bbappend +4 -0
@@ -8,6 +8,10 @@ DEPENDS:append:rk3308 = " u-boot-tools-native"
  DEPENDS:append:rock-pi-4 = " gnutls-native"
  DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native"
 
+BRANCH:luckfox-lyra-plus = "rk3506"
+SRC_URI:luckfox-lyra-plus = "git://source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=${BRANCH}"
+SRCREV:luckfox-lyra-plus = "c6782a37feee4a8aee08d321c01b4ca0b0562f0b"
+

That's a BIG no-no.

Have a separate recipe for this.

Knowing Jonas, there are chances this branch will get rebased, so I don't think we want this at all.

I see patches on the U-Boot mailing list for RK3506 support in U-Boot, see
https://lore.kernel.org/u-boot/[email protected]/ and Jonas "promised" a v2. Maybe work with him on getting the v2 sent upstream?

Quoted 12 lines

recipes-kernel/linux/linux-armbian_git.bb

Quoted 8 lines
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
  do_compile:append:rock2-square () {
         # copy to default search path
         if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
recipes-kernel/linux/linux-armbian_git.bb new file +0 -0
new file mode 100644
index 0000000..42dad4f

I'll let Trevor speak his mind here but I don't think Armbian Linux kernel is something we're interested in supporting. Work with upstream to get the board supported in upstream Linux and then we can have it here.

I agree with Quentin's assessment. If rockchip were a platform that had little or no upstream support then we would need to have all sorts of recipes for bootloaders and kernels from wherever we could find them. But with rockchip, upstream support is usually just a matter of time. I'll take new machines if they're in linux-yocto-dev, but would rather stay away from vendor kernels.

If a board is wildly popular and will never have upstream support then I would consider it. But if Jonas is already working on it, then we will probably see upstream support shortly.

Quoted 13 lines

Cheers,
Quentin

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 125 lines · Trevor Woerner via lists.yoctoproject.org

Thank you, Quentin, for your thorough review!

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

Hi Marcin,

Quoted 28 lines · Marcin Bober via lists.yoctoproject.org

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The Luckfox Lyra Plus is ultra-small, tri-core single board computer based on the Rockchip RK3506G2, with a very compact form factor.

---
  README                                        |  1 +
  conf/machine/include/rk3506.inc               | 20 +++++++++++++
  conf/machine/include/rk3568.inc               |  1 -
  conf/machine/include/rk3588s.inc              |  1 -
  conf/machine/luckfox-lyra-plus.conf           | 27 +++++++++++++++++
  recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb   |  9 ++++++
  .../rkbin/rockchip-rkbin-optee-os_git.bb      |  5 ++++
  recipes-bsp/rkbin/rockchip-rkbin.inc          |  1 +
  recipes-bsp/u-boot/u-boot-rockchip.inc        |  2 ++
  recipes-bsp/u-boot/u-boot_%.bbappend          |  4 +++
  recipes-kernel/linux/linux-armbian_git.bb     | 29 +++++++++++++++++++
  11 files changed, 98 insertions(+), 2 deletions(-)

create mode 100644 conf/machine/include/rk3506.inc create mode 100644 conf/machine/luckfox-lyra-plus.conf create mode 100644 recipes-kernel/linux/linux-armbian_git.bb

README +0 -0
index 6bceba0..3991415 100644

README Status of supported boards: · line 26

Quoted 4 lines
README +1 -0
@@ -23,6 +23,7 @@ Status of supported boards:
                         tinker-board
                         tinker-board-s
                         vyasa-rk3288
+                       luckfox-lyra-plus

Please keep the list ordered alphabetically.

Quoted 12 lines
README +0 -0
                 64-bit:
                         nanopi-m4
conf/machine/include/rk3506.inc new file +3 -0
new file mode 100644
index 0000000..e204283
@@ -0,0 +1,20 @@
+MACHINEOVERRIDES =. "rk3506:"
+SOC_FAMILY = "rk3506"
+DEFAULTTUNE = "cortexa7thf-neon-vfpv4"

conf/machine/include/rk3506.inc line 13

Quoted 10 lines
conf/machine/include/rk3506.inc new file +10 -0
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv7a/tune-cortexa7.inc
+require conf/machine/include/rockchip-wic.inc
+
+PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os"
+

Ooooh, I believe this would mean OP-TEE OS blob from Rockchip can be used with upstream U-Boot? Have you actually tried? This would be interesting for me for https://lore.kernel.org/yocto-patches/[email protected]/
to check if I got it right for rockchip-rkbin-optee-os as well.

Is OP-TEE OS *required* on rk3506 to be able to boot? Do you know?

Essentially, with the patch series listed above applied, you would need to set RK_UBOOT_TEE = "1" and then U-Boot would automatically add the necessary dependency and add the correct filepath to the TEE environment variable.

conf/machine/include/rk3506.inc line 14

Quoted 1 line
conf/machine/include/rk3506.inc new file +1 -0
+KBUILD_DEFCONFIG ?= "rk3506_defconfig"

Usually we would rather have multi_v7_defconfig and if needed apply .scc+.cfg config fragments (see what's been done for nanopi-r4s).

conf/machine/include/rk3506.inc line 17

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+KERNEL_CLASSES = "kernel-fitimage"
+KERNEL_IMAGETYPE ?= "fitImage"
+

Isn't a FIT image the default when you include rockchip-defaults? See RK_KERNEL_FITIMAGE variable.

conf/machine/include/rk3506.inc line 20

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+UBOOT_SUFFIX ?= "itb"
+UBOOT_ENTRYPOINT ?= "0x02800000"
+UBOOT_EXTLINUX_FDT = "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}"

isn't that already handled with RK_KERNEL_FITIMAGE from within conf/machine/include/rockchip-extlinux.inc (you may then want to require this file).

conf/machine/include/rk3568.inc require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc · line 13

Quoted 9 lines
conf/machine/include/rk3568.inc +0 -1
index bcf9dd8..12f0ba2 100644
@@ -10,7 +10,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3568 = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

This has nothing to do with adding support for this new device no?

conf/machine/include/rk3588s.inc require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc · line 12

Quoted 12 lines
conf/machine/include/rk3568.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
conf/machine/include/rk3588s.inc +0 -1
index 6ec344a..d0654c1 100644
@@ -9,7 +9,6 @@ require conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3588s = " bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

This has nothing to do with adding support for this new device no?

Quoted 3 lines
conf/machine/include/rk3588s.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
Quoted 14 lines
Quoted 10 lines

conf/machine/luckfox-lyra-plus.conf line 4

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +4 -0
new file mode 100644
index 0000000..529a472
@@ -0,0 +1,27 @@
+#@TYPE: Machine
+#@NAME: Luckfox Lyra Plus
+#@DESCRIPTION: RK3506G2 based Linux Micro Development Board
+#https://www.luckfox.com/Luckfox-Lyra-Plus

Usually I would be excited about a tiny rockchip-based SBC with hardwired ethernet. But a new SoC based on CortexA7 (i.e. 32-bit)?? And no SDcard?

Oops, my mistake. There is an SDcard slot.
(hadn't scrolled down far enough)

Quoted 188 lines

Hopefully someone comes out with something new to replace the zero-3e which appears to be out of production.

Quoted 142 lines

conf/machine/luckfox-lyra-plus.conf line 10

Quoted 6 lines
conf/machine/luckfox-lyra-plus.conf new file +6 -0
+
+require conf/machine/include/rk3506.inc
+
+KERNEL_DEVICETREE ?= "rk3506g-luckfox-lyra-plus-sd.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+PREFERRED_PROVIDER_virtual/kernel = "linux-armbian"

I believe we only take boards which are supported by linux-yocto or linux-yocto-dev from the master branch of OE-Core. I don't even see patches on the linux-rockchip mailing list

Quoted 7 lines
conf/machine/luckfox-lyra-plus.conf new file +7 -0
+EXTERNAL_KERNEL_DEVICETREE = "${DEPLOY_DIR_IMAGE}/devicetree"
+
+UBOOT_MACHINE = "luckfox-lyra-rk3506_defconfig"
+
+MACHINE_FEATURES = " \
+  rtc \
+  screen \

conf/machine/luckfox-lyra-plus.conf line 27

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +10 -0
+  serial \
+  usbgadget \
+  usbhost \
+  vfat \
+"
+
+KERNEL_FEATURES += " \
+  cfg/fs/ext4.scc \
+  features/cgroups/cgroups.scc \
+"

KERNEL_FEATURES must be listed in the kernel recipe not in the machine.

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

Quoted 8 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +0 -0
index 3227a53..7f654ff 100644
@@ -10,6 +10,15 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3308.bin
  }
 

Wait.... This doesn't exist anymore. Against which branch did you develop this patch?

The master branch has a completely different mechanism which is much more automatic than what's needed below.

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

Quoted 7 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +7 -0
+DDRBIN_VERS:rk3506 ?= "v1.02"
+DDRBIN_FILE:rk3506 ?= "rk3506_ddr_750MHz_${DDRBIN_VERS}.bin"
+
+do_deploy:rk3506() {
+       # Prebuilt U-Boot TPL (DDR init)
+       install -m 644 ${S}/bin/rk35/${DDRBIN_FILE} ${DEPLOYDIR}/ddr-rk3506.bin
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v1.23.bin ${DEPLOYDIR}/tee-rk3506.bin

This is TEE, not DRAM init blob so shouldn't be deployed in this recipe.

Quoted 37 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +2 -0
+}
+>   DDRBIN_VERS:rk3566 ?= "v1.23"
  DDRBIN_FILE:rk3566 ?= "rk3566_ddr_1056MHz_${DDRBIN_VERS}.bin"
 
recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +5 -0
index 6d25368..cbd376c 100644
@@ -9,6 +9,11 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/rk3308_bl32_v*.bin ${DEPLOYDIR}/tee-rk3308.bin
  }
 
+do_deploy:rk3506() {
+       # Prebuilt OPTEE-OS
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v*.bin ${DEPLOYDIR}/tee-rk3506.bin
+}
+
  # NOTE: the following are not typos
  #       the rk3566 uses the same bl32 as the rk3568
  do_deploy:rk3566() {
recipes-bsp/rkbin/rockchip-rkbin.inc +1 -0
index 9264db9..8dfdc09 100644
@@ -11,6 +11,7 @@ S = "${WORKDIR}/git"
 
  COMPATIBLE_MACHINE = "^$"
  COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3506 = "rk3506"
  COMPATIBLE_MACHINE:rk3566 = "rk3566"
  COMPATIBLE_MACHINE:rk3568 = "rk3568"
  COMPATIBLE_MACHINE:rk3588s = "rk3588s"
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
index 2b5bbd7..67c4418 100644

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 17

Quoted 7 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +2 -0
@@ -11,7 +11,9 @@ do_compile[depends] .= "${TFA_DEPENDS}"
  ROCKCHIP_TPL:closed-tpl = "${DEPLOY_DIR_IMAGE}/ddr-${SOC_FAMILY}.bin"
  # SOC_FAMILY for RK3588S is rk3588s but it should use the binaries from rk3588
  ROCKCHIP_TPL:closed-tpl:rk3588s = "${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin"
+ROCKCHIP_TEE:closed-tpl:rk3506 = "${DEPLOY_DIR_IMAGE}/tee-rk3506.bin"
  EXTRA_OEMAKE:append:closed-tpl = " ROCKCHIP_TPL=${ROCKCHIP_TPL}"
+EXTRA_OEMAKE:append:closed-tpl:rk3506 = " TEE=${ROCKCHIP_TEE}"
 

I think you only want

ROCKCHIP_TEE:rk3506

and

EXTRA_OEMAKE:append:rk3506

as I believe TEE has nothing to do with whether we're using a DRAM init blob?

Also, this isn't working because you forgot to add the dependency on optee-os (see do_compile[depends] .= "${TFA_DEPENDS}" for how we have the dependency for trsuted-firmware-a on Aarch64).

Quoted 7 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
  INIT_FIRMWARE_DEPENDS ??= ""
  INIT_FIRMWARE_DEPENDS:closed-tpl = " rockchip-rkbin-ddr:do_deploy"
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
index 08e1730..fc6a36e 100644

recipes-bsp/u-boot/u-boot_%.bbappend DEPENDS:append:rk3308 = " u-boot-tools-native" · line 14

Quoted 7 lines
recipes-bsp/u-boot/u-boot_%.bbappend +4 -0
@@ -8,6 +8,10 @@ DEPENDS:append:rk3308 = " u-boot-tools-native"
  DEPENDS:append:rock-pi-4 = " gnutls-native"
  DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native"
 
+BRANCH:luckfox-lyra-plus = "rk3506"
+SRC_URI:luckfox-lyra-plus = "git://source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=${BRANCH}"
+SRCREV:luckfox-lyra-plus = "c6782a37feee4a8aee08d321c01b4ca0b0562f0b"
+

That's a BIG no-no.

Have a separate recipe for this.

Knowing Jonas, there are chances this branch will get rebased, so I don't think we want this at all.

I see patches on the U-Boot mailing list for RK3506 support in U-Boot, see
https://lore.kernel.org/u-boot/[email protected]/ and Jonas "promised" a v2. Maybe work with him on getting the v2 sent upstream?

Quoted 12 lines

recipes-kernel/linux/linux-armbian_git.bb

Quoted 8 lines
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
  do_compile:append:rock2-square () {
         # copy to default search path
         if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
recipes-kernel/linux/linux-armbian_git.bb new file +0 -0
new file mode 100644
index 0000000..42dad4f

I'll let Trevor speak his mind here but I don't think Armbian Linux kernel is something we're interested in supporting. Work with upstream to get the board supported in upstream Linux and then we can have it here.

I agree with Quentin's assessment. If rockchip were a platform that had little or no upstream support then we would need to have all sorts of recipes for bootloaders and kernels from wherever we could find them. But with rockchip, upstream support is usually just a matter of time. I'll take new machines if they're in linux-yocto-dev, but would rather stay away from vendor kernels.

If a board is wildly popular and will never have upstream support then I would consider it. But if Jonas is already working on it, then we will probably see upstream support shortly.

Quoted 7 lines

Cheers,
Quentin

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

#5 lore raw

ok

Quoted 389 lines · On Wed, Jan 28, 2026, 17:07 Trevor Woerner <[email protected]> wrote:
Quoted 3 lines · Trevor Woerner via lists.yoctoproject.org

Thank you, Quentin, for your thorough review!

On Wed 2026-01-28 @ 11:35:17 AM, Quentin Schulz via

Quoted 4 lines · lists.yoctoproject.org
Quoted 4 lines

Hi Marcin,

Quoted 1 line · Marcin Bober via lists.yoctoproject.org

[You don't often get email from mbober1=

[email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification ]

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

The Luckfox Lyra Plus is ultra-small, tri-core single board computer based on the Rockchip RK3506G2, with a very compact form factor.

---
  README                                        |  1 +
  conf/machine/include/rk3506.inc               | 20 +++++++++++++
  conf/machine/include/rk3568.inc               |  1 -
  conf/machine/include/rk3588s.inc              |  1 -
  conf/machine/luckfox-lyra-plus.conf           | 27

+++++++++++++++++

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
  recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb   |  9 ++++++
  .../rkbin/rockchip-rkbin-optee-os_git.bb      |  5 ++++
  recipes-bsp/rkbin/rockchip-rkbin.inc          |  1 +
  recipes-bsp/u-boot/u-boot-rockchip.inc        |  2 ++
  recipes-bsp/u-boot/u-boot_%.bbappend          |  4 +++
  recipes-kernel/linux/linux-armbian_git.bb     | 29

+++++++++++++++++++

Quoted 18 lines
Quoted 18 lines
Quoted 10 lines
  11 files changed, 98 insertions(+), 2 deletions(-)

create mode 100644 conf/machine/include/rk3506.inc create mode 100644 conf/machine/luckfox-lyra-plus.conf create mode 100644 recipes-kernel/linux/linux-armbian_git.bb

README +0 -0
index 6bceba0..3991415 100644

README Status of supported boards: · line 26

Quoted 4 lines
README +1 -0
@@ -23,6 +23,7 @@ Status of supported boards:
                         tinker-board
                         tinker-board-s
                         vyasa-rk3288
+                       luckfox-lyra-plus

Please keep the list ordered alphabetically.

Quoted 1 line
Quoted 3 lines
Quoted 3 lines

Review

Quoted 3 lines
                 64-bit:
                         nanopi-m4
(quoted diff) +0 -0

b/conf/machine/include/rk3506.inc

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

new file mode 100644
index 0000000..e204283

conf/machine/include/rk3506.inc new file +7 -0
@@ -0,0 +1,20 @@
+MACHINEOVERRIDES =. "rk3506:"
+SOC_FAMILY = "rk3506"
+DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
+
+ROCKCHIP_CLOSED_TPL ?= "1"
+
+require conf/machine/include/soc-family.inc
Quoted 8 lines
Quoted 8 lines

conf/machine/include/rk3506.inc line 13

Quoted 6 lines
conf/machine/include/rk3506.inc new file +6 -0
+require conf/machine/include/rockchip-defaults.inc
+require conf/machine/include/arm/armv7a/tune-cortexa7.inc
+require conf/machine/include/rockchip-wic.inc
+
+PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os"
+

Ooooh, I believe this would mean OP-TEE OS blob from Rockchip can be

used

Quoted 1 line
Quoted 1 line

with upstream U-Boot? Have you actually tried? This would be

interesting for

Quoted 1 line
Quoted 1 line

me for

https://lore.kernel.org/yocto-patches/[email protected]/

Quoted 5 lines
Quoted 5 lines

to check if I got it right for rockchip-rkbin-optee-os as well.

Is OP-TEE OS *required* on rk3506 to be able to boot? Do you know?

Essentially, with the patch series listed above applied, you would

need to

Quoted 1 line
Quoted 1 line

set RK_UBOOT_TEE = "1" and then U-Boot would automatically add the

necessary

Quoted 1 line
Quoted 1 line

dependency and add the correct filepath to the TEE environment

variable.

Quoted 13 lines
Quoted 13 lines

conf/machine/include/rk3506.inc line 14

Quoted 2 lines
conf/machine/include/rk3506.inc new file +1 -0
+KBUILD_DEFCONFIG ?= "rk3506_defconfig"

Usually we would rather have multi_v7_defconfig and if needed apply .scc+.cfg config fragments (see what's been done for nanopi-r4s).

conf/machine/include/rk3506.inc line 17

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+KERNEL_CLASSES = "kernel-fitimage"
+KERNEL_IMAGETYPE ?= "fitImage"
+

Isn't a FIT image the default when you include rockchip-defaults? See RK_KERNEL_FITIMAGE variable.

Quoted 3 lines
Quoted 3 lines

conf/machine/include/rk3506.inc

Quoted 3 lines
conf/machine/include/rk3506.inc new file +3 -0
+UBOOT_SUFFIX ?= "itb"
+UBOOT_ENTRYPOINT ?= "0x02800000"
+UBOOT_EXTLINUX_FDT = "${@bb.utils.contains('KERNEL_IMAGETYPE',

'fitImage', '', '/boot', d)}"

Quoted 3 lines
Quoted 3 lines

isn't that already handled with RK_KERNEL_FITIMAGE from within conf/machine/include/rockchip-extlinux.inc (you may then want to

require

Quoted 3 lines
Quoted 3 lines

this file).

Review

Quoted 1 line
(quoted diff) +0 -0

b/conf/machine/include/rk3568.inc

Quoted 4 lines
Quoted 4 lines

conf/machine/include/rk3568.inc require

Quoted 4 lines

index bcf9dd8..12f0ba2 100644

conf/machine/include/rk3568.inc +0 -0
@@ -10,7 +10,6 @@ require

conf/machine/include/arm/armv8-2a/tune-cortexa55.inc

Quoted 4 lines
Quoted 4 lines

conf/machine/include/rk3568.inc require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc

Quoted 4 lines
conf/machine/include/rk3568.inc +0 -1
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3568 = "

bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

Quoted 7 lines
Quoted 7 lines

This has nothing to do with adding support for this new device no?

Review

Quoted 4 lines
conf/machine/include/rk3568.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
(quoted diff) +0 -0

b/conf/machine/include/rk3588s.inc

Quoted 4 lines
Quoted 4 lines

conf/machine/include/rk3588s.inc require

Quoted 4 lines

index 6ec344a..d0654c1 100644

conf/machine/include/rk3588s.inc +0 -0
@@ -9,7 +9,6 @@ require

conf/machine/include/arm/armv8-2a/tune-cortexa76-cortexa55.inc

Quoted 4 lines
Quoted 4 lines

conf/machine/include/rk3588s.inc require · line 12

Quoted 4 lines
conf/machine/include/rk3588s.inc +0 -1
  require conf/machine/include/rockchip-wic.inc
 
  KBUILD_DEFCONFIG ?= "defconfig"
-KERNEL_FEATURES:append:rk3588s = "

bsp/rockchip/remove-non-rockchip-arch-arm64.scc"

Quoted 7 lines
Quoted 7 lines

This has nothing to do with adding support for this new device no?

Review

Quoted 4 lines
conf/machine/include/rk3588s.inc +0 -0
  KERNEL_CLASSES = "kernel-fitimage"
  KERNEL_IMAGETYPE ?= "fitImage"
 
(quoted diff) +0 -0

b/conf/machine/luckfox-lyra-plus.conf

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

new file mode 100644
index 0000000..529a472

conf/machine/luckfox-lyra-plus.conf new file +0 -0
@@ -0,0 +1,27 @@
Quoted 8 lines
Quoted 4 lines

conf/machine/luckfox-lyra-plus.conf line 4

Quoted 4 lines
conf/machine/luckfox-lyra-plus.conf new file +4 -0
+#@TYPE: Machine
+#@NAME: Luckfox Lyra Plus
+#@DESCRIPTION: RK3506G2 based Linux Micro Development Board
+#https://www.luckfox.com/Luckfox-Lyra-Plus

Usually I would be excited about a tiny rockchip-based SBC with hardwired ethernet. But a new SoC based on CortexA7 (i.e. 32-bit)?? And no SDcard?

Oops, my mistake. There is an SDcard slot.
(hadn't scrolled down far enough)

Quoted 13 lines

Hopefully someone comes out with something new to replace the zero-3e which appears to be out of production.

Quoted 9 lines

conf/machine/luckfox-lyra-plus.conf line 10

Quoted 6 lines
conf/machine/luckfox-lyra-plus.conf new file +6 -0
+
+require conf/machine/include/rk3506.inc
+
+KERNEL_DEVICETREE ?= "rk3506g-luckfox-lyra-plus-sd.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+PREFERRED_PROVIDER_virtual/kernel = "linux-armbian"

I believe we only take boards which are supported by linux-yocto or linux-yocto-dev from the master branch of OE-Core. I don't even see

patches

Quoted 22 lines
Quoted 22 lines

on the linux-rockchip mailing list

Quoted 7 lines
conf/machine/luckfox-lyra-plus.conf new file +7 -0
+EXTERNAL_KERNEL_DEVICETREE = "${DEPLOY_DIR_IMAGE}/devicetree"
+
+UBOOT_MACHINE = "luckfox-lyra-rk3506_defconfig"
+
+MACHINE_FEATURES = " \
+  rtc \
+  screen \

conf/machine/luckfox-lyra-plus.conf line 27

Quoted 10 lines
conf/machine/luckfox-lyra-plus.conf new file +10 -0
+  serial \
+  usbgadget \
+  usbhost \
+  vfat \
+"
+
+KERNEL_FEATURES += " \
+  cfg/fs/ext4.scc \
+  features/cgroups/cgroups.scc \
+"

KERNEL_FEATURES must be listed in the kernel recipe not in the machine.

Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb

Quoted 5 lines
Quoted 5 lines

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

Quoted 5 lines

index 3227a53..7f654ff 100644

recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +0 -0
@@ -10,6 +10,15 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/${DDRBIN_FILE}

${DEPLOYDIR}/ddr-rk3308.bin

Quoted 4 lines
Quoted 4 lines

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

Quoted 2 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +0 -0
  }
 

Wait.... This doesn't exist anymore. Against which branch did you

develop

Quoted 3 lines
Quoted 3 lines

this patch?

The master branch has a completely different mechanism which is much

more

Quoted 8 lines
Quoted 8 lines

automatic than what's needed below.

recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb do_deploy:rk3308() {

Quoted 6 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +6 -0
+DDRBIN_VERS:rk3506 ?= "v1.02"
+DDRBIN_FILE:rk3506 ?= "rk3506_ddr_750MHz_${DDRBIN_VERS}.bin"
+
+do_deploy:rk3506() {
+       # Prebuilt U-Boot TPL (DDR init)
+       install -m 644 ${S}/bin/rk35/${DDRBIN_FILE}

${DEPLOYDIR}/ddr-rk3506.bin

Quoted 1 line
Quoted 1 line

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

Quoted 1 line
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +1 -0
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v1.23.bin

${DEPLOYDIR}/tee-rk3506.bin

Quoted 2 lines
Quoted 2 lines

This is TEE, not DRAM init blob so shouldn't be deployed in this

recipe.

Quoted 6 lines
Quoted 6 lines

Review

Quoted 6 lines
recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +2 -0
+}
+>   DDRBIN_VERS:rk3566 ?= "v1.23"
  DDRBIN_FILE:rk3566 ?= "rk3566_ddr_1056MHz_${DDRBIN_VERS}.bin"
 
(quoted diff) +0 -0

b/recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb

Quoted 5 lines
Quoted 5 lines

recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb do_deploy:rk3308() { · line 9

Quoted 5 lines

index 6d25368..cbd376c 100644

recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +0 -0
@@ -9,6 +9,11 @@ do_deploy:rk3308() {
         install -m 644 ${S}/bin/rk33/rk3308_bl32_v*.bin

${DEPLOYDIR}/tee-rk3308.bin

Quoted 5 lines
Quoted 5 lines

recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb do_deploy:rk3308() {

Quoted 5 lines
recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +3 -0
  }
 
+do_deploy:rk3506() {
+       # Prebuilt OPTEE-OS
+       install -m 644 ${S}/bin/rk35/rk3506_tee_v*.bin

${DEPLOYDIR}/tee-rk3506.bin

Quoted 6 lines
Quoted 6 lines

Review

Quoted 6 lines
recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +2 -0
+}
+
  # NOTE: the following are not typos
  #       the rk3566 uses the same bl32 as the rk3568
  do_deploy:rk3566() {
(quoted diff) +0 -0

b/recipes-bsp/rkbin/rockchip-rkbin.inc

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

index 9264db9..8dfdc09 100644

recipes-bsp/rkbin/rockchip-rkbin.inc +0 -0
@@ -11,6 +11,7 @@ S = "${WORKDIR}/git"
 
Quoted 7 lines
Quoted 7 lines

Review

Quoted 7 lines
recipes-bsp/rkbin/rockchip-rkbin.inc +1 -0
  COMPATIBLE_MACHINE = "^$"
  COMPATIBLE_MACHINE:rk3308 = "rk3308"
+COMPATIBLE_MACHINE:rk3506 = "rk3506"
  COMPATIBLE_MACHINE:rk3566 = "rk3566"
  COMPATIBLE_MACHINE:rk3568 = "rk3568"
  COMPATIBLE_MACHINE:rk3588s = "rk3588s"
(quoted diff) +0 -0

b/recipes-bsp/u-boot/u-boot-rockchip.inc

Quoted 5 lines
Quoted 5 lines

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 11

Quoted 5 lines

index 2b5bbd7..67c4418 100644

recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
@@ -11,7 +11,9 @@ do_compile[depends] .= "${TFA_DEPENDS}"
  ROCKCHIP_TPL:closed-tpl =

"${DEPLOY_DIR_IMAGE}/ddr-${SOC_FAMILY}.bin"

Quoted 1 line
Quoted 1 line

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 12

Quoted 1 line
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
  # SOC_FAMILY for RK3588S is rk3588s but it should use the binaries

from rk3588

Quoted 1 line
Quoted 1 line

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 13

Quoted 1 line
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
  ROCKCHIP_TPL:closed-tpl:rk3588s =

"${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin"

Quoted 1 line
Quoted 1 line

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 14

Quoted 1 line
recipes-bsp/u-boot/u-boot-rockchip.inc +1 -0
+ROCKCHIP_TEE:closed-tpl:rk3506 =

"${DEPLOY_DIR_IMAGE}/tee-rk3506.bin"

Quoted 10 lines
Quoted 10 lines

recipes-bsp/u-boot/u-boot-rockchip.inc do_compile[depends] .= "${TFA_DEPENDS}" · line 17

Quoted 3 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +1 -0
  EXTRA_OEMAKE:append:closed-tpl = " ROCKCHIP_TPL=${ROCKCHIP_TPL}"
+EXTRA_OEMAKE:append:closed-tpl:rk3506 = " TEE=${ROCKCHIP_TEE}"
 

I think you only want

ROCKCHIP_TEE:rk3506

and

Quoted 7 lines
Quoted 7 lines

EXTRA_OEMAKE:append:rk3506

as I believe TEE has nothing to do with whether we're using a DRAM init blob?

Also, this isn't working because you forgot to add the dependency on optee-os (see do_compile[depends] .= "${TFA_DEPENDS}" for how we have

the

Quoted 5 lines
Quoted 5 lines

dependency for trsuted-firmware-a on Aarch64).

Review

Quoted 3 lines
recipes-bsp/u-boot/u-boot-rockchip.inc +0 -0
  INIT_FIRMWARE_DEPENDS ??= ""
  INIT_FIRMWARE_DEPENDS:closed-tpl = " rockchip-rkbin-ddr:do_deploy"
(quoted diff) +0 -0

b/recipes-bsp/u-boot/u-boot_%.bbappend

Quoted 9 lines
Quoted 9 lines

recipes-bsp/u-boot/u-boot_%.bbappend DEPENDS:append:rk3308 = " u-boot-tools-native" · line 12

Quoted 9 lines

index 08e1730..fc6a36e 100644

recipes-bsp/u-boot/u-boot_%.bbappend +2 -0
@@ -8,6 +8,10 @@ DEPENDS:append:rk3308 = " u-boot-tools-native"
  DEPENDS:append:rock-pi-4 = " gnutls-native"
  DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native"
 
+BRANCH:luckfox-lyra-plus = "rk3506"
+SRC_URI:luckfox-lyra-plus = "git://

source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=${BRANCH}
<http://source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=$%7BBRANCH%7D>
"

Quoted 1 line
Quoted 1 line

recipes-bsp/u-boot/u-boot_%.bbappend DEPENDS:append:rk3308 = " u-boot-tools-native" · line 13

Quoted 1 line
recipes-bsp/u-boot/u-boot_%.bbappend +1 -0
+SRCREV:luckfox-lyra-plus =

"c6782a37feee4a8aee08d321c01b4ca0b0562f0b"

Quoted 7 lines
Quoted 7 lines

recipes-bsp/u-boot/u-boot_%.bbappend DEPENDS:append:rk3308 = " u-boot-tools-native" · line 14

Quoted 1 line
recipes-bsp/u-boot/u-boot_%.bbappend +1 -0
+

That's a BIG no-no.

Have a separate recipe for this.

Knowing Jonas, there are chances this branch will get rebased, so I

don't

Quoted 3 lines
Quoted 3 lines

think we want this at all.

I see patches on the U-Boot mailing list for RK3506 support in U-Boot,

see

Quoted 1 line
Quoted 1 line

https://lore.kernel.org/u-boot/[email protected]/
and

Quoted 1 line
Quoted 1 line

Jonas "promised" a v2. Maybe work with him on getting the v2 sent

upstream?

Quoted 5 lines
Quoted 5 lines

Review

Quoted 5 lines
recipes-bsp/u-boot/u-boot_%.bbappend +0 -0
  do_compile:append:rock2-square () {
         # copy to default search path
         if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
(quoted diff) +0 -0

b/recipes-kernel/linux/linux-armbian_git.bb

Quoted 6 lines
Quoted 6 lines

recipes-kernel/linux/linux-armbian_git.bb

Quoted 4 lines

new file mode 100644
index 0000000..42dad4f

recipes-kernel/linux/linux-armbian_git.bb new file +0 -0

I'll let Trevor speak his mind here but I don't think Armbian Linux

kernel

Quoted 1 line
Quoted 1 line

is something we're interested in supporting. Work with upstream to get

the

Quoted 22 lines
Quoted 1 line

board supported in upstream Linux and then we can have it here.

I agree with Quentin's assessment. If rockchip were a platform that had little or no upstream support then we would need to have all sorts of recipes for bootloaders and kernels from wherever we could find them. But with rockchip, upstream support is usually just a matter of time. I'll take new machines if they're in linux-yocto-dev, but would rather stay away from vendor kernels.

If a board is wildly popular and will never have upstream support then I would consider it. But if Jonas is already working on it, then we will probably see upstream support shortly.

Quoted 7 lines

Cheers,
Quentin

Quoted 3 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#3136):

https://lists.yoctoproject.org/g/yocto-patches/message/3136

Quoted 3 lines

Mute This Topic: https://lists.yoctoproject.org/mt/117496463/900817
Group Owner: [email protected] Unsubscribe:

https://lists.yoctoproject.org/g/yocto-patches/leave/13168745/900817/63955952/xyzzy
[[email protected]]

Quoted 3 lines

-=-=-=-=-=-=-=-=-=-=-=-