tools: starfive: Add spl_tool of starfive
[platform/kernel/u-boot.git] / tools / starfive / spl_tool / README.md
1 ## DESCRIPTION
2
3 spl_tool is a jh7110 signature tool used to generate spl header information and generate u-boot-spl.bin.normal.out.
4
5 spl_tool can also fix the issue of emmc booting.
6
7 ## Prerequisites
8
9 Install required additional packages:
10
11 ```bash
12 $ sudo apt-get install gcc make git
13 ```
14
15 ## Build
16
17 just run `make`
18
19 ```bash
20 $ make
21 ```
22
23 ## Run
24
25 usage
26
27 ```bash
28 $ ./spl_tool  -h
29
30                         StarFive spl tool
31
32 usage:
33 -c, --creat-splhdr      creat spl hdr
34 -i, --fix-imghdr        fixed img hdr for emmc boot.
35 -a, --spl-bak-addr      set backup SPL addr(default: 0x200000)
36 -v, --version           set version (default: 0x01010101)
37 -f, --file              input file name(spl/img)
38 -h, --help              show this information
39 ```
40
41 Generate uboot-spl.bin.normal.out
42
43 ```bash
44 $./spl_tool -c -f $(Uboot_PATH)/spl/u-boot-spl.bin
45 ubsplhdr.sofs:0x240, ubsplhdr.bofs:0x200000, ubsplhdr.vers:0x1010101 name:$(Uboot_PATH)/spl/u-boot-spl.bin
46 SPL written to $(Uboot_PATH)/spl/u-boot-spl.bin.normal.out successfully.
47 ```
48
49 Fix the emmc boot issue
50
51 ```bash
52 $ ./spl_tool -i -f sdcard.img
53 IMG  sdcard.img fixed hdr successfully.
54 ```