Building Zynthian OS for raspberry pi 5 /raspiOS bookworm

Hello,

I’m currently trying to get Zynthian to run on my raspberry pi 5.
I had to fix a few simple errors for zynthian-ui to compile and I can open a pull request once I finally manage to test everything.

I now have issues with WiringPi and I now realize it will take some work to add a proper support of rpi5 because of the external i/o chip on rpi5.

I see that we use a forked version of wiringpi and the original project seems completely dead. Also most of the complexity in WiringPi comes from the legacy support of early rpi models, which are not supported by zynthian anyway.

So I’m wondering what people here think would be the best course of action ?

  • replace wiringpi with something more generic and that does not need to be patched each time a new rpi comes on the market ? (also, it would work on other linux sbcs)
  • add rpi5 support in wiringpi, eventually throw away some of the old stuff

From what I understand so far, WiringPi is only used for i2c. Is that correct ? Do we use the i2c drivers like mcp32017.c ?
Also who calls it when the zynthian service starts ? I can only find explicit calls to /usr/local/bin/gpio in the install scripts but I can see it in zynthian logs as well

Thanks for your pointers and feedback

4 Likes

Hi @hyves42! Welcome aboard.

@jofemodo is busy working on RPi 5 support including moving away from WiringPi. You can see progress in chain_manager branch.

1 Like

I had the notion a while back of bringing it all back onto regular Debian, and I still think about it, but in the end, why not just buy another Pi or three?

I am also eagerly awaiting the opportunity to get a Pi5 and then to try out the new branch. :>

This actually, I’ve been thinking that I’ve more or less got my C syntax all figured out from doing projects with Arduino and Teensy, so if I wanted to switch over to just doing C code for the Pi’s GPIO, I can’t really find much in terms of tutorials for that kinda stuff, there’s a dearth of intermediate instructions out there.

I’ve been seeing “WiringPi” in forum posts and such for years but up to now I’ve always done Python code on Pi, even as I was using mostly C on Arduinos. I’ve tried googling for some pointers on jumping over to C but you just get drowned in beginner-level tutorials on Google.

OK, I can see that you have settled on libgpiod, and that seems like a good choice. Also on closer look zyncoder was the only project that depended on wiringpi and that has been fixed on chain_manager branch.

Now I only need to understand why the jack service doesn’t start. Fun times ahead :expressionless:

1 Like

I received my V5 main board in the mail last week and I finally had some free time again this weekend for testing. It’s not that simple to mount a rpi5 on the V5 board, but it can be done with the right standoff spacers.

Let’s start with the good news: on RaspiOS this configuration works out of the box if you add the right entry to config.txt. I managed to record and playback with audacity on the first try. But don’t look at dmesg, it’s full of frightening errors :scream:

However, jackd refuses to start because alsa init fails.
For the moment I got around this problem by using the dtoverlay hifiberry-dacplus instead of hifiberry-dacplusadcpro. Jack starts but I lose the audio input.

Did anyone else test this ? I will probably dive into it later when I need the audio input.

Regarding the install scripts, I’m not sure I understood everything about setup_system_raspioslite_64bit_bookworm.sh. There is a call to set_first_boot.sh in the middle and the system halts. So how is the rest of the script supposed to run ?
For now I hand-edit and rerun the script on target every time to reach the end, but I’m probably missing something.

1 Like

So I need to suit up and clear the driveway first from the blizzard, but once that’s done my RPi5 and fan thingy are waiting at the post office. What’s the status of the 64 bit OS this morning? :>

64-bit remains in a state of heavy development. Flashing the currently available image followed by an update should get you a pretty much working (but as yet, unsupported) Oram system. Be aware that things are changing rapidly and stuff that works today may not work in the same way tomorrow and particularly that you may need to perform some low-level stuff to resolve issues, e.g. if we change stuff that we won’t make an update fix because it is pre-alpha so such fixes should not clogg up the update configs.

Basically - it works quite well but you may need to re-flash / manually edit things as stuff changes.

[Edit] Also be aware that there are some substantial challenges to get RPi5 working, including software, firmware, mechanical and electrical issues. We are unlikely to provide any support for RPi5 until we have resolved those issues for ourselves. (I am not involved in that so can’t / won’t comment further.)

3 Likes

Thanks for the info. I also got stucked with the audio driver and had no time to find a solution. This is something at less. In the next days i hope to continue my fight with the Pi5. It’s an amazing board, but really different to the Pi4. It’s taking more time than expected to get everything working properly.

Anyway, it’s worth the effort because it’s really powerful. I got the zynthian-ui working with dummy audio and i must say that it loaded the more complex snapshots in half the time or less than the Pi4. Blazing fast!! I tried to push the CPU but no way. We are going to need a lot of audio load to get this beauty to byte the dust :sweat_smile:

The best!

4 Likes

Hey fellers, I seem to recall there is a move to running things as “pi” rather than root (good move, says this sysadmin) and I cannot seem to ssh into root@pi5zynthianIjustbooted nor pi@

I attempted ‘raspberry’ with both and no dice. It’s failing to give me a UI which is no surprise, it’s plugged into a generic hdmi with no audio interface at all at this point. I just wanna talk to the webconf but it’s also not responding.

Hi @jtode !

We don’t have plans for moving from our current “everything-runs-as-root” paradigm. Zynthian is a synthesizer and groovebox. We don’t need more complication.

BTW, there is no pi user in the new bookworm. There is a “zyn” user, but it’s not used at all, and it will be probably deleted in the next release. Only root user.

Regards!

2 Likes

Not sure where I read that then.

I’m having trouble reaching the webconf, though I did manage to get the UI to come up on the screen for a few seconds. should I go in and do a git pull somewhere, maybe?

Do you have issues entering? The login screen shows?
Sometimes I have the issue, that the login fails, although it shouldn’t. When I strip the URL to the core and avoid the login, I am in.

Naw, just the browser can’t find it at all. Probably won’t get to spend anymore time on it today, gotta get into the city for rehearsal and possibly a bit of work.

It’s weird that the UI does come up at all, usually you can always access the webconf even if the UI isn’t working yet.