Skip to content

Commit

Permalink
Package: build vdec-openipc from source (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda authored Oct 19, 2023
1 parent 9b3d09e commit 5d7ab88
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
release: lte
- platform: hi3516ev300
release: lte
- platform: hi3536dv100
release: fpv
- platform: gk7205v200
release: lte
- platform: gk7205v300
Expand Down
31 changes: 14 additions & 17 deletions br-ext-chip-hisilicon/configs/hi3536dv100_fpv_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,12 @@ BR2_GCC_VERSION_12_X=y
# BR2_TOOLCHAIN_USES_UCLIBC is not set
# BR2_TOOLCHAIN_BUILDROOT_UCLIBC is not set
# BR2_TOOLCHAIN_BUILDROOT_LIBC="uclibc"
# BR2_TOOLCHAIN_USES_MUSL is not set
# BR2_TOOLCHAIN_BUILDROOT_MUSL is not set
# BR2_TOOLCHAIN_BUILDROOT_LIBC="musl"
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
BR2_PACKAGE_GLIBC_UTILS=y
BR2_TOOLCHAIN_USES_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="musl"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_LOCALE is not set
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
BR2_PIC_PIE=y
BR2_GCC_ENABLE_LTO=y
BR2_INSTALL_LIBSTDCPP=y

# Kernel
BR2_LINUX_KERNEL=y
Expand Down Expand Up @@ -119,10 +112,9 @@ BR2_PACKAGE_MAVLINK_ROUTER=y
# BR2_PACKAGE_MAVFWD is not set
BR2_PACKAGE_RCJOYSTICK=y

#FFMPEG
# FFMPEG
BR2_PACKAGE_FFMPEG_OPENIPC=y


# ZEROTIER
BR2_PACKAGE_ZEROTIER_ONE=y

Expand All @@ -144,7 +136,12 @@ BR2_CCACHE_DIR="$(HOME)/.ccache"
# Compression
BR2_PACKAGE_ZLIB=y

# SDL2
# BR2_PACKAGE_SDL2 is not set
# BR2_PACKAGE_SDL2_IMAGE is not set
# BR2_PACKAGE_SDL2_TTF is not set
# External
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabi"
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
16 changes: 10 additions & 6 deletions general/package/vdec-openipc/vdec-openipc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
#
################################################################################

VDEC_OPENIPC_SITE = https://github.com/OpenIPC/silicon_research/releases/download/latest/vdec

VDEC_OPENIPC_SITE = https://github.com/openipc/silicon_research/archive
VDEC_OPENIPC_SOURCE = master.tar.gz
VDEC_OPENIPC_LICENSE = MIT

define VDEC_OPENIPC_INSTALL_TARGET_CMDS
curl -k -L -o $(@D)/vdec $(VDEC_OPENIPC_SITE)
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/vdec
define VDEC_OPENIPC_BUILD_CMDS
$(MAKE) CC=$(TARGET_CC) DRV=$(HISILICON_OSDRV_HI3536DV100_PKGDIR)/files/lib -C $(@D)/vdec
endef

define VDEC_OPENIPC_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
cp $(VDEC_OPENIPC_PKGDIR)/files/S98vdec $(TARGET_DIR)/etc/init.d/S98vdec
$(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(VDEC_OPENIPC_PKGDIR)/files/S98vdec

$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/vdec/vdec
endef

$(eval $(generic-package))
4 changes: 2 additions & 2 deletions general/package/venc-openipc/venc-openipc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ else
endif

define VENC_OPENIPC_BUILD_CMDS
$(MAKE) CC=$(TARGET_CC) DRV=$(VENC_OPENIPC_OSDRV) TARGET=$(VENC_OPENIPC_TARGET) FILE=venc -C $(@D)
$(MAKE) CC=$(TARGET_CC) DRV=$(VENC_OPENIPC_OSDRV) $(VENC_OPENIPC_TARGET) -C $(@D)/venc
endef

define VENC_OPENIPC_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
$(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
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/venc/venc
endef

$(eval $(generic-package))

0 comments on commit 5d7ab88

Please sign in to comment.