瀏覽代碼

init commit

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Jianlong Huang 1 年之前
父節點
當前提交
8cc906c5ba
共有 5 個文件被更改,包括 89 次插入0 次删除
  1. 48 0
      README.md
  2. 二進制
      spl_tool/create_hdr
  3. 二進制
      spl_tool/create_sbl
  4. 12 0
      spl_tool/input_files/input_sbl_normal.cfg
  5. 29 0
      visionfive2-uboot-fit-image.its

+ 48 - 0
README.md

@@ -1,2 +1,50 @@
 # tools
 
+## spl_tool
+
+Use to create `u-boot-spl.bin.normal.out`
+
+Input:
+
+```
+{U-BOOT_PATH}/spl/u-boot-spl.bin
+```
+
+Output:
+
+```
+u-boot-spl.bin.normal.out
+```
+
+For example:
+
+```
+./create_sbl {U-BOOT_PATH}/spl/u-boot-spl.bin 0x01010101
+```
+
+
+
+## visionfive2-uboot-fit-image.its
+
+Use to create `visionfive2_fw_payload.img`
+
+Input:
+
+```
+{U-BOOT_PATH}/tools/mkimage
+{OPENSBI_PATH}/build/platform/generic/firmware/fw_payload.bin
+visionfive2-uboot-fit-image.its
+```
+
+Output:
+
+```
+visionfive2_fw_payload.img
+```
+
+For example:
+
+```
+{U-BOOT_PATH}/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img
+```
+

二進制
spl_tool/create_hdr


二進制
spl_tool/create_sbl


+ 12 - 0
spl_tool/input_files/input_sbl_normal.cfg

@@ -0,0 +1,12 @@
+# path of sbl firmware, can be overrided by "--bin file" argument
+SBL_BIN = ./sbl.bin
+
+# version of sbl firmware, can be overrided by "--version val" argument
+# Endian: Little
+SBL_VER = 0x01010001
+
+# Offset of backup SBL from Flash info start
+# Endian: Little
+SBL_BAK_OFFSET = 0x200000
+
+OUTPUT_COMMON_HDR_FILENAME = common.hdr.out

+ 29 - 0
visionfive2-uboot-fit-image.its

@@ -0,0 +1,29 @@
+/dts-v1/;
+
+/ {
+	description = "U-boot-spl FIT image for JH7110 VisionFive2";
+	#address-cells = <2>;
+
+	images {
+		firmware {
+			description = "u-boot";
+			data = /incbin/("fw_payload.bin");
+			type = "firmware";
+			arch = "riscv";
+			os = "u-boot";
+			load = <0x0 0x40000000>;
+			entry = <0x0 0x40000000>;
+			compression = "none";
+		};
+	};
+
+	configurations {
+		default = "config-1";
+
+		config-1 {
+			description = "U-boot-spl FIT config for JH7110 VisionFive2";
+			firmware = "firmware";
+		};
+	};
+};
+