Newbie Getting Started Help Please

Although I have used Raspberry Pi 4 and pico boards, I lack the knowledge on how to set up and boot my new visionfive 2 sbc to a version of Linux.

If it is possible to do so without using the usb to serial connector can someone please let me know a url with the instructions on how to do this.

If it is not possible, can someone please recommend a suitable PC usb to serial connector.

Finally, again a real newbie question , how do I power the device?

Apologies for the dumb questions, I am an ancient, retired dinosaur mainframe (assembler and procedural applications programmer), hardware-newbie and I am trying to teach myself how to use sbcs and Linux etc.

@mekiaus you could refer to this QSG

  1. just pick up a type c power, details in
  2. connect to HDMI monitor/mouse/keyboard;
  3. flash Debian image into a SD card;
  4. power up
1 Like

Unfortunately this no longer works with version 69.
How can we easily update SPL and U-Boot?
Does this mean we have to get something like a USB to TTL adapter?

Is there really no way to get access to the MTD partitions to use flashcp with version 55?
Looking at the steps for tftpboot, step 3 has example values for the IP addresses?
setenv ipaddr;setenv serverip

1 Like

To get this to work I used a crossover ethernet cable from another linux machine that had the SPL and U-boot on it and connected that to the ethernet port on the VF2.

Otherwise it was wanting a “gatewayip” in addition to an “ipaddr” and “serverip” values with a normal ethernet cable in my case. You can use an value on each end, provided that xxx is the same on both (eg 120 above) - don’t make xxx the same as your current Lan (eg 192.168.0.zzz). To verify the connection I was able to ping in either direction.

Thanks for the alternative solution.
Is the U-boot prompt visible on a monitor on the HDMI port?
If not, how do I connect from the other Linux machine to the VF2?
In other words, which software do I need to use on the other Linux machine, and do I need to do some configuration?

Just to be sure, can I get to the U-Boot prompt by booting without a micro SD?

Yes, the only way to update spl/uboot is by USB/TTL serial port adapter.

please see the detail how to setup serial converter

then, please move to this step Updating SPL and U-Boot

  1. setup tftp sever in your linux PC;
  2. download spl/uboot binaries to your tftp server path;
  3. visionfive2(eth0 or eth1) is connected to the pc over network cable;
  4. power on and serial port will pop-up startup log, then press any key to stay on uboot command line;
  5. config ipaddr for board and serverip for pc;
  6. tranfer and flash binaries by following the guide, make sure dont missing any letter or number when you copy the command;
  7. restart your board;
  8. here is the sample booting log, If you see in the boot log that the compile date of sp/uboot is 25th Dec., then the upgrade is successful
U-Boot SPL 2021.10 (Dec 25 2022 - 20:59:18 +0800)
DDR version: dc2e84f0.
Trying to boot from SPI

OpenSBI v1.0
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |

Platform Name             : StarFive VisionFive V2
Platform Features         : medeleg
Platform HART Count       : 5
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 4000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Firmware Base             : 0x40000000
Firmware Size             : 360 KB
Runtime SBI Version       : 0.3

Domain0 Name              : root
Domain0 Boot HART         : 1
Domain0 HARTs             : 0*,1*,2*,3*,4*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000040000000-0x000000004007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x0000000042200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 1
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcbx
Boot HART ISA Extensions  : none
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 34
Boot HART MHPM Count      : 2
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109

U-Boot 2021.10 (Dec 25 2022 - 20:59:18 +0800), Build: jenkins-github_visionfive2-4

CPU:   rv64imacu
Model: StarFive VisionFive V2
DRAM:  4 GiB
MMC:   sdio0@16010000: 0, sdio1@16020000: 1
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
StarFive EEPROM format v2

1 Like

You don’t use anything via the HDMI port to update u-boot and spl. HDMI from my experience is only useful to see the Linux GUI after booting image 69.

The u-boot prompt is visible inside some kind of terminal emulator (on a Mac I use CoolTerm, I think on Linux minicom is suggested) that you have installed (and setup at 115k bits/sec).

For CoolTerm there was a menu to choose which serial port to conect the program to.

I am using a USB/serial cable from the other machine to the VF2. In my case I bought the Arduino Serial port connector Arduino Compatible USB to Serial Adaptor Module | eBay

I also bought something cheaper but was having voltage issues so I went and got another Arduino connector from the local electronics shop. Only thing with that board is you need a rarely seen usb cable to connect at the Arduino connector end.

In my case, I was running Parallels on Mac and that prompted every time whether to connect the serial port to Mac, Windows or Linux and so the fact there was a bootable micro-SD gave some pause in the emulator to allow me to “press a key” and cancel going to image 69. Haven’t worked out how to hardwire that particular serial connect in Parallels yet.