diff mbox series

[v4,8/8] doc: rockchip: Document Rockchip miniloader flashing

Message ID 20201028133348.241839-9-jagan@amarulasolutions.com
State Accepted
Commit 43ed7a098d62e700ac024ab913f3be17a6974bb2
Delegated to: Kever Yang
Headers show
Series rockchip: Add Engicam PX30.Core support | expand

Commit Message

Jagan Teki Oct. 28, 2020, 1:33 p.m. UTC
This would be useful and recommended boot flow for new boards
which has doesn't have the DDR support yet in mainline.

Sometimes it is very useful for debugging mainline DDR support.

Documen it for px30 boot flow.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v4:
- none

 doc/board/rockchip/rockchip.rst | 40 ++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

Comments

Kever Yang Oct. 30, 2020, 3:29 p.m. UTC | #1
On 2020/10/28 下午9:33, Jagan Teki wrote:
> This would be useful and recommended boot flow for new boards
> which has doesn't have the DDR support yet in mainline.
>
> Sometimes it is very useful for debugging mainline DDR support.
>
> Documen it for px30 boot flow.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
> Changes for v4:
> - none
>
>   doc/board/rockchip/rockchip.rst | 40 ++++++++++++++++++++++++++++++++-
>   1 file changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
> index 8c92de0c92..955e6858f2 100644
> --- a/doc/board/rockchip/rockchip.rst
> +++ b/doc/board/rockchip/rockchip.rst
> @@ -123,6 +123,9 @@ To build rk3399 boards::
>   Flashing
>   --------
>   
> +1. Package the image with U-Boot TPL/SPL
> +-----------------------------------------
> +
>   SD Card
>   ^^^^^^^
>   
> @@ -187,6 +190,39 @@ Copy SPI boot images into SD card and boot from SD::
>           sf erase 0x60000 +$filesize
>           sf write $kernel_addr_r 0x60000 ${filesize}
>   
> +2. Package the image with Rockchip miniloader
> +---------------------------------------------
> +
> +Image package with Rockchip miniloader requires robin [1].
> +
> +Create idbloader.img
> +
> +.. code-block:: none
> +
> +  cd u-boot
> +  ./tools/mkimage -n px30 -T rksd -d rkbin/bin/rk33/px30_ddr_333MHz_v1.15.bin idbloader.img
> +  cat rkbin/bin/rk33/px30_miniloader_v1.22.bin >> idbloader.img
> +  sudo dd if=idbloader.img of=/dev/sda seek=64
> +
> +Create trust.img
> +
> +.. code-block:: none
> +
> +  cd rkbin
> +  ./tools/trust_merger RKTRUST/PX30TRUST.ini
> +  sudo dd if=trust.img of=/dev/sda seek=24576
> +
> +Create uboot.img
> +
> +.. code-block:: none
> +
> +  rbink/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img 0x200000
> +  sudo dd if=uboot.img of=/dev/sda seek=16384
> +
> +Note:
> +1. 0x200000 is load address and it's an optional in some platforms.
> +2. rkbin binaries are kept on updating, so would recommend to use the latest versions.
> +
>   TODO
>   ----
>   
> @@ -195,5 +231,7 @@ TODO
>   - Document SPI flash boot
>   - Add missing SoC's with it boards list
>   
> +[1] https://github.com/rockchip-linux/rkbin
> +
>   .. Jagan Teki <jagan@amarulasolutions.com>
> -.. Tuesday 02 June 2020 12:18:57 AM IST
> +.. Wednesday 28 October 2020 06:47:26 PM IST
diff mbox series

Patch

diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 8c92de0c92..955e6858f2 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -123,6 +123,9 @@  To build rk3399 boards::
 Flashing
 --------
 
+1. Package the image with U-Boot TPL/SPL
+-----------------------------------------
+
 SD Card
 ^^^^^^^
 
@@ -187,6 +190,39 @@  Copy SPI boot images into SD card and boot from SD::
         sf erase 0x60000 +$filesize
         sf write $kernel_addr_r 0x60000 ${filesize}
 
+2. Package the image with Rockchip miniloader
+---------------------------------------------
+
+Image package with Rockchip miniloader requires robin [1].
+
+Create idbloader.img
+
+.. code-block:: none
+
+  cd u-boot
+  ./tools/mkimage -n px30 -T rksd -d rkbin/bin/rk33/px30_ddr_333MHz_v1.15.bin idbloader.img
+  cat rkbin/bin/rk33/px30_miniloader_v1.22.bin >> idbloader.img
+  sudo dd if=idbloader.img of=/dev/sda seek=64
+
+Create trust.img
+
+.. code-block:: none
+
+  cd rkbin
+  ./tools/trust_merger RKTRUST/PX30TRUST.ini
+  sudo dd if=trust.img of=/dev/sda seek=24576
+
+Create uboot.img
+
+.. code-block:: none
+
+  rbink/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img 0x200000
+  sudo dd if=uboot.img of=/dev/sda seek=16384
+
+Note:
+1. 0x200000 is load address and it's an optional in some platforms.
+2. rkbin binaries are kept on updating, so would recommend to use the latest versions.
+
 TODO
 ----
 
@@ -195,5 +231,7 @@  TODO
 - Document SPI flash boot
 - Add missing SoC's with it boards list
 
+[1] https://github.com/rockchip-linux/rkbin
+
 .. Jagan Teki <jagan@amarulasolutions.com>
-.. Tuesday 02 June 2020 12:18:57 AM IST
+.. Wednesday 28 October 2020 06:47:26 PM IST