From a40e07de231b55db95ba35dba790ec67eeb3e1ac Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 8 May 2026 19:58:15 +0200 Subject: [PATCH] bird3: add protocol-specific build variants and Config.in Bird's binary size is dominated by compiled-in routing protocols. This adds size-optimized package variants built with --with-protocols so users on flash-constrained devices can install only what they need without recompiling. New packages: - bird3-bgp: BGP, RPKI, BFD + infrastructure (mrt, pipe, static) - bird3-ospf: OSPF, BFD + infrastructure - bird3-babel: Babel + infrastructure - bird3-mesh: Babel, BGP + infrastructure, for mesh networks using BGP-based overlay services (e.g. hostname distribution via bgpdisco) All variants PROVIDE:=bird3 so existing DEPENDS:=+bird3 continue to work. They conflict with each other since all install /usr/sbin/bird. For users building from source, Config.in adds per-protocol checkboxes under the bird3 menu in menuconfig. Protocols default to enabled to preserve existing behaviour, builders on tight flash budgets can uncheck what they do not need. PKG_CONFIG_DEPENDS ensures bird3 is rebuilt when the selection changes. Signed-off-by: Nick Hainke --- bird3/Config.in | 80 +++++++++++++++++++++ bird3/Makefile | 186 ++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 237 insertions(+), 29 deletions(-) create mode 100644 bird3/Config.in diff --git a/bird3/Config.in b/bird3/Config.in new file mode 100644 index 000000000..1be43eac1 --- /dev/null +++ b/bird3/Config.in @@ -0,0 +1,80 @@ +if PACKAGE_bird3 + +comment "Routing protocols" +comment "Protocols mrt, pipe, and static are always included" + +config BIRD3_PROTO_BGP + bool "BGP" + default y + help + Border Gateway Protocol. Required for internet routing, + route servers, and route reflectors. + +config BIRD3_PROTO_RPKI + bool "RPKI" + default y + help + Route Origin Validation via the Resource Public Key + Infrastructure. Used alongside BGP to validate route origins. + +config BIRD3_PROTO_BFD + bool "BFD" + default y + help + Bidirectional Forwarding Detection. Provides fast link failure + detection for BGP and OSPF sessions. + +config BIRD3_PROTO_OSPF + bool "OSPF" + default y + help + Open Shortest Path First (OSPFv2 for IPv4, OSPFv3 for IPv6). + Common interior gateway protocol for enterprise and ISP networks. + +config BIRD3_PROTO_BABEL + bool "Babel" + default y + help + Babel routing protocol. Distance-vector protocol suitable for + mesh and wireless networks. + +config BIRD3_PROTO_RIP + bool "RIP" + default y + help + Routing Information Protocol (RIPv2 for IPv4, RIPng for IPv6). + +config BIRD3_PROTO_RADV + bool "RAdv" + default y + help + IPv6 Router Advertisements. Announces IPv6 prefixes and router + information to hosts on the link. + +config BIRD3_PROTO_AGGREGATOR + bool "Aggregator" + default y + help + Route aggregation protocol. Merges multiple routes into + aggregate prefixes, typically used with BGP. + +config BIRD3_PROTO_BMP + bool "BMP" + default n + help + BGP Monitoring Protocol. Streams BGP session state to a + monitoring station. Rarely needed on embedded routers. + +config BIRD3_PROTO_L3VPN + bool "L3VPN" + default n + help + MPLS/L3VPN support. Required for BGP-based MPLS VPNs. + +config BIRD3_PROTO_PERF + bool "PERF" + default n + help + Performance testing protocol. Not intended for production use. + +endif diff --git a/bird3/Makefile b/bird3/Makefile index fb20bb0e3..f508d5ee2 100644 --- a/bird3/Makefile +++ b/bird3/Makefile @@ -14,38 +14,85 @@ PKG_MAINTAINER:=Toke Høiland-Jørgensen , Nick Hainke