|
@@ -75,8 +75,10 @@ uboot_dtb_file := $(wrkdir)/u-boot/arch/riscv/dts/starfive_$(HWBOARD).dtb
|
|
|
|
|
|
uboot := $(uboot_wrkdir)/u-boot.bin
|
|
|
|
|
|
-spl_tool_srcdir :=$(CURDIR)/soft_3rdpart/spl_tool/
|
|
|
-spl_bin_normal_out :=$(wrkdir)/u-boot-spl.bin.normal.out
|
|
|
+spl_tool_srcdir :=$(CURDIR)/soft_3rdpart/spl_tool
|
|
|
+spl_tool := spl_tool
|
|
|
+
|
|
|
+spl_bin_normal_out := u-boot-spl.bin.normal.out
|
|
|
|
|
|
uboot_config := starfive_$(HWBOARD)_defconfig
|
|
|
|
|
@@ -309,12 +311,14 @@ $(uboot): $(uboot_srcdir) $(target_gcc)
|
|
|
$(MAKE) -C $(uboot_srcdir) O=$(uboot_wrkdir) $(uboot_config)
|
|
|
$(MAKE) -C $(uboot_srcdir) O=$(uboot_wrkdir) CROSS_COMPILE=$(CROSS_COMPILE)
|
|
|
|
|
|
-$(spl_bin_normal_out): $(spl_tool_srcdir) $(uboot)
|
|
|
- cd $(spl_tool_srcdir) && \
|
|
|
- ./create_sbl $(uboot_wrkdir)/spl/u-boot-spl.bin 0x01010101 && \
|
|
|
- cd -
|
|
|
- cp $(spl_tool_srcdir)/u-boot-spl.bin.normal.out $(spl_bin_normal_out)
|
|
|
- rm -f $(spl_tool_srcdir)/u-boot-spl.bin*
|
|
|
+.PHONY: spl_tool
|
|
|
+spl_tool: $(spl_tool_srcdir)
|
|
|
+ $(MAKE) -C $(spl_tool_srcdir)
|
|
|
+ cp $(spl_tool_srcdir)/$(spl_tool) $(wrkdir)
|
|
|
+
|
|
|
+$(spl_bin_normal_out): spl_tool $(uboot)
|
|
|
+ $(wrkdir)/$(spl_tool) -c -f $(uboot_wrkdir)/spl/u-boot-spl.bin
|
|
|
+ cp $(uboot_wrkdir)/spl/$(spl_bin_normal_out) $(wrkdir)
|
|
|
|
|
|
$(uboot_fit): $(sbi_bin) $(uboot_its_file) $(uboot)
|
|
|
$(uboot_wrkdir)/tools/mkimage -f $(uboot_its_file) -A riscv -O u-boot -T firmware $@
|
|
@@ -340,6 +344,7 @@ clean:
|
|
|
rm -f work/initramfs.cpio.gz
|
|
|
rm -f work/linux/vmlinux*
|
|
|
rm -f work/u-boot-spl.bin.normal.out
|
|
|
+ rm -rf work/$(spl_tool)
|
|
|
|
|
|
.PHONY: distclean
|
|
|
distclean:
|