tips_and_howtos:coral_rocky9

Google Coral M.2 and Rocky Linux 9

To use Google Coral AI accelerator chip with Rocky Linux 9 you need a tweak or two. Here is how to do it.

dnf copr enable kylegospo/google-coral-dkms
dnf in gasket-dkms

Change directory according to the version.

vim /usr/src/gasket-0.0.git.256.b6a7c6d8/gasket_core.c
  • look at line 1846 where kernel higher than 6.4.0 gets class create with 2 parameters and
  • update it similar to one parameter else version: internal→class = classcreate(driverdesc→name);

Example snipplet

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
    //internal->class = class_create(driver_desc->module, driver_desc->name);
    internal->class = class_create(driver_desc->name);
#else
    internal->class = class_create(driver_desc->name);
#endif  
/usr/src/gasket-0.0.git.256.b6a7c6d8/gasket_interrupt.c
  • look at line 161 with kernel version check (other way) and update if part similar to else
  • part: eventfd_signal(ctx);
if (ctx)
       #if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
                eventfd_signal(ctx);
       #else   
                //eventfd_signal(ctx, 1);
                eventfd_signal(ctx);
       #endif
dkms autoinstall

Reboot and check if /dev/apex_0 is visible. That should be it.

  • tips_and_howtos/coral_rocky9.txt
  • Last modified: 2025/09/18 12:00
  • by Pekka.Kuronen@pegasi.fi