]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
starfive: add uEnv script on VF2 boards
authorZoltan HERPAI <wigyori@uid0.hu>
Sun, 1 Jun 2025 21:31:52 +0000 (21:31 +0000)
committerZoltan HERPAI <wigyori@uid0.hu>
Sun, 22 Mar 2026 11:41:54 +0000 (12:41 +0100)
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 <wigyori@uid0.hu>
target/linux/starfive/image/Makefile
target/linux/starfive/image/jh7110-vf2-uenv.txt [new file with mode: 0644]

index 11fb09f63ce6ca1443d88ef45d49c93c7e5a2712..73d562e5b2228e2963aa8c23af2089158eff770b 100644 (file)
@@ -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 (file)
index 0000000..46bb850
--- /dev/null
@@ -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