Greetings. As the topic titles suggests, we’d like to look at the possibility of porting Zynthian to RISC-V, more specifically to the VisionFive 2 board running Debian or perhaps Ubuntu. For purposes of discussion we’re using the name Zynia for the project.
I’m posting this to first ask the general question if anybody else is working on it or has any advice-thoughts on the topic.
More specifically, I found this post:
Which points to a commit:
and I think the corresponding repo for Zynthian from Raspbian:
so we’ll be starting there unless we get another-different pointer.
Thanks in advance for any direction(s), advice, etc!
Great to see that there’s also some other crazy dudes around trying to port zynthian to other platforms/OSes
Beware that while most of zynthian is debian-based, some packages are unavailable right now on bookworm. Moreso, I would worry about missing packages for RISC-V.
I’m really not into RISC-V by any means, and I don’t know about its support so far, but since it’s a (fairly)new platform, be careful as you might run into some strange bugs uncovered by some strange optimization of whatever compiler was used to build those pieces of software in the first place.
You may find yourself facing multiple issues at first, trying to at least get the zynthian scripts setup running, just to then find out that it will be very unstable.
It is certainly possible that you will get to a decent result in the end, but account for lots of time that you will need to invest(this is also in accordance with your experience level with coding/scripting/package managers and Linux in general).
I held off development towards bookworm for the moment since the OS that I ran on the Poco F1 (Mobian, in this case) was very unstable and slow, and I don’t really have time to aid in that part also(not that I’m a Linux expert either). @riban also suggested zynthian might just as well switch directly to bookworm instead of going to an intermediary version so we shall see some progress in this regard also.
Afterall, it’s a bit easier to start from a “working” image than to also do the port to the other platform and adapting the packages along the way.
If you do, finally, start this effort, please make sure to share your questions and results with us so anyone can benefit from this
If you have support for the soundcard in Linux and you see the in/outs listed in alsamixer, you should theoretically be fine. Otherwise, just as a backup solution, grab one of those generic USB soundcards.
Thanks @xanderz - we’ve gotten the on-chip audio hardware on the JH7110 RISC-V processor chip used on the VisionFive2 board working, output only so far, under Debian with ALSA and JACK with FluidSynth as the audio source. The Debian kernel does not currently support ALSA MIDI so we’re just using a MIDI file to drive the FluidSysnth.
Are you using a Debian distro or have you rolled your own? I see that DietPi now supports RISC V. Well… they have an experimental image. If I had time, money and a touch more confidence in this board becoming a competitor for RPi4 I may be tempted to grab one.
We’re currently working with Debian, the latest version supplied by StarFive - 202306. We did have to recompile the kernel to get ALSA-MIDI support.
We might switch to Ubuntu as they seem to be pushing RISC-V-VF2 support quite strongly, so if that really develops we’d follow.
Thanks for the tip re DietPi - I hadn’t even heard of it, I’ll take a look.
We’re quite pleased with the VisionFive 2 board so far. One of the nice things about it is support for an nVME M.2 SSD - it really speeds things up compared to the micro-SD card. We are planning a V5 equivalent using a VF2 board to replace the RPi. Assuming that works out we might switch to one of the many RISC-V System On Module boards that have been announced. Another good thing about the VF2 is that lately you can actually get it!
Yes - Both - Our rough plan is to first get a minimal Zynthian running on a VF2 using the on board audio hardware. Then we’d actually put the VF2 board into a V5 unit - we’ll use a flexible flat cable and an adapter board to handle differences in GPIO pin layout.
Then we’ll use a modified V5 mainboard which will actually-hopefully handle the VF2 board directly. And thank you @jofemodo for the V5 design info!
Then the real fun begins - we do have some ideas for additional controls, like a Bang! button for PD, a Faust-FAST-FPGA, a small isomorphic keyboard, and a built-in amp and speaker.
Obviously all this is optimistic-questionable and fluid but that’s the basic idea. And if one of the announced RISC-V modules roughly equivalent to the RPi CM4 is available we might switch to that. But for starters the direct substitution of VF2 for RPi seems like the way to go.
We don’t have any drawings yet. If you’d like to follow along we’re at:
So far we’ve gotten the kernel running with ALSA-MIDI support and FluidSynth.
We want to make a V5 that uses a VisionFive2 board in place of a Raspberry Pi 4. I think that ‘all’ we have to do is rotate the “RBPi4” connector in KiCad’s PCB editor, and position it properly. The VF2 is ‘largely’ compatible with the RBPi4 in terms of the GPIO pinout and electronics. It is not compatible in terms of the physical board. I realize we’ll have to deal with exactly what the ‘largely’ means.
I have the ‘interactive BOM’ as well as the KiCad schematics and PCB files.
Can you recommend-point me at vendor(s) you’ve used:
That we can send the KiCad files, and-or Gerbers and-or BOM to and get back a completed-assembled board? I’m guessing-hoping that’s what you’ve done to make Zynthian V5.
That makes-sources the Audio Jacks, MIDI jacks, flat cables - display, control, USB, SD-Card, etc., and the display itself, and power connector and switches? I’m assuming-hoping that the assembly vendor sources the majority of the components on the boards.
That makes the heat sink?
I have noticed that some, or at least one of the components point to a datasheet in the schematic editor. Specifically, so far, the MIDI jacks have the datasheet field filled in, but it points to a short form catalog. And I don’t see the jacks used in Zynthian in that catalog.
I decided to just barge ahead and ask here, but of course if you’d rather use some other channel, let me know.
And thanks very much in advance for whatever additional info you supply beyond the already generous helping on github! I hope this isn’t an outrageous question from your point of view.