[PATCH 6/6] rockchip: Add DFU to boot from USB for Radxa ROCK Pi S
FUKAUMI Naoki
naoki at radxa.com
Tue Feb 11 07:13:22 CET 2025
Boot the Radxa ROCK Pi S from the USB OTG port using rkflashtool[1] or
rkusbboot[2] and dfu-util.
1a. Download the TPL and SPL using rkflashtool
$ openssl rc4 -provider legacy -K 7c4e0304550509072d2c7b38170d1711 \
< mkimage-in-simple-bin.mkimage-rockchip-tpl | rkflashtool l
$ openssl rc4 -provider legacy -K 7c4e0304550509072d2c7b38170d1711 \
< mkimage-in-simple-bin.mkimage-u-boot-spl | rkflashtool L
1b. Download the TPL and SPL using rkusbboot
$ rkusbboot \
mkimage-in-simple-bin.mkimage-rockchip-tpl \
mkimage-in-simple-bin.mkimage-u-boot-spl
2. Download the U-Boot
$ dfu-util -a 0 -D u-boot.itb
[1] https://github.com/linux-rockchip/rkflashtool
[2] https://github.com/RadxaNaoki/rkusbboot
Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
---
configs/rock-pi-s-rk3308_defconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configs/rock-pi-s-rk3308_defconfig b/configs/rock-pi-s-rk3308_defconfig
index 4b08af309b1..29eb6a26bfb 100644
--- a/configs/rock-pi-s-rk3308_defconfig
+++ b/configs/rock-pi-s-rk3308_defconfig
@@ -19,6 +19,8 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3308-rock-pi-s.dtb"
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
@@ -35,6 +37,9 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
+CONFIG_DFU_RAM=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000
+CONFIG_SYS_DFU_MAX_FILE_SIZE=0x200000
# CONFIG_USB_FUNCTION_FASTBOOT is not set
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
@@ -62,11 +67,14 @@ CONFIG_SYSINFO=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_DM_USB_GADGET=y
+CONFIG_SPL_DM_USB_GADGET=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_GADGET=y
+CONFIG_SPL_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_USB_FUNCTION_ROCKUSB=y
+CONFIG_SPL_DFU=y
CONFIG_LZO=y
CONFIG_ERRNO_STR=y
--
2.43.0
More information about the U-Boot
mailing list