Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions board/common/rootfs/etc/default/mgmtd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MGMTD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog --log-level err -M grpc"
3 changes: 3 additions & 0 deletions board/common/rootfs/etc/finit.d/available/netd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#set DEBUG=1

service <pid/mgmtd> name:netd log [S12345] netd -- Network route daemon
1 change: 1 addition & 0 deletions board/common/rootfs/etc/finit.d/enabled/netd.conf
Empty file.
8 changes: 8 additions & 0 deletions board/common/rootfs/usr/libexec/infix/iw.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ def parse_interface_info(ifname):
if power_match:
result['txpower'] = float(power_match.group(1))

# wiphy index -> phy/radio name
elif stripped.startswith('wiphy '):
try:
wiphy_idx = int(stripped.split()[1])
result['phy'] = normalize_phy_name(f'phy{wiphy_idx}')
except (ValueError, IndexError):
pass

return result


Expand Down
15 changes: 0 additions & 15 deletions board/common/rootfs/usr/sbin/staticd-helper

This file was deleted.

31 changes: 25 additions & 6 deletions board/common/rootfs/usr/share/udhcpc/default.script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ACTION="$1"
IP_CACHE="/var/lib/misc/${interface}.cache"
RESOLV_CONF="/run/resolvconf/interfaces/${interface}.conf"
NTPFILE="/run/chrony/dhcp-sources.d/${interface}.sources"
NAME="/etc/frr/static.d/${interface}-dhcp.conf"
NAME="/etc/netd/conf.d/${interface}-dhcp.conf"
NEXT="${NAME}+"

[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
Expand Down Expand Up @@ -75,14 +75,23 @@ was_option_requested()
# client MUST ignore the Router option.
set_dhcp_routes()
{
echo "! Generated by udhcpc" > "$NEXT"
echo "# Generated by udhcpc" > "$NEXT"
echo "" >> "$NEXT"
if [ -n "$staticroutes" ]; then
if was_option_requested 121; then
# format: dest1/mask gw1 ... destn/mask gwn
set -- $staticroutes
while [ -n "$1" -a -n "$2" ]; do
dbg "adding route $1 via $2 metric $metric tag 100"
echo "ip route $1 $2 $metric tag 100" >> "$NEXT"
cat >> "$NEXT" <<-EOF
route {
prefix = "$1"
nexthop = "$2"
distance = $metric
tag = 100
}

EOF
shift 2
done
else
Expand All @@ -91,7 +100,15 @@ set_dhcp_routes()
elif [ -n "$router" ] ; then
if was_option_requested 3; then
for i in $router ; do
echo "ip route 0.0.0.0/0 $i $metric tag 100" >> "$NEXT"
cat >> "$NEXT" <<-EOF
route {
prefix = "0.0.0.0/0"
nexthop = "$i"
distance = $metric
tag = 100
}

EOF
done
else
log "ignoring unrequested router (option 3)"
Expand All @@ -102,7 +119,8 @@ set_dhcp_routes()
cmp -s "$NAME" "$NEXT" && return
mv "$NEXT" "$NAME"

initctl -nbq restart staticd
rm /run/netd.pid
initctl reload netd
}

clr_dhcp_routes()
Expand All @@ -111,7 +129,8 @@ clr_dhcp_routes()
[ -f "$NAME" ] || return
rm "$NAME"

initctl -nbq restart staticd
rm /run/netd.pid
initctl reload netd
}

clr_dhcp_addresses()
Expand Down
2 changes: 1 addition & 1 deletion buildroot
1 change: 1 addition & 0 deletions configs/aarch64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_FEATURE_WIFI_MEDIATEK=y
BR2_PACKAGE_FEATURE_WIFI_REALTEK=y
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_CURIOS_HTTPD=y
BR2_PACKAGE_CURIOS_NFTABLES=y
Expand Down
1 change: 1 addition & 0 deletions configs/aarch64_minimal_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://kernelkit.org/infix/"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
Expand Down
1 change: 1 addition & 0 deletions configs/arm_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_FEATURE_WIFI_MEDIATEK=y
BR2_PACKAGE_FEATURE_WIFI_REALTEK=y
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
Expand Down
1 change: 1 addition & 0 deletions configs/arm_minimal_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://kernelkit.org/infix/"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
Expand Down
1 change: 1 addition & 0 deletions configs/riscv64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ BR2_PACKAGE_FEATURE_WIFI=y
BR2_PACKAGE_FEATURE_WIFI_MEDIATEK=y
BR2_PACKAGE_FEATURE_WIFI_REALTEK=y
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_FACTORY=y
Expand Down
1 change: 1 addition & 0 deletions configs/x86_64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ BR2_PACKAGE_FEATURE_WIFI=y
BR2_PACKAGE_FEATURE_WIFI_MEDIATEK=y
BR2_PACKAGE_FEATURE_WIFI_REALTEK=y
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_CURIOS_HTTPD=y
BR2_PACKAGE_CURIOS_NFTABLES=y
Expand Down
1 change: 1 addition & 0 deletions configs/x86_64_minimal_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://kernelkit.org/infix/"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_NETD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
Expand Down
4 changes: 3 additions & 1 deletion doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ Change Log

All notable changes to the project are documented in this file.

[v26.01.0][UNRELEASED]
[v26.02.0][UNRELEASED] -
-------------------------

### Changes

- Upgrade Linux kernel to 6.18.9 (LTS)
- Upgrade FRR to 10.5.1
- Add support for Microchip SAMA7G54-EK Evaluation Kit, Arm Cortex-A7

### Fixes

N/A


[v26.01.0][] - 2026-02-03
-------------------------

Expand Down
1 change: 1 addition & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/feature-wifi/Config.in"
comment "Software Packages"
source "$BR2_EXTERNAL_INFIX_PATH/package/bin/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/confd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/netd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/confd-test-mode/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/curios-httpd/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/package/curios-nftables/Config.in"
Expand Down
31 changes: 31 additions & 0 deletions package/netd/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
config BR2_PACKAGE_NETD
bool "netd"
select BR2_PACKAGE_LIBITE
select BR2_PACKAGE_LIBCONFUSE
help
Network route daemon. Manages static routes and RIP routing.
Reads configuration from /etc/netd/conf.d/*.conf.

With FRR: Full routing via gRPC (static routes, RIP, OSPF).
Without FRR: Standalone Linux backend via rtnetlink.

https://github.com/kernelkit/infix

if BR2_PACKAGE_NETD

config BR2_PACKAGE_NETD_FRR
bool "FRR integration"
default y if BR2_PACKAGE_FRR
depends on BR2_PACKAGE_FRR
select BR2_PACKAGE_PROTOBUF
select BR2_PACKAGE_GRPC
select BR2_PACKAGE_HOST_PROTOBUF
select BR2_PACKAGE_HOST_GRPC
help
Enable FRR integration via gRPC northbound API.
Provides full routing support (static routes, RIP, OSPF).

If disabled, netd uses Linux kernel backend (rtnetlink)
with static routes only.

endif
3 changes: 3 additions & 0 deletions package/netd/netd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#set DEBUG=1

service name:netd log [S12345] netd -p /run/netd.pid -- Network route daemon
32 changes: 32 additions & 0 deletions package/netd/netd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
################################################################################
#
# netd
#
################################################################################

NETD_VERSION = 1.0
NETD_SITE_METHOD = local
NETD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/netd
NETD_LICENSE = BSD-3-Clause
NETD_LICENSE_FILES = LICENSE
NETD_REDISTRIBUTE = NO
NETD_DEPENDENCIES = libite libconfuse jansson
NETD_AUTORECONF = YES

NETD_CONF_ENV = CFLAGS="$(INFIX_CFLAGS)"

NETD_CONF_OPTS = --prefix= --disable-silent-rules

# FRR integration (gRPC backend) or standalone Linux backend
ifeq ($(BR2_PACKAGE_NETD_FRR),y)
NETD_DEPENDENCIES += frr grpc host-grpc protobuf
NETD_CONF_ENV += \
PROTOC="$(HOST_DIR)/bin/protoc" \
GRPC_CPP_PLUGIN="$(HOST_DIR)/bin/grpc_cpp_plugin"
else
NETD_CONF_OPTS += --without-frr
endif

NETD_TARGET_FINALIZE_HOOKS += NETD_INSTALL_EXTRA

$(eval $(autotools-package))
5 changes: 3 additions & 2 deletions package/skeleton-init-finit/skeleton-init-finit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ endif

ifeq ($(BR2_PACKAGE_FRR),y)
define SKELETON_INIT_FINIT_SET_FRR
for svc in babeld bfdd bgpd eigrpd isisd ldpd ospfd ospf6d pathd ripd ripng staticd vrrpd zebra; do \
for svc in babeld bfdd bgpd mgmtd eigrpd isisd ldpd ospfd ospf6d pathd ripd ripng staticd vrrpd zebra; do \
cp $(SKELETON_INIT_FINIT_AVAILABLE)/frr/$$svc.conf $(FINIT_D)/available/$$svc.conf; \
done
ln -sf ../available/staticd.conf $(FINIT_D)/enabled/staticd.conf
ln -sf ../available/zebra.conf $(FINIT_D)/enabled/zebra.conf
ln -sf ../available/staticd.conf $(FINIT_D)/enabled/staticd.conf
ln -sf ../available/mgmtd.conf $(FINIT_D)/enabled/mgmtd.conf
endef
SKELETON_INIT_FINIT_POST_INSTALL_TARGET_HOOKS += SKELETON_INIT_FINIT_SET_FRR
endif # BR2_PACKAGE_FRR
Expand Down
2 changes: 1 addition & 1 deletion package/skeleton-init-finit/skeleton/etc/default/ripd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# --log-level debug
RIPD_ARGS="-A 127.0.0.1 -u frr -g frr -f /etc/frr/ripd.conf --log syslog"
RIPD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service <!> pid:!/run/frr/mgmtd.pid env:-/etc/default/mgmtd \
[2345] mgmtd $MGMTD_ARGS -- FRR MGMT daemon
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Run staticd-helper to collate /etc/static.d/*.conf before starting staticd
service log:null <!pid/zebra> pre:/usr/sbin/staticd-helper \
[2345] staticd -A 127.0.0.1 -u frr -g frr -f /etc/frr/staticd.conf \
service log:null <!pid/zebra> \
[2345] staticd -A 127.0.0.1 -u frr -g frr \
-- Static routing daemon
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
service <!> pid:!/run/frr/zebra.pid env:-/etc/default/zebra \
service <!pid/netd> pid:!/run/frr/zebra.pid env:-/etc/default/zebra \
[2345] zebra $ZEBRA_ARGS -- Zebra routing daemon
Loading
Loading