[PATCH] doc: board: sophgo: milkv_duo: Update Milk-V Duo documentation

Kongyang Liu seashell11234455 at gmail.com
Thu May 23 08:40:19 CEST 2024


Add detailed steps for compiling U-Boot and OpenSBI, generating the
firmware package with fiptool, and booting the board.

Signed-off-by: Kongyang Liu <seashell11234455 at gmail.com>
---

 doc/board/sophgo/milkv_duo.rst | 41 +++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 11 deletions(-)

diff --git a/doc/board/sophgo/milkv_duo.rst b/doc/board/sophgo/milkv_duo.rst
index cb2ed1ad98..a88db5b903 100644
--- a/doc/board/sophgo/milkv_duo.rst
+++ b/doc/board/sophgo/milkv_duo.rst
@@ -20,31 +20,50 @@ Building
 .. code-block:: console
 
    export CROSS_COMPILE=<riscv64 toolchain prefix>
+
+3. Compile U-Boot
+
+.. code-block:: console
+
    cd <U-Boot-dir>
    make milkv_duo_defconfig
    make
 
-This will generate u-boot-dtb.bin
+This will generate u-boot.bin and u-boot.dtb
 
-Booting
-~~~~~~~
-Currently, we rely on vendor FSBL(First Stage Boot Loader) to initialize the
-clock and load the u-boot image, then bootup from it.
+4. Compile OpenSBI
+
+.. code-block:: console
 
-Alternatively, to run u-boot-dtb.bin on top of FSBL, follow these steps:
+   cd <OpenSBI-dir>
+   make PLATFORM=generic FW_FDT_PATH=<Your U-Boot Path>/u-boot.dtb
 
-1. Use the vendor-provided tool to create a unified fip.bin file containing
-   FSBL, OpenSBI, and U-Boot.
+This will generate fw_dynamic.bin
 
-2. Place the generated fip.bin file into the FAT partition of the SD card.
+4. Generate firmware image package
 
-3. Insert the SD card into the board and power it on.
+Fiptool(https://github.com/sophgo/fiptool) is used to generate fip file.
+
+.. code-block:: console
+
+   git clone https://github.com/sophgo/fiptool
+   cd fiptool
+   ./fiptool \
+      --fsbl data/fsbl/cv180x.bin \
+      --opensbi <OpenSBI-dir>/fw_dynamic.bin \
+      --uboot <U-Boot-dir>/u-boot.bin \
+
+This will generate fip.bin
+
+Booting
+~~~~~~~
+1. Place the generated fip.bin file into the FAT partition of the SD card.
+2. Insert the SD card into the board and power it on.
 
 The board will automatically execute the FSBL from the fip.bin file.
 Subsequently, it will transition to OpenSBI, and finally, OpenSBI will invoke
 U-Boot.
 
-
 Sample boot log from Milk-V Duo board
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 .. code-block:: none
-- 
2.41.0



More information about the U-Boot mailing list