pa3gsb / Radioberry-2.x

Ham Radio hat for Raspberry PI
417 stars 88 forks source link

Issue getting software and driver installed on Debian BookWorm #49

Closed stevegg closed 6 months ago

stevegg commented 6 months ago

sudTrying to install the Radioberry software and driver on bookworm and running into issues. Everything installs ok but when I restart the device (/dev/radioberry) disappears. If I then re-run the install script in releases it will reappear until the next reboot.

`uname -a Linux openwebrx.local 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

pi@openwebrx:~ $ sudo radioberry

====================================================================

        Radioberry V2.0

Supports 4 receivers and 1 transmitter.

Build version: 2022.01.24

Have fun Johan PA3GSB

Report requests or bugs to <pa3gsb@gmail.com>.

====================================================================

Failed to open /dev/radioberry: No such file or directory`

Here's what I get from running the install script:

`============================================ Radioberry software installation.

You will install the following versions:

Gateware version 73.3
Driver version 0.94
Firmware version 2022.01.24

============================================

Install CL016 or CL025 radioberry version: 1 = CL016 or 2 = CL025? 2 --- Installing dependency: raspberrypi-kernel-headers Reading package lists... Done Building dependency tree... Done Reading state information... Done raspberrypi-kernel-headers is already the newest version (1:1.20230405-1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. --- Installing dependency: linux-headers-rpi Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package linux-headers-rpi --- Installing dependency: git Reading package lists... Done Building dependency tree... Done Reading state information... Done git is already the newest version (1:2.39.2-1.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. --- Installing dependency: device-tree-compiler Reading package lists... Done Building dependency tree... Done Reading state information... Done device-tree-compiler is already the newest version (1.6.1-4+b1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. --- Installing dependency: pigpio Reading package lists... Done Building dependency tree... Done Reading state information... Done pigpio is already the newest version (1.79-1+rpt1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Cloning into 'Radioberry-2.x'... remote: Enumerating objects: 1089, done. remote: Counting objects: 100% (1089/1089), done. remote: Compressing objects: 100% (752/752), done. remote: Total 1089 (delta 429), reused 819 (delta 293), pack-reused 0 Receiving objects: 100% (1089/1089), 30.46 MiB | 8.75 MiB/s, done. Resolving deltas: 100% (429/429), done. Removed "/etc/systemd/system/multi-user.target.wants/radioberry.service". Installing Radioberry gateware Cyclone 10 CL025...

Radioberry gateware Cyclone 10 CL025 installed. Installing Radioberry driver... make[1]: Entering directory '/usr/src/linux-headers-6.1.0-rpi7-rpi-v8' CC [M] /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.o In file included from /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:62: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_gateware.h: In function ‘prepare_gateware_loading’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_gateware.h:52:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 52 | int count = 0; | ^~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function ‘firmware_load’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:92:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 92 | u8 buf = kmalloc(size + 1, GFP_KERNEL); | ^~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:100:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 100 | int b = 0; | ^~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function ‘loading_radioberry_gateware’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:112:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 112 | const struct firmware fw_entry; | ^~~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:118:31: warning: passing argument 1 of ‘firmware_load’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 118 | firmware_load(fw_entry->data, fw_entry->size); | ~~^~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:89:33: note: expected ‘char ’ but argument is of type ‘const u8 ’ {aka ‘const unsigned char ’} 89 | static void firmware_load(char firmware, int size) { | ~~^~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function ‘radioberry_open’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:152:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 152 | int minor = (int )kmalloc(sizeof(int), GFP_KERNEL); | ^~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:153:13: warning: unused variable ‘major’ [-Wunused-variable] 153 | int major = MAJOR(inode->i_rdev); | ^~~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function ‘radioberry_probe’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:234:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 234 | struct device dev = &pdev->dev; | ^~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:234:24: warning: unused variable ‘dev’ [-Wunused-variable] 234 | struct device dev = &pdev->dev; | ^~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function ‘radioberry_init’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:268:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 268 | int result = platform_driver_register(&radioberry_driver); | ^~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:314:49: warning: cast between incompatible function types from ‘irqreturn_t ( ()(unsigned int, void , struct pt_regs ))(int, void )’ {aka ‘enum irqreturn ( ()(unsigned int, void , struct pt_regs ))(int, void )’} to ‘irqreturn_t ()(int, void )’ {aka ‘enum irqreturn ()(int, void )’} [-Wcast-function-type] 314 | (irq_handler_t) radioberry_irq_handler, | ^ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:263:16: warning: unused variable ‘size’ [-Wunused-variable] 263 | size_t size; | ^~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:262:13: warning: unused variable ‘retval’ [-Wunused-variable] 262 | int retval; | ^~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function ‘radioberry_exit’: /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:333:15: warning: unused variable ‘devno_top’ [-Wunused-variable] 333 | dev_t devno_top; | ^~~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:332:15: warning: unused variable ‘devno’ [-Wunused-variable] 332 | dev_t devno; | ^~~~~ /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:331:13: warning: unused variable ‘i’ [-Wunused-variable] 331 | int i; | ^ MODPOST /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/Module.symvers CC [M] /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.mod.o LD [M] /home/pi/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.ko make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-rpi7-rpi-v8' filename: /lib/modules/6.1.0-rpi7-rpi-v8/kernel/drivers/sdr/radioberry.ko version: 94 license: GPL description: Radioberry SDR device driver. (rpi-4) author: Johan Maas - pa3gsb@gmail.com srcversion: 2A58454FC09C5B8E577A4D1 alias: of:NTCsdr,radioberryC alias: of:NT*Csdr,radioberry depends: name: radioberry vermagic: 6.1.0-rpi7-rpi-v8 SMP preempt mod_unload modversions aarch64

Radioberry driver installed. Installing Radioberry firmware... rm -f version.o gcc -g -O3 -c -o register.o register.c gcc -g -O3 -c -o bias.o bias.c gcc -g -O3 -c -o measure.o measure.c gcc -g -O3 -c -o radioberry.o radioberry.c gcc -o radioberry register.o bias.o measure.o radioberry.o -lrt -lm -lpthread

Radioberry firmware installed. Installing radioberry service ... Radioberry service installed. Created symlink /etc/systemd/system/multi-user.target.wants/radioberry.service → /etc/systemd/system/radioberry.service.

============================================ Radioberry software is installed! Have fun using the SDR Radioberry

73 Johan PA3GSB ============================================`

After running the script I get this: `pi@openwebrx:~ $ sudo radioberry

====================================================================

        Radioberry V2.0

Supports 4 receivers and 1 transmitter.

Build version: 2022.01.24

Have fun Johan PA3GSB

Report requests or bugs to <pa3gsb@gmail.com>.

====================================================================

Failed to open /dev/radioberry: Device or resource busy`

`pi@openwebrx:~ $ sudo systemctl status radioberry ● radioberry.service - Radioberry SDR Loaded: loaded (/etc/systemd/system/radioberry.service; enabled; preset: enabled) Active: active (running) since Mon 2024-01-08 10:50:07 PST; 1min 20s ago Process: 4007 ExecStart=/etc/init.d/radioberryd start (code=exited, status=0/SUCCESS) Main PID: 4012 (radioberry) Tasks: 6 (limit: 3912) CPU: 173ms CGroup: /system.slice/radioberry.service └─4012 /usr/local/bin/radioberry

Jan 08 10:50:07 openwebrx.local systemd[1]: Starting radioberry.service - Radioberry SDR... Jan 08 10:50:07 openwebrx.local sudo[4008]: root : PWD=/ ; USER=root ; COMMAND=/usr/bin/chmod 666 /dev/radioberry Jan 08 10:50:07 openwebrx.local sudo[4008]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0) Jan 08 10:50:07 openwebrx.local sudo[4008]: pam_unix(sudo:session): session closed for user root Jan 08 10:50:07 openwebrx.local radioberryd[4007]: Start radioberry firmware daemon: OK Jan 08 10:50:07 openwebrx.local radioberryd[4013]: Mon 8 Jan 10:50:07 PST 2024 Jan 08 10:50:07 openwebrx.local systemd[1]: Started radioberry.service - Radioberry SDR.`

`pi@openwebrx:~ $ sudo systemctl stop radioberry pi@openwebrx:~ $ sudo radioberry

====================================================================

        Radioberry V2.0

Supports 4 receivers and 1 transmitter.

Build version: 2022.01.24

Have fun Johan PA3GSB

Report requests or bugs to <pa3gsb@gmail.com>.

====================================================================

Radioberry gateware version 73-3. No Alex, N2ADR or generic filters interface board connected to radioberry Radioberry amplifier config failed; only a problem if amplifier is installed. Radioberry, Starting packet rx part. Radioberry, Starting packet control part. Radioberry, Starting packet tx part.`

Everything works fine....but as soon as I reboot the /dev/radioberry will disappear and nothing will work.

`pi@openwebrx:~ $ sudo radioberry

====================================================================

        Radioberry V2.0

Supports 4 receivers and 1 transmitter.

Build version: 2022.01.24

Have fun Johan PA3GSB

Report requests or bugs to <pa3gsb@gmail.com>.

====================================================================

Failed to open /dev/radioberry: No such file or directory`

What am I missing?

Steve

stevegg commented 6 months ago

Was an issue loading the module.

RattyDAVE commented 6 months ago

I am having this error too. If you look at the output above the main problem seems to be the line

E: Unable to locate package linux-headers-rpi