[PATCH v2 11/12] rockchip: lion-rk3368: migrate to u-boot-rockchip.bin

Quentin Schulz foss+uboot at 0leil.net
Thu Sep 15 11:14:31 CEST 2022


From: Quentin Schulz <quentin.schulz at theobroma-systems.com>

The offset of the SPL payload on Lion is different than for other
Rockchip devices in that it is stored at offset 256K instead of much
further away in the MMC.

Flashing one binary instead of two at different offsets is much more
user friendly so let's migrate to it by modifying the offset in the Lion
specific Device Tree.

Cc: Quentin Schulz <foss+uboot at 0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>
---
 arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi | 8 ++++++++
 board/theobroma-systems/lion_rk3368/README  | 9 +++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi b/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi
index 7826d1e70b..02cb5ef9d9 100644
--- a/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi
+++ b/arch/arm/dts/rk3368-lion-haikou-u-boot.dtsi
@@ -38,6 +38,14 @@
 	};
 };
 
+&binman {
+	simple-bin {
+		blob {
+			offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>;
+		};
+	};
+};
+
 &gpio2 {
 	u-boot,dm-pre-reloc;
 };
diff --git a/board/theobroma-systems/lion_rk3368/README b/board/theobroma-systems/lion_rk3368/README
index 7488b18326..3c15a7bb36 100644
--- a/board/theobroma-systems/lion_rk3368/README
+++ b/board/theobroma-systems/lion_rk3368/README
@@ -27,14 +27,12 @@ Build the full U-Boot and a FIT image including the ATF
 Flash the image
 ===============
 
-Copy the SPL to offset 32k and the FIT image containing the payloads
-(U-Boot proper, ATF, devicetree) to offset 256k card.
+Copy u-boot-rockchip.bin at offset 32k on SD-Card/eMMC.
 
 SD-Card
 -------
 
-  > dd if=idbloader.img of=/dev/sdb seek=64
-  > dd if=u-boot.itb of=/dev/sdb seek=512
+  > dd if=u-boot-rockchip.bin of=/dev/sdb seekp=64
 
 eMMC
 ----
@@ -47,8 +45,7 @@ help of the Rockchip loader binary.
   > autoreconf -i && && ./configure && make
   > git clone https://github.com/rockchip-linux/rkbin.git
   > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin
-  > ./rkdeveloptool wl 64 ../spl.img
-  > ./rkdeveloptool wl 512 ../u-boot.itb
+  > ./rkdeveloptool wl 64 ../u-boot-rockchip.bin
 
 
 If everything went according to plan, you should see the following
-- 
2.37.3



More information about the U-Boot mailing list