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:
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)
.