Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
From e75d656e1e3465dea1fdf605cb8fe7e25286bdd3 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 12 May 2024 18:29:09 +0200
|
||||
Subject: [PATCH] tftpd_pcre.c: fix build with pcre2 >= 10.43
|
||||
|
||||
Fix the following build failure raised since pcre2 >= 10.43 and
|
||||
https://github.com/PCRE2Project/pcre2/commit/014c82d7bcc2873cdb1f3abc5e5348587f477ba4:
|
||||
|
||||
tftpd_pcre.c: In function 'tftpd_pcre_open':
|
||||
tftpd_pcre.c:109:37: error: passing argument 1 of 'pcre2_substring_list_free_8' from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
109 | pcre2_substring_list_free((const PCRE2_UCHAR **)substrlist);
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
| |
|
||||
| const PCRE2_UCHAR8 ** {aka const unsigned char **}
|
||||
In file included from tftpd_pcre.h:24,
|
||||
from tftpd_pcre.c:35:
|
||||
/home/autobuild/autobuild/instance-10/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/include/pcre2.h:949:1: note: expected 'PCRE2_UCHAR8 **' {aka 'unsigned char **'} but argument is of type 'const PCRE2_UCHAR8 **' {aka 'const unsigned char **'}
|
||||
949 | PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
|
||||
| ^
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/46565c834a8162a651944885104027610a65f9c3
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Upstream: https://github.com/madmartin/atftp/pull/1
|
||||
---
|
||||
tftpd_pcre.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tftpd_pcre.c b/tftpd_pcre.c
|
||||
index 24b2770..7b3d0e3 100644
|
||||
--- a/tftpd_pcre.c
|
||||
+++ b/tftpd_pcre.c
|
||||
@@ -106,7 +106,7 @@ tftpd_pcre_self_t *tftpd_pcre_open(char *filename)
|
||||
logger(LOG_DEBUG,"file: %s line: %d substring: %d value: %s",
|
||||
filename, linecount, subnum, substrlist[subnum]);
|
||||
}
|
||||
- pcre2_substring_list_free((const PCRE2_UCHAR **)substrlist);
|
||||
+ pcre2_substring_list_free(substrlist);
|
||||
|
||||
if (matches != 3)
|
||||
{
|
||||
--
|
||||
2.43.0
|
||||
|
||||
14
package/atftp/Config.in
Normal file
14
package/atftp/Config.in
Normal file
@@ -0,0 +1,14 @@
|
||||
config BR2_PACKAGE_ATFTP
|
||||
bool "atftp"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
help
|
||||
atftp is a client/server implementation of the TFTP
|
||||
protocol that implements RFCs 1350, 2090, 2347, 2348,
|
||||
and 2349. The server is multi-threaded and the client
|
||||
presents a friendly interface using libreadline
|
||||
(if enabled).
|
||||
|
||||
http://sourceforge.net/projects/atftp/
|
||||
|
||||
comment "atftp needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
50
package/atftp/S80atftpd
Normal file
50
package/atftp/S80atftpd
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="atftpd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
ATFTPD_ARGS="--user root.root /tftpboot"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" -- \
|
||||
--daemon --pidfile="$PIDFILE" $ATFTPD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
3
package/atftp/atftp.hash
Normal file
3
package/atftp/atftp.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 df2aa089c7670f9eab40e5598e5d2cb6a582dc5182926ea50b4d690e4e37f316 atftp-0.8.0.tar.gz
|
||||
sha256 86dc744860e6dfacfeba2f33fea908db03fe67c7e37a878285b7aae8e4596735 LICENSE
|
||||
44
package/atftp/atftp.mk
Normal file
44
package/atftp/atftp.mk
Normal file
@@ -0,0 +1,44 @@
|
||||
################################################################################
|
||||
#
|
||||
# atftp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ATFTP_VERSION = 0.8.0
|
||||
ATFTP_SITE = http://sourceforge.net/projects/atftp/files
|
||||
ATFTP_LICENSE = GPL-2.0+
|
||||
ATFTP_LICENSE_FILES = LICENSE
|
||||
ATFTP_CPE_ID_VALID = YES
|
||||
ATFTP_SELINUX_MODULES = tftp
|
||||
# No configure in tarball
|
||||
ATFTP_AUTORECONF = YES
|
||||
ATFTP_CONF_OPTS = --disable-libwrap --disable-mtftp
|
||||
# For static we need to explicitly link against libpthread
|
||||
ATFTP_LIBS = -lpthread
|
||||
# -fgnu89-inline is needed to avoid multiple definition error with gcc 5. See
|
||||
# https://gcc.gnu.org/gcc-5/porting_to.html.
|
||||
ATFTP_CONF_ENV = LIBS="$(ATFTP_LIBS)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -fgnu89-inline"
|
||||
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
ATFTP_DEPENDENCIES += readline
|
||||
ATFTP_CONF_OPTS += --enable-libreadline
|
||||
# For static, readline links with ncurses
|
||||
ATFTP_LIBS += -lncurses
|
||||
else
|
||||
ATFTP_CONF_OPTS += --disable-libreadline
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PCRE2),y)
|
||||
ATFTP_DEPENDENCIES += pcre2
|
||||
ATFTP_CONF_OPTS += --enable-libpcre
|
||||
else
|
||||
ATFTP_CONF_OPTS += --disable-libpcre
|
||||
endif
|
||||
|
||||
define ATFTP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D package/atftp/S80atftpd \
|
||||
$(TARGET_DIR)/etc/init.d/S80atftpd
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user