* [Buildroot] [PATCH v8 0/3] Add board support for Radxa Rock 5B
@ 2023-07-26 18:04 Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package Kilian Zinnecker via buildroot
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Kilian Zinnecker via buildroot @ 2023-07-26 18:04 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Quentin Schulz, Andreas Ziegler, Thomas Petazzoni,
Kilian Zinnecker
This patch series adds support for the Radxa Rock 5B board, featuring
the Rockchip RK3588 SoC. It adds a package for the Rockchip ATF binary
blobs, needed by U-Boot. It uses a modified Linux kernel from Radxa.
After build, a fit image with compressed kernel is generated, which is
then put into an SD card image alongside U-Boot and the root file
system.
v7 -> v8:
- Added reference to the now existing license file of the rkbin
repository in the rockchip-rkbin.mk file
- Bumped the version of the rockchip-rkbin git repository in the
package (default version) and the rock5b_defconfig. Changed the
binary blob filenames accordingly
v6 -> v7:
- Improved commit titles and commit structure
- uboot.mk: Fixed installation path for binary
- Improved automatical pickup of Rockchip blobs by U-Boot
- rockchip-rkbin.mk: Simplyfied binary selection and installation
- rock5b_defconfig: removed unecessary configurations
- post-image.sh: Exchanged own code by calling genimage support
script
- uboot.mk: Fixed UBOOT_MAKE_OPTS typo
- uboot/Config.in: Removed futile default value
- Fixed variable naming in uboot.mk and rockchip-rkbin.mk
- Various further cleanups ...
v5 -> v6:
- Bumps uboot version: now uses 2023.7 instead of release candidate
- Fixes dependency error in uboot.mk
- Improves rockchip-rkbin.mk: can now handle different rockchip blob
file type extensions
- Improves uboot.mk: can now handle different rockchip blob file
type extensions
- Improves rockchip-rkbin.mk: improved menuconfig menu
- Improves post-image.sh: now automatically copies u-boot to
BINARIES_DIR through uboot.mk
- Improves genimage.cfg: removes unnecessary partition offsets
- Improves boot command handling: now uses uboot.cmd instead of
uboot fragment file
Kilian Zinnecker (3):
package/rockchip-rkbin: new package
boot/uboot: Add support for Rockchip binary blobs
configs/rock5b: new defconfig
DEVELOPERS | 5 ++
board/radxa/rock5b/boot.cmd | 3 ++
board/radxa/rock5b/genimage.cfg | 34 ++++++++++++
board/radxa/rock5b/linux.fragment | 1 +
board/radxa/rock5b/post-image.sh | 6 +++
board/radxa/rock5b/readme.txt | 62 ++++++++++++++++++++++
board/radxa/rock5b/rock5b.its | 46 ++++++++++++++++
boot/uboot/Config.in | 9 ++++
boot/uboot/uboot.mk | 17 ++++++
configs/rock5b_defconfig | 42 +++++++++++++++
package/Config.in | 1 +
package/rockchip-rkbin/Config.in | 47 ++++++++++++++++
package/rockchip-rkbin/rockchip-rkbin.hash | 2 +
package/rockchip-rkbin/rockchip-rkbin.mk | 46 ++++++++++++++++
14 files changed, 321 insertions(+)
create mode 100644 board/radxa/rock5b/boot.cmd
create mode 100644 board/radxa/rock5b/genimage.cfg
create mode 100644 board/radxa/rock5b/linux.fragment
create mode 100755 board/radxa/rock5b/post-image.sh
create mode 100644 board/radxa/rock5b/readme.txt
create mode 100644 board/radxa/rock5b/rock5b.its
create mode 100644 configs/rock5b_defconfig
create mode 100644 package/rockchip-rkbin/Config.in
create mode 100644 package/rockchip-rkbin/rockchip-rkbin.hash
create mode 100644 package/rockchip-rkbin/rockchip-rkbin.mk
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package
2023-07-26 18:04 [Buildroot] [PATCH v8 0/3] Add board support for Radxa Rock 5B Kilian Zinnecker via buildroot
@ 2023-07-26 18:04 ` Kilian Zinnecker via buildroot
2023-07-26 21:41 ` Yann E. MORIN
2023-07-26 18:04 ` [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 3/3] configs/rock5b: new defconfig Kilian Zinnecker via buildroot
2 siblings, 1 reply; 10+ messages in thread
From: Kilian Zinnecker via buildroot @ 2023-07-26 18:04 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Quentin Schulz, Andreas Ziegler, Thomas Petazzoni,
Kilian Zinnecker
This patch adds a package for the Rockchip ATF binary blobs. These
binaries are needed to build U-Boot for some Rockchip SoCs (e.g.,
RK3588). One can config a custom version and manually define which
blobs (for bl31, tpl and optee) to use from the repository.
Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
---
DEVELOPERS | 3 ++
package/Config.in | 1 +
package/rockchip-rkbin/Config.in | 47 ++++++++++++++++++++++
package/rockchip-rkbin/rockchip-rkbin.hash | 2 +
package/rockchip-rkbin/rockchip-rkbin.mk | 46 +++++++++++++++++++++
5 files changed, 99 insertions(+)
create mode 100644 package/rockchip-rkbin/Config.in
create mode 100644 package/rockchip-rkbin/rockchip-rkbin.hash
create mode 100644 package/rockchip-rkbin/rockchip-rkbin.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 6d8b43c31e..464d1db552 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1803,6 +1803,9 @@ F: package/ramsmp/
N: Kieran Bingham <kieran.bingham@ideasonboard.com>
F: package/libcamera/
+N: Kilian Zinnecker <kilian.zinnecker@mail.de>
+F: package/rockchip-rkbin/
+
N: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
F: package/wqy-zenhei/
diff --git a/package/Config.in b/package/Config.in
index 1e551d17c4..1237281701 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -580,6 +580,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..85c30c3745
--- /dev/null
+++ b/package/rockchip-rkbin/Config.in
@@ -0,0 +1,47 @@
+config BR2_PACKAGE_ROCKCHIP_RKBIN
+ bool "rockchip-rkbin"
+ depends on BR2_arm || BR2_aarch64
+ help
+ This package provides Rockchip SoC binary blobs for U-Boot.
+
+if BR2_PACKAGE_ROCKCHIP_RKBIN
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
+ bool "Use a custom version"
+ help
+ This option allows to use a specific version.
+if BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE
+ string "Rockchip rkbin version"
+ depends on BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
+
+endif # BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_VERSION
+ string
+ default "b4558da0860ca48bf1a571dd33ccba580b9abe23" \
+ if !BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
+ default BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE \
+ if BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME
+ string "Rockchip rkbin tpl file path"
+ help
+ Full path to the tpl file inside the rkbin repository. The
+ specified file will be copied and used by U-Boot as tpl.
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME
+ string "Rockchip rkbin bl31 file path"
+ help
+ Full path to the bl31 file inside the rkbin repository. The
+ specified file will be copied and used by U-Boot as bl31.
+
+config BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME
+ string "Rockchip rkbin tee file path"
+ help
+ Full path to the TEE file inside the rkbin repository.
+ The specified file will be copied and used by U-Boot as
+ TEE.
+
+endif # BR2_PACKAGE_ROCKCHIP_RKBIN
diff --git a/package/rockchip-rkbin/rockchip-rkbin.hash b/package/rockchip-rkbin/rockchip-rkbin.hash
new file mode 100644
index 0000000000..cb71226556
--- /dev/null
+++ b/package/rockchip-rkbin/rockchip-rkbin.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 bd8d19ace202ff26d1c0b4d7744cd467cd0093801dc674dde57290159eedee2b rockchip-rkbin-b4558da0860ca48bf1a571dd33ccba580b9abe23-br1.tar.gz
diff --git a/package/rockchip-rkbin/rockchip-rkbin.mk b/package/rockchip-rkbin/rockchip-rkbin.mk
new file mode 100644
index 0000000000..74787585e8
--- /dev/null
+++ b/package/rockchip-rkbin/rockchip-rkbin.mk
@@ -0,0 +1,46 @@
+################################################################################
+#
+# rockchip-rkbin
+#
+################################################################################
+
+ROCKCHIP_RKBIN_VERSION = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_VERSION))
+ROCKCHIP_RKBIN_SITE = https://github.com/rockchip-linux/rkbin.git
+ROCKCHIP_RKBIN_SITE_METHOD = git
+ROCKCHIP_RKBIN_LICENSE = PROPRIETARY
+ROCKCHIP_RKBIN_LICENSE_FILES = LICENSE
+
+ROCKCHIP_RKBIN_INSTALL_IMAGES = YES
+ROCKCHIP_RKBIN_INSTALL_TARGET = NO
+
+ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME),"")
+ROCKCHIP_RKBIN_BL31_FILENAME = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME))
+endif
+
+ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME),"")
+ROCKCHIP_RKBIN_TPL_FILENAME = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME))
+endif
+
+ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME),"")
+ROCKCHIP_RKBIN_TEE_FILENAME = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME))
+endif
+
+define ROCKCHIP_RKBIN_INSTALL_IMAGES_CMDS
+ $(if $(ROCKCHIP_RKBIN_BL31_FILENAME), \
+ cp $(@D)/$(ROCKCHIP_RKBIN_BL31_FILENAME) $(BINARIES_DIR)/${ROCKCHIP_RKBIN_BL31_FILENAME##*/})
+ $(if $(ROCKCHIP_RKBIN_TPL_FILENAME), \
+ cp $(@D)/$(ROCKCHIP_RKBIN_TPL_FILENAME) $(BINARIES_DIR)/${ROCKCHIP_RKBIN_TPL_FILENAME##*/})
+ $(if $(ROCKCHIP_RKBIN_TEE_FILENAME), \
+ cp $(@D)/$(ROCKCHIP_RKBIN_TEE_FILENAME) $(BINARIES_DIR)/${ROCKCHIP_RKBIN_TEE_FILENAME##*/})
+endef
+
+ifeq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE)),)
+$(error No custom rockchip-rkbin version specified. Check your BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE setting)
+endif
+ifeq ($(BR_BUILDING),y)
+BR_NO_CHECK_HASH_FOR += rockchip-rkbin-$(ROCKCHIP_RKBIN_VERSION)-br1.tar.gz
+endif
+endif
+
+$(eval $(generic-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs
2023-07-26 18:04 [Buildroot] [PATCH v8 0/3] Add board support for Radxa Rock 5B Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package Kilian Zinnecker via buildroot
@ 2023-07-26 18:04 ` Kilian Zinnecker via buildroot
2023-07-26 21:43 ` Yann E. MORIN
2023-07-26 18:04 ` [Buildroot] [PATCH v8 3/3] configs/rock5b: new defconfig Kilian Zinnecker via buildroot
2 siblings, 1 reply; 10+ messages in thread
From: Kilian Zinnecker via buildroot @ 2023-07-26 18:04 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Quentin Schulz, Andreas Ziegler, Thomas Petazzoni,
Kilian Zinnecker
Currently for some Rockchip SoCs binary blobs are needed, e.g., for
the RK3588 bl31 and tpl. These blobs are provided by Rockchip. This
patch adds U-Boot package options to use theses binaries, provided
by the rockchip-rkbin package, which is also introduced in this
patch series. The U-Boot package is modified so that it takes the
chosen binaries and automatically uses them during build.
Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
---
boot/uboot/Config.in | 9 +++++++++
boot/uboot/uboot.mk | 17 +++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 085397d03d..7733f8501f 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -262,6 +262,15 @@ config BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE
This option makes sure that the i.MX firmwares are copied into
the U-Boot source directory.
+config BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN
+ bool "U-Boot needs rockchip-rkbin"
+ depends on BR2_PACKAGE_ROCKCHIP_RKBIN
+ help
+ For some Rockchip SoCs U-Boot needs binary blobs from
+ Rockchip.
+ This option makes sure that the needed binary blobs are copied
+ into the U-Boot source directory.
+
menu "U-Boot binary format"
config BR2_TARGET_UBOOT_FORMAT_AIS
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 1a6e70a792..b6e270f633 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -207,6 +207,23 @@ endef
UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_FW_FILES
endif
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN),y)
+UBOOT_DEPENDENCIES += rockchip-rkbin
+define UBOOT_INSTALL_UBOOT_ROCKCHIP_BIN
+ $(INSTALL) -D -m 0644 $(@D)/u-boot-rockchip.bin $(BINARIES_DIR)/u-boot-rockchip.bin
+endef
+UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_UBOOT_ROCKCHIP_BIN
+ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME),"")
+UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/${notdir $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME))}
+endif
+ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME),"")
+UBOOT_MAKE_OPTS += ROCKCHIP_TPL=$(BINARIES_DIR)/${notdir $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME))}
+endif
+ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME),"")
+UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/${notdir $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME))}
+endif
+endif
+
ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
UBOOT_DEPENDENCIES += host-dtc
UBOOT_MAKE_OPTS += DTC=$(HOST_DIR)/bin/dtc
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH v8 3/3] configs/rock5b: new defconfig
2023-07-26 18:04 [Buildroot] [PATCH v8 0/3] Add board support for Radxa Rock 5B Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs Kilian Zinnecker via buildroot
@ 2023-07-26 18:04 ` Kilian Zinnecker via buildroot
2023-07-26 21:45 ` Yann E. MORIN
2 siblings, 1 reply; 10+ messages in thread
From: Kilian Zinnecker via buildroot @ 2023-07-26 18:04 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Quentin Schulz, Andreas Ziegler, Thomas Petazzoni,
Kilian Zinnecker
This patch adds the defconfig file needed to build u-boot, kernel
and rootfs for the Rock 5B. In addition it adds a kernel config
fragment file, which activates the needed ethernet driver support.
It also adds a readme and post image scripts, needed to generate an
sdcard.img file, which can be flashed on an SD card to boot the
Radxa Rock 5B.
Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
---
DEVELOPERS | 2 +
board/radxa/rock5b/boot.cmd | 3 ++
board/radxa/rock5b/genimage.cfg | 34 +++++++++++++++++
board/radxa/rock5b/linux.fragment | 1 +
board/radxa/rock5b/post-image.sh | 6 +++
board/radxa/rock5b/readme.txt | 62 +++++++++++++++++++++++++++++++
board/radxa/rock5b/rock5b.its | 46 +++++++++++++++++++++++
configs/rock5b_defconfig | 42 +++++++++++++++++++++
8 files changed, 196 insertions(+)
create mode 100644 board/radxa/rock5b/boot.cmd
create mode 100644 board/radxa/rock5b/genimage.cfg
create mode 100644 board/radxa/rock5b/linux.fragment
create mode 100755 board/radxa/rock5b/post-image.sh
create mode 100644 board/radxa/rock5b/readme.txt
create mode 100644 board/radxa/rock5b/rock5b.its
create mode 100644 configs/rock5b_defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 464d1db552..0ff44c195d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1805,6 +1805,8 @@ F: package/libcamera/
N: Kilian Zinnecker <kilian.zinnecker@mail.de>
F: package/rockchip-rkbin/
+F: configs/rock5b_defconfig
+F: board/radxa/rock5b/
N: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
F: package/wqy-zenhei/
diff --git a/board/radxa/rock5b/boot.cmd b/board/radxa/rock5b/boot.cmd
new file mode 100644
index 0000000000..9a3e73e003
--- /dev/null
+++ b/board/radxa/rock5b/boot.cmd
@@ -0,0 +1,3 @@
+setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 clkin_hz=(25000000) earlycon clk_ignore_unused earlyprintk console=ttyS2,1500000n8 rootwait
+fatload mmc 1:1 ${loadaddr} image.itb
+bootm ${loadaddr}
diff --git a/board/radxa/rock5b/genimage.cfg b/board/radxa/rock5b/genimage.cfg
new file mode 100644
index 0000000000..2943232fc3
--- /dev/null
+++ b/board/radxa/rock5b/genimage.cfg
@@ -0,0 +1,34 @@
+# SD card image for Radxa Rock 5b
+
+image boot.vfat {
+ vfat {
+ files = {
+ "image.itb",
+ "boot.scr"
+ }
+ }
+ size = 16M
+}
+
+image sdcard.img {
+ hdimage {
+ partition-table-type = "hybrid"
+ }
+
+ partition uboot {
+ in-partition-table = "false"
+ image = "u-boot-rockchip.bin"
+ offset = 32K
+ }
+
+ partition boot {
+ partition-type = "0xC"
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext2"
+ }
+}
diff --git a/board/radxa/rock5b/linux.fragment b/board/radxa/rock5b/linux.fragment
new file mode 100644
index 0000000000..811d42a79b
--- /dev/null
+++ b/board/radxa/rock5b/linux.fragment
@@ -0,0 +1 @@
+CONFIG_R8169=y
diff --git a/board/radxa/rock5b/post-image.sh b/board/radxa/rock5b/post-image.sh
new file mode 100755
index 0000000000..c0f63ab3a2
--- /dev/null
+++ b/board/radxa/rock5b/post-image.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+gzip -fk ${BINARIES_DIR}/Image
+cp board/radxa/rock5b/rock5b.its ${BINARIES_DIR}
+(cd $BINARIES_DIR && mkimage -f rock5b.its image.itb)
+support/scripts/genimage.sh -c board/radxa/rock5b/genimage.cfg
diff --git a/board/radxa/rock5b/readme.txt b/board/radxa/rock5b/readme.txt
new file mode 100644
index 0000000000..a88b9b46fa
--- /dev/null
+++ b/board/radxa/rock5b/readme.txt
@@ -0,0 +1,62 @@
+RADXA ROCK 5B
+==============
+https://wiki.radxa.com/Rock5/hardware/5b
+
+Build:
+======
+ $ make rock5b_defconfig
+ $ make
+
+Files created in output directory
+=================================
+
+output/images
+.
+├── Image
+├── Image.gz
+├── boot.scr
+├── boot.vfat
+├── image.itb
+├── rk3588-rock-5b.dtb
+├── rk3588_bl31_v1.40.elf
+├── rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin
+├── rock5b.its
+├── rootfs.ext2
+├── rootfs.ext4
+├── rootfs.tar
+├── sdcard.img
+├── u-boot-rockchip.bin
+└── u-boot.bin
+
+Creating bootable SD card:
+==========================
+
+Simply invoke (as root)
+
+sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
+
+Where X is your SD card device.
+
+Booting:
+========
+
+Serial console:
+---------------
+The Rock 5B has a 40-pin GPIO header. Its layout can be seen here:
+https://wiki.radxa.com/Rock5/hardware/5b/gpio
+
+The Uart pins are as follows:
+
+pin 6: gnd
+pin 8: tx
+pin 10: rx
+
+Baudrate for this board is 1500000.
+
+Login:
+------
+Enter 'root' as login user, and the prompt is ready.
+
+wiki link:
+----------
+https://forum.radxa.com/c/rock5
diff --git a/board/radxa/rock5b/rock5b.its b/board/radxa/rock5b/rock5b.its
new file mode 100644
index 0000000000..d73659a56e
--- /dev/null
+++ b/board/radxa/rock5b/rock5b.its
@@ -0,0 +1,46 @@
+/dts-v1/;
+
+/ {
+ description = "Rock 5B FIT Image";
+ #address-cells = <1>;
+
+ images {
+ kernel {
+ description = "Kernel";
+ data = /incbin/("Image.gz");
+ type = "kernel";
+ arch = "arm64";
+ os = "linux";
+ compression = "gzip";
+ load = <0x0a200000>;
+ entry = <0x0a200000>;
+ hash {
+ algo = "sha256";
+ };
+ };
+ fdt {
+ description = "Device Tree";
+ data = /incbin/("rk3588-rock-5b.dtb");
+ type = "flat_dt";
+ arch = "arm64";
+ compression = "none";
+ load = <0x0e000000>;
+ entry = <0x0e000000>;
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+
+ configurations {
+ default = "standard";
+ standard {
+ description = "Standard Boot";
+ kernel = "kernel";
+ fdt = "fdt";
+ hash {
+ algo = "sha256";
+ };
+ };
+ };
+};
diff --git a/configs/rock5b_defconfig b/configs/rock5b_defconfig
new file mode 100644
index 0000000000..b7ed4f8b44
--- /dev/null
+++ b/configs/rock5b_defconfig
@@ -0,0 +1,42 @@
+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="Welcome to the rock5b board"
+BR2_SYSTEM_DHCP="eth0"
+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_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"
+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_NEEDS_ROCKCHIP_RKBIN=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/radxa/rock5b/boot.cmd"
+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
+BR2_PACKAGE_ROCKCHIP_RKBIN=y
+BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION=y
+BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE="b4558da0860ca48bf1a571dd33ccba580b9abe23"
+BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME="bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.12.bin"
+BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME="bin/rk35/rk3588_bl31_v1.40.elf"
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package
2023-07-26 18:04 ` [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package Kilian Zinnecker via buildroot
@ 2023-07-26 21:41 ` Yann E. MORIN
2023-08-07 11:45 ` Kilian Zinnecker via buildroot
0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-26 21:41 UTC (permalink / raw)
To: Kilian Zinnecker
Cc: Thomas Petazzoni, Giulio Benetti, Quentin Schulz, Andreas Ziegler,
buildroot
Killian, All,
On 2023-07-26 20:04 +0200, Kilian Zinnecker via buildroot spake thusly:
> This patch adds a package for the Rockchip ATF binary blobs. These
> binaries are needed to build U-Boot for some Rockchip SoCs (e.g.,
> RK3588). One can config a custom version and manually define which
> blobs (for bl31, tpl and optee) to use from the repository.
So, there was no rationale about why we sould need a custom version [0],
and the defconfig you provided was actually using the same version as
the predefined one, so we did not have any usage for it in-tree.
[0] yes, I read your reply about the question from Thomas, but
discussing with him we conluded that we indeed did not want to have a
custom version for now. So I dropped it.
If and when the need arises, then it will be time to add it back; see
below.
> Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
[--SNIP--]
> diff --git a/package/rockchip-rkbin/Config.in b/package/rockchip-rkbin/Config.in
> new file mode 100644
> index 0000000000..85c30c3745
> --- /dev/null
> +++ b/package/rockchip-rkbin/Config.in
> @@ -0,0 +1,47 @@
> +config BR2_PACKAGE_ROCKCHIP_RKBIN
> + bool "rockchip-rkbin"
> + depends on BR2_arm || BR2_aarch64
> + help
> + This package provides Rockchip SoC binary blobs for U-Boot.
> +
> +if BR2_PACKAGE_ROCKCHIP_RKBIN
> +
> +config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
> + bool "Use a custom version"
> + help
> + This option allows to use a specific version.
> +if BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
> +
> +config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE
> + string "Rockchip rkbin version"
> + depends on BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
> +
> +endif # BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
So, BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE is guarded twice:
once by the if-block, and once be a "depends on". That's sure a strong
guard! ;-)
Nonethless, I've dropped it.
[--SNIP--]
> +config BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME
> + string "Rockchip rkbin tpl file path"
> + help
> + Full path to the tpl file inside the rkbin repository. The
I've driopped the "Full" qualifier, because that is not a full path, as
it is relative to the top of the rockchip-rkbin directory.
Ditto for the other help texts.
[--SNIP--]
> diff --git a/package/rockchip-rkbin/rockchip-rkbin.hash b/package/rockchip-rkbin/rockchip-rkbin.hash
> new file mode 100644
> index 0000000000..cb71226556
> --- /dev/null
> +++ b/package/rockchip-rkbin/rockchip-rkbin.hash
> @@ -0,0 +1,2 @@
> +# Locally computed
> +sha256 bd8d19ace202ff26d1c0b4d7744cd467cd0093801dc674dde57290159eedee2b rockchip-rkbin-b4558da0860ca48bf1a571dd33ccba580b9abe23-br1.tar.gz
I've added a hash for the license file. Please check with:
$ make legal-info
or:
$ make rockchip-rkbin-legal-info
> diff --git a/package/rockchip-rkbin/rockchip-rkbin.mk b/package/rockchip-rkbin/rockchip-rkbin.mk
> new file mode 100644
> index 0000000000..74787585e8
> --- /dev/null
> +++ b/package/rockchip-rkbin/rockchip-rkbin.mk
> @@ -0,0 +1,46 @@
> +################################################################################
> +#
> +# rockchip-rkbin
> +#
> +################################################################################
> +
> +ROCKCHIP_RKBIN_VERSION = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_VERSION))
> +ROCKCHIP_RKBIN_SITE = https://github.com/rockchip-linux/rkbin.git
> +ROCKCHIP_RKBIN_SITE_METHOD = git
> +ROCKCHIP_RKBIN_LICENSE = PROPRIETARY
> +ROCKCHIP_RKBIN_LICENSE_FILES = LICENSE
Since the license file was only recently added, it should not be defined
except for the known version.
Furthermore, I think hadling the custom version, if we re-introduce it
later, should be done with:
Config.in:
config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
bool "Use a custom version"
help
Some binaries for older hipsets mey get pruned from the
latest revisions of the repository. Say 'y' here if your
SoC uses such older binaries.
config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE
string "Custom version"
depends on BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
rocjchip-rkbin.mk:
ifeq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION),)
ROCKCHIP_RKBIN_VERSION = b4558da0860ca48bf1a571dd33ccba580b9abe23
ROCKCHIP_RKBIN_LICENSE_FILES = LICENSE
else
ROCKCHIP_RKBIN_VERSION = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE))
ifeq ($(ROCKCHIP_RKBIN_VERSION),)
$(error blabla check config blabla)
endif
BR_NO_CHECK_HASH_FOR += $(ROCKCHIP_RKBIN_SOURCE)
endif
> +ROCKCHIP_RKBIN_INSTALL_IMAGES = YES
> +ROCKCHIP_RKBIN_INSTALL_TARGET = NO
> +
> +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME),"")
> +ROCKCHIP_RKBIN_BL31_FILENAME = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME))
> +endif
No need to test before setting the variable.
> +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME),"")
> +ROCKCHIP_RKBIN_TPL_FILENAME = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME))
> +endif
> +
> +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME),"")
> +ROCKCHIP_RKBIN_TEE_FILENAME = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME))
> +endif
> +
> +define ROCKCHIP_RKBIN_INSTALL_IMAGES_CMDS
> + $(if $(ROCKCHIP_RKBIN_BL31_FILENAME), \
> + cp $(@D)/$(ROCKCHIP_RKBIN_BL31_FILENAME) $(BINARIES_DIR)/${ROCKCHIP_RKBIN_BL31_FILENAME##*/})
> + $(if $(ROCKCHIP_RKBIN_TPL_FILENAME), \
> + cp $(@D)/$(ROCKCHIP_RKBIN_TPL_FILENAME) $(BINARIES_DIR)/${ROCKCHIP_RKBIN_TPL_FILENAME##*/})
> + $(if $(ROCKCHIP_RKBIN_TEE_FILENAME), \
> + cp $(@D)/$(ROCKCHIP_RKBIN_TEE_FILENAME) $(BINARIES_DIR)/${ROCKCHIP_RKBIN_TEE_FILENAME##*/})
I've simplified this with a $(foreach...)
Applied to master with these changes, thanks.
Regards,
Yann E. MORIN.
> +endef
> +
> +ifeq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION),y)
> +ifeq ($(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE)),)
> +$(error No custom rockchip-rkbin version specified. Check your BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE setting)
> +endif
> +ifeq ($(BR_BUILDING),y)
> +BR_NO_CHECK_HASH_FOR += rockchip-rkbin-$(ROCKCHIP_RKBIN_VERSION)-br1.tar.gz
> +endif
> +endif
> +
> +$(eval $(generic-package))
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs
2023-07-26 18:04 ` [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs Kilian Zinnecker via buildroot
@ 2023-07-26 21:43 ` Yann E. MORIN
2023-08-07 11:46 ` Kilian Zinnecker via buildroot
0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-26 21:43 UTC (permalink / raw)
To: Kilian Zinnecker
Cc: Thomas Petazzoni, Giulio Benetti, Quentin Schulz, Andreas Ziegler,
buildroot
Kilian, All,
On 2023-07-26 20:04 +0200, Kilian Zinnecker via buildroot spake thusly:
> Currently for some Rockchip SoCs binary blobs are needed, e.g., for
> the RK3588 bl31 and tpl. These blobs are provided by Rockchip. This
> patch adds U-Boot package options to use theses binaries, provided
> by the rockchip-rkbin package, which is also introduced in this
> patch series. The U-Boot package is modified so that it takes the
> chosen binaries and automatically uses them during build.
>
> Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
> ---
> boot/uboot/Config.in | 9 +++++++++
> boot/uboot/uboot.mk | 17 +++++++++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index 085397d03d..7733f8501f 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -262,6 +262,15 @@ config BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE
> This option makes sure that the i.MX firmwares are copied into
> the U-Boot source directory.
>
> +config BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN
> + bool "U-Boot needs rockchip-rkbin"
> + depends on BR2_PACKAGE_ROCKCHIP_RKBIN
> + help
> + For some Rockchip SoCs U-Boot needs binary blobs from
> + Rockchip.
> + This option makes sure that the needed binary blobs are copied
> + into the U-Boot source directory.
> +
> menu "U-Boot binary format"
>
> config BR2_TARGET_UBOOT_FORMAT_AIS
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index 1a6e70a792..b6e270f633 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -207,6 +207,23 @@ endef
> UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_FW_FILES
> endif
>
> +ifeq ($(BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN),y)
> +UBOOT_DEPENDENCIES += rockchip-rkbin
> +define UBOOT_INSTALL_UBOOT_ROCKCHIP_BIN
> + $(INSTALL) -D -m 0644 $(@D)/u-boot-rockchip.bin $(BINARIES_DIR)/u-boot-rockchip.bin
> +endef
> +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_UBOOT_ROCKCHIP_BIN
> +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME),"")
> +UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/${notdir $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME))}
I've re-used the already-qstripped variables from the rockchip-rkbin
package.
Also, I switched from using curly brances to the ;ore standard (for
Buildroot) parethesis.
Applied to master, thanks.
Regards,
Yann E. MORIN.
> +endif
> +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME),"")
> +UBOOT_MAKE_OPTS += ROCKCHIP_TPL=$(BINARIES_DIR)/${notdir $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME))}
> +endif
> +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME),"")
> +UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/${notdir $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME))}
> +endif
> +endif
> +
> ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
> UBOOT_DEPENDENCIES += host-dtc
> UBOOT_MAKE_OPTS += DTC=$(HOST_DIR)/bin/dtc
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v8 3/3] configs/rock5b: new defconfig
2023-07-26 18:04 ` [Buildroot] [PATCH v8 3/3] configs/rock5b: new defconfig Kilian Zinnecker via buildroot
@ 2023-07-26 21:45 ` Yann E. MORIN
0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-07-26 21:45 UTC (permalink / raw)
To: Kilian Zinnecker
Cc: Thomas Petazzoni, Giulio Benetti, Quentin Schulz, Andreas Ziegler,
buildroot
Kilian, All,
On 2023-07-26 20:04 +0200, Kilian Zinnecker via buildroot spake thusly:
> This patch adds the defconfig file needed to build u-boot, kernel
> and rootfs for the Rock 5B. In addition it adds a kernel config
> fragment file, which activates the needed ethernet driver support.
> It also adds a readme and post image scripts, needed to generate an
> sdcard.img file, which can be flashed on an SD card to boot the
> Radxa Rock 5B.
>
> Signed-off-by: Kilian Zinnecker <kilian.zinnecker@mail.de>
> ---
[--SNIP--]
> diff --git a/board/radxa/rock5b/post-image.sh b/board/radxa/rock5b/post-image.sh
> new file mode 100755
> index 0000000000..c0f63ab3a2
> --- /dev/null
> +++ b/board/radxa/rock5b/post-image.sh
> @@ -0,0 +1,6 @@
> +#!/usr/bin/env bash
> +
> +gzip -fk ${BINARIES_DIR}/Image
> +cp board/radxa/rock5b/rock5b.its ${BINARIES_DIR}
> +(cd $BINARIES_DIR && mkimage -f rock5b.its image.itb)
> +support/scripts/genimage.sh -c board/radxa/rock5b/genimage.cfg
$ make check-package
board/radxa/rock5b/post-image.sh:0: run 'shellcheck' and fix the warnings
I fixed those errors. I also made the script "set -e" so it exits on
error on the first error.
I've also dropped the custom version, which in fact was not custom.
Applied to master, thanks.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package
2023-07-26 21:41 ` Yann E. MORIN
@ 2023-08-07 11:45 ` Kilian Zinnecker via buildroot
2023-08-07 17:29 ` Yann E. MORIN
0 siblings, 1 reply; 10+ messages in thread
From: Kilian Zinnecker via buildroot @ 2023-08-07 11:45 UTC (permalink / raw)
To: Yann E. MORIN
Cc: Thomas Petazzoni, Giulio Benetti, Quentin Schulz, Andreas Ziegler,
buildroot
Hello Yann, all
thanks for your review, fixes and applying the patches. And sorry for the late
answer. What I write now is imho not so important anymore, still I want to
give some reply:
> > This patch adds a package for the Rockchip ATF binary blobs. These
> > binaries are needed to build U-Boot for some Rockchip SoCs (e.g.,
> > RK3588). One can config a custom version and manually define which
> > blobs (for bl31, tpl and optee) to use from the repository.
>
> So, there was no rationale about why we sould need a custom version [0],
> and the defconfig you provided was actually using the same version as
> the predefined one, so we did not have any usage for it in-tree.
>
> [0] yes, I read your reply about the question from Thomas, but
> discussing with him we conluded that we indeed did not want to have a
> custom version for now. So I dropped it.
>
> If and when the need arises, then it will be time to add it back; see
> below.
I personally still favor it, but its not so important to me and I can
understand, that you don't see much need at the moment and probably prefer to
keep it simple, so I am totally fine with dropping the custom version stuff. As
you say: If need arises, we can then revaluate.
[--SNIP--]
> > +config BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME
> > + string "Rockchip rkbin tpl file path"
> > + help
> > + Full path to the tpl file inside the rkbin repository. The
>
> I've driopped the "Full" qualifier, because that is not a full path, as
> it is relative to the top of the rockchip-rkbin directory.
>
> Ditto for the other help texts.
Agreed. However, you introduced some typo on one occasion, by snipping "Full"
and "path" to "Fath ;)
https://gitlab.com/buildroot.org/buildroot/-/blob/
8d1180aa483b624f1be27bd0858c2f6665ebf36c/package/rockchip-rkbin/Config.in#L12
> > diff --git a/package/rockchip-rkbin/rockchip-rkbin.hash
> > b/package/rockchip-rkbin/rockchip-rkbin.hash new file mode 100644
> > index 0000000000..cb71226556
> > --- /dev/null
> > +++ b/package/rockchip-rkbin/rockchip-rkbin.hash
> > @@ -0,0 +1,2 @@
> > +# Locally computed
> > +sha256 bd8d19ace202ff26d1c0b4d7744cd467cd0093801dc674dde57290159eedee2b
> > rockchip-rkbin-b4558da0860ca48bf1a571dd33ccba580b9abe23-br1.tar.gz
> I've added a hash for the license file. Please check with:
>
> $ make legal-info
> or:
> $ make rockchip-rkbin-legal-info
Thanks, seems to work on my PC.
> > diff --git a/package/rockchip-rkbin/rockchip-rkbin.mk
> > b/package/rockchip-rkbin/rockchip-rkbin.mk new file mode 100644
> > index 0000000000..74787585e8
> > --- /dev/null
> > +++ b/package/rockchip-rkbin/rockchip-rkbin.mk
> > @@ -0,0 +1,46 @@
> > +#########################################################################
> > ####### +#
> > +# rockchip-rkbin
> > +#
> > +#########################################################################
> > ####### +
> > +ROCKCHIP_RKBIN_VERSION = $(call
> > qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_VERSION)) +ROCKCHIP_RKBIN_SITE =
> > https://github.com/rockchip-linux/rkbin.git +ROCKCHIP_RKBIN_SITE_METHOD =
> > git
> > +ROCKCHIP_RKBIN_LICENSE = PROPRIETARY
> > +ROCKCHIP_RKBIN_LICENSE_FILES = LICENSE
>
> Since the license file was only recently added, it should not be defined
> except for the known version.
>
> Furthermore, I think hadling the custom version, if we re-introduce it
> later, should be done with:
>
> Config.in:
>
> config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
> bool "Use a custom version"
> help
> Some binaries for older hipsets mey get pruned from the
> latest revisions of the repository. Say 'y' here if your
> SoC uses such older binaries.
>
> config BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE
> string "Custom version"
> depends on BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION
>
> rocjchip-rkbin.mk:
>
> ifeq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION),)
> ROCKCHIP_RKBIN_VERSION = b4558da0860ca48bf1a571dd33ccba580b9abe23
> ROCKCHIP_RKBIN_LICENSE_FILES = LICENSE
> else
> ROCKCHIP_RKBIN_VERSION = $(call
> qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_CUSTOM_VERSION_VALUE)) ifeq
> ($(ROCKCHIP_RKBIN_VERSION),)
> $(error blabla check config blabla)
> endif
> BR_NO_CHECK_HASH_FOR += $(ROCKCHIP_RKBIN_SOURCE)
> endif
Great, thanks! I did actually have in mind, that the custom version and the
(in older versions not existing) LICENSE file may cause problems. But I didn't
know what to do about it and forgot to ask here. Thanks!
[--SNIP--]
> > +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME),"")
> > +ROCKCHIP_RKBIN_TPL_FILENAME = $(call
> > qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME)) +endif
> > +
> > +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME),"")
> > +ROCKCHIP_RKBIN_TEE_FILENAME = $(call
> > qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_TEE_FILENAME)) +endif
> > +
> > +define ROCKCHIP_RKBIN_INSTALL_IMAGES_CMDS
> > + $(if $(ROCKCHIP_RKBIN_BL31_FILENAME), \
> > + cp $(@D)/$(ROCKCHIP_RKBIN_BL31_FILENAME)
> > $(BINARIES_DIR)/${ROCKCHIP_RKBIN_BL31_FILENAME##*/}) + $(if
> > $(ROCKCHIP_RKBIN_TPL_FILENAME), \
> > + cp $(@D)/$(ROCKCHIP_RKBIN_TPL_FILENAME)
> > $(BINARIES_DIR)/${ROCKCHIP_RKBIN_TPL_FILENAME##*/}) + $(if
> > $(ROCKCHIP_RKBIN_TEE_FILENAME), \
> > + cp $(@D)/$(ROCKCHIP_RKBIN_TEE_FILENAME)
> > $(BINARIES_DIR)/${ROCKCHIP_RKBIN_TEE_FILENAME##*/})
> I've simplified this with a $(foreach...)
Thanks, much better of course!
> Applied to master with these changes, thanks.
Thanks for reviewing!
Best regards,
Kilian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs
2023-07-26 21:43 ` Yann E. MORIN
@ 2023-08-07 11:46 ` Kilian Zinnecker via buildroot
0 siblings, 0 replies; 10+ messages in thread
From: Kilian Zinnecker via buildroot @ 2023-08-07 11:46 UTC (permalink / raw)
To: Yann E. MORIN
Cc: Thomas Petazzoni, Giulio Benetti, Quentin Schulz, Andreas Ziegler,
buildroot
Hello Yann, all,
[--SNIP--]
> > +ifeq ($(BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN),y)
> > +UBOOT_DEPENDENCIES += rockchip-rkbin
> > +define UBOOT_INSTALL_UBOOT_ROCKCHIP_BIN
> > + $(INSTALL) -D -m 0644 $(@D)/u-boot-rockchip.bin
> > $(BINARIES_DIR)/u-boot-rockchip.bin +endef
> > +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_UBOOT_ROCKCHIP_BIN
> > +ifneq ($(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME),"")
> > +UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/${notdir $(call
> > qstrip,$(BR2_PACKAGE_ROCKCHIP_RKBIN_BL31_FILENAME))}
> I've re-used the already-qstripped variables from the rockchip-rkbin
> package.
>
> Also, I switched from using curly brances to the ;ore standard (for
> Buildroot) parethesis.
Yes, much better of course, thanks!
[--SNIP--]
Best regards,
Kilian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package
2023-08-07 11:45 ` Kilian Zinnecker via buildroot
@ 2023-08-07 17:29 ` Yann E. MORIN
0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2023-08-07 17:29 UTC (permalink / raw)
To: Kilian Zinnecker
Cc: Thomas Petazzoni, Giulio Benetti, Quentin Schulz, Andreas Ziegler,
buildroot
Kilian, All,
On 2023-08-07 13:45 +0200, Kilian Zinnecker spake thusly:
[--SNIP--]
> > > +config BR2_PACKAGE_ROCKCHIP_RKBIN_TPL_FILENAME
> > > + string "Rockchip rkbin tpl file path"
> > > + help
> > > + Full path to the tpl file inside the rkbin repository. The
> > I've driopped the "Full" qualifier, because that is not a full path, as
> > it is relative to the top of the rockchip-rkbin directory.
> > Ditto for the other help texts.
> Agreed. However, you introduced some typo on one occasion, by snipping "Full"
> and "path" to "Fath ;)
You may have noticed that typoes are my hallmark, the very personal
signature of mine! ;-)
> https://gitlab.com/buildroot.org/buildroot/-/blob/
> 8d1180aa483b624f1be27bd0858c2f6665ebf36c/package/rockchip-rkbin/Config.in#L12
Fixed, thanks.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-08-07 17:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 18:04 [Buildroot] [PATCH v8 0/3] Add board support for Radxa Rock 5B Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 1/3] package/rockchip-rkbin: new package Kilian Zinnecker via buildroot
2023-07-26 21:41 ` Yann E. MORIN
2023-08-07 11:45 ` Kilian Zinnecker via buildroot
2023-08-07 17:29 ` Yann E. MORIN
2023-07-26 18:04 ` [Buildroot] [PATCH v8 2/3] boot/uboot: Add support for Rockchip binary blobs Kilian Zinnecker via buildroot
2023-07-26 21:43 ` Yann E. MORIN
2023-08-07 11:46 ` Kilian Zinnecker via buildroot
2023-07-26 18:04 ` [Buildroot] [PATCH v8 3/3] configs/rock5b: new defconfig Kilian Zinnecker via buildroot
2023-07-26 21:45 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox