So here i want to share my step by step guide to get headless VisionFive2 going without connecting it to a monitor when you only have wifi available.
As far as i know this is not needed if you can plug it into a ethernet cable. Then it should just show up in your network.
However if you like me have only wifi available this is a bit tricky so here is my short guide.
Basically this is like a Raspberry Pi headless guide but for the VisionFive2.
So lets jump right in.
You need your board patched to 3.04 firmware to be able to use the latest image. So patch spi and uboot to 3.04 Firmware.
I use the 202306 minimal desktop image. This comes with Gnome/Networkmananger.
Wifi usb module plugged into the board. I use the ESWIN 6600U and it works great.
Flash the image
First flash the image to your SD card. I use balea etcher for this.
After flashing open /mount the image.
in my PC this is mounted into:
So now you can make some files as root. Otherwise you will not be able to make the files:
#!/bin/bash #/opt # Wait till boot has finshed/ is further along sleep 50 # put correct nameserver into resolv.conf echo "nameserver 126.96.36.199" > /etc/resolv.conf sleep 5 echo "nameserver 188.8.131.52" >> /etc/resolv.conf sleep 5 # Connect to Wifi nmcli radio wifi on nmcli dev wifi connect "Wifi-Network-Name" password "wifi-password-here"
Here switch out Network name and password obviously.
[Unit] Description=How-To Geek Service Example Wants=network.target After=syslog.target [Service] Type=simple ExecStart=/opt/auto.sh Restart=on-failure RestartSec=10 KillMode=process [Install] WantedBy=multi-user.target #/etc/systemd/system/htg.service
Now copy these into the SDcard image:
cp auto.sh /run/media/user/root/opt/ chmod +x /run/media/user/root/opt/auto.sh cp autostart.service /run/media/user/root/etc/systemd/system/ chmod 640 /run/media/user/root/etc/systemd/system/autostart.service cd /run/media/user/root/etc/systemd/system/multi-user.target.wants/ ln -s ../autostart.service
Now we have setup an sytemd autostart unit that will start auto.sh after some time in booting.
This should do the trick but i also want to login for the first time when i boot the board to the initial home dir gets populated.
To manage this edit this file:
And just uncomment and change these lines:
TimedLoginEnable = true TimedLogin = user TimedLoginDelay = 5
So now save everything and make sure to do a clean unmount.
Put your card into the VisionFife2 and boot it up. It should connect to your wifi and then you can ssh into it.