mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 19:42:41 +00:00
deepstream: update to deepstream-5.1
and rework the packaging and dependencies a bit. By default, the AMQP, Kafka, and Redis client libraries are excluded. They can be enabled via PACKAGECONFIG settings, assuming their dependencies are present in the build. Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
committed by
Matt Madison
parent
ac6c6f8caf
commit
103f7dfb67
@@ -1,80 +0,0 @@
|
||||
DESCRIPTION = "NVIDIA Deepstream SDK"
|
||||
LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = " \
|
||||
file://usr/share/doc/deepstream-5.0/copyright;md5=f635f9f375e764ce281a2070599e2457 \
|
||||
file://opt/nvidia/deepstream/deepstream-5.0/LICENSE.txt;md5=c614b345088f989a9c05a7393419bf55 \
|
||||
file://opt/nvidia/deepstream/deepstream-5.0/doc/nvidia-tegra/LICENSE.iothub_client;md5=4f8c6347a759d246b5f96281726b8611 \
|
||||
file://opt/nvidia/deepstream/deepstream-5.0/doc/nvidia-tegra/LICENSE.nvds_amqp_protocol_adaptor;md5=8b4b651fa4090272b2e08e208140a658"
|
||||
HOMEPAGE = "https://developer.nvidia.com/deepstream-sdk"
|
||||
|
||||
inherit l4t_deb_pkgfeed
|
||||
|
||||
SRC_COMMON_DEBS = "${BPN}_${PV}_arm64.deb;subdir=${BPN}"
|
||||
SRC_URI[sha256sum] = "a7a7015515883ac88c7587c7a2acfcf78510e539b84b702afd05f4f330faa55e"
|
||||
|
||||
COMPATIBLE_MACHINE = "(tegra)"
|
||||
PACKAGE_ARCH = "${TEGRA_PKGARCH}"
|
||||
|
||||
DEPENDS = "gstreamer1.0 gstreamer1.0-rtsp-server tensorrt cudnn libcublas cuda-cudart tegra-libraries"
|
||||
|
||||
S = "${WORKDIR}/${BPN}"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
DEEPSTREAM_PATH = "/opt/nvidia/deepstream/deepstream-5.0"
|
||||
SYSROOT_DIRS += "${DEEPSTREAM_PATH}/lib/"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}/
|
||||
install -m 0755 ${S}${DEEPSTREAM_PATH}/bin/* ${D}${bindir}/
|
||||
|
||||
install -d ${D}${DEEPSTREAM_PATH}/lib/
|
||||
for f in ${S}${DEEPSTREAM_PATH}/lib/*; do
|
||||
[ ! -d "$f" ] || continue
|
||||
install -m 0644 "$f" ${D}${DEEPSTREAM_PATH}/lib/
|
||||
done
|
||||
ln -sf libnvds_msgconv.so.1.0.0 ${D}${DEEPSTREAM_PATH}/lib/libnvds_msgconv.so
|
||||
ln -sf libnvvpi.so.0.3.0 ${D}${DEEPSTREAM_PATH}/lib/libnvvpi.so.0
|
||||
|
||||
install -d ${D}${DEEPSTREAM_PATH}/lib/tensorflow
|
||||
cp --preserve=mode,timestamps,links --no-dereference ${S}${DEEPSTREAM_PATH}/lib/tensorflow/* ${D}${DEEPSTREAM_PATH}/lib/tensorflow
|
||||
|
||||
install -d ${D}/${sysconfdir}/ld.so.conf.d/
|
||||
echo "${DEEPSTREAM_PATH}/lib" > ${D}/${sysconfdir}/ld.so.conf.d/deepstream.conf
|
||||
|
||||
install -d ${D}${libdir}/gstreamer-1.0/deepstream
|
||||
install -m 0644 ${S}${DEEPSTREAM_PATH}/lib/gst-plugins/* ${D}${libdir}/gstreamer-1.0/deepstream/
|
||||
|
||||
cp -R --preserve=mode,timestamps ${S}${DEEPSTREAM_PATH}/samples ${D}${DEEPSTREAM_PATH}/
|
||||
|
||||
install -d ${D}${includedir}/deepstream
|
||||
cp -R --preserve=mode,timestamps ${S}${DEEPSTREAM_PATH}/sources/includes/* ${D}${includedir}/
|
||||
|
||||
cp -R --preserve=mode,timestamps ${S}${DEEPSTREAM_PATH}/sources/ ${D}${DEEPSTREAM_PATH}/
|
||||
}
|
||||
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
INHIBIT_SYSROOT_STRIP = "1"
|
||||
|
||||
RDEPENDS_${PN} = "glib-2.0 gstreamer1.0 libgstvideo-1.0 libgstrtspserver-1.0 libgstapp-1.0 json-glib \
|
||||
libvisionworks libvisionworks-devso-symlink cuda-cufft"
|
||||
RDEPENDS_${PN}-samples = "bash json-glib"
|
||||
RDEPENDS_${PN}-sources = "bash"
|
||||
|
||||
PACKAGES += "${PN}-samples ${PN}-sources"
|
||||
|
||||
FILES_${PN} = "${sysconfdir}/ld.so.conf.d/ \
|
||||
${libdir}/gstreamer-1.0/deepstream \
|
||||
${DEEPSTREAM_PATH}/lib \
|
||||
"
|
||||
|
||||
FILES_${PN}-dev = "${includedir}"
|
||||
|
||||
FILES_${PN}-samples = "${bindir}/* ${DEEPSTREAM_PATH}/samples \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/*/*.txt \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/deepstream-test5/configs/"
|
||||
|
||||
FILES_${PN}-sources = "${DEEPSTREAM_PATH}/sources"
|
||||
|
||||
INSANE_SKIP_${PN} = "dev-so ldflags"
|
||||
INSANE_SKIP_${PN}-samples = "ldflags"
|
||||
116
recipes-devtools/deepstream/deepstream-5.1_5.1.0-1.bb
Normal file
116
recipes-devtools/deepstream/deepstream-5.1_5.1.0-1.bb
Normal file
@@ -0,0 +1,116 @@
|
||||
DESCRIPTION = "NVIDIA Deepstream SDK"
|
||||
LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = " \
|
||||
file://usr/share/doc/deepstream-5.1/copyright;md5=51be1eeb26038570c51ffe07b0097891 \
|
||||
file://opt/nvidia/deepstream/deepstream-5.1/LICENSE.txt;md5=433007b08df9ec24f46deff7572d671c \
|
||||
file://opt/nvidia/deepstream/deepstream-5.1/doc/nvidia-tegra/LICENSE.iothub_client;md5=4f8c6347a759d246b5f96281726b8611 \
|
||||
file://opt/nvidia/deepstream/deepstream-5.1/doc/nvidia-tegra/LICENSE.nvds_amqp_protocol_adaptor;md5=8b4b651fa4090272b2e08e208140a658"
|
||||
HOMEPAGE = "https://developer.nvidia.com/deepstream-sdk"
|
||||
|
||||
inherit l4t_deb_pkgfeed
|
||||
|
||||
SRC_COMMON_DEBS = "${BPN}_${PV}_arm64.deb;subdir=${BPN}"
|
||||
SRC_URI[sha256sum] = "68b5ddff8b8682ed657fe8554cfb492f36621274a7593d9660f335ce8ba926a5"
|
||||
|
||||
COMPATIBLE_MACHINE = "(tegra)"
|
||||
PACKAGE_ARCH = "${TEGRA_PKGARCH}"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[amqp] = ",,rabbitmq-c"
|
||||
PACKAGECONFIG[kafka] = ",,librdkafka"
|
||||
# NB: requires hiredis 1.0.0+
|
||||
PACKAGECONFIG[redis] = ",,hiredis"
|
||||
|
||||
DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-rtsp-server tensorrt libnvvpi1 libvisionworks json-glib tegra-libraries"
|
||||
|
||||
S = "${WORKDIR}/${BPN}"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
DEEPSTREAM_PATH = "/opt/nvidia/deepstream/deepstream-5.1"
|
||||
SYSROOT_DIRS += "${DEEPSTREAM_PATH}/lib/"
|
||||
|
||||
do_configure() {
|
||||
for feature in amqp kafka redis; do
|
||||
if ! echo "${PACKAGECONFIG}" | grep -q "$feature"; then
|
||||
rm -f ${S}${DEEPSTREAM_PATH}/lib/libnvds_${feature}*
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}/
|
||||
install -m 0755 ${S}${DEEPSTREAM_PATH}/bin/* ${D}${bindir}/
|
||||
|
||||
install -d ${D}${DEEPSTREAM_PATH}/lib/
|
||||
for f in ${S}${DEEPSTREAM_PATH}/lib/*; do
|
||||
[ ! -d "$f" ] || continue
|
||||
install -m 0644 "$f" ${D}${DEEPSTREAM_PATH}/lib/
|
||||
done
|
||||
ln -sf libnvds_msgconv.so.1.0.0 ${D}${DEEPSTREAM_PATH}/lib/libnvds_msgconv.so
|
||||
# Requires Python 3.6
|
||||
rm -f ${D}${DEEPSTREAM_PATH}/lib/pyds.so
|
||||
|
||||
for i in 1 2; do
|
||||
path="${DEEPSTREAM_PATH}/lib/triton_backends/tensorflow$i"
|
||||
install -d ${D}$path
|
||||
cp --preserve=mode,timestamps,links --no-dereference ${S}$path/* ${D}$path/
|
||||
done
|
||||
|
||||
install -d ${D}/${sysconfdir}/ld.so.conf.d/
|
||||
echo "${DEEPSTREAM_PATH}/lib" > ${D}/${sysconfdir}/ld.so.conf.d/deepstream.conf
|
||||
|
||||
install -d ${D}${libdir}/gstreamer-1.0/deepstream
|
||||
install -m 0644 ${S}${DEEPSTREAM_PATH}/lib/gst-plugins/* ${D}${libdir}/gstreamer-1.0/deepstream/
|
||||
|
||||
cp -R --preserve=mode,timestamps ${S}${DEEPSTREAM_PATH}/samples ${D}${DEEPSTREAM_PATH}/
|
||||
|
||||
install -d ${D}${includedir}/deepstream
|
||||
cp -R --preserve=mode,timestamps ${S}${DEEPSTREAM_PATH}/sources/includes/* ${D}${includedir}/
|
||||
|
||||
cp -R --preserve=mode,timestamps ${S}${DEEPSTREAM_PATH}/sources/ ${D}${DEEPSTREAM_PATH}/
|
||||
}
|
||||
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
INHIBIT_SYSROOT_STRIP = "1"
|
||||
INSANE_SKIP = "dev-so ldflags"
|
||||
|
||||
def pkgconf_packages(d):
|
||||
pkgconf = bb.utils.filter('PACKAGECONFIG', 'amqp kafka redis', d).split()
|
||||
pn = d.getVar('PN')
|
||||
return ' '.join(['{}-{}'.format(pn, p) for p in pkgconf])
|
||||
|
||||
PKGCONF_PACKAGES = "${@pkgconf_packages(d)}"
|
||||
|
||||
PACKAGES =+ "${PN}-samples-data ${PN}-samples ${PN}-sources ${PN}-iothub-client ${PN}-azure-edge ${PN}-triton-plugins ${PKGCONF_PACKAGES}"
|
||||
|
||||
FILES_${PN} = "${sysconfdir}/ld.so.conf.d/ \
|
||||
${libdir}/gstreamer-1.0/deepstream \
|
||||
${DEEPSTREAM_PATH}/lib \
|
||||
"
|
||||
|
||||
FILES_${PN}-dev = "${includedir}"
|
||||
|
||||
FILES_${PN}-samples = "${bindir}/*"
|
||||
FILES_${PN}-samples-data = "\
|
||||
${DEEPSTREAM_PATH}/samples \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/*/*.txt \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/*/README \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/*/configs/ \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/*/inferserver/ \
|
||||
${DEEPSTREAM_PATH}/sources/apps/sample_apps/*/csv_files/ \
|
||||
"
|
||||
|
||||
FILES_${PN}-sources = "${DEEPSTREAM_PATH}/sources"
|
||||
|
||||
FILES_${PN}-iothub-client = "${DEEPSTREAM_PATH}/lib/libiothub_client.so"
|
||||
FILES_${PN}-azure-edge = "${DEEPSTREAM_PATH}/lib/libazure*"
|
||||
FILES_${PN}-triton-plugins = "${DEEPSTREAM_PATH}/lib/triton_backends"
|
||||
FILES_${PN}-amqp = "${DEEPSTREAM_PATH}/lib/libnvds_amqp*"
|
||||
FILES_${PN}-kafka = "${DEEPSTREAM_PATH}/lib/libnvds_kafka*"
|
||||
FILES_${PN}-redis = "${DEEPSTREAM_PATH}/lib/libnvds_redis*"
|
||||
|
||||
RDEPENDS_${PN} = "cuda-cufft libvisionworks-devso-symlink"
|
||||
RDEPENDS_${PN}-samples = "${PN}-samples-data"
|
||||
RDEPENDS_${PN}-samples-data = "bash"
|
||||
RDEPENDS_${PN}-sources = "bash ${PN}-samples-data ${PN}"
|
||||
Reference in New Issue
Block a user