buildroot: add sophgo-library package
Signed-off-by: carbon <carbon@milkv.io>
This commit is contained in:
@ -2713,6 +2713,7 @@ menu "Sophgo packages"
|
|||||||
source "package/cvi-pinmux/Config.in"
|
source "package/cvi-pinmux/Config.in"
|
||||||
source "package/duo-pinmux/Config.in"
|
source "package/duo-pinmux/Config.in"
|
||||||
source "package/duo-wiringx/Config.in"
|
source "package/duo-wiringx/Config.in"
|
||||||
|
source "package/sophgo-library/Config.in"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "System tools"
|
menu "System tools"
|
||||||
|
|||||||
5
buildroot-2024.02/package/sophgo-library/Config.in
Normal file
5
buildroot-2024.02/package/sophgo-library/Config.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
config BR2_PACKAGE_SOPHGO_LIBRARY
|
||||||
|
bool "sophgo library"
|
||||||
|
depends on BR2_aarch64 || BR2_RISCV_64
|
||||||
|
help
|
||||||
|
Some library files provided by Sophgo.
|
||||||
@ -0,0 +1 @@
|
|||||||
|
sha256 fff9781ee598761c72dbd75f5d51f1b74b9d5546eb33ba891710ae70e1e84a07 sophgo-library-1.0.0.tar.gz
|
||||||
30
buildroot-2024.02/package/sophgo-library/sophgo-library.mk
Normal file
30
buildroot-2024.02/package/sophgo-library/sophgo-library.mk
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
SOPHGO_LIBRARY_VERSION = 1.0.0
|
||||||
|
SOPHGO_LIBRARY_SITE = $(call github,milkv-duo,sophgo-library,$(SOPHGO_LIBRARY_VERSION))
|
||||||
|
SOPHGO_LIBRARY_INSTALL_STAGING = YES
|
||||||
|
|
||||||
|
ifeq ($(BR2_aarch64),y)
|
||||||
|
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||||
|
SOPHGO_LIB_DIR = glibc_arm64
|
||||||
|
else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
||||||
|
SOPHGO_LIB_DIR = musl_arm64
|
||||||
|
endif
|
||||||
|
else ifeq ($(BR2_RISCV_64),y)
|
||||||
|
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
|
||||||
|
SOPHGO_LIB_DIR = glibc_riscv64
|
||||||
|
else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
||||||
|
SOPHGO_LIB_DIR = musl_riscv64
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
SOPHGO_LIB_DIR = $(BR2_ARCH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
define SOPHGO_LIBRARY_INSTALL_STAGING_CMDS
|
||||||
|
cp -a $(@D)/$(SOPHGO_LIB_DIR)/lib/* $(STAGING_DIR)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define SOPHGO_LIBRARY_INSTALL_TARGET_CMDS
|
||||||
|
$(Q)mkdir -p $(TARGET_DIR)/mnt/system/lib
|
||||||
|
cp -a $(@D)/$(SOPHGO_LIB_DIR)/lib/* $(TARGET_DIR)/mnt/system/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(generic-package))
|
||||||
Reference in New Issue
Block a user