Skip to contentSkip to conversation

package/frr: add configuration option to enable gRPC

PATCH New Mattias Walström 1 participant 1 message Feb 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/frr: add configuration option to enable gRPC

Add a configuration option to configure mgmtd using gRPC. This is still experimental and far from all things are configurable using gRPC yet, but still useful in some use-cases.

---
 package/frr/Config.in | 16 ++++++++++++++++
 package/frr/frr.mk    |  8 ++++++++
 2 files changed, 24 insertions(+)
package/frr/Config.in +16 -0
index 6c26b6d2e1..6412005a94 100644
@@ -58,6 +58,17 @@ config BR2_PACKAGE_FRR_PROTOBUF
 	  Build FRR with protobuf-based Binary-FPM export and MLAG
 	  peer synchronization.
 
+config BR2_PACKAGE_FRR_GRPC
+	bool "gRPC support"
+	depends on BR2_INSTALL_LIBSTDCPP # grpc
+	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # grpc
+	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
+	select BR2_PACKAGE_FRR_PROTOBUF
+	select BR2_PACKAGE_GRPC
+	help
+	  Build FRR with gRPC support for northbound management.
+
 endif
 
 comment "frr needs a toolchain w/ threads, dynamic library"
@@ -68,3 +79,8 @@ comment "frr needs a toolchain w/ threads, dynamic library"
 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
+
+comment "grpc support for frr needs a toolchain w/ C++, gcc >= 8"
+	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_8
package/frr/frr.mk +8 -0
index 4886837245..e31fa69afb 100644
@@ -97,6 +97,14 @@ else
 FRR_CONF_OPTS += --disable-protobuf
 endif
 
+# Optional gRPC support
+ifeq ($(BR2_PACKAGE_FRR_GRPC),y)
+FRR_DEPENDENCIES += grpc host-grpc
+FRR_CONF_OPTS += --enable-grpc
+else
+FRR_CONF_OPTS += --disable-grpc
+endif
+
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 FRR_CONF_ENV += LIBS=-latomic
 endif
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot