Integrate Adaptive link (#1742)

pull/1739/head
Ihor Ivlev 2025-03-07 12:40:43 +01:00 committed by GitHub
parent eb3e1252c2
commit a245b4bd92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,4 @@
source "$BR2_EXTERNAL_GENERAL_PATH/package/adaptive-link/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/aic8800-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/allwinner-osdrv-v83x/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/allwinner-osdrv-v85x/Config.in"

View File

@ -0,0 +1,5 @@
config BR2_PACKAGE_ADAPTIVE_LINK
bool "Adaptive link (not enabled by default)"
help
Controls the bitrate and other link parameters depending on the link quality.
https://github.com/OpenIPC/adaptive-link

View File

@ -0,0 +1,34 @@
################################################################################
#
# Adaptive Link
#
################################################################################
ADAPTIVE_LINK_SITE = $(call github,openipc,adaptive-link,$(ADAPTIVE_LINK_VERSION))
ADAPTIVE_LINK_VERSION = 'd4b8ec142a0566f2c1fd302bccaef77ca1f5817c'
ADAPTIVE_LINK_LICENSE = GPL-3.0
ADAPTIVE_LINK_LICENSE_FILES = LICENSE
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
ADAPTIVE_LINK_OPTIONS = "-rdynamic -s -Os -lm"
else
ADAPTIVE_LINK_OPTIONS = "-rdynamic -s -Os"
endif
define ADAPTIVE_LINK_BUILD_CMDS
@echo "Building Adaptive link"
$(MAKE) CC=$(TARGET_CC) OPT=$(ADAPTIVE_LINK_OPTIONS) -C $(@D)
endef
define ADAPTIVE_LINK_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/alink.conf
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/txprofiles.conf
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/alink_drone
endef
$(eval $(generic-package))