Hi Johan,

On 7/30/2026 3:34 PM, Johan Jonker wrote:
> There are more tools that can program a eMMC.
> Add more eMMC program examples.
> 
> Signed-off-by: Johan Jonker <[email protected]>
> ---
> 
> Changed V3:
> use eMMC
> use list per example
> mention loader matching to SoC
> ---
>  doc/board/rockchip/rockchip.rst | 47 +++++++++++++++++++++------------
>  1 file changed, 30 insertions(+), 17 deletions(-)
> 
> --
> 2.39.5
> 
> diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
> index af5c00591234..c089419b65e5 100644
> --- a/doc/board/rockchip/rockchip.rst
> +++ b/doc/board/rockchip/rockchip.rst
> @@ -393,36 +393,49 @@ To write an image that boots from a SD card (assumed to 
> be /dev/sda):
>  eMMC
>  """"
> 
> -eMMC flash would probe on mmc0 in most of the Rockchip platforms.
> +* Program example with fastboot for rk3399 and full U-Boot:
> 
> -Create GPT partition layout as defined in $partitions:
> +  eMMC flash would probe on mmc0 in most of the Rockchip platforms.
> 
> -.. code-block:: bash
> +  Create GPT partition layout as defined in $partitions:

We should really discourage users from using this legacy GPT partition
layout, nothing in mainline U-Boot depends on it beside the use of the
loader1 and loader2 partition names in this docs.

Vendor U-Boot SPL even look up partition names for FIT payload, but
not the legacy names we have here.

And newer RK35xx SoCs we thankfully no longer define the this legacy
layout in a partitions env var :-)

> 
> -        mmc dev 0
> -        gpt write mmc 0 $partitions
> +  .. code-block:: bash
> 
> -Connect the USB-OTG cable between the host and a target device.
> +          mmc dev 0
> +          gpt write mmc 0 $partitions
> 
> -Launch fastboot on the target with:
> +  Connect the USB-OTG cable between the host and a target device.
> 
> -.. code-block:: bash
> +  Launch fastboot on the target with:
> 
> -        fastboot 0
> +  .. code-block:: bash
> 
> -Upon a successful gadget connection the host shows the USB device with:
> +          fastboot 0
> 
> -.. code-block:: bash
> +  Upon a successful gadget connection the host shows the USB device with:
> 
> -        lsusb
> -        # Bus 001 Device 020: ID 2207:330c Fuzhou Rockchip Electronics 
> Company RK3399 in Mask ROM mode
> +  .. code-block:: bash
> 
> -Program the flash with:
> +          lsusb
> +          # Bus 001 Device 020: ID 2207:330c Fuzhou Rockchip Electronics 
> Company RK3399 in Mask ROM mode
> 
> -.. code-block:: bash
> +  Program the flash with:
> +
> +  .. code-block:: bash
> +
> +          sudo fastboot -i 0x2207 flash loader1 idbloader.img
> +          sudo fastboot -i 0x2207 flash loader2 u-boot.itb
> +
> +* Program example with rkdeveloptool for rk3308 in BootROM mode:
> +
> +  Use a loader binary that matches the SoC.

I do not really like that we are adding new instructions that depends
on proprietary loader blobs.

The loader blobs (for newer SoCs) is typically just vendor ddr init and
vendor U-Boot SPL blobs running rockusb protocol.

If you insist on adding this section, please add instructions on where
you can get and build a new loaders, e.g. from rkbin repo by running

  tools/boot_merger RKBOOT/RK3308MINIALL.ini

> +
> +  .. code-block:: bash
> 
> -        sudo fastboot -i 0x2207 flash loader1 idbloader.img
> -        sudo fastboot -i 0x2207 flash loader2 u-boot.itb
> +          rkdeveloptool db rk3308_loader_v1.26.117.bin
> +          rkdeveloptool wl 0x40 idbloader.img
> +          rkdeveloptool wl 0x4000 u-boot.itb

I was hoping we could remove references to idbloader.img and u-boot.itb,
not adding more.

Maybe adding instructions on how you can use U-Boot proper to run 'ums'
or 'rockusb' command to write boot firmware to eMMC could be added
instead? :-)

Or my favorite way is to just load u-boot-rockchip.bin onto a SD-card
and just use 'load mmc' and 'mmc write' commands from U-Boot proper
itself, see [1].

[1] https://github.com/Kwiboo/u-boot-build

Regards,
Jonas

> +          rkdeveloptool rd
> 
>  Note:
> 

Reply via email to