Skip to content

Commit

Permalink
add hailort buildroot package, cross-compile fails
Browse files Browse the repository at this point in the history
  • Loading branch information
gworkman committed Dec 9, 2024
1 parent 41bf9c3 commit d5c4942
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Add project-specific packages for Buildroot here
#
# If these are non-proprietary, please consider contributing them back to
# Nerves or Buildroot.

menu "Custom Packages"

source "$NERVES_DEFCONFIG_DIR/packages/hailort/Config.in"

endmenu
1 change: 1 addition & 0 deletions external.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(sort $(wildcard $(NERVES_DEFCONFIG_DIR)/packages/*/*.mk))
1 change: 1 addition & 0 deletions nerves_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ BR2_PACKAGE_RPICAM_APPS=y
BR2_PACKAGE_RPI_DISTRO_BLUEZ_FIRMWARE=y
BR2_PACKAGE_RPI_DISTRO_FIRMWARE_NONFREE=y
BR2_PACKAGE_RPI_LIBCAMERA_V4L2=y
BR2_PACKAGE_HAILORT=y
11 changes: 11 additions & 0 deletions packages/hailort/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config BR2_PACKAGE_HAILORT
bool "hailort"
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_INSTALL_LIBSTDCPP
help
HailoRT is a runtime library for Hailo AI accelerator devices.

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

comment "hailort needs a toolchain with thread support and C++ support"
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
29 changes: 29 additions & 0 deletions packages/hailort/hailort.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
################################################################################
#
# hailort
#
################################################################################i

HAILORT_VERSION = 4.19.0
HAILORT_SITE = $(call github,hailo-ai,hailort,v$(HAILORT_VERSION))
HAILORT_LICENSE = MIT
HAILORT_LICENSE_FILES = hailort/LICENSE

HAILORT_DEPENDENCIES = host-cmake


define HAILORT_CONFIGURE_CMDS
$(CMAKE_MAKE_ENV) $(HOST_DIR)/bin/cmake -S$(@D) -B$(@D)/build \
$(CMAKE_CONF_OPTS) \
-DCMAKE_BUILD_TYPE=Release
endef

define HAILORT_BUILD_CMDS
$(CMAKE_MAKE_ENV) $(MAKE) -C $(@D)/build
endef

define HAILORT_INSTALL_TARGET_CMDS
$(CMAKE_MAKE_ENV) DESTDIR=$(TARGET_DIR) $(MAKE) -C $(@D)/build install
endef

$(eval $(cmake-package))

0 comments on commit d5c4942

Please sign in to comment.