Pi 5 Module for G2

G2 operating system and special app's (e.g. p2app) discussion only--post Thetis and piHPSDR questions in their own sub-forums
Post Reply
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Pi 5 Module for G2

Post by KD1GA »

I would like to upgrade the Pi 4 module in my G2 to a pi 5. I want to install the Bookworm 64-bit OS. Are there any Pi guru's that can post how to configure P2 app and Pi HPSDR on the OS. Thanks Vin KD1GA
Vin KD1GA
va7qi
Posts: 140
Joined: Mon Apr 10, 2017 4:22 am
Location: Quadra Island, BC
Contact:

Re: Pi 5 Module for G2

Post by va7qi »

Hi Vin,

Laurence may jump in here, but as I recall you compile P2app yourself, so chances are that it would work with CM5. You may have to search this site for updated compile instructions.
Please let us know what you find out. I'm sure a lot of people would like to upgrade. My G2 Ultra came with a cheesy 1 GB of RAM.

73 de va7qi, ....Erik.
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Okay, thanks for the response. I'll look more closely; hopefully, Lawrance does jump in, as my Linux skills are lacking at best. I order the Pi5 module with 8 GB of RAM and a 32 GB eMMC and also have a lite if I decide to stick with the micro SD. I'm sure the Pi 4 is fine for just the P2 app, but man, all other apps on the desktop are really slow. Testing the Pi5 on an I/O board now, and it's amazingly fast, but it generates a ton of heat. I grabbed an active cooler, and it really helps. Not sure where on the G2 i'll be able to grab power for it, but one thing at a time :)
Vin KD1GA
User avatar
w-u-2-o
Posts: 5960
Joined: Fri Mar 10, 2017 1:47 pm

Re: Pi 5 Module for G2

Post by w-u-2-o »

Have you seen this topic that discussed a successful swap out of the CM4 for a Radxa CM5?

https://community.apache-labs.com/viewtopic.php?f=48&t=5162
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

w-u-2-o wrote:Have you seen this topic that discussed a successful swap out of the CM4 for a Radxa CM5?

https://community.apache-labs.com/viewtopic.php?f=48&t=5162
No I missed that. Thanks a bunch!!!!
Vin KD1GA
laurencebarker
Posts: 313
Joined: Mon Nov 11, 2019 7:39 pm

Re: Pi 5 Module for G2

Post by laurencebarker »

I haven't experienced an upgrade to either processor, yet. Other developers more skilled in linux kernel builds have been focussing on that.

The Raspberry pi CM5 is, as far as I know, a pretty simple swap-in. All the existing interfaces should work.

The Radxa CM5 is more complicated, because it uses a quite different processor chip. The physical interfaces to a front panel (G1 or G2) are different. if you have no front panel, then that's not an issue. If you have a V1 front panel, I created an interface adapter using a Waveshare board equivalent to a piZero microcontroller. If you have a V2 front panel, then it needs to be swapped over to using USB not serial. There is also an issue whereby the 8" display driver fails to start some of the time, for reasons that haven't been resolved.

The XDMA device driver should work with any of these options. It has been upgraded to get up to at least V6.13 of the kernel.

Hopefully Apache Labs will commit to one or other upgrade path (we discussed it a few days ago) and then everything will become clearer.
Laurence Barker G8NJJ
laurencebarker
Posts: 313
Joined: Mon Nov 11, 2019 7:39 pm

Re: Pi 5 Module for G2

Post by laurencebarker »

laurencebarker wrote:There is also an issue whereby the 8" display driver fails to start some of the time, for reasons that haven't been resolved.
My apologies - Martin CT1IQI tells me that issue was resolved with a change to the device tree when building the linux kernel.
Laurence Barker G8NJJ
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Thanks, Lawrence, for taking the time to respond, and thanks so much for all your great work. I guess I'll try to compile everything on Bookworm and see what happens. If you hear of of Pi 5 G2 blackface image floating around, please let me know :D
Vin KD1GA
StephenAE2S
Posts: 5
Joined: Tue Apr 27, 2021 11:57 am

Re: Pi 5 Module for G2

Post by StephenAE2S »

I have an image ready to go for the CM5 G2 with NO DISPLAY.
Email me.

I will post the procedure for creating a new uSD card shortly on this forum.
Steve - AE2S
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

StephenAE2S wrote: Fri May 30, 2025 7:10 pm I have an image ready to go for the CM5 G2 with NO DISPLAY.
Email me.

I will post the procedure for creating a new uSD card shortly on this forum.
Steve - AE2S
Hi Stephen,

I apologize for taking so long to reply to your generous offer as I have been bit under the weather for the last few weeks but feeling much better now. My attempts at creating a working image so far have been less than successful.
I sent you an email to the address listed on QRZ. Thanks so much 73 Vin KD1GA
Vin KD1GA
StephenAE2S
Posts: 5
Joined: Tue Apr 27, 2021 11:57 am

Re: Pi 5 Module for G2

Post by StephenAE2S »

StephenAE2S wrote: Fri May 30, 2025 7:10 pm I have an image ready to go for the CM5 G2 with NO DISPLAY.
Email me.

I will post the procedure for creating a new uSD card shortly on this forum.
Steve - AE2S
Here are two images ready to go.
Please review the procedure in this forum, G2 - How to Create a NEW microSD card image.
https://ae2s.net/anan_g2/images/CM5book ... ic2.img.xz (1.7GB)
https://ae2s.net/anan_g2/images/CM5book ... ll2.img.xz (6.7GB)

Steve - AE2S
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

I have an I/O board can i simply image, download and compile everything on the I/O board or does it have to be in the G2 like you have layed it out. Thanks again for helping out with this. Vin KD1GA
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

when trying to get Saturn repositories using git clone https://github.com/laurencebarker/Saturn.....I'm getting could not resolve host: github.com. Any help would greatly appreciated
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

KD1GA wrote: Sat Jul 12, 2025 6:27 pm when trying to get Saturn repositories using git clone https://github.com/laurencebarker/Saturn.....I'm getting could not resolve host: github.com. Any help would greatly appreciated
disregard the G2 lost wifi connection and i didn't notice it
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Everything seemed to compile correctly. P2 updated fine but it cant see the radio. Below is the P2 app when executed. Any help would be greatly appreciated:

SATURN Protocol 2 App. press 'x <enter>' in console to close
register access connected to /dev/xdma0_user
FPGA BIT file data code = 07062025
Product: Saturn; Version = 2
FPGA Firmware loaded: Saturn, full function; FW Version = 25, major version = 1
All clocks present
p2app client app software Version:40 Build Date:7 Jul 2025 06:43:46
Die Temp = 53.6C
calculating new CW ramp, length = 9000 us
Enhanced debug enabled

Started check for activity thread, pid=3664
spinning up Check For Exit thread, pid=3665
main: interface name: eth0
spinning up DDC specific thread with port 1025, pid=3666
spinning up DUC specific thread with port 1026, pid=3667
spinning up high priority incoming thread with port 1027, pid=3668
spinning up speaker audio thread with port 1028, pid=3669
spinning up DUC I/Q thread with port 1029, pid=3670
loading new FIFO sizes for updated firmware V13+
spinning up outgoing mic thread with port 1026, pid=3671
spinning up outgoing high priority with port 1025, pid=3672
spinning up outgoing Wideband sample thread with port 1027, pid=3674
mic FIFO Depth register = 00000000 (should be ~0)
spinning up outgoing I/Q thread with port 1035, pid=3673
DDC FIFO Depth register = 00000000 (should be ~0)
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

here the make for the p2app: anyone see anything here?
pi@raspberrypi:~/github/Saturn/sw_projects/P2_app $ make
gcc -c -o p2app.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' p2app.c
gcc -c -o hwaccess.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/hwaccess.c
gcc -c -o saturnregisters.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/saturnregisters.c
gcc -c -o codecwrite.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/codecwrite.c
gcc -c -o saturndrivers.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/saturndrivers.c
gcc -c -o version.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/version.c
gcc -c -o generalpacket.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' generalpacket.c
gcc -c -o IncomingDDCSpecific.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' IncomingDDCSpecific.c
gcc -c -o IncomingDUCSpecific.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' IncomingDUCSpecific.c
gcc -c -o InHighPriority.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' InHighPriority.c
gcc -c -o InDUCIQ.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' InDUCIQ.c
gcc -c -o InSpkrAudio.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' InSpkrAudio.c
gcc -c -o OutMicAudio.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' OutMicAudio.c
gcc -c -o OutDDCIQ.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' OutDDCIQ.c
gcc -c -o OutHighPriority.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' OutHighPriority.c
gcc -c -o debugaids.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/debugaids.c
gcc -c -o auxadc.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' ../common/auxadc.c
gcc -c -o cathandler.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' cathandler.c
gcc -c -o frontpanelhandler.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' frontpanelhandler.c
gcc -c -o catmessages.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' catmessages.c
gcc -c -o g2panel.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' g2panel.c
gcc -c -o LDGATU.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' LDGATU.c
gcc -c -o g2v2panel.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' g2v2panel.c
gcc -c -o i2cdriver.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' i2cdriver.c
gcc -c -o andromedacatmessages.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' andromedacatmessages.c
gcc -c -o Outwideband.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' Outwideband.c
gcc -c -o serialport.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' serialport.c
gcc -c -o AriesATU.o -Wall -Wextra -Wno-unused-function -g -D_GNU_SOURCE -D GIT_DATE='"7 Jul 2025 06:43:46"' AriesATU.c
gcc -o p2app p2app.o hwaccess.o saturnregisters.o codecwrite.o saturndrivers.o version.o generalpacket.o IncomingDDCSpecific.o IncomingDUCSpecific.o InHighPriority.o InDUCIQ.o InSpkrAudio.o OutMicAudio.o OutDDCIQ.o OutHighPriority.o debugaids.o auxadc.o cathandler.o frontpanelhandler.o catmessages.o g2panel.o LDGATU.o g2v2panel.o i2cdriver.o andromedacatmessages.o Outwideband.o serialport.o AriesATU.o -lm -lpthread -lgpiod -li2c
Vin KD1GA
laurencebarker
Posts: 313
Joined: Mon Nov 11, 2019 7:39 pm

Re: Pi 5 Module for G2

Post by laurencebarker »

I presume you mean that Thetis can't see the radio? The p2app startup screen content seems OK.

How is the radio connected to the PC running Thetis - direct connection or via a router? There seem to be problems with a direct connection in the "bookworm" OS release. It works fine via a router. The issue seems to be: the radio isn't getting a valid IP address. This is probably an OS issue (its networking configuration changed substantially) rather than a hardware issue.

This is one of the issues that needs to be resolved before Bookworm becomes a "supported" configuration. The issue seems to be: the radio isn't getting a valid IP address.
Laurence Barker G8NJJ
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Thank you so much for the response. I apologize, yes its not seeing the radio and I tried all the other suggestions that were posted here for folks having the same issue. Its directly connected to its own NIC card. Let me put it on the network and see if that solves it. I'll advise shortly. Vin KD1GA
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Still no joy when connected to the network. Its nice having a very fast desktop on the G2 :) and the Pi5 now uses the Ethernet for connection to the internet not the WiFi but no radio.I'm going to try and give the Pi5 a static IP and sees what happens. Any other suggestions would be warmly welcomed. Thanks again
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Providing a static IP still didn't solve the issue. I'll try a full image and compile again. Darn so close yet so far :)
Vin KD1GA
User avatar
w-u-2-o
Posts: 5960
Joined: Fri Mar 10, 2017 1:47 pm

Re: Pi 5 Module for G2

Post by w-u-2-o »

I don't have a G2, but going back to basics:

- What is the network physical configuration? G2 -- Router/Switch -- Thetis PC ? For now, this would be the most reliable and easy to debug method.

- How are the IP addresses assigned to the G2 and the PC? I recommend going back to DHCP for both. Do you have any other items on the network that are using static IPs? If so, turn them off just in case there is was a mistake in IP assignment that is causing an address conflict.

- With everything hardwired to the router and getting DHCP, a) what IP's did they get assigned, and can they both see the internet?

- Can the G2 ping the PC? Can the PC ping the G2? If not, disable the PC firewall and try again.

- Once ping is reliable in both directions, if Thetis is still not seeing the G2 (really, seeing the p2app) then disable the PC firewall. If that does not work, are you sure p2app is really running?
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Hi Scott,

Got it run removing the dedicated NIC and connecting G2 to my switch, but have to start P2 app manually. The update script wont run at all says unknown directory.
Vin KD1GA
Trucker
Posts: 451
Joined: Wed Nov 03, 2021 5:16 pm

Re: Pi 5 Module for G2

Post by Trucker »

KD1GA wrote: Sun Jul 13, 2025 8:59 pm Hi Scott,

Got it run removing the dedicated NIC and connecting G2 to my switch, but have to start P2 app manually. The update script wont run at all says unknown directory.
You will probably have to run Geny and edit the Autostart file to set the correct path to P2APP. You can look at the properties of the P2APP shortcut on the desktop to find out exactly where the P2APP executable is located. Use that path in Autostart and it should start like you want the next time you boot up your G2.
James
WD5GWY
User avatar
w-u-2-o
Posts: 5960
Joined: Fri Mar 10, 2017 1:47 pm

Re: Pi 5 Module for G2

Post by w-u-2-o »

KD1GA wrote: Sun Jul 13, 2025 8:59 pm Hi Scott,

Got it run removing the dedicated NIC and connecting G2 to my switch, but have to start P2 app manually. The update script wont run at all says unknown directory.
If you prefer to use a direct, dedicated connection from the G2 to the Thetis PC, there is absolutely no reason you can't, and it will probably work better (fewer dropped UDP packets).

Other than the auto-start of p2app, you have proven there is nothing intrinsically wrong with the G2 configuration. It's just a small matter of proper network configuration on both ends. These are Linux & Windows matters and not at all related to p2app or Thetis.
laurencebarker
Posts: 313
Joined: Mon Nov 11, 2019 7:39 pm

Re: Pi 5 Module for G2

Post by laurencebarker »

The autostart mechanism is also quite different under the Bookwork OS release.

The text from the next release of the manual is as follows:


Code can be autostarted by copying “autostart” files into the folder /hope/pi/.config/autostart
We have provided a few autostart files in the folder /home/pi/github/Saturn/autostart-files
g2-shutdown.desktop This monitors an input pin to detect that a SHUTDOWN has been requested from the front panel pushbutton. We recommend this should be in the folder /hope/pi/.config/autostart
g2-autostart-piHPSDR.desktop This file causes piHPSDR to be auto-started after power up
g2-autostart-p2app.desktop This file causes p2app to be auto-started after power up

To enable those files to autorun at power up, simple copy them from /home/pi/github/Saturn/autostart to /hope/pi/.config/autostart

There is a script to copy the appropriate files, depending on whether you have a display or no display on your radio:
$ cd /hope/pi/github/Saturn/scripts
$ ./copy-autostart.sh display Copies the shutdown script, and the one that autostarts piHPSDR


$ cd /hope/pi/github/Saturn/scripts
$ ./copy-autostart.sh nodisplay Copies the shutdown script, and the one that autostarts p2app

When there is a factory image it will have the autostart folder in it. You may need to create that by hand first:

cd /hope/pi/.config/
mkdir autostart
Laurence Barker G8NJJ
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

awsome you are the best! I'll give this a shot tonight and advise. Thanks Vin KD1GA
Vin KD1GA
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

With some amazing help from Jerry Kd4yal and of course Lawrence... thank you both so much, I have bookworm OS up and operating on the Pi5 module. Have the p2 app auto starting and the LED power button working as intended. The new Web updater is working and really slick. The only thing left is the new OS dose not like a dedicated NIC card and can't find the G2. Jerry said hes working on this. Night and day using the the faster module when comes to using the G2 Pi desktop, browser and updating. Might be my imagination but the G2 receive and transmit seems slightly improved.

Very fun update and hopefully this faster Pi will improve remote operation when that starts getting rolled out. Thanks all!!! Vin KD1GA
Vin KD1GA
laurencebarker
Posts: 313
Joined: Mon Nov 11, 2019 7:39 pm

Re: Pi 5 Module for G2

Post by laurencebarker »

OK, more progress on networking: Jerry KD4YAL has written a script that will configure the newest "Bookworm" operating system to follow the APIPA rules and give itself an IP address if direct connected to a PC via the PC's dedicated ethernet card. I think this is the configuration that you are wanting to use.

Under those circumstances, there is no router to assign an IP address using DHCP. The PC follows the APIPA rules by default, but Bookworm does not.

To make that work you will need to run a script, just once:

$ cd~/github/Saturn/scripts
$ sudo ./setup-eth-fallback.sh

I've never used this configuration before, so I couldn't test it. I've now added a dedicated ethernet card to my PC to test, and it works fine.

This is another script for which we need to thank Jerry!
Laurence Barker G8NJJ
User avatar
KD1GA
Posts: 99
Joined: Sun Dec 04, 2022 8:12 pm
Location: Apex, NC

Re: Pi 5 Module for G2

Post by KD1GA »

Wow that’s great. Will be home this weekend and will give it a shot. Thanks again all!
Vin KD1GA
Post Reply

Return to “G2 Operating System & Applications”