Broken radioberry driver after today apt update (12-MAR-2024) which rols out a new kernel 6.6

783 views
Skip to first unread message

qrp73

unread,
Mar 11, 2024, 10:55:00 PM3/11/24
to Radioberry
Today raspberry pi rolled out major apt update which upgrades kernel to 6.6.
It breaks radioberry driver and it cannot be compiled anymore for both 32 and 64 versions.

compilation has 3 errors:
1) too many arguments for class_create():
```
/usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/device/class.h:230:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
  230 | struct class * __must_check class_create(const char *name);
      |                                          ~~~~~~~~~~~~^~~~
/home/pi/SRC/radioberry/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:280:26: error: too many arguments to function ‘class_create’
  280 |    radioberryCharClass = class_create(THIS_MODULE, CLASS_NAME);
      |                          ^~~~~~~~~~~~
```

2 and 3) functions gpio_export() and gpio_unexport() are not available anymore. It seems that it requires to use gpiod_export and gpiod_unexport but it uses different argument type and is not clear on how to use it:
```
/home/pi/SRC/radioberry/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:304:9: error: implicit declaration of function ‘gpio_export’; did you mean ‘gpiod_export’? [-Werror=implicit-function-declaration]
  304 |         gpio_export(gpioRxSamplesiPin, false);
      |         ^~~~~~~~~~~
      |         gpiod_export
```
```
/home/pi/SRC/radioberry/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:337:5: error: implicit declaration of function ‘gpio_unexport’; did you mean ‘gpiod_unexport’? [-Werror=implicit-function-declaration]
  337 |     gpio_unexport(gpioRxSamplesiPin);
      |     ^~~~~~~~~~~~~
      |     gpiod_unexport
```

Any info on how to fix it?

Best regards,
Alex

M D'Agostino

unread,
Mar 13, 2024, 1:38:01 PM3/13/24
to Radioberry
I just joined the forum to say I've got the same problem.
I'm lucky enough to have the previous version img so i can reinstall.
It would be nice to know if theres a fix for this though.

Thanks and Kind Regards,

Mario

qrp73

unread,
Mar 15, 2024, 11:01:22 PM3/15/24
to Radioberry
Here is fix in my repository: https://github.com/qrp73/Radioberry-2.x

This fix supports both kernels and can be compiled on an old 6.1 or on a new 6.6 kernel.

Note that if you didn't cloned "Radioberry-2.x" from my repository manually, the installation script will clone original PA3GSB repository which still don't have these fixes, so you're needs to clone repository manually before install.

In short installation procedure is the following:
```
mkdir tmp
cd tmp
cp Radioberry-2.x/SBC/rpi-4/releases/dev/radioberry_install.sh ./
chmod +x radioberry_install.sh
./radioberry_install.sh
```

after installation you can remove tmp folder

if there is some issue with missing headers, you can install kernel headers with the following command:

for 64-bit raspios:
```
sudo apt install linux-headers-rpi-v8
```

for 32-bit raspios:
```
sudo apt install linux-headers-rpi-v7l
```

you can check what is your raspios with command:
```
uname -r
```

In case if it didn't help, probably your kernel version don't have headers, try to restore stock kernel with this command:
```
sudo apt install --reinstall raspi-firmware
```

and repeat kernel headers installation mentioned above.


Best regards,
Alex

M D'Agostino

unread,
Mar 16, 2024, 12:04:29 AM3/16/24
to Radioberry
Thank you Alex !
I will give this a try. And thank you for the quick response.
All the Best,
Mario

Wim PE1PWR

unread,
Mar 16, 2024, 1:12:37 PM3/16/24
to qrp73, Radioberry
For me the same problem.
Sadly my 32 bits is also not working anymore.
Hope to get the old version back when everything was ok.
It was better to publish 2 versions.
PE1PWR
Wim




Op 12 mrt. 2024, om 03:55, qrp73 <qrp...@gmail.com> schreef:

Wim PE1PWR

unread,
Mar 16, 2024, 1:15:21 PM3/16/24
to qrp73, Radioberry
Nice work Alex.
I will give it a go this evening.
PE1PWR
Wim


Op 16 mrt. 2024, om 04:01, qrp73 <qrp...@gmail.com> schreef:

Wim PE1PWR

unread,
Mar 16, 2024, 4:38:25 PM3/16/24
to qrp73, Radioberry
Hi Alex
My transmitter is working now.
The kernel is working.
For now I try to start the radio controller with the Pico. I must reprogram pihpsdr.
That's for tomorrow.
Wim
PE1PWR
73s

Op 16 mrt. 2024, om 18:15, Wim PE1PWR <wcast...@gmail.com> schreef:

Kevin Bozich

unread,
Oct 21, 2024, 11:10:36 PM10/21/24
to Radioberry
Same thing happened with my Radioberry.  Update broke the server.  Thank you for the fix.
Reply all
Reply to author
Forward
0 new messages