Skip to contentSkip to conversation

rockchip: configs: mk808: change CONFIG_TPL_TEXT_BASE

PATCH In review Johan Jonker 2 participants 3 messages Jan 16, 2023 – Jan 17, 2023 Arm Rockchip

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rockchip: configs: mk808: change CONFIG_TPL_TEXT_BASE

Currently the Rockchip rk3066a u-boot-tpl.bin file needs to add the characters "RK30", while the other SoCs replace the first 4 bytes. Bring this in line with the rest by lowering CONFIG_TPL_TEXT_BASE and update rockchip.rst instructions.

---
 configs/mk808_defconfig         | 2 +-
 doc/board/rockchip/rockchip.rst | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
configs/mk808_defconfig +1 -1
index 7ba8338a..9ffda699 100644
@@ -15,7 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3066a-mk808"
 CONFIG_SPL_TEXT_BASE=0x60000000
 CONFIG_ROCKCHIP_RK3066=y
 # CONFIG_ROCKCHIP_STIMER is not set
-CONFIG_TPL_TEXT_BASE=0x10080C04
+CONFIG_TPL_TEXT_BASE=0x10080C00
 CONFIG_TPL_STACK=0x1008FFFF
 CONFIG_TARGET_MK808=y
 CONFIG_SPL_STACK_R_ADDR=0x70000000
doc/board/rockchip/rockchip.rst +3 -4
index 4ca7b00b..b190a76f 100644
@@ -358,9 +358,8 @@ Program with commands in a bash script ./flash.sh:
 
         #!/bin/sh
 
-        printf "RK30" > tplspl.bin
-        dd if=u-boot-tpl.bin >> tplspl.bin
-        truncate -s %2048 tplspl.bin
+        printf "RK30" | dd conv=notrunc bs=4 count=1 of=u-boot-tpl.bin
+        truncate -s %2048 u-boot-tpl.bin
         truncate -s %2048 u-boot-spl.bin
         ../tools/boot_merger --verbose config-flash.ini
         ../tools/upgrade_tool ul ./RK30xxLoader_uboot.bin
@@ -384,7 +383,7 @@ config-flash.ini:
         NUM=2
         LOADER1=FlashData
         LOADER2=FlashBoot
-        FlashData=tplspl.bin
+        FlashData=u-boot-tpl.bin
         FlashBoot=u-boot-spl.bin
         [OUTPUT]
         PATH=RK30xxLoader_uboot.bin

--
2.20.1

#1 lore raw

PATCH 2/2 rockchip: configs: mk808: enable usb support

Enable usb support in the mk808_defconfig.

---
 configs/mk808_defconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)
configs/mk808_defconfig +10 -0
index 9ffda699..dc694e76 100644
@@ -52,6 +52,9 @@ CONFIG_SYS_PBSIZE=276
 # CONFIG_BOOTM_VXWORKS is not set
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
@@ -77,6 +80,7 @@ CONFIG_TPL_SYSCON=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_TPL_CLK=y
+CONFIG_FASTBOOT_BUF_ADDR=0x80000000
 CONFIG_ROCKCHIP_GPIO=y
 # CONFIG_SPL_DM_I2C is not set
 CONFIG_LED=y
@@ -106,6 +110,12 @@ CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_TPL_TIMER=y
 CONFIG_DESIGNWARE_APB_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_DWC2=y
+CONFIG_ROCKCHIP_USB2_PHY=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
 CONFIG_SPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y
 # CONFIG_TPL_OF_LIBFDT is not set

--
2.20.1

Reviewed-by on v1 1/2
#2 lore raw
In reply to Johan Jonker
Quoted 7 lines · Johan Jonker

Currently the Rockchip rk3066a u-boot-tpl.bin file needs to add the characters "RK30", while the other SoCs replace the first 4 bytes. Bring this in line with the rest by lowering CONFIG_TPL_TEXT_BASE and update rockchip.rst instructions.

Quoted 6 lines
---
 configs/mk808_defconfig         | 2 +-
 doc/board/rockchip/rockchip.rst | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)