Initial Commit
- initial default booting image
This commit is contained in:
70
package/frr/Config.in
Normal file
70
package/frr/Config.in
Normal file
@@ -0,0 +1,70 @@
|
||||
config BR2_PACKAGE_FRR
|
||||
bool "frr"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # pthread
|
||||
depends on !BR2_STATIC_LIBS # libyang
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c, libyang
|
||||
select BR2_PACKAGE_BASH
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
|
||||
select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
|
||||
select BR2_PACKAGE_LIBYANG
|
||||
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
|
||||
|
||||
if BR2_PACKAGE_FRR
|
||||
|
||||
config BR2_PACKAGE_FRR_BFD
|
||||
bool "BFD protocol"
|
||||
default y
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10
|
||||
help
|
||||
Build Bidirectional Forwarding Detection daemon.
|
||||
|
||||
config BR2_PACKAGE_FRR_BMP
|
||||
bool "BMP protocol"
|
||||
select BR2_PACKAGE_C_ARES
|
||||
help
|
||||
Build BGP Monitoring Protocol daemon.
|
||||
|
||||
config BR2_PACKAGE_FRR_MULTIPATH_MAX
|
||||
int "maximum ECMP paths"
|
||||
default 256
|
||||
range 1 999
|
||||
help
|
||||
Compile FRR with support for up to this many equal-cost
|
||||
next-hops (ECMP).
|
||||
|
||||
config BR2_PACKAGE_FRR_NHRPD
|
||||
bool "NHRPD protocol"
|
||||
select BR2_PACKAGE_C_ARES
|
||||
help
|
||||
Build Next Hop Routing Protocol daemon.
|
||||
|
||||
config BR2_PACKAGE_FRR_PROTOBUF
|
||||
bool "Protobuf support (Binary-FPM and MLAG)"
|
||||
default y
|
||||
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
|
||||
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
|
||||
depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
|
||||
select BR2_PACKAGE_PROTOBUF_C
|
||||
help
|
||||
Build FRR with protobuf-based Binary-FPM export and MLAG
|
||||
peer synchronization.
|
||||
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
comment "protobuf support for frr needs a toolchain w/ protobuf, C++, host gcc >= 7"
|
||||
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_7
|
||||
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
|
||||
11
package/frr/frr.hash
Normal file
11
package/frr/frr.hash
Normal file
@@ -0,0 +1,11 @@
|
||||
# Locally calculated
|
||||
sha256 5c56b27756854b8d0a62b3e152d3f9ea08091851b2d686e140fdfb95cd88f612 frr-10.7.0.tar.gz
|
||||
sha256 7bf053957d6c38e39a06a112c60ff35b228d3bd03edbe8c9a03508b051128d16 COPYING
|
||||
sha256 f9e0c21faf738da586281c0beaad3cd56204c19085a10fe05e4d3d7f8b5863d2 doc/licenses/BSD-2-Clause
|
||||
sha256 aca297b8fd3a43e3bb200f1e2e043c0db6c897325f5ff7f23f7530302a6bf713 doc/licenses/BSD-3-Clause
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 doc/licenses/GPL-2.0
|
||||
sha256 6d80da3224cbdcf016ea554e00fc9cd933bd1a3417cb5e5b7abf59f6d126761d doc/licenses/ISC
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 doc/licenses/LGPL-2.1
|
||||
sha256 2a1124bf8bc60f1f59b67e15e3d261b5d60fcd9674a3eace0a5502fd4287d528 doc/licenses/LicenseRef-Skiplist-BSD-0-Clause
|
||||
sha256 074415b57c6ba1780483d89e55f40dec3ded96c28aaf47d63c486683ba553e7c doc/licenses/MIT
|
||||
sha256 b5065838cbac452dfc855ba6e6e031481ad2c68406f70d21ead9321374653e6c doc/licenses/Unlicense
|
||||
142
package/frr/frr.mk
Normal file
142
package/frr/frr.mk
Normal file
@@ -0,0 +1,142 @@
|
||||
################################################################################
|
||||
#
|
||||
# frr
|
||||
#
|
||||
################################################################################
|
||||
|
||||
FRR_VERSION = 10.7.0
|
||||
FRR_SITE = $(call github,FRRouting,frr,frr-$(FRR_VERSION))
|
||||
FRR_LICENSE = GPL-2.0+
|
||||
FRR_LICENSE_FILES = \
|
||||
COPYING \
|
||||
doc/licenses/BSD-2-Clause \
|
||||
doc/licenses/BSD-3-Clause \
|
||||
doc/licenses/GPL-2.0 \
|
||||
doc/licenses/ISC \
|
||||
doc/licenses/LGPL-2.1 \
|
||||
doc/licenses/LicenseRef-Skiplist-BSD-0-Clause \
|
||||
doc/licenses/MIT \
|
||||
doc/licenses/Unlicense
|
||||
# tools/gcc-plugins/frr-format.[ch] is not enabled by frr's ./configure, so gcc's
|
||||
# GPLv3 does not apply
|
||||
# doc/licenses/GPL-3.0
|
||||
FRR_CPE_ID_VENDOR = frrouting
|
||||
FRR_CPE_ID_PRODUCT = frrouting
|
||||
FRR_AUTORECONF = YES
|
||||
FRR_INSTALL_STAGING = YES
|
||||
|
||||
FRR_DEPENDENCIES = host-frr readline json-c libyang \
|
||||
$(if $(BR2_PACKAGE_C_ARES),c-ares) \
|
||||
$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt)
|
||||
|
||||
HOST_FRR_DEPENDENCIES = host-flex host-bison host-elfutils host-python3
|
||||
|
||||
FRR_CONF_ENV = \
|
||||
ac_cv_lib_cunit_CU_initialize_registry=no \
|
||||
CFLAGS="$(TARGET_CFLAGS) -DFRR_XREF_NO_NOTE"
|
||||
|
||||
# Do not enable -fplugin=frr-format for production, see doc/developer/workflow.rst,
|
||||
# it is only intended for FRR's developments
|
||||
FRR_CONF_OPTS = --with-clippy=$(HOST_DIR)/bin/clippy \
|
||||
--with-moduledir=/usr/lib/frr/modules \
|
||||
--enable-configfile-mask=0640 \
|
||||
--enable-logfile-mask=0640 \
|
||||
--enable-multipath=$(BR2_PACKAGE_FRR_MULTIPATH_MAX) \
|
||||
--disable-ospfclient \
|
||||
--enable-user=frr \
|
||||
--enable-group=frr \
|
||||
--enable-vty-group=frrvty \
|
||||
--enable-fpm
|
||||
|
||||
HOST_FRR_CONF_OPTS = --enable-clippy-only
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FRR_BMP),y)
|
||||
FRR_CONF_OPTS += --enable-bgp-bmp
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-bgp-bmp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FRR_NHRPD),y)
|
||||
FRR_CONF_OPTS += --enable-nhrpd
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-nhrpd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
||||
FRR_DEPENDENCIES += libcap
|
||||
FRR_CONF_OPTS += --enable-capabilities
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-capabilities
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQLITE),y)
|
||||
FRR_DEPENDENCIES += sqlite
|
||||
FRR_CONF_OPTS += --enable-config-rollbacks
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-config-rollbacks
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZEROMQ),y)
|
||||
FRR_DEPENDENCIES += zeromq
|
||||
FRR_CONF_OPTS += --enable-zeromq
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-zeromq
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FRR_BFD),y)
|
||||
FRR_CONF_OPTS += --enable-bfdd
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-bfdd
|
||||
endif
|
||||
|
||||
# Optional protobuf support
|
||||
ifeq ($(BR2_PACKAGE_FRR_PROTOBUF),y)
|
||||
FRR_DEPENDENCIES += protobuf-c
|
||||
FRR_CONF_OPTS += --enable-protobuf
|
||||
else
|
||||
FRR_CONF_OPTS += --disable-protobuf
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
define FRR_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(@D)/tools/frr.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/frr.service
|
||||
$(INSTALL) -D -m 644 $(@D)/tools/frr@.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/frr@.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user