Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
From 0a847ca035113540ee44d17f364bf4701fe78355 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 1 Mar 2024 22:31:05 +0100
Subject: [PATCH] agent/tcf/services/tcf_elf.c: fix x86 build
Fix the following x86 build failure raised since version 1.8.0 and
https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/commit/8df5540c53b862d516ac25f908c2fff4a547b4a6:
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c: In function 'unpack_elf_symbol_info':
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2079:27: error: 'STT_ARM_16BIT' undeclared (first use in this function)
2079 | if (info->type == STT_ARM_16BIT) {
| ^~~~~~~~~~~~~
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2079:27: note: each undeclared identifier is reported only once for each function it appears in
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c: In function 'create_symbol_addr_search_index':
/home/buildroot/autobuild/run/instance-1/output-1/build/tcf-agent-1.8.0/agent/tcf/services/tcf_elf.c:2228:78: error: 'STT_ARM_16BIT' undeclared (first use in this function)
2228 | if (type == STT_FUNC || type == STT_ARM_TFUNC || type == STT_ARM_16BIT) {
| ^~~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/8388acf59689ed7e621bdf158483e3df1cf9bef7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://gitlab.eclipse.org/eclipse/tcf/tcf.agent/-/merge_requests/1
---
agent/tcf/services/tcf_elf.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/agent/tcf/services/tcf_elf.c b/agent/tcf/services/tcf_elf.c
index 1b3900ec..b0b948e4 100644
--- a/agent/tcf/services/tcf_elf.c
+++ b/agent/tcf/services/tcf_elf.c
@@ -2076,10 +2076,12 @@ void unpack_elf_symbol_info(ELF_Section * sym_sec, U4_T index, ELF_SymbolInfo *
}
if (file->machine == EM_ARM) {
+#ifdef STT_ARM_16BIT
if (info->type == STT_ARM_16BIT) {
info->type = STT_OBJECT;
info->type16bit = 1;
}
+#endif
if (info->type == STT_ARM_TFUNC) {
info->type = STT_FUNC;
info->type16bit = 1;
@@ -2225,7 +2227,11 @@ static void create_symbol_addr_search_index(ELF_Section * sec) {
}
add = add && type != STT_GNU_IFUNC;
if (add && file->machine == EM_ARM) {
- if (type == STT_FUNC || type == STT_ARM_TFUNC || type == STT_ARM_16BIT) {
+ if (type == STT_FUNC || type == STT_ARM_TFUNC
+#ifdef STT_ARM_16BIT
+ || type == STT_ARM_16BIT
+#endif
+ ) {
addr = addr & ~(U8_T)1;
}
}
--
2.43.0

View File

@@ -0,0 +1,27 @@
From a78007cd139e1dea3d893f5fe1d1c3a47503e6a2 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Sat, 12 Aug 2023 18:27:02 +0200
Subject: [PATCH] fix uClibc-ng compile
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Upstream: N/A only mail available
---
agent/machine/arm/tcf/cpudefs-mdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agent/machine/arm/tcf/cpudefs-mdep.c b/agent/machine/arm/tcf/cpudefs-mdep.c
index 051631a0..7c4fbf3e 100644
--- a/agent/machine/arm/tcf/cpudefs-mdep.c
+++ b/agent/machine/arm/tcf/cpudefs-mdep.c
@@ -21,7 +21,7 @@
#ifndef USE_getauxval
# include <features.h>
-# define USE_getauxval (defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)))
+# define USE_getauxval (defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) || (defined(__UCLIBC__) && defined(__HAVE_SHARED__)))
#endif
#include <stddef.h>
--
2.39.2

View File

@@ -0,0 +1,41 @@
config BR2_PACKAGE_TCF_AGENT
bool "tcf-agent"
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS
depends on BR2_USE_MMU # util-linux
select BR2_PACKAGE_UTIL_LINUX
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Target Communication Framework Agent is an example
application using the Target Communication Framework
Library.
Target Communication Framework is universal, extensible,
simple, lightweight, vendor agnostic framework for tools and
targets to communicate for purpose of debugging, profiling,
code patching and other device software development needs.
tcf-agent is a daemon, which provides TCF services that can
be used by local and remote clients.
https://wiki.eclipse.org/TCF
config BR2_PACKAGE_TCF_AGENT_ARCH
string
default "arm" if BR2_arm || BR2_armeb
default "a64" if BR2_aarch64 || BR2_aarch64_be
default "i686" if BR2_i386 && BR2_ARCH="i686"
default "i386" if BR2_i386 && !BR2_ARCH="i686"
default "x86_64" if BR2_x86_64
default "powerpc" if BR2_powerpc || BR2_powerpc64 || \
BR2_powerpc64le
default "microblaze" if BR2_microblaze || BR2_microblazeel
config BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS
bool
default y if BR2_PACKAGE_TCF_AGENT_ARCH != ""
comment "tcf-agent needs a toolchain w/ threads"
depends on BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -0,0 +1,40 @@
#!/bin/sh
DAEMON_PATH=/usr/sbin/tcf-agent
DAEMON_NAME=tcf-agent
DAEMON_ARGS="-L- -l0"
PIDFILE=/var/run/$DAEMON_NAME.pid
[ -r /etc/default/$DAEMON_NAME ] && . /etc/default/$DAEMON_NAME
start() {
printf "Starting $DAEMON_NAME: "
start-stop-daemon -S -o -q -p $PIDFILE -m -b \
-x $DAEMON_PATH -- $DAEMON_ARGS
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping $DAEMON_NAME: "
start-stop-daemon -K -o -q -p $PIDFILE \
-x $DAEMON_PATH
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

View File

@@ -0,0 +1,5 @@
# Locally computed:
sha256 64131790c7d4636d4abff8516d5b4b6329e4d3e691f44dc604e2c30f55edb0dd org.eclipse.tcf.agent-1.8.0.tar.xz
# Hash for license files:
sha256 f82d01b74a513bd3504d08136026a5ac2a7e6ff62ebcde391fa74aa222d11ce0 agent/edl-v10.html

View File

@@ -0,0 +1,40 @@
################################################################################
#
# tcf-agent
#
################################################################################
TCF_AGENT_VERSION = 1.8.0
TCF_AGENT_SOURCE = org.eclipse.tcf.agent-$(TCF_AGENT_VERSION).tar.xz
TCF_AGENT_SITE = http://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/snapshot
# see https://wiki.spdx.org/view/Legal_Team/License_List/Licenses_Under_Consideration
TCF_AGENT_LICENSE = BSD-3-Clause
TCF_AGENT_LICENSE_FILES = agent/edl-v10.html
TCF_AGENT_DEPENDENCIES = util-linux
TCF_AGENT_SUBDIR = agent
# there is not much purpose for the shared lib,
# it will not be used (unmodified) outside the tcf-agent application
TCF_AGENT_CONF_OPTS = \
-DBUILD_SHARED_LIBS=OFF \
-DTCF_MACHINE=$(call qstrip,$(BR2_PACKAGE_TCF_AGENT_ARCH))
# tcf-agent uses some arm instructions in case getauxval is not available.
# unfortunately the uClibc-ng implementation of getauxval uses some features
# of ld.so to work
ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_USES_UCLIBC)$(BR2_ARM_INSTRUCTIONS_THUMB),yyy)
TCF_AGENT_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -marm"
endif
define TCF_AGENT_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/tcf-agent/tcf-agent.service \
$(TARGET_DIR)/usr/lib/systemd/system/tcf-agent.service
endef
define TCF_AGENT_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/tcf-agent/S55tcf-agent \
$(TARGET_DIR)/etc/init.d/S55tcf-agent
endef
$(eval $(cmake-package))

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Target Communication Framework Agent
After=network.target
[Service]
ExecStart=/usr/sbin/tcf-agent -L- -l0
[Install]
WantedBy=multi-user.target