Skip to content

Commit

Permalink
docs: update u-boot to latest with SPL loader
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanta525 committed Sep 2, 2023
1 parent 426752b commit e1aa605
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 5 deletions.
3 changes: 1 addition & 2 deletions package/boot/uboot-rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/blob/idbloader.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-idbloader.img
$(CP) $(PKG_BUILD_DIR)/blob/uboot.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.img
$(CP) $(PKG_BUILD_DIR)/blob/trust.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-trust.img
$(CP) $(PKG_BUILD_DIR)/blob/u-boot.itb $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot.itb
endef

define Package/u-boot/install/default
Expand Down
Binary file not shown.
Binary file modified package/boot/uboot-rockchip/src/blob/idbloader.img
Binary file not shown.
Binary file removed package/boot/uboot-rockchip/src/blob/trust.img
Binary file not shown.
Binary file added package/boot/uboot-rockchip/src/blob/u-boot.itb
Binary file not shown.
Binary file removed package/boot/uboot-rockchip/src/blob/uboot.img
Binary file not shown.
3 changes: 1 addition & 2 deletions target/linux/rockchip/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ define Build/pine64-img

# Copy the idbloader and the u-boot image to the image at sector 0x40 and 0x4000
dd if="$(STAGING_DIR_IMAGE)"/$(UBOOT_DEVICE_NAME)-idbloader.img of="$@" seek=64 conv=notrunc
dd if="$(STAGING_DIR_IMAGE)"/$(UBOOT_DEVICE_NAME)-uboot.img of="$@" seek=16384 conv=notrunc
dd if="$(STAGING_DIR_IMAGE)"/$(UBOOT_DEVICE_NAME)-trust.img of="$@" seek=24576 conv=notrunc
dd if="$(STAGING_DIR_IMAGE)"/$(UBOOT_DEVICE_NAME)-u-boot.itb of="$@" seek=16384 conv=notrunc
endef

### Devices ###
Expand Down
25 changes: 25 additions & 0 deletions uboot-tk3308-doc/0001-fix-boot-in-rock-pi-s.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 1506305191eb8573e938560be4b5298a71882f9a Mon Sep 17 00:00:00 2001
From: Jayantajit Gogoi <[email protected]>
Date: Thu, 31 Aug 2023 12:15:24 +0000
Subject: [PATCH] fix boot in rock pi s

---
configs/rock-pi-s-rk3308_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/rock-pi-s-rk3308_defconfig b/configs/rock-pi-s-rk3308_defconfig
index cc3274a98b..cb93eeb671 100644
--- a/configs/rock-pi-s-rk3308_defconfig
+++ b/configs/rock-pi-s-rk3308_defconfig
@@ -48,7 +48,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_SLEEP is not set
-# CONFIG_DOS_PARTITION is not set
+CONFIG_DOS_PARTITION=y
# CONFIG_ISO_PARTITION is not set
CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64
CONFIG_SPL_OF_CONTROL=y
--
2.34.1

20 changes: 19 additions & 1 deletion uboot-tk3308-doc/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# U-boot build instructions

## See below for latest u-boot v2023.10-rc3
U-boot tag: uboot v2022.04
patch: `001-rock-pi-s-files.patch`

Expand All @@ -26,4 +26,22 @@ cp uboot.img /home/ubuntu/rockpis/package/boot/uboot-rockchip/src/blob/
```bash
./tools/trust_merger RKTRUST/RK3308TRUST.ini
cp trust.img /home/ubuntu/rockpis/package/boot/uboot-rockchip/src/blob/
```

# Compiling v2023.10-rc3

u-boot tag: uboot v2023.10-rc3
patch: `0001-fix-boot-in-rock-pi-s.patch`


- Apply above patch with `git apply ...`
- Prepare idbloader.img

```bash
export BL31=..../rk3308_bl31_v2.26.elf
make rock-pi-s-rk3308_defconfig
make -j12 CROSS_COMPILE=aarch64-linux-gnu- all
./tools/mkimage -n rk3308 -T rksd -d ..../rk3308_ddr_589MHz_uart0_m0_v2.06.bin idbloader.img
cat spl/u-boot-spl.bin >> idbloader.img
cp idbloader.img u-boot.itb ../openwrt/package/boot/uboot-rockchip/src/blob/
```

0 comments on commit e1aa605

Please sign in to comment.