diff --git a/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig index 84e197cd2..1743eb612 100644 --- a/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3516ev300_lite_defconfig @@ -56,6 +56,7 @@ BR2_PACKAGE_LIBOGG_OPENIPC=y BR2_PACKAGE_MAJESTIC_FONTS=y BR2_PACKAGE_MAJESTIC_WEBUI=y BR2_PACKAGE_MAJESTIC=y +BR2_PACKAGE_MAJESTIC_AF=y BR2_PACKAGE_MBEDTLS_OPENIPC=y BR2_PACKAGE_MOTORS=y BR2_PACKAGE_OPUS_OPENIPC=y diff --git a/general/package/Config.in b/general/package/Config.in index e300df277..857b4da2a 100644 --- a/general/package/Config.in +++ b/general/package/Config.in @@ -67,6 +67,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/linux-patcher/Config.in" source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic-fonts/Config.in" source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic-webui/Config.in" source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic/Config.in" +source "$BR2_EXTERNAL_GENERAL_PATH/package/majestic-af/Config.in" source "$BR2_EXTERNAL_GENERAL_PATH/package/matter/Config.in" source "$BR2_EXTERNAL_GENERAL_PATH/package/mavfwd/Config.in" source "$BR2_EXTERNAL_GENERAL_PATH/package/mbedtls-openipc/Config.in" diff --git a/general/package/majestic-af/Config.in b/general/package/majestic-af/Config.in new file mode 100644 index 000000000..36d8295ee --- /dev/null +++ b/general/package/majestic-af/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_MAJESTIC_AF + bool "majestic-af" + depends on BR2_PACKAGE_MAJESTIC + help + Out-of-core autofocus / PTZ engine plugin for majestic, compiled + from source. majestic loads /usr/lib/majestic-af.so at runtime when + autofocus is enabled and the majestic binary exports the plugin HAL + seams; the contrast search, the motorized-lens UART actuator (XiongMai + near-Pelco and standard Pelco-D), and the worker threads live here. + + https://github.com/OpenIPC/majestic-af diff --git a/general/package/majestic-af/majestic-af.mk b/general/package/majestic-af/majestic-af.mk new file mode 100644 index 000000000..88c6b8eae --- /dev/null +++ b/general/package/majestic-af/majestic-af.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# majestic-af +# +################################################################################ + +MAJESTIC_AF_SITE = $(call github,openipc,majestic-af,$(MAJESTIC_AF_VERSION)) +MAJESTIC_AF_VERSION = 7caebdc6289347a04cadbf48894600858f45ae69 + +MAJESTIC_AF_LICENSE = MIT +MAJESTIC_AF_LICENSE_FILES = LICENSE + +# Out-of-core autofocus / PTZ engine for majestic: one shared object majestic +# dlopen()s at runtime. The HAL seams it calls (sdk_get_focus_value, ...) are +# left UNDEFINED here and resolve against the majestic executable at dlopen, so +# this links nothing from majestic — only its own vendored headers. majestic must +# be built with plugin-symbol export (WITH_PLUGINS_SUPPORT) for those to resolve; +# the plugin otherwise fails to load and majestic keeps working without it. +define MAJESTIC_AF_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) -std=gnu99 -fPIC -shared \ + -DFILE_BASENAME=\"majestic-af\" \ + -I$(@D)/include \ + $(@D)/src/plugin.c $(@D)/src/engine.c $(@D)/src/af2.c \ + -o $(@D)/majestic-af.so +endef + +define MAJESTIC_AF_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/majestic-af.so $(TARGET_DIR)/usr/lib/majestic-af.so +endef + +$(eval $(generic-package))