Package: build venc-openipc from source (#1061)

pull/1062/head
viktorxda 2023-10-18 16:56:59 +02:00 committed by GitHub
parent 7d821b68b0
commit b97316dfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 12 deletions

View File

@ -4,22 +4,28 @@
#
################################################################################
ifdef $(BR2_CONFIG_VENDOR, hisilicon)
VENDOR = hisi
else
VENDOR = goke
endif
VENC_OPENIPC_SITE = https://github.com/OpenIPC/silicon_research/releases/download/latest/venc-$(VENDOR)
VENC_OPENIPC_SITE = https://github.com/openipc/silicon_research/archive
VENC_OPENIPC_SOURCE = master.tar.gz
VENC_OPENIPC_LICENSE = MIT
define VENC_OPENIPC_INSTALL_TARGET_CMDS
curl -k -L -o $(@D)/venc $(VENC_OPENIPC_SITE)
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/venc
ifeq ($(OPENIPC_SOC_VENDOR),hisilicon)
VENC_OPENIPC_TARGET = venc-hisi
VENC_OPENIPC_OSDRV = $(HISILICON_OSDRV_HI3516EV200_PKGDIR)/files/lib
else
VENC_OPENIPC_TARGET = venc-goke
VENC_OPENIPC_OSDRV = $(GOKE_OSDRV_GK7205V200_PKGDIR)/files/lib
endif
define VENC_OPENIPC_BUILD_CMDS
$(MAKE) CC=$(TARGET_CC) DRV=$(VENC_OPENIPC_OSDRV) TARGET=$(VENC_OPENIPC_TARGET) FILE=venc -C $(@D)
endef
define VENC_OPENIPC_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
cp $(VENC_OPENIPC_PKGDIR)/files/S98venc $(TARGET_DIR)/etc/init.d/S98venc
$(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(VENC_OPENIPC_PKGDIR)/files/S98venc
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/output/venc
endef
$(eval $(generic-package))