mirror of
https://gitee.com/open-loongarch/buildroot-2024.08.git
synced 2026-10-25 12:47:11 +08:00
1. 添加python gevent库编译(但只支持LA) 2. 添加python gevent websocket 的编译支持 3. 更新 containerd 版本和补丁,修复编译问题 4. 添加 python pyaudio 的编译支持 5. 更新go的代理修复下载失败的问题 6. glibc版本使用2.38 7. gcc构建添加 <arch>-linux-<lib_c_name e.g. gnu musl> 格式的文件 8. 添加构建交叉编译工具链的配置 9. 添加代理使perl的资源下载更快 10. 添加pigz的压缩rootfs支持,加快构建速度 11. loongarch 支持systemd 12. 添加systemd的窗口自动登录root的功能 13. busybox的tar命令支持 tar -z 和 rev 命令 14. systemd支持自动登陆tty0(通常为屏幕) 15. 修复找不到 console-getty@.service 的bug 16. BR2_PACKAGE_QT5_JSCORE_AVAILABLE使能 17. qt5base支持LA架构编译 18. qt5script 支持 LA 架构编译 19. 修复高版本binutils(>=2.22)导致链接动态库失败的问题 20. 修复mpv使用高版本的waf不能编译的问题 21. 修复当使能WCHAR时procps-ng的编译错误 22. 2k300添加udev规则固定网口设备名字为ethX的格式 23. top命令使用新默认格式格式 24. linuxrc在systemd作为启动进程时,指向/sbin/init,修复不能启动的问题 25. busybox启动支持终端自动登录root 26. busybox启动时tty0支持登陆终端 27. 添加广东龙芯的部分自定义的package 28. 修复tty0显示终端时Qt程序被遮挡的问题 29. 修复设置默认ip失败的问题 30. 更新sdl2支持KMS DRM时无需编译opengl 31. 支持思源宋体 32. 支持在 /etc/profile 声明QT_QPA_FS_TSLIB=1 33. 2k300默认使用tslib作为qt input源 34. 添加编译Qt5的交叉编译套件的配置 35. 添加 quectel-CM 编译 36. 添加内核打包功能 37. 2k300添加strace的编译 38. 添加2k500的简易支持 39. 添加2k1000的简易支持 40. 添加嵌入式系统可用的虚拟键盘 41. 使用自定义的inputrc规则 42. 添加使用自定义systemd timesyncd 的配置 43. 添加默认自定义vimrc,支持中文显示 44. 添加opencv4的编译配置 45. 添加 stressapptest 的支持 46. 支持将RPi.GPIO的demo放入系统中 47. Qt5的交叉编译套件添加sqlite3库的编译支持 48. 添加脚本用于快速选择板卡配置文件 49. 添加gdbserver编译支持 Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
178 lines
5.9 KiB
Makefile
178 lines
5.9 KiB
Makefile
################################################################################
|
|
# Golang package infrastructure
|
|
#
|
|
# This file implements an infrastructure that eases development of package .mk
|
|
# files for Go packages. It should be used for all packages that are written in
|
|
# go.
|
|
#
|
|
# See the Buildroot documentation for details on the usage of this
|
|
# infrastructure
|
|
#
|
|
#
|
|
# In terms of implementation, this golang infrastructure requires the .mk file
|
|
# to only specify metadata information about the package: name, version,
|
|
# download URL, etc.
|
|
#
|
|
# We still allow the package .mk file to override what the different steps are
|
|
# doing, if needed. For example, if <PKG>_BUILD_CMDS is already defined, it is
|
|
# used as the list of commands to perform to build the package, instead of the
|
|
# default golang behavior. The package can also define some post operation
|
|
# hooks.
|
|
#
|
|
################################################################################
|
|
|
|
GO_BIN = $(HOST_DIR)/bin/go
|
|
|
|
################################################################################
|
|
# inner-golang-package -- defines how the configuration, compilation and
|
|
# installation of a Go package should be done, implements a few hooks to tune
|
|
# the build process for Go specificities and calls the generic package
|
|
# infrastructure to generate the necessary make targets
|
|
#
|
|
# argument 1 is the lowercase package name
|
|
# argument 2 is the uppercase package name, including a HOST_ prefix for host
|
|
# packages
|
|
# argument 3 is the uppercase package name, without the HOST_ prefix for host
|
|
# packages
|
|
# argument 4 is the type (target or host)
|
|
#
|
|
################################################################################
|
|
|
|
define inner-golang-package
|
|
|
|
$(2)_BUILD_OPTS += \
|
|
-ldflags "$$($(2)_LDFLAGS)" \
|
|
-modcacherw \
|
|
-tags "$$($(2)_TAGS)" \
|
|
-trimpath \
|
|
-p $$(PARALLEL_JOBS) \
|
|
-buildvcs=false
|
|
|
|
# Target packages need the Go compiler on the host at download time (for
|
|
# vendoring), and at build and install time.
|
|
$(2)_DOWNLOAD_DEPENDENCIES += host-go
|
|
$(2)_DEPENDENCIES += host-go
|
|
|
|
$(2)_BUILD_TARGETS ?= .
|
|
|
|
# If the build target is just ".", then we assume the binary to be
|
|
# produced is named after the package. If however, a build target has
|
|
# been specified, we assume that the binaries to be produced are named
|
|
# after each build target building them (below in <pkg>_BUILD_CMDS).
|
|
ifeq ($$($(2)_BUILD_TARGETS),.)
|
|
$(2)_BIN_NAME ?= $$($(2)_RAWNAME)
|
|
endif
|
|
|
|
$(2)_INSTALL_BINS ?= $$($(2)_RAWNAME)
|
|
|
|
# Source files in Go usually use an import path resolved around
|
|
# domain/vendor/software. We infer domain/vendor/software from the upstream URL
|
|
# of the project.
|
|
$(2)_SRC_DOMAIN = $$(call domain,$$($(2)_SITE))
|
|
$(2)_SRC_VENDOR = $$(word 1,$$(subst /, ,$$(call notdomain,$$($(2)_SITE))))
|
|
$(2)_SRC_SOFTWARE = $$(word 2,$$(subst /, ,$$(call notdomain,$$($(2)_SITE))))
|
|
|
|
# $(2)_GOMOD is the root Go module path for the project, inferred if not set.
|
|
# If the go.mod file does not exist, one is written with this root path.
|
|
$(2)_GOMOD ?= $$($(2)_SRC_DOMAIN)/$$($(2)_SRC_VENDOR)/$$($(2)_SRC_SOFTWARE)
|
|
|
|
# Generate a go.mod file if it doesn't exist. Note: Go is configured
|
|
# to use the "vendor" dir and not make network calls.
|
|
define $(2)_GEN_GOMOD
|
|
if [ ! -f $$(@D)/go.mod ]; then \
|
|
printf "module $$($(2)_GOMOD)\n" > $$(@D)/go.mod; \
|
|
fi
|
|
endef
|
|
$(2)_POST_PATCH_HOOKS += $(2)_GEN_GOMOD
|
|
|
|
$(2)_DOWNLOAD_POST_PROCESS = go
|
|
$(2)_DL_ENV += \
|
|
$$(HOST_GO_COMMON_ENV) \
|
|
GOPROXY=https://goproxy.io \
|
|
$$($(2)_GO_ENV)
|
|
|
|
# Because we append vendored info, we can't rely on the values being empty
|
|
# once we eventually get into the generic-package infra. So, we duplicate
|
|
# the heuristics here
|
|
ifndef $(2)_LICENSE
|
|
ifdef $(3)_LICENSE
|
|
$(2)_LICENSE = $$($(3)_LICENSE)
|
|
endif
|
|
endif
|
|
|
|
# Due to vendoring, it is pretty likely that not all licenses are
|
|
# listed in <pkg>_LICENSE. If the license is unset, it is "unknown"
|
|
# so adding unknowns to some unknown is still some other unkown,
|
|
# so don't append the blurb in that case.
|
|
ifneq ($$($(2)_LICENSE),)
|
|
$(2)_LICENSE += , vendored dependencies licenses probably not listed
|
|
endif
|
|
|
|
# Build step. Only define it if not already defined by the package .mk
|
|
# file.
|
|
ifndef $(2)_BUILD_CMDS
|
|
ifeq ($(4),target)
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
$(2)_LDFLAGS += -extldflags '-static'
|
|
$(2)_TAGS += osusergo netgo
|
|
endif
|
|
|
|
# Build package for target
|
|
define $(2)_BUILD_CMDS
|
|
$$(foreach d,$$($(2)_BUILD_TARGETS),\
|
|
cd $$(@D); \
|
|
$$(HOST_GO_TARGET_ENV) \
|
|
$$($(2)_GO_ENV) \
|
|
$$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
|
|
-o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
|
|
$$($(2)_GOMOD)/$$(d)
|
|
)
|
|
endef
|
|
else
|
|
# Build package for host
|
|
define $(2)_BUILD_CMDS
|
|
$$(foreach d,$$($(2)_BUILD_TARGETS),\
|
|
cd $$(@D); \
|
|
$$(HOST_GO_HOST_ENV) \
|
|
$$($(2)_GO_ENV) \
|
|
$$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
|
|
-o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
|
|
$$($(2)_GOMOD)/$$(d)
|
|
)
|
|
endef
|
|
endif
|
|
endif
|
|
|
|
# Target installation step. Only define it if not already defined by the
|
|
# package .mk file.
|
|
ifndef $(2)_INSTALL_TARGET_CMDS
|
|
define $(2)_INSTALL_TARGET_CMDS
|
|
$$(foreach d,$$($(2)_INSTALL_BINS),\
|
|
$$(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $$(TARGET_DIR)/usr/bin/$$(d)
|
|
)
|
|
endef
|
|
endif
|
|
|
|
# Host installation step
|
|
ifndef $(2)_INSTALL_CMDS
|
|
define $(2)_INSTALL_CMDS
|
|
$$(foreach d,$$($(2)_INSTALL_BINS),\
|
|
$$(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $$(HOST_DIR)/bin/$$(d)
|
|
)
|
|
endef
|
|
endif
|
|
|
|
# Call the generic package infrastructure to generate the necessary make
|
|
# targets
|
|
$(call inner-generic-package,$(1),$(2),$(3),$(4))
|
|
|
|
endef # inner-golang-package
|
|
|
|
################################################################################
|
|
# golang-package -- the target generator macro for Go packages
|
|
################################################################################
|
|
|
|
golang-package = $(call inner-golang-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
|
|
host-golang-package = $(call inner-golang-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
|