Building a Yocto Image for Hailo-15
This wiki provides step-by-step guidance for compiling an image specifically for the Hailo-15 device.
Step 1: Install Required Packages
To get started, run the following command to install the necessary dependencies:
sudo apt install python3-pip chrpath diffstat gawk zstd lz4 kas
Make sure you have administrative privileges to execute this command successfully.
Step 2: Clone the git repository
Next, clone the Git repository and navigate to the release folder by executing the following commands:
git clone https://github.com/hailo-ai/meta-hailo-soc.git
cd meta-hailo-soc
This will create a local copy of the repository and change your working directory to the meta-hailo-soc folder.
Step 3: First-Time Build
To initiate the first-time build and configure the default environment, run the following command:
kas build kas/hailo15-evb.yml
The .yml file specifies the target board for the build.
Note: This command only needs to be run once.
Step 4: Source the Build Environment
To set up the build environment, execute the following command:
source poky/oe-init-build-env
This command will prepare the necessary environment variables for the build process.
Step 5: Compile the image
To compile the image, use the following command with BitBake:
bitbake core-image-minimal
Or, if you only want to compile the kernel, you can run:
bitbake linux-yocto-hailo
Or if you want to compile the full development image, you can run:
bitbake core-image-hailo-dev
Building the Yocto Image for the Hailo-15-SBC
If you're building the Yocto image for the Hailo15-SBC, ensure you configure the correct target machine by following these steps:
Go to the root directory of your Yocto project.
2. Modify the Configuration File
Open the local.conf
file located in the /build/conf
directory.
3. Change the Target Machine
Locate the line that specifies the machine configuration:
MACHINE ??= "hailo15-evb-security-camera"
Change it to:
MACHINE ??= "hailo15-sbc"
4. Save and Exit
Save the changes to the local.conf
file and exit your text editor.
5. Recompile the project
Return to Step 5 in this wiki to recompile your project with the new target machine.