VisionFive 2 Debian Image Released

@jwh20

did you try this debian image ?

https://drive.google.com/drive/folders/1xTdKqBMGLqI_MslVfeZaHrCDiklDJ3J4

Again, my pet rant… an image with no NVME boot capability or indeed, an image/firmware release that does not support NVME booting is a non-starter for me.

@Bertcay @antoinecarme

I downloaded the “69” image and flashed it to the TF card. When I try to boot I see only this on the USB serial console:

BOOT fail,Error is 0xffffffff

Hello @jwh20
Please check your boot switches. you have to set QSPI flash to boot.
Second do you have updated your u-boot and SPL ? Is required for Image “69” ?

1 Like

I tried all 4 switch positions and get the same error. As far as u-boot and SPL, I’m unclear on how to accomplish that. Is there are procedure? I saw a couple of mentions but it seemed that you had to know how to do it in order to do it.

If I’m correct, you can boot the minimal image v69 with the original firmware.
As you have the serial console working, you can copy the files to the VF2 and use flashcp (instead of tftp).
See the link “Updating SPL and U-Boot” inside the post below to update.

I think that is the best and easiest way

3 Likes

Whats is the difference between the sdcard.img and the Debian (69) image?
Is the sdcard.img a kickstarter/rescue image?

The sdcard is a “buildroot” image (everything was cross-compiled from source code). And I have not fully dug into the details (yet), but I assume that the Debian image is a “debootstrap” with apt pointed to a point in time of sid binary packages for the risc-v architecture. There is currently no Debian Stable release that supports risc-v (yet). Now that more RISC-V hardware is in the hands of developers that will probably change, there are some packages in .Debian Testing (so maybe the next release will see an official risc-v Debian stable).

I downloaded the sdcard.img and would agree with your assumptions.

Regards

Aubrey

I’m stuck at this step:

    1. transfer the latest uboot/spl files into board by USB or Ethernet;

I know how to transfer to the board from my Windows PC but I am having trouble finding the uboot/spl files to transfer. The docs point me to two Github repos but there are 100s (perhaps 1000s) of files there and it’s not clear what to download.

If the u-boot and spl files need to be built from source I’m OK with that but I think the instructions are missing something:

If I execute just the command given, it only does this:

make starfive_visionfive2_defconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-

configuration written to .config

It takes no time at all and no files are generated other than the .config file. :frowning:

You can find the links to the two files (SPL and U-Boot) in this post.

1 Like

Hey that was a success! Thanks all!

I’ll post a complete account of what I did to get Debian to boot shortly. The information is all here but it’s scattered across multiple threads.

5 Likes

If I remember correctly, of the 5 or 6 Earlybird SBCs I have ordered so far, none could boot from NVME when delivered.

I often fall asleep during podcasts in which a developer shows for 4 hours how he analyses and fixes a bug in the firmware, so I like to order SBC as Earlybird. I can look over the developers’ shoulders, try to solve the problems myself at the same time, or read what solutions other users find and learn more than if I buy a fully developed version of the board later.

1 Like

I am tremendously happy for you and your doubtlessly healthy sleeping habits.
However, this does not address my concerns at all.

Aubrey

Thanks all, my board arrived today and I was able to piece together the steps to get it going. I found the description a bit too terse, so here’s my longer version … argh, can’t post that because it references the same link that Michael Zhu used.

For the next release, please add IPv6 to the kernel. It is needed.

BTW, I’m trying to rebuild my kernel with IPv6.

Hello @dtometzki . May I ask how to do this?

Hello everyone,

I already saw solutions to upgrade firmware by using buildroot sdcardimage, but I did not noticed that so I will provide how I have solved this problem. It still may be usefull for others even it is quite builky I would say (but does not require to reflash SD card atleast :D)

Note: I have done everything mentione bellow by accesing u-boot from serial console , as well as using Linux machine, not Windows.

First stage (temporary boot debian 69 with old firmware):

  1. Mount sd card boot partition (partition 2) to your PC:
    sdc 8:32 1 29,8G 0 disk
    ├─sdc1 8:33 1 16M 0 part
    ├─sdc2 8:34 1 100M 0 part
    └─sdc3 8:35 1 29,6G 0 part

  2. Copy device tree for correct naming:
    cp {mount_point}/boot/dtbs/starfive/jh7110-visionfive-v2.dtb {mount_point}/boot/dtbs/starfive/starfive_visionfive2.dtb
    This should help with Failed to load /boot/dtbs/starfive/starfive_visionfive2.dtb error

  3. put SD to device and boot, wait till it fails to boot, because of: kernel_comp_addr_r or kernel_comp_size is not provided! (or stop boot manually)

  4. Now set kernel address and size:
    setenv kernel_comp_addr_r 0x50000000
    setenv kernel_comp_size 0x1000000

  5. Boot again (now it should boot to login prompt):
    run bootcmd

Second stage (firmware updating):
It is same as described in: Updating SPL and U-Boot, but instead of compiling binaries, you can download u-boot-spl.bin.normal.out and visionfive2_fw_payload.img from Releases · starfive-tech/VisionFive2 · GitHub

  1. Install mtd-utils
    apt install mtd-utils

  2. download u-boot-spl.bin.normal.out and visionfive2_fw_payload.img

  3. flash firmware to corresponding locations:
    flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
    flashcp -v visionfive2_fw_payload.img /dev/mtd1

Hope it helps! Have a nice day!

2 Likes