[Buildroot] [PATCH 1/3] package: add rockchip-rkbin package

Kilian Zinnecker kilian.zinnecker at mail.de
Sun Jul 2 12:45:55 UTC 2023


Hello Andreas,

thanks for your feedback! I had a look at u-boot's documentation about 
Rockchip's support (https://source.denx.de/u-boot/u-boot/-/blob/master/doc/
board/rockchip/rockchip.rst):

Only boards with rk3588 SoC (e.g., Rock 5b) and boards with rk3568 SoC 
currently need Rockchip binary blobs from the rkbin repository. However, I 
don't see any defconfig in buildroot for any of the rk3568 based boards, listed 
in u-boot's documentation. Hence, I think that it currently does not make any 
sense to have a potential choice for other Rockchip SoCs. Hence, as you 
suggested, I removed the two variables and introduced two variables to select 
the actual binary names, as they may differ if someone uses another commit id 
for the rkbin git repository. See the new version of the rockchip-rkbin 
Config.in and rockchip-rkbin.mk, and the new defconfig.

On the occasion: What is the common practice, if someone does rework on a 
patch? Shall I then send it as email response (like I do now)? Or should I 
better send a "new" email and add a version to the subject line, e.g., 
"[Buildroot] [Patch v2 1/3] package: add rockchip-rkbin package"?

Also, is there a way to add a flag to the Config.in of uboot, which makes a 
"depends on rockchip-rkbin" if the BR2_TARGET_UBOOT_BOARD_DEFCONFIG equals 
"rock5b-rk3588", "evb-rk3588", or "neu6a-io-rk3588"? Or is it beneficial to a 
an option like BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN?

Best regards,
Kilian


============


>From 2acbcb5d0e1fc92fc388fa99cb25923e5497b17d Mon Sep 17 00:00:00 2001
From: Kilian Zinnecker <kilian.zinnecker at mail.de>
Date: Sun, 2 Jul 2023 14:41:41 +0200
Subject: [PATCH] Add rockchip-rkbin package and defconfig

Signed-off-by: Kilian Zinnecker <kilian.zinnecker at mail.de>
---
 configs/rock5b_defconfig                 | 41 ++++++++++++++++++++++++
 package/Config.in                        |  1 +
 package/rockchip-rkbin/Config.in         | 18 +++++++++++
 package/rockchip-rkbin/rockchip-rkbin.mk | 19 +++++++++++
 4 files changed, 79 insertions(+)
 create mode 100644 configs/rock5b_defconfig
 create mode 100644 package/rockchip-rkbin/Config.in
 create mode 100644 package/rockchip-rkbin/rockchip-rkbin.mk

diff --git a/configs/rock5b_defconfig b/configs/rock5b_defconfig
new file mode 100644
index 0000000000..3c814bf356
--- /dev/null
+++ b/configs/rock5b_defconfig
@@ -0,0 +1,41 @@
+BR2_aarch64=y
+BR2_cortex_a76_a55=y
+BR2_KERNEL_HEADERS_5_10=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/radxa/rock5b/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS=""
+BR2_TARGET_GENERIC_HOSTNAME="rock5b"
+BR2_TARGET_GENERIC_ISSUE="Rock 5b"
+BR2_SYSTEM_DHCP="eth0"
+BR2_USE_WCHAR
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/radxa/kernel.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="52f51a2b5ba178f331af62260d2da86d7472c14b"
+BR2_LINUX_KERNEL_DEFCONFIG="rockchip_linux"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3588-rock-5b"
+BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/radxa/rock5b/linux.fragment"
+BR2_PACKAGE_AVAHI=y
+BR2_PACKAGE_AVAHI_DAEMON=y
+BR2_PACKAGE_OPENSSH=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.07-rc4"
+BR2_PACKAGE_ROCKCHIP_RKBIN=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock5b-rk3588"
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS=y
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="BL31=$(BINARIES_DIR)/rk3588_bl31_v1.38.elf 
ROCKCHIP_TPL=$(BINARIES_DIR)/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.11.bin"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/radxa/rock5b/uboot.fragment"
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_DTC=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
diff --git a/package/Config.in b/package/Config.in
index bff090a661..80221d0406 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -581,6 +581,7 @@ endmenu
 	source "package/read-edid/Config.in"
 	source "package/rng-tools/Config.in"
 	source "package/rockchip-mali/Config.in"
+	source "package/rockchip-rkbin/Config.in"
 	source "package/rpi-userland/Config.in"
 	source "package/rs485conf/Config.in"
 	source "package/rtc-tools/Config.in"
diff --git a/package/rockchip-rkbin/Config.in b/package/rockchip-rkbin/Config.in
new file mode 100644
index 0000000000..4005fd25ce
--- /dev/null
+++ b/package/rockchip-rkbin/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_ROCKCHIP_RKBIN
+	bool "Rockchip RKBIN binary blobs"
+	depends on BR2_arm || BR2_aarch64
+	help
+	  This package provides binary blobs, currently needed by
+	  u-boot for the Rockchip RK3588 SoC.
+
+if BR2_PACKAGE_ROCKCHIP_RKBIN
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_RK3588_DDRFW
+	string
+	default "rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.11.bin"
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_RK3588_EL3FW
+	string
+	default "rk3588_bl31_v1.38.elf"
+
+endif
diff --git a/package/rockchip-rkbin/rockchip-rkbin.mk b/package/rockchip-rkbin/
rockchip-rkbin.mk
new file mode 100644
index 0000000000..a173dedad5
--- /dev/null
+++ b/package/rockchip-rkbin/rockchip-rkbin.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# rockchip-rkbin
+#
+################################################################################
+
+
+ROCKCHIP_RKBIN_VERSION = d6ccfe401ca84a98ca3b85c12b9554a1a43a166c
+ROCKCHIP_RKBIN_SITE = https://github.com/rockchip-linux/rkbin.git
+ROCKCHIP_RKBIN_SITE_METHOD = git
+
+ROCKCHIP_RKBIN_INSTALL_STAGING = YES
+
+define ROCKCHIP_RKBIN_INSTALL_STAGING_CMDS
+	cp $(@D)/bin/rk35/$(BR2_PACKAGE_ROCKCHIP_RKBIN_RK3588_DDRFW) $
(BINARIES_DIR)/
+	cp $(@D)/bin/rk35/$(BR2_PACKAGE_ROCKCHIP_RKBIN_RK3588_EL3FW) $
(BINARIES_DIR)/
+endef
+
+$(eval $(generic-package))
--
2.34.1







More information about the buildroot mailing list