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,34 @@
comment "netopeer2 needs a toolchain w/ gcc >= 4.8, C++, threads, dynamic library"
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
config BR2_PACKAGE_NETOPEER2
bool "netopeer2"
depends on BR2_USE_MMU # libnetconf2, sysrepo
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
depends on !BR2_STATIC_LIBS # libnetconf2, libyang, sysrepo
depends on BR2_INSTALL_LIBSTDCPP # sysrepo
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # sysrepo
select BR2_PACKAGE_LIBNETCONF2
select BR2_PACKAGE_LIBNETCONF2_SSH_TLS
select BR2_PACKAGE_LIBYANG
select BR2_PACKAGE_SYSREPO
help
Netopeer2 is a set of tools implementing network configuration
tools based on the NETCONF Protocol.
This is the server part.
https://github.com/CESNET/Netopeer2
if BR2_PACKAGE_NETOPEER2
config BR2_PACKAGE_NETOPEER2_CLI
bool "cli"
help
Enable netopeer2 CLI.
endif

View File

@@ -0,0 +1,50 @@
#!/bin/sh
DAEMON="netopeer2-server"
PIDFILE="/var/run/$DAEMON.pid"
NETOPEER2_SERVER_ARGS=""
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon -S -q -p $PIDFILE -x "/usr/sbin/$DAEMON" \
-- $NETOPEER2_SERVER_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
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
reload() {
# we do not support real reload .. just restart
restart
}
case "$1" in
start|stop|restart|reload)
"$1";;
*)
echo "Usage: $0 {start|stop|restart|reload}"
esac

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 63d42493752062e7dfb3d3aca9c4157f49298401bdc5cd5166975f2cbc5f6f1b netopeer2-2.4.5.tar.gz
sha256 b46f161fbdcf127d3ef22602e15958c3092fe3294f71a2dc8cdf8f6689cba95b LICENSE

View File

@@ -0,0 +1,46 @@
################################################################################
#
# netopeer2
#
################################################################################
NETOPEER2_VERSION = 2.4.5
NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION))
NETOPEER2_DL_SUBDIR = netopeer2
NETOPEER2_LICENSE = BSD-3-Clause
NETOPEER2_LICENSE_FILES = LICENSE
NETOPEER2_DEPENDENCIES = libnetconf2 libyang sysrepo host-sysrepo
ifeq ($(BR2_INIT_SYSTEMD),y)
NETOPEER2_DEPENDENCIES += systemd
endif
NETOPEER2_CONF_OPTS = \
-DBUILD_CLI=$(if $(BR2_PACKAGE_NETOPEER2_CLI),ON,OFF) \
-DENABLE_TESTS=OFF
# Set a build specific SYSREPO_SHM_PREFIX to ensure we can safely delete the
# files. This also ensures that concurrent parallel builds will not be
# affected mutualy.
NETOPEER2_SYSREPO_SHM_PREFIX = sr_buildroot$(subst /,_,$(CONFIG_DIR))_netopeer2
NETOPEER2_MAKE_ENV = \
SYSREPOCTL_EXECUTABLE=$(HOST_DIR)/bin/sysrepoctl \
SYSREPO_SHM_PREFIX=$(NETOPEER2_SYSREPO_SHM_PREFIX)
define NETOPEER2_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D $(NETOPEER2_PKGDIR)/S52netopeer2-server \
$(TARGET_DIR)/etc/init.d/S52netopeer2-server
endef
# The host sysrepo used to install the netopeer2 modules will leave
# its shared memory files lingering about. Clean up in its stead...
# We need to clean up both before and after installation, to catch
# the case of a previous build that failed before we run that hook.
define NETOPEER2_CLEANUP
rm -f /dev/shm/$(NETOPEER2_SYSREPO_SHM_PREFIX)*
endef
NETOPEER2_PRE_INSTALL_TARGET_HOOKS += NETOPEER2_CLEANUP
NETOPEER2_POST_INSTALL_TARGET_HOOKS += NETOPEER2_CLEANUP
$(eval $(cmake-package))