This looks super promising, thank you for sharing! At step 3 currently. Not sure whether or not the green activity LED should be blinking, as I’m still not seeing anything but the red. Been waiting for about 5 minutes now- is the “wait til it fails to boot” supposed to take this long? Should there still be no HDMI output? Thank you again!!
edit: Never saw anything, so went to try this on img-55 for the hell of it but dev/mtd0 and dev/mtd1 don’t exist on there. Ah well, worth a shot!
@Maztitos, I am not sure about HDMI, I have used serial console only.
And in this step it will not boot, because you still need to set kernel_comp_addr_r and kernel_comp_size, this is why only RED light is present.
If you are not able to use serial console probably it is not possible to enter u-boot commands.
Anyway, I have tried to flash old firmware to reproduce issue and try to fix with buildroot image.
There is advantage that you do not need to use serial console but instead ssh to client instead so maybe it is easier!
From newest SDK (atm 2.6.0) assets download: sdcard.img u-boot-spl.bin.normal.out visionfive2_fw_payload.img
Flash sdcard.img to your SD CARD with balena etcher or so
copy u-boot-spl.bin.normal.out and visionfive2_fw_payload.img. (wget in buildroot is built without TLS support, so you can not download files directly):
OPTION 1: Mount this SD CARD to your computer and copy to root homepath location sudo cp u-boot-spl.bin.normal.out visionfive2_fw_payload.img /media/{user}/rootfs/root/ OPTION 2: use SCP to copy files after device boots and connects to network
Now Board should boot successfully (and green light should blink as well)
ssh to board after some time: ssh root@{boad_local_ip_address}
Password: starfive
now you can flash new firmware from this build: flashcp -v u-boot-spl.bin.normal.out /dev/mtd0 flashcp -v visionfive2_fw_payload.img /dev/mtd1
Flash Debian image to your SD card again and it will boot successfully this time.
for the u-boot and opensbi update the following guide:
for the kernel upgrade:
I use a separate debian maschine to CROSS build the custom linux-*.deb packages.
You can use the prepare steps from this guide and for the build is the following command:
make ARCH=riscv CROSS_COMPILE=riscv64-linux- -j4 bindeb-pkg
In less than 10 minutes, you’ll have built everything you need:
building u-boot: 1min
building opensbi: 10s
building spl: 1s
kernel: 7.5 minutes !!! I’m not used to short kernel builds so this was a pleasant surprise.
I’ts pretty straight forward, clone the repo, build the image, run the scripts one by one. I’ve updated the readme to include the clone/build.
Have a look inside the script to see what they’re doing, basically slightly modified commands from the technical reference manual.
The order is the same as in the readme, and the manual.
Regarding docker installation I’m afraid I have to point you to your distro’s instructions or official install guide. I have a short description in another project but ymmv.
The actual image that the dockerfile pulls in is ubuntu:bionic, the same as in the manual. This is completely separate from the host OS. It should also allow for other arches as well, not only x86.
If you just run the shell you can play around in the container:
I prefer the first approach, but sometimes if you feel overwhelmed with all these missing keys, the second approach is definitely more convenient at the risk of introducing malware, but if your repo is simply debian I would place a high-level of confidence there is no malware. The other convenience is that iirc there would be an updated developer keys package that updates the public keyring with the newer developer public keys on your behalf. Similar stuff like this occurs on Fedora as well.
gpg --keyserver keyring.debian.org --recv-key E852514F5DF312F6
gpg: keybox '/home/user/.gnupg/pubring.kbx' created
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
Please remember to take that stuff out once it’s all settled. BIG SECURITY HOLE.
The package signature expired end of January. If you contact the package maintainer ftpmaster@ports-master.debian.org for the entire snapshot repo in question perhaps they could renew their key and re-submit the packages with the newer key and provide you with that new key to import.
Thank you for isolating the issue. It is definitely the entire snapshot repo with all its packages that need to have their keys renewed since they all [expired: 2023-01-31]. At least we now know who to report the issue to.
We need to email
ftpmaster@ports-master.debian.org
and request them to renew their key since it expired 2 days ago and re-package all the packages with the new key.
The 2023 package is in the updated package list. If not able to update with the mentioned args, try wget/curl the package directly and install with dpkg -i debian-ports-archive-keyring_2023.02.01_all.deb
Good news: aptitude and emacs-nox work. The full unstable repo snapshot is available to install which is impressive. Java was already installed. I installed Rust nightly with no issues via the standard https://rustup.rs way. Rust likes to have a cc around so I installed build-essential,clang-15-tools, lld-15, llvm 15 as well with no issues.