System Setup

Complete the following steps in order on the VisionFive 2 board running Debian.

Flash Debian Image

Flash the Debian 202409 image to the SD card following the Debian User Guide.
Note: Perform all subsequent operations under a regular user account, not root, to avoid permission issues.

Update Kernel and Headers

The Hailo driver requires updated kernel packages.
  1. Download the extract the kernel package.
    $ tar -xzvf hailort-deb-1.tar.gz
  2. Update u-boot-menu.
    $ cd hailort-deb
    $ sudo dpkg -i u-boot-menu_4.2.2-SF113_all.deb
  3. Update the kernel, header files, libc library, and VPU driver.
    $ cd 6.6
    $ sudo dpkg -i ./*
  4. Reboot the system.
    $ sudo reboot

Install Build Dependencies

Run the following command to install the build dependencies:
sudo apt install make cmake automake build-essential autoconf bc bison \
    meson flex wget curl git git-lfs libgirepository1.0-dev gcc g++ \
    rsync x11-utils -y

Install Python Environment

  1. Install python3-platformdirs.
    wget https://snapshot.debian.org/archive/debian/20221210T034654Z/pool/main/p/platformdirs/python3-platformdirs_2.6.0-1_all.deb
    sudo dpkg -i python3-platformdirs_2.6.0-1_all.deb
  2. Install Python 3.11 and development tools.
    sudo apt install python3.11 python3.11-dev python3-setuptools \
        python3-virtualenv python3-pip python-gi-dev -y

Install Multimedia Libraries

Install GStreamer development libraries:
sudo apt install libgstreamer-plugins-bad1.0-dev \
    libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev -y
Install OpenCV and related packages:
sudo apt install libopencv*-dev libssl-dev pciutils \
    libcairo2-dev libzmq3-dev gstreamer1.0-tools -y

Install Rust Compiler

Install Rust which is required for compiling certain Python packages, for example, pydantic.
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
When prompted as shown below, select option 1 (default installation).
After completion, load the environment:
$ source "$HOME/.cargo/env"

Configure Python3 Default Version

Set Python 3.11 as the default python3:
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1

Install Hailo AI Driver

Run the following command to install the Hailo AI driver and related libraries:
sudo apt install hailort-driver-module libhailort tappas