Code Monkey home page Code Monkey logo

gasket-driver's Introduction

Coral Gasket Driver

The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems. The driver contains two modules:

  • Gasket: Gasket (Google ASIC Software, Kernel Extensions, and Tools) is a top level driver for lightweight communication with Google ASICs.
  • Apex: Apex refers to the EdgeTPU v1

This repo contains both the source for direct integration into a kernel tree as well as the necessary files to generate a Debian DKMS package.

Building Debian DKMS pacakge

From the top level directory, execute:

debuild -us -uc -tc -b

gasket-driver's People

Contributors

atvrager avatar chrbrd avatar ewalt1 avatar gregkh avatar i1brnkv avatar jaeyoo avatar jan-kiszka avatar kees avatar mbrooksx avatar pundirsumit avatar robertzaage avatar simonque avatar sumitsum avatar toddpoynor avatar whame avatar xiongzhongjiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gasket-driver's Issues

Build failure on Debian 11 kernel 5.10

DKMS make.log for gasket-1.0 for kernel 5.10.0-24-cloud-amd64 (x86_64)
Fri Aug 18 12:35:47 EDT 2023
make: Entering directory '/usr/src/linux-headers-5.10.0-24-cloud-amd64'
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_core.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
  LD [M]  /var/lib/dkms/gasket/1.0/build/gasket.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/apex_driver.o
  LD [M]  /var/lib/dkms/gasket/1.0/build/apex.o
  MODPOST /var/lib/dkms/gasket/1.0/build/Module.symvers
ERROR: modpost: "dma_buf_detach" [/var/lib/dkms/gasket/1.0/build/gasket.ko] undefined!
ERROR: modpost: "dma_buf_put" [/var/lib/dkms/gasket/1.0/build/gasket.ko] undefined!
ERROR: modpost: "dma_buf_get" [/var/lib/dkms/gasket/1.0/build/gasket.ko] undefined!
ERROR: modpost: "dma_buf_unmap_attachment" [/var/lib/dkms/gasket/1.0/build/gasket.ko] undefined!
ERROR: modpost: "dma_buf_map_attachment" [/var/lib/dkms/gasket/1.0/build/gasket.ko] undefined!
ERROR: modpost: "dma_buf_attach" [/var/lib/dkms/gasket/1.0/build/gasket.ko] undefined!
make[2]: *** [/usr/src/linux-headers-5.10.0-24-common/scripts/Makefile.modpost:123: /var/lib/dkms/gasket/1.0/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/gasket/1.0/build/Module.symvers'
make[1]: *** [/usr/src/linux-headers-5.10.0-24-common/Makefile:1779: modules] Error 2
make: *** [/usr/src/linux-headers-5.10.0-24-common/Makefile:192: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-5.10.0-24-cloud-amd64'

This feels a lot like #14 but I don't know how to tweak things to see if that fixes my issue as well.

Build failure on RHEL9

DKMS make.log for gasket-0.0.git.250.9fef422e for kernel 5.14.0-284.25.1.el9_2.x86_64 (x86_64)
Thu Aug 17 09:37:16 PM CST 2023
make -C "/lib/modules/5.14.0-284.25.1.el9_2.x86_64/build" M="/var/lib/dkms/gasket/0.0.git.250.9fef422e/build" modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/kernels/5.14.0-284.25.1.el9_2.x86_64'
  CC [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/gasket_core.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/gasket_ioctl.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/gasket_interrupt.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/gasket_page_table.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/gasket_sysfs.o
  LD [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/gasket.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/apex_driver.o
  LD [M]  /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/apex.o
  MODPOST /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/Module.symvers
ERROR: modpost: module gasket uses symbol dma_buf_detach from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_get from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_unmap_attachment from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_map_attachment from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_attach from namespace DMA_BUF, but does not import it.
make[2]: *** [scripts/Makefile.modpost:134: /var/lib/dkms/gasket/0.0.git.250.9fef422e/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/gasket/0.0.git.250.9fef422e/build/Module.symvers'
make[1]: *** [Makefile:1838: modules] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.14.0-284.25.1.el9_2.x86_64'
make: *** [Makefile:15: all] Error 2

It seems like it's the same issue as #3. I can see that it's already patched in #6, but that patch only imports DMA_BUF on kernel version 5.16.0 or higher. I manually deleted the conditional checks and it compiled successfully.

I guess what's happening here is that a Redhat backport causes its "5.14.0" kernels to behave similarly to 5.16.0+ kernels. So my question is, is there a better way to check whether importing DMA_BUF namespace is necessary than a hard-coded version comparison? Sorry for not being of much help; I'm not a C developer.

Building against 6.4+ kernel fails

Building on an Ubuntu 22.04 system, on 6.3.4 it builds without issue, on 6.4.x it fails with the following. Same problem on 6.4.3, 6.4.2 and 6.4.1.

DKMS make.log for gasket-1.0 for kernel 6.4.1-060401-generic (x86_64)
Thu Jul 13 07:21:12 PM AWST 2023
make: Entering directory '/usr/src/linux-headers-6.4.1-060401-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1) 12.3.0
You are using: gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_core.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
CC [M] /var/lib/dkms/gasket/1.0/build/apex_driver.o
/var/lib/dkms/gasket/1.0/build/gasket_core.c: In function ‘gasket_register_device’:
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:41: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1841 | class_create(driver_desc->module, driver_desc->name);
| ~~~~~~~~~~~^~~~~~~~
| |
| struct module *
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /var/lib/dkms/gasket/1.0/build/gasket_core.h:11,
from /var/lib/dkms/gasket/1.0/build/gasket_core.c:12:
./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);
| ~~~~~~~~~~~~^~~~
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:17: error: too many arguments to function ‘class_create’
1841 | class_create(driver_desc->module, driver_desc->name);
| ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:252: /var/lib/dkms/gasket/1.0/build/gasket_core.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2032: /var/lib/dkms/gasket/1.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.4.1-060401-generic'

Failed to install gasket-driver

Hi!

I am trying to set up a pcie tpu based on the coral docs:
https://coral.ai/docs/m2/get-started/#2-install-the-pcie-driver-and-edge-tpu-runtime

I am running a freshly installed proxmox, downloaded the pve headers for my kernel(6.5.11-4-pve), but it seems to return this exit status 10 every time and I cant get ls /dev/apex_0 to output anything. I tried to install various older versions of proxmox to test it with older kernels, but non of them helped. I tried running an Ubunutu 22.04.03 VM and that fails aswell.

Here is the output from installing the packages on a freshly built proxmox with the pve header downloaded:

root@sagemcom:# apt-get install gasket-dkms libedgetpu1-std
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
build-essential cpp cpp-12 dkms dpkg-dev fakeroot g++ g++-12 gcc gcc-12 libabsl20220623 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libaom3 libasan8 libatomic1 libavif15 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdav1d6 libde265-0 libdeflate0
libdpkg-perl libfakeroot libfile-fcntllock-perl libgav1-1 libgcc-12-dev libgd3 libgomp1 libheif1 libisl23 libitm1 libjbig0 liblerc4 liblsan0 libmpc3
libmpfr6 libnsl-dev libquadmath0 librav1e0 libstdc++-12-dev libsvtav1enc1 libtiff6 libtirpc-dev libtsan2 libubsan1 libwebp7 libx265-199 libxpm4 libyuv0
linux-libc-dev lsb-release make manpages-dev patch pve-headers-6.1 pve-headers-6.1.10-1-pve rpcsvc-proto sudo
Suggested packages:
cpp-doc gcc-12-locales cpp-12-doc menu debian-keyring g++-multilib g++-12-multilib gcc-12-doc gcc-multilib autoconf automake libtool flex bison gdb
gcc-doc gcc-12-multilib glibc-doc git bzr libgd-tools libstdc++-12-doc make-doc ed diffutils-doc
The following NEW packages will be installed:
build-essential cpp cpp-12 dkms dpkg-dev fakeroot g++ g++-12 gasket-dkms gcc gcc-12 libabsl20220623 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libaom3 libasan8 libatomic1 libavif15 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdav1d6 libde265-0 libdeflate0
libdpkg-perl libedgetpu1-std libfakeroot libfile-fcntllock-perl libgav1-1 libgcc-12-dev libgd3 libgomp1 libheif1 libisl23 libitm1 libjbig0 liblerc4
liblsan0 libmpc3 libmpfr6 libnsl-dev libquadmath0 librav1e0 libstdc++-12-dev libsvtav1enc1 libtiff6 libtirpc-dev libtsan2 libubsan1 libwebp7 libx265-199
libxpm4 libyuv0 linux-libc-dev lsb-release make manpages-dev patch pve-headers-6.1 pve-headers-6.1.10-1-pve rpcsvc-proto sudo
0 upgraded, 65 newly installed, 0 to remove and 0 not upgraded.
Need to get 85.8 MB of archives.
After this operation, 374 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 pve-headers-6.1.10-1-pve amd64 6.1.10-1 [13.4 MB]
Get:2 http://ftp.debian.org/debian bookworm/main amd64 lsb-release all 12.0-1 [6,416 B]
Get:3 http://security.debian.org/debian-security bookworm-security/main amd64 libc-dev-bin amd64 2.36-9+deb12u3 [45.2 kB]
Get:4 https://packages.cloud.google.com/apt coral-edgetpu-stable/main amd64 gasket-dkms all 1.0-18 [48.0 kB]
Get:5 http://ftp.debian.org/debian bookworm/main amd64 libisl23 amd64 0.25-1 [690 kB]
Get:6 https://packages.cloud.google.com/apt coral-edgetpu-stable/main amd64 libedgetpu1-std amd64 16.0 [387 kB]
Get:7 http://security.debian.org/debian-security bookworm-security/main amd64 libc6-dev amd64 2.36-9+deb12u3 [1,898 kB]
Get:8 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 pve-headers-6.1 all 7.3-4 [4,320 B]
Get:9 http://ftp.debian.org/debian bookworm/main amd64 libmpfr6 amd64 4.2.0-1 [701 kB]
Get:10 http://ftp.debian.org/debian bookworm/main amd64 libmpc3 amd64 1.3.1-1 [51.5 kB]
Get:11 http://ftp.debian.org/debian bookworm/main amd64 cpp-12 amd64 12.2.0-14 [9,764 kB]
Get:12 http://security.debian.org/debian-security bookworm-security/main amd64 libtiff6 amd64 4.5.0-6+deb12u1 [316 kB]
Get:13 http://security.debian.org/debian-security bookworm-security/main amd64 libxpm4 amd64 1:3.5.12-1.1+deb12u1 [48.6 kB]
Get:14 http://security.debian.org/debian-security bookworm-security/main amd64 libc-devtools amd64 2.36-9+deb12u3 [52.9 kB]
Get:15 http://ftp.debian.org/debian bookworm/main amd64 cpp amd64 4:12.2.0-3 [6,836 B]
Get:16 http://ftp.debian.org/debian bookworm/main amd64 libcc1-0 amd64 12.2.0-14 [41.7 kB]
Get:17 http://ftp.debian.org/debian bookworm/main amd64 libgomp1 amd64 12.2.0-14 [116 kB]
Get:18 http://ftp.debian.org/debian bookworm/main amd64 libitm1 amd64 12.2.0-14 [26.1 kB]
Get:19 http://ftp.debian.org/debian bookworm/main amd64 libatomic1 amd64 12.2.0-14 [9,328 B]
Get:20 http://ftp.debian.org/debian bookworm/main amd64 libasan8 amd64 12.2.0-14 [2,195 kB]
Get:21 http://ftp.debian.org/debian bookworm/main amd64 liblsan0 amd64 12.2.0-14 [969 kB]
Get:22 http://ftp.debian.org/debian bookworm/main amd64 libtsan2 amd64 12.2.0-14 [2,196 kB]
Get:23 http://ftp.debian.org/debian bookworm/main amd64 libubsan1 amd64 12.2.0-14 [883 kB]
Get:24 http://ftp.debian.org/debian bookworm/main amd64 libquadmath0 amd64 12.2.0-14 [144 kB]
Get:25 http://ftp.debian.org/debian bookworm/main amd64 libgcc-12-dev amd64 12.2.0-14 [2,437 kB]
Get:26 http://ftp.debian.org/debian bookworm/main amd64 gcc-12 amd64 12.2.0-14 [19.3 MB]
Get:27 http://ftp.debian.org/debian bookworm/main amd64 gcc amd64 4:12.2.0-3 [5,216 B]
Get:28 http://ftp.debian.org/debian bookworm/main amd64 libdpkg-perl all 1.21.22 [603 kB]
Get:29 http://ftp.debian.org/debian bookworm/main amd64 patch amd64 2.7.6-7 [128 kB]
Get:30 http://ftp.debian.org/debian bookworm/main amd64 make amd64 4.3-4.1 [396 kB]
Get:31 http://ftp.debian.org/debian bookworm/main amd64 dpkg-dev all 1.21.22 [1,353 kB]
Get:32 http://ftp.debian.org/debian bookworm/main amd64 linux-libc-dev amd64 6.1.55-1 [1,870 kB]
Get:33 http://ftp.debian.org/debian bookworm/main amd64 libcrypt-dev amd64 1:4.4.33-2 [118 kB]
Get:34 http://ftp.debian.org/debian bookworm/main amd64 libtirpc-dev amd64 1.3.3+ds-1 [191 kB]
Get:35 http://ftp.debian.org/debian bookworm/main amd64 libnsl-dev amd64 1.3.0-2 [66.4 kB]
Get:36 http://ftp.debian.org/debian bookworm/main amd64 rpcsvc-proto amd64 1.4.3-1 [63.3 kB]
Get:37 http://ftp.debian.org/debian bookworm/main amd64 libstdc++-12-dev amd64 12.2.0-14 [2,046 kB]
Get:38 http://ftp.debian.org/debian bookworm/main amd64 g++-12 amd64 12.2.0-14 [10.7 MB]
Get:39 http://ftp.debian.org/debian bookworm/main amd64 g++ amd64 4:12.2.0-3 [1,356 B]
Get:40 http://ftp.debian.org/debian bookworm/main amd64 build-essential amd64 12.9 [7,704 B]
Get:41 http://ftp.debian.org/debian bookworm/main amd64 dkms all 3.0.10-8+deb12u1 [48.7 kB]
Get:42 http://ftp.debian.org/debian bookworm/main amd64 sudo amd64 1.9.13p3-1+deb12u1 [1,889 kB]
Get:43 http://ftp.debian.org/debian bookworm/main amd64 libfakeroot amd64 1.31-1.2 [28.3 kB]
Get:44 http://ftp.debian.org/debian bookworm/main amd64 fakeroot amd64 1.31-1.2 [66.9 kB]
Get:45 http://ftp.debian.org/debian bookworm/main amd64 libabsl20220623 amd64 20220623.1-1 [391 kB]
Get:46 http://ftp.debian.org/debian bookworm/main amd64 libalgorithm-diff-perl all 1.201-1 [43.3 kB]
Get:47 http://ftp.debian.org/debian bookworm/main amd64 libalgorithm-diff-xs-perl amd64 0.04-8+b1 [11.4 kB]
Get:48 http://ftp.debian.org/debian bookworm/main amd64 libalgorithm-merge-perl all 0.08-5 [11.8 kB]
Get:49 http://ftp.debian.org/debian bookworm/main amd64 libaom3 amd64 3.6.0-1 [1,851 kB]
Get:50 http://ftp.debian.org/debian bookworm/main amd64 libdav1d6 amd64 1.0.0-2 [495 kB]
Get:51 http://ftp.debian.org/debian bookworm/main amd64 libgav1-1 amd64 0.18.0-1+b1 [332 kB]
Get:52 http://ftp.debian.org/debian bookworm/main amd64 librav1e0 amd64 0.5.1-6 [763 kB]
Get:53 http://ftp.debian.org/debian bookworm/main amd64 libsvtav1enc1 amd64 1.4.1+dfsg-1 [2,121 kB]
Get:54 http://ftp.debian.org/debian bookworm/main amd64 libyuv0 amd64 0.0
git20230123.b2528b0-1 [168 kB]
Get:55 http://ftp.debian.org/debian bookworm/main amd64 libavif15 amd64 0.11.1-1 [93.8 kB]
Get:56 http://ftp.debian.org/debian bookworm/main amd64 libde265-0 amd64 1.0.11-1 [185 kB]
Get:57 http://ftp.debian.org/debian bookworm/main amd64 libx265-199 amd64 3.5-2+b1 [1,150 kB]
Get:58 http://ftp.debian.org/debian bookworm/main amd64 libheif1 amd64 1.15.1-1 [215 kB]
Get:59 http://ftp.debian.org/debian bookworm/main amd64 libdeflate0 amd64 1.14-1 [61.4 kB]
Get:60 http://ftp.debian.org/debian bookworm/main amd64 libjbig0 amd64 2.1-6.1 [31.7 kB]
Get:61 http://ftp.debian.org/debian bookworm/main amd64 liblerc4 amd64 4.0.0+ds-2 [170 kB]
Get:62 http://ftp.debian.org/debian bookworm/main amd64 libwebp7 amd64 1.2.4-0.2+deb12u1 [286 kB]
Get:63 http://ftp.debian.org/debian bookworm/main amd64 libgd3 amd64 2.3.3-9 [124 kB]
Get:64 http://ftp.debian.org/debian bookworm/main amd64 libfile-fcntllock-perl amd64 0.22-4+b1 [34.8 kB]
Get:65 http://ftp.debian.org/debian bookworm/main amd64 manpages-dev all 6.03-2 [2,030 kB]
Fetched 85.8 MB in 3min 38s (394 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package lsb-release.
(Reading database ... 78509 files and directories currently installed.)
Preparing to unpack .../00-lsb-release_12.0-1_all.deb ...
Unpacking lsb-release (12.0-1) ...
Selecting previously unselected package libisl23:amd64.
Preparing to unpack .../01-libisl23_0.25-1_amd64.deb ...
Unpacking libisl23:amd64 (0.25-1) ...
Selecting previously unselected package libmpfr6:amd64.
Preparing to unpack .../02-libmpfr6_4.2.0-1_amd64.deb ...
Unpacking libmpfr6:amd64 (4.2.0-1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../03-libmpc3_1.3.1-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.3.1-1) ...
Selecting previously unselected package cpp-12.
Preparing to unpack .../04-cpp-12_12.2.0-14_amd64.deb ...
Unpacking cpp-12 (12.2.0-14) ...
Selecting previously unselected package cpp.
Preparing to unpack .../05-cpp_4%3a12.2.0-3_amd64.deb ...
Unpacking cpp (4:12.2.0-3) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../06-libcc1-0_12.2.0-14_amd64.deb ...
Unpacking libcc1-0:amd64 (12.2.0-14) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../07-libgomp1_12.2.0-14_amd64.deb ...
Unpacking libgomp1:amd64 (12.2.0-14) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../08-libitm1_12.2.0-14_amd64.deb ...
Unpacking libitm1:amd64 (12.2.0-14) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../09-libatomic1_12.2.0-14_amd64.deb ...
Unpacking libatomic1:amd64 (12.2.0-14) ...
Selecting previously unselected package libasan8:amd64.
Preparing to unpack .../10-libasan8_12.2.0-14_amd64.deb ...
Unpacking libasan8:amd64 (12.2.0-14) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../11-liblsan0_12.2.0-14_amd64.deb ...
Unpacking liblsan0:amd64 (12.2.0-14) ...
Selecting previously unselected package libtsan2:amd64.
Preparing to unpack .../12-libtsan2_12.2.0-14_amd64.deb ...
Unpacking libtsan2:amd64 (12.2.0-14) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../13-libubsan1_12.2.0-14_amd64.deb ...
Unpacking libubsan1:amd64 (12.2.0-14) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../14-libquadmath0_12.2.0-14_amd64.deb ...
Unpacking libquadmath0:amd64 (12.2.0-14) ...
Selecting previously unselected package libgcc-12-dev:amd64.
Preparing to unpack .../15-libgcc-12-dev_12.2.0-14_amd64.deb ...
Unpacking libgcc-12-dev:amd64 (12.2.0-14) ...
Selecting previously unselected package gcc-12.
Preparing to unpack .../16-gcc-12_12.2.0-14_amd64.deb ...
Unpacking gcc-12 (12.2.0-14) ...
Selecting previously unselected package gcc.
Preparing to unpack .../17-gcc_4%3a12.2.0-3_amd64.deb ...
Unpacking gcc (4:12.2.0-3) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../18-libdpkg-perl_1.21.22_all.deb ...
Unpacking libdpkg-perl (1.21.22) ...
Selecting previously unselected package patch.
Preparing to unpack .../19-patch_2.7.6-7_amd64.deb ...
Unpacking patch (2.7.6-7) ...
Selecting previously unselected package make.
Preparing to unpack .../20-make_4.3-4.1_amd64.deb ...
Unpacking make (4.3-4.1) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../21-dpkg-dev_1.21.22_all.deb ...
Unpacking dpkg-dev (1.21.22) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../22-libc-dev-bin_2.36-9+deb12u3_amd64.deb ...
Unpacking libc-dev-bin (2.36-9+deb12u3) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../23-linux-libc-dev_6.1.55-1_amd64.deb ...
Unpacking linux-libc-dev:amd64 (6.1.55-1) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../24-libcrypt-dev_1%3a4.4.33-2_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.33-2) ...
Selecting previously unselected package libtirpc-dev:amd64.
Preparing to unpack .../25-libtirpc-dev_1.3.3+ds-1_amd64.deb ...
Unpacking libtirpc-dev:amd64 (1.3.3+ds-1) ...
Selecting previously unselected package libnsl-dev:amd64.
Preparing to unpack .../26-libnsl-dev_1.3.0-2_amd64.deb ...
Unpacking libnsl-dev:amd64 (1.3.0-2) ...
Selecting previously unselected package rpcsvc-proto.
Preparing to unpack .../27-rpcsvc-proto_1.4.3-1_amd64.deb ...
Unpacking rpcsvc-proto (1.4.3-1) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../28-libc6-dev_2.36-9+deb12u3_amd64.deb ...
Unpacking libc6-dev:amd64 (2.36-9+deb12u3) ...
Selecting previously unselected package libstdc++-12-dev:amd64.
Preparing to unpack .../29-libstdc++-12-dev_12.2.0-14_amd64.deb ...
Unpacking libstdc++-12-dev:amd64 (12.2.0-14) ...
Selecting previously unselected package g++-12.
Preparing to unpack .../30-g++-12_12.2.0-14_amd64.deb ...
Unpacking g++-12 (12.2.0-14) ...
Selecting previously unselected package g++.
Preparing to unpack .../31-g++_4%3a12.2.0-3_amd64.deb ...
Unpacking g++ (4:12.2.0-3) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../32-build-essential_12.9_amd64.deb ...
Unpacking build-essential (12.9) ...
Setting up lsb-release (12.0-1) ...
Selecting previously unselected package dkms.
(Reading database ... 81921 files and directories currently installed.)
Preparing to unpack .../00-dkms_3.0.10-8+deb12u1_all.deb ...
Unpacking dkms (3.0.10-8+deb12u1) ...
Selecting previously unselected package sudo.
Preparing to unpack .../01-sudo_1.9.13p3-1+deb12u1_amd64.deb ...
Unpacking sudo (1.9.13p3-1+deb12u1) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../02-libfakeroot_1.31-1.2_amd64.deb ...
Unpacking libfakeroot:amd64 (1.31-1.2) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../03-fakeroot_1.31-1.2_amd64.deb ...
Unpacking fakeroot (1.31-1.2) ...
Selecting previously unselected package pve-headers-6.1.10-1-pve.
Preparing to unpack .../04-pve-headers-6.1.10-1-pve_6.1.10-1_amd64.deb ...
Unpacking pve-headers-6.1.10-1-pve (6.1.10-1) ...
Selecting previously unselected package pve-headers-6.1.
Preparing to unpack .../05-pve-headers-6.1_7.3-4_all.deb ...
Unpacking pve-headers-6.1 (7.3-4) ...
Selecting previously unselected package gasket-dkms.
Preparing to unpack .../06-gasket-dkms_1.0-18_all.deb ...
Unpacking gasket-dkms (1.0-18) ...
Selecting previously unselected package libabsl20220623:amd64.
Preparing to unpack .../07-libabsl20220623_20220623.1-1_amd64.deb ...
Unpacking libabsl20220623:amd64 (20220623.1-1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../08-libalgorithm-diff-perl_1.201-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.201-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl:amd64.
Preparing to unpack .../09-libalgorithm-diff-xs-perl_0.04-8+b1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl:amd64 (0.04-8+b1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../10-libalgorithm-merge-perl_0.08-5_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-5) ...
Selecting previously unselected package libaom3:amd64.
Preparing to unpack .../11-libaom3_3.6.0-1_amd64.deb ...
Unpacking libaom3:amd64 (3.6.0-1) ...
Selecting previously unselected package libdav1d6:amd64.
Preparing to unpack .../12-libdav1d6_1.0.0-2_amd64.deb ...
Unpacking libdav1d6:amd64 (1.0.0-2) ...
Selecting previously unselected package libgav1-1:amd64.
Preparing to unpack .../13-libgav1-1_0.18.0-1+b1_amd64.deb ...
Unpacking libgav1-1:amd64 (0.18.0-1+b1) ...
Selecting previously unselected package librav1e0:amd64.
Preparing to unpack .../14-librav1e0_0.5.1-6_amd64.deb ...
Unpacking librav1e0:amd64 (0.5.1-6) ...
Selecting previously unselected package libsvtav1enc1:amd64.
Preparing to unpack .../15-libsvtav1enc1_1.4.1+dfsg-1_amd64.deb ...
Unpacking libsvtav1enc1:amd64 (1.4.1+dfsg-1) ...
Selecting previously unselected package libyuv0:amd64.
Preparing to unpack .../16-libyuv0_0.0git20230123.b2528b0-1_amd64.deb ...
Unpacking libyuv0:amd64 (0.0
git20230123.b2528b0-1) ...
Selecting previously unselected package libavif15:amd64.
Preparing to unpack .../17-libavif15_0.11.1-1_amd64.deb ...
Unpacking libavif15:amd64 (0.11.1-1) ...
Selecting previously unselected package libde265-0:amd64.
Preparing to unpack .../18-libde265-0_1.0.11-1_amd64.deb ...
Unpacking libde265-0:amd64 (1.0.11-1) ...
Selecting previously unselected package libx265-199:amd64.
Preparing to unpack .../19-libx265-199_3.5-2+b1_amd64.deb ...
Unpacking libx265-199:amd64 (3.5-2+b1) ...
Selecting previously unselected package libheif1:amd64.
Preparing to unpack .../20-libheif1_1.15.1-1_amd64.deb ...
Unpacking libheif1:amd64 (1.15.1-1) ...
Selecting previously unselected package libdeflate0:amd64.
Preparing to unpack .../21-libdeflate0_1.14-1_amd64.deb ...
Unpacking libdeflate0:amd64 (1.14-1) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../22-libjbig0_2.1-6.1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-6.1) ...
Selecting previously unselected package liblerc4:amd64.
Preparing to unpack .../23-liblerc4_4.0.0+ds-2_amd64.deb ...
Unpacking liblerc4:amd64 (4.0.0+ds-2) ...
Selecting previously unselected package libwebp7:amd64.
Preparing to unpack .../24-libwebp7_1.2.4-0.2+deb12u1_amd64.deb ...
Unpacking libwebp7:amd64 (1.2.4-0.2+deb12u1) ...
Selecting previously unselected package libtiff6:amd64.
Preparing to unpack .../25-libtiff6_4.5.0-6+deb12u1_amd64.deb ...
Unpacking libtiff6:amd64 (4.5.0-6+deb12u1) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../26-libxpm4_1%3a3.5.12-1.1+deb12u1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1.1+deb12u1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../27-libgd3_2.3.3-9_amd64.deb ...
Unpacking libgd3:amd64 (2.3.3-9) ...
Selecting previously unselected package libc-devtools.
Preparing to unpack .../28-libc-devtools_2.36-9+deb12u3_amd64.deb ...
Unpacking libc-devtools (2.36-9+deb12u3) ...
Selecting previously unselected package libedgetpu1-std:amd64.
Preparing to unpack .../29-libedgetpu1-std_16.0_amd64.deb ...
Unpacking libedgetpu1-std:amd64 (16.0) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../30-libfile-fcntllock-perl_0.22-4+b1_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-4+b1) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../31-manpages-dev_6.03-2_all.deb ...
Unpacking manpages-dev (6.03-2) ...
Setting up libaom3:amd64 (3.6.0-1) ...
Setting up manpages-dev (6.03-2) ...
Setting up libabsl20220623:amd64 (20220623.1-1) ...
Setting up liblerc4:amd64 (4.0.0+ds-2) ...
Setting up libxpm4:amd64 (1:3.5.12-1.1+deb12u1) ...
Setting up libfile-fcntllock-perl (0.22-4+b1) ...
Setting up libalgorithm-diff-perl (1.201-1) ...
Setting up libedgetpu1-std:amd64 (16.0) ...
Setting up libdeflate0:amd64 (1.14-1) ...
Setting up linux-libc-dev:amd64 (6.1.55-1) ...
Setting up libsvtav1enc1:amd64 (1.4.1+dfsg-1) ...
Setting up libgomp1:amd64 (12.2.0-14) ...
Setting up libjbig0:amd64 (2.1-6.1) ...
Setting up librav1e0:amd64 (0.5.1-6) ...
Setting up libfakeroot:amd64 (1.31-1.2) ...
Setting up pve-headers-6.1.10-1-pve (6.1.10-1) ...
Setting up fakeroot (1.31-1.2) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libtirpc-dev:amd64 (1.3.3+ds-1) ...
Setting up rpcsvc-proto (1.4.3-1) ...
Setting up make (4.3-4.1) ...
Setting up libmpfr6:amd64 (4.2.0-1) ...
Setting up pve-headers-6.1 (7.3-4) ...
Setting up libquadmath0:amd64 (12.2.0-14) ...
Setting up libmpc3:amd64 (1.3.1-1) ...
Setting up libatomic1:amd64 (12.2.0-14) ...
Setting up patch (2.7.6-7) ...
Setting up sudo (1.9.13p3-1+deb12u1) ...
Setting up libgav1-1:amd64 (0.18.0-1+b1) ...
Setting up libdav1d6:amd64 (1.0.0-2) ...
Setting up libdpkg-perl (1.21.22) ...
Setting up libx265-199:amd64 (3.5-2+b1) ...
Setting up libwebp7:amd64 (1.2.4-0.2+deb12u1) ...
Setting up libubsan1:amd64 (12.2.0-14) ...
Setting up libnsl-dev:amd64 (1.3.0-2) ...
Setting up libcrypt-dev:amd64 (1:4.4.33-2) ...
Setting up libtiff6:amd64 (4.5.0-6+deb12u1) ...
Setting up libasan8:amd64 (12.2.0-14) ...
Setting up libtsan2:amd64 (12.2.0-14) ...
Setting up libisl23:amd64 (0.25-1) ...
Setting up libde265-0:amd64 (1.0.11-1) ...
Setting up libc-dev-bin (2.36-9+deb12u3) ...
Setting up libyuv0:amd64 (0.0git20230123.b2528b0-1) ...
Setting up libalgorithm-diff-xs-perl:amd64 (0.04-8+b1) ...
Setting up libcc1-0:amd64 (12.2.0-14) ...
Setting up liblsan0:amd64 (12.2.0-14) ...
Setting up libitm1:amd64 (12.2.0-14) ...
Setting up libalgorithm-merge-perl (0.08-5) ...
Setting up cpp-12 (12.2.0-14) ...
Setting up libavif15:amd64 (0.11.1-1) ...
Setting up libheif1:amd64 (1.15.1-1) ...
Setting up dpkg-dev (1.21.22) ...
Setting up libgcc-12-dev:amd64 (12.2.0-14) ...
Setting up libgd3:amd64 (2.3.3-9) ...
Setting up cpp (4:12.2.0-3) ...
Setting up libc6-dev:amd64 (2.36-9+deb12u3) ...
Setting up libc-devtools (2.36-9+deb12u3) ...
Setting up libstdc++-12-dev:amd64 (12.2.0-14) ...
Setting up gcc-12 (12.2.0-14) ...
Setting up g++-12 (12.2.0-14) ...
Setting up gcc (4:12.2.0-3) ...
Setting up dkms (3.0.10-8+deb12u1) ...
Setting up gasket-dkms (1.0-18) ...
Loading new gasket-1.0 DKMS files...
Deprecated feature: REMAKE_INITRD (/usr/src/gasket-1.0/dkms.conf)
Building for 6.5.11-4-pve 6.5.11-6-pve
Building initial module for 6.5.11-4-pve
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/gasket/1.0/source/dkms.conf)
Error! Bad return status for module build on kernel: 6.5.11-4-pve (x86_64)
Consult /var/lib/dkms/gasket/1.0/build/make.log for more information.
dpkg: error processing package gasket-dkms (--configure):
installed gasket-dkms package post-installation script subprocess returned error exit status 10
Setting up g++ (4:12.2.0-3) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.9) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Errors were encountered while processing:
gasket-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@sagemcom:
#

And here is the content of /var/lib/dkms/gasket/1.0/build/make.log:

DKMS make.log for gasket-1.0 for kernel 6.5.11-4-pve (x86_64)
Sun Dec 3 10:36:40 AM CET 2023
make: Entering directory '/usr/src/linux-headers-6.5.11-4-pve'
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_core.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
CC [M] /var/lib/dkms/gasket/1.0/build/apex_driver.o
/var/lib/dkms/gasket/1.0/build/gasket_core.c: In function ‘gasket_register_device’:
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:41: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointe>
1841 | class_create(driver_desc->module, driver_desc->name);
| ~~~~~~~~~~~^~~~~~~~
| |
| struct module *
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /var/lib/dkms/gasket/1.0/build/gasket_core.h:11,
from /var/lib/dkms/gasket/1.0/build/gasket_core.c:12:
./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);
| ~~~~~~~~~~~~^~~~
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:17: error: too many arguments to function ‘class_create’
1841 | class_create(driver_desc->module, driver_desc->name);
| ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:251: /var/lib/dkms/gasket/1.0/build/gasket_core.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/src/linux-headers-6.5.11-4-pve/Makefile:2039: /var/lib/dkms/gasket/1.0/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.5.11-4-pve'

I tried various options I have found on forums, but nothing seemed to work. Secure boot is disabled aswell. Is there any solution to this?

No /dev/apex_0 device

Description

I have a USB Coral connected to a XCP-NG server, which does redirects the device as a virtual usb device to a virtual machine.

I have successfully loaded the firmware to the device from the virtual machine (running RHEL9), using the webcoral "make reset"..

[root@yoda ~]# lsusb
Bus 001 Device 002: ID 18d1:9302 Google Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I'm using the dkms package from here: https://download.copr.fedorainfracloud.org/results/kylegospo/google-coral-dkms/epel-9-$basearch/

and the drivers seems to be build correctly:


[root@yoda ~]# modinfo gasket
filename:       /lib/modules/5.14.0-284.30.1.el9_2.x86_64/extra/gasket.ko.xz
author:         Rob Springer <[email protected]>
license:        GPL v2
version:        1.1.4
description:    Google Gasket driver framework
import_ns:      DMA_BUF
rhelversion:    9.2
srcversion:     C5E3C44F074635274B37D85
depends:
retpoline:      Y
name:           gasket
vermagic:       5.14.0-284.30.1.el9_2.x86_64 SMP preempt mod_unload modversions
sig_id:         PKCS#7
signer:         DKMS module signing key
sig_key:        03:9C:8D:C7:66:96:06:45:58:B9:AA:C3:F9:F8:AC:CB:B5:71:7C:24
sig_hashalgo:   sha512
signature:      3D:51:E9:73:6F:9B:16:0D:C1:64:EA:C9:E5:DE:C7:E8:07:91:CA:38:
                C9:BD:AB:FC:70:19:1C:B6:CE:99:BE:AC:F1:2C:66:D5:EB:46:69:76:
                B2:03:54:F8:6D:C9:84:98:C1:B4:1A:7A:71:1E:A5:AB:D7:4F:7F:45:
                BE:D7:DD:2E:F8:E0:1E:0B:D3:17:B6:F8:7C:76:9B:F3:E0:CD:02:CE:
                75:C2:94:A0:1E:32:9F:2B:9D:C8:D8:81:E6:F6:0F:E9:68:80:2D:CC:
                CD:98:A2:03:7A:F6:01:02:A1:6D:E2:AD:47:59:F8:E6:AB:6B:31:CC:
                E7:84:88:CE:C3:19:17:04:C7:F8:F5:2D:77:9E:F4:2A:1F:D1:13:61:
                E3:91:9A:01:C3:E8:05:26:F1:2C:32:27:1E:11:87:57:63:3C:D1:97:
                7F:C0:E7:98:3E:36:1B:B2:6E:CA:3E:FE:8E:7D:26:32:B8:FA:4E:24:
                35:4C:58:2E:7B:CD:94:B6:BF:11:3C:63:99:78:AB:9A:48:29:EC:72:
                A5:D8:A4:8E:04:50:E2:49:87:C5:40:A1:34:5C:CD:E3:62:20:6F:C4:
                44:7D:55:C9:9E:1C:29:A1:C2:DD:BD:3B:07:95:28:E0:DA:79:59:62:
                57:2D:65:D2:5B:57:6D:E0:11:AC:6C:10:E4:EB:1B:A3
parm:           dma_bit_mask:int
[root@yoda ~]# modinfo apex
filename:       /lib/modules/5.14.0-284.30.1.el9_2.x86_64/extra/apex.ko.xz
author:         John Joseph <[email protected]>
license:        GPL v2
version:        1.2
description:    Google Apex driver
rhelversion:    9.2
srcversion:     700E8BBBE9CC23C6EC17712
alias:          pci:v00001AC1d0000089Asv*sd*bc*sc*i*
depends:        gasket
retpoline:      Y
name:           apex
vermagic:       5.14.0-284.30.1.el9_2.x86_64 SMP preempt mod_unload modversions
sig_id:         PKCS#7
signer:         DKMS module signing key
sig_key:        03:9C:8D:C7:66:96:06:45:58:B9:AA:C3:F9:F8:AC:CB:B5:71:7C:24
sig_hashalgo:   sha512
signature:      4D:DC:2D:9B:DA:EC:F2:71:7D:58:9B:39:87:4A:15:0E:A4:A4:23:0E:
                C9:63:2F:85:B1:36:DB:45:84:F1:6A:4A:CE:E9:DA:31:2C:9C:18:32:
                3E:45:A0:7C:99:36:E8:6C:F3:A4:6D:B4:7C:F5:84:57:41:DD:C4:01:
                41:33:3E:57:E3:68:D2:6D:70:98:B1:C5:67:43:4D:ED:D3:A4:56:6F:
                F8:DA:2F:F9:47:DF:0A:BE:9D:89:27:A0:E6:0E:20:FE:19:E8:06:65:
                33:A7:14:DC:17:87:80:24:A3:3E:1E:DB:CD:84:74:6C:2A:7C:04:AF:
                35:7C:F3:E1:8D:20:0D:07:5F:5E:58:A0:64:42:4E:03:E7:C2:7A:4F:
                D2:93:48:9C:B1:1E:4B:31:B0:60:65:64:A8:61:75:77:96:E5:9D:5E:
                8F:51:92:51:57:4B:1D:6D:DF:5D:B4:8E:0D:A9:14:F6:29:56:13:4B:
                D5:86:ED:0E:24:E1:B2:E1:CB:4A:E4:E8:26:DB:10:6D:04:E0:3F:37:
                B9:35:6A:75:4C:D8:10:47:D0:DC:E1:E1:C6:EE:21:ED:3F:53:11:1B:
                49:33:95:87:FA:F7:3F:5F:FD:70:E9:2B:85:43:10:64:B9:ED:FD:E0:
                D2:15:CC:F3:2C:72:06:A6:94:A8:47:47:D9:97:60:82
parm:           allow_power_save:int
parm:           allow_sw_clock_gating:int
parm:           allow_hw_clock_gating:int
parm:           bypass_top_level:int
parm:           trip_point0_temp:int
parm:           trip_point1_temp:int
parm:           trip_point2_temp:int
parm:           hw_temp_warn1:int
parm:           hw_temp_warn2:int
parm:           hw_temp_warn1_en:bool
parm:           hw_temp_warn2_en:bool
parm:           temp_poll_interval:int

There is almost nothing in dmesg:

[root@yoda ~]# dmesg |grep gasket
[    1.980123] gasket: loading out-of-tree module taints kernel.
[    1.980153] gasket: module verification failed: signature and/or required key missing - tainting kernel
[root@yoda ~]# dmesg |grep apex

and no device:

[root@yoda ~]# ls -la /dev/apex*
ls: cannot access '/dev/apex*': No such file or directory

[root@yoda ~]# lsmod |grep apex
apex                   32768  0
gasket                126976  1 apex

Any suggestions?

Click to expand!

Issue Type

Support

Operating System

Linux

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

Other

Relevant Log Output

No response

Build started failing for OpenSUSE 15.5

Hi,

I've been using this driver/lkm and building a module for my Opensuse Leap 15.4 system for a year or two, so that I can run frigate in a docker container, using the /dev/apex device.

I just now though, very stupidly, updated my host to Leap 15.5, and when I tried creating a new kernel module, I get:

WARNING: modpost: "module_layout" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "system_wq" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "kmalloc_caches" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "param_ops_int" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "pci_disable_device" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "delayed_work_timer_fn" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "param_ops_bool" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "init_timer_key" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "cancel_delayed_work_sync" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: "mutex_unlock" [drivers/staging/gasket/apex.ko] undefined!
WARNING: modpost: suppressed 125 unresolved symbol warnings because there were too many)

I think that maybe OpenSUSE simply isnt supported, but I would still kindly, and desperately, ask for any help or tips that might help solve this for me?

My suse system is running : Linux kernel 5.14.21-150500.55.19-default

This repo vs coral.ai

How does this repo relate to what is linked on coral.ai here? It looks like this repo is more current compared to what is up on that googlesource.com.

Also are there plans to get the version updated in the Linux kernel tree?

kernel 6.8.0 compile error eventfd_signal

Recent change to 6.8.0 kernel requires a minor change to gasket_interrupt.c:

diff --git a/src/gasket_interrupt.c b/src/gasket_interrupt.c
index 531d94e..8dba182 100644
--- a/src/gasket_interrupt.c
+++ b/src/gasket_interrupt.c
@@ -158,7 +158,7 @@ gasket_handle_interrupt(struct gasket_interrupt_data *interrupt_data,
        read_lock(&interrupt_data->eventfd_ctx_lock);
        ctx = interrupt_data->eventfd_ctxs[interrupt_index];
        if (ctx)
-               eventfd_signal(ctx, 1);
+               eventfd_signal(ctx);
        read_unlock(&interrupt_data->eventfd_ctx_lock);

        ++(interrupt_data->interrupt_counts[interrupt_index]);

Unable to build with 6.5.3-1-pve

DKMS make.log for gasket-1.0 for kernel 6.5.3-1-pve (x86_64)
Fri Nov 3 06:21:01 PM PDT 2023
make: Entering directory '/usr/src/linux-headers-6.5.3-1-pve'
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_core.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
CC [M] /var/lib/dkms/gasket/1.0/build/apex_driver.o
/var/lib/dkms/gasket/1.0/build/gasket_core.c: In function ‘gasket_register_device’:
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:41: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1841 | class_create(driver_desc->module, driver_desc->name);
| ~~~~~~~~~~~^~~~~~~~
| |
| struct module *
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /var/lib/dkms/gasket/1.0/build/gasket_core.h:11,
from /var/lib/dkms/gasket/1.0/build/gasket_core.c:12:
./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);
| ~~~~~~~~~~~~^~~~
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:17: error: too many arguments to function ‘class_create’
1841 | class_create(driver_desc->module, driver_desc->name);
| ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:251: /var/lib/dkms/gasket/1.0/build/gasket_core.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/src/linux-headers-6.5.3-1-pve/Makefile:2037: /var/lib/dkms/gasket/1.0/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.5.3-1-pve'

Unify package and module versions

Currently, this repository uses two different versions for the debian package and the module itself.
This should be unified. Patches to the packaging should then only increment the suffix (e.g. 1.1.4-18, where 18 is the suffix).

  • module version (according to modinfo): 1.1.4
  • package version: 1.0-18

Unable to compile on 6.8.1-1-pve

DKMS make.log for gasket-1.0 for kernel 6.8.1-1-pve (x86_64)
Sat Apr 6 04:22:21 AM PDT 2024
make: Entering directory '/usr/src/linux-headers-6.8.1-1-pve'
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_core.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
CC [M] /var/lib/dkms/gasket/1.0/build/apex_driver.o
/var/lib/dkms/gasket/1.0/build/gasket_interrupt.c: In function ‘gasket_handle_interrupt’:
/var/lib/dkms/gasket/1.0/build/gasket_interrupt.c:161:17: error: too many arguments to function ‘eventfd_signal’
161 | eventfd_signal(ctx, 1);
| ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/gasket/1.0/build/gasket_interrupt.h:11,
from /var/lib/dkms/gasket/1.0/build/gasket_interrupt.c:4:
./include/linux/eventfd.h:87:20: note: declared here
87 | static inline void eventfd_signal(struct eventfd_ctx *ctx)
| ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/src/linux-headers-6.8.1-1-pve/Makefile:1926: /var/lib/dkms/gasket/1.0/build] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.8.1-1-pve'

build error with mainline kernel 5.16 (aarch64)

There is the error message:

DKMS make.log for gasket-1.0 for kernel 5.16.0-rc2 (aarch64)
Fri Dec 17 14:56:02 CST 2021
make: Entering directory '/usr/src/linux-headers-5.16.0-rc2'
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_core.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
CC [M] /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
CC [M] /var/lib/dkms/gasket/1.0/build/apex_driver.o
LD [M] /var/lib/dkms/gasket/1.0/build/gasket.o
LD [M] /var/lib/dkms/gasket/1.0/build/apex.o
MODPOST /var/lib/dkms/gasket/1.0/build/Module.symvers
ERROR: modpost: module gasket uses symbol dma_buf_detach from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_put from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_get from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_unmap_attachment from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_map_attachment from namespace DMA_BUF, but does not import it.
ERROR: modpost: module gasket uses symbol dma_buf_attach from namespace DMA_BUF, but does not import it.
make[1]: *** [scripts/Makefile.modpost:134: /var/lib/dkms/gasket/1.0/build/Module.symvers] Error 1
make[1]: *** Deleting file '/var/lib/dkms/gasket/1.0/build/Module.symvers'
make: *** [Makefile:1761: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.16.0-rc2'

Error installing gasket-dkms driver on Ubuntu 24.04 LTS

Hi,

I've built a new VM today using Ubuntu 24.04 LTS which was released yesterday.

I've passed through my two Coral TPUs and am trying to install the PCIe drivers and TPU runtime as per the tutorial at https://www.derekseaman.com/2023/06/home-assistant-frigate-vm-on-proxmox-with-pcie-coral-tpu.html.

When I do so, I get this error:

Error! Bad return status for module build on kernel: 6.8.0-31-generic (x86_64)
Consult /var/lib/dkms/gasket/1.0/build/make.log for more information.
dpkg: error processing package gasket-dkms (--configure):
installed gasket-dkms package post-installation script subprocess returned error exit status 10

The full output of "more /var/lib/dkms/gasket/1.0/build/make.log" is:

DKMS make.log for gasket-1.0 for kernel 6.8.0-31-generic (x86_64)
Fri 26 Apr 15:47:23 UTC 2024
make: Entering directory '/usr/src/linux-headers-6.8.0-31-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.
2.0
  You are using:           gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_core.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/apex_driver.o
/var/lib/dkms/gasket/1.0/build/gasket_interrupt.c: In function ‘gasket_handle_in
terrupt’:
/var/lib/dkms/gasket/1.0/build/gasket_interrupt.c:161:17: error: too many argume
nts to function ‘eventfd_signal’
  161 |                 eventfd_signal(ctx, 1);
      |                 ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/gasket/1.0/build/gasket_interrupt.h:11,
                 from /var/lib/dkms/gasket/1.0/build/gasket_interrupt.c:4:
./include/linux/eventfd.h:87:20: note: declared here
   87 | static inline void eventfd_signal(struct eventfd_ctx *ctx)
      |                    ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/gasket/1.0/build/gasket_core.c: In function ‘gasket_register_device’:
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:41: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=inc
ompatible-pointer-types]
 1841 |                 class_create(driver_desc->module, driver_desc->name);
      |                              ~~~~~~~~~~~^~~~~~~~
      |                                         |
      |                                         struct module *
In file included from ./include/linux/device.h:31,
                 from ./include/linux/cdev.h:8,
                 from /var/lib/dkms/gasket/1.0/build/gasket_core.h:11,
                 from /var/lib/dkms/gasket/1.0/build/gasket_core.c:12:
./include/linux/device/class.h:228:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
  228 | struct class * __must_check class_create(const char *name);
      |                                          ~~~~~~~~~~~~^~~~
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:17: error: too many arguments to function ‘class_create’
 1841 |                 class_create(driver_desc->module, driver_desc->name);
      |                 ^~~~~~~~~~~~
./include/linux/device/class.h:228:29: note: declared here
  228 | struct class * __must_check class_create(const char *name);
      |                             ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/gasket/1.0/build/gasket_core.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.8.0-31-generic/Makefile:1926: /var/lib/dkms/gasket/1.0/build] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.8.0-31-generic'

I should add that I previously had this working perfectly on 22.04 LTS on the same Proxmox host. Like many others, I found that the drivers stopped working once Proxmox and Ubuntu were updated recently. Despite many attempts, I've been unable to get the drivers to load correctly and consistently in 22.04, hence me trying out 24.04.

Failed to insert module 'gasket|apex': Key was rejected by service

Am using the fork by @robertzaage on Fedora (FC38) - https://github.com/robertzaage/gasket-driver installed from copr - https://copr.fedorainfracloud.org/coprs/robertzaage/gasket-dkms.

While lspci -vvv shows my Coral Edge installed, and the apex kernel module is listed there (although gasket is not!), neither are loaded (verified with lsmod | grep -E 'gasket|apex').

Looking further, one sees in systemctl status systemd-modules-load.service these errors:

Apr 22 18:10:16 host systemd-modules-load[602]: Failed to insert module 'gasket': Key was rejected by service
Apr 22 18:10:16 host systemd-modules-load[602]: Failed to insert module 'apex': Key was rejected by service

Similar to google-coral/edgetpu#407 but for reasons beyond my control cannot disable secure boot on this system to see if that workaround solves this 😢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.