Initial Commit
- initial default booting image
This commit is contained in:
33
package/cfm/0001-CMakeLists-fix-build-with-cmake-4.patch
Normal file
33
package/cfm/0001-CMakeLists-fix-build-with-cmake-4.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From d2a823ef01396cd148074a99ccbbf1ca1115b24d Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd@kuhls.net>
|
||||
Date: Sat, 3 Jan 2026 14:56:38 +0100
|
||||
Subject: [PATCH] CMakeLists: fix build with cmake 4
|
||||
|
||||
Using CMake 4 the build is broken:
|
||||
|
||||
CMake Error at CMakeLists.txt:6 (cmake_minimum_required):
|
||||
Compatibility with CMake < 3.5 has been removed from CMake.
|
||||
|
||||
Upstream: https://github.com/microchip-ung/cfm/pull/1
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5de2e0a..378e98d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
project (cfm C)
|
||||
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
## libnl ################################################
|
||||
find_path(LibNL_INCLUDE_DIR netlink/netlink.h
|
||||
--
|
||||
2.47.3
|
||||
|
||||
17
package/cfm/Config.in
Normal file
17
package/cfm/Config.in
Normal file
@@ -0,0 +1,17 @@
|
||||
config BR2_PACKAGE_CFM
|
||||
bool "cfm"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
|
||||
select BR2_PACKAGE_LIBEV
|
||||
select BR2_PACKAGE_LIBMNL
|
||||
select BR2_PACKAGE_LIBNL
|
||||
help
|
||||
This is the userspace application that configures the kernel
|
||||
to run CFM protocol. The userspace application is made of 2
|
||||
applications, one daemon and a client.
|
||||
|
||||
https://github.com/microchip-ung/cfm
|
||||
|
||||
comment "cfm needs a toolchain w/ threads, kernel headers >= 5.0"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
|
||||
55
package/cfm/S65cfm
Normal file
55
package/cfm/S65cfm
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start cfm
|
||||
#
|
||||
|
||||
DAEMON="cfm_server"
|
||||
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/cfm_server" ] && . "/etc/default/cfm_server"
|
||||
|
||||
start() {
|
||||
printf "Starting cfm daemon: "
|
||||
start-stop-daemon -S -b -q -m -p $PIDFILE \
|
||||
-x /usr/bin/$DAEMON
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping cfm daemon: "
|
||||
start-stop-daemon -K -q -p $PIDFILE
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
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
|
||||
|
||||
exit $?
|
||||
3
package/cfm/cfm.hash
Normal file
3
package/cfm/cfm.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# locally calculated
|
||||
sha256 b5ce096e8c496c397d108201f1a46855f735da6c4163b7a9af345916e75a7126 cfm-0.3.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE
|
||||
24
package/cfm/cfm.mk
Normal file
24
package/cfm/cfm.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
################################################################################
|
||||
#
|
||||
# cfm
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CFM_VERSION = 0.3
|
||||
CFM_SITE = $(call github,microchip-ung,cfm,v$(CFM_VERSION))
|
||||
CFM_DEPENDENCIES = libev libmnl libnl
|
||||
CFM_LICENSE = GPL-2.0
|
||||
CFM_LICENSE_FILES = LICENSE
|
||||
CFM_INSTALL_STAGING = YES
|
||||
|
||||
define CFM_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D $(CFM_PKGDIR)/S65cfm \
|
||||
$(TARGET_DIR)/etc/init.d/S65cfm
|
||||
endef
|
||||
|
||||
define CFM_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(CFM_PKGDIR)/cfm.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/cfm.service
|
||||
endef
|
||||
|
||||
$(eval $(cmake-package))
|
||||
10
package/cfm/cfm.service
Normal file
10
package/cfm/cfm.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Connectivity Fault Management
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/cfm_server
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user