Sdcard.img allows me to boot and get network... Now what?

Hello there :wave:

I have an untouched, fresh-out-of-box Vision Five 2, and I got the 55 image working.
Unfortunately, I never managed to get the flashcp command.
I’ve downloaded the latest (3.15) release of sdcard.img, and discovered it has a ssh server which allowed me to log in.
Now what?
The flashscp command is available, but I don’t have the u-boot-spl.bin.normal.out and visionfive2_fw_payload.img files to transfer.
The embedded wget does not handle HTTPS, and scp gives me:

sh: /usr/libexec/sftp-server: not found

How can I progress (except setting up locally an http server)?

Thanks.

Easiest way for me: set up on a local computer an HTTP server thanks to Docker: docker run -p 80:80 -v $(pwd):/usr/local/apache2/htdocs/ httpd:latest

And then from the VisionFive2:

wget http://local-computer/visionfive2_fw_payload.img
Connecting to local-computer (local-computer:80)
saving to 'visionfive2_fw_payload.img'
visionfive2_fw_paylo 100% |****************************************************************************************************| 2887k  0:00:00 ETA
'visionfive2_fw_payload.img' saved
# wget http://local-computer/u-boot-spl.bin.normal.out
Connecting to local-computer (local-computer:80)
saving to 'u-boot-spl.bin.normal.out'
u-boot-spl.bin.norma 100% |****************************************************************************************************|  129k  0:00:00 ETA
'u-boot-spl.bin.normal.out' saved
# fla
flac          flash_erase   flash_lock    flash_unlock  flashcp
# flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
Erasing blocks: 33/33 (100%)
Writing data: 129k/129k (100%)
Verifying data: 129k/129k (100%)
# flashcp -v visionfive2_fw_payload.img /dev/mtd1
Erasing blocks: 722/722 (100%)
Writing data: 2887k/2887k (100%)
Verifying data: 2887k/2887k (100%)
# sync
# halt

Broadcast message from root@buildroot (pts/0) (Mon Jan  1 00:20:43 2001):

The system is going down for system halt NOW!

I did it with a USB drive.
A bit late, but can’t you put the files on the micro SD directly after writing the image?

Stupid me thought of that afterwards. :person_shrugging:

Has this changed since the 3.0.4 release? I mostly log my steps and found this old log:

// flashing u_boot and firmware
wget https://github.com/starfive-tech/VisionFive2/releases/download/VF2_v3.0.4/u-boot-spl.bin.normal.out
wget https://github.com/starfive-tech/VisionFive2/releases/download/VF2_v3.0.4/visionfive2_fw_payload.img

// if flashcp is missing then 
sudo apt install mtd-utils

// else flash
sudo flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
sudo flashcp -v visionfive2_fw_payload.img /dev/mtd1
1 Like

Strange… A regression, maybe? :thinking:

I changed my boot switches to SDIO (to read the latest firmware from the MicroSD card) and booted with the latest 202306 image (which included u-boot-spl.bin.normal.out and visionfive2_fw_payload.img on the first two partitions)
And then used these commands to upgrade the onboard QSPI NOR FLASH:

And because I booted with the latest image there was absolutely zero chance of an older dtb (device tree binary) with a smaller first partition truncating my firmware. The first partition on the QSPI NOR FLASH was changed from 128 KiB to 256KiB in the later dtb’s of the newer disk image files.

1 Like

You time is wrong, that’s why wget won’t work on https.

2 Likes