Browse Source

README: update README for spl_tool

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Samin Guo 1 year ago
parent
commit
1656fda1fb
2 changed files with 54 additions and 24 deletions
  1. 0 24
      spl_tool/README
  2. 54 0
      spl_tool/README.md

+ 0 - 24
spl_tool/README

@@ -1,24 +0,0 @@
-DESCRIPTION
-
-A replacement for VisionFive2 SDK spl_tool which happened to be proprietary.
-Use only with VisionFive2 boards to make u-boot-spl.bin.normal.out image!
-
-DISCLAIMER
-
-Use at your own risk! I, Rys Andrey, don't bear any responsibility for
-your broken hardware. Check the image carefully with your eyes before
-flashing it to real device!
-
-WHY
-
-Cause I want it to run on RISC-V when building U-Boot there. I don't want
-to resort to qemu-x86_64 to run a tool which does something very simple.
-
-OFFICIAL DOCUMENTATION
-
-UPD: Please see https://doc-en.rvspace.org/VisionFive2/Developer_Guide/JH7110_Boot_UG.pdf for complete guide on
-how to make bootable images for various boot sources (QSPI, eMMC, SD). It also covers this source aswell now.
-
-LICENSE
-
-Public domain.

+ 54 - 0
spl_tool/README.md

@@ -0,0 +1,54 @@
+## DESCRIPTION
+
+spl_tool is a jh7110 signature tool used to generate spl header information and generate u-boot-spl.bin.normal.out.
+
+spl_tool can also fix the issue of emmc booting.
+
+## Prerequisites
+
+Install required additional packages:
+
+```bash
+$ sudo apt-get install gcc make git
+```
+
+## Build
+
+just run `make`
+
+```bash
+$ make
+```
+
+## Run
+
+usage
+
+```bash
+$ ./spl_tool  -h
+
+			StarFive spl tool
+
+usage:
+-c, --creat-splhdr	creat spl hdr
+-i, --fix-imghdr	fixed img hdr for emmc boot.
+-a, --spl-bak-addr	set backup SPL addr(default: 0x200000)
+-v, --version		set version (default: 0x01010101)
+-f, --file		input file name(spl/img)
+-h, --help		show this information
+```
+
+Generate uboot-spl.bin.normal.out
+
+```bash
+$./spl_tool -c -f $(Uboot_PATH)/spl/u-boot-spl.bin
+ubsplhdr.sofs:0x240, ubsplhdr.bofs:0x200000, ubsplhdr.vers:0x1010101 name:$(Uboot_PATH)/spl/u-boot-spl.bin
+SPL written to $(Uboot_PATH)/spl/u-boot-spl.bin.normal.out successfully.
+```
+
+Fix the emmc boot issue
+
+```bash
+$ ./spl_tool -i -f sdcard.img
+IMG  sdcard.img fixed hdr successfully.
+```