VisionFive 2 up and running instructions

Too late to edit now so I’ll have to add a comment in a reply: This is a bit annoying because it’s eth1 not eth0, so if you leave it plugged in once the full image is loaded you’ll end up with your network access on an unexpected interface. Tomorrow I’ll check whether the full image is fine with DHCP on the right-hand port as well as the left-hand one, which would make the default interface the expected eth0.

Does anyone know how to fix the broken PATH problem? I’m not very familiar with apt. It seems apt will install binary packages into /usr/bin or /usr/sbin or /sbin.

bucketoffun mentioned:

The default user is not in the sudoers file and the PATH is broken. Fix the sudo problem by doing “su” then do “/usr/sbin/usermod -aG sudo user” then “/sbin/visudo” and add the line “user ALL=(ALL) NOPASSWD:ALL” at the bottom.

I hope it helps you.

Updating this one again, the right-hand-side ethernet port is fine once you’ve got the full image on there. So for the BusyBox firmware-flash image you need to use the left-hand ethernet port, for the full-install image either port is fine but the right-hand one is probably better because it’s the default eth0.

Unless you are using Debian Image-55, from the pdf release notes:
“Eth0 cannot be assigned IP address”

Oh, odd, maybe it was a bug specific to -55 because -69 has no problems with it.

1 Like

it was

We got our vf2 board yesterday.
I did a dd to an older sdcard I had with Debian Image-55.
Plugged in the sdcard.
Plugged in the hdmi.
Plugged in the ethernet cable.
Plugged in a usb type c phone usb charger.

At first I got a red light, then given a minute or two, the green light appeared.

I went to the router/hub and it gave me a device called “starfive” and an ip for it.

I wasn’t successful with ssh root@theip, but I was successful with ssh user@theip with password starfive.
Afterwards you can “su -l” with the same password.

I’ll keep you posted on my firmware update.

su -l
apt-get install mtd-utils
rsync --archive /mnt/mynewfw/u-boot-spl.bin.normal.out ./u-boot-spl.bin.normal.out
rsync --archive /mnt/mynewfw/visionfive2_fw_payload.img ./visionfive2_fw_payload.img
root@starfive:/home/user# flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
**While trying to open /dev/mtd0 for read/write access: No such file or directory**
root@starfive:/home/user# mtd_debug info /dev/mtd0
**mtd_debug: error!: open()**
root@starfive:/home/user#

I failed to update the firmware via ssh.

1 Like

Thank you @hfield Your instructions were the best to install the firmware update.
I am explicitly referring to this posting: VisionFive 2 up and running instructions - #40 by hfield

Heavily inspired from this posting, but I'll do my best to be brief.
https://forum.rvspace.org/t/visionfive-2-up-and-running-instructions/1238/40

prepare image-69-minimal on sdcard
#################################################
lsblk
###this returns /dev/sdb where the sdcard is in my case
###unmount any sdcard mountpoints
unmount /dev/sdb1
unmount /dev/sdb2
unmount /dev/sdb3
###manufacture wipe that scard
wipefs --all /dev/sdb

Download debian engineering image 69 minimal
https://drive.google.com/file/d/10-LX1n1olviVPDs6VL0v9cuSZyc9IfA3/view?usp=share_link
cd ~/Downloads/Image-69/minimal/
cp starfive-jh7110-VF2_515_v2.5.0-69-minimal-desktop.img.bz2 vf250_69.img.bz2

#be patient duration 15 minutes
#it turns into a 16GB file roughly.
bunzip2 vf250_69.img.bz2

#please be patient duration 15-30 minutes
dd if=vf250_69.img of=/dev/sdb bs=4M status=progress conv=fdatasync


###the sdcard is 32GB capacity, but the .img file wrote an 8GB filesystem with 3 partitions.
###using gparted, stretch the 3rd partition to take up the remaining sdcard capacity. Click the checkmark(apply) button. After it's done committing the change, close gparted.
gparted /dev/sdb
sync
###take out the sdcard from your host computer.

###############################################
Plugin the sdcard into the VF2 board
Plugin the ethernet
Plugin the usb type c phone charger into the VF2 board

starfive
192.168.2.52

ssh user@192.168.2.52
###password starfive
###be patient.  It takes about 5 seconds before it comes back with the usual session bash prompt.

###enter superuser(administrator) mode
su -l
###password starfive

###stuff to help install the firmware updates
apt-get install curl wget unzip bunzip2 mtd-utils usbutils

releasepath="https://github.com/starfive-tech/VisionFive2/releases/download/VF2_v2.6.0"
wget $releasepath/u-boot-spl.bin.normal.out
wget $releasepath/visionfive2_fw_payload.img

###actual firmware updates
flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
flashcp -v visionfive2_fw_payload.img /dev/mtd1
shutdown -h now
##################################
Pull out usb type c phone charger from VF2 board to power off.
Take out sdcard from VF2 board


###NOW we can run the full latest debian image 69
###prepare image-69 full on sdcard
#################################################
lsblk
###this returns /dev/sdb where the sdcard is in my case
###unmount any sdcard mountpoints
unmount /dev/sdb1
unmount /dev/sdb2
unmount /dev/sdb3
###manufacture wipe that scard
wipefs --all /dev/sdb

Download debian engineering image 69 FULL
https://drive.google.com/file/d/1DN0zWkvAHMB9xF7j2QZgN5Xm-VA9WCwk/view?usp=share_link
cd ~/Downloads/Image-69/
cp starfive-jh7110-VF2_515_v2.5.0-69.img.bz2 vf2250-69-FULL.img.bz2

#be patient duration 15 minutes
#it turns into a 16GB file roughly.
bunzip2 vf2250-69-FULL.img.bz2 

#please be patient duration 15-30 minutes
dd if=vf2250-69-FULL.img of=/dev/sdb bs=4M status=progress conv=fdatasync
###the sdcard is 32GB capacity, but the .img file wrote an 8GB filesystem with 3 partitions.
###using gparted, stretch the 3rd partition to take up the remaining sdcard capacity. Click the checkmark(apply) button. After it's done committing the change, close gparted.
gparted /dev/sdb
sync
###########################################





RUNNING FULL Debian 69 image and a bit of developer setup
###############################################
Plugin the sdcard into the VF2 board
Plugin the ethernet
Plugin the usb type c phone charger into the VF2 board

starfive
192.168.2.52

ssh user@192.168.2.52
password starfive

su -l
password starfive

apt-get install curl wget unzip bunzip2 mtd-utils usbutils
###https://forum.rvspace.org/t/visionfive-2-debian-image-released/994/93
apt-get install aptitude emacs-nox build-essential clang-15-tools lld-15 llvm-15-tools git-core gitk

as login user
#install rust nightly
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
#customize default for everything except nightly (not stable).

git clone https://github.com/rust-lang/rust-mode.git rust-mode

###################
cat /home/user/.emacs
(global-set-key (kbd "M-,") 'tags-loop-continue) ; Alt+a
(add-to-list 'load-path "/home/user/rust-mode/")
(autoload 'rust-mode "rust-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
(require 'rust-mode)
####################

######append this to your /home/user/.bashrc
export PS1="\u@\h \D{%F_%T_%Z} : \w\n $ "

if ! [[ "$PATH" =~ "$HOME/.cargo/bin:" ]]
then
    PATH="$HOME/.cargo/bin:$PATH"
fi
export PATH
############

su -l
sync
sync
shutdown -h now
########################################

That should be a decent dev environment. I hope this helps others.

2 Likes