Skip to content

Commit

Permalink
Inital hailo8 module support with 4.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunmulligan committed Jan 20, 2025
1 parent dd3457c commit 5373f20
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ do_install:append:revpi() {
install -D -m 0755 ${WORKDIR}/revpi_mac ${D}/lib/udev/revpi_mac
}

do_install:append:raspberrypi5() {
# Install hailo AI accelerator rules
install -D -m 0644 ${WORKDIR}/51-hailo-udev.rules ${D}/lib/udev/rules.d/51-hailo-udev.rules
}

RDEPENDS:${PN}:append:revpi = "bash"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Change mode rules for Hailo's PCIe driver if RPI AI kit is installed
SUBSYSTEM=="hailo_chardev", MODE="0666"
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ IMAGE_INSTALL:append:raspberrypi4-superhub = " \
phoenix-peripheral-rtc-sync \
"

IMAGE_INSTALL:append:raspberrypi5 = " \
hailo-firmware \
hailo-pci \
"

BALENA_BOOT_PARTITION_FILES:append:raspberrypi4-64 = " \
rpi-eeprom/pieeprom-latest-stable.bin:/pieeprom-latest-stable.bin \
rpi-eeprom/vl805-latest-stable.bin:/vl805-latest-stable.bin \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
DESCRIPTION = "hailo firmware \
hailo8 chip firmware (hailo_fw.bin) \
the recipe copies the file to /lib/firmware/hailo/ on the target device’s root file system"

BASE_URI = "https://hailo-hailort.s3.eu-west-2.amazonaws.com"
FW_AWS_DIR = "Hailo8/${PV}/FW"
FW = "hailo8_fw.${PV}.bin"
LICENSE_FILE = "LICENSE"
SRC_URI = "${BASE_URI}/${FW_AWS_DIR}/${FW};md5sum=4494928bbf4fea0ed5e52c26fa043e38 \
${BASE_URI}/${FW_AWS_DIR}/${LICENSE_FILE};md5sum=263ee034adc02556d59ab1ebdaea2cda"

LICENSE = "LICENSE"
LIC_FILES_CHKSUM = "file://${WORKDIR}/${LICENSE_FILE};md5=263ee034adc02556d59ab1ebdaea2cda"

FW_PATH = "${WORKDIR}/hailo8_fw.${PV}.bin"

do_install() {
# Stores hailo8_fw.bin in the rootfs under /lib/firmware/hailo
install -d ${D}/lib/firmware/hailo
install -m 0755 ${FW_PATH} ${D}/lib/firmware/hailo/hailo8_fw.bin
}

FILES:${PN} += "/lib /lib/* /lib/firmware/hailo/hailo8_fw*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
DESCRIPTION = "hailo pcie driver \
compiles the kernel driver for pci communication with hailo8 \
the recipe calls the compilation process with the proper cross-compiler and kernel directory. \
the output of the compilation (hailo_pci.ko) is copied to the target's rootfs"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"

SRC_URI = "git://[email protected]/hailo-ai/hailort-drivers.git;protocol=https;branch=master"
SRCREV = "24e7ff2fb58fab7029024c1a1d3f2d1914f56d7b"

inherit module

S = "${WORKDIR}/git/linux/pcie"

EXTRA_OEMAKE += "KERNEL_DIR=${STAGING_KERNEL_DIR}"
MAKE_TARGETS = "all"
MODULES_INSTALL_TARGET = "install"

0 comments on commit 5373f20

Please sign in to comment.