Closed gustad closed 3 months ago
I guess you are boot from the onboard u-boot, please set DIP switches to boot from SD (0-1), it will load the u-boot directly from SD first and second partitions, then flash the mainline u-boot which is already included in the image, please follow the following instruction to flash onboard firmware:
$ sudo pacman -U /root/pkgs/u-boot-starfive-vf2-2024.04-1-riscv64.pkg.tar.zst
$ cat /proc/mtd # please always check your mtd partition
$ sudo flashcp -v /usr/share/u-boot-starfive-vf2/u-boot-spl.bin.normal.out /dev/mtd0
$ sudo flashcp -v /usr/share/u-boot-starfive-vf2/u-boot.itb /dev/mtd2
Then you can set the DIP switches to Flash (0-0)
it will load the u-boot directly from SD first and second partitions
Ah, thanks! I was not aware of that it used it's own u-boot and environment
After writing the mentioned u-boot on to the sdcard I now get:
StarFive # version
U-Boot 2024.04 (May 23 2024 - 05:13:07 +0000)
StarFive # printenv bootcmd
bootcmd=bootflow scan
And I'm able to log in:
[root@ArchVF2 ~]# uname -a
Linux ArchVF2 6.6.20-cwt-5.12.0-3 #1 SMP PREEMPT_DYNAMIC Mon May 27 18:59:29 +07 2024 riscv64 GNU/Linux
[root@ArchVF2 ~]# cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
This is my first attempt on booting arch on my VisionFive2. I'm able to run Deboan just fine.
First I downloaded and wrote the cwt22.1.img to a sdcard on my gentoo x86-64 desktop:
Then inserted the sdcard into my VisionFive2 and booted. Is this u-boot recent enough? If not, where can I find a more recent one?
Then I checked the mmc and the partition id's and they are the same as on my desktop:
However, when I boot I get
ERROR: Did not find a cmdline Flattened Device Tree
:I also tried to import the env as binary, but I still get the
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
andERROR: Did not find a cmdline Flattened Device Tree
:Is there a specific
bootcmd
which has to be used in order to boot the image (i.e. are the partition numbers wrong?), or do I simply need a more recent u-boot?