This commit is contained in:
刘可亮 2025-06-05 14:33:02 +08:00
parent fc0e674725
commit a88a7ec3f9
1227 changed files with 854423 additions and 66028 deletions

View File

@ -1,3 +1,54 @@
# V1.2.9 #
## 新增 ##
- USB支持DTS中配置阻抗匹配参数
- QtLauncher集成WiFi manager、QtKeyboard支持中文
- 新增p、m两个shell命令和Luban-Lite保持同样的用法
- 打包镜像支持SM2、SM4算法的签名
- AiPQ工具支持通过UART调试MIPI DSI屏幕
- Qt增加Framebuffer旋转功能
- Target GDB升级版本号为V14.2
- RTP增加X、Y坐标的镜像接口
- 打包:支持解包、重新打包的场景需求
- test-wdt增加持续喂狗的功能
- 新增WiFi支持aic8800、asr5505s、rtl8733bu、rtl8733bs支持BT功能
- 新增第三方包libmodbus、tcpdump、avahi、libdaemon、v4l-utils
- 新增示例test-coredump、p2p_auto
## 优化 ##
- 启动精简启动过程中的log
- SPI优化系统高负载时的DMA处理流程
- I2C优化不同速率的超时机制
- 烧写优化NOR的烧写速度
- PBP增强SID的写保护机制退出PBP前关闭UART
- Audio优化动态音量调节的效果
- UART配置参数期间进入loopback模式
- 打包自动计算分区大小以限制Jffs2镜像的size
- SPI优化互斥锁的使用流程
- RTC解耦SYS_BAK功能将其移到WRI模块RTC可随时关闭
## 修改 ##
- LVGL调整启动脚本中的RTP校准处理
- Disp修正关闭CONFIG_PM时的编译依赖
- GE完善YUV格式的兼容性检查
- MPP修正PNG解码中的刷Cache处理
- USB修正OHCI休眠的处理流程
- SPI修正全双工的CPU模式处理流程
- ADB启动脚本中支持停止adbd服务
- 烧写完善sparse格式区分的异常情况处理
- toolchain增加'-mno-dup-loop-header'优化选项
- SD卡完善SD卡自动挂载的处理逻辑
- WiFi更新ASR5505固件适配了ASR5532u
- MPP
- 修正wav文件播放时的seek处理
- 修正某些场景下的播放启动失败问题
- env修正eMMC方案中分区名称冲突的问题
- PM默认打开休眠功能可降低系统功耗
- Audio修正全局数组的边界处理
- 启动默认挂载mnt目录为tmpfs解决NOR方案中rootfs只读时的写需求
# V1.2.7 #
## 新增##

View File

@ -1 +1 @@
1eb35886539ebac18e93b417dbfe60217e8faf55
51249f6af42675458ef777ac49830c844c4266dc

Binary file not shown.

Binary file not shown.

BIN
dl/avahi/avahi-0.8.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dl/mpfr/mpfr-4.1.1.tar.xz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
0939f42dd89b829007d75856c37e90440faa520a
22f3e30f76abdbaa773d16010976a269ff49b5ec

View File

@ -11,6 +11,7 @@ source package/artinchip/lvgl-ui/Config.in
source package/artinchip/aicp-dec/Config.in
source package/artinchip/aic-mem/Config.in
source package/artinchip/wifimanager/Config.in
source package/artinchip/p2p_auto/Config.in
menu "Sample code"
source package/artinchip/test-mtop/Config.in
@ -33,6 +34,7 @@ menu "Sample code"
source package/artinchip/test-tp2825/Config.in
source package/artinchip/test-pm-mbox/Config.in
source package/artinchip/test-efuse/Config.in
source package/artinchip/test-coredump/Config.in
endmenu
menu "Launchers"

View File

@ -15,6 +15,19 @@ choice
bool "LVGL V9"
endchoice
choice
prompt "Select LVGL Driver Framework"
default BR2_LVGL_FBDEV
config BR2_LVGL_FBDEV
bool "LVGL FBDEV"
config BR2_LVGL_DRM
bool "LVGL DRM"
depends on BR2_LVGL_V_9
select BR2_PACKAGE_LIBDRM
endchoice
config BR2_TEST_LVGL_USE_RTP
bool "use RTP"
default n

View File

@ -6,22 +6,22 @@
DAEMON="/usr/local/bin/test_lvgl"
PIDFILE=/var/run/test_lvgl.pid
TSCALIB=/etc/pointercal
start() {
printf "Starting test_lvgl: "
export TSLIB_FBDEVICE=/dev/fb0
export POINTERCAL_CALIBFILE=$TSCALIB
export POINTERCAL_CALIBFILE=/usr/etc/ts-calib.conf
export TSLIB_CONSOLEDEVICE=none
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=/usr/lib/ts
if [ ! -f $TSCALIB ]; then
export TSLIB_CALIBFILE=/etc/pointercal
if [ -f /usr/bin/ts_calibrate ] && [ ! -s $TSLIB_CALIBFILE ]; then
/usr/bin/ts_calibrate
fi
sync
PID=`$DAEMON > /dev/null 2>&1 & echo $!`
# PID=`$DAEMON > /dev/console 2>&1 & echo $!`
if [ -z $PID ]; then
printf "Fail \n"
else

View File

@ -4,7 +4,12 @@ LVGL_UI_ENABLE_PATCH = NO
LVGL_UI_INSTALL_STAGING = YES
LVGL_UI_DEPENDENCIES += aic-mpp
ifeq (${BR2_PACKAGE_TSLIB},y)
LVGL_UI_DEPENDENCIES += tslib
endif
ifeq (${BR2_PACKAGE_LIBDRM},y)
LVGL_UI_DEPENDENCIES += libdrm
endif
LVGL_UI_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/usr/local
ifeq ($(BR2_TEST_LVGL_USE_RTP),y)
LVGL_UI_CONF_OPTS += -DUSE_RTP_TSLIB=yes
@ -36,6 +41,18 @@ else
LVGL_UI_CONF_OPTS += -DLVGL_V_9=no
endif
ifeq ($(BR2_LVGL_FBDEV),y)
LVGL_UI_CONF_OPTS += -DLVGL_FBDEV=yes
else
LVGL_UI_CONF_OPTS += -DLVGL_FBDEV=no
endif
ifeq ($(BR2_LVGL_DRM),y)
LVGL_UI_CONF_OPTS += -DLVGL_DRM=yes
else
LVGL_UI_CONF_OPTS += -DLVGL_DRM=no
endif
ifeq ($(BR2_LVGL_ROTATE_0),y)
LVGL_UI_CONF_OPTS += -DLV_ROTATE_DEGREE_0=yes
else
@ -82,4 +99,6 @@ endef
LVGL_UI_POST_INSTALL_TARGET_HOOKS += LVGL_UI_POST_TARGET_INSTALL
ifeq ($(BR2_PACKAGE_LVGL_UI), y)
$(eval $(cmake-package))
endif

View File

@ -0,0 +1,4 @@
menuconfig BR2_PACKAGE_P2P_AUTO
bool "p2p-auto"
default n

View File

@ -0,0 +1,8 @@
P2P_AUTO_VERSION =
P2P_AUTO_ENABLE_TARBALL = NO
P2P_AUTO_ENABLE_PATCH = NO
P2P_AUTO_DEPENDENCIES += wpa_supplicant
P2P_AUTO_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/usr/local
$(eval $(cmake-package))

View File

@ -10,6 +10,10 @@ if BR2_PACKAGE_QTLAUNCHER
config BR2_QTLAUNCHER_GE_SUPPORT
bool "use GE to render image"
default y
config BR2_QTLAUNCHER_WIFI_MANAGER
bool "use WiFi manager to config WiFi"
select BR2_PACKAGE_WIFIMANAGER
default n
config BR2_QTLAUNCHER_SMALL_MEMORY
bool "small memory device"
default y

View File

@ -16,6 +16,10 @@ endif
ifeq ($(BR2_QTLAUNCHER_SMALL_MEMORY),y)
export QTLAUNCHER_SMALL_MEMORY = YES
endif
ifeq ($(BR2_QTLAUNCHER_WIFI_MANAGER),y)
export QTLAUNCHER_WIFI_MANAGER = YES
QTLAUNCHER_DEPENDENCIES += wifimanager
endif
define QTLAUNCHER_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/local/launcher/

View File

@ -0,0 +1,9 @@
menuconfig BR2_PACKAGE_TEST_COREDUMP
bool "test-coredump"
default y
if BR2_PACKAGE_TEST_COREDUMP
config BR2_PACKAGE_TEST_COREDUMP_USE_PREBUILT
bool "use prebuilt binary instead of building from source"
default n
endif

View File

@ -0,0 +1,8 @@
TEST_COREDUMP_VERSION =
TEST_COREDUMP_ENABLE_TARBALL = NO
TEST_COREDUMP_ENABLE_PATCH = NO
TEST_COREDUMP_DEPENDENCIES += test-common
TEST_COREDUMP_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/usr/local
$(eval $(cmake-package))

View File

@ -1,7 +1,7 @@
WIFIMANAGER_VERSION =
WIFIMANAGER_ENABLE_TARBALL = NO
WIFIMANAGER_ENABLE_PATCH = NO
WIFIMANAGER_INSTALL_STAGING = YES
WIFIMANAGER_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/usr/local
WIFIMANAGER_DEPENDENCIES += wpa_supplicant

View File

@ -173,6 +173,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE_X := $(if $(IMAGE_CFG_ADDR),$(shell tools/scripts/ge
ifneq ($(BR2_TARGET_ROOTFS_EXT2_SIZE_X),)
BR2_TARGET_ROOTFS_EXT2_SIZE := $(BR2_TARGET_ROOTFS_EXT2_SIZE_X)
endif
endif
ifeq ($(BR2_TARGET_USERFS1),y)
TARGET_EXTFS_MAX_SIZE1 := "BR2_TARGET_USERFS1_EXT4_SIZE"
@ -200,7 +201,7 @@ ifneq ($(BR2_TARGET_USERFS3_EXT4_SIZE_X),)
BR2_TARGET_USERFS3_EXT4_SIZE := $(BR2_TARGET_USERFS3_EXT4_SIZE_X)
endif
endif
endif
ifeq ($(BR2_TARGET_ROOTFS_UBI),y)
TARGET_UBIFS_MAX_SIZE := "BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE"
@ -209,6 +210,7 @@ BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE_X := $(if $(IMAGE_CFG_ADDR),$(shell tools/scrip
ifneq ($(BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE_X),)
BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE := $(BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE_X)
endif
endif
ifeq ($(BR2_TARGET_USERFS1),y)
TARGET_UBIFS_MAX_SIZE1 := "BR2_TARGET_USERFS1_UBIFS_MAX_SIZE"
@ -236,7 +238,44 @@ ifneq ($(BR2_TARGET_USERFS3_UBIFS_MAX_SIZE_X),)
BR2_TARGET_USERFS3_UBIFS_MAX_SIZE := $(BR2_TARGET_USERFS3_UBIFS_MAX_SIZE_X)
endif
endif
ifeq ($(BR2_TARGET_ROOTFS_JFFS2),y)
TARGET_JFFS2_PADSIZE := "BR2_TARGET_ROOTFS_JFFS2_PADSIZE"
BR2_TARGET_ROOTFS_JFFS2_PADSIZE_X := $(if $(IMAGE_CFG_ADDR),$(shell tools/scripts/get_fs_max_size.sh $(IMAGE_CFG_ADDR) $(TARGET_JFFS2_PADSIZE)))
ifneq ($(BR2_TARGET_ROOTFS_JFFS2_PADSIZE_X),)
BR2_TARGET_ROOTFS_JFFS2_PADSIZE := $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE_X)
endif
endif
ifeq ($(BR2_TARGET_USERFS1),y)
TARGET_JFFS2_PADSIZE1 := "BR2_TARGET_USERFS1_JFFS2_PADSIZE"
BR2_TARGET_USERFS1_JFFS2_PADSIZE_X := $(if $(IMAGE_CFG_ADDR),$(shell tools/scripts/get_fs_max_size.sh $(IMAGE_CFG_ADDR) $(TARGET_JFFS2_PADSIZE1)))
ifneq ($(BR2_TARGET_USERFS1_JFFS2_PADSIZE_X),)
BR2_TARGET_USERFS1_JFFS2_PADSIZE := $(BR2_TARGET_USERFS1_JFFS2_PADSIZE_X)
endif
endif
ifeq ($(BR2_TARGET_USERFS2),y)
TARGET_JFFS2_PADSIZE2 := "BR2_TARGET_USERFS2_JFFS2_PADSIZE"
BR2_TARGET_USERFS2_JFFS2_PADSIZE_X := $(if $(IMAGE_CFG_ADDR),$(shell tools/scripts/get_fs_max_size.sh $(IMAGE_CFG_ADDR) $(TARGET_JFFS2_PADSIZE2)))
ifneq ($(BR2_TARGET_USERFS2_JFFS2_PADSIZE_X),)
BR2_TARGET_USERFS2_JFFS2_PADSIZE := $(BR2_TARGET_USERFS2_JFFS2_PADSIZE_X)
endif
endif
ifeq ($(BR2_TARGET_USERFS3),y)
TARGET_JFFS2_PADSIZE3 := "BR2_TARGET_USERFS3_JFFS2_PADSIZE"
BR2_TARGET_USERFS3_JFFS2_PADSIZE_X := $(if $(IMAGE_CFG_ADDR),$(shell tools/scripts/get_fs_max_size.sh $(IMAGE_CFG_ADDR) $(TARGET_JFFS2_PADSIZE3)))
ifneq ($(BR2_TARGET_USERFS3_JFFS2_PADSIZE_X),)
BR2_TARGET_USERFS3_JFFS2_PADSIZE := $(BR2_TARGET_USERFS3_JFFS2_PADSIZE_X)
endif
endif
endif
@ -247,6 +286,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
ifeq ($(BR2_GENERATE_IMAGE_AUTO_CALCULATE_SIZE),y)
ifeq ($(BR2_TARGET_ROOTFS_EXT2),y)
@$$(call MESSAGE,"BR2_TARGET_ROOTFS_EXT2_SIZE $$(BR2_TARGET_ROOTFS_EXT2_SIZE)")
endif
ifeq ($(BR2_TARGET_USERFS1),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS1_EXT4_SIZE $$(BR2_TARGET_USERFS1_EXT4_SIZE)")
endif
@ -256,9 +296,10 @@ endif
ifeq ($(BR2_TARGET_USERFS3),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS3_EXT4_SIZE $$(BR2_TARGET_USERFS3_EXT4_SIZE)")
endif
endif
ifeq ($(BR2_TARGET_ROOTFS_UBI),y)
@$$(call MESSAGE,"BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE $$(BR2_TARGET_ROOTFS_UBIFS_MAX_SIZE)")
endif
ifeq ($(BR2_TARGET_USERFS1),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS1_UBIFS_MAX_SIZE $$(BR2_TARGET_USERFS1_UBIFS_MAX_SIZE)")
endif
@ -268,7 +309,20 @@ endif
ifeq ($(BR2_TARGET_USERFS3),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS3_UBIFS_MAX_SIZE $$(BR2_TARGET_USERFS3_UBIFS_MAX_SIZE)")
endif
ifeq ($(BR2_TARGET_ROOTFS_JFFS2),y)
@$$(call MESSAGE,"BR2_TARGET_ROOTFS_JFFS2_PADSIZE $$(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)")
endif
ifeq ($(BR2_TARGET_USERFS1),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS1_JFFS2_PADSIZE $$(BR2_TARGET_USERFS1_JFFS2_PADSIZE)")
endif
ifeq ($(BR2_TARGET_USERFS2),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS2_JFFS2_PADSIZE $$(BR2_TARGET_USERFS2_JFFS2_PADSIZE)")
endif
ifeq ($(BR2_TARGET_USERFS3),y)
@$$(call MESSAGE,"BR2_TARGET_USERFS3_JFFS2_PADSIZE $$(BR2_TARGET_USERFS3_JFFS2_PADSIZE)")
endif
endif
$(Q)mkdir -p $$(@D)
$(Q)rm -rf $$(ROOTFS_$(2)_DIR)

View File

@ -7,7 +7,14 @@
JFFS2_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE) --with-xattr
SUMTOOL_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
ifeq ($(BR2_GENERATE_IMAGE_AUTO_CALCULATE_SIZE),y)
ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
else
JFFS2_OPTS += -p
endif
SUMTOOL_OPTS += -p
else ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
else

View File

@ -179,7 +179,14 @@ USERFS_$(1)_UBIFS_CMD = $$(foreach MKCMD, $$(MK_UBIFS_$(1)_CMD), $$(call $$(MKCM
USERFS_$(1)_JFFS2_OPTS = -e $$(BR2_TARGET_USERFS$(1)_JFFS2_EBSIZE) --with-xattr
USERFS_$(1)_JFFS2_SUMTOOL_OPTS = -e $$(BR2_TARGET_USERFS$(1)_JFFS2_EBSIZE)
ifeq ($$(BR2_TARGET_USERFS$(1)_JFFS2_PAD),y)
ifeq ($(BR2_GENERATE_IMAGE_AUTO_CALCULATE_SIZE),y)
ifneq ($$(strip $$(BR2_TARGET_USERFS$(1)_JFFS2_PADSIZE)),0x0)
USERFS_$(1)_JFFS2_OPTS += --pad=$$(strip $$(BR2_TARGET_USERFS$(1)_JFFS2_PADSIZE))
else
USERFS_$(1)_JFFS2_OPTS += -p
endif
USERFS_$(1)_JFFS2_SUMTOOL_OPTS += -p
else ifeq ($$(BR2_TARGET_USERFS$(1)_JFFS2_PAD),y)
ifneq ($$(strip $$(BR2_TARGET_USERFS$(1)_JFFS2_PADSIZE)),0x0)
USERFS_$(1)_JFFS2_OPTS += --pad=$$(strip $$(BR2_TARGET_USERFS$(1)_JFFS2_PADSIZE))
else

View File

@ -24,6 +24,7 @@ menu "Third-party packages"
source package/third-party/sqlite/Config.in
source package/third-party/libatomic_ops/Config.in
source package/third-party/libpthread-stubs/Config.in
source package/third-party/libdaemon/Config.in
comment "************************ Multimedia **************************"
source package/third-party/alsa-lib/Config.in
source package/third-party/alsa-utils/Config.in
@ -50,7 +51,9 @@ menu "Third-party packages"
source package/third-party/lame/Config.in
source package/third-party/mpg123/Config.in
source package/third-party/libpjsip/Config.in
source package/third-party/v4l-utils/Config.in
comment "************************ Network *****************************"
source package/third-party/libmodbus/Config.in
source package/third-party/can-utils/Config.in
source package/third-party/ethtool/Config.in
source package/third-party/iproute2/Config.in
@ -64,6 +67,10 @@ menu "Third-party packages"
source package/third-party/pppd/Config.in
source package/third-party/libpcap/Config.in
source package/third-party/hostapd/Config.in
source package/third-party/aic8800_fw/Config.in
source package/third-party/asr5505s_fw/Config.in
source package/third-party/tcpdump/Config.in
source package/third-party/avahi/Config.in
comment "************************ Security ****************************"
source package/third-party/libselinux/Config.in
source package/third-party/libsepol/Config.in
@ -135,5 +142,7 @@ menu "Third-party packages"
source package/third-party/openssh/Config.in
source package/third-party/cJSON/Config.in
source package/third-party/live555/Config.in
source package/third-party/rtl8733bs_bt_fw/Config.in
source package/third-party/rtl8733bu_bt_fw/Config.in
endmenu

View File

@ -0,0 +1,5 @@
menuconfig BR2_PACKAGE_AIC8800_FW
bool "AIC8800 firmware"
default n

View File

@ -0,0 +1,12 @@
AIC8800_FW_VERSION = 1.0
AIC8800_FW_SOURCE = aic8800_fw-$(AIC8800_FW_VERSION).tar.gz
AIC8800_FW_SITE = aic8800_fw
AIC8800_FW_ENABLE_TARBALL = YES
AIC8800_FW_ENABLE_PATCH = NO
AIC8800_FW_INSTALL_STAGING = YES
AIC8800_FW_DEPENDENCIES = linux
AIC8800_FW_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/etc/firmware
$(eval $(cmake-package))

View File

@ -0,0 +1,5 @@
menuconfig BR2_PACKAGE_ASR5505S_FW
bool "ASR5505s firmware"
default n

View File

@ -0,0 +1,12 @@
ASR5505S_FW_VERSION = 1.0
ASR5505S_FW_SOURCE = asr5505s_fw-$(ASR5505S_FW_VERSION).tar.gz
ASR5505S_FW_SITE = asr5505s_fw
ASR5505S_FW_ENABLE_TARBALL = YES
ASR5505S_FW_ENABLE_PATCH = NO
ASR5505S_FW_INSTALL_STAGING = YES
ASR5505S_FW_DEPENDENCIES = linux
ASR5505S_FW_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/etc/firmware
$(eval $(cmake-package))

53
package/third-party/avahi/Config.in vendored Normal file
View File

@ -0,0 +1,53 @@
config BR2_PACKAGE_AVAHI
bool "avahi"
# libdaemon uses fork()
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS
help
Avahi is a system which facilitates service
discovery on a local network.
http://www.avahi.org/
if BR2_PACKAGE_AVAHI
config BR2_PACKAGE_AVAHI_USE_PREBUILT
bool "use prebuilt binary instead of building from source"
default y
config BR2_PACKAGE_AVAHI_AUTOIPD
bool "IPv4LL network address configuration daemon"
default y
select BR2_PACKAGE_LIBDAEMON
help
Avahi-autoipd implements IPv4LL, "Dynamic Configuration of
IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for
automatic IP address configuration from the link-local
169.254.0.0/16 range without the need for a central server.
It is primarily intended to be used in ad-hoc networks which
lack a DHCP server.
config BR2_PACKAGE_AVAHI_DAEMON
bool "mDNS/DNS-SD daemon"
select BR2_PACKAGE_LIBDAEMON
select BR2_PACKAGE_EXPAT
help
The Avahi mDNS/DNS-SD daemon implementing Apple's ZeroConf
architecture (also known as "Rendezvous" or "Bonjour").
The daemon registers local IP addresses and services using
mDNS/DNS-SD.
config BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY
bool "libdns_sd compatibility (Bonjour)"
depends on BR2_PACKAGE_AVAHI_DAEMON
select BR2_PACKAGE_DBUS
help
Enable the libdns_sd (Bonjour) compatibility library support
for legacy applications.
endif
comment "avahi needs a toolchain w/ threads"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS

View File

@ -0,0 +1,16 @@
#!/bin/sh
case "$1" in
start|"")
if [ ! -d /tmp/avahi-autoipd ]; then
rm -rf /tmp/avahi-autoipd
mkdir /tmp/avahi-autoipd
chown avahi.avahi /tmp/avahi-autoipd
fi
;;
stop) ;;
*)
echo "Usage: S05avahi-setup.sh {start|stop}" >&2
exit 1
;;
esac

View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# avahi-daemon init script
DAEMON=/usr/sbin/avahi-daemon
case "$1" in
start)
$DAEMON -c || $DAEMON -D
;;
stop)
$DAEMON -c && $DAEMON -k
;;
reload)
$DAEMON -c && $DAEMON -r
;;
*)
echo "Usage: S50avahi-daemon {start|stop|reload}" >&2
exit 1
;;
esac

3
package/third-party/avahi/avahi.hash vendored Normal file
View File

@ -0,0 +1,3 @@
# Locally calculated
sha256 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda avahi-0.8.tar.gz
sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 LICENSE

193
package/third-party/avahi/avahi.mk vendored Normal file
View File

@ -0,0 +1,193 @@
###############################################################################
#
# avahi
#
################################################################################
AVAHI_VERSION = 0.8
AVAHI_SITE = https://github.com/lathiat/avahi/releases/download/v$(AVAHI_VERSION)
AVAHI_LICENSE = LGPL-2.1+
AVAHI_LICENSE_FILES = LICENSE
AVAHI_CPE_ID_VENDOR = avahi
AVAHI_INSTALL_STAGING = YES
#AVAHI_SOURCE = avahi-0.8.tar.gz
# CVE-2021-26720 is an issue in avahi-daemon-check-dns.sh, which is
# part of the Debian packaging and not part of upstream avahi
AVAHI_IGNORE_CVES += CVE-2021-26720
AVAHI_CONF_ENV = \
avahi_cv_sys_cxx_works=yes \
DATADIRNAME=share
# Note: even if we have Gtk2 and Gtk3 support in Buildroot, we
# explicitly disable support for them, in order to avoid the following
# circular dependencies:
#
# avahi -> libglade -> libgtk2 -> cups -> avahi
# avahi -> libgtk3 -> cups -> avahi
#
# Since Gtk2 and Gtk3 in Avahi are only used for some example/demo
# programs, we decided to disable their support to solve the circular
# dependency.
AVAHI_CONF_OPTS = \
--disable-qt3 \
--disable-qt4 \
--disable-qt5 \
--disable-gtk \
--disable-gtk3 \
--disable-gdbm \
--disable-pygobject \
--disable-mono \
--disable-monodoc \
--disable-stack-protector \
--disable-introspection \
--with-distro=none \
--disable-manpages \
$(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \
--with-avahi-user=avahi \
--with-avahi-group=avahi \
--with-autoipd-user=avahi \
--with-autoipd-group=avahi
AVAHI_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
AVAHI_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
AVAHI_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system
else
AVAHI_CONF_OPTS += --with-systemdsystemunitdir=no
AVAHI_CFLAGS += -DDISABLE_SYSTEMD
endif
ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
AVAHI_DEPENDENCIES += libdaemon
else
AVAHI_CONF_OPTS += --disable-libdaemon
endif
ifeq ($(BR2_PACKAGE_LIBCAP),y)
AVAHI_DEPENDENCIES += libcap
endif
ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
AVAHI_DEPENDENCIES += expat
AVAHI_CONF_OPTS += --with-xml=expat
else
AVAHI_CONF_OPTS += --with-xml=none
endif
ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y)
AVAHI_CONF_OPTS += --enable-compat-libdns_sd
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
AVAHI_DEPENDENCIES += dbus
AVAHI_CONF_OPTS += --with-dbus-sys=/usr/share/dbus-1/system.d
else
AVAHI_CONF_OPTS += --disable-dbus
endif
ifeq ($(BR2_PACKAGE_LIBEVENT),y)
AVAHI_DEPENDENCIES += libevent
else
AVAHI_CONF_OPTS += --disable-libevent
endif
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
AVAHI_DEPENDENCIES += libglib2
else
AVAHI_CONF_OPTS += --disable-glib --disable-gobject
endif
ifeq ($(BR2_PACKAGE_PYTHON),y)
AVAHI_CONF_ENV += \
am_cv_pathless_PYTHON=python \
am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \
am_cv_python_version=$(PYTHON_VERSION) \
am_cv_python_platform=linux2 \
am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
py_cv_mod_socket_=yes
AVAHI_DEPENDENCIES += python
AVAHI_CONF_OPTS += --enable-python
else
AVAHI_CONF_OPTS += --disable-python
endif
ifeq ($(BR2_PACKAGE_DBUS_PYTHON),y)
AVAHI_CONF_OPTS += --enable-python-dbus
AVAHI_CONF_ENV += py_cv_mod_dbus_=yes
AVAHI_DEPENDENCIES += dbus-python
else
AVAHI_CONF_OPTS += --disable-python-dbus
endif
AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)
define AVAHI_USERS
avahi -1 avahi -1 * - - -
endef
define AVAHI_REMOVE_INITSCRIPT
rm -rf $(TARGET_DIR)/etc/init.d/avahi-*
endef
AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT
ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y)
define AVAHI_INSTALL_AUTOIPD
rm -f $(TARGET_DIR)/var/lib/avahi-autoipd
$(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib
ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd
endef
define AVAHI_INSTALL_AUTOIPD_INIT_SYSV
$(INSTALL) -D -m 0755 package/third-party/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/S05avahi-setup.sh
endef
AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD
endif
ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
define AVAHI_INSTALL_SYSTEMD_SYSUSERS
$(INSTALL) -D -m 644 package/third-party/avahi/avahi_sysusers.conf \
$(TARGET_DIR)/usr/lib/sysusers.d/avahi.conf
endef
endif
define AVAHI_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/third-party/avahi/avahi_tmpfiles.conf \
$(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf
$(AVAHI_INSTALL_SYSTEMD_SYSUSERS)
endef
define AVAHI_INSTALL_DAEMON_INIT_SYSV
$(INSTALL) -D -m 0755 package/third-party/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/S50avahi-daemon
endef
endif
define AVAHI_INSTALL_INIT_SYSV
$(AVAHI_INSTALL_AUTOIPD_INIT_SYSV)
$(AVAHI_INSTALL_DAEMON_INIT_SYSV)
endef
ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y)
# applications expects to be able to #include <dns_sd.h>
define AVAHI_STAGING_INSTALL_LIBDNSSD_LINK
ln -sf avahi-compat-libdns_sd/dns_sd.h \
$(STAGING_DIR)/usr/include/dns_sd.h
endef
AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK
endif
$(eval $(autotools-package))

View File

@ -0,0 +1,5 @@
# sysusers.d snippet for creating the avahi system user automatically
# at boot on systemd-based systems that ship with an unpopulated
# /etc. See sysusers.d(5) for details.
u avahi - "Avahi mDNS/DNS-SD Stack"

View File

@ -0,0 +1 @@
d /tmp/avahi-autoipd 0755 avahi avahi

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.34.1
# Tue Nov 21 10:41:15 2023
# Wed Mar 26 17:22:01 2025
#
CONFIG_HAVE_DOT_CONFIG=y
@ -843,9 +843,9 @@ CONFIG_UBIRENAME=y
#
# Networking Utilities
#
# CONFIG_FEATURE_IPV6 is not set
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
# CONFIG_FEATURE_TLS_SHA1 is not set
# CONFIG_ARP is not set
@ -892,8 +892,8 @@ CONFIG_IFUP=y
CONFIG_IFDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH=""
# CONFIG_FEATURE_IFUPDOWN_IP is not set
# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
# CONFIG_INETD is not set
@ -903,7 +903,7 @@ CONFIG_IFUPDOWN_IFSTATE_PATH=""
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
# CONFIG_FEATURE_INETD_RPC is not set
# CONFIG_IP is not set
CONFIG_IP=y
CONFIG_IPADDR=y
CONFIG_IPLINK=y
CONFIG_IPROUTE=y
@ -941,7 +941,7 @@ CONFIG_FEATURE_NETSTAT_PRG=y
# CONFIG_FEATURE_NTPD_CONF is not set
# CONFIG_FEATURE_NTP_AUTH is not set
CONFIG_PING=y
# CONFIG_PING6 is not set
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PSCAN is not set
CONFIG_ROUTE=y
@ -968,9 +968,9 @@ CONFIG_FEATURE_TELNETD_INETD_WAIT=y
# CONFIG_TFTP_DEBUG is not set
CONFIG_TLS=y
# CONFIG_TRACEROUTE is not set
# CONFIG_TRACEROUTE6 is not set
# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
CONFIG_TRACEROUTE6=y
CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y
# CONFIG_TUNCTL is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
# CONFIG_VCONFIG is not set
@ -994,11 +994,11 @@ CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
# CONFIG_UDHCPC6 is not set
# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set
CONFIG_UDHCPC6=y
CONFIG_FEATURE_UDHCPC6_RFC3646=y
CONFIG_FEATURE_UDHCPC6_RFC4704=y
CONFIG_FEATURE_UDHCPC6_RFC4833=y
CONFIG_FEATURE_UDHCPC6_RFC5970=y
#
# Common options for DHCP applets

View File

@ -0,0 +1,55 @@
From ee74f5a6fa98b43c45c9c56a26c00abc21aeeaa1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Aug 2016 17:32:50 -0700
Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/ppc-linux.h | 6 ++++++
gdbserver/linux-ppc-low.cc | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
index c84f9146bbd..8c8580c95e1 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
#ifndef NAT_PPC_LINUX_H
#define NAT_PPC_LINUX_H
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
#include <asm/cputable.h>
/* This sometimes isn't defined. */
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
index 86fbc8f5d96..8a1a39bc750 100644
--- a/gdbserver/linux-ppc-low.cc
+++ b/gdbserver/linux-ppc-low.cc
@@ -23,7 +23,13 @@
#include "elf/common.h"
#include <sys/uio.h>
#include <elf.h>
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
--
2.43.0

View File

@ -0,0 +1,43 @@
From 57b2606e39b2ac90a3810baccbd73161ffdb5f2d Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 3 Jun 2017 21:23:52 +0200
Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC
systems
Fixes a pt_{dsp,}regs redefinition when building with the musl C library
on SuperH.
Inspired by
http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch,
adapted for SuperH.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebase on gdb 8.0]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdbserver/linux-sh-low.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc
index 782b8292010..e42f29b845a 100644
--- a/gdbserver/linux-sh-low.cc
+++ b/gdbserver/linux-sh-low.cc
@@ -76,7 +76,15 @@ extern const struct target_desc *tdesc_sh;
#include <sys/reg.h>
#endif
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+# define pt_dspregs uapi_pt_dspregs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+# undef pt_dspregs
+#endif
#define sh_num_regs 41
--
2.43.0

View File

@ -0,0 +1,40 @@
From 5288e2a3dcb2928e1367cd1d4c31da3b8310f3a0 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@gmail.com>
Date: Sat, 30 Apr 2016 15:29:06 -0700
Subject: [PATCH] use <asm/sgidefs.h>
Build fix for MIPS with musl libc
The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
but not by musl. Regardless of the libc, the kernel headers provide
<asm/sgidefs.h> which provides the same definitions, so use that
instead.
Upstream-Status: Pending
[Vincent:
Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
gdb/mips-linux-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 8a7cc95f2a4..3686f43abfd 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -31,7 +31,7 @@
#include "gdb_proc_service.h"
#include "gregset.h"
-#include <sgidefs.h>
+#include <asm/sgidefs.h>
#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
#include "inf-ptrace.h"
--
2.43.0

View File

@ -0,0 +1,63 @@
From 5e352184c2fc696c5b7aff1985098c460686a638 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Fri, 22 Jun 2018 22:40:26 +0200
Subject: [PATCH] gdbserver: fix build for m68k
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As for strace [1], when <sys/reg.h> is included after <linux/ptrace.h>,
the build fails on m68k with the following diagnostics:
In file included from ./../nat/linux-ptrace.h:28:0,
from linux-low.h:27,
from linux-m68k-low.c:20:
[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant
PT_D1 = 0,
^
[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant
[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant
In file included from linux-m68k-low.c:27:0:
[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token
};
^
Fix this by moving <sys/reg.h> on top of "linux-low.h".
[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdbserver/linux-m68k-low.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc
index 6094fd914f5..3613d9f642a 100644
--- a/gdbserver/linux-m68k-low.cc
+++ b/gdbserver/linux-m68k-low.cc
@@ -17,6 +17,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "server.h"
+
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+#endif
+
#include "linux-low.h"
/* Linux target op definitions for the m68k architecture. */
@@ -80,10 +85,6 @@ m68k_target::low_decr_pc_after_break ()
void init_registers_m68k (void);
extern const struct target_desc *tdesc_m68k;
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
#define m68k_num_regs 29
#define m68k_num_gregs 18
--
2.43.0

View File

@ -0,0 +1,53 @@
From 3e55ad5448f5379e3d7e079f17a18904e905cebf Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 24 Jun 2018 23:33:55 +0200
Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h
To decide whether fork() or vfork() should be used, fork-inferior.c
uses the following test:
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
However, HAS_NOMMU is never defined, because it gets defined in
linux-ptrace.h, which is not included by fork-inferior.c. Due to this,
gdbserver fails to build on noMMU architectures. This commit fixes
that by simply including linux-ptrace.h.
This bug was introduced by commit
2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al
with gdbserver"). Indeed, the same fork()/vfork() selection was done,
but in another file where linux-ptrace.h was included.
Fixes the following build issue:
../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))':
../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope
pid = fork ();
^~~~
../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork'
pid = fork ();
^~~~
vfork
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Romain: rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/fork-inferior.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 968983b2021..8ef620c7193 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -27,6 +27,7 @@
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/signals-state-save-restore.h"
#include "gdbsupport/gdb_tilde_expand.h"
+#include "linux-ptrace.h"
#include <vector>
extern char **environ;
--
2.43.0

View File

@ -0,0 +1,39 @@
From c87940ff1c2efd22c3dab9cd712531281144ed89 Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Sat, 6 Nov 2021 10:06:25 +0100
Subject: [PATCH] Fix getrandom compile for uclibc < v1.0.35
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h
include (fixed in uclibc since v1.0.35, see [1])
Fixes:
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name size_t
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=00972c02c2b6e0a95d5def4a71bdfb188e091782t
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
gnulib/import/getrandom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnulib/import/getrandom.c b/gnulib/import/getrandom.c
index e1468730933..3948d8d552a 100644
--- a/gnulib/import/getrandom.c
+++ b/gnulib/import/getrandom.c
@@ -19,6 +19,7 @@
#include <config.h>
+#include <stddef.h>
#include <sys/random.h>
#include <errno.h>
--
2.43.0

View File

@ -0,0 +1,60 @@
From f297ef653008b47fdaa4eebbccf2705f3d0996a8 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 10 Nov 2021 23:14:54 +0100
Subject: [PATCH] fix musl build on riscv
Fix the following build failure raised with musl:
../../gdbserver/linux-riscv-low.cc: In function 'void riscv_fill_fpregset(regcache*, void*)':
../../gdbserver/linux-riscv-low.cc:140:19: error: 'ELF_NFPREG' was not declared in this scope; did you mean 'ELF_NGREG'?
140 | for (i = 0; i < ELF_NFPREG - 1; i++, regbuf += flen)
| ^~~~~~~~~~
| ELF_NGREG
musl fixed the issue with
https://git.musl-libc.org/cgit/musl/commit/?id=e5d2823631bbfebacf48e1a34ed28f28d7cb2570
Fixes:
- http://autobuild.buildroot.org/results/16b19198980ce9c81a618b3f6e8dc9fe28247a28
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
gdb/nat/riscv-linux-tdesc.c | 5 +++++
gdbserver/linux-riscv-low.cc | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/gdb/nat/riscv-linux-tdesc.c b/gdb/nat/riscv-linux-tdesc.c
index d676233cc31..b620aab5b72 100644
--- a/gdb/nat/riscv-linux-tdesc.c
+++ b/gdb/nat/riscv-linux-tdesc.c
@@ -31,6 +31,11 @@
# define NFPREG 33
#endif
+/* Work around musl breakage since version 1.1.24. */
+#ifndef ELF_NFPREG
+# define ELF_NFPREG 33
+#endif
+
/* See nat/riscv-linux-tdesc.h. */
struct riscv_gdbarch_features
diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc
index 4c251bb179c..77a48ac9ee1 100644
--- a/gdbserver/linux-riscv-low.cc
+++ b/gdbserver/linux-riscv-low.cc
@@ -30,6 +30,11 @@
# define NFPREG 33
#endif
+/* Work around musl breakage since version 1.1.24. */
+#ifndef ELF_NFPREG
+# define ELF_NFPREG 33
+#endif
+
/* Linux target op definitions for the RISC-V architecture. */
class riscv_target : public linux_process_target
--
2.43.0

View File

@ -0,0 +1,38 @@
From 49cc0d8a7a930eab1eb8c848101150ca83145334 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 18 Nov 2021 22:52:08 +0100
Subject: [PATCH] gdbserver/Makefile.in: fix NLS build
Fix the following build failure raised since gdb version 10.1 and
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a665d62266e75f0519f3a663784c458885b5c63:
CXXLD libinproctrace.so
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit(tdesc_type_builtin const*)':
/home/buildroot/autobuild/instance-2/output-1/build/gdb-10.2/build/gdbserver/../../gdbserver/../gdbsupport/tdesc.cc:310: undefined reference to `libintl_gettext'
Fixes:
- http://autobuild.buildroot.org/results/faacc874fe9d32b74cb3d3dea988ef661cb0e3d0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status:
https://sourceware.org/pipermail/gdb-patches/2021-November/183580.html]
---
gdbserver/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index b597515d428..54cc7ccb0f6 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -389,7 +389,7 @@ $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
$(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
-Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
$(CXXFLAGS) \
- -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread
+ -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread $(INTL)
# Put the proper machine-specific files first, so M-. on a machine
# specific routine gets the one for the correct machine.
--
2.43.0

View File

@ -0,0 +1,57 @@
From 0533122983d2ac973453915cb1331b87d8d7fc0a Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Sun, 28 Aug 2022 23:21:37 +0200
Subject: [PATCH] gdb: Fix native build on xtensa
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apply a similar fix than for Alpha architecture on gdb 9:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231
Fixes:
../../gdb/xtensa-linux-nat.c: In function void fill_gregset(const regcache*, elf_greg_t (*)[128], int):
../../gdb/xtensa-linux-nat.c:66:17: error: gdbarch_pc_regnum was not declared in this scope
66 | if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
| ^~~~~~~~~~~~~~~~~
CXX complaints.o
../../gdb/xtensa-linux-nat.c:68:17: error: gdbarch_ps_regnum was not declared in this scope
68 | if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
| ^~~~~~~~~~~~~~~~~
../../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to gdbarch_tdep::gdbarch_tdep(gdbarch*&)
71 | if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
| ^
In file included from ../../gdb/xtensa-linux-nat.c:38:
../../gdb/xtensa-tdep.h:160:8: note: candidate: gdbarch_tdep::gdbarch_tdep()
160 | struct gdbarch_tdep
| ^~~~~~~~~~~~
../../gdb/xtensa-tdep.h:160:8: note: candidate expects 0 arguments, 1 provided
../../gdb/xtensa-tdep.h:160:8: note: candidate: constexpr gdbarch_tdep::gdbarch_tdep(const gdbarch_tdep&)
../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from gdbarch* to const gdbarch_tdep&
../../gdb/xtensa-tdep.h:160:8: note: candidate: constexpr gdbarch_tdep::gdbarch_tdep(gdbarch_tdep&&)
../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from gdbarch* to gdbarch_tdep&&
../../gdb/xtensa-linux-nat.c:72:49: error: no matching function for call to gdbarch_tdep::gdbarch_tdep(gdbarch*&)
72 | regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
| ^
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/xtensa-linux-nat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index e3da3c6a7a5..61834bc28d0 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -36,6 +36,7 @@
#include "gregset.h"
#include "xtensa-tdep.h"
+#include "gdbarch.h"
/* Defines ps_err_e, struct ps_prochandle. */
#include "gdb_proc_service.h"
--
2.43.0

View File

@ -0,0 +1,55 @@
From e815bac6c090d8c67a508d648685cbaf706ed052 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Aug 2016 17:32:50 -0700
Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/ppc-linux.h | 6 ++++++
gdbserver/linux-ppc-low.cc | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
index b51e2278f4b..f1bc07df0e9 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
#ifndef NAT_PPC_LINUX_H
#define NAT_PPC_LINUX_H
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
#include <asm/cputable.h>
/* This sometimes isn't defined. */
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
index bd3ac143660..1c8c0b3a98e 100644
--- a/gdbserver/linux-ppc-low.cc
+++ b/gdbserver/linux-ppc-low.cc
@@ -22,7 +22,13 @@
#include "elf/common.h"
#include <sys/uio.h>
#include <elf.h>
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
--
2.45.2

View File

@ -0,0 +1,43 @@
From da36d051935c737b09c080b5a4e27180f85d975f Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 3 Jun 2017 21:23:52 +0200
Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC
systems
Fixes a pt_{dsp,}regs redefinition when building with the musl C library
on SuperH.
Inspired by
http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch,
adapted for SuperH.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebase on gdb 8.0]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdbserver/linux-sh-low.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc
index 64e6de3480b..4770e652614 100644
--- a/gdbserver/linux-sh-low.cc
+++ b/gdbserver/linux-sh-low.cc
@@ -75,7 +75,15 @@ extern const struct target_desc *tdesc_sh;
#include <sys/reg.h>
#endif
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+# define pt_dspregs uapi_pt_dspregs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+# undef pt_dspregs
+#endif
#define sh_num_regs 41
--
2.45.2

View File

@ -0,0 +1,40 @@
From 73cfc1539610f4671e35591bfd1e6bf7edda8e71 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@gmail.com>
Date: Sat, 30 Apr 2016 15:29:06 -0700
Subject: [PATCH] use <asm/sgidefs.h>
Build fix for MIPS with musl libc
The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
but not by musl. Regardless of the libc, the kernel headers provide
<asm/sgidefs.h> which provides the same definitions, so use that
instead.
Upstream-Status: Pending
[Vincent:
Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
gdb/mips-linux-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 3d072ea935c..d763c9b8f7e 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -30,7 +30,7 @@
#include "gdb_proc_service.h"
#include "gregset.h"
-#include <sgidefs.h>
+#include <asm/sgidefs.h>
#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
#include "inf-ptrace.h"
--
2.45.2

View File

@ -0,0 +1,64 @@
From d7fac5f69c6426a9b74e6d98f926c8bf8d3207a0 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Fri, 22 Jun 2018 22:40:26 +0200
Subject: [PATCH] gdbserver: fix build for m68k
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As for strace [1], when <sys/reg.h> is included after <linux/ptrace.h>,
the build fails on m68k with the following diagnostics:
In file included from ./../nat/linux-ptrace.h:28:0,
from linux-low.h:27,
from linux-m68k-low.c:20:
[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant
PT_D1 = 0,
^
[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant
[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant
In file included from linux-m68k-low.c:27:0:
[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token
};
^
Fix this by moving <sys/reg.h> on top of "linux-low.h".
[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdbserver/linux-m68k-low.cc | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc
index 8020e49ac6e..d9ba6235288 100644
--- a/gdbserver/linux-m68k-low.cc
+++ b/gdbserver/linux-m68k-low.cc
@@ -16,6 +16,12 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "server.h"
+
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+#endif
+
#include "linux-low.h"
/* Linux target op definitions for the m68k architecture. */
@@ -79,10 +85,6 @@ m68k_target::low_decr_pc_after_break ()
void init_registers_m68k (void);
extern const struct target_desc *tdesc_m68k;
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
#define m68k_num_regs 29
#define m68k_num_gregs 18
--
2.45.2

View File

@ -0,0 +1,53 @@
From 1dbb7548d94ef83b76748c66bf5ade75a154b009 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 24 Jun 2018 23:33:55 +0200
Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h
To decide whether fork() or vfork() should be used, fork-inferior.c
uses the following test:
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
However, HAS_NOMMU is never defined, because it gets defined in
linux-ptrace.h, which is not included by fork-inferior.c. Due to this,
gdbserver fails to build on noMMU architectures. This commit fixes
that by simply including linux-ptrace.h.
This bug was introduced by commit
2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al
with gdbserver"). Indeed, the same fork()/vfork() selection was done,
but in another file where linux-ptrace.h was included.
Fixes the following build issue:
../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))':
../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope
pid = fork ();
^~~~
../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork'
pid = fork ();
^~~~
vfork
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Romain: rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/fork-inferior.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index c1082eb0441..05e42dc580a 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -27,6 +27,7 @@
#include "gdbsupport/signals-state-save-restore.h"
#include "gdbsupport/gdb_tilde_expand.h"
#include "gdbsupport/gdb_signals.h"
+#include "linux-ptrace.h"
#include <vector>
extern char **environ;
--
2.45.2

View File

@ -0,0 +1,39 @@
From 90d1e33247a4329235dbaa60521cf1ecb649d0f9 Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Sat, 6 Nov 2021 10:06:25 +0100
Subject: [PATCH] Fix getrandom compile for uclibc < v1.0.35
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h
include (fixed in uclibc since v1.0.35, see [1])
Fixes:
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name size_t
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=00972c02c2b6e0a95d5def4a71bdfb188e091782t
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
gnulib/import/getrandom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnulib/import/getrandom.c b/gnulib/import/getrandom.c
index e1468730933..3948d8d552a 100644
--- a/gnulib/import/getrandom.c
+++ b/gnulib/import/getrandom.c
@@ -19,6 +19,7 @@
#include <config.h>
+#include <stddef.h>
#include <sys/random.h>
#include <errno.h>
--
2.45.2

View File

@ -0,0 +1,60 @@
From 7b93a4abcbaa0c273aabc40213b2cdc1d3570e25 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 10 Nov 2021 23:14:54 +0100
Subject: [PATCH] fix musl build on riscv
Fix the following build failure raised with musl:
../../gdbserver/linux-riscv-low.cc: In function 'void riscv_fill_fpregset(regcache*, void*)':
../../gdbserver/linux-riscv-low.cc:140:19: error: 'ELF_NFPREG' was not declared in this scope; did you mean 'ELF_NGREG'?
140 | for (i = 0; i < ELF_NFPREG - 1; i++, regbuf += flen)
| ^~~~~~~~~~
| ELF_NGREG
musl fixed the issue with
https://git.musl-libc.org/cgit/musl/commit/?id=e5d2823631bbfebacf48e1a34ed28f28d7cb2570
Fixes:
- http://autobuild.buildroot.org/results/16b19198980ce9c81a618b3f6e8dc9fe28247a28
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
gdb/nat/riscv-linux-tdesc.c | 5 +++++
gdbserver/linux-riscv-low.cc | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/gdb/nat/riscv-linux-tdesc.c b/gdb/nat/riscv-linux-tdesc.c
index 0cd38435b22..c1f39037ad7 100644
--- a/gdb/nat/riscv-linux-tdesc.c
+++ b/gdb/nat/riscv-linux-tdesc.c
@@ -30,6 +30,11 @@
# define NFPREG 33
#endif
+/* Work around musl breakage since version 1.1.24. */
+#ifndef ELF_NFPREG
+# define ELF_NFPREG 33
+#endif
+
/* See nat/riscv-linux-tdesc.h. */
struct riscv_gdbarch_features
diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc
index c4554c507a8..aa9253ca769 100644
--- a/gdbserver/linux-riscv-low.cc
+++ b/gdbserver/linux-riscv-low.cc
@@ -29,6 +29,11 @@
# define NFPREG 33
#endif
+/* Work around musl breakage since version 1.1.24. */
+#ifndef ELF_NFPREG
+# define ELF_NFPREG 33
+#endif
+
/* Linux target op definitions for the RISC-V architecture. */
class riscv_target : public linux_process_target
--
2.45.2

View File

@ -0,0 +1,38 @@
From 169d2240b045a77689d2f61af671557bc02271d4 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 18 Nov 2021 22:52:08 +0100
Subject: [PATCH] gdbserver/Makefile.in: fix NLS build
Fix the following build failure raised since gdb version 10.1 and
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a665d62266e75f0519f3a663784c458885b5c63:
CXXLD libinproctrace.so
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit(tdesc_type_builtin const*)':
/home/buildroot/autobuild/instance-2/output-1/build/gdb-10.2/build/gdbserver/../../gdbserver/../gdbsupport/tdesc.cc:310: undefined reference to `libintl_gettext'
Fixes:
- http://autobuild.buildroot.org/results/faacc874fe9d32b74cb3d3dea988ef661cb0e3d0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status:
https://sourceware.org/pipermail/gdb-patches/2021-November/183580.html]
---
gdbserver/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index 6148ccf9121..7c054f4daf6 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -408,7 +408,7 @@ $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
$(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
-Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
$(CXXFLAGS) \
- -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread
+ -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread $(INTL)
# Put the proper machine-specific files first, so M-. on a machine
# specific routine gets the one for the correct machine.
--
2.45.2

View File

@ -0,0 +1,57 @@
From ab4b71c3f308af89fe2751344375b694e9d63a66 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Sun, 28 Aug 2022 23:21:37 +0200
Subject: [PATCH] gdb: Fix native build on xtensa
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apply a similar fix than for Alpha architecture on gdb 9:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231
Fixes:
../../gdb/xtensa-linux-nat.c: In function void fill_gregset(const regcache*, elf_greg_t (*)[128], int):
../../gdb/xtensa-linux-nat.c:66:17: error: gdbarch_pc_regnum was not declared in this scope
66 | if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
| ^~~~~~~~~~~~~~~~~
CXX complaints.o
../../gdb/xtensa-linux-nat.c:68:17: error: gdbarch_ps_regnum was not declared in this scope
68 | if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
| ^~~~~~~~~~~~~~~~~
../../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to gdbarch_tdep::gdbarch_tdep(gdbarch*&)
71 | if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
| ^
In file included from ../../gdb/xtensa-linux-nat.c:38:
../../gdb/xtensa-tdep.h:160:8: note: candidate: gdbarch_tdep::gdbarch_tdep()
160 | struct gdbarch_tdep
| ^~~~~~~~~~~~
../../gdb/xtensa-tdep.h:160:8: note: candidate expects 0 arguments, 1 provided
../../gdb/xtensa-tdep.h:160:8: note: candidate: constexpr gdbarch_tdep::gdbarch_tdep(const gdbarch_tdep&)
../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from gdbarch* to const gdbarch_tdep&
../../gdb/xtensa-tdep.h:160:8: note: candidate: constexpr gdbarch_tdep::gdbarch_tdep(gdbarch_tdep&&)
../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from gdbarch* to gdbarch_tdep&&
../../gdb/xtensa-linux-nat.c:72:49: error: no matching function for call to gdbarch_tdep::gdbarch_tdep(gdbarch*&)
72 | regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
| ^
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/xtensa-linux-nat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index f8509b02e07..794be827f9a 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -35,6 +35,7 @@
#include "gregset.h"
#include "xtensa-tdep.h"
+#include "gdbarch.h"
/* Defines ps_err_e, struct ps_prochandle. */
#include "gdb_proc_service.h"
--
2.45.2

View File

@ -0,0 +1,55 @@
From d251b3cd408849d032c869846364964d1ddc7a9e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Aug 2016 17:32:50 -0700
Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/ppc-linux.h | 6 ++++++
gdbserver/linux-ppc-low.cc | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
index 3efc1b9a9bf..635d07486de 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.h
@@ -18,7 +18,13 @@
#ifndef GDB_NAT_PPC_LINUX_H
#define GDB_NAT_PPC_LINUX_H
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
#include <asm/cputable.h>
/* This sometimes isn't defined. */
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
index 3ce978f4c7c..38534297cdf 100644
--- a/gdbserver/linux-ppc-low.cc
+++ b/gdbserver/linux-ppc-low.cc
@@ -22,7 +22,13 @@
#include "elf/common.h"
#include <sys/uio.h>
#include <elf.h>
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+#endif
#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
--
2.47.1

View File

@ -0,0 +1,43 @@
From a5098f7fb6ec72c3694d1e0c34e6db982110d944 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 3 Jun 2017 21:23:52 +0200
Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC
systems
Fixes a pt_{dsp,}regs redefinition when building with the musl C library
on SuperH.
Inspired by
http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch,
adapted for SuperH.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rebase on gdb 8.0]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdbserver/linux-sh-low.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc
index 64e6de3480b..4770e652614 100644
--- a/gdbserver/linux-sh-low.cc
+++ b/gdbserver/linux-sh-low.cc
@@ -75,7 +75,15 @@ extern const struct target_desc *tdesc_sh;
#include <sys/reg.h>
#endif
+#if !defined(__GLIBC__)
+# define pt_regs uapi_pt_regs
+# define pt_dspregs uapi_pt_dspregs
+#endif
#include <asm/ptrace.h>
+#if !defined(__GLIBC__)
+# undef pt_regs
+# undef pt_dspregs
+#endif
#define sh_num_regs 41
--
2.47.1

View File

@ -0,0 +1,40 @@
From 047f9e6b31e2d2dcc633d2d1749153a8bb4f5aa1 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <amccurdy@gmail.com>
Date: Sat, 30 Apr 2016 15:29:06 -0700
Subject: [PATCH] use <asm/sgidefs.h>
Build fix for MIPS with musl libc
The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
but not by musl. Regardless of the libc, the kernel headers provide
<asm/sgidefs.h> which provides the same definitions, so use that
instead.
Upstream-Status: Pending
[Vincent:
Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
gdb/mips-linux-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 3d072ea935c..d763c9b8f7e 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -30,7 +30,7 @@
#include "gdb_proc_service.h"
#include "gregset.h"
-#include <sgidefs.h>
+#include <asm/sgidefs.h>
#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
#include "inf-ptrace.h"
--
2.47.1

View File

@ -0,0 +1,64 @@
From 15097e614fd3c686a69779a578a24b63b674925c Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Fri, 22 Jun 2018 22:40:26 +0200
Subject: [PATCH] gdbserver: fix build for m68k
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As for strace [1], when <sys/reg.h> is included after <linux/ptrace.h>,
the build fails on m68k with the following diagnostics:
In file included from ./../nat/linux-ptrace.h:28:0,
from linux-low.h:27,
from linux-m68k-low.c:20:
[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant
PT_D1 = 0,
^
[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant
[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant
In file included from linux-m68k-low.c:27:0:
[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token
};
^
Fix this by moving <sys/reg.h> on top of "linux-low.h".
[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdbserver/linux-m68k-low.cc | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc
index 8020e49ac6e..d9ba6235288 100644
--- a/gdbserver/linux-m68k-low.cc
+++ b/gdbserver/linux-m68k-low.cc
@@ -16,6 +16,12 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "server.h"
+
+#ifdef HAVE_SYS_REG_H
+#include <sys/reg.h>
+#endif
+
#include "linux-low.h"
/* Linux target op definitions for the m68k architecture. */
@@ -79,10 +85,6 @@ m68k_target::low_decr_pc_after_break ()
void init_registers_m68k (void);
extern const struct target_desc *tdesc_m68k;
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
#define m68k_num_regs 29
#define m68k_num_gregs 18
--
2.47.1

View File

@ -0,0 +1,53 @@
From 4919bd469c1385cef4109280c6861db760001690 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 24 Jun 2018 23:33:55 +0200
Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h
To decide whether fork() or vfork() should be used, fork-inferior.c
uses the following test:
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
However, HAS_NOMMU is never defined, because it gets defined in
linux-ptrace.h, which is not included by fork-inferior.c. Due to this,
gdbserver fails to build on noMMU architectures. This commit fixes
that by simply including linux-ptrace.h.
This bug was introduced by commit
2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al
with gdbserver"). Indeed, the same fork()/vfork() selection was done,
but in another file where linux-ptrace.h was included.
Fixes the following build issue:
../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))':
../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope
pid = fork ();
^~~~
../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork'
pid = fork ();
^~~~
vfork
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Romain: rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/fork-inferior.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index 41765b102bc..a44a1d48722 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -27,6 +27,7 @@
#include "gdbsupport/signals-state-save-restore.h"
#include "gdbsupport/gdb_tilde_expand.h"
#include "gdbsupport/gdb_signals.h"
+#include "linux-ptrace.h"
#include <vector>
extern char **environ;
--
2.47.1

View File

@ -0,0 +1,39 @@
From 74c9d53de1c3c3de2e66e559889ce041f41e952a Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Sat, 6 Nov 2021 10:06:25 +0100
Subject: [PATCH] Fix getrandom compile for uclibc < v1.0.35
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h
include (fixed in uclibc since v1.0.35, see [1])
Fixes:
.../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name size_t
27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
| ^~~~~~
[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=00972c02c2b6e0a95d5def4a71bdfb188e091782t
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
gnulib/import/getrandom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnulib/import/getrandom.c b/gnulib/import/getrandom.c
index e1468730933..3948d8d552a 100644
--- a/gnulib/import/getrandom.c
+++ b/gnulib/import/getrandom.c
@@ -19,6 +19,7 @@
#include <config.h>
+#include <stddef.h>
#include <sys/random.h>
#include <errno.h>
--
2.47.1

View File

@ -0,0 +1,60 @@
From 5895710a6692dfdf00fdb258b89dae6c6784eedc Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 10 Nov 2021 23:14:54 +0100
Subject: [PATCH] fix musl build on riscv
Fix the following build failure raised with musl:
../../gdbserver/linux-riscv-low.cc: In function 'void riscv_fill_fpregset(regcache*, void*)':
../../gdbserver/linux-riscv-low.cc:140:19: error: 'ELF_NFPREG' was not declared in this scope; did you mean 'ELF_NGREG'?
140 | for (i = 0; i < ELF_NFPREG - 1; i++, regbuf += flen)
| ^~~~~~~~~~
| ELF_NGREG
musl fixed the issue with
https://git.musl-libc.org/cgit/musl/commit/?id=e5d2823631bbfebacf48e1a34ed28f28d7cb2570
Fixes:
- http://autobuild.buildroot.org/results/16b19198980ce9c81a618b3f6e8dc9fe28247a28
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
gdb/nat/riscv-linux-tdesc.c | 5 +++++
gdbserver/linux-riscv-low.cc | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/gdb/nat/riscv-linux-tdesc.c b/gdb/nat/riscv-linux-tdesc.c
index 0cd38435b22..c1f39037ad7 100644
--- a/gdb/nat/riscv-linux-tdesc.c
+++ b/gdb/nat/riscv-linux-tdesc.c
@@ -30,6 +30,11 @@
# define NFPREG 33
#endif
+/* Work around musl breakage since version 1.1.24. */
+#ifndef ELF_NFPREG
+# define ELF_NFPREG 33
+#endif
+
/* See nat/riscv-linux-tdesc.h. */
struct riscv_gdbarch_features
diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc
index 44c805bb6d6..d43c3b9fe02 100644
--- a/gdbserver/linux-riscv-low.cc
+++ b/gdbserver/linux-riscv-low.cc
@@ -29,6 +29,11 @@
# define NFPREG 33
#endif
+/* Work around musl breakage since version 1.1.24. */
+#ifndef ELF_NFPREG
+# define ELF_NFPREG 33
+#endif
+
/* Linux target op definitions for the RISC-V architecture. */
class riscv_target : public linux_process_target
--
2.47.1

View File

@ -0,0 +1,38 @@
From dd6ca97fa5fa5acd0fdaa5aa7e5aee33f92ba2df Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 18 Nov 2021 22:52:08 +0100
Subject: [PATCH] gdbserver/Makefile.in: fix NLS build
Fix the following build failure raised since gdb version 10.1 and
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a665d62266e75f0519f3a663784c458885b5c63:
CXXLD libinproctrace.so
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit(tdesc_type_builtin const*)':
/home/buildroot/autobuild/instance-2/output-1/build/gdb-10.2/build/gdbserver/../../gdbserver/../gdbsupport/tdesc.cc:310: undefined reference to `libintl_gettext'
Fixes:
- http://autobuild.buildroot.org/results/faacc874fe9d32b74cb3d3dea988ef661cb0e3d0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status:
https://sourceware.org/pipermail/gdb-patches/2021-November/183580.html]
---
gdbserver/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index 365dcf23650..42e1b7bcf6d 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -407,7 +407,7 @@ $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
$(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
-Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
$(CXXFLAGS) \
- -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread
+ -o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread $(INTL)
# Put the proper machine-specific files first, so M-. on a machine
# specific routine gets the one for the correct machine.
--
2.47.1

View File

@ -0,0 +1,57 @@
From cbb4871a793965abbe53df76c699ff7c4936d4a3 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Sun, 28 Aug 2022 23:21:37 +0200
Subject: [PATCH] gdb: Fix native build on xtensa
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apply a similar fix than for Alpha architecture on gdb 9:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231
Fixes:
../../gdb/xtensa-linux-nat.c: In function void fill_gregset(const regcache*, elf_greg_t (*)[128], int):
../../gdb/xtensa-linux-nat.c:66:17: error: gdbarch_pc_regnum was not declared in this scope
66 | if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
| ^~~~~~~~~~~~~~~~~
CXX complaints.o
../../gdb/xtensa-linux-nat.c:68:17: error: gdbarch_ps_regnum was not declared in this scope
68 | if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
| ^~~~~~~~~~~~~~~~~
../../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to gdbarch_tdep::gdbarch_tdep(gdbarch*&)
71 | if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
| ^
In file included from ../../gdb/xtensa-linux-nat.c:38:
../../gdb/xtensa-tdep.h:160:8: note: candidate: gdbarch_tdep::gdbarch_tdep()
160 | struct gdbarch_tdep
| ^~~~~~~~~~~~
../../gdb/xtensa-tdep.h:160:8: note: candidate expects 0 arguments, 1 provided
../../gdb/xtensa-tdep.h:160:8: note: candidate: constexpr gdbarch_tdep::gdbarch_tdep(const gdbarch_tdep&)
../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from gdbarch* to const gdbarch_tdep&
../../gdb/xtensa-tdep.h:160:8: note: candidate: constexpr gdbarch_tdep::gdbarch_tdep(gdbarch_tdep&&)
../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from gdbarch* to gdbarch_tdep&&
../../gdb/xtensa-linux-nat.c:72:49: error: no matching function for call to gdbarch_tdep::gdbarch_tdep(gdbarch*&)
72 | regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
| ^
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/xtensa-linux-nat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index f8509b02e07..794be827f9a 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -35,6 +35,7 @@
#include "gregset.h"
#include "xtensa-tdep.h"
+#include "gdbarch.h"
/* Defines ps_err_e, struct ps_prochandle. */
#include "gdb_proc_service.h"
--
2.47.1

View File

@ -4,6 +4,10 @@ config BR2_PACKAGE_GDB_ARCH_SUPPORTS
depends on !((BR2_arm || BR2_armeb) && BR2_BINFMT_FLAT)
depends on !BR2_microblaze
comment "gdb needs a glibc or uclibc toolchain"
depends on BR2_or1k
depends on BR2_TOOLCHAIN_USES_MUSL
comment "gdb/gdbserver needs a toolchain w/ threads, threads debug"
depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_THREADS_DEBUG
@ -17,8 +21,9 @@ menuconfig BR2_PACKAGE_GDB
depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
depends on BR2_INSTALL_LIBSTDCPP
select BR2_PACKAGE_HOST_GDB
select BR2_PACKAGE_ZLIB
# The or1k musl port is incomplete, elf_gregset_t definition is missing:
# https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3
depends on !BR2_or1k || !BR2_TOOLCHAIN_USES_MUSL
# When the external toolchain gdbserver is copied to the
# target, we don't allow building a separate gdbserver. The
# one from the external toolchain should be used.
@ -48,19 +53,19 @@ config BR2_PACKAGE_GDB_USE_PREBUILT
config BR2_PACKAGE_GDB_SERVER
bool "gdbserver"
default y
depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
help
Build the gdbserver stub to run on the target.
A full gdb is needed to debug the progam.
A full gdb is needed to debug the program.
config BR2_PACKAGE_GDB_DEBUGGER
bool "full debugger"
default y
depends on BR2_USE_WCHAR
depends on !BR2_sh
select BR2_PACKAGE_GMP if !BR2_GDB_VERSION_10 && !BR2_arc
select BR2_PACKAGE_GMP
select BR2_PACKAGE_MPFR
select BR2_PACKAGE_NCURSES
select BR2_PACKAGE_ZLIB
comment "full gdb on target needs a toolchain w/ wchar"
depends on !BR2_sh

View File

@ -45,22 +45,25 @@ config BR2_PACKAGE_HOST_GDB_SIM
choice
prompt "GDB debugger Version"
default BR2_GDB_VERSION_12
default BR2_GDB_VERSION_15
depends on !BR2_arc
help
Select the version of gdb you wish to use.
config BR2_GDB_VERSION_10
bool "gdb 10.x"
# gdbserver support missing
depends on !BR2_or1k
config BR2_GDB_VERSION_14
bool "gdb 14.x"
config BR2_GDB_VERSION_11
bool "gdb 11.x"
# gdbserver support missing
depends on !BR2_or1k
config BR2_GDB_VERSION_15
bool "gdb 15.x"
depends on BR2_HOST_GCC_AT_LEAST_9 && BR2_TOOLCHAIN_GCC_AT_LEAST_9
config BR2_GDB_VERSION_12
bool "gdb 12.x"
config BR2_GDB_VERSION_16
bool "gdb 16.x"
depends on BR2_HOST_GCC_AT_LEAST_9 && BR2_TOOLCHAIN_GCC_AT_LEAST_9
comment "gdb 15.x/16.x need host and target gcc >= 9"
depends on !BR2_HOST_GCC_AT_LEAST_9 || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_9
endchoice
@ -69,8 +72,8 @@ endif
# If cross-gdb is not enabled, the latest stable version is chosen.
config BR2_GDB_VERSION
string
default "arc-2020.09-release-gdb" if BR2_arc
default "10.2" if BR2_GDB_VERSION_10
default "11.2" if BR2_GDB_VERSION_11 || (!BR2_PACKAGE_HOST_GDB && !BR2_or1k)
default "12.1" if BR2_GDB_VERSION_12 || (!BR2_PACKAGE_HOST_GDB && BR2_or1k)
default "arc-2023.09-release" if BR2_arc
default "14.2" if BR2_GDB_VERSION_14 || (!BR2_PACKAGE_HOST_GDB && !BR2_TOOLCHAIN_GCC_AT_LEAST_9)
default "15.1" if BR2_GDB_VERSION_15 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9)
default "16.1" if BR2_GDB_VERSION_16
depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB

View File

@ -1,7 +1,13 @@
# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum
sha512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa gdb-10.2.tar.xz
sha512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 gdb-11.2.tar.xz
sha512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d gdb-12.1.tar.xz
# From https://gcc.gnu.org/pub/gdb/releases/sha512.sum
sha512 7e07941f1fe661288cc571b4964012ceabc1760624fce20320db2f470c01439b2386f859b5288da13204b758e2e3b22a74c68c012178db93b9529b06f1e22ede gdb-14.2.tar.xz
sha512 0217434073023a8b8316088bf3ee95d53a1b6a7897f6269095429016a8900f9a05e130c390d8d5d5550cc515c16519de1071d8eef96aa58e38056c7e37da1d8b gdb-15.1.tar.xz
sha512 17b322fde0655a849506851c879aba9ad1f8bfee804b900efc718806091bec75511383bd4d632b8b32a32ef207233331581501157df18a8df528abe6ff667577 gdb-16.1.tar.xz
# Locally calculated (fetched from Github)
sha512 5a2acf2fd33ab2ff589e1037ca40abda54328997dcff26b2b49b874bd3be980be5a63342962254f3c3bda98e32ce7a33af704d37353352833dee193135600458 gdb-arc-2020.09-release-gdb.tar.gz
sha512 3518b47d5c11d1fb478ee152bde1719363f9391db73f3b9f5491217c17742bef8ebca6a51a40302dfaa9476c5a32a8b8f70a4bf64289422dea5f750ae53ab88d gdb-arc-2023.09-release.tar.gz
# Locally calculated (fetched from gcc.gnu.org)
sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING3
sha256 a853c2ffec17057872340eee242ae4d96cbf2b520ae27d903e1b2fef1a5f9d1c COPYING3.LIB
sha256 56bdea73b6145ef6ac5259b3da390b981d840c24cb03b8e1cbc678de7ecfa18d COPYING.LIB

View File

@ -8,7 +8,7 @@ GDB_VERSION = $(call qstrip,$(BR2_GDB_VERSION))
GDB_SITE = $(BR2_GNU_MIRROR)/gdb
GDB_SOURCE = gdb-$(GDB_VERSION).tar.xz
ifeq ($(BR2_arc),y)
ifeq ($(GDB_VERSION),arc-2023.09-release)
GDB_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(GDB_VERSION))
GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
GDB_FROM_GIT = y
@ -20,22 +20,25 @@ GDB_CPE_ID_VENDOR = gnu
# Out of tree build is mandatory, so we create a 'build' subdirectory
# in the gdb sources, and build from there.
# GDB_SUBDIR = build
# mkdir -p $(@D)/$(GDB_SUBDIR)
#
#GDB_SUBDIR = build
#mkdir -p $(@D)/$(GDB_SUBDIR)
#mkdir -p $(@D)/
#ln -sf ../configure $(@D)/configure
define GDB_CONFIGURE_SYMLINK
mkdir -p $(@D)/
ln -sf $(GDB_SRCDIR)/configure $(@D)/configure
mkdir -p $(@D)
ln -sf ../configure $(@D)/configure
endef
#GDB_SUBDIR = build
#define GDB_CONFIGURE_SYMLINK
# mkdir -p $(@D)/$(GDB_SUBDIR)
# ln -sf ../configure $(@D)/$(GDB_SUBDIR)/configure
#endef
GDB_PRE_CONFIGURE_HOOKS += GDB_CONFIGURE_SYMLINK
# For the host variant, we really want to build with XML support,
# which is needed to read XML descriptions of target architectures. We
# also need ncurses.
# As for libiberty, gdb may use a system-installed one if present, so
# we must ensure ours is installed first.
GDB_DEPENDENCIES = zlib
HOST_GDB_DEPENDENCIES = host-expat host-libiberty host-ncurses host-zlib
HOST_GDB_DEPENDENCIES = host-expat host-ncurses host-zlib
# Disable building documentation
GDB_MAKE_OPTS += MAKEINFO=true
@ -59,11 +62,8 @@ GDB_DEPENDENCIES += host-flex host-bison
HOST_GDB_DEPENDENCIES += host-flex host-bison
endif
# All newer versions of GDB need host-gmp, so it's only for older
# versions that the dependency can be avoided.
ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc),)
HOST_GDB_DEPENDENCIES += host-gmp
endif
# All newer versions of GDB need host-gmp and host-mpfr
HOST_GDB_DEPENDENCIES += host-gmp host-mpfr
# When gdb sources are fetched from the binutils-gdb repository, they
# also contain the binutils sources, but binutils shouldn't be built,
@ -124,8 +124,10 @@ GDB_MAKE_ENV += \
GDB_CONF_ENV += gdb_cv_prfpregset_t_broken=no
GDB_MAKE_ENV += gdb_cv_prfpregset_t_broken=no
# The shared only build is not supported by gdb, so enable static build for
# build-in libraries with --enable-static.
# We want the built-in libraries of gdb (libbfd, libopcodes) to be
# built and linked statically, as we do not install them on the
# target, to not clash with the ones potentially installed by
# binutils. This is why we pass --enable-static --disable-shared.
GDB_CONF_OPTS = \
--without-uiout \
--disable-gdbtk \
@ -133,32 +135,47 @@ GDB_CONF_OPTS = \
--disable-sim \
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
--without-included-gettext \
--with-system-zlib \
--disable-werror \
--enable-static \
--without-mpfr
--disable-shared \
--disable-source-highlight
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),y)
GDB_DEPENDENCIES += zlib
GDB_CONF_OPTS += \
--enable-gdb \
--with-curses
--with-curses \
--with-system-zlib
GDB_DEPENDENCIES += ncurses \
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
else
# When only building gdbserver, we don't need zlib. But we have no way to
# tell the top-level configure that we don't need zlib: it either wants to
# build the bundled one, or use the system one.
# Since we're going to only install the gdbserver to the target, we don't
# care that the bundled zlib is built, as it is not used.
GDB_CONF_OPTS += \
--disable-gdb \
--without-curses
--without-curses \
--without-system-zlib
endif
# Starting from GDB 11.x, gmp is needed as a dependency to build full
# gdb. So we avoid the dependency only for GDB 10.x and the special
# version used on ARC.
ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc):$(BR2_PACKAGE_GDB_DEBUGGER),:y)
# gdb.
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),y)
GDB_CONF_OPTS += \
--with-libgmp-prefix=$(STAGING_DIR)/usr
GDB_DEPENDENCIES += gmp
endif
# mpfr is needed as a dependency to build full gdb
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),y)
GDB_DEPENDENCIES += mpfr
GDB_CONF_OPTS += --with-mpfr=$(STAGING_DIR)
else
GDB_CONF_OPTS += --without-mpfr
endif
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
GDB_CONF_OPTS += --enable-gdbserver
GDB_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
@ -166,13 +183,6 @@ else
GDB_CONF_OPTS += --disable-gdbserver
endif
# When gdb is built as C++ application for ARC it segfaults at runtime
# So we pass --disable-build-with-cxx config option to force gdb not to
# be built as C++ app.
ifeq ($(BR2_arc),y)
GDB_CONF_OPTS += --disable-build-with-cxx
endif
# gdb 7.12+ by default builds with a C++ compiler, which doesn't work
# when we don't have C++ support in the toolchain
ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
@ -243,10 +253,14 @@ endif
# A few notes:
# * --target, because we're doing a cross build rather than a real
# host build.
# * --enable-static because gdb really wants to use libbfd.a
# * --enable-static --disable-shared because we want host gdb to
# build and link against a static version of libbfd and
# libopcodes, because we don't install the shared variants of
# those libraries in $(HOST_DIR), as it might clash with binutils
HOST_GDB_CONF_OPTS = \
--target=$(GNU_TARGET_NAME) \
--enable-static \
--disable-shared \
--without-uiout \
--disable-gdbtk \
--without-x \
@ -255,8 +269,9 @@ HOST_GDB_CONF_OPTS = \
--without-included-gettext \
--with-system-zlib \
--with-curses \
--without-mpfr \
$(GDB_DISABLE_BINUTILS_CONF_OPTS)
--disable-source-highlight \
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
--with-mpfr=$(HOST_DIR)
ifeq ($(BR2_PACKAGE_HOST_GDB_TUI),y)
HOST_GDB_CONF_OPTS += --enable-tui
@ -280,12 +295,16 @@ endif
# Since gdb 9, in-tree builds for GDB are not allowed anymore,
# so we create a 'build' subdirectory in the gdb sources, and
# build from there.
# HOST_GDB_SUBDIR = build
# mkdir -p $(@D)/build
# ln -sf $(GDB_SRCDIR)/../configure $(@D)/build/configure
#HOST_GDB_SUBDIR = build
#
#define HOST_GDB_CONFIGURE_SYMLINK
# mkdir -p $(@D)/build
# ln -sf ../configure $(@D)/build/configure
#endef
define HOST_GDB_CONFIGURE_SYMLINK
mkdir -p $(@D)
ln -sf $(GDB_SRCDIR)/configure $(@D)/configure
ln -sf ../configure $(@D)/configure
endef
HOST_GDB_PRE_CONFIGURE_HOOKS += HOST_GDB_CONFIGURE_SYMLINK

View File

@ -10,5 +10,9 @@ fi
GTC_TICK=`devmem $GTC_REG`
BTIME_S=`echo "scale=6;$((GTC_TICK)) / 4000000" | bc`
echo "Startup time: $(printf "%.3f" ${BTIME_S}) sec (from Power-On-Reset)"
echo "Startup: $(printf "%.3f" ${BTIME_S}) sec (from Power-On-Reset)"
if [ -f usr/bin/version ]; then
version
fi

View File

@ -15,9 +15,9 @@ start() {
mount -t devpts none /dev/pts
mount -t configfs none /sys/kernel/config
cd /sys/kernel/config/usb_gadget
cd /sys/kernel/config/usb_gadget || exit
mkdir g_adb
cd g_adb
cd g_adb || exit
echo "0x18d1" > idVendor
echo "0x4e26" > idProduct
@ -43,7 +43,7 @@ start() {
ifconfig lo up
ifconfig
cd /root
cd /root || exit
adbd&
sleep 1
@ -55,6 +55,13 @@ start() {
stop() {
printf "Stopping adbd: "
PROCESS=$(ps | grep -v grep | grep " adbd" | awk '{print $1}')
if [ ! -z "$PROCESS" ]; then
kill -9 $PROCESS
sleep 1
echo "" > /sys/kernel/config/usb_gadget/g_adb/UDC
fi
echo "OK"
}

View File

@ -0,0 +1,16 @@
examples/testd.c: As the C POSIX library recommends include the <unistd.h>
instead of <sys/unistd.h>. This removes an error when building libdaemon
against the musl C library.
Signed-off-by: Jörg Krause <jkrause@posteo.de>
--- libdaemon-0.14.orig/examples/testd.c 2014-08-30 00:27:08.359832977 +0200
+++ libdaemon-0.14/examples/testd.c 2014-08-30 00:27:25.439832670 +0200
@@ -23,7 +23,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
-#include <sys/unistd.h>
+#include <unistd.h>
#include <sys/select.h>
#include <libdaemon/dfork.h>

17
package/third-party/libdaemon/Config.in vendored Normal file
View File

@ -0,0 +1,17 @@
config BR2_PACKAGE_LIBDAEMON
bool "libdaemon"
# needs fork()
depends on BR2_USE_MMU
help
libdaemon is a lightweight C library that eases the
writing of UNIX daemons.
http://0pointer.de/lennart/projects/libdaemon/
if BR2_PACKAGE_LIBDAEMON
config BR2_PACKAGE_LIBDAEMON_USE_PREBUILT
bool "use prebuilt binary instead of building from source"
default y
endif

View File

@ -0,0 +1,3 @@
# Locally calculated
sha256 fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834 libdaemon-0.14.tar.gz
sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 LICENSE

View File

@ -0,0 +1,18 @@
################################################################################
#
# libdaemon
#
################################################################################
LIBDAEMON_VERSION = 0.14
LIBDAEMON_SITE = http://0pointer.de/lennart/projects/libdaemon
LIBDAEMON_LICENSE = LGPL-2.1+
LIBDAEMON_LICENSE_FILES = LICENSE
LIBDAEMON_CPE_ID_VENDOR = libdaemon_project
LIBDAEMON_INSTALL_STAGING = YES
LIBDAEMON_CONF_ENV = ac_cv_func_setpgrp_void=no
LIBDAEMON_CONF_OPTS = --disable-lynx
LIBDAEMON_DEPENDENCIES = host-pkgconf
$(eval $(autotools-package))

View File

@ -1,5 +0,0 @@
# From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum
sha512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a binutils-2.32.tar.xz
# Locally computed, same as binutils.hash
sha256 56bdea73b6145ef6ac5259b3da390b981d840c24cb03b8e1cbc678de7ecfa18d COPYING.LIB

View File

@ -1,32 +0,0 @@
################################################################################
#
# libiberty
#
################################################################################
LIBIBERTY_VERSION = 2.38
LIBIBERTY_SOURCE = binutils-$(LIBIBERTY_VERSION).tar.xz
LIBIBERTY_SITE = $(BR2_GNU_MIRROR)/binutils
HOST_LIBIBERTY_DL_SUBDIR = binutils
# We're only building libiberty here, not the full binutils suite
LIBIBERTY_LICENSE = LGPL-2.1+
LIBIBERTY_LICENSE_FILES = COPYING.LIB
LIBIBERTY_SUBDIR = libiberty
# We explicitly disable multilib, as we do in binutils.
# By default, libiberty installs nothing, so we must force it.
HOST_LIBIBERTY_CONF_OPTS = \
--disable-multilib \
--enable-install-libiberty
# Some packages (e.g. host-gdb) will pick this library and build shared
# objects with it. But libiberty does not honour the --enable-shared and
# --disable-static flags; it only ever builds a static library no matter
# what. So we must force -fPIC in build flags.
HOST_LIBIBERTY_CONF_ENV = \
CFLAGS="$(HOST_CFLAGS) -fPIC" \
LDFLAGS="$(HOST_LDFLAGS) -fPIC"
$(eval $(host-autotools-package))

14
package/third-party/libmodbus/Config.in vendored Normal file
View File

@ -0,0 +1,14 @@
menuconfig BR2_PACKAGE_LIBMODBUS
bool "libmodbus"
help
libmodbus is a free software library to send/receive data
according to the Modbus protocol. This library is written in C
and supports RTU (serial) and TCP (Ethernet) communications.
https://libmodbus.org
if BR2_PACKAGE_LIBMODBUS
config BR2_PACKAGE_LIBMODBUS_USE_PREBUILT
bool "use prebuilt binary instead of building from source"
default y
endif

View File

@ -0,0 +1,3 @@
# Locally computed
sha256 15b4b2e0f68122c2da9b195de5c330489a9c97d40b4a95d2822378dc14d780e7 libmodbus-3.1.11.tar.gz
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LESSER

View File

@ -0,0 +1,15 @@
################################################################################
#
# libmodbus
#
################################################################################
LIBMODBUS_VERSION = 3.1.11
LIBMODBUS_SITE = https://github.com/stephane/libmodbus/releases/download/v$(LIBMODBUS_VERSION)
LIBMODBUS_LICENSE = LGPL-2.1+
LIBMODBUS_LICENSE_FILES = COPYING.LESSER
LIBMODBUS_CPE_ID_VENDOR = libmodbus
LIBMODBUS_INSTALL_STAGING = YES
LIBMODBUS_CONF_OPTS = --disable-tests
$(eval $(autotools-package))

16
package/third-party/mpfr/Config.in vendored Normal file
View File

@ -0,0 +1,16 @@
menuconfig BR2_PACKAGE_MPFR
bool "mpfr"
select BR2_PACKAGE_GMP
help
C library for multiple-precision floating-point computations
with exact rounding.
http://www.mpfr.org/
if BR2_PACKAGE_MPFR
config BR2_PACKAGE_MPFR_USE_PREBUILT
bool "use prebuilt binary instead of building from source"
default y
endif

5
package/third-party/mpfr/mpfr.hash vendored Normal file
View File

@ -0,0 +1,5 @@
# Locally calculated
sha256 ffd195bd567dbaffc3b98b23fd00aad0537680c9896171e44fe3ff79e28ac33d mpfr-4.1.1.tar.xz
# Hash for license file
sha256 e3a994d82e644b03a792a930f574002658412f62407f5fee083f2555c5f23118 COPYING.LESSER

20
package/third-party/mpfr/mpfr.mk vendored Normal file
View File

@ -0,0 +1,20 @@
################################################################################
#
# mpfr
#
################################################################################
MPFR_VERSION = 4.1.1
MPFR_SITE = http://www.mpfr.org/mpfr-$(MPFR_VERSION)
MPFR_SOURCE = mpfr-$(MPFR_VERSION).tar.xz
MPFR_LICENSE = LGPL-3.0+
MPFR_LICENSE_FILES = COPYING.LESSER
MPFR_CPE_ID_VENDOR = mpfr
MPFR_CPE_ID_PRODUCT = gnu_mpfr
MPFR_INSTALL_STAGING = YES
MPFR_DEPENDENCIES = gmp
HOST_MPFR_DEPENDENCIES = host-gmp
MPFR_MAKE_OPTS = RANLIB=$(TARGET_RANLIB)
$(eval $(autotools-package))
$(eval $(host-autotools-package))

View File

@ -0,0 +1,66 @@
From 4142d0ccb91ef2a246a4042260a93a113e16d404 Mon Sep 17 00:00:00 2001
From: "huahui.mai" <huahui.mai@artinchip.com>
Date: Mon, 7 Apr 2025 15:38:51 +0800
Subject: [PATCH] Support ArtInChip Framebuffer rotate 0/90/180/270
---
src/gui/embedded/qscreen_qws.cpp | 36 ++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index 407366c0..57f1e122 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -590,6 +590,40 @@ void qt_solidFill_setup(QScreen *screen, const QColor &color,
screen->d_ptr->solidFill(screen, color, region);
}
+#include <linux/fb.h>
+static int g_fd = -1;
+static int g_rotate = -1;
+
+static void aic_fb_rotate(void)
+{
+ struct fb_var_screeninfo var = {0};
+ int zero = 0;
+
+ if (g_fd < 0) {
+ g_fd = open("/dev/fb0", O_RDWR);
+ if (g_fd < 0)
+ qFatal("open /dev/fb0 error\n");
+ }
+ if (g_rotate < 0) {
+ ioctl(g_fd, FBIOGET_VSCREENINFO, &var);
+ g_rotate = var.rotate;
+ }
+
+ if (g_rotate == 0)
+ return;
+
+ var.rotate = g_rotate;
+
+ if (ioctl(g_fd, FBIOPAN_DISPLAY, &var) == 0) {
+ if (ioctl(g_fd, FBIO_WAITFORVSYNC, &zero) < 0) {
+ qWarning("ioctl FBIO_WAITFORVSYNC fail\n");
+ return;
+ }
+ } else {
+ qWarning("pan display err\n");
+ }
+}
+
template <typename DST, typename SRC>
static void blit_template(QScreen *screen, const QImage &image,
const QPoint &topLeft, const QRegion &region)
@@ -619,6 +653,8 @@ static void blit_template(QScreen *screen, const QImage &image,
screenStride, imageStride);
}
}
+
+ aic_fb_rotate();
}
#ifdef QT_QWS_DEPTH_32
--
2.25.1

View File

@ -0,0 +1,5 @@
menuconfig BR2_PACKAGE_RTL8733BS_BT_FW
bool "RTL8733BS BT firmware"
default n

View File

@ -0,0 +1,12 @@
RTL8733BS_BT_FW_VERSION = 1.0
RTL8733BS_BT_FW_SOURCE = rtl8733bs_bt_fw-$(RTL8733BS_BT_FW_VERSION).tar.gz
RTL8733BS_BT_FW_SITE = rtl8733bs_bt_fw
RTL8733BS_BT_FW_ENABLE_TARBALL = YES
RTL8733BS_BT_FW_ENABLE_PATCH = NO
RTL8733BS_BT_FW_INSTALL_STAGING = YES
RTL8733BS_BT_FW_DEPENDENCIES = linux
RTL8733BS_BT_FW_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/lib/firmware
$(eval $(cmake-package))

View File

@ -0,0 +1,5 @@
menuconfig BR2_PACKAGE_RTL8733BU_BT_FW
bool "RTL8733bu BT firmware"
default n

View File

@ -0,0 +1,12 @@
RTL8733BU_BT_FW_VERSION = 1.0
RTL8733BU_BT_FW_SOURCE = rtl8733bu_bt_fw-$(RTL8733BU_BT_FW_VERSION).tar.gz
RTL8733BU_BT_FW_SITE = rtl8733bu_bt_fw
RTL8733BU_BT_FW_ENABLE_TARBALL = YES
RTL8733BU_BT_FW_ENABLE_PATCH = NO
RTL8733BU_BT_FW_INSTALL_STAGING = YES
RTL8733BU_BT_FW_DEPENDENCIES = linux
RTL8733BU_BT_FW_CONF_OPTS += -DCMAKE_INSTALL_PREFIX=/lib/firmware
$(eval $(cmake-package))

View File

@ -5,4 +5,5 @@ devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
tmpfs /mnt tmpfs mode=1777 0 0
sysfs /sys sysfs defaults 0 0

View File

@ -6,7 +6,7 @@ if [ "$1" == "gotobl" ]; then
# Goto U-Boot upgmode
UPGVAL=2
fi
cd /sys/devices/platform/soc/*.rtc
cd /sys/devices/platform/soc/*.wri || exit
echo "$UPGVAL" > aicupg
echo Will reboot after 3 seconds ...

View File

@ -0,0 +1,15 @@
#!/bin/sh
if [ $# -ne 2 ]; then
echo Please input as follow:
echo " $0 PhyAddress Value"
exit 1
fi
which devmem > /dev/null
if [ $? -ne 0 ]; then
pr_err "The command 'devmem' does not exist!"
exit 100
fi
devmem $1 32 $2

Binary file not shown.

View File

@ -0,0 +1,21 @@
#!/bin/sh
if [ $# -eq 1 ]; then
ADDR=$1
CNT=16
elif [ $# -eq 2 ]; then
ADDR=$1
CNT=$2
elif [ $# -ne 2 ]; then
echo Please input as follow:
echo " $0 PhyAddress Len"
exit 1
fi
which reg-dump > /dev/null
if [ $? -ne 0 ]; then
pr_err "The command 'reg-dump' does not exist!"
exit 100
fi
reg-dump -a $ADDR -c $CNT

16
package/third-party/tcpdump/Config.in vendored Normal file
View File

@ -0,0 +1,16 @@
config BR2_PACKAGE_TCPDUMP
bool "tcpdump"
select BR2_PACKAGE_LIBPCAP
help
A tool for network monitoring and data acquisition.
http://www.tcpdump.org/
if BR2_PACKAGE_TCPDUMP
config BR2_PACKAGE_TCPDUMP_SMB
bool "smb dump support"
help
enable possibly-buggy SMB printer
endif

View File

@ -0,0 +1,5 @@
# Locally calculated after checking pgp signature at
# https://www.tcpdump.org/release/tcpdump-4.99.0.tar.gz.sig
# using key 1F166A5742ABB9E0249A8D30E089DEF1D9C15D0D
sha256 8cf2f17a9528774a7b41060323be8b73f76024f7778f59c34efa65d49d80b842 tcpdump-4.99.0.tar.gz
sha256 8a54594d257e14a5260ac770f1633516cb51e3fc28c40136ce2697014eda7afd LICENSE

30
package/third-party/tcpdump/tcpdump.mk vendored Normal file
View File

@ -0,0 +1,30 @@
################################################################################
#
# tcpdump
#
################################################################################
TCPDUMP_VERSION = 4.99.0
TCPDUMP_SITE = https://www.tcpdump.org/release
TCPDUMP_LICENSE = BSD-3-Clause
TCPDUMP_LICENSE_FILES = LICENSE
TCPDUMP_CPE_ID_VENDOR = tcpdump
TCPDUMP_CONF_ENV = \
ac_cv_linux_vers=2 \
td_cv_buggygetaddrinfo=no \
PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config
TCPDUMP_CONF_OPTS = \
--without-crypto \
--disable-local-libpcap \
$(if $(BR2_PACKAGE_TCPDUMP_SMB),--enable-smb,--disable-smb)
TCPDUMP_DEPENDENCIES = libpcap host-pkgconf
TCPDUMP_SELINUX_MODULES = netutils
# make install installs an unneeded extra copy of the tcpdump binary
define TCPDUMP_REMOVE_DUPLICATED_BINARY
rm -f $(TARGET_DIR)/usr/bin/tcpdump.$(TCPDUMP_VERSION)
endef
TCPDUMP_POST_INSTALL_TARGET_HOOKS += TCPDUMP_REMOVE_DUPLICATED_BINARY
$(eval $(autotools-package))

14
package/third-party/v4l-utils/Config.in vendored Normal file
View File

@ -0,0 +1,14 @@
menuconfig BR2_PACKAGE_V4L_UTILS
bool "V4L utils"
default n
help
Linux utilities and libraries to handle media devices
(TV devices, capture devices, radio devices, remote controllers).
http://git.linuxtv.org/v4l-utils.git
if BR2_PACKAGE_V4L_UTILS
config BR2_PACKAGE_V4L_UTILS_USE_PREBUILT
bool "use prebuilt binary instead of building from source"
default y
endif

Some files were not shown because too many files have changed in this diff Show More