Skip to content

Commit

Permalink
WIP: Add support for tappas
Browse files Browse the repository at this point in the history
  • Loading branch information
huaqianli committed Feb 8, 2025
1 parent 414a2f5 commit 870d6f5
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 0 deletions.
19 changes: 19 additions & 0 deletions meta-hailo/recipes-app/libhello/libhello.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Sample shared library
#
# This software is a part of ISAR.
# Copyright (C) 2017-2024 ilbers GmbH

DESCRIPTION = "Sample shared library for ISAR"

LICENSE = "gpl-2.0"
LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"

PV = "0.3-f4a5669"

SRC_URI = "git://github.com/ilbers/libhello.git;protocol=https;branch=master;destsuffix=${P}"
SRCREV = "f4a5669c8c63f7cae8ff268cbf298dd45865b974"

inherit dpkg

# Example of using alternative sbuild chroot
PROVIDES += " libhello libhello-dev"
56 changes: 56 additions & 0 deletions meta-hailo/recipes-app/tappas/files/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Source: tappas
Maintainer: Li Hua Qian <[email protected]>
Section: devel
Priority: optional
Standards-Version: 4.6.1
Build-Depends:
debhelper-compat (= 13),
meson,
ninja-build,
pkg-config,
gstreamer1.0-tools,
libgstreamer1.0-dev,
gstreamer1.0-plugins-base,
libgstreamer-plugins-base1.0-dev,
libopencv-dev,
libcxxopts-dev,
rapidjson-dev,
xtl-dev:all,
xtensor-dev:all,
libglib2.0-dev,
cppzmq-dev,
libzmq3-dev,

# Package: libgsthailotools
# Architecture: any
# Multi-Arch: foreign
# Description: GStreamer tools for Hailo
# Depends:
# libhailort (=${binary:Version}),
# libhailort-dev (=${binary:Version}),
# ${misc:Depends},
# ${shlibs:Depends}

Package: tappas-apps
Architecture: any
Multi-Arch: foreign
Description: Tappas applications for Hailo
Depends:
${misc:Depends},
${shlibs:Depends}

# Package: hailo-post-processes
# Architecture: any
# Multi-Arch: foreign
# Description: Post-processing tools for Hailo
# Depends:
# ${misc:Depends},
# ${shlibs:Depends}

# Package: tappas-tracers
# Architecture: any
# Multi-Arch: foreign
# Description: Tracing tools for Tappas
# Depends:
# ${misc:Depends},
# ${shlibs:Depends}
32 changes: 32 additions & 0 deletions meta-hailo/recipes-app/tappas/files/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
dh $@

# Tappas currently supports only Hailo15 and IMX8 (ARM64) platforms
override_dh_auto_configure:
@echo "Current working directory: $(CURDIR)"
@echo "Contents of /usr/include:"
@ls -l /usr/include || true
@echo "Contents of /usr/include/hailo:"
@ls -l /usr/include/hailo || true
dh_auto_configure --buildsystem=meson --sourcedirectory=core/hailo -- \
-Dlibargs="-I/usr/include/gst-hailo/metadata,-I/usr/include/hailo" \
-Dlibxtensor="/usr/include/xtensor" \
-Dinclude_blas=false \
-Dtarget="plugins" \
-Dtarget_platform="imx8" \
-Dcpp_std="c++17" \
-Dlibrapidjson='/usr/include/rapidjson' \
--buildtype="release"

override_dh_auto_build:
dh_auto_build --buildsystem=meson --sourcedirectory=core/hailo

override_dh_auto_install:
dh_auto_install
rm -f debian/libgsthailotools/usr/lib/gstreamer-1.0/libgsthailotools.so
find debian/libgsthailotools/usr/lib/gstreamer-1.0/ -name 'libgsthailotools.so.[0-9]' -delete
mv -f debian/libgsthailotools/usr/lib/gstreamer-1.0/libgsthailotools.so.${PV} debian/libgsthailotools/usr/lib/gstreamer-1.0/libgsthailotools.so
26 changes: 26 additions & 0 deletions meta-hailo/recipes-app/tappas/tappas_4.18.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: Copyright 2025 Siemens AG
# SPDX-License-Identifier: MIT
DESCRIPTION = "application examples, pipeline elements and pre-trained AI for Hailo8"
LICENSE = "MIT"

inherit dpkg

SRC_URI = "git://[email protected]/hailo-ai/tappas.git;protocol=https;name=tappas;branch=master;destsuffix=${P}"
SRCREV_tappas = "4327923422ababaf3a9395f86bf39f5b34dcfd83"

SRC_URI += " \
file://debian/control \
file://debian/rules \
"

DEPENDS += " hailort "
PROVIDES += " tappas-apps"
# PROVIDES += " libgsthailotools tappas-apps hailo-post-processes tappas-tracers"

S = "${WORKDIR}/${P}"

do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build() {
deb_add_changelog
cp -r ${WORKDIR}/debian/* ${S}/debian/
}
22 changes: 22 additions & 0 deletions meta-hailo/recipes-cpp/xtl-dev/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Source: xtl-dev
Section: python
Priority: optional
Maintainer: Li Hua Qian <[email protected]>
Build-Depends: debhelper-compat (= 13),
dh-python,
python3-setuptools (>=42),
libpython3-all-dev (>=3.2),
python3-all-dev:any (>=3.2),
python3-wheel:native,
libhello-dev
Standards-Version: 4.6.1
Homepage: https://verboselogs.readthedocs.io/
Vcs-Browser: https://github.com/xolox/python-verboselogs
Vcs-Git: https://github.com/xolox/python-verboselogs.git
Rules-Requires-Root: no

Package: xtl-dev
Architecture: any
Multi-Arch: foreign
Depends: ${python3:Depends}, ${misc:Depends}, xtl-dev:all
Description: Dummy package to satisfy xtl-dev dependency for arm64
6 changes: 6 additions & 0 deletions meta-hailo/recipes-cpp/xtl-dev/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/make -f

export BUILD_NAME=xtl-dev

%:
dh $@ --buildsystem=cmake
28 changes: 28 additions & 0 deletions meta-hailo/recipes-cpp/xtl-dev/xtl-dev_temp0.7.3.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
SUMMARY = "Xtl: Basic tools (containers, algorithms) used by other quantstack packages"
HOMEPAGE = "https://github.com/xtensor-stack/xtl"

inherit dpkg

SRC_URI = "https://github.com/xtensor-stack/xtl.git;protocol=https;branch=master"
SRCREV = "46f8a9390db2c52aaf41de8f93ed0dab97af012d"
SRC_URI += " \
file://debian/control \
file://debian/rules \
"

S = "${WORKDIR}/git"

DEPENDS += " libhello "
PROVIDES += "xtl-dev"

DEB_BUILD_PROFILES = "nocheck"
DEB_BUILD_OPTIONS = "nocheck"

do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build() {
deb_debianize
rm -f ${S}/debian/compat
cp ${WORKDIR}/debian/control \
${WORKDIR}/debian/rules \
${S}/debian/
}
4 changes: 4 additions & 0 deletions recipes-core/images/iot2050-image-example.bb
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ IMAGE_INSTALL += "${@ ' \
libgsthailo-dev \
python3-hailort \
hailort \
libgsthailotools \
tappas-apps \
hailo-post-processes \
tappas-tracers \
' if d.getVar('IOT2050_META_HAILO') == '1' else '' }"

0 comments on commit 870d6f5

Please sign in to comment.