Please tell me how to build a driver

I performed as below, but it seems no driver created.

git clone https://github.com/hailo-ai/hailort.git

~/work/hailort $ cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DHAILO_BUILD_EXAMPLES=1

~/work/hailort $ sudo cmake --build build --config release

~/work/hailort/build $ sudo cmake --install .

Hey, I would like to know whether the issue you’re trying to solve, is it related to this, on version 6.12.34 ?hailortcli fw-control identify
[HailoRT] [error] Can’t find hailort driver class. Can happen if the driver is not installed, if the kernel was updated or on some driver failure (then read driver dmesg log)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_NOT_INSTALLED(64) - Failed listing hailo devices
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_DRIVER_NOT_INSTALLED(64)

Yes, I get message like that.

I’m facing the same problem and I have already tried updating the drivers to match the current kernel versions, also tried to downgrade the kernel versions to match the old stable versions yet nothing worked. Also the ACT LED on my kit has not blinked once since this issue started.

Hi @Koch and @Virag_Shah,

For the best experience, we suggest using our pre-built .deb package to install the driver. If you’re working with a Raspberry Pi, stick with version 4.20 for now - we’ll be updating the official hailo-all package to version 4.22 soon.

However, if you need to build everything from scratch, here’s how to compile both the Hailo PCIe driver and HailoRT library from source code:

Part 1: Building the PCIe Driver

First, grab the driver source code:

git clone --depth 1 https://github.com/hailo-ai/hailort-drivers.git

Then compile the kernel module:

cd hailort-drivers/linux/pcie
make all

This creates the hailo_pci.ko module file. If you want to install it system-wide (optional), run:

sudo make install

You can also set it up with DKMS so it automatically rebuilds when you update your kernel.

Part 2: Building HailoRT (Library and Command-Line Tools)

Download the HailoRT source:

git clone https://github.com/hailo-ai/hailort.git
cd hailort

Build it using CMake:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
  && cmake --build build --config release

This creates two important components:

  • The command-line tool: build/hailort/hailortcli/hailortcli/

  • The shared library: build/hailort/libhailort/src/libhailort.so.<version>

To install these system-wide (optional):

sudo cmake --build build --config release --target install

This puts the hailortcli command in your system PATH and installs the library so other projects can use it with CMake’s find_package(HailoRT).

Thank you, below is what I wanted.

https://github.com/hailo-ai/hailort-drivers.git“

1 Like

did it work for you, mate?

Yes, but after cloning git, I changed as below.

$ git checkout v4.22.0