Trouble installing drivers - Pi4

49 views
Skip to first unread message

vu3...@gmail.com

unread,
Apr 9, 2021, 10:52:27 PMApr 9
to Radioberry
Folks,

Im trying to migrate to the new Pi4 with a V3 Radioberry board. During the installation of drivers, I run into a bunch of errors while running the script.

I am copy pasting the output I see when I run the script:

Install CL016 or CL025 radioberry version: 1 = CL016 or 2 = CL025? 1
--- Installing dependency: raspberrypi-kernel-headers
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  raspberrypi-kernel-headers
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.6 MB of archives.
After this operation, 180 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20210303-1 [27.6 MB]
Fetched 27.6 MB in 7s (3,961 kB/s)                                                                                           
Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 98611 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1.20210303-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20210303-1) ...
Setting up raspberrypi-kernel-headers (1.20210303-1) ...
--- Installing dependency: git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.20.1-2+deb10u3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--- Installing dependency: device-tree-compiler
Reading package lists... Done
Building dependency tree       
Reading state information... Done
device-tree-compiler is already the newest version (1.4.7-4).
device-tree-compiler set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--- Installing dependency: pigpio
Reading package lists... Done
Building dependency tree       
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: 389, done.
remote: Counting objects: 100% (389/389), done.
remote: Compressing objects: 100% (240/240), done.
remote: Total 4820 (delta 173), reused 333 (delta 137), pack-reused 4431
Receiving objects: 100% (4820/4820), 197.70 MiB | 7.90 MiB/s, done.
Resolving deltas: 100% (2129/2129), done.
Failed to stop radioberry.service: Unit radioberry.service not loaded.
Failed to disable unit: Unit file radioberry.service does not exist.
Installing Radioberry gateware Cyclone 10 CL016...

Radioberry gateware Cyclone 10 CL016 installed.
checkout the stable git tag
Note: checking out 'c969108f80cf4fa0b79d34ebd35b48bf243f51b4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at c969108 forgot file
Installing Radioberry driver...
modprobe: FATAL: Module radioberry not found.
make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7l+'
  CC [M]  /tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.o
In file included from /tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:60:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_gateware.h: In function \u2018prepare_gateware_loading\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_gateware.h:52:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  int count = 0;
  ^~~
In file included from /tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:61:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_firmware.h: In function \u2018initialize_firmware\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_firmware.h:76:1: error: no return statement in function returning non-void [-Werror=return-type]
 }
 ^
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018firmware_load\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:88:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  u8 *buf = kmalloc(size + 1, GFP_KERNEL);
  ^~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:96:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  int b = 0;
  ^~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018loading_radioberry_gateware\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:108:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  const struct firmware *fw_entry;
  ^~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:114:24: warning: passing argument 1 of \u2018firmware_load\u2019 discards \u2018const\u2019 qualifier from pointer target type [-Wdiscarded-qualifiers]
  firmware_load(fw_entry->data, fw_entry->size);
                ~~~~~~~~^~~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:85:33: note: expected \u2018char *\u2019 but argument is of type \u2018const u8 * const\u2019 {aka \u2018const unsigned char * const\u2019}
 static void firmware_load(char *firmware, int size) {
                           ~~~~~~^~~~~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018radioberry_open\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:148:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  int *minor = (int *)kmalloc(sizeof(int), GFP_KERNEL);
  ^~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:149:6: warning: unused variable \u2018major\u2019 [-Wunused-variable]
  int major = MAJOR(inode->i_rdev);
      ^~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018radioberry_probe\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:226:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  struct device *dev = &pdev->dev;
  ^~~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:226:17: warning: unused variable \u2018dev\u2019 [-Wunused-variable]
  struct device *dev = &pdev->dev;
                 ^~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018radioberry_remove\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:233:1: error: no return statement in function returning non-void [-Werror=return-type]
 }
 ^
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018radioberry_init\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:259:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  int result = platform_driver_register(&radioberry_driver);
  ^~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:254:9: warning: unused variable \u2018size\u2019 [-Wunused-variable]
  size_t size;
         ^~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:253:6: warning: unused variable \u2018retval\u2019 [-Wunused-variable]
  int retval;
      ^~~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c: In function \u2018radioberry_exit\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:322:8: warning: unused variable \u2018devno_top\u2019 [-Wunused-variable]
  dev_t devno_top;
        ^~~~~~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:321:8: warning: unused variable \u2018devno\u2019 [-Wunused-variable]
  dev_t devno;
        ^~~~~
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:320:6: warning: unused variable \u2018i\u2019 [-Wunused-variable]
  int i;
      ^
In file included from /tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.c:61:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_firmware.h: In function \u2018spiXfer\u2019:
/tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry_firmware.h:130:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279: /tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver/radioberry.o] Error 1
make[1]: *** [Makefile:1804: /tmp/Radioberry-2.x/SBC/rpi-4/device_driver/driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+'
make: *** [Makefile:6: radioberry.ko] Error 2
cp: cannot stat 'radioberry.ko': No such file or directory
modprobe: FATAL: Module radioberry not found in directory /lib/modules/5.10.17-v7l+
chmod: cannot access '/dev/radioberry': No such file or directory
modinfo: ERROR: Module radioberry not found.

Radioberry driver installed.
Installing Radioberry firmware...
rm -f version.o
gcc -g -O3   -c -o register.o register.c
register.c: In function \u2018process_http\u2019:
register.c:98:2: warning: implicit declaration of function \u2018write\u2019; did you mean \u2018fwrite\u2019? [-Wimplicit-function-declaration]
  write(sockfd, sendline, strlen(sendline));
  ^~~~~
  fwrite
register.c:100:14: warning: implicit declaration of function \u2018read\u2019; did you mean \u2018fread\u2019? [-Wimplicit-function-declaration]
  while ((n = read(sockfd, recvline, MAXLINE)) > 0) {
              ^~~~
              fread
register.c: In function \u2018postRadioberryConfiguration\u2019:
register.c:125:73: warning: implicit declaration of function \u2018inet_ntop\u2019 [-Wimplicit-function-declaration]
  if (hptr->h_addrtype == AF_INET && (pptr = hptr->h_addr_list) != NULL) inet_ntop(hptr->h_addrtype, *pptr, str, sizeof(str));
                                                                         ^~~~~~~~~
register.c:130:2: warning: implicit declaration of function \u2018inet_pton\u2019 [-Wimplicit-function-declaration]
  inet_pton(AF_INET, str, &servaddr.sin_addr);
  ^~~~~~~~~
register.c:134:2: warning: implicit declaration of function \u2018close\u2019; did you mean \u2018pclose\u2019? [-Wimplicit-function-declaration]
  close(sockfd);
  ^~~~~
  pclose
gcc -g -O3   -c -o radioberry.o radioberry.c
In file included from radioberry.c:56:
radioberry.h:52:1: warning: return type defaults to \u2018int\u2019 [-Wimplicit-int]
 mask(val)  { return val & (CAPACITY - 1); }
 ^~~~
radioberry.h: In function \u2018mask\u2019:
radioberry.h:52:1: warning: type of \u2018val\u2019 defaults to \u2018int\u2019 [-Wimplicit-int]
radioberry.h: At top level:
radioberry.h:53:1: warning: return type defaults to \u2018int\u2019 [-Wimplicit-int]
 push(val)  { assert(!full()); spi_commands[mask(p_write++)] = val; }
 ^~~~
radioberry.h: In function \u2018push\u2019:
radioberry.h:53:1: warning: type of \u2018val\u2019 defaults to \u2018int\u2019 [-Wimplicit-int]
In file included from radioberry.h:18,
                 from radioberry.c:56:
radioberry.h:53:22: warning: implicit declaration of function \u2018full\u2019; did you mean \u2018fmal\u2019? [-Wimplicit-function-declaration]
 push(val)  { assert(!full()); spi_commands[mask(p_write++)] = val; }
                      ^~~~
In file included from radioberry.c:56:
radioberry.h: At top level:
radioberry.h:54:1: warning: return type defaults to \u2018int\u2019 [-Wimplicit-int]
 pop()      { assert(!empty()); return spi_commands[mask(p_read++)]; }
 ^~~
In file included from radioberry.h:18,
                 from radioberry.c:56:
radioberry.h: In function \u2018pop\u2019:
radioberry.h:54:22: warning: implicit declaration of function \u2018empty\u2019 [-Wimplicit-function-declaration]
 pop()      { assert(!empty()); return spi_commands[mask(p_read++)]; }
                      ^~~~~
In file included from radioberry.c:56:
radioberry.h: At top level:
radioberry.h:55:1: warning: return type defaults to \u2018int\u2019 [-Wimplicit-int]
 empty()    { return p_read == p_write; }
 ^~~~~
radioberry.h:56:1: warning: return type defaults to \u2018int\u2019 [-Wimplicit-int]
 full()     { return size() == CAPACITY; }
 ^~~~
radioberry.h: In function \u2018full\u2019:
radioberry.h:56:21: warning: implicit declaration of function \u2018size\u2019; did you mean \u2018nice\u2019? [-Wimplicit-function-declaration]
 full()     { return size() == CAPACITY; }
                     ^~~~
                     nice
radioberry.h: At top level:
radioberry.h:57:1: warning: return type defaults to \u2018int\u2019 [-Wimplicit-int]
 size()     { return p_write - p_read; }
 ^~~~
In file included from radioberry.c:57:
filters.h: In function \u2018initFilters\u2019:
filters.h:281:21: warning: implicit declaration of function \u2018ioctl\u2019 [-Wimplicit-function-declaration]
  i2c_alex_handler = ioctl(fd_i2c_alex, I2C_SLAVE, ADDR_ALEX);
                     ^~~~~
radioberry.c: In function \u2018initRadioberry\u2019:
radioberry.c:109:2: warning: implicit declaration of function \u2018pthread_create\u2019; did you mean \u2018pthread_kill\u2019? [-Wimplicit-function-declaration]
  pthread_create(&pid1, NULL, packetreader, NULL);
  ^~~~~~~~~~~~~~
  pthread_kill
radioberry.c:112:2: warning: implicit declaration of function \u2018start_rb_control_thread\u2019 [-Wimplicit-function-declaration]
  start_rb_control_thread();
  ^~~~~~~~~~~~~~~~~~~~~~~
radioberry.c: In function \u2018runRadioberry\u2019:
radioberry.c:187:2: warning: implicit declaration of function \u2018start_timer_thread\u2019 [-Wimplicit-function-declaration]
  start_timer_thread();
  ^~~~~~~~~~~~~~~~~~
radioberry.c: At top level:
radioberry.c:445:6: warning: conflicting types for \u2018start_rb_control_thread\u2019
 void start_rb_control_thread() {
      ^~~~~~~~~~~~~~~~~~~~~~~
radioberry.c:112:2: note: previous implicit declaration of \u2018start_rb_control_thread\u2019 was here
  start_rb_control_thread();
  ^~~~~~~~~~~~~~~~~~~~~~~
radioberry.c:459:6: warning: conflicting types for \u2018start_timer_thread\u2019
 void start_timer_thread() {
      ^~~~~~~~~~~~~~~~~~
radioberry.c:187:2: note: previous implicit declaration of \u2018start_timer_thread\u2019 was here
  start_timer_thread();
  ^~~~~~~~~~~~~~~~~~
gcc -o radioberry register.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 \u2192 /etc/systemd/system/radioberry.service.


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

73 Johan PA3GSB


________________________________________________________________


I was told that this might be a kernel mismatch and being a non linux guy, I have no clue about it! 

Any help would be deeply appreciated!

73,
Ragav
VU3VWR

Radioberry

unread,
Apr 10, 2021, 2:37:21 AMApr 10
to Radioberry
Hi Ragav,

You are using one of the latest Linux versions.... the compiler is more strict in this latest version.

Problem is solved but you need to use the dev release:



Please give it a try.

73 Johan
PA3GSB

Op zaterdag 10 april 2021 om 04:52:27 UTC+2 schreef vu3...@gmail.com:

vu3...@gmail.com

unread,
Apr 10, 2021, 3:21:46 AMApr 10
to Radioberry

Hi Johan, 

Thank you for your quick response! The Drivers are now installed and I am able to see the output when I run sudo modinfo radioberry. 

73,
Ragav
VU3VWR
Reply all
Reply to author
Forward
0 new messages