From 39423810c16de59e375d0b972bba56aaf4e83b05 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Sun, 1 Jun 2025 21:31:52 +0000 Subject: [PATCH] starfive: add uEnv script on VF2 boards Certain versions of the VF2 bootloader require the presence of a vf2_uEnv.txt in the boot partition to properly load a non-SDK kernel. Add this file during the SD-card generation. Known VF2 bootloader versions exhibiting this behaviour are: U-Boot 2021.10 (Mar 31 2025 - 22:49:46 +0800), Build: jenkins-github_visionfive2_6.12-11 Signed-off-by: Zoltan HERPAI --- target/linux/starfive/image/Makefile | 1 + target/linux/starfive/image/jh7110-vf2-uenv.txt | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 target/linux/starfive/image/jh7110-vf2-uenv.txt diff --git a/target/linux/starfive/image/Makefile b/target/linux/starfive/image/Makefile index 11fb09f63c..73d562e5b2 100644 --- a/target/linux/starfive/image/Makefile +++ b/target/linux/starfive/image/Makefile @@ -24,6 +24,7 @@ define Build/riscv-sdcard mcopy -i $@.boot $(LINUX_DIR)/arch/riscv/boot/dts/$(DEVICE_DTS).dtb ::dtb mcopy -i $@.boot $@-boot.scr ::boot.scr.uimg mcopy -i $@.boot $(IMAGE_KERNEL) ::Image + mcopy -i $@.boot jh7110-vf2-uenv.txt ::vf2_uEnv.txt ./gen_starfive_sdcard_img.sh \ $@ \ $@.boot \ diff --git a/target/linux/starfive/image/jh7110-vf2-uenv.txt b/target/linux/starfive/image/jh7110-vf2-uenv.txt new file mode 100644 index 0000000000..46bb850f5a --- /dev/null +++ b/target/linux/starfive/image/jh7110-vf2-uenv.txt @@ -0,0 +1,6 @@ +boot2=echo "HELLO WORLD"; run bootcmd +fatbootpart=1:3 +devnum=1 +boot_targets=mmc1 +bootcmd_mmc1=setenv devnum 1; run mmc_boot +bootcmd=run chipa_set_linux; run cpu_vol_set; run bootcmd_mmc1