Raspberry Pi 5 RT-Linux does not support Hailo hardware issues

I hope to make Hailo-related image processing programs faster by patching RT for the Raspberry Pi’s linux kernel. I downloaded the 6.9 version of the kernel and its patches, patched the kernel and selected the Fully Preemptible Kernel (RT) option, and compiled, installed, and started the new kernel according to the official instructions (https://www.raspberrypi.com/documentation/computers/linux_kernel.html#building). So far so good, but when I run “hailortcli fw-control identifier”, it prompts " [HailoRT] [error] CHECK failed - Failed open /sys/class/hailo_chardev/hailo0/accelerator_type", indicating that Hailo hardware is not supported. How should I configure the kernel so that my new kernel supports Hailo hardware, or the kernel with the RT patch itself cannot support Hailo hardware? Hope to get your answer.

Hey @g_r ,

Welcome to the Hailo Community!

This issue you are facing means the Hailo PCIe driver wasn’t built and installed for your new kernel.

Here’s how to fix that and get everything working again.


Hailo Driver Needs to Match Your Kernel

The HailoRT use a custom kernel driver called hailo_pci to talk over PCIe. Since it’s an out-of-tree module, it has to be compiled for your exact kernel — including:

  • Same kernel version (e.g. 6.9-rt)
  • Matching kernel headers
  • Same compiler and config

How to Rebuild the Driver for Your RT Kernel

Here’s the process, pulled from the HailoRT docs and install scripts:

  1. Install headers for your current kernel

    sudo apt install linux-headers-$(uname -r)
    
  2. Clone the HailoRT driver repo

    git clone --depth 1 --branch v4.20.0 https://github.com/hailo-ai/hailort-drivers.git
    cd hailort-drivers/linux/pcie
    
  3. Build and install the PCIe driver

    sudo make all
    sudo make install
    
  4. Load the driver

    sudo modprobe hailo_pci
    
  5. Install firmware

    cd ../../
    ./download_firmware.sh
    sudo mkdir -p /lib/firmware/hailo
    sudo mv hailo8_fw.*.bin /lib/firmware/hailo/hailo8_fw.bin
    
  6. Install udev rules

    sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
    sudo udevadm control --reload-rules && sudo udevadm trigger
    
  7. Reboot and test

    sudo reboot
    

Once you’re back up:

hailortcli fw-control identify

Hopes this fixes the issue!

Thank you for your answer, it solved my problem, except that there is a step that may be different, because the official does not have a corresponding kernel header file, I use my own:

KERNEL = $(uname -r) 

sudo make headers_install INSTALL_HDR_PATH =/usr/src/linux-headers-${KERNEL}

to install my own kernel header files. Hope to be able to help more people.

1 Like