mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
25
package/frr/Config.in
Normal file
25
package/frr/Config.in
Normal file
@@ -0,0 +1,25 @@
|
||||
config BR2_PACKAGE_FRR
|
||||
bool "frr"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS # libyang
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
|
||||
select BR2_PACKAGE_BASH
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
|
||||
select BR2_PACKAGE_C_ARES
|
||||
select BR2_PACKAGE_LIBYANG
|
||||
select BR2_PACKAGE_LIBNL
|
||||
select BR2_PACKAGE_READLINE
|
||||
select BR2_PACKAGE_JSON_C
|
||||
help
|
||||
The FRRouting Protocol Suite.
|
||||
|
||||
FRR is free software that implements and manages various
|
||||
IPv4 and IPv6 routing protocols.
|
||||
|
||||
https://frrouting.org
|
||||
|
||||
comment "frr needs a toolchain w/ threads, dynamic library"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
46
package/frr/S50frr
Normal file
46
package/frr/S50frr
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="frr"
|
||||
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
install -m 755 -o frr -g frr -d /var/run/frr
|
||||
install -m 755 -o frr -g frr -d /var/log/frr
|
||||
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
/usr/sbin/frrinit.sh start
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
/usr/sbin/frrinit.sh stop
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
3
package/frr/frr.hash
Normal file
3
package/frr/frr.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 3c8204fda1c9b178d8446562579bbbc49d134b98f3ad02aa56f68724a2f9e40a frr-7.4.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
70
package/frr/frr.mk
Normal file
70
package/frr/frr.mk
Normal file
@@ -0,0 +1,70 @@
|
||||
################################################################################
|
||||
#
|
||||
# frr
|
||||
#
|
||||
################################################################################
|
||||
|
||||
FRR_VERSION = 7.4
|
||||
FRR_SITE = $(call github,FRRouting,frr,frr-$(FRR_VERSION))
|
||||
FRR_LICENSE = GPL-2.0
|
||||
FRR_LICENSE_FILES = COPYING
|
||||
FRR_AUTORECONF = YES
|
||||
|
||||
FRR_DEPENDENCIES = host-frr readline json-c \
|
||||
libyang libnl c-ares
|
||||
|
||||
HOST_FRR_DEPENDENCIES = host-flex host-bison host-python3
|
||||
|
||||
FRR_CONF_OPTS = --with-clippy=$(HOST_DIR)/bin/clippy \
|
||||
--sysconfdir=/etc/frr \
|
||||
--localstatedir=/var/run/frr \
|
||||
--with-moduledir=/usr/lib/frr/modules \
|
||||
--enable-configfile-mask=0640 \
|
||||
--enable-logfile-mask=0640 \
|
||||
--enable-multipath=256 \
|
||||
--disable-ospfclient \
|
||||
--enable-shell-access \
|
||||
--enable-user=frr \
|
||||
--enable-group=frr \
|
||||
--enable-vty-group=frrvty \
|
||||
--disable-capabilities \
|
||||
--enable-fpm
|
||||
|
||||
HOST_FRR_CONF_OPTS = --enable-clippy-only
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
FRR_CONF_ENV += LIBS=-latomic
|
||||
endif
|
||||
|
||||
define HOST_FRR_INSTALL_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/lib/clippy $(HOST_DIR)/bin/clippy
|
||||
endef
|
||||
|
||||
define FRR_INSTALL_CONFIG_FILES
|
||||
$(foreach f,daemons daemons.conf frr.conf vtysh.conf support_bundle_commands.conf,\
|
||||
$(INSTALL) -D -m 0640 $(@D)/tools/etc/frr/$(f) \
|
||||
$(TARGET_DIR)/etc/frr/$(f)
|
||||
)
|
||||
$(RM) $(TARGET_DIR)/etc/frr/*.sample
|
||||
endef
|
||||
FRR_POST_INSTALL_TARGET_HOOKS += FRR_INSTALL_CONFIG_FILES
|
||||
|
||||
define FRR_PERMISSIONS
|
||||
/etc/frr/daemons f 640 frr frr - - - - -
|
||||
/etc/frr/daemons.conf f 640 frr frr - - - - -
|
||||
/etc/frr/frr.conf f 640 frr frr - - - - -
|
||||
/etc/frr/vtysh.conf f 640 frr frrvty - - - - -
|
||||
/etc/frr/support_bundle_commands.conf f 640 frr frr
|
||||
endef
|
||||
|
||||
define FRR_USERS
|
||||
frr -1 frr -1 * /var/run/frr - frrvty FRR user priv
|
||||
endef
|
||||
|
||||
define FRR_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 755 $(FRR_PKGDIR)/S50frr \
|
||||
$(TARGET_DIR)/etc/init.d/S50frr
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user