Table of Contents

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.

Install packages

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

Fix module source lines

Change directory according to the version.

vim /usr/src/gasket-0.0.git.256.b6a7c6d8/gasket_core.c

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
if (ctx)
       #if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
                eventfd_signal(ctx);
       #else   
                //eventfd_signal(ctx, 1);
                eventfd_signal(ctx);
       #endif

Install modules

dkms autoinstall

Reboot and check

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