Compare commits

...
Author SHA1 Message Date
Joachim Wiberg 009b31d465 modemd: handle preferred-mode set without allowed-mode
Setting just preferred-mode in YANG (no allowed-mode leaf-list) built an
invalid mode string with an empty allowed:

  Mode 'allowed: ; preferred: 4g' is not supported

The empty allowed: can never match anything in the modem's supported-modes
list, so the user got a cryptic 'is not supported' even when their preferred
mode was, in principle, supported.

When only preferred-mode is configured, walk the modem's supported-modes list
for an entry that already has that preferred, and reuse its allowed set.  If
no supported entry has that preferred mode, fail with a message that lists
every combination the modem does support, easier to diagnose than the silent
'empty allowed' case.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:51:04 +02:00
Joachim Wiberg 36ef190c3d modemd: stop retrying mmcli --reset when the modem rejects it
Some cellular modems (notably Quectel EM05) don't expose a RESET capability
over MBIM/QMI.  Both 'mmcli --reset' and 'mmcli --factory-reset' return
Unsupported immediately, the AT command is never forwarded to the firmware,
and there's nothing modemd can do over the management bus to recover.  Until
now modemd's failed-state retry kept calling --reset every 30 s for the rest
of uptime, producing pure log noise:

    modemd: <error> [modem0] Resetting after being 30s in state failed
    modemd: <info>  [modem0] Resetting
    ModemManager: <wrn> [modem0] failed requesting modem reset: Unsupported
    ModemManager: <wrn> [modem0] failed requesting modem factory reset: Unsupported
    modemd: <error> [modem0] Unable to reset

... and the same five lines again 30 s later, indefinitely.

Mitigate this by caching the Unsupported state per modem per session.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:51:03 +02:00
Joachim Wiberg 600483c35b modem: route NMEA from cellular modems to gpsd
Cellular modems (Quectel EM05/EM06/EM12, Sierra EM7565, ...) expose
GPS data as NMEA on a dedicated USB serial interface.  Until now we
relied on ModemManager's --location-enable-gps-nmea, which makes MM
hold the NMEA port and parse the stream itself — useful for mmcli
but a dead end for the rest of the system.  The result was that
modem GPS was visible only via 'show modem' and could not act as an
NTP fallback time source on devices without dedicated GPS hardware.

This commit reroutes the NMEA stream into the existing
gpsd → chronyd pipeline so cellular modems behave just like any
other NMEA-over-USB GPS dongle.  No changes to gpsd, chronyd, or
the ietf-hardware:gps component — the user activates it the same
way as for a dedicated receiver, by adding a 'gps' hardware
component that references /dev/gpsN.

This is Phase 2 of the modem GPS / location integration plan
(.notes/modem-gps-plan.md).

udev (src/modemd/77-mm-modem-gps.rules):
  - For known vendor:product:interface tuples, set ID_MM_PORT_IGNORE
    so ModemManager keeps off the NMEA port, and add
    SYMLINK+="gps%n" so gpsd's existing udev hook picks up the
    device automatically.
  - Interface-number match uses ENV{ID_USB_INTERFACE_NUM} rather
    than ATTRS{bInterfaceNumber}: udev requires all ATTRS{} matches
    in a rule to share one parent, but idVendor/idProduct live on
    the USB device while bInterfaceNumber lives on the USB
    interface.  ENV{} matching has no parent constraint and udev
    already populates ID_USB_INTERFACE_NUM from bInterfaceNumber.
  - Initial entries: Quectel EM05 (2c7c:0125), EM06-E (2c7c:0306),
    EM12-G (2c7c:0512), Sierra Wireless EM7565 (1199:9091).
    Easy to extend.

modemd (modemd/__init__.py):
  - GPS_AT_COMMANDS table maps manufacturer -> (enable, disable) AT
    command pair.  prepare_location() issues the vendor AT command
    via 'mmcli --command=AT+QGPS=1' (or AT+CGPS=1 for Sierra)
    instead of --location-enable-gps-{nmea,raw}.  Vendor lookup is
    substring-based ('Quectel' matches both 'Quectel' and 'Quectel
    Incorporated') because ModemManager normalises differently
    across firmware revisions.  For unrecognised vendors the
    high-level MM path is still used as a fallback, so nothing
    regresses for hardware not yet in the table.
  - The AT path runs based on the udev/vendor table, not on MM's
    --location-status capabilities.  Setting ID_MM_PORT_IGNORE on
    the NMEA port removes 'gps' from MM's capability list even
    though the GPS hardware is still there, so a capability gate
    would mistakenly skip GPS for the very modems we're targeting.
  - _location_capabilities() filters MM-managed sources so a single
    unsupported flag (e.g. CDMA on an LTE-only modem) doesn't fail
    the whole batched call.  Sources the modem doesn't support are
    silently skipped; a warning is logged only if the user's YANG
    config explicitly lists one.
  - Subprocess fan-out collapsed: agps-msa, agps-msb, 3gpp and cdma
    flags share a single batched mmcli invocation.
    prepare_location() drops from 5 subprocess calls to 1 (unknown
    vendor) or 2 (known vendor, AT + batched MM).
  - Stringly-typed if/elif source dispatch replaced with a
    dict-driven table (LOCATION_MM_FLAGS).
  - Two helpers eliminate the ['mmcli', '-m', self.path, ...]
    boilerplate at ~30 ModemThread call sites:
      self._mmcli(*args, check=True)   # runcmd wrapper
      self._mmclij(*args)              # runcmdj wrapper

build (package/feature-modem/Config.in):
  - Select BR2_PACKAGE_MODEM_MANAGER_ATVIADBUS so ModemManager
    accepts raw AT commands over D-Bus without being started in
    --debug mode.  Required by the AT path above; without it
    'mmcli --command' is rejected with MM_CORE_ERROR_UNAUTHORIZED.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:51:03 +02:00
Joachim Wiberg 7b7baa0730 modem: expose location and last-change in operational state
Cellular modem location data (GPS coordinates, 3GPP cell info) was
previously CLI-only — 'show modem modem0' shelled out to modem-info
which queried mmcli on demand and rendered straight to terminal.
NETCONF/RESTCONF clients had no view into modem location, and there
was no way to tell how stale any modem-state field was.

This commit moves both into the YANG operational tree so they are
accessible through every northbound interface, not just the CLI.  It
is Phase 1 of the modem GPS / location integration plan; Phase 2 will
route the modem's NMEA TTY into the existing gpsd → chronyd pipeline
so cellular modems can also serve as an NTP fallback time source.

YANG (infix-hardware.yang, revision 2026-05-10):
  - modem-state/last-change (yang:date-and-time): freshness indicator
    for the modem-state subtree, bumped on each modemd poll cycle
  - modem-state/location-state container: source (gps|3gpp|...),
    latitude/longitude/altitude (decimal64 6/6/1 fraction-digits),
    cell-id/lac/tac/mcc/mnc, and its own last-change

Runtime path:
  - modemd's check_location() now writes
    /run/modemd/modemN/location/data.json with the full location data
    plus an RFC3339 last-change.  Atomic via tmp+rename.  Walks the
    mmcli output once instead of twice.
  - check() touches /run/modemd/modemN/state.json with a fresh
    last-change after each successful state poll.
  - yanger/infix_modem.py reads both files via HOST.read_json and
    folds them into the modem-state operational subtree.
  - cli_pretty show_modem_detail rewritten to consume the operational
    tree (same path as 'show modem' overview), with new 'Last Update'
    lines for both top-level state and location.
  - bin/show/modem() consolidated: both 'show modem' and
    'show modem REF' use get_json('/ietf-hardware:hardware') — no
    more direct modem-info subprocess call.

Cleanup along the way:
  - Removed the legacy /run/modemd/modemN/location/{up,down,disabled,
    failed} marker file writes — they had no readers anywhere in the
    tree.  In-memory self.location['state'] is kept purely as the
    edge-trigger for the 'Retrieved GPS location' log line.
  - Aligned now_rfc3339() output with yanger.common.YangDate (+00:00
    form, not Z) so consumers see one consistent yang:date-and-time
    format regardless of producer.
  - Fixed multi-modem SIM scoping in show_modem_detail: now derives
    sim<N> from modem<N> instead of picking the first SIM globally.

The bearer / hardware-revision / phone-number / supported-carrier
sections of 'show modem REF' are deliberately omitted for now —
those fields are not yet in the YANG tree.  Bearer details in
particular likely belong on the wwan interface
(ietf-interfaces:interfaces-state) rather than on the modem hardware
component, and can be addressed in a follow-up.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:51:02 +02:00
Joachim Wiberg f41898d325 modemd: add SIGHUP handler for config reload
On SIGHUP, modemd stops all ModemThreads, re-runs sim-setup, then
restarts the modem threads from fresh sysrepo config.  The pidfile is
touched with os.utime() once the reload is complete, satisfying Finit's
default pidfile-based notify so confd can signal a reload and wait for
it to finish before proceeding.

This allows operator and APN changes to take effect without a full
daemon restart.

Also extract start_modem_threads() to remove the duplicated thread
startup loop shared between initial startup and reload, and align
sighandler() to use isinstance(th, ModemThread) consistently with the
rest of the thread-management code.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:51:02 +02:00
Joachim Wiberg 1168c6c8e2 modemd: package Python scripts for compiled deployment
Python scripts without a .py extension are never cached as bytecode by
CPython — every invocation re-parses the source.  Packaging as a wheel
pre-compiles all modules to .pyc and installs thin import stubs as the
executables, matching the approach used by bin/show and statd.

Restructure the modemd Python scripts into a proper Python package
(src/modemd/modemd/): each script becomes a module with a main() entry
point.  pyproject.toml declares 11 entry points; the Buildroot
MODEMD_BUILD_PYTHON hook builds a wheel via PEP 517, then pyinstaller.py
installs compiled stubs to /usr/libexec/modemd/ and pre-compiled .pyc
modules to site-packages.

/sbin/modemd is now a symlink to the compiled stub.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:51:01 +02:00
Joachim Wiberg f78f161dbe modem: migrate from infix-modem to ietf-hardware/ietf-interfaces
The initial modem import used a standalone infix-modem YANG module with
an integer-indexed list under /infix-modem:modems carrying a bearer
config mixed in with hardware config.  Infix has adopted the ietf-hardware
model to allow for a clearer separation of concerns, this commit aims to
improve on that situation by refactoring the modem model to use the same
architectural pattern already used for WiFi radios, GPS receivers, and
USB ports:

Hardware:
    /ietf-hardware:hardware/component[class=infix-hardware:modem]
    /ietf-hardware:hardware/component[class=infix-hardware:sim]
Interface:
    /ietf-interfaces:interfaces/interface[type=infix-if-type:modem]

Configuration split:
  modem component — admin-state (enable/disable), radio access mode,
                    frequency bands, location services, probe-timeout
  sim component   — PIN, PUK, carrier profile
  wwan interface  — APN, IP type, roaming, route-preference, auth

This also enables the modem to appear in 'show hardware' alongside
other hardware components, and to be managed over NETCONF/RESTCONF
using the same ietf-hardware RPCs used for USB and WiFi.

YANG changes:
  - infix-modem.yang removed (1089 lines, standalone module)
  - infix-hardware.yang: new modem and sim containers, modem-state and
    sim-state operational state, typedefs for bands/modes/location,
    notification status-update; actions restart/reset/send-sms are
    augmented directly on the component list entry (not inside container
    modem) to work around sysrepo NP-container parent validation — when
    checking a nested action's parent, sysrepo restricts its operational
    data fetch to the container path, excluding the sibling 'class' leaf
    needed to evaluate the container's 'when' condition, so the container
    is never instantiated and the parent check fails
  - infix-if-modem.yang: new submodule (same pattern as wifi/wireguard)
    adds the wwan bearer container to ietf-interfaces
  - infix-if-type.yang: new modem identity for wwan interface type
  - confd version bumped to 1.9

confd:
  - if-modem.c: new file replaces the stub modem_gen() in modem.c;
    generates dagger init scripts with probe-timeout wait loop and
    unconditional dummy wwan creation so downstream IP config succeeds
    when a USB modem is slow to enumerate at boot
  - hardware.c: start/stop/enable/disable modemd (and modem-manager)
    in response to admin-state changes on the modem hardware component;
    use finit_enable/disable consistently
  - hardware_cand_infer_class(): auto-set class for modemN/simN names
  - modem.c: stripped to RPC/notification forwarding only; the old
    genconf() / enable() / disable() logic is gone — hardware.c owns
    the lifecycle now
  - interfaces.c: remove wwan from wait-interface timeout (the modem
    interface appearance is managed by modemd, not confd's init scripts)
  - migrate/1.9: script fully migrates /infix-modem:modems to the new
    split model; each modem[N] becomes a modemN hardware component and
    simN sim component; each bearer becomes a wwanN interface (bearers
    numbered globally across modems); APN, IP type, roaming, preferred-
    mode, bands, location, PIN/PUK/carrier are all carried over; plain-
    text bearer credentials are moved to a named keystore symmetric-key
    (base64-encoded) referenced from bearer/authentication/password;
    apn-type, firewall-enabled, dns-enabled and default-route are
    dropped (no equivalent in the new model)

modemd:
  - load_config() replaces the infix-modem sysrepocfg call; reads from
    ietf-hardware (modem/sim config), ietf-interfaces (bearer config),
    and ietf-keystore (credentials) — three standard modules instead of
    one proprietary one; modems absent from sysrepo config but present
    in system.json are still started (physical detection wins)
  - Default route written to /etc/net.d/<iface>.conf (picked up by
    netd/staticd/zebra) instead of a direct 'ip route add'; routes are
    now visible to FRR for redistribution and metric-based failover
  - Addresses tagged with proto wwan (rt_addrprotos entry 7) for
    precise flush on disconnect without touching other address sources
  - _derive_gateway() handles point-to-point bearers where modem
    reports gateway as "--"; derives peer from link-scope subnet route
  - SimThread exits cleanly on platforms without /dev/simctrl
  - sim-setup, modem-info, modem-udev, modem-rpc, modem-sms all ported
    to the ietf-hardware/ietf-interfaces namespace

statd:
  - infix_modem.py now emits modem-state and sim-state into ietf-hardware
    component entries (modem0, sim0, ...) instead of a separate tree;
    sim-state reports physical slot, lock state, and SIM operator name
  - ietf_hardware.py: hardware component names deduplicated by rename
    (cpu → cpu, cpu1, ...) to prevent LY_EVALID when hwmon and thermal
    sysfs both normalise to the same sensor name
  - show hardware: Cellular Modems and SIM Cards tables added; sensor
    table width now adapts to the widest section in the output
  - 00-probe: USB modem detection writes to system.json["modem"], same
    source as wifi-radios, feeding gen-hardware which emits the
    ietf-hardware component entries at factory config generation time

CLI:
  - 'show modem [ref]': without ref shows Cellular Modems and SIM Cards
    tables (same data subset as 'show hardware'); with ref shows a full
    per-modem dump (hardware info, status, cellular, SIM, bearers, GPS)
  - 'modem restart <ref>': disconnect and reconnect all bearers without
    a full hardware reset
  - 'modem reset <ref>': factory-reset the modem firmware
  - 'modem sms <ref> <number> <message>': send an SMS via the modem
    (uses the signalling plane; no active data bearer required)
  - MODEMS PTYPE provides tab-completion reading modem names from
    /run/system.json

doc:
  - Add initial User Guide for modems
  - Update ChangeLog with modem news
  - Use absolute URLs in ChangeLog.  Relative links only work for in-tree
    references, not in release notes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:58 +02:00
Joachim Wiberg f0dfc6a8de test: skip defconfig backup files at find time, not mid-loop
defconfig.sh used $# (find result, incl. *~ / *.bak) for the TAP total
but then 'continue'd past backups without decrementing — so a stray
bpi_r4_*_defconfig~ in the tree made TAP see "1..23" followed by only 21
results, and the harness treated the missing 2 as failures.  Filter the
patterns at find instead; $# now matches what the loop iterates over

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:29 +02:00
Joachim Wiberg ffe5ed1e32 statd, show: fix several operational data reporting bugs
Three bugs found while testing modem support on hardware:

ietf_system.py: "interface": null written to DNS server entries when
  no interface is associated, causing LY_EVALID in the ietf-system
  schema validator.  Only include the key when the interface name is
  non-empty.

ietf_system.py: empty list inserts (user [], server [], options [],
  search []) overwrote configured data in the operational store instead
  of leaving it intact.  Guard each insert so operational data only
  shadows configured data when there is something to report.

show system: CPU temperature reported only the first sensor named
  exactly "cpu", "soc", or "core".  Platforms with multiple thermal
  zones (e.g. BPI-R4 exposes cpu and cpu1) always showed only one
  reading.  Collect all sensors whose name matches a CPU/SoC prefix
  and report the maximum.

statd.c: yanger parse errors logged without model name or libyang
  error string, making failures hard to diagnose.  Include both.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:29 +02:00
Joachim Wiberg 314b0b425f Add cellular modem support via modemd daemon
Integrates the modem management subsystem, donated by Avvero Pty Ltd,
adapted to work on any platform without proprietary hardware (simctrl,
modules.json, /sys/class/sim/).

Components:
- package/feature-modem: Buildroot feature package pulling in modemd,
  ModemManager, libmbim, libqmi, and USB serial/MBIM/QMI kernel drivers
- package/modemd: Buildroot package for the modemd daemon and helpers
- src/modemd: modem management daemon — detects modems via ModemManager,
  connects bearers, configures IP addresses, handles SMS and location
- src/confd/src/modem.c: confd plugin — enables/disables modemd and
  modem-manager via sysrepo, forwards RPCs (restart/reset/send-sms)
- src/confd/src/interfaces.{c,h}: IFT_MODEM type for wwan* interfaces;
  confd manages address/route assignment, modem daemon owns link state
- src/confd/yang/confd/infix-modem.yang: YANG model for modem config and
  operational state (bearers, APN, bands, modes, location, SMS)
- src/statd/python/yanger/infix_modem.py: operational state collector
- patches/modem-manager: upstream patches for udev install path,
  multiplexed interface naming, and MBIM port trust from udev hint
  (the last fixes Dell DW5811e / Sierra EM7455 on cold boot)
- patches/libqmi: ignore sysfs in download mode

Platform portability fixes for boards without simctrl hardware:
- modem-info: fall back to /run/modems.json when /run/modules.json is
  absent; discover wwan interfaces via sysfs scan; provide synthetic SIM
  entry when /sys/class/sim/ is not present; fix dbg() to respect flag
- modemd: make --set-allowed-modes=any best-effort (some modems only
  support one mode combination and reject any change); skip mode set
  when current mode already matches requested mode
- sim-setup: guard simctrl open, return None when modules.json absent
  to skip SIM slot switching entirely on non-simctrl hardware

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:28 +02:00
Joachim Wiberg 985b694e51 confd: fix debug mode regression
In the last major refactor of confd to a stand-alone daemon, new command
line options were added, one of which -v <LEVEL>.  Unfortunately opening
up for a few corner cases where the debug flag or the log_level was not
set properly.

This fixes that and also adds a CONFD_ARGS for /etc/default/confd, which
is customary for all daemons.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:28 +02:00
Joachim Wiberg 060e0ea284 board: some sim card help on the bpi-r4
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:28 +02:00
Joachim Wiberg 43bf6358a0 board: add USB2 component to bpi-r4 factory-config
The M.2 LTE slot uses the USB2 bus. Add it as an unlocked component so
the modem hardware is accessible and visible to users in the config.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:27 +02:00
Mattias WalströmandGitHub f4fd538a58 Merge pull request #1529 from kernelkit/wifi-followup
hostapd: Do not limit BSSID
2026-06-07 17:30:52 +02:00
Mattias Walström 5cdabe555f hostapd: Do not limit BSSID
hostapd limit hard what BSSID to use, this since hosatpd is desinged
to use radio-mac+n as default. We demand the user to select the MAC
address, if having multiple BSS.
2026-06-07 11:53:09 +02:00
Mattias Walström 60afb15488 Changelog: Add note about firewall changes
Enable NAT no longer enable forwarding on *all* interfaces.
2026-06-07 11:52:15 +02:00
Joachim WibergandGitHub ba010c0117 Merge pull request #1527 from kernelkit/wifi-roaming
Wi-Fi: Add mesh (802.11s) and roaming (802.11k,v,r)
2026-06-05 16:29:35 +02:00
Mattias Walström 61b5c8954d firewalld: Do not enable global ip_forward when enable masqurade
Infix controlls the ip_forwad (ipv4/ipv6) per interface, enable it
globally just mess things up.
2026-06-05 14:54:53 +02:00
Mattias Walström 40147a5265 Wi-Fi: Add configuration option to enable legacy rates
Normally you don't want this, but there may be cases with
stupid IoT devices. They are therefore disabled by default.
2026-06-05 14:54:53 +02:00
Mattias Walström be6cf4dcd5 Add new Wi-Fi features in Changelog 2026-06-05 14:54:53 +02:00
Mattias Walström bbea2bceae confd: wifi: Refactor to use one hostapd for all radios
This is how hostapd should be used, this enables real
band steering, since the daemon has knownledge about
all bands.
2026-06-05 14:54:53 +02:00
Mattias Walström 69fbf9e854 Document mesh and roaming 2026-06-05 14:54:53 +02:00
Mattias Walström 61d4325d2c Wi-Fi: Add support for mesh-point (802.11s) 2026-06-05 14:54:53 +02:00
Mattias Walström 44ade8b761 Wi-Fi: Add support for band steering 2026-06-05 14:54:50 +02:00
Mattias Walström 4e50c96567 Wi-Fi: Add roaming support (802.11k,v,r)
Useful feature if running multiple radios on single AP with
the same SSIDs or multiple APs to get good area coverage.
2026-06-05 14:54:35 +02:00
Joachim WibergandGitHub c0225b7096 Merge pull request #1528 from saba8814/fix/gh-action-node20-deprecation-warnings
Fix/gh action node20 deprecation warnings
2026-06-05 09:31:17 +02:00
Joachim WibergandGitHub c31c80c154 Merge pull request #1526 from kernelkit/test-action
test: infamy: add optional argument to rpc/actions
2026-06-05 09:25:45 +02:00
Ejub Sabic 91fc7466c2 fix: gh-action node 20 deprecation warnings
Resolves: #1519
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-06-05 08:12:37 +02:00
Joachim Wiberg 5286c16480 test: infamy: add optional argument to rpc/actions
For example setting DUT date-time using ietf-system RPC.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-04 13:35:02 +00:00
Mattias WalströmandGitHub fc7083dd86 Merge pull request #1525 from kernelkit/remove-put-config-dict
test: Remove function put_config_dict and convert tests to use put_config_dicts
2026-06-03 15:05:51 +02:00
Mattias Walström 8e5d49665b test: Remove function put_config_dict and convert tests to use put_config_dicts
This fix #1237
2026-06-02 16:59:28 +02:00
Tobias WaldekranzandGitHub 46fb3a061c Merge pull request #1522 from kernelkit/kernel-upgrade-7e6339d1-6e5d-4575-9a42-e3a332ca8165
Upgrade to kernel 6.18.34
2026-06-02 07:59:36 +02:00
ael-bot 74dcd5889f Upgrade Linux kernel to 6.18.34 2026-06-01 17:06:17 +00:00
Joachim WibergandGitHub 9a2f143d31 Merge pull request #1518 from kernelkit/releng
Prepare for v26.05.0
2026-05-29 10:24:27 +02:00
Joachim Wiberg 76cc1e8061 Update ChangeLog for v26.05.0 release
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-29 10:18:56 +02:00
Joachim Wiberg 762915b703 doc: restyle mkdocs site after Chirpy blog theme
Material's defaults (Roboto, bluish slate dark mode) looked dull next
to the Chirpy-based kernelkit.org blog. Match its typography and colors
via extra.css, no engine change:

- Lato headings + Source Sans 3 body + system monospace for code
- Dark mode: neutral near-black background, soft-gray text, darker code
  blocks, Chirpy blue links (replacing Material's high-contrast slate)
- Light mode: warmer body text, blue links, tinted sidebars
- Keep the orange brand on the masthead; links use Chirpy blue

Set theme.font: false so Material no longer also fetches Roboto.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-29 10:07:56 +02:00
Joachim Wiberg 5fd5d1254a doc: fix missing images in test system arch.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-29 10:07:52 +02:00
Joachim WibergandGitHub 1012759a41 Merge pull request #1495 from kernelkit/speed-duplex 2026-05-27 23:40:29 +02:00
Joachim Wiberg 925a43dead cli: add 'show operational [path /X]' and path filter to config views
Extend the existing 'show <running|startup|factory>-config' family with an
optional 'path /XPATH' argument that maps straight to the underlying 'copy
-x' flag, and add 'show operational [path /XPATH]' for symmetry with the
configuration datastores.

  admin@example:/> show running-config path /ietf-interfaces:interfaces
  admin@example:/> show operational path /ietf-system:system-state

Also, improve error feedback from the copy command slightly.

Before:
  admin@example:~$ copy running -x /foo
  Error: (null) (5)
  Error: failed retrieving running-config data

After:
  admin@example:~$ copy running -x /foo
  Error: Couldn't parse path "/foo": Prefix "foo" not defined. (5)
  Error: failed retrieving running-config data

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-27 20:53:31 +02:00
Joachim Wiberg 6958c9bb1a show: relay cli-pretty's user-facing error messages
cli-pretty prints a friendly message on stdout before any sys.exit(1)
— 'Interface "w" not found', 'Error, top level "ietf-routing:routing"
missing', etc.  The wrapper used subprocess.run(..., check=True) and
on non-zero exit caught CalledProcessError, throwing away the captured
stdout and printing the generic exception message instead.

Drop the check=True / try-except dance, always relay stdout, and only
fall back to the generic 'Error running cli-pretty' line when the
subprocess crashed without producing any output.

Before:
  admin@bpi:/> show interface w
  Error running cli-pretty: Command '['/usr/libexec/statd/cli-pretty',
  'show-interfaces', '-n', 'w']' returned non-zero exit status 1.

After:
  admin@bpi:/> show interface w
  Interface "w" not found

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-27 20:53:31 +02:00
Joachim Wiberg 65eb4c072a cli: tighten 'show interface' detail-view alignment
The Ethernet packet/RMON counters at the bottom of 'show interface
<name>' were appended with a wider label column than the operational
data above them, breaking visual alignment.  Group them under an
"Ethernet Statistics" section heading (Decore.title), same convention
as 'Available Networks' in the wifi scan view.

Narrow the operational-data label column from 20 to 19 chars so the
title bar exactly matches the heading text — a tighter and more
deliberately aligned look.  All labels in pr_iface fit within 19
chars except 'lacp system priority' (20); rename it to 'lacp sys
priority' for consistency with the other 'lacp ...' labels (lacp
aggregate id, lacp partner mac, ...) so the new field width works
universally.

Refresh CLI snapshots and doc samples to match.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-27 20:53:30 +02:00
Joachim Wiberg c3d17586fd doc: add vlan.md, update ChangeLog for the branch
Fix #1506: restore the VLAN interface documentation that was lost when
networking.md was split into per-topic pages.  Content adapted from the
v25.11.0 networking.md VLAN section, plus a new "Stacked (Q-in-Q)"
section showing `eth0.10.20`-style nesting and the layered `show
interface` rendering of the parent chain.

Update the interface-type table in networking.md to point at the new
vlan.md instead of the dangling ethernet.md#vlan-interfaces anchor.

ChangeLog: document the user-facing changes on this branch (YANG model
upgrade, layered show interface output, auto-negotation typo fix) and
the new VLAN documentation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-27 20:53:30 +02:00
Joachim Wiberg 4c17a79de6 doc: refresh show interface samples and rename plural form
Update CLI samples across the documentation to the new layered
presentation: physical-medium row when linked (1000baseT/...), bare
MACs, and key: value DATA tokens.  Add a short prose block in
ethernet.md and iface.md explaining the layering.

Drop the historical 'show interfaces' (plural) form — removed from
klish years ago — from all user-facing examples and the landing page.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-27 20:53:29 +02:00
Joachim Wiberg 7fa141178f cli: layered show interface, IEEE 802.3.2-2025 ethernet model
Import ieee802-ethernet-interface@2025-09-10.yang, from IEEE 802.3.2-2025,
and companion ieee802-ethernet-phy-type.yang, replacing the 2019 revision.
Operational interface speed moves to ietf-interfaces:speed, RFC 8343,
eth:speed is now obsolete.  Bump infix-interfaces.yang revision to track
the upgrade.

The CLI 'show interface' command renders interfaces as bottom-up layered
protocol rows.  Ethernet interfaces a new IEEE link-mode row (1000baseT,
10GbaseLR, ...) is added with 'duplex: full|half' in the DATA column.
Without link the ethernet row is the first row.  Tunnels and wifi follow
the same layering: gre/vxlan rows carry remote:/vni: tokens with optional
ethernet sub-row for the L2-bearing variants; wifi rows carry 'station' or
'access-point' ssid:, signal:, stations: tokens.

admin@bpi-76-8f-c2:/> show interface
⚑ INTERFACE   PROTOCOL      STATE       DATA
⇅ lo          loopback      UP
              ipv4                      127.0.0.1/8 (static)
              ipv6                      ::1/128 (static)
⇅ br0         bridge        DOWN
  │           ethernet                  32:2e:3f:76:8f:c2
  │           ipv4                      192.168.0.1/24 (static)
⇅ ├ lan0      bridge        LOWER-DOWN
⇅ ├ lan1      bridge        LOWER-DOWN
⇅ ├ lan2      bridge        LOWER-DOWN
⇅ └ lan3      bridge        LOWER-DOWN
⇅ gre0        gre           UP          remote: 198.51.100.7
              ipv4                      10.255.0.1/30 (static)
⇅ sfp1        ethernet      DOWN        ca:59:f0:77:80:5b
⇅ wan         1000baseT     UP          duplex: full
              ethernet                  32:2e:3f:76:8f:c2
              ipv4                      192.168.0.235/24 (dhcp)
              ipv6                      fe80::302e:3fff:fe76:8fc2/64 (link-layer)
⇅ wan.10      vlan          UP          vid: 10
  │           ipv4                      10.0.10.1/24 (static)
  └ wan
⇅ wan.10.20   vlan          UP          vid: 20
  │           ipv4                      10.0.10.20/28 (static)
  └ wan.10
⇅ wifi0       wifi          UP          station ssid: corp-net signal: good
              ethernet                  dc:a6:32:00:11:22
              ipv4                      192.168.7.42/24 (dhcp)

yanger populates phy-type and pmd-type from a static ETHTOOL link-mode
identity table keyed on (port, speed, duplex).  Both leaves are populated
for unambiguous media (copper, DAC, copper-T); for generic fiber where
the (port, speed, duplex) tuple can map to multiple PMDs (SR vs LR vs
ER, etc.) only the phy-type family identity is emitted — guessing the
PMD would be misleading.  cli_pretty prefers pmd-type (specific) and
falls back to phy-type (family) for display.

yanger also emits ietf-interfaces:speed and fixes a long-standing
'auto-negotation' typo (yanger had never matched ethtool's correctly-
spelled JSON field, so operational auto-negotiation always read
'unknown').

Filling the WG's gap on fixed-speed config
------------------------------------------

IEEE Std 802.3.2-2025 obsoleted the eth:speed leaf without providing a
config-true replacement; the standards-correct way to express what
older Infix configurations called 'fixed speed' is to restrict the set
of PMDs auto-negotiation may advertise.  Augment auto-negotiation with
two leaf-lists:

  auto-negotiation/advertised-pmd-types  config-true,  leaf-list of pmd-type
  ethernet/supported-pmd-types           config-false, leaf-list of pmd-type

Pinning a port to a single mode is now expressed as a single-entry
advertised-pmd-types list.  The kernel-supported set is exposed as
operational state for diagnosis — SFP/SFP+ cages report the inserted
module's capabilities, narrowing the list to a single PMD when the
optic only supports one mode (as suggested by @wkz in PR review).
When the supported list collapses to a single entry, yanger uses it
to refine the operational pmd-type leaf — more accurate than the
(port, speed, duplex) lookup for fiber.

confd C apply path (src/confd/src/ieee802-ethernet-interface.c)
translates each advertised pmd-type identity to the corresponding
ETHTOOL_LINK_MODE_*_BIT_*, ORs them into a mask, and emits
'ethtool --change <if> autoneg on advertise 0x<mask>'.  An empty
list keeps the historical default of advertising every supported
mode.  The (legacy) 'auto-negotiation/enable = false' + speed/duplex
branch is removed — it has no model representation any more.

cli_pretty's detail view gains 'advertised' and 'supported' rows
listing the PMDs in each set.  A new _pr_label_list() helper unifies
multi-row rendering across these new rows and the pre-existing
ipv4/ipv6 address rows.

The detailed interface view also gains a 'link mode' row carrying the
pmd-type / phy-type-derived label.

Migration of existing startup configurations
--------------------------------------------

Bump confd version 1.8 → 1.9 to trigger the migration on upgrade.
share/migrate/1.9/10-ethernet-advertise.sh translates old configs of
the form

  ethernet { auto-negotiation { enable false; } speed S; duplex D; }

into

  ethernet { auto-negotiation { advertised-pmd-types [PMD]; } duplex D; }

mapping (S, D) → PMD via a static lookup covering the copper-T speeds
the deprecated speed leaf historically supported (10/100/1000/2.5G/
5G/10G).  Interfaces that don't disable auto-negotiation, or that
lack a speed leaf, are passed through untouched.

Closes #530
Closes #805

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-27 20:53:29 +02:00
Mattias WalströmandGitHub f7236fd59c Merge pull request #1517 from kernelkit/yanger-fix 2026-05-26 22:21:04 +02:00
Mattias Walström aecb4546f8 yanger: expand VLAN ranges from bridge global output
bridge -j vlan global show can return VLAN ranges as
{"vlan": 1, "vlanEnd": 3} instead of individual entries.
The vlans dict was only keyed on the start value, causing
port VLANs 2 and 3 to be reported as "Unexpected".

Also fix typo in error message (brpvlans -> brpvlan).
2026-05-26 17:19:42 +02:00
Joachim WibergandGitHub 9b0837100c Merge pull request #1516 from kernelkit/bump-buildroot
Bump buildroot to 2025.02.14
2026-05-25 17:10:04 +02:00
Mattias Walström b650d91895 Bump buildroot to 2025.02.14
Just a lot of CVE fixes, full changelog:
https://github.com/buildroot/buildroot/blob/2025.02.x/CHANGES
2026-05-25 11:02:36 +02:00
Joachim WibergandGitHub 68e4dc3e9b Merge pull request #1514 from kernelkit/kernel-upgrade-668755b5-46cf-4c96-aff5-d1eea93ea004
Upgrade to kernel 6.18.33
2026-05-23 20:04:14 +02:00
ael-bot e8f14e1a06 Upgrade Linux kernel to 6.18.33 2026-05-23 16:23:53 +00:00
Joachim WibergandGitHub 230bd77623 Merge pull request #1513 from kernelkit/acer-license
Add missing license for new board
2026-05-23 18:10:07 +02:00
Joachim Wiberg 0bc998c24a board/aarch64: add missing license for new board
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-23 16:05:10 +00:00
Joachim WibergandGitHub 6618bcdf1e Merge pull request #1511 from kernelkit/refactor-confd-deps
Refactor confd deps
2026-05-23 14:59:20 +02:00
Mattias Walström cf4de78d29 confd: move dhcp-client hostname dependency to core tracker
Move the hostname-triggers-dhcp-client logic from dhcp-client.c into
the centralized dep_hostname() dependency tracker.  When the hostname
changes, all interfaces with DHCP client configured are now added to
the diff by the core dependency resolver, so dhcp_client_change() picks
them up through its normal diff-based interface iteration.
2026-05-22 16:20:45 +02:00
Mattias Walström 555de63fd6 confd: add wireguard key dependency tracking
When keystore keys change, trigger regeneration of wireguard
interfaces that reference them:

 - Asymmetric key change: triggers interfaces using it as private-key
 - Symmetric key change: triggers interfaces using it as preshared-key
   (both at peers bag-level and individual peer-level)
2026-05-22 16:20:45 +02:00
Mattias Walström 9d4d521fa2 confd: split handle_dependencies() into focused helpers
Extract the monolithic handle_dependencies() into five smaller
functions, each handling one dependency type:

 - dep_symmetric_keys()    - key -> wifi secret
 - dep_asymmetric_keys()   - key -> ssh hostkey/web cert
 - dep_hostname()          - hostname -> dhcp-server/mdns
 - dep_wifi_interfaces()   - interface wifi -> radio hardware
 - dep_radio_components()  - radio hardware -> interface wifi

Also fixes a potential NULL dereference of dwifi before accessing
its access-point child, and removes redundant NULL checks for
YANG-guaranteed mandatory leaves (list keys, mandatory true).
2026-05-22 16:20:25 +02:00
Mattias WalströmandGitHub e994d976ff Merge pull request #1510 from kernelkit/fix-acer-connect
aarch64: board: Acer Connect Vero rename board
2026-05-20 12:50:16 +02:00
Mattias Walström 3fdbe15585 aarch64: board: Acer Connect Vero rename board
Fix so the board actually build when selected and rename the board
to the actual name `Acer Connect Vero W6m`
2026-05-20 11:19:12 +02:00
Tobias WaldekranzandGitHub eb2135bd15 Merge pull request #1509 from kernelkit/fix-flaky-container-tests
Fix operational get-data crash on containers with shell chars
2026-05-20 08:12:21 +02:00
Mattias WalströmandGitHub 5cf180b4d7 Merge pull request #1507 from kernelkit/add-vero
Add Acer Connect Vero W6m support
2026-05-19 20:10:37 +02:00
Richard Alpe bcc2df7e20 statd: yanger: stop overwriting infix-containers 'command' leaf
The 'command' leaf is config, with a strict pattern that doesn't allow
'&', quotes or pipes.  Yanger was populating it from podman's full,
untruncated container command -- so any container whose entrypoint
uses shell metacharacters (e.g. sh -c "... && ...") failed YANG
validation.

The symptom: every operational read of /infix-containers:containers
returns SR_ERR_INTERNAL, which in turn fails the whole get-data on
the operational datastore.  This breaks case/misc/operational_all and
any RESTCONF/NETCONF read that touches containers.

This was introduced in 59028c4 ("Fix #1466: 'show container' shows no
output"), which added the operational, pattern-less 'cmdline' leaf
but left the old 'command' assignment in place.  Drop it -- 'cmdline'
already carries the full command line, and 'command' belongs to
running config.

Note: the failure can look intermittent across test runs because
podman storage is persistent.  It only triggers once a container with
a bad-pattern command ends up in 'podman ps -a', including stale or
exited leftovers from earlier runs.

Signed-off-by: Richard Alpe <richard@bit42.se>
2026-05-19 19:49:29 +02:00
Mattias Walström 02a5079c6a doc: Changelog: Update with channel-width and the Acer Connect Vero W6m 2026-05-19 15:51:20 +02:00
Mattias Walström f39e62fdb1 feature-wifi: Only install files in romfs if enabled
Move from board romfs directory, to inside feature-wifi
2026-05-19 15:51:20 +02:00
Mattias Walström 87c2d3fc77 CI: Refactor build-image workflow
Reduce the number of duplication and try to simplify the flow.
2026-05-19 13:45:25 +02:00
Mattias WalströmandGitHub ab3594e124 Merge pull request #1508 from kernelkit/kernel-upgrade-c22791e9-8a8a-4420-a254-a84c8b6395ae
Upgrade to kernel 6.18.32
2026-05-19 13:40:06 +02:00
ael-bot 01cb60d125 Upgrade Linux kernel to 6.18.32 2026-05-19 07:01:40 +00:00
Mattias Walström 0c35a90841 doc: wifi: Document channel-width and security mode auto 2026-05-19 06:38:32 +02:00
Mattias Walström bfbf08943b mt7986: Add Acer Connect Vero w6 2026-05-19 06:38:32 +02:00
Mattias Walström 21fd80a71d confd: wifi: Fix WiFi 6E support
Was not correct handled before, a few assumptions was made,
but did not work in reality.

* Fix correct channels for WiFi 6E
* Add missing parameters required for 6ghz to work
2026-05-18 21:52:22 +02:00
Mattias Walström 64819075d5 WiFi: Add support for setting channel width 2026-05-18 09:27:03 +02:00
Joachim WibergandGitHub 2885112da8 Merge pull request #1502 from kernelkit/upgrade-frr
Upgrade FRR to 10.5.4

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-18 03:06:30 +02:00
Mattias Walström 48a1df4c67 confd: yang: Put some limits on custom mac addresses
Not correct MAC address for example multicast bit set,
caused `ip` to exit with failure code, resulting in
that configuration was not applied.
2026-05-17 18:27:45 +02:00
Mattias Walström ed6171f920 Upgrade FRR to 10.5.4
Summary of Changes:

bfdd:
    - cap IPv6 echo reflection to declared length
    - account for FP offset in echo length checks
    - fix recv errno filter logic in a few places
    - tighten SBFD reflector packet sanity checks
    - gate IPv6 echo reflection on known sessions
    - tighten auth header parsing skeleton
    - validate control packet length before session lookup

bgpd:
    - Fix memleak when configuring rd
    - Validate if NHC BGPID TLV value is non-zero
    - Avoid having a dangling pointer after we free NHC attribute
    - Check if BGPID NHC TLV exists when IPv6 next-hop is link-local
    - Do not allocate NHC TLV with an extra trailer
    - migrate timers during peer_xfer_conn to fix stale route cleanup
    - honor 'no activate' for dynamic neighbors in peer-group
    - Return immediately when dynamic capability action is not valid
    - Validate BGP role capability when handling it dynamically
    - fix neighbor IP comparison for IPv6 memcmp return values
    - Don't mark nexthop as changed if a set next-hop unchanged is applied
    - Return BGP_PEER_INTERNAL when first peer's as type is set to auto
    - Update peer sort cache when remote-as auto is used and AS number changed
    - Check dynamic capability action before validating ENHE capability
    - Do not allocate stream if route-refresh capability is not received
    - Move rpki strict check to bgp_accept()
    - Fix memory leak for nhc attribute if ipv6 is link-local address
    - Fix compilation for Debian 11 when printing uint64 values
    - Return zero labels if no BOS found and it's not a withdraw label
    - Fix signed overflow in hexstr2num()
    - Check the length also when parsing ENCAP attr sub-TLVs
    - Validate prefixlen before subtracting when parsing labeled unicast NLRI
    - Reset the stream to attr_start + attribute_len when WITHDRAWN
    - Revalidate locally originated routes against RPKI changes
    - Check if prefixlen is not 0 when parsing flowspec stuff
    - Prevent len_string going negative when trying to display flowspec entries
    - fix import vrf on non existing vrf
    - fix no vrf import command
    - Free hostname for FQDN capability if the parsing goes wrong
    - Validate MP_REACH_NLRI attribute against incorrect next-hop
    - Fix dynamic FQDN capability handling
    - Check if the remaining length for subtracting TLV length is enough
    - Fix the end pointer boundaries for dynamic graceful restart capability
    - Add missing returns when parsing enhanced route-refresh
    - Return original as-path when reconciling AS versus AS4
    - Do not process route-refresh for AFI/SAFI if it's not negotiated
    - Check if we are not overusing error_data buffer when unknown cap received
    - fix NHT for explicit link-local BGP peers
    - improve packet parsing for EVPN and ENCAP/VNC
    - Prevent heap use-after-free for tunnel encapsulation attribute
    - Return 0 if AS4 capability is malformed
    - close dynamic peer socket in ttl error path
    - fix logic handling EVPN_FLAG_DEFAULT_GW
    - avoid early return in MPLSVPN NLRI processing
    - remove unneeded asserts in packet reads

eigrpd:
    - fix byte order in Hello TLV decode functions
    - Handling for malformed update packets
    - enforce minimum TLV length in Hello handler
    - reject invalid prefix mask len
    - skip unknown and ignored TLVs
    - Improve packet validation

isisd:
    - Reject SRv6 Locator TLV with Loc-Size of zero
    - consume leftover bytes after FAD sub-sub-TLV loop
    - use correct min size values for srv6 subtlvs
    - improve validation of flex-algo decoder
    - Fix missing neighbor address Sub-TLVs after link-params change
    - add unit test for remove_excess_adjs() memory leak fix
    - fix memory leak in remove_excess_adjs()
    - fix edge condition in max_lsp_count computation

ldpd:
    - improve tlv validation in several places

lib:
    - Report IPv6 MTU and not IPv4 for if_update_state_mtu6
    - disable warning in zlog.c to match master

nhrpd:
    - stop debugging auth credentials
    - fix byte-order when comparing error code in shortcut path
    - guard against zbuf_pulln NULL on truncated packets
    - require auth for all received packet types
    - harden debug packet parsing against malformed input
    - validate AFI index in extension replies

ospf6d:
    - move log call out of priv block
    - remove asserts in packet-handling paths
    - fix issues in ospf6 auth trailer code

ospfd:
    - add LSA validation in the apiserver path
    - add validation in several places before accessing

pceplib:
    - validate during of_list TLV decoding

pimd:
    - fix NOCACHE MFC resync detection log, add vrf name too
    - use upstream-owned pim pointer in register and upstream timers
    - use upstream-owned pim pointer in MSDP update paths
    - avoid JP build deref through channel OIL
    - guard RP RPF-failure mroute delete on detached OIL
    - avoid null deref in upstream delete debug path
    - guard channel OIL detach against stale pointers
    - fix crash due to double free
    - Ensure igmp message is of proper size
    - Reject pim packets with a malformed header length
    - Fix out of bounds read in AutoRP code
    - igmpv3 never checks packet length and trusts the num-sources field
    - Do not allow a register-stop message if not received from the RP
    - Prevent received msg length from being larger than buffer
    - Remove unnecessary asserts
    - When receiving a register stop ensure we have enough data to read
    - Ensure a register packet has enough space to read S,G data
    - Ensure that header has space on packet

ripngd:
    - fix data handling in several places

tests:
    - Check if route-map with set nexthop unchanged does not prevent outgoing
    - Check if mixed peer-group remote-as types can be used with auto
    - Verify neighbor addr Sub-TLVs after link-params reset
    - Expect return code being 0, not -1 when AS4 is empty or ASN is 0

vrrpd:

    - replace some asserts
    - only support ethernet in GARP code
    - limit advertised timers to 12-bits

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-05-16 20:56:56 +02:00
Joachim WibergandGitHub 689bd64b4d Merge pull request #1504 from kernelkit/kernel-upgrade-0ff65ffb-97d3-47f9-b02a-9328148ba88b
Upgrade to kernel 6.18.31
2026-05-16 10:29:49 +02:00
ael-bot dbdf5d9b78 Upgrade Linux kernel to 6.18.31 2026-05-16 06:06:55 +00:00
Joachim WibergandGitHub f13ee49f3c Merge pull request #1503 from kernelkit/kernel-upgrade-25c8ae89-19b4-443b-8ab6-78768210e119 2026-05-15 16:38:55 +02:00
ael-bot 1b34874d3d Upgrade Linux kernel to 6.18.30 2026-05-15 05:26:08 +00:00
Joachim WibergandGitHub 081491a380 Merge pull request #1500 from kernelkit/bump-9pm
Bump 9pm submodule
2026-05-12 14:50:40 +02:00
Joachim WibergandGitHub a19684c15c Merge pull request #1501 from kernelkit/misc
Misc
2026-05-12 14:47:33 +02:00
Joachim Wiberg f3183cd911 doc: update changelog
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-12 13:39:18 +02:00
Joachim Wiberg e4203b0c9e package/finit: backport stale-pidfile and death-log fixes
Backport two fixes addressing a critical failure reported by a customer:
an unclean dbus-daemon exit leaves a lingering /run/messagebus.pid, the
daemon then refuse to start, and Finit's restart loop gives up.

0001 service: clean stale pidfile after unclean daemon exit
     Drop a daemon-owned (pid:!) pidfile when it still names the
     just-reaped PID and that PID is no longer alive.

0002 service: log signal name and core dumps in death message
     "by signal: 9" -> "killed by SIGKILL", with ", core dumped"
     when applicable.  Stronger breadcrumb for sudden deaths.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-12 13:38:49 +02:00
Joachim Wiberg 3be640409a confd: cache progress description and reprint on final status
The \r-overwrite of an in-progress line breaks when something else
writes to stderr between conout(3) and the final call, leaving blank
"[ OK ]" lines.  Cache the description and reprint it whole, so the
final status line is robust to intervening output.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-12 13:38:48 +02:00
Joachim Wiberg d393a10994 confd: skip neighbor/address flush for interfaces in container netns
When an interface has been handed off to a container it lives in
another netns, so `ip neigh/addr flush dev FOO` fails on the host.
The failure aborts dagger, and since interfaces_change() runs before
containers_change() in change_cb(), the container delete path is
never reached -- the stale container keeps the interface trapped in
its netns, breaking the next reconfiguration.

Guard both the neighbor and address flush exit scripts with
`if_nametoindex(ifname)` -- true exactly when the interface is in
the host netns, false for both "in a container" and "already gone".
This replaces the pre-existing `!cni_find(ifname) && if_nametoindex(
ifname)` guard at the addr site: cni_find() added no information
for this check and would popen(container find) for nothing when the
interface had been deleted entirely.

Also harden wrap() in /usr/sbin/container so a stale setup pidfile
doesn't short-circuit Finit's stop attempt -- kill the setup PID and
still ask podman to stop the container.

Fixes #1493

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-12 13:38:47 +02:00
Richard Alpe 5e6183eb4f Bump 9pm submodule
Signed-off-by: Richard Alpe <richard@bit42.se>
2026-05-12 11:49:45 +02:00
Mattias WalströmandGitHub 562435fac9 Merge pull request #1499 from kernelkit/kernel-upgrade-75b15a6e-2a9a-426d-acd1-6b77c0f9df19
Upgrade to kernel 6.18.29
2026-05-11 13:03:05 +02:00
ael-bot 21c070b928 Upgrade Linux kernel to 6.18.29 2026-05-11 07:13:25 +00:00
Joachim WibergandGitHub 23da086976 Merge pull request #1492 from kernelkit/kernel-upgrade-b951c1e9-f9f0-4f1f-be17-4ff16f7bb9c6
Upgrade to kernel 6.18.27
2026-05-09 10:04:12 +02:00
ael-bot 3c0c456bba Upgrade Linux kernel to 6.18.27 2026-05-07 06:22:32 +00:00
Mattias WalströmandGitHub f539da7e99 Merge pull request #1489 from kernelkit/disable-release-tests
Temporarily disable release regression tests
2026-05-04 10:05:45 +02:00
Joachim Wiberg 3a6e70ba26 .github: temporarily disable release regression tests
The regression tests do not pass for some reason, could be faulty test
runner (Lifeboat) -- container and DHCP tests failing since Apr 30), so
tests are disabled until the runner is fixed.

[skip ci]

Issue #1392

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-05-04 09:33:46 +02:00
Joachim WibergandGitHub 9406fd0e04 Merge pull request #1487 from kernelkit/releng 2026-04-30 18:53:48 +02:00
Joachim Wiberg 52ef3e2ded .github: set INFIX_RELEASE when running release tests
Without INFIX_RELEASE, make test resolves INFIX_ARTIFACT to the
unversioned infix-x86_64, but release builds produce versioned
artifacts (infix-x86_64-v26.04.0-rc1.qcow2 etc.), causing the
test environment to fail with "No such file or directory".

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 18:34:35 +02:00
Joachim WibergandGitHub 3d1d73543e Merge pull request #1486 from kernelkit/release-tests
Run regression tests as part of release workflow
2026-04-30 16:08:51 +02:00
Tobias WaldekranzandGitHub 4c0996b52b Merge pull request #1483 from saba8814/fix/uboot-aux-env-first-var-import
fix: import first variable from auxiliary environment
2026-04-30 14:45:44 +02:00
Joachim Wiberg e49682645c .github: run regression tests as part of release workflow
Add an x86_64 regression test job to release.yml that runs after the
build and gates publishing — the release job now requires both build
and test to succeed.

Update test.yml's artifact restore step to use a glob so it handles
both the unversioned CI artifact name (infix-x86_64.tar.gz) and the
versioned release artifact name (infix-x86_64-26.04.0.tar.gz).

Fixes #1392

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 13:45:35 +02:00
Joachim WibergandGitHub a3c6ec0cd5 Merge pull request #1484 from kernelkit/releng
Release preparations
2026-04-30 13:14:04 +02:00
Joachim Wiberg 25fcfba0cb doc: update ChangeLog for v26.04.0 release
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:08:02 +02:00
Joachim Wiberg 5defdfdeac doc: add section on dummy interfaces
Fixes #769

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:08:02 +02:00
Joachim Wiberg 624bfd927c doc: add section on static mutlicast filters
Fixes #790

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:08:01 +02:00
Joachim Wiberg 4d8b2e5370 confd: warn if multicast flooding is disabled
Fixes #520

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:08:01 +02:00
Joachim Wiberg 6aed1f7df4 confd: add support for static ARP and neighbor cache
Add support for static ARP (IPv4) and neighbor cache (IPv6) entries per
interface.  Static entries are installed as permanent kernel neighbor
table entries that are never evicted by normal ARP/NDP aging.

Fixes #819

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:08:00 +02:00
Joachim Wiberg 7dd746d586 Fix BPi-R64 onboard WiFi probing
The mt7622 soc has a built-in wmac, same driver as the mt7615, but
it lacked MODULE_DEVICE_TABLE() so udev could not autoload driver
and firmware.

This commit also adds the wmac+bluetooth specific firmware.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:07:31 +02:00
Joachim Wiberg b1ad0f1656 package/mcd: bump and add support for per-bridge mcast router ports
Fixes #395

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-30 11:02:56 +02:00
Ejub Sabic 29222e18e9 uboot: import first variable from auxiliary environment
The U-Boot env file is generated by
mkenvimage, which prefixes the variable data with a 4-byte CRC32 by default.
ixpreboot.sh previously imported it with `env import -b` as per uboot docs(-b assume binary format (’0’ separated, “00” terminated).),
which treats the buffer as raw binary and does not strip the CRC.
As a result the first variable's name is parsed a part of CRC.
Later variables import correctly because by then the parser is past the CRC.
Switching to `env import -c` as per uboot docs (-c assume checksum protected environment format.)
makes U-Boot validate and strip the CRC before parsing, so the first variable imports under its real name.

Tested on:
- QEMU

Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-04-29 23:27:37 +02:00
Joachim Wiberg f9ea5567c4 package/finit: bump to v4.17
https://github.com/finit-project/finit/releases/tag/4.17

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-29 17:33:14 +02:00
Joachim WibergandGitHub 413d8e4599 Merge pull request #1485 from kernelkit/bpi-r3-pcifixes
Bpi r3 pcifixes
2026-04-29 17:22:23 +02:00
Mattias Walström 507bb38bdc feature-wifi: Enable 802.11 mesh (802.11s) 2026-04-29 15:47:30 +02:00
Mattias Walström 5cb17d69d4 bpi-r3: Enable the PCI clock in device tree 2026-04-29 15:43:24 +02:00
Joachim WibergandGitHub 6c6dc7711e Merge pull request #1480 from saba8814/test/dhcp-client-hostname-not-resent
test & fix: add DHCPv4 client hostname resend regression test, fix  hostname resend
2026-04-28 19:46:47 +02:00
Ejub Sabic 4f2683090e doc: updated documentation for issue #1439
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-04-28 18:06:49 +02:00
Ejub Sabic 08ca47fdab fix: dhcp client host name resend
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-04-28 18:00:32 +02:00
Ejub Sabic 17965bf4cc test: add DHCPv4 client hostname resend regression test
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-04-28 18:00:28 +02:00
Joachim WibergandGitHub 82ffb0f4bc Merge pull request #1481 from kernelkit/kernel-upgrade-28e7d3e7-b875-4444-a0ed-a6c18cefd76d
Upgrade to kernel 6.18.25
2026-04-28 12:39:25 +02:00
Joachim WibergandGitHub 2788eb6d1a Merge pull request #1482 from kernelkit/random-infamy-id-in-ci
test: avoid infamy0 race in CI by using random container names
2026-04-28 11:43:58 +02:00
Richard Alpe ba05c2e56d test: avoid infamy0 race in CI by using random container names
GitHub Actions sets $CI=true; treat it like -r so parallel jobs
don't all try to claim "infamy0" and clobber each other.
2026-04-28 10:06:04 +02:00
ael-bot c7cdf6b018 Upgrade Linux kernel to 6.18.25 2026-04-27 16:47:37 +00:00
Tobias WaldekranzandGitHub efa665de9c Merge pull request #1472 from kernelkit/gptp
ptp: initial support for IEEE 1588/802.1AS PTP/gPTP
2026-04-25 23:15:45 +02:00
Joachim Wiberg 4ece445c44 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-24 14:30:09 +02:00
Joachim Wiberg e1e2ada4b4 confd: fix review comments and code cleanup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-24 14:30:09 +02:00
Joachim Wiberg 95bd795347 test: add some basic ptp tests
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-24 14:29:58 +02:00
Joachim Wiberg 3426c2527b Add phc2sys companion service for BC/TC instances
On multi-chip DSA hardware (e.g., boards with multiple mv88e6xxx
chips), each switch chip has its own independent PHC device.  With
boundary_clock_jbod enabled, ptp4l starts but only disciplines the
active slave port's PHC — the others drift.

Automatically start phc2sys -a alongside any BC or TC instance using
hardware timestamping.  It subscribes to ptp4l's UDS socket, tracks
BMCA, and disciplines all non-active PHCs to match the active one.
On single-chip hardware it is a harmless no-op.

CLOCK_REALTIME is intentionally left untouched.  Syncing the system
clock to PTP (phc2sys -rr), feeding the PHC from GPS/NTP (ts2phc,
phc2sys reverse), and full multi-source coordination (timemaster) are
planned as follow-on phases; see the issue tracker for the roadmap.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-23 14:19:10 +02:00
Joachim Wiberg 45b06dd670 Initial support for IEEE 1588/802.1AS PTP/gPTP
Remaining work:
- phc2sys YANG model (infix-phc2sys.yang, instance-index + servo params)
- ts2phc YANG model (GPS/PPS → PHC → ptp4l GM path)
- timemaster coordination (Phase 3, after phc2sys YANG is stable)
- show ptp network (YANG action or background-polled topology container)
- CMLDS (requires upstream linuxptp + 802.1ASdm foundation)
- Full 12-bit sdoId, fault log, performance monitoring

Backported patches from linuxptp master:
- port: fix unicast negotiation recovery after FAULT_DETECTED
- udp: fix port-specific ptp/p2p_dst_ipv4 configuration
- pmc: avoid race conditions in agent update
- phc2sys: wait until pmc agent is subscribed (startup race)
- fix MAC driver incorrect SIOCGHWTSTAMP adjustment flags
- pmc_agent: longer update interval when not subscribed
- phc2sys: don't disable pmc agent with -s/-d/-w options
- port_signaling: respect ptp_minor_version in message header
- port: refresh link status on faults
- uds: copy server socket ownership in pmc clients (non-root pmc)
- uds: don't call chmod() on client socket
- port: allow mixing wildcard and exact clock identities
- Add pidfile support to ptp4l, phc2sys, and timemaster

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-23 14:19:09 +02:00
Joachim Wiberg 73b6e5cc91 patches/ethtool: backport support for --json -T (show time stamping)
This is used by the next commit that adds initial support for PTP/gPTP.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-23 14:19:09 +02:00
Joachim Wiberg b93795c0aa board/common: add rauc upgrade bundle for ext4 images
NOTE: this is intended only for use on devboards like EspressoBin where
      the onboard bootloader only understands fat and ext2 file systems.
      To enable, use 'make apply-ext4'

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-23 14:19:09 +02:00
Joachim Wiberg 5979f4e3c9 board/aarch64: fix bpi-r4 dip switch values
Inverted values for eMMC and SPI NAND.  Also use ABCD instead of
Position as column name to match board markings.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-23 14:19:08 +02:00
Joachim Wiberg 2397e7684c board/aarch64: drag Marvell ESPRESSObin in from the cold
- Add a board README to explain how to get Infix running
- Update mkimage.sh to allow creating images without boot loader

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-23 14:19:07 +02:00
Joachim WibergandGitHub 43d6dbc63f Merge pull request #1478 from kernelkit/upgrade-buildroot 2026-04-23 13:00:41 +02:00
Mattias Walström 8ebdf9f119 Upgrade Buildroot to 2025.02.13 (LTS)
A lot of CVEs fixed.

Full changelog: https://github.com/buildroot/buildroot/blob/2025.02.x/CHANGES

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-04-23 10:44:43 +02:00
Mattias WalströmandGitHub 3aef9930fe Merge pull request #1479 from kernelkit/kernel-upgrade-39c18ac9-3f99-4a96-bc62-daf538881c51
Upgrade to kernel 6.18.24
2026-04-23 09:50:44 +02:00
ael-bot 3ea1161f5f Upgrade Linux kernel to 6.18.24 2026-04-23 05:42:15 +00:00
Joachim WibergandGitHub 091618c527 Merge pull request #1476 from kernelkit/misc
Fix two regressions and add developer build helpers
2026-04-22 16:27:47 +02:00
Joachim WibergandGitHub 7647d2a542 Merge pull request #1477 from kernelkit/cosmetic-test-name-changes
test: normalize test case names
2026-04-21 21:47:49 +02:00
Richard Alpe f996dbd6ef test: lowercase minor words in test case names
Signed-off-by: Richard Alpe <richard@bit42.se>
2026-04-21 14:20:58 +02:00
Richard Alpe ff02190df8 test: normalize suite/case names to title case
Signed-off-by: Richard Alpe <richard@bit42.se>
2026-04-21 11:06:59 +02:00
Richard Alpe c6f7b61683 test: add names to cases called from top level suite
Signed-off-by: Richard Alpe <richard@bit42.se>
2026-04-21 11:06:57 +02:00
Joachim Wiberg dbc3ba0c83 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-20 13:03:29 +02:00
Joachim Wiberg d039af7234 Fix #1458: 'show ntp tracking' does not show reference id properly
admin@gateway:~$ chronyc tracking
Reference ID    : C23ACD14 (svl1.ntp.netnod.se)
Stratum         : 2
Ref time (UTC)  : Sun Apr 19 20:28:40 2026
System time     : 0.000000000 seconds fast of NTP time
Last offset     : -17.822519302 seconds
RMS offset      : 17.822519302 seconds
Frequency       : 1064.750 ppm slow
Residual freq   : +0.581 ppm
Skew            : 0.794 ppm
Root delay      : 0.018065268 seconds
Root dispersion : 0.000200240 seconds
Update interval : 0.0 seconds
Leap status     : Normal

vs

admin@gateway:/> show ntp tracking
Reference ID        : 194.58.205.20
Stratum             : 2
Ref time (UTC)      : Sun Apr 19 20:28:40 2026
System time         : 0.000000 seconds slow of NTP time
Last offset         : -17.822519302 seconds
RMS offset          : 17.822519302 seconds
Frequency           : 1064.750 ppm slow
Residual freq       : +0.581 ppm
Skew                : 0.794 ppm
Root delay          : 0.018065 seconds
Root dispersion     : 0.000188 seconds
Update interval     : 0.0 seconds
Leap status         : Normal

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-20 13:03:28 +02:00
Joachim Wiberg 59028c4800 Fix #1466: 'show container' shows no output
A container's command line, as reported by podman, may comtain environment
variables, which the current regexp (added in ed4fe58) does not support.

Extend the regexp to allow environment variables and add an operational,
config false, 'cmdline' leaf node to allow any characters to be reported
for the full command line in the operational output.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-20 13:02:37 +02:00
Joachim Wiberg 2603b0ea1b Add support for developer config snippets
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-19 22:31:15 +02:00
Joachim Wiberg 4212a38c3b .github: bump GitHub Actions to Node.js 24 compatible versions
Fixes #1437

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-19 22:31:15 +02:00
Joachim Wiberg bb72cfd8e3 doc: add missing image to device discovery section
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-19 22:31:14 +02:00
Joachim WibergandGitHub a06786d36c Merge pull request #1475 from kernelkit/kernel-upgrade-dfbe850e-9e05-4f30-b9b5-bd9399c6b718
Upgrade to kernel 6.18.23
2026-04-18 15:22:29 +02:00
ael-bot 16a173e20b Upgrade Linux kernel to 6.18.23 2026-04-18 10:07:02 +00:00
Mattias WalströmandGitHub 6c38666229 Merge pull request #1473 from kernelkit/add-qualcomm 2026-04-17 18:59:32 +02:00
Mattias Walström b940e14eb7 Add Qualcomm WiFi 6E support
And replace lspci from busybox with pci-utils (for all platforms
except arm (32bit).
2026-04-17 13:32:16 +02:00
Joachim WibergandGitHub 1774e08219 Merge pull request #1471 from kernelkit/kernel-upgrade-f52bac45-222b-4dda-86d4-50b617297422 2026-04-11 23:47:16 +02:00
ael-bot 5950e665ab Upgrade Linux kernel to 6.18.22 2026-04-11 13:23:07 +00:00
Joachim WibergandGitHub fadffef6cd Merge pull request #1470 from kernelkit/bpi-r4-support
Add support for Banana Pi BPI-R4
2026-04-10 14:05:07 +02:00
Joachim Wiberg 69d599e2ab board/aarch64: add missing mmc partconf command to BPi-R64 U-Boot
Also, simplify board README a bit now that we know that you don't need
to flip the boot switch to program eMMC.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-10 11:19:35 +02:00
Joachim Wiberg 6c879d81d1 configs/sama7g54: fix U-Boot build system selection
Missing BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y caused Buildroot to default
to legacy Makefile build system, which requires BR2_TARGET_UBOOT_BOARDNAME
instead of BR2_TARGET_UBOOT_BOARD_DEFCONFIG, resulting in a build error.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-10 11:19:35 +02:00
Joachim Wiberg e5b5b6203b legal: add missing hash files and fix date-cpp hash filename
Add missing *.hash files for all board packages using the ix-board macro;
they declare LICENSE_FILES = LICENSE but had no hash file, producing a
warning during make legal-info.

Fix the date-cpp package where the hash file was named date.hash instead
of date-cpp.hash (package name is derived from the directory, not the mk
filename), causing Buildroot to skip the hash check entirely.

Add hash files for local-site packages confd-test-mode, netd, and
onieprom that declared LICENSE_FILES but provided no hash.

Also, rename package/date-cpp/date.mk to date-cpp.mk.  Buildroot derives
the package name from the directory name, so the mk file must match. To
handle the archive name different we set DATE_CPP_SOURCE.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-10 11:19:34 +02:00
Joachim Wiberg 31df56308b board: add support for Banana Pi BPI-R4
Add board support for the BananaPi BPI-R4 router board, based on the
MediaTek MT7988A (Filogic 880) SoC with quad-core Cortex-A73 CPU.

The BPI-R4 is the successor to the BPI-R3 but uses entirely different
silicon: the internal switch runs at 2.5 GbE per port, the two SFP+
uplinks use native USXGMII at up to 10 Gbps, and WiFi is provided by
a MediaTek MT7996E PCIe module supporting tri-band WiFi 7 (2.4/5/6 GHz).

Two board variants, BPI-R4-2g5 and BPI-R4P, replace one SFP+ cage with
a 2.5 GbE RJ45 port (using the MT7988A internal 2.5G PHY); the R4P adds
an optional PoE daughterboard on that port.  Both use the upstream
mt7988a-bananapi-bpi-r4-2g5 device tree.

Interfaces:
- Standard R4:  eth1 (gmac1/sfp2 LAN cage) → sfp2, eth2 (gmac2/sfp1 WAN cage) → sfp1
- R4-2g5/R4P:  eth1 (2.5G PHY) → wan, eth2 (gmac2/sfp1 WAN cage) → sfp1

Factory reset / WPS button (GPIO14, active-low): detected by U-Boot at
boot for factory reset; reused by Linux as KEY_WPS_BUTTON at runtime.

eMMC install note: the MT7988A eMMC (pins 38-49) and SD card (pins 32-37)
use separate physical pads so there is no electrical bus sharing, unlike
some BPi-R3 configurations.  However, a single MMC controller
(mmc@11230000) handles both, so only one is active per boot session.
The eMMC install procedure therefore still requires an intermediate SPI
NAND bootloader step until a Linux-side install path is tested.

SD card build (bpi_r4_sd_boot_defconfig) now uses the new
mt7988a_bpir4_sd U-Boot defconfig with cap-sd-highspeed enabled,
giving 50 MHz SD transfers instead of the previous 25 MHz legacy mode.

Also adds MT7988/MT7996 firmware support to the buildroot linux-firmware
package, for 2.5 GbE port PHY and WiFi7 extension board, and updates the
aarch64_defconfig, aarch64_minimal_defconfig, the arch README, CI
boot/image workflows, mkimage.sh, and the ChangeLog.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-04-10 11:19:34 +02:00
Joachim WibergandGitHub 19c8c80294 Merge pull request #1468 from kernelkit/fix-rpi-display
linux: Fix stability of Raspberry pi display 1
2026-04-05 05:55:02 +02:00
Mattias Walström db422ecc5e Update Changelog for new release cycle 2026-04-04 20:04:43 +02:00
Mattias Walström 5b870a273e aarch64: dts: rpi-4: Add correct syntax to change GPU mem 2026-04-04 20:04:43 +02:00
Mattias Walström e29e2093ab linux: Fix stability of Raspberry pi display 1
This fix the instability of the display on soft reboots,
previous it required a powercycle to get display to work properly

Add patches from rpi-linux, and a small fixup from me.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-04-04 20:04:43 +02:00
Mattias WalströmandGitHub d5df85afad Merge pull request #1467 from kernelkit/kernel-upgrade-ab8a1129-6fcc-4662-a366-1f0a309d1c13 2026-04-02 18:29:25 +02:00
ael-bot 003aee9b53 Upgrade Linux kernel to 6.18.21 2026-04-02 11:57:37 +00:00
Joachim WibergandGitHub 12a50a8523 Merge pull request #1463 from kernelkit/fix-dhcp-client-test
test: dhcp: client_default_gw: Add longer timeout for test
2026-03-31 15:49:55 +02:00
Joachim Wiberg bae80ba9d8 doc: bump release date
Issue #1461 turned out to just be a flaky test, the change in this
commit only bumps the release date.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-31 15:41:08 +02:00
Mattias Walström addd89e07e test: dhcp: client_default_gw: Add longer timeout for test
This fix #1461
2026-03-31 12:26:46 +02:00
Joachim WibergandGitHub 9014d7edb7 Merge pull request #1462 from kernelkit/changelog-update 2026-03-31 11:36:17 +02:00
Joachim Wiberg c0475fc886 doc: update ChangeLog for v26.01.0, add missing entries
Add several entries that were missing from the original release notes,
most notably the SBSA watchdog fix for CN913x (Marvell Octeon) platforms
and the BPI-R3 watchdog fix, plus show keystore, ixll scan, show system
temperature, WiFi signal strength inversion fix, and follow command fix.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-31 10:37:26 +02:00
Joachim WibergandGitHub de3a44e58d Merge pull request #1460 from kernelkit/releng
Documentation update and prep. for v26.03.0

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-30 16:03:59 +02:00
Joachim Wiberg 996c857e20 doc: update ChangeLog for v26.03.0
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-30 14:43:19 +02:00
Joachim Wiberg 823bba0ece doc: add migration script reminder to Developer's Guide
When a YANG model change breaks existing startup configs, a migration
script must be included or devices in the field may be left unbootable
after upgrade.  Add a dedicated section explaining when scripts are
needed, where they live, and how they work.

Fixes #1459

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-30 14:43:18 +02:00
Joachim Wiberg 93bff6260e Add project links to User Guide and update SUPPORT.md
Fixes #1456

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-30 14:43:09 +02:00
Joachim WibergandGitHub cdc28ffe00 Merge pull request #1453 from kernelkit/discovery-docs
mDNS discovery improvements
2026-03-26 14:20:12 +01:00
Mattias WalströmandGitHub 9b9ba63d09 Merge pull request #1455 from kernelkit/kernel-upgrade-a38bf031-1a49-4f5f-87c2-053f45c2ca81
Upgrade to kernel 6.18.20
2026-03-25 16:32:31 +01:00
Joachim WibergandGitHub 5b1211365b Merge pull request #1454 from kernelkit/add-migrate-script
Add migration script for confd: prevent IP addresses on bridge ports
2026-03-25 14:50:17 +01:00
ael-bot e51daefe99 Upgrade Linux kernel to 6.18.20 2026-03-25 11:59:13 +00:00
Mattias Walström 1659ca2a05 Add migration script for confd: prevent IP addresses on bridge ports
Unfortunatly the fix was entered in 25.10, but confd was not stepped
up until 25.11, so this should be for 25.10 but now it is for confd
version 1.6 (infix 25.11), as close as we can get.

this is a follwup for commit 7e37fc49a3

confd: prevent IP addresses on bridge ports

Bridge ports should not have IP addresses configured. The IP address
should be configured on the bridge interface itself, not its member ports.

Add YANG must expression to enforce this rule at configuration time.

Fixes #1122
2026-03-25 11:12:47 +01:00
Joachim Wiberg e2d1ed275b doc: update network.local screenshot and freshen up cli examples
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:45 +01:00
Joachim Wiberg 5ed71fa10d utils: ixll scan: show spinner while waiting for avahi-browse
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:45 +01:00
Joachim Wiberg cfcc83f15d netbrowse: add operational backend and fix TXT record parsing
Add a second discovery backend that reads mDNS neighbor data directly
from the sysrepo operational datastore via `copy operational-state -x
/mdns`, selectable with --backend operational.

Add an auto backend (the new default) that tries the operational data
first and falls back to avahi-browse if the `copy` command is
unavailable or mDNS is disabled (visible via "enabled": false in the
JSON).  This makes the service work correctly in all configurations
without manual tuning.

Refactor TXT record parsing into parseTxt() and service/host assembly
into buildHosts(), shared by both backends.  Extract fetchOpRoot() and
parseOperational() so scanOperational() and scanAuto() share the same
JSON fetch/decode and host-building logic without duplication.

Fix a bug where TXT values containing semicolons were truncated
(parts[9] → strings.Join(parts[9:], ";")), and apply decode() to TXT
values so avahi \DDD escapes are resolved.  Add Apple device model
support via the am= (RAOP/AirPlay 1) and model= (AirPlay 2) TXT keys.

Display the last-updated timestamp in 24-hour format regardless of the
browser's locale.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:44 +01:00
Joachim Wiberg e168633f4e statd: reliable avahi client reconnect
Add reliable avahi client reconnect via explicit free+recreate, reduced
log verbosity (single 10s warning instead of 3×2s loop).  Also, binary
TXT record filtering (UTF-8 + XML validity), and finally add a SIGHUP
handler for on-demand reconnect.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:44 +01:00
Joachim Wiberg 8d164216fc package/mdns-alias: bump to v1.2
Handles Avahi daemon startup race and runtime restarts gracefully.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:43 +01:00
Joachim Wiberg 4cb2d28e3c package/klish: only show banner in interactive mode
Meaning, skip the CLI help message in non-interactive mode, allowing for:

admin@gateway:~$ klish -c 'show mdns'
Enabled         : yes
Domain          : local
Deny            : wan

HOSTNAME           ADDRESS        LAST SEEN  SERVICES
Living-Room.local  192.168.0.139  18:50:52   trel(57249) sleep-proxy(61936) raop(7000) srpl-tls(853)
firefly-4.local    192.168.0.122  18:50:46   workstation(9)
gimli.local        192.168.0.200  18:50:46   device-info(0)
infix.local        192.168.0.1    18:50:47   https(443) workstation(9) ssh(22) https(443)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:43 +01:00
Joachim Wiberg 3a7ef41629 package/skeleton-init-finit: adjust mdns daemon's pid file path
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:42 +01:00
Joachim Wiberg 1558b6bf7e .github: coverity: use matching sysrepo + libyang versions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-22 20:23:42 +01:00
Joachim WibergandGitHub 349a89ba52 Merge pull request #1381 from kernelkit/copilot/fix-ipv6-ping-windows
Document Windows IPv6 multicast ping limitations with community verification request
2026-03-20 20:09:06 +01:00
copilot-swe-agent[bot]andJoachim Wiberg 55e9a57ae3 doc: update Windows device discovery documentation
Infix now advertises _workstation._tcp, making devices appear
automatically in Windows Explorer's Network folder (Win 10 1709+).
Lead with this, show .local hostname usage for ping/SSH, and demote
the IPv6 multicast ping caveat to a note.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 20:08:20 +01:00
Joachim WibergandGitHub 15d6947207 Merge pull request #1412 from kernelkit/initviz
Optimize boot time and consolidate confd into a single daemon                                                             

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 19:17:47 +01:00
Joachim Wiberg e536deab65 doc: update ChangeLog, sorting fixes in number order
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 17:06:18 +01:00
Joachim Wiberg a556abbdfc doc: expand test-arch with physical device test mode instructions
Also, update testing-overview.svg to support dark mode view.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 17:06:17 +01:00
Joachim Wiberg d3dc47ac8e .github: add libavahi-client-dev to Coverity Scan dependencies
statd now uses avahi-client for mDNS neighbor tracking, so the
native build needs libavahi-client-dev to satisfy pkg-config.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 17:06:17 +01:00
Joachim Wiberg cf08b577ed test: gps_simple: wait for full position data before has_fix()
has_fix() only checks that fix-mode is set (2d/3d), but altitude and
other fields may not yet be populated in the operational datastore when
gpsd is still processing its first NMEA cycles after boot.  Calling
verify_position() immediately after has_fix() passes can therefore race
and fail with:

  KeyError: 'altitude'

This manifests reliably on the second GPS receiver (gps1) after reboot,
because it is initialized slightly later than gps0 and hits the window
where fix-mode is set but altitude has not yet appeared.

  not ok 11 - Verify gps1 position is near the coordinates
  # Traceback (most recent call last):
  #   File "test/case/hardware/gps_simple/test.py", line 29, in verify_position
  #     alt = float(state["altitude"])
  #                 ~~~~~^^^^^^^^^^^^
  # KeyError: 'altitude'

Add has_position() to infamy/gps.py, which gates on fix-mode AND all
position fields (latitude, longitude, altitude, satellites-used) being
present.  Replace the has_fix() polls in both the pre- and post-reboot
verify steps with has_position().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 17:05:36 +01:00
Joachim Wiberg 1c6c7724b9 test: iface_phys_address: use chassis MAC and add until() guards
Replace fragile SSH+jq approach for reading the chassis MAC with a
NETCONF query to ietf-hardware:hardware/component[name='mainboard'],
reading phys-address directly from the YANG model.

Also add until() polling to the chassis MAC and chassis+offset MAC
verification steps, consistent with the reset-to-default steps.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:17 +01:00
Joachim Wiberg 94a036be3a test/infamy: retry copy() on ConnectionError in restconf transport
A service restart triggered by finit during sysrepo callbacks can drop
an in-flight HTTP connection, causing copy("candidate", "running") to
fail with RemoteDisconnected.  Add retry logic consistent with the
existing PATCH retry pattern in put_config_dict().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:17 +01:00
Joachim Wiberg 281f027749 test/infamy: wait for transport reachability after test_reset()
test_reset() triggers a config reload which causes services such as
rousette to restart.  Wait for the transport to become reachable again
before returning from attach(), preventing subsequent API calls from
racing with a still-restarting backend.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:16 +01:00
Joachim Wiberg 4dee5e4f1f package/rousette: silence rousette warnings in log
Add --log-level command line option to filter out log messages from
lower log levels.  Then fix the annoying CzechLight warning message
and useless "NACM config validation" log.  Then add audit trail as
we have in netopeer2-server, and finish off by stripping redundant
fields from log message: timestamp, identity, and log level.

Fixes #892

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:16 +01:00
Joachim Wiberg e9f165ebd8 patches/libnetconf2: silence netopeer2-server warnings in log
Fixes #1446

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:16 +01:00
Joachim Wiberg abad3cedc6 confd: actually fix stratum-weight semantics and flaky test
The setting 'stratumweight 0.0' disables stratum in Chrony source
selection (pure distance-based), making client_stratum_selection
non-deterministic on a LAN.  Setting it to 1.0 gives srv1 a 1-second
effective advantage per stratum level, which no realistic distance
fluctuation can overcome.

Also correct the YANG descriptions in infix-system and infix-ntp which
had the semantics backwards — claiming 0.0 "ensures lower stratum is
always preferred" when in fact higher values do that.

Fixes #1361

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:15 +01:00
Joachim Wiberg 7b4e9b3366 confd: skip bootstrap on restart using a sentinel file
After a successful bootstrap confd writes a sentinel to /run/confd.boot
If Finit restarts confd — whether after a crash or a clean exit — the
sentinel is found and the destructive bootstrap phases are skipped:

 - gen-config fork (factory/failure configs already exist)
 - wipe_sysrepo_shm() (other daemons, e.g. statd, are live)
 - sr_install_factory_config() (datastores are already initialised)
 - sr_replace_config(NULL, NULL) (running datastore is consistent)
 - bootstrap_config() / load startup-config (not needed; sysrepo has
   the right state; plugins resync via SR_EV_ENABLED on re-subscribe)

On restart confd reconnects to sysrepo, re-initialises plugins (which
re-subscribe and receive SR_EV_ENABLED to resync with the live running
datastore), then enters the steady-state event loop.

The sentinel lives on tmpfs so a real reboot always produces a clean
slate.  Crash-loop protection is delegated to Finit's max-restarts (10).

As a side-effect this also enables a future "run-once" mode for resource
constrained systems: confd can exit after bootstrap and the sentinel
ensures any later restart just re-attaches without re-bootstrapping.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:15 +01:00
Joachim Wiberg ed1d6b7d5c confd: replace systemf() shell-outs with POSIX/libite/libsrx APIs
Replace remaining systemf() calls that invoke simple file-system
operations with direct C API equivalents, eliminating unnecessary
fork/exec overhead:

 - mkdir -p     → mkpath() from libite
 - ln -sf       → erase() + symlink() from libite/POSIX
 - rm -rf       → rmrf() from libsrx helpers
 - rm -f dir/*  → rmrf() + mkpath() to clear and recreate the dir

Files updated: dagger.c, containers.c, firewall.c, services.c, system.c

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:14 +01:00
Joachim Wiberg 0ee3159ac6 confd: replace initctl shell-outs with direct finit_ C API
Add a finit_enable/disable/reload() family in core.c that directly
manipulates Finit's service state without fork+exec overhead:

  finit_enable(svc)  -- create symlink in /etc/finit.d/enabled/
  finit_disable(svc) -- remove symlink from /etc/finit.d/enabled/
  finit_delete(svc)  -- remove both symlink and service entirely
  finit_reload(svc)  -- utimensat() on .conf to schedule reload

Printf-style variants (finit_enablef/disablef/reloadf) handle
template instance names such as container@foo and hostapd@wlan0.

All systemf("initctl ... enable/disable/touch ...") call sites across
containers, dhcp-server, firewall, hardware, ntp, routing, services,
syslog, and system are converted to the new API.

As a related cleanup in services.c, drop the remaining srx_enabled()
calls in favour of reading the already-fetched config tree directly
via lydx_is_enabled(lydx_get_xpathf(config, ...)), eliminating the
last sysrepo round-trips from that module.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:14 +01:00
Joachim Wiberg bc6313d2db confd: services: only enable/disable or touch on actual changes
Previously svc_enadis() would call 'initctl enable + touch' for every
config change event, even when the service's enabled state was unchanged.
This caused rousette to be unnecessarily restarted on every test_reset(),
racing with the active RESTCONF connection on slow hardware.

Replace svc_enadis() and svc_change() with svc_enable() which only
manages nginx symlinks and calls 'initctl enable/disable' -- never touch.
Each handler now checks the diff for the specific leaf that changed:

- If /enabled appears in diff: call svc_enable() to start or stop it
- If other config leaves changed with service already enabled: touch only

This ensures rousette, ttyd, netbrowse, avahi, sshd, and lldpd are only
restarted when their configuration actually requires it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:13 +01:00
Joachim Wiberg 0884227afa confd: optimize, skip dagger generation when no change
Save a few CPU cycles by skipping a new dagger generation when no
interfaces have been modified/added/deleted.

Uses d->next_fp as the sentinel: NULL means no claim was made for this
transaction.  dagger_evolve() and dagger_abandon() now NULL it after
fclose, so subsequent unclaimed transactions also get the clean early
return.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:12 +01:00
Joachim Wiberg 7f2fbc8bbf statd: avahi: rename avahi subsystem to mdns
The operator sees Infix through YANG models and should not need to know
which library implements a given feature.  Rename the public-facing
parts of the avahi module to use the mdns vocabulary:

- Log strings: "avahi: ..." → "mdns: ..."
- Public API:  avahi_ctx_init/exit → mdns_ctx_init/exit
- Main type:   struct avahi_ctx → struct mdns_ctx
- statd field: statd.avahi → statd.mdns

Internal types (struct avahi_neighbor, avahi_service, …) and file names
(avahi.c, avahi.h) are kept as-is — developers debugging at the C level
benefit from knowing the underlying implementation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:12 +01:00
Joachim Wiberg fee552196a statd: avahi: suppress transient mDNS daemon restart errors
When the mdns service is stop-started (e.g. after a config change),
statd's avahi client fires AVAHI_CLIENT_FAILURE momentarily.  With
AVAHI_CLIENT_NO_FAIL the client reconnects automatically, but the
immediate ERROR log is misleading:

  ERROR: avahi: client failure: Daemon connection failed

New behavior:
- On AVAHI_CLIENT_FAILURE: start a 2 s deferred timer (no immediate log)
- Timer fires up to 3 times (~6 s total); on the 3rd attempt, check if
  mDNS is enabled in the running config via a temporary sysrepo session
- Log ERROR only if the daemon is still down AND mDNS is enabled
- On AVAHI_CLIENT_S_RUNNING: cancel the timer, reset the counter, and
  log NOTE "mDNS daemon reconnected" if a failure had been seen

This silences the error entirely when the operator has disabled mDNS
(expected), and defers it by ~6 s for a brief restart (self-heals
before the timer fires).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:11 +01:00
Joachim Wiberg adee27f923 Minor, consolidate naming and adjust avahi + mdns-alias conditions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:11 +01:00
Joachim Wiberg 9472e08262 confd: clean up, simplify use common log framework
- Use same log frameworks as reset of confd
 - Use existing primitives from libite + libsrx
 - Drop remaining pthreads
 - Coding style fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:10 +01:00
Joachim Wiberg d3c091e746 statd: optimize yanger invocation time and reduce command overhead
Replace logging + logging.handlers with a lightweight syslog wrapper,
and argparse with manual argv parsing.  On a sama7g54, this cuts yanger
startup from ~770ms to ~470ms by eliminating ~300ms of stdlib imports.

Also batch external command invocations:

 - ietf_routing: two sysctl calls instead of two per interface
 - ietf_hardware: one ls per hwmon device instead of six
 - bridge: fetch mctl querier data once instead of once per VLAN

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:10 +01:00
Joachim Wiberg 5583b97da9 confd: fix duplicate keystore log messages at boot
Only install the keys on CHANGE event, fixes this annoying issue:

Nov 5 01:32:10 ix confd[2011]: Installing HTTPS gencert certificate "self-signed"
Nov 5 01:32:10 ix confd[2011]: Installing SSH host key "genkey".
Nov 5 01:32:11 ix confd[2011]: Installing HTTPS gencert certificate "self-signed
Nov 5 01:32:11 ix confd[2011]: Installing SSH host key "genkey".

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:09 +01:00
Joachim Wiberg 9e7cdf492f confd: replace sysrepo threads with libev event loop
Use SR_SUBSCR_NO_THREAD for all subscriptions and integrate sysrepo
event pipes into a libev event loop.  This eliminates approximately 30
per-subscription threads, reducing overhead on embedded ARM hardware.

A temporary poll-based "event pump" thread handles callback dispatch
during bootstrap (where sr_replace_config blocks waiting for callbacks),
then exits.  After bootstrap, the single-threaded libev loop takes over
for steady-state event processing.

Note, the confd-test-mode plugin still requires use of threads so we do
not create deadlocks when calling sr_replace_config().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:09 +01:00
Joachim Wiberg 929f53d270 board/aarch64: enable root hub transaction translator for ehci/ohci
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:08 +01:00
Joachim Wiberg 1966d104c9 board/arm: relocate rpi2 kernel config to board support package
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:08 +01:00
Joachim Wiberg 3507cd5601 doc: document new 'gencert' default https cert
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:07 +01:00
Joachim Wiberg 97c26d36bf confd: migrate https cert from /cfg/ssl to ietf-keystore
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:07 +01:00
Joachim Wiberg 06361032d2 confd: add support for user configurable https certificate
- Add x509-public-key-format identity to crypto-types
 - Add certificate node to web services container
 - Use certificate from ietf-keystore as web cert

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:07 +01:00
Joachim Wiberg f61e1580cd configs: drop wifi and gps support from minimal builds
Neither the Raspberry Pi 2B or the Microchip SAMA7G54-EK board have WiFi
hardware by default so drop WiFi, and GPS, support to allow for smaller
builds with only the bare essentials in kernel and system.

Minimal builds in general don't need WiFi or GPS either, so let's disable
them from all.  This may become a central theme going forward, keeping
the minimal builds ... minimal.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:06 +01:00
Joachim Wiberg 8d87465876 board/common: fix race between confd bootstrap and test_reset RPC
netopeer2 and rousette were starting as soon as confd had a PID, while
confd was still loading the startup config via sr_replace_config().  This
held a write lock on the running datastore.  A test calling test/reset
shortly after the NETCONF port opened would have its own sr_replace_config()
block on that lock for up to 60 s, at which point sysrepo timed out the
whole RPC with "SHM event 'rpc' processing timed out".

Fix by adding the usr/bootstrap condition to both management servers so
they don't accept connections until confd signals that bootstrap is complete.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:06 +01:00
Joachim Wiberg f257ab58d4 board/common: probe for wifi radios
Relocate probe of wifi radios from gen-hardware to 00-probe.  This saves
one python invocation and some precious CPU cycles at boot.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:05 +01:00
Joachim Wiberg 07f23ec4f5 board/common: move hostname.d setup at runtime to build-time
Follow-up to 90f619b which first introduced the /etc/hostname.d concept.

This commit moves the setup of /etc/hostname.d to post-build.sh dropping
the initial call to the hostname activation script a bit, since it is
called anyway after bootstrap has finished.  The scrip is also given a
bit of a refrehs, reducing overhead and needless log messages.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:05 +01:00
Joachim Wiberg 4ca53f8ec2 confd: consolidate gen-config to start earlier
Allow confd to start even earlier at boot and call 'gen-config' as a
background task, pending on it to complete before we load the sysrepo
factory datastore.

Also, add Finit style progress to console so users can see the phases
of the bootstrap process.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:04 +01:00
Joachim Wiberg 4bc08e7323 Drop useless logger processes, these services already use syslog
Note, rousette does not support SIGHUP, so let's mark it as such.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:04 +01:00
Joachim Wiberg 9c2a90c07a statd: move start to runlevel 2 to save CPU cycles at bootstrap
Also, we don't need to start a logger process for statd, it behaves
nicely and uses syslog.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:03 +01:00
Joachim Wiberg 3deb021bce board/common: postpone start of dbus to after confd bootstrap
Infix technically does not need to start dbus and dnsmasq before confd
has loaded the system startup-config.  So we move it in time to save
some CPU cycles for confd & C:o.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:03 +01:00
Joachim Wiberg 77a7915e1f confd: replace sysrepo-plugind + bootstrap + load with single daemon
On single-core Cortex-A7, the YANG bootstrap and config loading is the
dominant boot bottleneck.  The current sequence spawns three serial
phases (bootstrap, sysrepo-plugind, load), each performing independent
sr_connect()/sr_disconnect() cycles, and every sysrepoctl/sysrepocfg
invocation is a fork+exec that rebuilds SHM from scratch.

Replace all three with a single confd binary that does one sr_connect()
and performs all datastore operations in-process:

 - Wipe stale /dev/shm/sr_* for a clean slate
 - sr_install_factory_config() from the generated JSON
 - Smart migration: compare config version via libjansson, only
   fork+exec the migrate script when versions actually differ
 - Load startup-config (or test-config) via lyd_parse_data() +
   sr_replace_config(), mirroring what sysrepocfg -I does internally
 - On failure: revert to factory-default, load failure-config, set
   login banners (Fail Secure mode)
 - On first boot: copy factory-default to running, export to file
 - dlopen plugins and enter event loop

The bootstrap shell script is split: config generation (gen-hostname,
gen-interfaces, etc.) stays in the new gen-config script, while all
sysrepo operations move into the C daemon.  The finit boot sequence
collapses from 5 stanzas to 2 (gen-config -> confd).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:03 +01:00
Joachim Wiberg 3b85fdff87 doc: minor fixes
- Markdown syntax
 - Grammar fixes
 - Use lowdown's admonition syntax
 - Update examples

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:02 +01:00
Joachim Wiberg ea5071a264 package/finit: backport upstream fixes
Backport fixes from upstream post v4.16 release.  Mainly to fix
mdns-alias crash+restart counter issue when avahi-daemon has to
be restarted.  Finit did not properly clear the dependency that
mdns-alias had on avahi-daemon, causing it to crash and have its
restart counter incremented.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:02 +01:00
Joachim Wiberg 50be4d1a43 package/initviz: new package
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:01 +01:00
Joachim Wiberg 63c3d244ae board/arm: trim kernel defconfig
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:01 +01:00
Joachim Wiberg 7050f400d5 board/arm: sama7g54-ek: enable sdmcc high speed modes
For details, see:
 - https://github.com/linux4sam/u-boot-at91/commit/23ac019
 - https://github.com/linux4sam/linux-at91/commit/5b35500

U-Boot patches imported and refreshed in local KernelKi fork of U-Boot,
see https://github.com/kernelkit/u-boot/tree/v2025.01-kkit

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:00 +01:00
Joachim Wiberg 23cbfd6f4e board/arm: disable u-boot environment, use aux partition
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:00 +01:00
Joachim Wiberg e2bb1cfbe0 board/arm: fix rauc system.conf 2026-03-20 16:17:59 +01:00
Joachim Wiberg 95abdac7ee board/arm: update board list with Microchip SAMA7G54 eval kit
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:17:59 +01:00
Joachim Wiberg 0a7bd76ede configs/sama7g54_ek_*_boot_defconfig: switch to upstream U-Boot
The v2025.01 release supports the Microchip SamA7G5* eval kit(s), which
means we can enjoy the same patch level of U-Boot as other Infix boards

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:17:59 +01:00
Joachim Wiberg f8ef10ff2f board/common: optimize busybox for speed, drop fork+exec for applets
- The biggest changes are syncing with latest BusyBox (busybox-update-config)
 - Disable optimize for size
 - Enable feature "SH_NOFORK" which allows /bin/sh to call applet_main()
   directly without having to fork+exec busybox

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:17:58 +01:00
Joachim WibergandGitHub 2137a3bf75 Merge pull request #1452 from kernelkit/kernel-upgrade-b6b7879b-4015-4b73-a84d-a83dd6049546 2026-03-19 18:36:41 +01:00
ael-bot b38c039be1 Upgrade Linux kernel to 6.18.19 2026-03-19 16:35:18 +00:00
Joachim WibergandGitHub 63f9e8a939 Merge pull request #1451 from kernelkit/frr
Bump FRR to 10.5.3

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-18 17:58:04 +01:00
Mattias Walström be85775e50 Bump FRR to 10.5.3
For change log, see:
     https://github.com/FRRouting/frr/releases/tag/frr-10.5.3
2026-03-18 16:18:44 +01:00
Mattias WalströmandGitHub 2fea1e4a2b Merge pull request #1450 from kernelkit/upgrade-buildroot
Bump buildroot to 2025.02.12 (LTS)
2026-03-18 14:18:43 +01:00
Mattias Walström fcf9782a8c Bump buildroot to 2025.02.12 (LTS)
Alot of CVE fixes, see https://github.com/buildroot/buildroot/blob/2025.02.x/CHANGES
2026-03-17 21:48:51 +01:00
Mattias WalströmandGitHub f1584f5937 Merge pull request #1449 from kernelkit/kernel-upgrade-399f2582-484c-438e-b83c-92bd62c5dd9f
Upgrade to kernel 6.18.18
2026-03-17 08:18:27 +01:00
ael-bot 3d67876136 Upgrade Linux kernel to 6.18.18 2026-03-16 15:04:32 +00:00
Joachim WibergandGitHub 0f01012c07 Merge pull request #1447 from kernelkit/refactor-actions
Move local GitHub actions to kernelkit/actions repo

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-16 15:48:54 +01:00
Joachim WibergandClaude Sonnet 4.6 63f46d4d43 .github: move local actions to kernelkit/actions repo
Fixes a regression from 0c11cea where local composite actions
(.github/actions/) were referenced with relative paths. When spins
reuse our reusable workflows, GitHub resolves relative action paths
in the context of the calling repo, not infix — breaking the build.

Replace all uses of ./.github/actions/{cache-restore,podman-cleanup}
with kernelkit/actions/{cache-restore,podman-cleanup}@v1 (new repo).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 14:38:58 +01:00
Joachim WibergandGitHub 5487344034 Merge pull request #1444 from kernelkit/another-netd-fixup 2026-03-13 07:15:27 +01:00
Joachim Wiberg 3e762e6111 confd: Use ERRNO() instead of ERROR() after POSIX API failures
Replace ERROR() with ERRNO() in all error paths following POSIX API
calls (fopen, rename, realloc, fmkpath, etc.), removing redundant
manual strerror(errno) formatting where present.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 22:27:52 +01:00
Joachim Wiberg af15e65087 package/netd: ensure /etc/net.d exists at boot
Before netd starts confd might want to create .conf file for it to run,
so we sort of depend on /etc/net.d existing at boot.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 22:08:25 +01:00
Joachim WibergandGitHub 03b4466e09 Merge pull request #1443 from kernelkit/kernel-upgrade
Upgrade Linux kernel to 6.18.17

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 19:19:32 +01:00
Mattias Walström a1903a893a Upgrade Linux kernel to 6.18.17 2026-03-12 15:08:12 +01:00
Joachim WibergandGitHub b9cbbb053d Merge pull request #1440 from kernelkit/default-route-at-boot
Fix missing default route at boot

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 13:49:34 +01:00
Joachim Wiberg 49c66ee957 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 12:07:57 +01:00
Joachim Wiberg 43f3bf0322 board/common: make dnsmasq authoritative, drop redundant options
Set dhcp-authoritative so clients with unexpired leases are not NAKed
after a router crash or factory reset that clears the lease database.

Drop the untagged suppress directives for options 3 (router) and 6
(dns-server): they conflict with the global options confd writes to
dnsmasq.d/, causing spurious "Ignoring duplicate dhcp-option" warnings.
Per-subnet tagged options already suppress auto-detection, and without
an active dhcp-range there is nothing to suppress anyway.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 12:07:57 +01:00
Joachim Wiberg ba8d1f6b4a confd: fix DHCP client hostname reporting, rpi-%m -> rpi-c0-ff-ee
Ensure we translate the hostname before we generate the udhcpc command
line options, otherwise we'll send '-x hostname:rpi-%m' to udhcpc.

Also update all board specific factory configs with the missing setting
'"value": "auto"' for the DHCP hostname option.  This to match what we
already do when we infer options when enabling a DHCP client in the CLI.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 12:07:56 +01:00
Joachim Wiberg 221fea13a2 netd: watch conf.d with inotify, retry on backend failure
Two races could prevent DHCP-learned default routes from being installed
at boot:

1. The signal from the DHCP client script could be lost leaving conf.d
   updated but frr.conf stale.

2. Even when the signal was received, 'vtysh -b' could fail because the
   FRR daemon chain (mgmtd→zebra→staticd) writes PID files before being
   fully operational, causing netd to give up with no retry.

Fix both by refactoring netd to use libev:

- Use an inotify watch of CONF_DIR, so netd reacts directly to file
  changes without depending on signal delivery.

- On backend_apply() failure, schedule a retry in 5s and call pidfile()
  unconditionally so dependent services are not blocked waiting for the
  Finit condition 'pid/netd' to be satisfied.

We also take this opportunity to rename /etc/netd/conf.d/ to /etc/net.d/
The extra /etc/netd/ directory level served no purpose — nothing else
lives there.  Flatten to /etc/net.d/ which reads more naturally as the
drop-in directory for network configuration snippets.

Also, reduce logging a bit since each netd backend already logs success
or fail which is sufficient to know that a configuration change has been
applied or not.

Finally, with the new inotify processing in netd it's redundant to call
'initctl reload netd' from the udhcpc script, in fact it will only cause
unnecessary overhead, so we drop it.

Fixes #1438

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-12 12:07:49 +01:00
Joachim WibergandGitHub cb243304ad Merge pull request #1436 from kernelkit/ospf-neighbor-must-expression
OSPF neighbor must expression

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-11 12:33:12 +01:00
Joachim Wiberg fc757a439a doc: amend static neighbors to new OSPF point-to-multipoint
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-11 11:16:02 +01:00
Joachim Wiberg 757afe5206 confd: follow-up to OSPF point-to-multipoint
Add a must expression to ensure users do not set static neighbors when
the interface type is not point-to-multipoint or non-broadcast.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-11 11:16:01 +01:00
Joachim WibergandGitHub 5b7b0bc249 Merge pull request #1430 from kernelkit/bpi-r64
Add support for Banana Pi BPi-R64

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-11 09:48:44 +01:00
Joachim WibergandGitHub d04f493f08 Merge pull request #1435 from kernelkit/ospf-point-to-multipoint
Followup OSPF point-to-multipoint
2026-03-11 09:30:35 +01:00
Mattias Walström f0b220b6e7 Followup OSPF point-to-multipoint
[skip ci]
2026-03-11 09:12:48 +01:00
Joachim WibergandGitHub f35e3b3ec3 Merge pull request #1429 from kernelkit/ospf-point-to-multipoint
ospf: add point-to-multipoint and hybrid interface type support

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 15:15:11 +01:00
Mattias Walström 312b856fba ospf: add point-to-multipoint and hybrid interface type support 2026-03-10 12:44:47 +01:00
Joachim Wiberg 4deaee0b8e doc: update changelog with BPi-R64 and RPi-400 support
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:33 +01:00
Joachim Wiberg 121abe7891 .github: add bpi-r64 to image builder
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:11 +01:00
Joachim Wiberg cc10b70f19 wifi: add Mediatek MT7615 firmware
Used in BPI-MT7615 802.11ac PCIe WiFi card for the BPi-R64 router board.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:11 +01:00
Joachim Wiberg 6560af1b94 board: add support for Banana Pi BPI-R64
Add board support for the BananaPi BPi-R64 router board, based on the
MediaTek MT7622 SoC and MT7531 Gigabit Ethernet switch.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:10 +01:00
Joachim Wiberg 784b911253 patches/genimage: add gpt-protective-first option for hybrid MBR
In a hybrid MBR the conventional layout (used by gdisk and others) is:

  MBR[0] = 0xEE  (GPT protective, covers whole disk)
  MBR[1..3] = user-selected GPT partitions with legacy type codes

genimage currently appends the 0xEE entry after the data partitions,
producing the opposite order.  This is fine for most platforms, but
breaks firmware that detects GPT by inspecting only MBR entry 0: seeing
a non-0xEE type there it falls into pure-MBR mode and cannot look up
GPT partitions by name.

The TF-A partition driver (drivers/partition/partition.c) exhibits
exactly this behaviour: load_mbr_header() copies entry[0] and checks
type == 0xEE to select between MBR and GPT mode.  The MediaTek MT7622
platform (BananaPi BPI-R64) is a concrete example where this matters.

On the other hand, Raspberry Pi firmware scans all MBR slots for a
bootable FAT32 partition.  If slot 0 holds a 0xEE protective entry the
firmware switches to GPT detection, looks for an EFI System Partition
UUID, and reports "no bootable partitions" when none is found.

Add an opt-in hdimage option `gpt-protective-first = true` that places
the 0xEE entry at slot 0 and shifts data partitions to slots 1..3.
The default (false) preserves the existing genimage behaviour so that
platforms like Raspberry Pi continue to work without any changes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:10 +01:00
Joachim Wiberg 35ba2ca37f board/aarch64: add dedicated RPi 400 product configuration
The Raspberry Pi 400 shares hardware with the RPi 4B but differs in one
important way: it has an internal keyboard and mouse connected through a
VIA Labs USB hub on the VL805 xHCI controller.  Break the symlink to
raspberrypi,4-model-b and maintain a dedicated product directory.

Factory config changes from the 4B default:
- USB1/USB2/USB3 all unlocked: USB2 carries the internal keyboard hub
  and USB3 the superspeed companion; all are unlocked as this is a
  desktop device
- DHCP vendor-class corrected to "Raspberry Pi 400"

Also add interface-quirks.json for the eth0 PHY detach behaviour and
the smsc95xx broken flow-control quirk (inherited from the 4B config
but now explicit), and remove the spurious bootable flag from the
primary and secondary rootfs partitions in genimage.cfg.in.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:09 +01:00
Joachim Wiberg e16f0a2504 board/aarch64: enable HDMI display output on RPi4
Remove console=map:0 from the [pi4] section which was suppressing HDMI
output and disabling the display getty.  Making it really difficult to
use it as a regular console.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:09 +01:00
Joachim Wiberg 799fd93cac board/common: fix authorization cascade for internal USB hubs
Two related problems prevented devices behind an intermediate hub (e.g.
the VIA Labs hub on the RPi 400's VL805 xHCI) from being authorized
when confd unlocks a USB bus:

1. Cascade ordering: usb_authorize() ran nftw() with FTW_DEPTH, which
   visits children before the root-hub entry.  The hub was authorized
   while authorized_default was still 2, so when the kernel probed the
   hub's children it immediately denied them.  Fix: write
   authorized_default=1 on the bus before entering nftw.

2. Slow/async probe: hub port enumeration is asynchronous — devices
   behind a hub may appear in sysfs after nftw has already finished.
   Fix: add a udev rule that catches usb_device add events on buses
   where authorized_default=1 is already set on any ancestor root hub
   and authorizes them immediately.

The ATTRS{} matcher in udev walks the full sysfs parent chain, so
authorized_default=1 on the root hub is visible even for devices several
hubs deep.  Buses still locked at authorized_default=0 are left alone.

Also expand the docstring in generic_usb_ports() to document the
design: each root hub gets its own uniquely-named entry (USB, or USB1/
USB2/... when multiple) so buses can be individually controlled, and
boards needing finer control should use DT usb-ports annotations.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:08 +01:00
Joachim Wiberg 726a3132e3 board/common: optimize sysctl-sync-ip-conf, drop filtering loop
Replace the costly read-only filter loop (awk+tr per line) with a
stderr redirect, use /sys/class/net/ instead of ip+jq, and batch
all sysctl writes into a single call.

Reduces boot time by ~4s on 32-bit Arm systems.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:08 +01:00
Joachim Wiberg 6994e5dd63 board/common: mnt: drop tune2fs and speed up mounting
Calling tune2fs for ext4 partitions at boot costs more than one second
boot time on 32-bit Arm systems, with very little gain.  Dropping this
restores the default periodic fsck *and* saves boot time.

Instead of calling sgdisk four times, call it only when resizing and
instead use sysfs to find named paritions.  Saves seconds on boards
with weaker CPU and slow media.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-10 12:11:05 +01:00
Joachim WibergandGitHub 5bb21e5221 Merge pull request #1432 from kernelkit/kernel-upgrade-c773e829-0c4b-45bc-ab56-a3c57307ccfb
Upgrade to kernel 6.18.16
2026-03-10 12:10:50 +01:00
ael-bot 04eef91c0d Upgrade Linux kernel to 6.18.16 2026-03-10 04:53:43 +00:00
Joachim WibergandGitHub 6c8eeb2a5f Merge pull request #1425 from kernelkit/mdns-fixes
Mdns fixes
2026-03-09 19:26:41 +01:00
Joachim Wiberg 784be611de doc: update ChangeLog with fixes and enw features
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:13 +01:00
Joachim Wiberg cdd56e6a2d doc: document how to add a default route
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:05 +01:00
Joachim Wiberg 4b39b2c2d3 board: relocate SafeXcel firmware selection to Marvell BSPs
The MVEBU SafeXcel Crypto Engine firmware (linux-firmware minifw) was
originally added in 70c12c3 to the generic aarch64 defconfigs to silence
kernel probe failures on Marvell Armada SoCs (37xx, 7k, 8k, CN913x):

  crypto-safexcel f2800000.crypto: Firmware load failed.
  crypto-safexcel f2800000.crypto: HW init failed (-2)

It was then accidentally dropped in 0e2d12e (kernel upgrade to 6.18),
which rebased on a tree that predated the firmware addition.

Rather than restoring it to the generic defconfigs, move it to the two
Marvell board Config.in files where it actually belongs — consistent
with how RTL8169 firmware was handled for the Raspberry Pi CM4 IoT
Router Board Mini in 68313773.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:04 +01:00
Joachim Wiberg b2c729dc7d utils: fix kernel-upgrade.sh clobbering existing ChangeLog entries
The awk insertion path used getline to peek at the line right after the
"### Changes", but only printed it when NF == 0 (blank line).  If the
section already had a non-blank entry (e.g. a Buildroot upgrade line),
getline consumed it silently and the kernel line was written in its
place.

Fix by adding the missing else branch so the consumed line is always
re-emitted — blank lines before the new entry, non-blank lines after it.

Also demote the missing-UNRELEASED guard from exit 1 to a warning with
return 0, so the workflow doesn't abort when a new release cycle hasn't
had its ChangeLog section opened yet.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:04 +01:00
Joachim Wiberg 290c03b2b5 cli: add 'ssh' commands to log onto other devices and manage keys
Add three SSH-related commands to the operational CLI:

  ssh [user <name>] [port <num>] <host>
      Connect to a remote device over SSH, running as the
      CLI user (not root) by dropping privileges before exec.

  set ssh known-hosts <host> <keytype> <pubkey>
      Pre-enroll a host public key received out-of-band (e.g.
      via email after a factory reset) into ~/.ssh/known_hosts,
      avoiding a TOFU prompt on first connect.

  no ssh known-hosts <host>
      Remove a stale host key entry using ssh-keygen -R, e.g.
      after a device factory reset causes a key mismatch.

Tab completion is provided for key types (ssh-ed25519,
ecdsa-sha2-nistp256, etc.) and for known host names/IPs.

A new run_as_user() helper is introduced alongside the existing
run(), factoring out the fork+setuid+execvp pattern used by
infix_shell() so it can be shared across the SSH functions.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:03 +01:00
Joachim Wiberg b9a8014e41 patches: lift iptables name length limit in firewalld
A legacy name length limit in firewalld triggered problems with longer
policy names.  This patch to firewalld lifts that limit by checking the
backend in use, no limit for nftables.

Fixes #1389

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:03 +01:00
Joachim Wiberg 27a07d0179 statd: silence 'show firewall' when firewall is disabled
Fixes #1416

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:26:02 +01:00
Joachim Wiberg 2d9f973e82 statd: add operational support for mDNS neighbors
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:59 +01:00
Joachim Wiberg 09c649f0b3 test: update gps test spec.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:29 +01:00
Joachim Wiberg 982e610fef test: infamy: always emit the "1..N" plan line before exiting
Always emit the "1..N" plan line before exiting with error so test
harnesses don't report "test error, no plan" for failed or aborted
tests.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:29 +01:00
Joachim Wiberg 9ea1e82728 package/skeleton-init-fint: increase zebra netlink buffer
Increase Zebra NETLINK buffer to fix reported issues with zebra being
out of sync with kernel routes and interface changes.

Also, try '-a' option to allow other processes to delete zebra routes.

Other changes in this commit:
 - Minor fixes to Finit service files for consistency
 - Empty daemon.conf stub files to silence bogus mgmtd errors at startup
 - Relocate all skeleton files from board/common to separate from files
   that are actual Infix additions and what's package system integration

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:29 +01:00
Joachim Wiberg 7a23181b96 board/common: serve network.local over plain HTTP (port 80)
network.local is a discovery/browse page, not a management interface.
Serving it over HTTP eliminates the self-signed certificate warning
browsers show for .local mDNS names without changing the security
posture of the actual device management pages (still HTTPS-only).

The new port-80 server_name block takes precedence over the catch-all
HTTP → HTTPS redirect in default.conf.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:28 +01:00
Joachim Wiberg 0489fb5403 netbrowse: skip loopback addresses when displaying device IP
avahi-browse returns 127.0.0.1 (or ::1) when resolving services on the
same machine netbrowse is running on. These addresses are meaningless
for display and misleading as click targets. Skip the entire 127.x/::1
range and link-local (fe80:) when choosing the preferred address for a
host card; the card addr field is simply omitted if no routable address
is seen.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:28 +01:00
Joachim Wiberg 585907daae netbrowse: show IP, product/version on cards; sun/moon theme icons
- IP address shown in soft parens on the card header line, e.g.
  "infix.local (192.168.1.10)"; IPv4 preferred over IPv6, link-local
  skipped
- Product name and OS version (from mDNS TXT records "product=" and
  "ov=") shown as a secondary line below the header when available
- Theme toggle icons changed from ◐/●/○ to ◐/☽/☀ (system/dark/light)
- browse.go: introduce Host struct (addr, product, version, other, svcs)
  replacing the flat []Service map; scan() now returns map[string]Host
- Search also matches against IP, product, and version fields

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:27 +01:00
Joachim Wiberg 62559655dc netbrowse: modernize UI with card layout and theme support
Replace the Go template + table layout with a fetch-based design:
serve browse.html as static HTML, add /data JSON endpoint.

New UI features:
- Card-per-device grid with color-coded service badges
- Dark/light/system theme toggle (persisted to localStorage)
- Live search (press / to focus)
- Auto-refresh toggle with 30 s countdown, off by default
- Empty/error states and device count in footer
- IBM Plex Mono throughout

Download the latin-subset woff2 files (weights 400/500/600) from
fonts.gstatic.com (IBM Plex Mono v20) and serve them locally via
the existing //go:embed static mechanism, eliminating the Google
Fonts dependency for air-gapped and offline deployments.

  Source:  https://github.com/IBM/plex
  Files:   fonts.gstatic.com/s/ibmplexmono/v20/
  License: SIL Open Font License 1.1 (static/fonts/LICENSE.txt)
	     Copyright © 2017 IBM Corp.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:27 +01:00
Joachim Wiberg c68db78309 netbrowse: fix device detection in default view
Apple devices (e.g. Apple TV) publish vv=1 in their AirPlay/RAOP TXT
records, causing a false positive with our Infix platform marker.
Tighten the filter to require vv=1 together with at least one management
service type (ssh, https, http, netconf, restconf), which Apple devices
never advertise. Keep on=Infix as a fallback for older firmware that
predates vv=1.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:26 +01:00
Joachim Wiberg 87c671b4cc netbrowse: fix DNS-SD service name decoding
avahi's parseable output uses \DDD decimal escape sequences, not octal.
The previous decoder treated them as octal, causing digits 8 and 9 to
fall through undecoded (e.g. \058 → ':' and \091 → '[' were shown
literally). Also handle \X non-digit escapes (e.g. \. → '.') used for
dots in service instance names.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:26 +01:00
Joachim Wiberg 571edefa9d confd: add configurable mDNS hostname (avahi host-name)
Add a `hostname` leaf to the `mdns` YANG container with default `"%h"`,
allowing operators to override the avahi host-name used for mDNS A/AAAA
records without reflashing. The default expands to DEFAULT_HOSTNAME from
os-release, preserving existing behaviour for unconfigured deployments.

Format specifiers %h/%i/%m are supported via the existing hostnamefmt()
infrastructure, which is also fixed to copy the const fmt argument to a
local buffer before modification (UB when called with a libyang-owned
string).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:25:18 +01:00
Joachim Wiberg 1282352359 confd: improve mDNS service records
Use avahi's %h wildcard in service names so each device's hostname is
included, avoiding collision suffixes (#2, #3) when multiple Infix
devices are on the same network.

Skip TXT records whose JSON value is null rather than emitting empty
key= fields. Add _workstation._tcp (with chassis MAC) and
_device-info._tcp (with model= from product-name) as always-on records
tied to mDNS being active.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:37 +01:00
Joachim Wiberg 89c95d6baa confd: relocate generation of mdns service records to C
Simplify and consolidate generation of mdns service records from an
external script to C. This reduces fork + exec and saves two seconds
of boot time on single core Cortex-A7 systems.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:36 +01:00
Joachim Wiberg e255828418 confd: fix mDNS CNAME conflict by flipping the table
Instead of publishing A/AAAA records for $(hostname).loocal with a CNAME
infix.local, we flip it around to take advantage of the mDNS conflict
resolution rules.  This gives us infix.local for one device ont the LAN
and infix-2.local for the next.

Update all service records to *not* advertise hostname, but instead to
let Avahi imply that from the advertised A/AAAA and CNAME records.

Fixes #1387

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:36 +01:00
Joachim Wiberg e2c29cb1a7 utils: add fleet management commands to ixll
Introduce libfleet.sh and a new 'fleet' subcommand to ixll for managing
and operating enrolled Infix devices via RESTCONF.

Device configuration is stored in ~/.config/infix/config.json
(chmod 600): and organised by profile, allowing bulk operations across
groups of devices (e.g. all aarch64 targets).

New commands:

  ixll fleet enroll [-d] [-p profile] [-u user] [-w password] <name> <address>
  ixll fleet list
  ixll fleet upgrade <name|profile> <url>
  ixll fleet backup  [-o dir] <name|profile>
  ixll fleet reboot  <name|profile>

Upgrade runs in parallel across a fleet and shows a live per-device
progress bar by polling the infix-system:install-bundle RPC and the
installer state from the YANG operational data store.

The global -A flag (admin/admin) is honoured as a credential fallback
for devices enrolled without an explicit password.

Also fix a pre-existing typo: ">2" → ">&2" in the error path.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:36 +01:00
Joachim Wiberg 707731d23e utils: drop serial n:o from mdns scan output
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:35 +01:00
Joachim Wiberg ff4a346fd4 utils: ignore errors from avahi-browse
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:35 +01:00
Joachim Wiberg ba801be402 package/netbrowse: bump to v2.0
Replaces gunicorn+flask app with Go program, same function otherwise.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:34 +01:00
Joachim Wiberg debee83b15 package/mdns-alias: bump to v1.1
Fixes #1387

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 19:24:27 +01:00
Joachim WibergandGitHub b078a570ec Merge pull request #1378 from kernelkit/copilot/fix-client-stratum-selection 2026-03-09 19:21:57 +01:00
Joachim Wiberg a712fd5907 confd: new NTP setting stratum-weight
This patch adds support for chronyd's stratumpweight both in the NTP
client (ietf-system) and client+server (ietf-ntp) should fix the flaky
NTP stratum test.

Also, make sure to *not* 'rm -rf /etc/chrony/conf.d/*' in system.c to
prevent clobbering settings potentially made in ntp.c

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-09 18:03:15 +01:00
Mattias WalströmandGitHub 30b12d1467 Merge pull request #1417 from kernelkit/gps
Gps refactor
2026-03-05 11:00:17 +01:00
Mattias Walström 6534086d89 bpi-r3: dts: apply patch from OpenWRT
Reserve more memory for ATF
2026-03-05 08:21:54 +01:00
Mattias Walström 57961ac0a5 GPS: Refactor, do not use hotplug depend and move to finit
Also remove caching of GPS data in operational, gpsd now depend
on its GPS device <dev/gps0> instead of hotplug magic.
2026-03-05 08:21:34 +01:00
Mattias Walström 565a07a0b2 test: Add GPS test
Only possible to run on virtual Qemu instances right now.
2026-03-05 08:21:34 +01:00
Mattias Walström 054faa6763 GPS: Disable GPS in _minimal config 2026-03-05 08:21:34 +01:00
Mattias Walström 3d86d5f6e2 yang: add feature flags for wifi and gps in infix-hardware 2026-03-05 08:21:33 +01:00
Mattias Walström 5518574fee buildroot: Upgrade gpsd version 2026-03-05 08:21:30 +01:00
Joachim WibergandGitHub 434248a6de Merge pull request #1428 from kernelkit/revert-1406-upgrade-buildroot
Revert "Upgrade buildroot to 2026.02.0"
2026-03-05 08:19:45 +01:00
Mattias WalströmandGitHub 082bcd1712 Revert "Upgrade buildroot to 2026.02.0" 2026-03-04 19:47:11 +01:00
Joachim WibergandGitHub 0bedde52d3 Merge pull request #1410 from saba8814/issue-782-dhcp-ntp-dns
Issue 782 dhcp ntp dns
2026-03-04 13:52:12 +01:00
Joachim WibergandGitHub b315e444fd Merge pull request #1406 from kernelkit/upgrade-buildroot
Upgrade buildroot to 2026.02.0
2026-03-04 13:50:37 +01:00
Mattias Walström a8094c8026 Upgrade buildroot to 2026.02 (LTS) 2026-03-04 11:45:06 +01:00
Mattias Walström afa01489e6 test: Add parameter -j to watchdogctl
This is required to get the output as JSON data, since the upgrade
of buildroot (and watchdogd)
2026-03-04 11:45:04 +01:00
Mattias Walström 26320cc771 package: nghttp2-asio: Fix cmake version compatibility 2026-03-04 11:45:02 +01:00
Mattias Walström 7990ae4e9d Adapt to changes i new version of shadow
Shadow installs a pam.d/login file that is
broken for us, override with our own.
2026-03-04 11:45:00 +01:00
Mattias Walström 2671873b6f buildroot: Update the patches to reflect the upgraded buildroot 2026-03-04 11:44:58 +01:00
Mattias Walström e64d29196d Remove local package podman
It is now included in buildroot
2026-03-04 11:44:56 +01:00
Mattias Walström b446d92b0d Remove local packet lowdown
It is now included in buildroot
2026-03-04 11:44:54 +01:00
Mattias Walström e7cb85edf3 Remove local libyang-cpp and sysrepo-cpp
It has been included in buildroot
2026-03-04 09:53:03 +01:00
Mattias Walström 000c04cc8c gps: Remove setting BR2_PACKAGE_GPSD_OCEANSERVER
It is no longer supported in buildroot
2026-03-04 09:53:03 +01:00
Mattias Walström 6e5283f5d1 confd: ntp: Adapt to changes in chrony 4.8
In 4.8 local clocks is not synced by default,
waitsync is set to 300, this set it to 0.
2026-03-04 09:53:03 +01:00
Mattias Walström 8fcb291f5e bpi-r3: dts: apply patch from OpenWRT
Reserve more memory for ATF
2026-03-04 09:53:02 +01:00
Mattias WalströmandGitHub 7ccddc086b Merge pull request #1422 from kernelkit/container-fixes
Container and Coverity fixes
2026-03-01 10:21:58 +01:00
Joachim Wiberg fb9a1fa1a5 Update ChangeLog for v26.02 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 08:29:13 +01:00
Joachim Wiberg 386ca9618e confd: ensure DHCP client is not started before netd
This is a follow-up to c559b8f2 (new-frr) where netd now is responsible
for funneling static routes, as well as routes from DHCP clients, into
the kernel via Frr.

For this to work, in particular at boot, any DHCP client must wait for
netd to have started or any default routes learned will be lost.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 08:29:06 +01:00
Joachim Wiberg abe571d32c confd: silence Coverity false positive resource leak
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 07:00:06 +01:00
Joachim Wiberg 131177f3c9 confd: check return value and drop redundant assignment
Found by Coverity Scan:
 - check rename() return value
 - drop redundant ripd_enabled assignment

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 07:00:06 +01:00
Joachim Wiberg c3d396b5fe copy: fix null dst dereference and uninit uri_i in curl()
Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 07:00:05 +01:00
Joachim Wiberg b341d37267 Update URL from kernelkit.org to www.kernelkit.org
DNS does not allow CNAME records at an apex domain (e.g. kernelkit.org),
so GitHub Pages cannot reliably redirect kernelkit.github.io to it.  A
www subdomain can carry a CNAME pointing directly to kernelkit.github.io,
giving GitHub full control over the mapping and making the redirect work.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 06:59:48 +01:00
Joachim Wiberg cbe8315508 cli: simplify 'show bfd [peer_addr]' -> 'show bfd [peer]'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 06:59:48 +01:00
Joachim Wiberg a5687bda7f cli: add support for --reset-volumes on container upgrade
The weird `if env | grep -q 'reset-volumes'` construct is due to Klish
not sanitizing names before constructing variables, which leads to env
variables with '-' in them, not allowed in POSIX sh.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 06:58:21 +01:00
Joachim Wiberg 8fac3720fb board/common: fix container force option for upgrade
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 06:57:36 +01:00
Joachim Wiberg a4715debe8 cli: fix 'container upgrade <tab>' command completion
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-01 06:57:36 +01:00
Mattias WalströmandGitHub da06ca14d4 Merge pull request #1421 from kernelkit/kernel-upgrade-25b449b5-0348-4f93-94a0-a0602c90ced5
Upgrade to kernel 6.18.15
2026-02-28 08:12:36 +01:00
ael-bot 9946357285 Upgrade Linux kernel to 6.18.15 2026-02-28 04:28:07 +00:00
Mattias WalströmandGitHub f5ad6bc9ea Merge pull request #1415 from kernelkit/add-yang-check
Add yang check
2026-02-27 13:58:27 +01:00
Joachim WibergandGitHub 1698ad6197 Merge pull request #1420 from kernelkit/fix-hash 2026-02-27 12:30:22 +01:00
Joachim Wiberg b3e158fce5 copy: use scp(1) for scp:// and sftp:// transfers
curl's SCP/SFTP backend (libssh2) does not support interactive password
prompting — it fails with an authentication error unless credentials are
supplied non-interactively.

Replace the curl path for SSH URIs with native scp(1), which inherits
the TTY and prompts the user for a password as expected.  Both scp://
and sftp:// URIs are handled by parsing the URI into a [user@]host:path
argument.  Port is extracted if present and passed via -P.  If no user
is embedded in the URI, the -u flag value (remote_user) is used instead.
Host-key verification is skipped with -o StrictHostKeyChecking=no, the
same trade-off already made by the test framework.

When the destination URI ends with '/', a meaningful remote filename is
derived from the source: the datastore's on-disk filename (e.g.,
startup-config.cfg), the datastore short-name for in-memory stores, or
the source file's own basename for plain file copies.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-27 11:14:00 +01:00
Mattias Walström 5762c75727 test: Upgrade docker for GPS tests 2026-02-27 11:06:31 +01:00
Mattias Walström bb5240e48b test: usb: remove unused import 2026-02-27 11:06:31 +01:00
Mattias Walström 002c7791ec CI: Run unit test once, not once per platform 2026-02-27 11:06:30 +01:00
Mattias Walström 147ffe602f Change hash for license file in 6.18 kernel 2026-02-27 11:06:30 +01:00
Joachim Wiberg d08c3416ec package/finit: bump to v4.16 GA
One change since -rc1 which was to drop shutdown debugging. For a full
ChangeLog see https://github.com/finit-project/finit/releases/tag/4.16

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-27 11:04:45 +01:00
Mattias WalströmandJoachim Wiberg c4f24caa94 yanger: Adapt to new stricter pattern for publish 2026-02-27 08:35:21 +01:00
Mattias WalströmandJoachim Wiberg 19a0151f68 confd: ntp: Minor cleanup 2026-02-27 08:35:20 +01:00
Mattias WalströmandJoachim Wiberg bbbb84fba7 sysrepo: Do not report old errors
This is a bug introduced in sysrepo 4.x
2026-02-27 08:35:20 +01:00
Mattias WalströmandJoachim Wiberg ed4fe58fda confd: Add YANG pattern constraints for string leaves
Add input validation patterns to string-type leaves in container,
firewall, DHCP, and interface YANG models.  Also use mkdtemp() for
temporary key files in keystore.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-02-27 08:35:17 +01:00
Tobias WaldekranzandGitHub d7812c2ea5 Merge pull request #1418 from kernelkit/simplify-build
Simplify build
2026-02-27 08:33:46 +01:00
Tobias WaldekranzandGitHub ffa23fb9be Merge pull request #1419 from kernelkit/kernel-upgrade-890bedee-6ca0-4d50-8353-0185cdf0222e
Upgrade to kernel 6.18.14
2026-02-27 08:15:50 +01:00
ael-bot 4cf9fd02db Upgrade Linux kernel to 6.18.14 2026-02-27 04:52:28 +00:00
Joachim Wiberg a5c807abe0 test/infamy: make until() exception-safe
Any exception raised by fn() propagated immediately out of the retry
loop, effectively making until() a single-shot call the moment any
transient error occurred.

Fix by wrapping fn() in a try/except inside the loop and treating any
exception as a "not yet" result.  The last exception is preserved and
re-raised if all attempts are exhausted, so failure output is still
meaningful.  Also fix a missing newline at end of file.

Fixes #1403

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-26 19:05:43 +01:00
Joachim Wiberg b5a292d7dd test/infamy: catch TimeoutError in curl() to allow retries
Python's urllib.request wraps OSError in URLError during the connection
phase, but NOT during response reading (getresponse()).  This means a
timeout that fires after the TCP handshake completes, e.g. when a service
accepts the connection but hasn't sent a response yet, propagates as a
bare TimeoutError that bypasses the exception handler, killing the entire
until() retry loop on the first attempt.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-26 13:43:41 +01:00
Joachim Wiberg 4522d9f217 package/netd: rename NETD_FRR to NETD_FRR_GRPC, select FRR_GRPC
Rename BR2_PACKAGE_NETD_FRR to BR2_PACKAGE_NETD_FRR_GRPC to match the
naming convention of the other FRR backends (VTYSH, CONF) and make the
intent self-evident.

Have the gRPC backend select BR2_PACKAGE_FRR_GRPC so FRR is built with
gRPC support when — and only when — this backend is chosen.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-26 13:43:40 +01:00
Mattias WalströmandGitHub c559b8f2e0 Merge pull request #1384 from kernelkit/new-frr 2026-02-25 18:09:01 +01:00
Joachim Wiberg 4a31df1059 netd: add vtysh -b backend
This is a simpler approach than both grpc and watchfrr.  Since we only
really need dynamic handling of static routes (for DHCP), we can track
changes made and maintain a "diff engine" for the resulting frr.conf.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:32 +01:00
Joachim Wiberg 965906e2ff netd: add support for frr.conf backend with waitfrr service
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:31 +01:00
Joachim Wiberg bcc444f0fe patches/frr: zebra: don't resolve nexthop via inactive route
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:31 +01:00
Joachim Wiberg 949f43853d package/finit: bump to 4.16-rc1
Drop backported fixes.

Details at https://github.com/finit-project/finit/releases/tag/4.16-rc1

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:31 +01:00
Joachim Wiberg e63275d3a1 test: wait for multicast filter to bite
Also, update test description a bit.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:30 +01:00
Joachim Wiberg 2abee79c18 test: minor fix, missing format string
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:30 +01:00
Joachim Wiberg a844ba7d8c test: wait for static route before must_reach()
Not all systems are equally quick, let's give it while to set before
bailing out because we test too soon.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:29 +01:00
Joachim Wiberg e8c9c70e37 test: fix flaky tests, retry until()
In the ongoing campaign against load-bearing sleep() and pure luck.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:29 +01:00
Joachim Wiberg 924567f30b board/common: simplify netd reload
With the latest backported fixes to Finit, we no longer need to remove
/run/netd.pid to trigger a reload (restart) of staticd.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:28 +01:00
Joachim Wiberg 0e21dc894b package/finit: backport fixes from upstream
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-24 06:59:28 +01:00
Mattias WalströmandJoachim Wiberg f187fee89b package: Add python-spy
You can use it to inspect python applications, to inspect
executiontime.
2026-02-24 06:59:28 +01:00
Mattias WalströmandJoachim Wiberg 845e7c13fe yanger: Wi-Fi: Add missing radio component in operational 2026-02-24 06:59:27 +01:00
Mattias WalströmandJoachim Wiberg 8c9e36ba5d Upgrade FRR to 10.5.1
This includes adding a netd-daemon since FRR has gone towards all
daemons should be configured from mgmtd using YANG, netd uses gRPC to
reconfigure in mgmtd

Signed-off-by: Enable grpc
2026-02-24 06:59:07 +01:00
Mattias WalströmandJoachim Wiberg a1a02f2727 utils: bump-gns3: Fix syntax after qcow image was renamed 2026-02-24 06:42:52 +01:00
Ejub Sabic 1a1d917cd6 test: add dhcp combination test and integrate into suite 2026-02-22 15:08:34 +01:00
Mattias WalströmandGitHub 3ffbef74a8 Merge pull request #1407 from kernelkit/add-support-for-bpi-r3-mini
Add support for bpi r3 mini
2026-02-22 13:11:11 +01:00
Mattias Walström 34805dca65 doc: Update Changelog with BPI-r3-mini 2026-02-22 11:52:05 +01:00
Mattias Walström 8b95c10e39 bananapi-bpi-r3: README: Add information about bpi-r3-mini
The important part is that it needs a special flow to go from
vendor firmware to Infix.
2026-02-22 11:52:05 +01:00
Mattias Walström 16e72e8741 boards: Add new board bpi-r3-mini
This is a simple two port router board, with the same
WiFi chips as BPI-r3.

The bootloader shall be the same as the BPI-r3, the bootloader
now probes which of the two is booting by checking for the PHYS
that only exist on BPI-r3-mini.
2026-02-22 11:52:05 +01:00
Joachim WibergandGitHub cf591c9813 Merge pull request #1411 from kernelkit/probe-dtb-early
init: Move all copy of files to before udev triger is run
2026-02-22 08:09:12 +01:00
Mattias Walström 51b0488e66 test: Return fail if make test fails
$? needs to be $$? inside a make rule to expand the
bash variable.
2026-02-21 12:23:04 +01:00
Mattias Walström 4aa0ab73b3 init: Move all copy of files to before udev triger is run
This since we may copy udev-rules dependeing on platforms,
this fix #1357

Also remove all workaround scripts we have added for this
purpose.
2026-02-21 09:25:25 +01:00
Joachim WibergandGitHub ef7ed89443 Merge pull request #1409 from kernelkit/bump-buildroot2 2026-02-20 17:32:13 +01:00
Mattias Walström 84860e313f config: Remove legacy settings 2026-02-20 13:53:24 +01:00
Mattias Walström 0e590e9cbf Upgrade buildroot to 2025.02.11 (LTS)
2025.02.11, released February 20, 2026

	avahi: CVE-2021-3468, CVE-2023-38469, CVE-2023-38470, CVE-2023-38471,
	  CVE-2023-38472, CVE-2023-38473, CVE-2024-52615, CVE-2024-52616,
	  CVE-2025-68276, CVE-2025-68468, CVE-2025-68471, CVE-2026-24401
	bind: CVE-2025-13878
	busybox: CVE-2025-46394, CVE-2025-60876
	expat: CVE-2026-24515, CVE-2026-25210
	glibc: CVE-2025-15281, CVE-2026-0861, CVE-2026-0915
	gnutls: CVE-2025-14831, CVE-2026-1584
	haproxy: CVE-2025-11230
	intel-microcode: CVE-2024-24853, CVE-2025-31648
	libopenssl: CVE-2025-11187, CVE-2025-15467, CVE-2025-15468,
	  CVE-2025-66199, CVE-2025-68160, CVE-2025-69418, CVE-2025-69419,
	  CVE-2025-69420, CVE-2025-69421, CVE-2026-22795, CVE-2026-22796
	libpng: CVE-2026-22695, CVE-2026-22801, CVE-2026-25646
	libtasn1: CVE-2025-13151
	libvpx
	linux-pam: CVE-2024-10963
	nginx: CVE-2025-53859
	nodejs: CVE-2025-27210, CVE-2025-55130, CVE-2025-55131, CVE-2025-55132,
	  CVE-2025-59465, CVE-2025-59466, CVE-2026-21637
	python-django: CVE-2025-13473, CVE-2025-14550, CVE-2026-1207, CVE-2026-1285,
	 CVE-2026-1287, CVE-2026-1312
	python-urllib3: CVE-2026-21441
	strongswan: CVE-2025-62291
	tor: TROVE-2025-016
	vim: CVE-2025-66476
	webkitgtk
2026-02-20 13:53:23 +01:00
Joachim WibergandGitHub 8d647a8e43 Merge pull request #1408 from kernelkit/kernel-upgrade-5201d390-057f-48d7-84f8-8c48fe75926d 2026-02-19 20:47:06 +01:00
ael-bot 6fee172c85 Upgrade Linux kernel to 6.18.13 2026-02-19 17:02:17 +00:00
Joachim WibergandGitHub 5c0a4c099e Merge pull request #1405 from kernelkit/kernel-upgrade-652fbc25-5bae-4cb9-a897-5afe6d25e872 2026-02-16 19:29:23 +01:00
ael-bot 3fe7fa5548 Upgrade Linux kernel to 6.18.12 2026-02-16 17:01:34 +00:00
Joachim WibergandGitHub 2120709b68 Merge pull request #1404 from kernelkit/kernel-upgrade-f5acaddd-eaf7-4ee4-8b43-d7c6c60d2f9d
Upgrade to kernel 6.18.11

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-16 14:21:08 +01:00
ael-bot 13a50c8b0c Upgrade Linux kernel to 6.18.11 2026-02-16 10:25:51 +00:00
Mattias WalströmandGitHub 48718d764b Merge pull request #1401 from kernelkit/kernel-upgrade-1acd358b-2cf7-4127-8f0e-ca47d21998b9
Upgrade to kernel 6.18.10
2026-02-12 10:59:00 +01:00
ael-bot ae8a93c4cf Upgrade Linux kernel to 6.18.10 2026-02-11 13:28:31 +00:00
Joachim WibergandGitHub cbde057bf8 Merge pull request #1399 from kernelkit/gps 2026-02-10 21:04:34 +01:00
Joachim Wiberg f3e058f203 doc: update ChangeLog, initial GPS receiver support
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-10 16:49:41 +01:00
Joachim Wiberg c16eeaa9f4 doc: add section on GPS receivers and GPS reference clock
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-10 16:49:41 +01:00
Joachim Wiberg 681251f899 statd: support gps reference clocks in 'show <hardware|ntp>'
This patch adds a background gps monitor to statd because the gpspipe
program, normally used to interface with gpsd, slows down access to the
operational datastore with *seconds*.

This background monitor is not load bearing for how chrony accesses the
gps + nmea information from gpsd, this is handled separately in SHM.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-10 16:49:40 +01:00
Joachim Wiberg eb1763d49f confd: add gps support to ietf-hardware and ietf-ntp
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-10 16:49:40 +01:00
Joachim Wiberg 867239c7b8 package/feature-gps: new feature package
Enable gpsd and override package defaults to integrate in Infix.

 - Sync with rules disabled downstream in Debian project to prevent
   clashes with common vendor/device ids used for other device types
 - Start gpsd instance with '-n' to ensure /dev/shm is udpated for chrony

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-08 16:37:54 +01:00
Mattias WalströmandGitHub 0f1aa30574 Merge pull request #1398 from kernelkit/kernel-upgrade-0b031c70-632a-47dc-a372-f31cd93c53e1 2026-02-07 07:52:39 +01:00
ael-bot 89146b739a Upgrade Linux kernel to 6.18.9 2026-02-07 04:39:24 +00:00
Joachim WibergandGitHub 7bcbd3c51b Merge pull request #1376 from kernelkit/copilot/review-issue-947
Document VETH pair limitation with containers
2026-02-06 15:58:20 +01:00
Joachim Wiberg 91374a1155 Fix trailing whitespace in YANG descriptions
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 15:57:42 +01:00
Joachim Wibergandtroglobit 3966f8ed0e Document VETH pair limitation with containers
Add documentation noting that at least one side of a VETH pair must
remain in the host namespace. Both ends cannot be assigned to different
containers.

Updates:
- container.md: Added IMPORTANT note in Container Host Interface section
- infix-if-veth.yang: Added note in module description
- infix-if-container.yang: Added note in host identity description

Fixes: #947
Related: #941

Co-authored-by: troglobit <183517+troglobit@users.noreply.github.com>
2026-02-06 15:56:51 +01:00
Joachim WibergandGitHub f708f9b1ed Merge pull request #1397 from kernelkit/sama7g54
Add support for Microchip SamA7G54 Eval Kit

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 14:49:50 +01:00
Joachim Wiberg 055c8dd1ae doc: update ChangeLog, support for Microchip SAMA7G54-EK
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 13:30:21 +01:00
Joachim Wiberg fd4cda35b5 configs: add missing fdt_add_pubkey to bootloader defconfigs
Follow-up to c152c5f361

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 13:30:21 +01:00
Joachim Wiberg a7a630e0d9 utils: allow creating bootloader-only images
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 13:30:20 +01:00
Joachim Wiberg 0c8ce332d1 utils: support SamA7G65 in mkimage.sh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 13:30:20 +01:00
Joachim Wiberg 3d088f3e2b Add support for Microchip SAMA7G54-EK Evaluation Kit
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-06 13:30:20 +01:00
Joachim WibergandGitHub b691868a83 Merge pull request #1385 from kernelkit/arm-actions
Arm 32-bit actions
2026-02-05 10:40:48 +01:00
Joachim Wiberg d1659dbbc1 test: fix missing IPv6 forwarding on tunnel in tunnel_basic
Enable IPv6 forwarding on the left DUT's tunnel interface, matching
the IPv4 tunnel config.  Without it, IPv6 packets are not forwarded
through the tunnel, causing all tunnel_basic IPv6 tests to fail.

Regression introduced when fixing issue #515 in 717c1c0.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-05 08:50:22 +01:00
Joachim Wiberg 8973dc488b test: ensure result of tests is the exit code of the rule
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-05 08:50:22 +01:00
Joachim Wiberg f71bb73375 board/arm: add missing rootfs (empty) overlay
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-05 08:50:21 +01:00
Joachim Wiberg 0c11cea07b .github: refactor, simplify, and reduce duplication in actions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-05 08:50:21 +01:00
Joachim Wiberg 65b674855a .github: add rpi2 bootloader and SD card image builds
Add Raspberry Pi 2B to the bootloader build matrix and raspberrypi-rpi2
to the SD card image builder, enabling full RPi 2B image creation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-05 08:50:09 +01:00
Joachim Wiberg 71ec4fa220 .github: add arm_defconfig and arm_minimal_defconfig builds
Catch ARM 32-bit build regressions early by adding arm targets
to the familty of Infix image and release builds.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-05 08:50:09 +01:00
Mattias WalströmandGitHub f47bf0e0b1 Merge pull request #1395 from kernelkit/run-fix
Fix extration of rootfs.squashfs in release tarball
2026-02-03 15:13:18 +01:00
Joachim Wiberg e7108f52cf board/common: fix extration of rootfs.squashfs in release tarball
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-03 15:05:20 +01:00
Joachim WibergandGitHub 26c7fe40c0 Merge pull request #1391 from kernelkit/update-bpi-recommendations
Doc: Update recommendations for bpi-r3
2026-02-03 09:58:13 +01:00
Mattias Walström 1e6286f1d3 Doc: Update recommendations for bpi-r3
[skip ci]
2026-02-03 09:55:05 +01:00
Joachim WibergandGitHub fe56591d8d Merge pull request #1379 from kernelkit/copilot/add-infix-keystore-documentation
Keystore refactor and documentation

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-03 08:09:05 +01:00
Joachim WibergandGitHub 18c812c1b4 Merge pull request #1390 from kernelkit/fix-boot-defconfigs
Add missing `fdt_add_pubkey` tool to bootloader defconfigs
2026-02-03 07:39:54 +01:00
Joachim Wiberg bb199590ce configs: add missing fdt_add_pubkey to bootloader defconfigs
Follow-up to c152c5f361

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-03 07:35:25 +01:00
Joachim Wiberg 047d818cbd doc: update ChangeLog with new 'change' command feature
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:45 +01:00
Joachim Wiberg 2b6588eaf4 cli: add 'show keystore' command to admin-exec
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:13 +01:00
Joachim Wiberg 08742df166 doc: ux update with new 'change' and 'do wireguard' commands
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:12 +01:00
Joachim Wiberg 2a176d5888 cli: add 'wireguard <genkey | genpsk>' command to admin-exec
Helper command to improve the UX for setting up Wireguard tunnels.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:11 +01:00
Joachim Wiberg 93dfd00754 packge/klish-plugin-sysrepo: add 'change cleartext-symmetric-key'
This update brings new support for editing cleartext-symmetric-keys with
the 'change' command.  The cleartext-symmetric-key is of type binary and
its use differs between different key-formats.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:10 +01:00
Joachim Wiberg 94808331da doc: update docs with keystore format changes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:09 +01:00
Joachim Wiberg 74a09d2c1b board/aarch64: update bpi factory-config and rpi readme example
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:08 +01:00
Joachim Wiberg 0c1aede731 confd: add wifi passphrase and key validation to SR_EV_CHANGE
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:08 +01:00
Joachim Wiberg 5ceda4569e confd: restore IETF standard keystore leaf types and NACM rules
Infix key format identities now derive from the IETF bases, so the standard
identityref accepts them without any need for deviations.  This also preserves
the nacm default rules, which were inadvertently dropped before.

Also rename format identities for generality:

 - wifi-preshared-key-format      -> renamed: 'passphrase-key-format'
 - wireguard-symmetric-key-format -> use IETF 'octet-string-key-format'

Since cleartext-symmetric-key is now type binary (base64-encoded), the
WiFi backends (station and AP) decode values before passing them to
wpa_supplicant and hostapd.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:07 +01:00
Joachim Wiberg 683f696e19 utils: add 'scan' feature to ixll
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:06 +01:00
Joachim Wiberg ad7c6573c8 doc: minor syntax fixes to match YANG model
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:50:05 +01:00
Joachim Wiberg 72860aa1b5 doc: add comprehensive keystore documentation
Fixes #914

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-02 17:49:41 +01:00
Joachim WibergandGitHub 69acd21f19 Merge pull request #1386 from kernelkit/container-restart-on-env
Container restart on env
2026-02-02 09:16:35 +01:00
Joachim Wiberg eeabb44bd5 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-01 12:36:25 +01:00
Joachim Wiberg 76bfd6c57f test: update test to verify container restart on env change
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-01 10:40:45 +01:00
Joachim Wiberg 3d7fb595fb board/common: container not restarting on env variable changes
Environment variables are stored in a separate .env file from the main
container script.  The config SHA256 checksum only covered the script
file, so changes to env vars went undetected -- the container was not
recreated and kept running with stale values.

Include the env file contents in the config checksum calculation so that
any change to environment variables triggers a proper container restart.

Fixes #1313

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-01 10:40:45 +01:00
Joachim Wiberg 98a39d989c package/klish: add support for insert-comment
Type a command, regret you typed so much before checking something else,
comment it out for later with Meta-# (Alt-Shift-3).  The whole line is
now commented out and saved to history.  Recall it later with Ctrl-P or
Up arrow, delete the leading # with Ctrl-D, and run it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-02-01 10:40:44 +01:00
Joachim WibergandGitHub 8e699736b8 Merge pull request #1380 from kernelkit/copilot/handle-ipv6-forwarding-netfilter 2026-01-30 23:40:36 +01:00
Joachim WibergandGitHub 80ab53ecbc Merge pull request #1383 from kernelkit/kernel-upgrade-3c441547-c319-40de-bb33-e2e50bf0b2c2
Upgrade to kernel 6.18.8
2026-01-30 14:06:35 +01:00
Joachim Wiberg 7ce668904a doc: update ChangeLog
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-30 13:09:20 +01:00
Joachim Wiberg 93fceb9a5f doc: update IPv6 forwarding documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-30 13:09:19 +01:00
Joachim Wiberg 4f876bc58e test: update nacm basic test spec.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-30 13:09:18 +01:00
Joachim Wiberg db0c6417b2 test: add IPv6 forwarding verification to routing-basic
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-30 13:09:14 +01:00
ael-bot aeef240289 Upgrade Linux kernel to 6.18.8 2026-01-30 10:20:43 +00:00
Joachim Wiberg 129f92afdd statd: use IPv6 force_forwarding in operational state
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-30 09:11:41 +01:00
Joachim Wiberg 717c1c02f1 confd: use force_forwarding sysctl for IPv6
Introduced in Linux 6.17, the force_forwding flag corresponds to the
ipv4 forwarding flag, which maps perfectly to the ietf-ip.yang model.

Fixes #515

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-30 09:11:40 +01:00
Joachim WibergandGitHub 50514b4fc2 Merge pull request #1375 from kernelkit/aarch32-fixes
Sync defconfigs, fix aarch32 (now arm) build
2026-01-29 23:10:36 +01:00
Joachim Wiberg c152c5f361 configs: fix fdt_add_pubkey host tool
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:42:50 +01:00
Joachim Wiberg e7943b5e05 board,configs: rename aarch32 -> arm for consistency with BR2_ARCH
All build scripts use $BR2_ARCH to determine location of critical board files
and configuration.  As per previous decisions, the BR2_ARCH variable controls
all naming in Infix and for consistency the defconfig files are also renamed.

This fixes the issue with missing DTB file(s) for the Raspberry Pi 2B.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:42:50 +01:00
Joachim Wiberg 64a04eb784 configs: sync aarch32 defconfigs, drop post-image.sh
- Bump toolchain to match other build targets GCC 13 -> 14
 - Drop post-build.sh to match other build targets
 - Add features to arm_defconfig, all except containers
 - Enable chck hashes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:42:49 +01:00
Joachim Wiberg 1042ca8bb2 configs: sync defconfigs
- Fix locations of packages to match 'make update-defconfig' order
 - Fix defconfig syntax for watchdogd tempmon ...
 - Enable check hashes on all defconfigs
 - Add missing wireguard and wifi support to RiscV
 - Rename dongle support for X86_64 build

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:42:25 +01:00
Joachim Wiberg 6831377369 board: relocate firmware selction for IoT Router Board Mini
The RTL8169 firmware was specifically added for the Raspberry Pi Compute
Module 4 IoT Router Board Mini, it does not need to be part of defconfig.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:41:33 +01:00
Joachim Wiberg 16f26b02a8 board: sync linux_defconfigs between archs
- Enable Ext2 support where missing
 - Enable POSIX_ACLs where missing
 - Sync NLS code pages

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:41:26 +01:00
Joachim Wiberg 87a6637c13 bin: copy is a file, not a directory
Fixes a warning from fakeroot by adjusting the type in the permission
table.  Apparently the chown + chmod operations were always done even
though the type was wrong.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 17:54:54 +01:00
Joachim WibergandGitHub 550f5ec1c6 Merge pull request #1374 from kernelkit/logit
Silence libyang warnings leaking to console
2026-01-28 11:22:28 +01:00
Joachim Wiberg f42a28f346 board/common: silence libyang warnings leaking to console
Fixes #1373

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-28 09:50:17 +01:00
Joachim WibergandGitHub 02082f99a8 Merge pull request #1371 from kernelkit/misc
Misc fixes
2026-01-27 14:33:14 +01:00
Mattias Walström fb89d47c90 yanger: Allow to read back SSIDs encoded with utf-8 2026-01-27 11:09:54 +01:00
Mattias Walström 2b5e4e92f1 cli_pretty: Wi-Fi: signal-strenght to text was inverted
Should be like this:
  ┌────────────┬────────────────────┐
  │ RSSI (dBm) │       Status       │
  ├────────────┼────────────────────┤
  │ ≥ -50      │ excellent (strong) │
  ├────────────┼────────────────────┤
  │ -60 to -51 │ good               │
  ├────────────┼────────────────────┤
  │ -70 to -61 │ poor               │
  ├────────────┼────────────────────┤
  │ < -70      │ bad (weak)         │
  └────────────┴────────────────────┘
2026-01-27 11:09:54 +01:00
Mattias Walström 01e82547f7 confd: Wi-Fi: Rename RSSI to signal-strength
RSSI is a vendor-specific relative index (0-255), while dBm is an
absolute power measurement. Since we report dBm values from iw,
rename the leaf to signal-strength for accuracy.
2026-01-27 11:09:51 +01:00
Mattias Walström a8dc889c7e confd: wifi: Update wpa_supplicant config when wifi setting change
For example changing SSID
2026-01-26 23:35:38 +01:00
Mattias Walström c0591773d4 yang: wifi: Only one virtual interface can have default MAC
The others need to set custom-phys-address, if not dagger will fail
to take up the interface because "The address is not unique on the network"
2026-01-26 23:31:07 +01:00
Joachim WibergandGitHub 5224aa9785 Merge pull request #1372 from kernelkit/misc-fixes
Misc fixes
2026-01-26 21:20:10 +01:00
Joachim Wiberg 2ed84c2363 doc: fix syntax errors in restconf helper script
Also, add a check() function with a user-friendly reminder if the forget
to include the model prefix in the URL.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 19:55:01 +01:00
Joachim Wiberg 0a6a1ce055 confd: ensure dhcp client default behavior, register hostname
For some reason, during the last refactor possibly, the dhcp client
stopped sending the current hostname to the dhcp server.  This is very
useful to check what devices are on your network by asking the home
router's dhcp server.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 19:55:00 +01:00
Joachim Wiberg 76574fdd2b confd: minor, coding style
Also, gcc complains that ap_op may be used unset, so let's set it to the
only safe default there is.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 19:55:00 +01:00
Joachim Wiberg c0fd39f069 confd: drop wifi-scanner in favor of wpa_supplicant autoscan
The trick to starting the scanner mode is to have a dummy network that
cannot associate with anything.

Fixes #1193

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 19:54:59 +01:00
Joachim Wiberg ff197d9b10 confd: reduce Frr default log level
Was set to informational, and Zebra to debug, which is mostly useful for
developers when debugging the integration of Frr daemons.

Example of before this patch:

Nov  4 13:44:09 infix-6f-05-e1 finit[1]: staticd[4366], stopping, sending SIGTERM ...
Nov  4 13:44:09 infix-6f-05-e1 staticd[4366]: Terminating on signal
Nov  4 13:44:09 infix-6f-05-e1 zebra[4221]: [N5M5Y-J5BPG][EC 4043309121] Client 'static' (session id 0) encountered an error and is shutting down.
Nov  4 13:44:09 infix-6f-05-e1 zebra[4221]: [KQB7H-NPVW9] zebra/zebra_ptm.c:1333 failed to find process pid registration
Nov  4 13:44:09 infix-6f-05-e1 zebra[4221]: [JPSA8-5KYEA] client 26 disconnected 1 static routes removed from the rib
Nov  4 13:44:09 infix-6f-05-e1 zebra[4221]: [S929C-NZR3N] client 26 disconnected 0 static nhgs removed from the rib
Nov  4 13:44:09 infix-6f-05-e1 finit[1]: Starting staticd[5529]
Nov  4 13:44:09 infix-6f-05-e1 zebra[4221]: [V98V0-MTWPF] client 26 says hello and bids fair to announce only static routes vrf=0

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 19:54:59 +01:00
Joachim Wiberg 8d64f3d34b board/common: reduce nginx and rouset default log level
Fixes #1349

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 19:54:58 +01:00
Joachim Wiberg 6c0fd3e96b board/common: fix shell and clish 'follow' commands
We want the command to show the entire log file, but fast forward to and
tail at the end, handling any file rotations from syslogd.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 18:22:55 +01:00
Joachim Wiberg 289544a299 package/feature-wifi: add support for mediatek type wifi devices
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-26 18:22:35 +01:00
Mattias WalströmandGitHub 2d9ca0cfbd Merge pull request #1368 from kernelkit/misc
confd: Wi-Fi: Set safe defaults
2026-01-26 10:41:09 +01:00
Mattias Walström 262b60c5cb workflow: build-image: Fix typo in bpi bootloader 2026-01-26 09:21:57 +01:00
Mattias Walström 87737ff23a confd: Wi-Fi: Set safe defaults
Learned one thing, a setting not set, is a safe setting.
bss_color made a lot of iPhones failed to connect.

Remove some more options with unknown impact.
2026-01-26 08:44:33 +01:00
Joachim WibergandGitHub 7826e8b3f1 Merge pull request #1367 from kernelkit/wifi-dongles 2026-01-25 12:22:28 +01:00
Joachim Wiberg 68a638c0d5 Slight refresh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:59 +01:00
Joachim Wiberg d938d48975 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:59 +01:00
Joachim Wiberg b031f5216a doc: update remaining guides to new example format
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:57 +01:00
Joachim Wiberg 1fb97055ab doc: split networking.md into multiple files
The networking guide has grown out of control for quite some time, it is
time to split it up into multiple files.  This will hopefully also make
it a bit more accessible to users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:34 +01:00
Joachim Wiberg 0154d554e9 doc: fix mkdocs build warnings
- Add missing SVG For dhcpv6 example
 - Fix link to static routes in WireGuard doc
 - Add WireGuard to a new VPN sub-section in nav bar

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:33 +01:00
Joachim Wiberg c19f62ff70 doc: update firewall and networking guides to new example format
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:33 +01:00
Joachim Wiberg ade6922862 doc: update wifi.md, mnore realtek dongles tested, probe-timeout etc
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:16:28 +01:00
Joachim Wiberg 2b34597201 doc: add cli terminal output styling for examples
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:47 +01:00
Joachim Wiberg 5fdd2cb0f9 bin: minor, coding style
Reverse christmas tree.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:47 +01:00
Joachim Wiberg e60ca12733 bin: capture cpu/soc/core temperture for 'show system'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:46 +01:00
Joachim Wiberg 8f1c4d6bf2 utils: new script, extract-changelog.md for releases
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:46 +01:00
Joachim Wiberg b060495525 utils: adjust ChangeLog update in kernel-upgrade.sh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:45 +01:00
Joachim Wiberg c7d219f5e3 confd: add missing interface type descriptions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:45 +01:00
Joachim Wiberg a7422535c3 confd: minor adjustments to wifi config file handling
Ensure umask is properly managed around file creation
to maintain consistent behavior across the codebase.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:44 +01:00
Joachim Wiberg da80127ef0 confd: use dummy interface in lieu of missing radios
If we time out waiting for a wifi dongle, or onboard chipset, instead of
causing fatal error in dagger and b0rking startup, we cheat and create a
dummy interface.

Also, fix bug in HEAD, the condition was == wifi_ap but the comment said
"if not station or scanning mode".  Since wpa_supplicant is for station
mode (not AP), the cleanup should happen when != wifi_ap.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:44 +01:00
Joachim Wiberg 480447c8f2 confd: interfaces depend on hardware, fix ordering
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:43 +01:00
Joachim Wiberg a4b325c4e1 confd: refactor and code cleanup
- Simplify, prefer readability
 - Fix nftw() 'nopenfd' argument
 - Constify

The most interesting change is the argument to nftw(), 0 -> 20, to
ensure it is allowed to open enough file descriptors to descend.
In POSIX it is undefined if nopenfd is < 1.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 11:15:43 +01:00
Joachim Wiberg dabe4aed8d confd: fix wifi class interence of radioN hardware components
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 02:27:39 +01:00
Joachim Wiberg 6c41dc3a71 confd: add probe-timeout for wifi dongles
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 02:27:38 +01:00
Joachim Wiberg 33f830b432 statd: add BSSID to table of available networks
Also, spruce up the table a bit.  Allow it to resize, let the SSID column
be flexible, and right-align column(s) with numbers.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 02:27:38 +01:00
Joachim Wiberg 6932939525 statd: convert 'show ntp [opt]' tables to SimpleTable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-25 02:27:37 +01:00
Joachim Wiberg 87a754eab1 statd: Add rx/tx bitrate to WiFi station operational data
Extend the WiFi station mode with rx-speed and tx-speed leaves,
mirroring what already exists for AP mode connected stations.
Display bitrates in 'show interface <wifi>' detailed view.

Also standardize speed units to kbps/Mbps across the YANG model.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 19:17:48 +01:00
Joachim Wiberg 496eda7eb2 statd: remove double-close of file descriptor after fclose
When fdopen() succeeds, the FILE stream takes ownership of the file
descriptor.  Calling fclose() automatically closes the underlying fd, so
the subsequent close(fd) calls were double-close bugs that could cause
undefined behavior.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:32 +01:00
Joachim Wiberg 5f737ed145 board: add missing readme for bsp overview + rebuild
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:32 +01:00
Joachim Wiberg d75ba2064a board: simplify usb debugging, allow announcement of new devices
Simplify USB device debugging by allowing USB core to always announce
details of every new USB device to syslog.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:32 +01:00
Joachim Wiberg 08a72cfd46 board: fix SIGTERM handling in wan-monitor at shutdown
When the shell is blocked on sleep, signal handlers don't execute until
the command completes.  This caused the script to ignore SIGTERM at
shutdown, forcing Finit to wait and eventually SIGKILL it instead.

Fix by running sleep in the background and using wait, which is
interruptible by signals.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:31 +01:00
Joachim Wiberg ea076e27cc board: update static factory-config files with new nacm groups
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:31 +01:00
Joachim Wiberg f5c6ac3905 package/klish: bump for new command line mark/kill and quote chars
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:30 +01:00
Joachim Wiberg 389e0c5f92 package/feature-wifi: enable more realtek dongles
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:30 +01:00
Mattias WalströmandGitHub 10273749e4 Merge pull request #1366 from kernelkit/misc 2026-01-24 18:02:02 +01:00
Mattias Walström 0a778805a5 copy.c: Init pointers to NULL before start checking them
If copy to stdout dstds will be undefined.
2026-01-24 15:24:01 +01:00
Mattias Walström 1f361f72a7 wifi: Remove 802.11ax (wifi 6) as an opt-in feature
Instead it shall be a opt-out per SSID
2026-01-24 15:18:24 +01:00
Mattias Walström 3aa912164a yanger: wifi: Refactor to only use iw data (except for scanning)
Before it was a mess with wpa_cli and hostapd_cli commands, but now
we have a iw => json tool (iw.py) so we can use iw to get the information.
2026-01-24 15:01:32 +01:00
Mattias Walström 4283dc8395 confd: Wi-Fi: Set sane defaults (access point) 2026-01-24 14:01:27 +01:00
Mattias Walström a471cdf770 confd: wifi: Refactor radio setup (access point)
Use common function for configure main SSID and
bss SSID.
2026-01-24 09:51:02 +01:00
Joachim WibergandGitHub 0432d7f9b6 Merge pull request #1365 from kernelkit/kernel-upgrade-aac2140b-4090-400b-807d-7bb87a0ce54d
Upgrade to kernel 6.18.7
2026-01-23 18:38:19 +01:00
Joachim WibergandGitHub d19201e7d4 Merge pull request #1364 from kernelkit/upgrade-buildroot
Upgrade buildroot to 2025.02.10
2026-01-23 18:38:04 +01:00
ael-bot b683b376c7 Upgrade Linux kernel to 6.18.7 2026-01-23 15:35:23 +00:00
Mattias Walström 5fc5a46f30 Upgrade buildroot to 2025.02.10 2026-01-23 16:23:21 +01:00
Joachim WibergandGitHub 200389ab1f Merge pull request #1352 from kernelkit/misc2
Misc2
2026-01-23 14:40:27 +01:00
Mattias Walström e401c5a080 test: mdns: Add test for mDNS reflector 2026-01-23 13:05:34 +01:00
Mattias Walström 0d55ea46e0 infamy: sniffer: Wait for the capture to actually start in enter() 2026-01-23 13:05:34 +01:00
Mattias Walström 768d3fc233 confd: wifi: Enable wmm (Wi-Fi Multimedia) - QoS for WiFi.
This should always be enabled. It is a requirement for higher speeds
n/ac/ax.
2026-01-23 13:05:33 +01:00
Mattias Walström 10d7cbc267 confd: wifi: Disable legacy rates (802.11b)
This may improve range of Wi-Fi, with low/none
impact. This could make configurable later on.
2026-01-23 13:05:33 +01:00
Mattias Walström 0f6ab23206 confd: Fix migration script
When migrate to 1.7 the keystore was not correctly
migrated.
2026-01-23 13:05:33 +01:00
Mattias Walström fd331149f3 confd: wireguard: Add check for null pointer 2026-01-23 13:05:32 +01:00
Mattias Walström fd38b18bb7 Revert "udev: Always enumerate wifi phys from 0"
This reverts commit bf1eca0567.

This mess up order if having more than 1 phy, have not been
reproduce the error that got me to introduce this fix from
the beginning.
2026-01-23 13:05:32 +01:00
Mattias Walström da412cdc04 YANG: Remove precence of wifi-container
This is obsolete. By remove this we expose radio as mandatory.
This since a Wi-Fi interface is not possible to create without
a radio to connect it to.
2026-01-23 13:05:31 +01:00
Mattias Walström ec93f2f0e7 kernel: Fix kernel panic in brcmfmac
Happened when adding a second station interface (only supports one),
was lacking a check for a nullpointer.
2026-01-23 13:05:31 +01:00
Mattias Walström c57b428965 yang: Lockdown to only allow one station (or scanning) interface per radio
This since this is 99% of the cases wrong config, and crashes
on many Wi-Fi chipset.
2026-01-23 13:05:31 +01:00
Mattias Walström 598fbcf326 confd: wifi: Refactor station out from hardware.c
This is run per interface, not per radio so its place
in hardware.c was wrong. This also opens up for multiple
station interfaces per radio, but not for now that it locked
down in a must expression for now.
2026-01-23 13:05:30 +01:00
Mattias Walström 118a7bf1ca confd: Fix errors in the dependency tracking regarding Wi-Fi 2026-01-23 13:05:30 +01:00
Mattias Walström 053d180ade wifi: rpi: Silence some bogus error message related to the firmaware
The firmware seems to keep states when have been configured as an
AP then change to be a station.
2026-01-23 13:05:29 +01:00
Mattias Walström d9e6ec8032 workflow: Fix SD-card/eMMC image builds 2026-01-23 13:05:29 +01:00
Mattias Walström c9f68f5823 confd: mdns: Fix reflector
enable-reflector was set to on/off, but it shall be set
to yes/no.
2026-01-23 13:05:27 +01:00
Mattias Walström f002c5570f confd: wifi: rename setting enable-wifi6
Use the standard name instead of the marketing name,
new syntax enable-80211ax, which is consistent with
the nameing of the new roaming settings.
2026-01-23 13:03:58 +01:00
Mattias Walström 0ac4c4ca6f yanger: show proper phy name for Wi-Fi phys 2026-01-23 13:03:58 +01:00
Mattias Walström fb8966fabd yang: wireguard: Require IP address as endpoint
hostname can work, but from startup it does not,
wg setconf fails and with that dagger.
2026-01-23 13:03:57 +01:00
Mattias Walström 515561a321 confd: core: Handle when custom-phys-address is changed on a Wi-Fi interface
Then hostapd needs to be restarted, handle this by adding the wifi container
to the diff if a custom-phys-address has been changed on a Wi-Fi interface.
2026-01-23 13:03:57 +01:00
Mattias Walström 1f913b5c7e yang: wifi: Use correct type for counters 2026-01-23 13:03:57 +01:00
Mattias Walström 2b6c343b91 confd: hardware: Coding style 2026-01-23 13:03:56 +01:00
Joachim WibergandGitHub ce90ad9a41 Merge pull request #1354 from kernelkit/srperms 2026-01-23 11:51:57 +01:00
Joachim Wiberg 594239864b doc: update ChangeLog
Slight refactor of WARNING and NOTE admonintions to improve readability.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:50:05 +01:00
Joachim Wiberg 46f95160ec doc: update restconf scripting with details on patch
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:50:05 +01:00
Joachim Wiberg b5a8fe10b5 doc: update user guide with more on nacm and user privileges
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:50:04 +01:00
Joachim Wiberg 1495a96b2b doc: use 'example' consistently as hostname in cli examples
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:50:04 +01:00
Joachim Wiberg 1b006c1a44 doc: drop extra chars in cli help text
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:50:03 +01:00
Joachim Wiberg f4ffadecd8 doc: further discourage legacy scripting
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:50:03 +01:00
Joachim Wiberg f4d9bb6898 test: run 9pm report tool inside container
Ensure the 9pm report tool runs inside the container so that it has
permissions to write to the test/.log directory.  Then mark the log
directory as 777 when done so the ghmoon 'git clean -ffdx' can clean
it up when switching between jobs.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 09:47:56 +01:00
Joachim Wiberg b706f521b5 test: fix race condition in DHCP Server Multiple Subnets
Need to verify that client hostnames have been set before starting the
client, otherwise the test will fail due to clients getting pool lease,
which is intended.

In a real-world scenario this is not a problem. Here we've booby trapped
the server to try to trip up errors.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:26 +01:00
Joachim Wiberg 0376a83677 test: new case nacm-basic
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:26 +01:00
Joachim Wiberg ca2bf42c0a test/infamy: refactor, rename modname -> xpath
For consistency with netconf transport and general understanding.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:25 +01:00
Joachim Wiberg 7ac77b2eef test/infamy: add patch_config() for single operations on running
Used by the new NACM basic test to verify ACL rules on explicit XPaths
or modules.  For this we cannot rely on put_config_dict() since it now
uses the candidate datastore for all changes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:25 +01:00
Joachim Wiberg a63f2474a2 test/infamy: Use PATCH for RESTCONF merge semantics
Switch RESTCONF from PUT to PATCH for configuration updates. This gives
RESTCONF the same merge behavior as NETCONF edit-config, allowing NACM
to correctly enforce path-specific permissions instead of requiring
write access to the entire datastore.

Fixes #617

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:25 +01:00
Joachim Wiberg 71384ff070 test/infamy: ensure residual state is cleaned up in dhcp server
Fixes #1344

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:24 +01:00
Joachim Wiberg e0ee26a6cb cli: expand 'show nacm [user NAME | group NAME]'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:24 +01:00
Joachim Wiberg 353cbdc9eb bin: allow 'copy <src> foo' for shell users
With guard rails in CLI, without in shell.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:23 +01:00
Joachim Wiberg 201af56526 bin: fix segfault in copy (xpath denied)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:22 +01:00
Joachim Wiberg 5498a2d8c7 bin: add -f flag top force copy to existing file
Otherwise the file will not be updated by confd on datastore copy:

Jan 12 14:26:37 foo confd[3410]: Overwrite existing file /cfg/startup-config.cfg (y/N)? <FF>
Jan 12 14:26:37 foo confd[3410]: Error: OK, aborting.:Inappropriate ioctl for device

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:22 +01:00
Joachim Wiberg 8ea41bc4bb cli: replace sysrepocfg with copy and rpc tools
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:22 +01:00
Joachim Wiberg 9c5707d107 bin: relocate src/show.py to bin/show/ -- all tools in one place
- relocate src/show.py to src/bin/show/
 - Refactor container() to use run_sysrepo() instead of rolling its own
 - Replace sysrepocfg with copy which supports nacm
 - Rename run_sysrepocfg() -> get_json()

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:21 +01:00
Joachim Wiberg b6a7d0f294 cli: new admin-exec level command 'show nacm'
Show operational details about nacm and user//group mappings.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:21 +01:00
Joachim Wiberg 3c697ede67 statd: add optional min_width to columns in SimpleTable class
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:20 +01:00
Joachim Wiberg 077af97e33 bin: make copy a multicall binary with new rpc interface
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-23 06:12:20 +01:00
Joachim Wiberg 8ced475da6 bin: add optional xpath support to copy tool
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:18 +01:00
Joachim Wiberg 7165b124a6 bin: retain sysrepo subscription in import *and* export
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:17 +01:00
Joachim Wiberg dce4190717 bin: add -d debug mode to copy command
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:17 +01:00
Joachim Wiberg 58619fc534 bin: make DST in copy command optional and use in CLI
Since sysrepocfg does not do any NACM based on the UNIX user, we expand
the scope of the copy tool slightly to allow outputting JSON to stdout.

This allows us to replace all sysrepocfg commands in the CLI used to
show runnining/startup/factory.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:16 +01:00
Joachim Wiberg 5bf3f4840b bin: leverage the simplicity of err.h in copy tool
Like err.h but without the leading "argv[0]: " prefix.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:16 +01:00
Joachim Wiberg b020eda9a4 confd: prevent motd from showing on non-shell user login attempts
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:15 +01:00
Joachim Wiberg 3463de98bb confd: fix "is admin" check
Prevent non-admin level users from getting UNIX wheel group assignment.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:15 +01:00
Joachim Wiberg 3c7dce0d45 confd: add operator and guest groups to factory-config
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:14 +01:00
Joachim Wiberg b58550367c sys: rename sys-cli -> sysrepo + klish
Previously the sys-cli group was for interactive shell access, but with
ever changing requirements this split has become necessary.

This commit introduces the 'sysrepo' group for low-level access to all
sysrepo commands, i.e., bootstrap only.  For user-level shell access a
'klish' group is added which allows users to connect to the CLI.  This
is now the only group users, including the default 'admin', are members
of, effectively making the new 'copy' tool the norm.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:14 +01:00
Joachim Wiberg 7559f4be83 buildoot: enforce sysrepo group, umask, and permissions
This patch enables umask and nacm defalts in the Buildoot sysrepo
package and a patch to sysrepo to set the sysrepo group also on the
event pipes in /etc/sysrepo/, without which it would be hard to inject
any type of new event as non-root user now since the umask now prevent
all 'other' users from interacting with sysrepo.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:13 +01:00
Joachim Wiberg 078839d988 cli: fix default hash in 'do password encrypt'
We could go with the old default sha512crypt, but since the default has
changed to yescrypt, as used by the 'change password' command.  We use
that for consistency.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:13 +01:00
Joachim Wiberg c7b409304f package/finit: backport fixes to critical issues in v4.15
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:44:12 +01:00
Joachim Wiberg b88dc40fa9 buildroot: set sysrepo umask and srmon data perms
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:42:55 +01:00
Joachim Wiberg 77e81e60d8 package/klish: bump for new SocketGroup setting and bugfix
- The new SocketGroup setting allows for configurable /run/klishd.sock
 - Also a bug fix for async commands, needed to fix regressions in the
   klish-plugin-sysrepo commands 'change passwordk' and 'text-editor'
   after the latest upgrade to sysrepo + libyang v4

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:39:53 +01:00
Joachim Wiberg 76eea3aa1c board/common: cleanup old aliases and 'cfg' tool
The sysrepocfg tool does not set up nacm based on $USER, and we now have
the shell 'copy' tool which does.  So drop 'cfg' and while we're at it
we also drop the 'edit' alias.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-22 22:39:52 +01:00
Mattias WalströmandGitHub 3191306a5a Merge pull request #1359 from kernelkit/kernel-upgrade-a7fcea3c-bed1-43da-8f5c-def8fad86460
Upgrade to kernel 6.18.6
2026-01-20 12:59:16 +01:00
Mattias WalströmandGitHub d91b4fb2aa Merge pull request #1360 from kernelkit/fix-kernel-upgrade
Fix kernel upgrade
2026-01-20 12:19:17 +01:00
Mattias Walström 1fd6aabe0c Fix automatic kernel upgrade
Was not prepared correctly for 6.18 kernels
2026-01-20 09:18:11 +01:00
ael-bot f73b4dc8a2 Upgrade Linux kernel to 6.18.6 2026-01-20 08:13:03 +00:00
Mattias WalströmandGitHub 09738bb250 Merge pull request #1353 from kernelkit/upgrade-kernel-to-6.18
Upgrade kernel to 6.18
2026-01-19 16:12:38 +01:00
Mattias Walström 3eadc7d290 rpi4: Add script to workaroud with wifi interfaces not deleted at boot
The wi-fi architecture in infix require udev to run and remove the kernel automatic wlan-interface
this. Unclear reason, but it seems that udev sometimes miss the add event.
2026-01-19 14:54:39 +01:00
Mattias Walström 79c325a7d2 klish-plugin-sysrepo: Fix when tab competion again
Some cases did not work
2026-01-19 14:54:38 +01:00
Mattias Walström 25fd74cd36 confd: wifi: Stop wpa supplicant if interface is removed. 2026-01-19 14:54:38 +01:00
Mattias Walström 7688469ab2 yang: wifi: Add must expression for only one statio per radio
This is a decision right now, that we support multi ssid AP, but
only one station interface, this is the only thing the c-code support
right now, so only allow this in the yang validation.
2026-01-19 14:54:37 +01:00
Mattias Walström d3b39e80e2 github: workflow: Update the check kernel workflow to check for new 6.18
Since we use the same kernel for all platforms, we can update this job
to only check for 6.18 instead of 6.12.
2026-01-19 14:54:37 +01:00
Mattias Walström bf1eca0567 udev: Always enumerate wifi phys from 0
At least RPI4 this enumaration feels pretty random.
2026-01-19 14:54:37 +01:00
Mattias Walström 9ba1d45c9a kernel: rpi: Enable deletion of wlan0 interface 2026-01-19 14:54:36 +01:00
Mattias Walström ff4de40099 rpi4: Fix factory-config.cfg
* Adding ipv6 on ethernet
* Adapt to function with the new Wi-Fi architecture
2026-01-19 14:54:36 +01:00
Mattias Walström cfbe4bf330 rpi64: uboot: Fix addresses dtb and ramdisk to not overlap with kernel
Device tree was overwritten by the kernel while unpacking.
2026-01-19 14:54:35 +01:00
Mattias Walström 6ae4e33a84 banana-pi: Do not try to set autoneg on the SFP ports
This will just crash dagger. They are already in autoneg, thats
all they support.
2026-01-19 12:20:05 +01:00
Mattias Walström 3440f5649e gitignore: add local claude directory 2026-01-19 12:20:02 +01:00
Mattias Walström cbbc88833a fstab: Remove commit and error mount option
These options does not exist anymore, they are removed in 6.18
2026-01-19 11:02:22 +01:00
Mattias Walström 0e2d12e9ff Upgrade kernel to 6.18 2026-01-19 11:02:22 +01:00
Joachim WibergandGitHub 31d17d03c2 Merge pull request #1356 from kernelkit/nanopi
Misc. fixes for NanoPi R2S
2026-01-19 07:47:17 +01:00
Joachim Wiberg f23b14d15e statd: backport finit patch to fix 'show services'
Service descriptions or command arguments may contain special characters
that need to be escaped in JSON strings.

Example:

{
  ...
  "command": "udhcpc -f -p /run/dhcp-client-wan.pid -t 3 -T 5 -A 30 -a1000 -S -R -o -O 1 -O 3 -O 6 -O 12 -O 15 -O 28 -O 42 -i wan -V "NanoPi R2S"",
  ...
}

Also, wrap add_services() in a try/except instead of testing for keys.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-18 23:31:45 +01:00
Joachim Wiberg d105178992 statd: resize 'show hardware' tables to match 'show system' width
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-18 23:30:20 +01:00
Joachim Wiberg c23009d7a2 statd: fix 'show system' regression, broken in b826bcb
The table_width() class method was lost in b826bcb9d, so we take the
opportunit to refactor to SimpleTable.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-18 21:39:38 +01:00
Joachim Wiberg 95eb04645b board/aarch64: enable input-event-daemon and rk805 pwr key
Fixes #1293

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-18 20:50:21 +01:00
Joachim Wiberg a8ae9519ae board/aarch64: designware watchdog broken on NanoPi R2S
Verified with latest Finit 4.15 that reboot after resize works.
Added a comment to the board-specific .mk file about the broken
WDT on the RK3328 SoC, or rather the NanoPi R2S board.

Fixes #1292

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-18 20:49:54 +01:00
Joachim Wiberg d2fd2c100e board/aarch64: relocate wan-monitor.sh
Board probing cannot copy board specific files to /usr (read-only), so
let's share this script with all other aarch64 boards.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-18 20:45:57 +01:00
Joachim WibergandGitHub a5a4f2a42b Merge pull request #1355 from kernelkit/fwfixes 2026-01-18 15:21:36 +01:00
Joachim Wiberg 5e180abae4 Fix firewall not updating when interfaces become bridge/LAG ports
When interfaces were moved from firewall zones to become bridge or LAG
ports (e.g., sfp1/sfp2 moved from WAN zone to lan-br), the firewall
configuration was not regenerated. This caused stale entries in
/etc/firewalld/zones/*.xml where interfaces remained listed in their
old zones despite no longer being L3 interfaces.

Root cause: firewall_change() only triggered on firewall model changes,
but interface membership changes (bridge-port/lag-port) occur in the
ietf-interfaces model. When interfaces become member ports, they
transition from L3 to L2, which affects the result of
interfaces_get_all_l3() used for default zone assignment.

Fix: Expand the diff check to also trigger firewall regeneration when
bridge-port or lag-port configuration changes, ensuring firewall zones
stay synchronized with actual L3 interface topology.

Fixes #1345

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-13 07:34:04 +01:00
Joachim Wiberg 125ea47d6e Fix missing firewalld.conf when modifying zone services
When users modified firewall zone services (e.g., enabling SSH on WAN),
firewalld.conf would disappear from /etc/firewalld/, causing firewalld
to fail with "Failed to load '/etc/firewalld/firewalld.conf': [Errno 2]
No such file or directory".

Root cause: After switching to the "roll in" staging directory approach
late in development, firewalld.conf generation was still conditional on
changes to "default" or "logging" settings. When other changes (zones,
services, policies) were made:

1. Code created /etc/firewalld+/ staging directory
2. Skipped generating firewalld.conf (no default/logging in diff)
3. On commit: rm -rf /etc/firewalld (deleted firewalld.conf!)
4. Renamed /etc/firewalld+ → /etc/firewalld (incomplete config)

Fix: Always generate firewalld.conf whenever firewall configuration is
being staged, not just for default/logging changes.

Fixes #1346

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-13 07:25:52 +01:00
Joachim WibergandGitHub 5a651800f3 Merge pull request #1351 from kernelkit/kernel-upgrade-3fd130fa-9571-4248-b04d-d97a01660630 2026-01-13 07:08:19 +01:00
ael-bot 8ce29f23d8 Upgrade Linux kernel to 6.12.65 2026-01-13 04:13:37 +00:00
Joachim WibergandGitHub 26ecf48600 Merge pull request #1350 from kernelkit/change-dhcpv6-client
Migrate to odhcp6c for dhpcv6 client support
2026-01-11 09:26:51 +01:00
Joachim WibergandGitHub f95c938085 Merge pull request #1348 from kernelkit/misc 2026-01-10 15:32:41 +01:00
Joachim Wiberg fa6023c9c4 Migrate to odhcp6c for dhpcv6 client support
Replace BusyBox udhcpc6 with OpenWrt's odhcp6c for improved DHCPv6
functionality and better integration with Router Advertisements (RA).

The primary motivation is support for a common ISP deployment scenario
where IPv6 addresses are assigned via SLAAC (from Router Advertisements)
and DHCPv6 is used in stateless/information-only mode to provide DNS
servers and other configuration options. This hybrid RA+DHCPv6 setup is
standard practice for many ISPs but was not supported by udhcpc6, which
treats RA and DHCPv6 as separate, non-integrated mechanisms.

Additional benefits of odhcp6c:

- Better IPv6 Prefix Delegation (IA-PD) support with proper handling
  of delegated prefix lifetimes and renewal
- Native integration of RA-provided configuration (DNS servers, routes,
  addresses) with DHCPv6-provided options
- Support for stateless DHCPv6 via information-only mode

To verify stateless DHCPv6 integration with SLAAC addresses - the ISP
scenario that motivated this migration, a new test case has been added.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-10 13:15:53 +01:00
Mattias Walström 2ff02d0c48 yang: keystore: Revert changes done when merging WireGuard
Accept the changes done when including Wi-Fi accesspoint,
which renames cleartext-symmetric-key to symmetric-key.
2026-01-10 10:52:53 +01:00
Mattias Walström 9d43b9d7a4 hostapd: Do not recreate bss-interfaces
By default, hostapd always recreate all bss interfaces,
we create them in confd so we do not want this behaviour.
2026-01-10 09:08:30 +01:00
Mattias WalströmandGitHub 1b0570b599 Merge pull request #1317 from kernelkit/add-wireguard
Add wireguard support
2026-01-09 12:19:08 +01:00
Mattias Walström 7e5da21cf6 Add support for WireGuard
Almost full support for WireGuard

admin@server:/> show interface wg0
name                : wg0
type                : wireguard
index               : 10
mtu                 : 1420
operational status  : up
ipv4 addresses      : 10.0.0.1/24 (static)
ipv6 addresses      : fd00::1/64 (static)
peers               : 2

  Peer 1:
    public key        : ROaZyvJc5DzA2XUAAeTj2YlwDsy2w0lr3t+rWj2imAk=
    status            : UP
    endpoint          : 192.168.10.2:51821
    latest handshake  : 2025-12-09T22:51:38+00:00
    transfer tx       : 1412 bytes
    transfer rx       : 1324 bytes

  Peer 2:
    public key        : Om9CPLYdK3l93GauKrq5WXo/gbcD+1CeqFpobRLLkB4=
    status            : UP
    endpoint          : 2001:db8:3c4d:20::2:51822
    latest handshake  : 2025-12-09T22:51:38+00:00
    transfer tx       : 1812 bytes
    transfer rx       : 428 bytes
in-octets           : 1752
out-octets          : 3224

admin@server:/>
2026-01-09 11:11:32 +01:00
Mattias Walström 8e9fd27e24 yanger: hardware: Do not crash if failing to read /run/system.json 2026-01-09 11:08:32 +01:00
Mattias Walström 651a274470 yanger: Do not crash if fails to get ethernet links 2026-01-09 10:23:52 +01:00
Mattias Walström f307dd9779 doc: wifi: Remove duplication 2026-01-09 08:12:48 +01:00
Mattias Walström 801faf0e0f aarch32: Upgrade to linux 6.12.64 2026-01-08 22:35:30 +01:00
Mattias Walström 5c811d7fc7 test: ntp: client_stratum_selection: Update autogenerated test spec 2026-01-08 14:50:17 +01:00
Mattias Walström f482a2bfe9 test: spec: rip_multihop: Add missing autogenerated file 2026-01-08 14:50:16 +01:00
Mattias Walström bd92e603d0 test: spec: ospf_debug: Add missing autogenerated files 2026-01-08 14:50:15 +01:00
Mattias Walström 5a96b64718 infamy: iface.py: Add functions to get interface oper status 2026-01-08 14:50:15 +01:00
Mattias WalströmandGitHub 21e7980d23 Merge pull request #1347 from kernelkit/kernel-upgrade-d1436c66-9f37-4de3-8bfe-e9180deec139
Upgrade to kernel 6.12.64
2026-01-08 14:01:45 +01:00
ael-bot 5b92591a44 Upgrade Linux kernel to 6.12.64 2026-01-08 10:21:02 +00:00
Joachim WibergandGitHub 84688864ef Merge pull request #1343 from kernelkit/misc-wifi-fixes 2026-01-06 23:47:16 +01:00
Mattias Walström f195a0a407 klish: followup 8a638fa26 allow when expression to depend on defaults
Did not work in some cases.
2026-01-06 20:51:32 +01:00
Mattias Walström 1fcfad14a1 bananapi-r3: Wrong config option for the watchdog 2026-01-06 20:51:31 +01:00
Mattias Walström 480e82a645 hostapd: Remove insane logic that some MAC addresses are not allowed
This is described on the internet as:
"If you are unlucky and have a device with wrong MAC address,
too bad"

For us: We set mac addresses static, and do not use hostapds, insane
MAC address allocation (radio MAC + n).
2026-01-06 20:50:55 +01:00
Mattias Walström aefa3a6962 confd: wifi: Set bssid if custom-phys-address has been used
This since hostapd change MAC address from its insane logic
radio + 1, if bssid is not set.
2026-01-06 20:50:42 +01:00
Mattias Walström f86436e739 yanger: Fix wifi status
use sh -c to expand the *
2026-01-06 20:20:22 +01:00
Mattias Walström 6aff287179 confd: wifi: Fix wifi interface type infer
If an interface is name is wifiN-whatever it will be infered
with the wifi type. Natural naming whould be wifi0-ssid.
2026-01-06 20:20:21 +01:00
Mattias Walström 89a3ccd51c confd: Rename get_phys_addr and make it not static
This to be able to use the function in hardware.c, when
setting up bssids.
2026-01-06 20:20:18 +01:00
Joachim WibergandGitHub 89c4d21532 Merge pull request #1302 from kernelkit/ntp-server 2026-01-04 15:50:34 +01:00
Joachim Wiberg a5efb1887f doc: update ChangeLog, NTP support
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:29 +01:00
Joachim Wiberg fca606cc7c doc: add NTP server documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:29 +01:00
Joachim Wiberg 113b43ecae test: minor cleanup, whitespace only
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:28 +01:00
Joachim Wiberg 39b9c7a065 test: add new tests for NTP
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:28 +01:00
Joachim Wiberg 64a04f5a1d test/infamy: allow until() to return the result of the function
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 10:40:38 +01:00
Joachim Wiberg 2b08258492 test/infamy: improve feedback on netconf/restconf error a bit
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-03 22:13:25 +01:00
Joachim Wiberg efe4903d9c confd: initial support for NTP server
Fixes #904

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-03 22:13:24 +01:00
Mattias WalströmandGitHub fe86744ca2 Merge pull request #1342 from kernelkit/klish-nacm-fixes
Refactor nacm in klish-plugin-sysrepo after sysrepo change
2026-01-03 15:49:01 +01:00
Joachim Wiberg 84026740eb package/klish-plugin-sysrepo: refactor nacm after sysrepo change
Upstream sysrepo commit 90ce1f7 modified sr_nacm_init() to explicitly switch
the session to SR_DS_RUNNING before initializing NACM.  This broke our klish
workflow which started sessions on SR_DS_CANDIDATE.

This commit drops the sysrepo patch that reverts that behavior in favor of
explicitly starting sessions on SR_DS_RUNNING for NACM initialization, then
switch to SR_DS_CANDIDATE for editing operations.  This works with sysrepo's
behavior: NACM reads rules from running datastore while our editing workflow
operates on candidate datastore.

Also, add prompt path shortening for deep configuration hierarchies.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-03 14:17:06 +01:00
Joachim WibergandGitHub 470a4d56eb Merge pull request #1341 from kernelkit/allow-to-run-nsenter 2026-01-03 01:03:15 +01:00
Mattias Walström dd5c4919d6 nsenter: Allow to run outside container
If running outside container find the netns inside the container, then
enter that netns.

lazzer@tollan ~/src/github.com/kernelkit/infix3 (add-wireguard)$ sudo ./test/nsenter d2b
(netns:d2b) #
2026-01-03 01:00:43 +01:00
Mattias WalströmandGitHub 02ca310ea4 Merge pull request #1337 from kernelkit/wifi-ap2
Add WiFi Access point support
2026-01-02 23:50:02 +01:00
Mattias Walström ac39a80e93 Changelog: Update changelog with the new Wi-Fi Access point feature 2026-01-02 22:33:00 +01:00
Mattias Walström bac1e76f83 cli_pretty: Convert show usb to the new SimpleTable 2026-01-02 22:32:59 +01:00
Mattias Walström b75d6af84e test: Update statd test data 2026-01-02 22:32:59 +01:00
Mattias Walström 289e67031f YANG: Rename cleartext-symmetric-key => symmetric-key 2026-01-02 22:32:58 +01:00
Mattias Walström c8f989e965 yanger: Use HOST.run(ls) instead of glob.glob()
This allows to run yanger remote.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-01-02 22:32:58 +01:00
Mattias Walström dd18cb630f Wi-Fi: Add channel usage application (python)
Example usage:
./src/statd/python/yanger/yanger -p wifi0 -x "ixll -A ssh enp195s0f0 sudo" ietf-hardware | ./board/common/rootfs/usr/libexec/infix/wifi-channel-map.py

Show the congestion in the 2.4 band.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-01-02 22:32:58 +01:00
Mattias Walström fec018148c Refactor WiFI implementation
* Wi-Fi station still work (changed YANG model)
* Wi-Fi access point supported

Model is flexible to support even more modes
2026-01-02 22:32:57 +01:00
Mattias Walström da37904108 WiFi: Refactor statd (python) implementation
* Add support for AP (list connected stations)
* Add scan-mode (Scan without create a fully configured station)

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2026-01-02 22:32:57 +01:00
Mattias Walström c2cfb2e1b4 feature-wifi: Add hostapd 2026-01-02 21:22:45 +01:00
Joachim WibergandGitHub 7114b018cf Merge pull request #1339 from kernelkit/container-operational
cli: use operational data in `show container [name]`
2026-01-02 21:08:22 +01:00
Joachim Wiberg 1030bae315 doc: update ChangeLog, container resource limits + usage
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:33 +01:00
Joachim Wiberg 84b1f1ad12 doc: update, new resource limits section for containers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:33 +01:00
Joachim Wiberg 203f81df67 cli: show firewall, add subcommands for log and matrix
The original 'show firewall log' just did the same as the 'show log firewall'
command.  This new implementation allows showing pretty-printed firewall log
which is admittedly easier on the eyes.

Also, add 'show firewall matrix' to just show the zone matrix overview.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:32 +01:00
Joachim Wiberg 162e6d6662 cli: user operational data for show container [name]
Leverage the operational data to present a more human-friendly view of
containers in the CLI.  Replacing the podman script wrapper.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:32 +01:00
Joachim Wiberg 25a7050c23 test: fix container resource-limit value
The constaint was supposed to be 50% of one CPU core, or 500 millicores
as per Kubernetes nomenclature.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:32 +01:00
Joachim Wiberg 3934838663 statd: refactor firewall formatter to use Canvas + SimleTable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:31 +01:00
Joachim Wiberg db6fb82a2b statd: add new class Canvas for rendering unified SimpleTables
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:31 +01:00
Joachim Wiberg e0ea554b7b statd: update SimpleTable with flexible columns and fix spacing
This patch adds support for flexible columns.  When a column is marked
as flexible it means it can be stretched when printing the table to an
optional minimal table width.  Multiple columns can be marked and when
this occurs the padding is applied equally to all columns.

Also, make sure to only add 2 char padding between columns, not always
at the end, or we will require larger terminal than necessary.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:30 +01:00
Joachim Wiberg 11c796b3cb board/common: reduce overhead in /etc/fstab
Finit is capable of setting up all basic file systems, even /run but
Infix relies on it allowing executing scripts (dagger and container)
so leave that for now.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:29 +01:00
Joachim Wiberg 0942313aaa package/finit: bump to v4.15
https://github.com/finit-project/finit/releases/tag/4.15

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:29 +01:00
Mattias WalströmandGitHub 97f4638f47 Merge pull request #1338 from kernelkit/allow-when-expression-use-default
klish: followup 8a638fa26 allow `when` expression to depend on defaults
2025-12-30 09:46:56 +01:00
Mattias Walström 2e06b667f0 klish: followup 8a638fa26 allow when expression to depend on defaults
If a when expssion depended on a default value it always got evaulated
to false.
2025-12-30 08:16:56 +01:00
Joachim WibergandGitHub 72a389ab6a Merge pull request #1336 from kernelkit/klish-add-support-for-when
klish: Do not autocomplete nodes that do not pass a when expression
2025-12-26 10:23:33 +01:00
Mattias WalströmandGitHub fce59ef93c Merge pull request #1327 from kernelkit/container-limits
Container limits
2025-12-25 21:55:43 +01:00
Mattias Walström 8a638fa265 klish: Do not autocomplete nodes that do not pass a when expression
This is most noticeable in interface context

admin@infix-00-00-00:/config/interface/e1/> set type wifi
admin@infix-00-00-00:/config/interface/e1/> set
bind-ni-name         bridge-port   container-network custom-phys-address         description             enabled            ethernet

where you previously got *all* containers for all interface-types.
2025-12-24 22:05:13 +01:00
Tobias WaldekranzandGitHub a42b4240f7 Merge pull request #1299 from kernelkit/statd-add-service-stat
Add service runtime statistics and table formatting framework
2025-12-23 10:20:08 +01:00
Joachim WibergandGitHub a5bc49361f Merge pull request #1335 from kernelkit/fix-candidate-ds
This reverts a commit introduced in sysrepo v4.2.10
2025-12-22 10:47:17 +01:00
Mattias Walström 634e02c0d9 This reverts a commit introduced in sysrepo v4.2.10
It changes the datastore to running when init nacm, this
make klish misbehave:
Klish open candidate -> init nacm -> now all changes are made in running
2025-12-22 09:20:01 +01:00
Mattias WalströmandGitHub 120a55fdfe Merge pull request #1333 from kernelkit/reorder-enums
YANG: all values in an enumeration needs to be sorted in ascendning order
2025-12-21 17:58:45 +01:00
Mattias WalströmandGitHub 463b5164b3 Merge pull request #1334 from kernelkit/fix-yang-warnings
YANG: infix-routing: Fix YANG schema validation
2025-12-21 17:58:00 +01:00
Mattias Walström c8743435fa YANG: infix-routing: Fix YANG schema validation
Schema node "type" for parent "/ietf-routing:routing/control-plane-protocols/control-plane-protocol/ietf-ospf:ospf" not found;
  in expr "derived-from-or-self(../../rt:type"
2025-12-21 13:30:35 +01:00
Mattias Walström 186ea1c9a5 YANG: all values in an enumeration needs to be sorted in ascendning order
This due to a bug in libyang: https://github.com/CESNET/libyang/issues/2462
Without this fix, confd crashes when setting for example the DHCPv6 option
ntp-server
2025-12-21 13:14:39 +01:00
Mattias WalströmandGitHub 44adaf1de9 Merge pull request #1331 from kernelkit/support-test-update
Support test update
2025-12-18 18:54:10 +01:00
Joachim Wiberg fb338ad285 test: fix regression in misc/support_collect
The support script now requires sudo.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 17:01:53 +01:00
Joachim Wiberg 79b0625a5b bin/support: simplify leading script comment
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 17:01:33 +01:00
Joachim Wiberg f5a962380f doc: update ChangeLog
The rpi-firmware package upgrade is on main @ 19471dd already.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 17:00:24 +01:00
Joachim WibergandGitHub 464932449c Merge pull request #1330 from kernelkit/qemu-add-sbin-to-path
qemu: fix /cfg mount failure due to missing mkfs.ext4 in PATH

[skip ci]
2025-12-18 16:24:16 +01:00
Mattias WalströmandGitHub b407452f9c Merge pull request #1329 from kernelkit/kernel-upgrade-6d3d02c5-9b0a-4e46-b3da-c46d8dd50afa
Upgrade to kernel 6.12.63
2025-12-18 16:15:43 +01:00
Richard Alpe 9c351c74f4 qemu: fix /cfg mount failure due to missing mkfs.ext4 in PATH
The cfg.ext4 disk image was created but not formatted because mkfs.ext4
wasn't found. As sbin is not in PATH for an unprivileged user in
Debian.

This caused the VM boot to fail with "No persistent storage found for /cfg".

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-18 16:15:43 +01:00
ael-bot a999a93e63 Upgrade Linux kernel to 6.12.63 2025-12-18 13:34:41 +00:00
Joachim WibergandGitHub 230574b0bb Merge pull request #1325 from kernelkit/support-extra
Support collection fixes and additions

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 13:51:38 +01:00
Joachim Wiberg 5420fb01f2 support: simplify, user must use sudo for full logs
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 13:44:19 +01:00
Joachim Wiberg 39429f7993 support: Fix handling of root-owned /var/lib/support directory
Attempt to fix permissions with sudo before falling back to $HOME,
and verify directory is actually writable before proceeding.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 13:44:19 +01:00
Joachim Wiberg b0dce8a05e Follw-up to d7abe46, use correct compatible string for override
Actually disable iitod on Styx DCP-SC-28p to work around #670, this
prohibits software control of LEDs, leaving the default HW control,
which has proven more stable on this platform.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 13:44:18 +01:00
Mattias WalströmandGitHub c56a9f2c0e Merge pull request #1326 from kernelkit/allow-llpd-disabled
yanger: Allow lldpd to be disabled (or crashed)
2025-12-18 12:37:31 +01:00
Richard Alpe faebf7015c cli: use dynamic column widths in simple table
- Remove fixed lengths from Column class
- Add dynamic width calculation to SimpleTable
- Update service table to use new batched printing

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-18 10:52:34 +01:00
Mattias Walström 0a9664eea6 yanger: Allow lldpd to be disabled (or crashed)
Allow to query operational even with no lldpd running.
2025-12-18 08:53:03 +01:00
Joachim Wiberg 3a9d3246dc test: extend container basic to verify resource limits
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 07:26:41 +01:00
Joachim Wiberg ad79f6685b test: allow silencing curl connection failures on retry
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 07:26:40 +01:00
Joachim Wiberg 4941b6f91a confd: add support for container resource limits
Add resource-limit and resource-usage containers to YANG model.  Podman,
and later conmon, enforce CPU and memory limits in a delegated cgroupsv2
hierarchy managed by Finit.

Resource usage is queried from 'podman inspect', which has more nodes
than what is currently possible to limit.

Requires Finit 4.15, or later.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 07:26:40 +01:00
Joachim Wiberg 9d915f4bbc package/finit: bump to v4.15-rc1
- Improved cgroup support, including subgroup delegation.
 - Drop previously backported patch.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 07:26:40 +01:00
Richard Alpe 72ffbf6254 test: update unit data with service statistics
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-17 15:34:13 +01:00
Richard Alpe b826bcb9d7 cli: print service statistics using new table framework
Replace manual f-string formatting with SimpleTable/Column classes.

This new "framework" handles ANSI colors and padding. Removing the
hassle of manually calculating padding. You simply specify the header
with max number of chars the data can be and if you want left/right
padding and the "framework" calculates the padding for you.

We use this new "framework" to pretty print the newly added services
statistics.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-17 15:34:10 +01:00
Richard Alpe f653cacd1a statd: populate service runtime statistic
Populate operational runtime statistics for services.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-17 15:34:07 +01:00
Richard Alpe 97e89cfccc confd: extend infix-system with service runtime statistics
Add statistics container to service model with memory usage, uptime,
and restart count tracking.

Updates YANG revision to 2025-12-02.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-17 15:34:02 +01:00
1172 changed files with 89410 additions and 16016 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
Limited free support is only available using the online resources of the
project on GitHub, and Discord, see <https://github.com/kernelkit>:
project on GitHub, and Discord, see <https://github.com/kernelkit/infix>:
&nbsp;&nbsp; :house: <https://www.kernelkit.org> — home page, blog, news, howto's and tutorials
&nbsp;&nbsp; :package: <https://github.com/kernelkit/infix/releases/latest> — latest release
&nbsp;&nbsp; :speech_balloon: <https://github.com/orgs/kernelkit/discussions>
&nbsp;&nbsp; :bug: <https://github.com/kernelkit/infix/issues>
&nbsp;&nbsp; :bug: <https://github.com/kernelkit/infix/issues>
Support contracts, development of new features, fast-tracking of reviews
and contributions, customer branding of Infix, and even customer specific
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
name: Add issue to project Infix&co
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
- uses: actions/add-to-project@v2
with:
project-url: https://github.com/orgs/kernelkit/projects/3
github-token: ${{ secrets.ADD_TO_PROJECT }}
+3 -3
View File
@@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Validate release version format
id: validate
@@ -170,7 +170,7 @@ jobs:
fi
- name: Upload signed artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: signed-infix-${{ steps.validate.outputs.file_version }}
path: ${{ steps.download_signed.outputs.signed_filename }}
@@ -212,4 +212,4 @@ jobs:
---
**Next Steps:** The signed release can now be distributed with cryptographic verification of authenticity.
EOF
EOF
+14 -20
View File
@@ -19,10 +19,17 @@ jobs:
- aarch64_qemu_boot
- bpi_r3_sd_boot
- bpi_r3_emmc_boot
- bpi_r4_sd_boot
- bpi_r4_emmc_boot
- bpi_r64_sd_boot
- bpi_r64_emmc_boot
- cn9130_crb_boot
- fireant_boot
- nanopi_r2s_boot
- rpi2_boot
- rpi64_boot
- sama7g54_ek_emmc_boot
- sama7g54_ek_sd_boot
env:
MAKEFLAGS: -j5
steps:
@@ -34,7 +41,7 @@ jobs:
ls -la ./
- name: Checkout infix repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
clean: true
@@ -63,24 +70,11 @@ jobs:
echo "Building ${defconfig}_defconfig, version ${version}-${rev}, artifact ${archive} ..."
- name: Restore Cache of dl/
uses: actions/cache@v4
- uses: kernelkit/actions/cache-restore@v1
with:
path: dl/
key: dl-boot-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-boot-
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-boot-${{ matrix.defconfig }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-boot-${{ matrix.defconfig }}-
ccache-boot-
ccache-
target: ${{ matrix.defconfig }}
dl-prefix: dl-boot
ccache-prefix: ccache-boot
- name: Configure ${{ matrix.defconfig }}_defconfig
run: |
@@ -102,7 +96,7 @@ jobs:
mv images ${{ steps.vars.outputs.dirname }}
tar cfz ${{ steps.vars.outputs.archive }} ${{ steps.vars.outputs.dirname }}/
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: output/${{ steps.vars.outputs.archive }}
name: artifact-${{ matrix.defconfig }}
@@ -114,7 +108,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "artifact-*"
merge-multiple: true
+138 -242
View File
@@ -1,4 +1,4 @@
name: Create SD Card & eMMC Images
name: Create Images
on:
workflow_dispatch:
@@ -8,22 +8,23 @@ on:
type: choice
required: true
options:
- raspberrypi-rpi2
- raspberrypi-rpi64
- bananapi-bpi-r3
- bananapi-bpi-r4
- bananapi-bpi-r64
- friendlyarm-nanopi-r2s
- microchip-sama7g54-ek
- acer-connect-vero-w
default: 'raspberrypi-rpi64'
use_latest_release:
description: 'Use latest release artifacts instead of workflow artifacts'
type: boolean
default: false
jobs:
create-image:
name: Create SD Card Image for ${{ inputs.board }}
name: Create images for ${{ inputs.board }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
clean: true
fetch-depth: 0
@@ -50,268 +51,171 @@ jobs:
mkdir -p output/images
mkdir -p build
- name: Set bootloader and target based on board
- name: Set bootloaders and targets based on board
run: |
arch=
targets=
bootloader_sdcard=
bootloader_emmc=
case "${{ inputs.board }}" in
raspberrypi-rpi2)
arch=arm
targets="sdcard"
bootloader_sdcard=rpi2-boot
;;
raspberrypi-rpi64)
echo "BOOTLOADER=rpi64_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
arch=aarch64
targets="sdcard"
bootloader_sdcard=rpi64-boot
;;
bananapi-bpi-r3)
echo "BOOTLOADER_SD=bpi_r3_sd_boot" >> $GITHUB_ENV
echo "BOOTLOADER_EMMC=bpi_r3_emmc_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=true" >> $GITHUB_ENV
arch=aarch64
targets="sdcard emmc"
bootloader_sdcard=bpi-r3-sd-boot
bootloader_emmc=bpi-r3-emmc-boot
;;
bananapi-bpi-r4)
arch=aarch64
targets="sdcard emmc"
bootloader_sdcard=bpi-r4-sd-boot
bootloader_emmc=bpi-r4-emmc-boot
;;
bananapi-bpi-r64)
arch=aarch64
targets="sdcard emmc"
bootloader_sdcard=bpi-r64-sd-boot
bootloader_emmc=bpi-r64-emmc-boot
;;
acer-connect-vero-w)
arch=aarch64
targets="emmc"
bootloader_emmc=bpi-r3-emmc-boot
;;
friendlyarm-nanopi-r2s)
echo "BOOTLOADER=nanopi_r2s_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
arch=aarch64
targets="sdcard"
bootloader_sdcard=nanopi-r2s-boot
;;
microchip-sama7g54-ek)
arch=arm
targets="sdcard emmc"
bootloader_sdcard=sama7g54-ek-sd-boot
bootloader_emmc=sama7g54-ek-emmc-boot
;;
*)
echo "Error: Unknown board ${{ inputs.board }}"
exit 1
;;
esac
echo "Target: $TARGET for board: ${{ inputs.board }}"
if [ "$BUILD_EMMC" = "true" ]; then
echo "Building both SD and eMMC images"
echo "SD Bootloader: $BOOTLOADER_SD"
echo "eMMC Bootloader: $BOOTLOADER_EMMC"
else
echo "Building SD image only"
echo "Bootloader: $BOOTLOADER"
fi
echo "ARCH=$arch" >> $GITHUB_ENV
echo "TARGETS=$targets" >> $GITHUB_ENV
[ -n "$bootloader_sdcard" ] && echo "BOOTLOADER_SDCARD=$bootloader_sdcard" >> $GITHUB_ENV
[ -n "$bootloader_emmc" ] && echo "BOOTLOADER_EMMC=$bootloader_emmc" >> $GITHUB_ENV
echo "Arch: $arch for board: ${{ inputs.board }}"
echo "Targets: $targets"
[ -n "$bootloader_sdcard" ] && echo "SD bootloader: $bootloader_sdcard"
[ -n "$bootloader_emmc" ] && echo "eMMC bootloader: $bootloader_emmc"
- name: Download bootloader artifacts
if: ${{ !inputs.use_latest_release }}
run: |
# Download from latest bootloader build workflow on main branch
gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
BOOT_RUN_ID=$(cat latest_boot_run_id)
for target in $TARGETS; do
upper=$(printf '%s' "$target" | tr '[:lower:]' '[:upper:]')
bootloader_var="BOOTLOADER_${upper}"
bootloader="${!bootloader_var}"
temp_dir="temp_bootloader_${target}"
out_dir="output_${target}/images"
if [ "$BUILD_EMMC" = "true" ]; then
# Download both SD and eMMC bootloaders for boards that support both
echo "Downloading SD bootloader: ${BOOTLOADER_SD}"
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_SD} --dir temp_bootloader_sd/
mkdir -p output_sd/images
cd temp_bootloader_sd/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
cd ../
rm -rf temp_bootloader_sd/
echo "Downloading ${target} bootloader: ${bootloader}"
mkdir -p "$out_dir"
gh release download latest-boot --pattern "*${bootloader}*" --dir "$temp_dir/"
tar -xzf "$temp_dir"/*.tar.gz --strip-components=1 -C "$out_dir/"
rm -rf "$temp_dir"
echo "Downloading eMMC bootloader: ${BOOTLOADER_EMMC}"
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_EMMC} --dir temp_bootloader_emmc/
mkdir -p output_emmc/images
cd temp_bootloader_emmc/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_bootloader_emmc/
echo "SD bootloader files:"
ls -la output_sd/images/
echo "eMMC bootloader files:"
ls -la output_emmc/images/
else
# Single bootloader for boards that only support SD
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
# Extract bootloader directly to output/images
cd temp_bootloader/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_bootloader/
echo "Bootloader files extracted to output/images:"
ls -la output/images/
fi
echo "${target} bootloader files:"
ls -la "$out_dir/"
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download Infix artifacts
if: ${{ !inputs.use_latest_release }}
run: |
# Download from latest Kernelkit Trigger workflow for main branch
gh run list --workflow=164295764 --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
INFIX_RUN_ID=$(cat latest_infix_run_id)
if [ "$BUILD_EMMC" = "true" ]; then
# Copy Infix artifacts to both SD and eMMC output directories
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
gh run download ${INFIX_RUN_ID} --name artifact-${ARCH} --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_infix/
for target in $TARGETS; do
out_dir="output_${target}/images"
mkdir -p "$out_dir"
tar -xzf temp_infix/*.tar.gz --strip-components=1 -C "$out_dir/"
echo "Infix files extracted to output_sd/images:"
ls -la output_sd/images/
echo "Infix files extracted to output_emmc/images:"
ls -la output_emmc/images/
else
# Single output directory for SD-only boards
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
echo "Infix files extracted to ${out_dir}:"
ls -la "$out_dir/"
done
# Extract Infix directly to output/images
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_infix/
echo "Infix files extracted to output/images:"
ls -la output/images/
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download from latest releases
if: ${{ inputs.use_latest_release }}
run: |
if [ "$BUILD_EMMC" = "true" ]; then
# Download both SD and eMMC bootloaders
gh release download latest-boot --pattern "*${BOOTLOADER_SD}*" --dir temp_bootloader_sd/
mkdir -p output_sd/images
cd temp_bootloader_sd/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
cd ../
rm -rf temp_bootloader_sd/
gh release download latest-boot --pattern "*${BOOTLOADER_EMMC}*" --dir temp_bootloader_emmc/
mkdir -p output_emmc/images
cd temp_bootloader_emmc/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_bootloader_emmc/
# Download Infix once and extract to both directories
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_infix/
echo "SD files extracted to output_sd/images:"
ls -la output_sd/images/
echo "eMMC files extracted to output_emmc/images:"
ls -la output_emmc/images/
else
# Download latest bootloader release
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/
cd temp_bootloader/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_bootloader/
# Download latest Infix release
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_infix/
echo "All files extracted to output/images:"
ls -la output/images/
fi
rm -rf temp_infix/
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Verify extracted files
run: |
if [ "$BUILD_EMMC" = "true" ]; then
echo "Files available for SD image:"
ls -la output_sd/images/
for target in $TARGETS; do
echo "Files available for ${target} image:"
ls -la "output_${target}/images/"
echo ""
echo "Files available for eMMC image:"
ls -la output_emmc/images/
else
echo "Files available for mkimage.sh:"
ls -la output/images/
echo ""
echo "File types:"
file output/images/* || true
fi
done
- name: Create SD card image
- name: Create images
run: |
if [ "$BUILD_EMMC" = "true" ]; then
export BINARIES_DIR=$PWD/output_sd/images
export BUILD_DIR=$PWD/build
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh -t sdcard ${{ inputs.board }}
else
export BINARIES_DIR=$PWD/output/images
export BUILD_DIR=$PWD/build
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh ${{ inputs.board }}
fi
- name: Create eMMC image
if: ${{ env.BUILD_EMMC == 'true' }}
run: |
export BINARIES_DIR=$PWD/output_emmc/images
export BUILD_DIR=$PWD/build
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh -t emmc ${{ inputs.board }}
for target in $TARGETS; do
export BINARIES_DIR=$PWD/output_${target}/images
./utils/mkimage.sh -t "$target" ${{ inputs.board }}
done
- name: Verify created images
run: |
if [ "$BUILD_EMMC" = "true" ]; then
echo "SD card image:"
ls -lh output_sd/images/*-sdcard.img* 2>/dev/null || true
if ls output_sd/images/*-sdcard.img 1> /dev/null 2>&1; then
for img in output_sd/images/*-sdcard.img; do
echo "- $(basename $img)"
file "$img"
fdisk -l "$img" 2>/dev/null | head -20
done
fi
mkdir -p output/images
echo ""
echo "eMMC image:"
ls -lh output_emmc/images/*-emmc.img* 2>/dev/null || true
if ls output_emmc/images/*-emmc.img 1> /dev/null 2>&1; then
for img in output_emmc/images/*-emmc.img; do
echo "- $(basename $img)"
file "$img"
fdisk -l "$img" 2>/dev/null | head -20
done
fi
for target in $TARGETS; do
src_dir="output_${target}/images"
found=false
# Copy both images to output/images for artifact upload
mkdir -p output/images
cp output_sd/images/*-sdcard.img* output/images/ 2>/dev/null || true
cp output_emmc/images/*-emmc.img* output/images/ 2>/dev/null || true
else
echo "Contents of output/images after mkimage.sh:"
ls -lh output/images/
echo "${target} image:"
ls -lh "$src_dir"/*-"$target".img* 2>/dev/null || true
# Look for SD card image with pattern: *-sdcard.img
if ls output/images/*-sdcard.img 1> /dev/null 2>&1; then
echo "Found SD card image(s):"
for img in output/images/*-sdcard.img; do
echo "- $(basename $img)"
file "$img"
fdisk -l "$img" 2>/dev/null || true
done
else
echo "No SD card image found matching pattern: *-sdcard.img"
echo "Available files:"
ls -la output/images/
for img in "$src_dir"/*-"$target".img; do
[ -e "$img" ] || continue
found=true
echo "- $(basename "$img")"
file "$img"
fdisk -l "$img" 2>/dev/null || true
done
if [ "$found" = false ]; then
echo "No ${target} image found matching pattern: *-${target}.img"
echo "Available files in ${src_dir}:"
ls -la "$src_dir/"
exit 1
fi
fi
for artifact in "$src_dir"/*-"$target".img*; do
[ -e "$artifact" ] || continue
cp "$artifact" output/images/
done
echo ""
done
- name: Upload images as artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: images-${{ inputs.board }}
path: |
@@ -342,35 +246,27 @@ jobs:
- name: Generate summary
run: |
if [ "$BUILD_EMMC" = "true" ]; then
cat <<EOF >> $GITHUB_STEP_SUMMARY
# SD Card & eMMC Image Build Complete! 🚀
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Image Build Complete! 🚀
**Board:** ${{ inputs.board }}
**Target:** ${{ env.TARGET }}
**SD Bootloader:** ${{ env.BOOTLOADER_SD }}
**eMMC Bootloader:** ${{ env.BOOTLOADER_EMMC }}
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
**Arch:** ${{ env.ARCH }}
**Targets:** ${{ env.TARGETS }}
**Bootloader Source:** latest-boot release
**Infix Source:** Latest workflow run on main
## Bootloaders
$(for target in $TARGETS; do
case "$target" in
sdcard) bootloader="$BOOTLOADER_SDCARD" ;;
emmc) bootloader="$BOOTLOADER_EMMC" ;;
esac
printf -- '- %s: %s\n' "$target" "$bootloader"
done)
## Created Images
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
## Download
Both SD card and eMMC images are available as workflow artifacts above and in the latest-boot release.
The generated images are available as workflow artifacts above and in the latest-boot release.
EOF
else
cat <<EOF >> $GITHUB_STEP_SUMMARY
# SD Card Image Build Complete! 🚀
**Board:** ${{ inputs.board }}
**Target:** ${{ env.TARGET }}
**Bootloader:** ${{ env.BOOTLOADER }}
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
## Created Images
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
## Download
The SD card image is available as a workflow artifact above.
EOF
fi
+9 -31
View File
@@ -20,24 +20,16 @@ jobs:
runs-on: [self-hosted, release]
strategy:
matrix:
target: [aarch64, x86_64]
target: [aarch64, arm, x86_64]
fail-fast: false
steps:
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
clean: true
submodules: recursive
- uses: kernelkit/actions/podman-cleanup@v1
- name: Set Release Variables
id: vars
run: |
@@ -48,24 +40,10 @@ jobs:
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
- name: Restore Cache of dl/
if: ${{ inputs.use_cache }}
uses: actions/cache@v4
- uses: kernelkit/actions/cache-restore@v1
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
if: ${{ inputs.use_cache }}
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-${{ matrix.target }}-
ccache-
target: ${{ matrix.target }}
enabled: ${{ inputs.use_cache }}
- name: Configure & Build
env:
@@ -108,12 +86,12 @@ jobs:
ln -s ${{ steps.vars.outputs.dir }} images
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: artifact-${{ matrix.target }}
path: output/*.tar.gz
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: artifact-disk-image-${{ matrix.target }}
path: output/images/*.qcow2
+6 -30
View File
@@ -78,18 +78,9 @@ jobs:
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- name: Checkout infix repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
@@ -98,6 +89,8 @@ jobs:
submodules: recursive
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
- uses: kernelkit/actions/podman-cleanup@v1
- name: Run pre-build script
if: ${{ inputs.pre_build_script != '' }}
run: |
@@ -127,22 +120,9 @@ jobs:
echo "tgz=${name}-${target}.tar.gz" >> $GITHUB_OUTPUT
echo "Building target ${target}_defconfig"
- name: Restore Cache of dl/
uses: actions/cache@v4
- uses: kernelkit/actions/cache-restore@v1
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-${{ env.TARGET }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-${{ env.TARGET }}-
ccache-
target: ${{ env.TARGET }}
- name: Configure ${{ env.TARGET }}
run: |
@@ -153,10 +133,6 @@ jobs:
podman rm -af || true
pkill -9 -f rootlessport || true
- name: Unit Test ${{ env.TARGET }}
run: |
make test-unit
- name: Prepare parallel build
id: parallel
run: |
@@ -202,7 +178,7 @@ jobs:
ln -s ${{ steps.vars.outputs.dir }} images
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: output/${{ steps.vars.outputs.tgz }}
name: artifact-${{ env.TARGET }}
+9 -9
View File
@@ -1,4 +1,4 @@
name: Check Kernel 6.12 Release
name: Check Kernel 6.18 Release
on:
schedule:
@@ -12,17 +12,17 @@ jobs:
steps:
- name: Check out infix repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
- name: Fetch kernel.org and check for 6.12 release
- name: Fetch kernel.org and check for 6.18 release
id: check
run: |
set -e -o pipefail
# Fetch the kernel.org frontpage and extract 6.12 version
CURRENT_VERSION=$(curl -s https://www.kernel.org/ | grep -oP '6\.12\.\d+' | head -n1)
# Fetch the kernel.org frontpage and extract 6.18 version
CURRENT_VERSION=$(curl -s https://www.kernel.org/ | grep -oP '6\.18\.\d+' | head -n1)
if [ -z "$CURRENT_VERSION" ]; then
echo "Failed to fetch kernel version"
@@ -30,7 +30,7 @@ jobs:
fi
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "Current 6.12 kernel version: $CURRENT_VERSION"
echo "Current 6.18 kernel version: $CURRENT_VERSION"
# Get the version from infix defconfig
INFIX_VERSION=$(grep 'BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=' configs/aarch64_defconfig | cut -d'"' -f2)
@@ -47,7 +47,7 @@ jobs:
echo "PR already exists for kernel $CURRENT_VERSION, skipping"
else
echo "new_release=true" >> $GITHUB_OUTPUT
echo "🎉 New 6.12 kernel released: $CURRENT_VERSION (infix version: $INFIX_VERSION)"
echo "🎉 New 6.18 kernel released: $CURRENT_VERSION (infix version: $INFIX_VERSION)"
fi
else
echo "new_release=false" >> $GITHUB_OUTPUT
@@ -99,11 +99,11 @@ jobs:
BRANCH_NAME: ${{ steps.branch.outputs.name }}
run: |
set -e -o pipefail
./utils/kernel-upgrade.sh linux "$BRANCH_NAME"
./utils/kernel-upgrade.sh linux 6.18 "$BRANCH_NAME"
- name: Create pull request
if: steps.check.outputs.new_release == 'true'
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
github-token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
script: |
+16 -6
View File
@@ -8,13 +8,15 @@ on:
env:
PROJECT_NAME: Infix
CONTACT_EMAIL: troglobit@gmail.com
LIBYANG_VERSION: 4.2.2
SYSREPO_VERSION: 4.2.10
jobs:
coverity:
if: ${{github.repository_owner == 'kernelkit'}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Fetch latest Coverity Scan MD5
id: var
env:
@@ -25,7 +27,7 @@ jobs:
-O coverity-latest.tar.gz.md5
echo "md5=$(cat coverity-latest.tar.gz.md5)" | tee -a $GITHUB_OUTPUT
- uses: actions/cache@v4
- uses: actions/cache@v5
id: cache
with:
path: coverity-latest.tar.gz
@@ -55,16 +57,24 @@ jobs:
sudo apt-get -y update
sudo apt-get -y install pkg-config libjansson-dev libev-dev \
libcrypt-dev libglib2.0-dev libpcre2-dev \
libuev-dev
libuev-dev libavahi-client-dev
- name: Build dependencies
run: |
git clone https://github.com/CESNET/libyang.git
git clone -b v${LIBYANG_VERSION} --depth 1 https://github.com/CESNET/libyang.git
for p in patches/libyang/${LIBYANG_VERSION}/*.patch; do
git -C libyang apply < "$p"
done
mkdir libyang/build
(cd libyang/build && cmake .. && make all && sudo make install)
git clone https://github.com/sysrepo/sysrepo.git
git clone -b v${SYSREPO_VERSION} --depth 1 https://github.com/sysrepo/sysrepo.git
for p in patches/sysrepo/${SYSREPO_VERSION}/*.patch; do
git -C sysrepo apply < "$p"
done
mkdir sysrepo/build
(cd sysrepo/build && cmake .. && make all && sudo make install)
git clone https://github.com/troglobit/libite.git
(cd libite && ./autogen.sh && ./configure && make && sudo make install)
make dep
@@ -88,7 +98,7 @@ jobs:
https://scan.coverity.com/builds?project=${PROJECT_NAME}
- name: Upload build.log
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: coverity-build.log
path: cov-int/build-log.txt
+2 -2
View File
@@ -24,12 +24,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: '3.x'
+2 -2
View File
@@ -33,7 +33,7 @@ jobs:
mtools
- name: Checkout infix repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
@@ -77,7 +77,7 @@ jobs:
ln -s Infix-x86_64 images
tar cfz Infix-x86_64.tar.gz Infix-x86_64
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: output/Infix-x86_64.tar.gz
name: artifact-x86_64
+4 -16
View File
@@ -44,23 +44,11 @@ jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore Cache of dl/
uses: actions/cache@v4
- uses: actions/checkout@v6
- uses: kernelkit/actions/cache-restore@v1
with:
path: dl/
key: dl-netconf-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-netconf-
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-x86_64-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-x86_64-
ccache-
target: x86_64
dl-prefix: dl-netconf
- name: Disk inventory (2/2) ...
run: |
echo "df -h ========================================================================="
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "artifact-*"
merge-multiple: true
+5 -17
View File
@@ -48,20 +48,12 @@ jobs:
contents: write
discussions: write
steps:
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: 'true'
- uses: kernelkit/actions/podman-cleanup@v1
- name: Set Release Variables
id: rel
run: |
@@ -86,7 +78,7 @@ jobs:
echo "pre=${{ steps.rel.outputs.pre }}"
echo "latest=${{ steps.rel.outputs.latest }}"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "artifact-*"
merge-multiple: true
@@ -104,11 +96,7 @@ jobs:
- name: Extract ChangeLog entry ...
run: |
awk '/^-----*$/{if (x == 1) exit; x=1;next}x' doc/ChangeLog.md \
|head -n -1 > release.md
echo "" >> release.md
echo "> [!TIP]" >> release.md
echo "> **Try Infix in GNS3!** Download the appliance from the [GNS3 Marketplace](https://gns3.com/marketplace/appliances/infix) to test Infix in a virtual network environment without hardware." >> release.md
cat doc/ChangeLog.md | ./utils/extract-changelog.sh > release.md
cat release.md
- uses: ncipollo/release-action@v1
+16 -16
View File
@@ -43,6 +43,11 @@ on:
type: string
default: ''
description: 'Optional script to run after checkout (for spin customization)'
release:
required: false
type: string
default: ''
description: 'Release version (e.g. v26.04.0), sets INFIX_RELEASE so make test finds versioned artifacts'
secrets:
CHECKOUT_TOKEN:
required: false
@@ -60,18 +65,8 @@ jobs:
name: Regression Test ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
runs-on: [self-hosted, regression]
steps:
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- name: Checkout infix repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
@@ -80,6 +75,8 @@ jobs:
submodules: recursive
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
- uses: kernelkit/actions/podman-cleanup@v1
- name: Run pre-test script
if: ${{ inputs.pre_test_script != '' }}
run: |
@@ -101,7 +98,7 @@ jobs:
run: |
make ${{ env.TARGET }}_defconfig
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "artifact-*"
merge-multiple: true
@@ -113,12 +110,15 @@ jobs:
ls -l
mkdir -p output
mv ${name}-${target}.tar.gz output/
tarfile=$(ls ${name}-${target}*.tar.gz | head -1)
mv "$tarfile" output/
cd output/
tar xf ${name}-${target}.tar.gz
ln -s ${name}-${target} images
tar xf "$tarfile"
ln -s "${tarfile%.tar.gz}" images
- name: Regression Test ${{ env.TARGET }}
env:
INFIX_RELEASE: ${{ inputs.release }}
run: |
if [ -n "$NINEPM_CONF" ]; then
export NINEPM_PROJ_CONFIG="${GITHUB_WORKSPACE}/$NINEPM_CONF"
@@ -139,7 +139,7 @@ jobs:
make test-dir="$(pwd)/$TEST_PATH" test-report
- name: Upload Test Report as Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: test-report
path: output/images/test-report.pdf
+19 -3
View File
@@ -1,4 +1,4 @@
name: Kernelkit Trigger
name: CI
on:
pull_request:
@@ -28,6 +28,7 @@ jobs:
outputs:
x86_64_target: ${{ steps.set-targets.outputs.x86_64_target }}
aarch64_target: ${{ steps.set-targets.outputs.aarch64_target }}
arm_target: ${{ steps.set-targets.outputs.arm_target }}
steps:
- run: |
echo "Triggering build, logging meta data ..."
@@ -43,25 +44,40 @@ jobs:
| grep -q "ci:main"; then
echo "x86_64_target=x86_64_minimal" >> $GITHUB_OUTPUT
echo "aarch64_target=aarch64_minimal" >> $GITHUB_OUTPUT
echo "arm_target=arm_minimal" >> $GITHUB_OUTPUT
else
echo "x86_64_target=x86_64" >> $GITHUB_OUTPUT
echo "aarch64_target=aarch64" >> $GITHUB_OUTPUT
echo "arm_target=arm" >> $GITHUB_OUTPUT
fi
unit-test:
needs: check-trigger
uses: ./.github/workflows/unit-test.yml
with:
name: "infix"
target: ${{ needs.check-trigger.outputs.x86_64_target }}
build-x86_64:
needs: check-trigger
needs: [check-trigger, unit-test]
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ needs.check-trigger.outputs.x86_64_target }}
build-aarch64:
needs: check-trigger
needs: [check-trigger, unit-test]
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ needs.check-trigger.outputs.aarch64_target }}
build-arm:
needs: [check-trigger, unit-test]
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ needs.check-trigger.outputs.arm_target }}
test-run-x86_64:
needs: [check-trigger, build-x86_64]
uses: ./.github/workflows/test.yml
+116
View File
@@ -0,0 +1,116 @@
name: unit-test
on:
workflow_dispatch:
inputs:
target:
description: "Build target (e.g. aarch64 or aarch64_minimal)"
default: "x86_64"
type: string
parallel:
description: 'Massive parallel build of each image'
default: true
type: boolean
name:
description: "Name (for spin overrides)"
default: "infix"
type: string
infix_repo:
description: 'Repo to checkout (for spin overrides)'
default: kernelkit/infix
type: string
infix_branch:
description: 'Branch/tag/commit to checkout (for spin overrides)'
default: ''
type: string
workflow_call:
inputs:
target:
required: true
type: string
name:
required: true
type: string
infix_repo:
required: false
type: string
default: kernelkit/infix
infix_branch:
required: false
type: string
default: ''
description: 'Branch/tag/commit to checkout (for spin overrides). Defaults to github.ref if not specified'
parallel:
required: false
type: boolean
default: true
pre_build_script:
required: false
type: string
default: ''
description: 'Optional script to run after checkout (for spin customization)'
secrets:
CHECKOUT_TOKEN:
required: false
description: 'Token for cross-repository access'
env:
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
INFIX_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_branch || inputs.infix_branch }}
jobs:
unit-tests:
name: Build ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
runs-on: [ self-hosted, latest ]
env:
PARALLEL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.parallel == 'true' || github.event_name != 'workflow_dispatch' && inputs.parallel == true }}
strategy:
fail-fast: false
steps:
- name: Cleanup Build Folder
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- name: Checkout infix repo
uses: actions/checkout@v6
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
clean: true
fetch-depth: 0
submodules: recursive
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
- uses: kernelkit/actions/podman-cleanup@v1
- name: Run pre-build script
if: ${{ inputs.pre_build_script != '' }}
run: |
cat > ./pre-build.sh << 'EOF'
${{ inputs.pre_build_script }}
EOF
chmod +x ./pre-build.sh
bash ./pre-build.sh
- uses: kernelkit/actions/cache-restore@v1
with:
target: ${{ env.TARGET }}
- name: Configure ${{ env.TARGET }}
run: |
make ${{ env.TARGET }}_defconfig
- name: Cleanup stale containers and ports
run: |
podman rm -af || true
pkill -9 -f rootlessport || true
- name: Unit Test ${{ env.TARGET }}
run: |
make test-unit
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
pattern: "artifact-*"
merge-multiple: true
+2
View File
@@ -1,6 +1,8 @@
*~
.claude
.gdb_history
.claude
AGENTS.md
/.backup
/.ccache
/dl
+22 -3
View File
@@ -9,8 +9,10 @@ O ?= output
# otherwise treat it as relative to ./buildroot.
override O := $(if $(filter /%,$O),$O,$(CURDIR)/$O)
config := $(O)/.config
bmake = $(MAKE) -C buildroot O=$(O) $1
config := $(O)/.config
bmake = $(MAKE) -C buildroot O=$(O) $1
SNIPPETS_DIR := $(CURDIR)/configs/snippets
MERGE_CONFIG := $(CURDIR)/buildroot/support/kconfig/merge_config.sh
all: $(config) buildroot/Makefile
@@ -26,6 +28,23 @@ $(config):
@echo "'make <board>_defconfig' before building an image."
@exit 1
apply-%: $(SNIPPETS_DIR)/%.conf | $(config)
@KCONFIG_CONFIG=$(config) $(MERGE_CONFIG) -m $(config) $<
@+$(call bmake,olddefconfig)
@echo "Applied snippet: $<"
list-snippets:
@echo "Available snippets (use 'make apply-<name>'):"
@ls $(SNIPPETS_DIR)/*.conf 2>/dev/null | sed 's|.*/||; s|\.conf$$||; s|^| |'
dev: | $(config)
@for s in $(SNIPPETS_DIR)/*.conf; do \
KCONFIG_CONFIG=$(config) $(MERGE_CONFIG) -m $(config) $$s; \
echo "Applied snippet: $$s"; \
done
@+$(call bmake,olddefconfig)
@+$(call bmake,all)
%: | buildroot/Makefile
@+$(call bmake,$@)
@@ -44,4 +63,4 @@ test:
buildroot/Makefile:
@git submodule update --init
.PHONY: all check coverity dep test cyclonedx
.PHONY: all check coverity dep test cyclonedx list-snippets dev
+33 -35
View File
@@ -16,10 +16,12 @@ if something goes wrong. Deploy once, trust forever.
**🤝 Friendly**
Actually easy to use. Auto-generated CLI from standard YANG models comes
with built-in help for every command — just hit `?` or TAB for
context-aware assistance. Familiar NETCONF/RESTCONF APIs and
[comprehensive documentation][4] mean you're never stuck. Whether
you're learning networking or managing enterprise infrastructure.
with built-in help for every command — just hit <kbd>?</kbd> or
<kbd>TAB</kbd> for context-aware assistance.
Familiar NETCONF & RESTCONF APIs and [comprehensive documentation][4]
mean you're never stuck. Whether you're learning networking or managing
enterprise infrastructure.
**🛡️ Secure**
Built with security as a foundation, not an afterthought. Minimal
@@ -53,27 +55,24 @@ your device, your rules.
Consistent tooling from development to production deployment.
How about a digital twin using raw Qemu or [GNS3](https://gns3.com/infix)!
## See It In Action
## Quick Example
Configure an interface in seconds - the CLI guides you with built-in help:
<details><summary><b>Click Here for an example CLI Session</b></summary>
```bash
admin@infix-12-34-56:/> configure
admin@infix-12-34-56:/config/> edit interface eth0
admin@infix-12-34-56:/config/interface/eth0/> set ipv4 <TAB>
address autoconf bind-ni-name enabled
forwarding mtu neighbor
admin@infix-12-34-56:/config/interface/eth0/> set ipv4 address 192.168.2.200 prefix-length 24
admin@infix-12-34-56:/config/interface/eth0/> show
<pre><code>admin@infix-12-34-56:/> <b>configure</b>
admin@infix-12-34-56:/config/> <b>edit interface eth0</b>
admin@infix-12-34-56:/config/interface/eth0/> <b>set ipv4</b> <kbd>TAB</kbd>
address autoconf bind-ni-name dhcp
enabled forwarding mtu neighbor
admin@infix-12-34-56:/config/interface/eth0/> <b>set ipv4 address 192.168.2.200 prefix-length 24</b>
admin@infix-12-34-56:/config/interface/eth0/> <b>show</b>
type ethernet;
ipv4 {
address 192.168.2.200 {
prefix-length 24;
}
}
admin@infix-12-34-56:/config/interface/eth0/> diff
admin@infix-12-34-56:/config/interface/eth0/> <b>diff</b>
interfaces {
interface eth0 {
+ ipv4 {
@@ -83,25 +82,23 @@ interfaces {
+ }
}
}
admin@infix-12-34-56:/config/interface/eth0/> leave
admin@infix-12-34-56:/> show interfaces
INTERFACE PROTOCOL STATE DATA
eth0 ethernet UP 52:54:00:12:34:56
ipv4 192.168.2.200/24 (static)
ipv6 fe80::5054:ff:fe12:3456/64 (link-layer)
admin@infix-12-34-56:/config/interface/eth0/> <b>leave</b>
admin@infix-12-34-56:/> <b>show interfaces</b>
<u>INTERFACE PROTOCOL STATE DATA </u>
lo ethernet UP 00:00:00:00:00:00
ipv4 127.0.0.1/8 (static)
ipv6 ::1/128 (static)
admin@infix-12-34-56:/> copy running-config startup-config
```
eth0 ethernet UP 52:54:00:12:34:56
ipv4 192.168.2.200/24 (static)
ipv6 fe80::5054:ff:fe12:3456/64 (link-layer)
admin@infix-12-34-56:/> <b>copy running startup</b>
</code></pre>
Notice how TAB completion shows available options, `show` displays
current config, and `diff` shows exactly what changed before you
commit your changes with the `leave` command.
Notice how <kbd>TAB</kbd> completion shows available options, `show`
displays current config, and `diff` shows exactly what changed before
you commit your changes with the `leave` command.
</details>
> [Full CLI documentation →][3]
For more information, see [CLI documentation][3].
## Get Started
@@ -111,12 +108,13 @@ containers for any custom functionality you need.
### Supported Platforms
- **Raspberry Pi 4B** - Perfect for home labs, learning, and prototyping
- **Raspberry Pi 2B/3B/4B/CM4** - Perfect for home labs, learning, and prototyping
- **Banana Pi-R3** - Your next home router and gateway
- **NanoPi R2S** - Compact dual-port router in a tiny package
- **x86_64** - Run in VMs or on mini PCs for development and testing
- **Marvell CN9130 CRB, EspressoBIN** - High-performance ARM64 platforms
- **Microchip SparX-5i** - Enterprise switching capabilities
- **Microchip SAMA7G54-EK** - ARM Cortex-A7
- **NXP i.MX8MP EVK** - Highly capable ARM64 SoC
- **StarFive VisionFive2** - RISC-V architecture support
@@ -170,13 +168,13 @@ APIs.
[0]: https://www.kernel.org
[1]: https://buildroot.org/ "Buildroot Homepage"
[2]: https://www.sysrepo.org/ "Sysrepo Homepage"
[3]: https://kernelkit.org/infix/latest/cli/introduction/
[4]: https://kernelkit.org/infix/
[5]: https://github.com/kernelkit/infix/releases
[3]: https://www.kernelkit.org/infix/latest/cli/introduction/
[4]: https://www.kernelkit.org/infix/
[5]: https://github.com/kernelkit/infix/releases/latest
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest "Latest build"
[License]: https://en.wikipedia.org/wiki/GPL_license
[License Badge]: https://img.shields.io/badge/License-GPL%20v2-blue.svg
[Release]: https://github.com/kernelkit/infix/releases
[Release]: https://github.com/kernelkit/infix/releases/latest
[Release Badge]: https://img.shields.io/github/v/release/kernelkit/infix
[GitHub]: https://github.com/kernelkit/infix/actions/workflows/build.yml/
[GitHub Status]: https://github.com/kernelkit/infix/actions/workflows/build.yml/badge.svg
+1 -1
View File
@@ -1,6 +1,6 @@
menu "Board Support"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch32/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/arm/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/riscv64/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/x86_64/Config.in"
+18
View File
@@ -0,0 +1,18 @@
Board Support
=============
The board support for an architecture always starts with Qemu support,
this is what each `linux_defconfig` at the very least sets up. Then
each `$BR2_ARCH` has additional BSPs, e.g., Banana Pi BPI-R3.
The `board/` directory is matched with the `configs/*_defconfigs` and
the only execption is `board/common/`, which holds all shared files for
Infix builds.
Each `board/$BR2_ARCH/` can then have vendor/product sub-directories
for the BSPs which may contain "fixups" to the base kernel config and
any additional device tree files that should be included as well.
To rebuild a board-specific package, e.g. NanoPi R2S:
make friendlyarm-nanopi-r2s-rebuild all
-5
View File
@@ -1,5 +0,0 @@
if BR2_arm
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch32/raspberrypi-rpi2/Config.in"
endif
-1
View File
@@ -1 +0,0 @@
+3
View File
@@ -1,7 +1,10 @@
if BR2_aarch64
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/alder-alder/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/acer-connect-vero-w6m/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r3/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r4/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r64/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/freescale-imx8mp-evk/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/friendlyarm-nanopi-r2s/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/marvell-cn9130-crb/Config.in"
+9 -5
View File
@@ -4,8 +4,12 @@ aarch64
Board Specific Documentation
----------------------------
- [Banana Pi R3](banana-pi-r3/)
- [Marvell CN9130-CRB](cn9130-crb/)
- [Microchip SparX-5i PCB135 (eMMC)](sparx5-pcb135/)
- [NanoPi R2S](r2s/)
- [Raspberry Pi 64-bit](raspberry-pi64/)
- [Acer Connect Vero W6m](acer-connect-vero-w6m/)
- [Banana Pi BPi-R3](bananapi-bpi-r3/)
- [Banana Pi BPi-R4](bananapi-bpi-r4/)
- [Banana Pi BPi-R64](bananapi-bpi-r64/)
- [Marvell CN9130-CRB](marvell-cn9130-crb/)
- [Marvell ESPRESSObin](marvell-espressobin/)
- [Microchip SparX-5i PCB135 (eMMC)](microchip-sparx5-pcb135/)
- [NanoPi R2S](friendlyarm-nanopi-r2s/)
- [Raspberry Pi 64-bit](raspberrypi-rpi64/)
@@ -0,0 +1,6 @@
config BR2_PACKAGE_ACER_CONNECT_VERO_W6M
bool "Acer Connect Vero W6m"
depends on BR2_aarch64
select BR2_PACKAGE_BANANAPI_BPI_R3
help
Build Acer Connect Vero W6m
@@ -0,0 +1,13 @@
Copyright (c) 2026 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,131 @@
# Acer Connect Vero W6m
<img src="connect_vero_w6m_case.jpg" alt="Acer Connect Vero W6m" width=400 padding=10>
## Overview
The Acer Connect Vero W6m is a compact WiFi 6/6E router platform based
on the MediaTek MT7986A SoC. In Infix it is supported as an eMMC-based
target that reuses the factory secure boot chain while replacing the
system partitions with an Infix installation.
The Acer Connect Vero W6m is based on the same MT7986a SoC as the
BPI-R3, with tri-band WiFi (2.4 GHz + 5 GHz + 6 GHz) using a PCIe
MT7916 module and the SoC's built-in MT7976 DBDC radio.
## Default WiFi Layout
The factory configuration on this branch enables all three radios in AP
mode and bridges them into the default LAN bridge `br0`:
- `radio0` / `wifi0-ap`: 2.4 GHz, SSID `Infix`
- `radio1` / `wifi1-ap`: 6 GHz, SSID `Infix6G`
- `radio2` / `wifi2-ap`: 5 GHz, SSID `Infix5G`
6 GHz operation is enabled in the MT7915e driver configuration, and all
three APs use the same default passphrase `infixinfix` from the factory
configuration.
Secure boot is enabled on this device, so the factory bootloader
(partitions 1-4: bl2, u-boot-env, factory, fip) must not be modified.
Infix is installed by replacing partitions 5+ while keeping the
factory bootloader intact. The stock U-Boot chainloads the Infix
U-Boot from the first partition after fip.
## Prerequisites
- Serial console access (115200 8N1) — required to interrupt U-Boot.
Disassembly is needed to reach the UART header. See the [OpenWrt
Vero W6m page][vero-openwrt] for details.
- TFTP server on the local network with `u-boot.bin` for the initial
RAM boot.
- SSH access from the running Infix system to a host that stores
`infix-vero-w-emmc.img`.
- Ethernet cable connected between the PC and the Vero Internet/WAN
port.
- DHCP server running on the PC, serving addresses on that link during
installation.
- **Save the MAC addresses** from the stock U-Boot environment before
installing. Interrupt autoboot and run `printenv` to note down:
`2gMAC`, `5gMAC`, `6gMAC`, `LANMAC`, and `WANMAC`.
## Required Files
Prepare these files on a host reachable from the Vero:
1. **Infix Vero image:**
- [infix-vero-w-emmc.img][1] (Complete system image)
2. **eMMC bootloader** (extracted from):
- [bpi-r3-emmc-boot-2025.01-latest.tar.gz][2]
- Extract `u-boot.bin` from the tarball to your TFTP server
## Installing Infix
Connect the PC directly to the Vero Internet/WAN port before starting
the installation. The PC should provide DHCP service on that link so
the stock U-Boot and the temporary Infix system can reach the TFTP/SSH
host.
1. **RAM-load Infix U-Boot** from the stock U-Boot serial console
(hit any key to stop autoboot):
```
setenv serverip <TFTP_SERVER_IP>
setenv ipaddr <VERO_IP>
setenv bootmenu_default 7
tftpboot 0x46000000 u-boot.bin
go 0x46000000
```
`serverip` must point to your TFTP server and `ipaddr` must be a free
address for the Vero on the same subnet. `bootmenu_default 7`
bypasses secure boot verification. The Infix U-Boot will
automatically netboot the Infix system.
2. **From running Infix**, stream the image directly to eMMC:
```bash
ssh <USER>@<HOST> "dd if=/path/to/infix-vero-w-emmc.img bs=512 skip=17408 status=none" | \
dd of=/dev/mmcblk0 bs=512 seek=17408 conv=fsync
sync
```
This writes only the Infix partitions (starting after fip at sector
17408), leaving the factory bootloader and calibration data intact.
Do not interrupt the transfer; if it fails, rerun the command from
the beginning.
3. **Update the GPT** to replace stock partitions 5+ with the Infix
layout:
```bash
sudo sgdisk --zap-all /dev/mmcblk0
sudo sgdisk -a 1 \
-n2:8192:9215 -c2:u-boot-env \
-n3:9216:13311 -c3:factory \
-n4:13312:17407 -c4:fip \
-n5:17408:+32M -c5:infix-uboot \
-n6:0:+8M -c6:aux \
-n7:0:+250M -c7:primary \
-n8:0:+250M -c8:secondary \
-n9:0:+128M -c9:cfg \
-n10:0:+128M -c10:var \
-p /dev/mmcblk0
```
4. **Configure U-Boot to chainload Infix permanently** — reboot and
interrupt stock U-Boot again:
```
setenv bootmenu_default 7
setenv bootcmd 'mmc read 0x46000000 0x4400 0x10000; go 0x46000000'
saveenv
reset
```
The `bootcmd` reads the Infix U-Boot (at sector 0x4400/17408)
into RAM and jumps to it. After `reset`, Infix boots from eMMC.
[vero-openwrt]: https://openwrt.org/toh/acer/predator_vero_w6m
[1]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-vero-w-emmc.img
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/bpi-r3-emmc-boot-2025.01-latest.tar.gz
@@ -0,0 +1,2 @@
# Locally calculated
sha256 d48246c717b505cc11df95171f2fd548b389e1a463f1af4c68d0b69fe0d1009b LICENSE
@@ -0,0 +1,2 @@
$(eval $(ix-board))
$(eval $(generic-package))
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1 @@
dtb-y += mediatek/mt7986a-acer-connect-vero-w6m.dtb
@@ -0,0 +1,425 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/mt65xx.h>
#include <arm64/mediatek/mt7986a.dtsi>
/ {
chosen {
stdout-path = "serial0:115200n8";
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
memory@40000000 {
reg = <0 0x40000000 0 0x20000000>;
device_type = "memory";
};
reg_1p8v: regulator-1p8v {
compatible = "regulator-fixed";
regulator-name = "fixed-1.8V";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-always-on;
};
reg_3p3v: regulator-3p3v {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
reg_5v: regulator-5v {
compatible = "regulator-fixed";
regulator-name = "fixed-5V";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
regulator-always-on;
};
gpio-keys {
compatible = "gpio-keys";
factory {
label = "factory";
linux,code = <KEY_RESTART>;
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
};
wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
};
};
};
&watchdog {
status = "okay";
};
&pio {
wifi_rst_hog: wifi-reset-hog {
gpio-hog;
gpios = <6 GPIO_ACTIVE_LOW>;
output-low;
line-name = "wifi-reset";
};
mmc0_pins_default: mmc0-pins {
mux {
function = "emmc";
groups = "emmc_51";
};
conf-cmd-dat {
pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
"EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
"EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
input-enable;
drive-strength = <MTK_DRIVE_4mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
};
conf-clk {
pins = "EMMC_CK";
drive-strength = <MTK_DRIVE_6mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
};
conf-ds {
pins = "EMMC_DSL";
bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
};
conf-rst {
pins = "EMMC_RSTB";
drive-strength = <MTK_DRIVE_4mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
};
};
mmc0_pins_uhs: mmc0-uhs-pins {
mux {
function = "emmc";
groups = "emmc_51";
};
conf-cmd-dat {
pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
"EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
"EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
input-enable;
drive-strength = <MTK_DRIVE_4mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
};
conf-clk {
pins = "EMMC_CK";
drive-strength = <MTK_DRIVE_6mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
};
conf-ds {
pins = "EMMC_DSL";
bias-pull-down = <MTK_PUPD_SET_R1R0_10>; /* pull-down 50K */
};
conf-rst {
pins = "EMMC_RSTB";
drive-strength = <MTK_DRIVE_4mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_01>; /* pull-up 10K */
};
};
pcie_pins: pcie-pins {
mux {
function = "pcie";
groups = "pcie_pereset";
};
};
wf_2g_5g_pins: wf_2g_5g-pins {
mux {
function = "wifi";
groups = "wf_2g", "wf_5g";
};
conf {
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
"WF1_TOP_CLK", "WF1_TOP_DATA";
drive-strength = <MTK_DRIVE_4mA>;
};
};
wf_dbdc_pins: wf-dbdc-pins {
mux {
function = "wifi";
groups = "wf_dbdc";
};
conf {
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
"WF1_TOP_CLK", "WF1_TOP_DATA";
drive-strength = <MTK_DRIVE_4mA>;
};
};
i2c_pins: i2c-pins {
mux {
function = "i2c";
groups = "i2c";
};
};
};
&trng {
status = "okay";
};
&crypto {
status = "okay";
};
&uart0 {
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c_pins>;
status = "okay";
};
&mmc0 {
status = "okay";
pinctrl-names = "default", "state_uhs";
pinctrl-0 = <&mmc0_pins_default>;
pinctrl-1 = <&mmc0_pins_uhs>;
bus-width = <0x08>;
max-frequency = <200000000>;
cap-mmc-highspeed;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
hs400-ds-delay = <0x14014>;
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_1p8v>;
non-removable;
no-sd;
no-sdio;
#address-cells = <1>;
#size-cells = <0>;
card@0 {
compatible = "mmc-card";
reg = <0>;
block {
compatible = "block-device";
partitions {
block-partition-factory {
partname = "factory";
nvmem: nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x1000>;
};
precal_factory_1010: precal@1010 {
reg = <0x1010 0x62810>;
};
};
};
};
};
};
};
&pcie {
pinctrl-names = "default";
pinctrl-0 = <&pcie_pins>;
num-lanes = <1>;
status = "okay";
slot0: pcie@0,0 {
reg = <0x0000 0 0 0 0>;
#address-cells = <0x03>;
#size-cells = <0x02>;
pcie_wifi: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
};
};
};
&pcie_phy {
status = "okay";
};
&pcie_port {
clocks = <&clk40m>, <&topckgen CLK_TOP_PCIE_PHY_SEL>;
clock-names = "ref", "da_ref";
};
&eth {
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
switch: switch@1f {
compatible = "mediatek,mt7531";
reg = <31>;
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
ports {
#address-cells = <1>;
#size-cells = <0>;
swport0: port@0 {
reg = <0>;
phy-handle = <&swphy0>;
};
port@1 {
reg = <1>;
label = "lan1";
phy-handle = <&swphy1>;
};
port@2 {
reg = <2>;
label = "lan2";
phy-handle = <&swphy2>;
};
port@3 {
reg = <3>;
label = "lan3";
phy-handle = <&swphy3>;
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
swphy0: phy@0 {
reg = <0>;
mediatek,led-config = <
0x21 0x8008 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0xc001 /* LED0_ON_CTRL */
0x25 0x0003 /* LED0_BLINK_CTRL */
0x26 0xc006 /* LED1_ON_CTRL */
0x27 0x003c /* LED1_BLINK_CTRL */
>;
};
swphy1: phy@1 {
reg = <1>;
mediatek,led-config = <
0x21 0x8008 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0xc001 /* LED0_ON_CTRL */
0x25 0x0003 /* LED0_BLINK_CTRL */
0x26 0xc006 /* LED1_ON_CTRL */
0x27 0x003c /* LED1_BLINK_CTRL */
>;
};
swphy2: phy@2 {
reg = <2>;
mediatek,led-config = <
0x21 0x8008 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0xc001 /* LED0_ON_CTRL */
0x25 0x0003 /* LED0_BLINK_CTRL */
0x26 0xc006 /* LED1_ON_CTRL */
0x27 0x003c /* LED1_BLINK_CTRL */
>;
};
swphy3: phy@3 {
reg = <3>;
mediatek,led-config = <
0x21 0x8008 /* BASIC_CTRL */
0x22 0x0c00 /* ON_DURATION */
0x23 0x1400 /* BLINK_DURATION */
0x24 0xc001 /* LED0_ON_CTRL */
0x25 0x0003 /* LED0_BLINK_CTRL */
0x26 0xc006 /* LED1_ON_CTRL */
0x27 0x003c /* LED1_BLINK_CTRL */
>;
};
};
};
};
};
&wifi {
nvmem-cells = <&eeprom_factory_0>, <&precal_factory_1010>;
nvmem-cell-names = "eeprom", "precal";
pinctrl-names = "default", "dbdc";
pinctrl-0 = <&wf_2g_5g_pins>;
pinctrl-1 = <&wf_dbdc_pins>;
status = "okay";
};
@@ -0,0 +1,263 @@
/* Factory EEPROM for MT7976 WMAC (DBDC) - Acer Connect Vero W */
/* Band 1 patched from 5GHz-only to 5GHz+6GHz selectable */
&wifi {
mediatek,eeprom-data = <
0x86790100 0x000c4326 0x60100000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x01000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000800 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x12525353 0x003c003f 0x3a100700 0x15030000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x0000be00 0x00000000
0x0000c100 0x00000000 0x00000000 0xc3000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000009 0x00000000 0x00000000
0x00000000 0x00000303 0x03030303 0x03030303
0x03030303 0x03030303 0x03040303 0x03040303
0x03040303 0x03040000 0x00161b18 0x1b1a1a1a
0x1a0d0008 0x0f0d0209 0x0e0d0209 0x0e0d0209
0x0e0c020a 0x0e0c020a 0x0e0c020a 0x0e0b020b
0x0e2b2b2b 0x2b222222 0x22222222 0x22222222
0x22222222 0x22222222 0x22000000 0x00000000
0x00000000 0x002a2a2a 0x2a282828 0x282a2a2a
0x2a282828 0x282a2a2a 0x2a282828 0x282a2a2a
0x2a282828 0x28000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x007f7f20 0x2530363c 0x41014847 0x4c52575c
0x7f7f7f7f 0x1b222a33 0x3a40014d 0x464c525a
0x5e7f7f7f 0x7f252834 0x3c424a01 0x4a4f555d
0x636e7f7f 0x7f7f202a 0x303b444a 0x014a5158
0x5f666e7f 0x7f7f7f7f 0x8080c5c5 0xd1d1dddd
0xe5e5f3f3 0x40408080 0xcfcfdbdb 0xe3e3efef
0xf7f74040 0x8080bfbf 0xcbcbd9d9 0xe5e5eded
0x40408080 0xb9b9c5c5 0xd3d3dfdf 0xe7e74040
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0xc0a0c0e0 0xfcfcafe0 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x02200220 0x02200220 0x02300230 0x02300230
0x02300230 0x02300230 0x02300230 0x02300230
0x02240224 0x02240224 0x02240224 0x02240224
0x02240224 0x02240224 0x02240224 0x02240224
0x000000c4 0xc4c4c4c4 0x0000c4c4 0xc4c4c1c1
0x008282c3 0xc3000000 0x00838300 0xc4c4c4c1
0xc1008282 0x8383c3c3 0xc2c10000 0x83838484
0xc4c4c4c1 0xc1008282 0x8383c4c4 0xc4c1c100
0x82828383 0xc4c4c4c1 0xc1008282 0x8383c4c4
0xc3c100c4 0x81c4c3c2 0x00818181 0xc4c4c3c2
0x00818282 0x00c4c4c2 0xc2008182 0x8200c4c4
0xc3c20081 0x82828484 0xc4c4c3c2 0x00818282
0x8484c4c4 0xc2c20081 0x82828484 0xc4c4c2c1
0x81828383 0x8585c4c4 0xc3c20081 0x82828484
0xc4c4c3c2 0x00818282 0x8484c4c4 0xc3c20081
0x82828484 0xc6c5c3c1 0x00c5c5c3 0xc2008182
0x828484c5 0xc5c3c200 0x81828284 0x84c4c4c3
0xc2008182 0x828484c4 0xc4c2c181 0x82838385
0x85c5c5c3 0xc2008182 0x828484c5 0xc5c3c200
0x81828284 0x84c5c5c3 0xc2008182 0x82848400
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x378a6e05 0x0ae64a6c 0x00000000 0x50050000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00b40000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x86828786 0x87c8cb8a 0x8380c982 0x00c8ca86
0x8383c583 0x83c1c58c 0x8883c78b 0x8780c28c
0x8485c682 0xc3c4c4c4 0xc5c6c7c8 0xcfcecdcc
0xcccdcec1 0xc1c1c1c2 0xc4c6c7ce 0xcecfcfcf
0xcecec6c7 0xc8c9caca 0xcbcbd2d2 0xd2d2d0ce
0xcc8100c1 0xc3c5c6c7 0xc8d0d0d1 0xd1d1d0cf
0xdeee6be7 0x5fede2eb 0xce08ce09 0xce0ace0a
0x4e0b4f0b 0x4f0c4f0c 0x4f0d4f0d 0x540a540b
0x540c540b 0x540c510a 0x510b510c 0xd10c510d
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0xde0fde10 0xde115e12
0xde12de12 0xde135e14 0x5e0cde0d 0xde0e5e10
0x5e105e10 0x5e11de11 0xde0ede0f 0xde10de11
0x5e12de12 0x5e135e13 0xde0f5e11 0x5e12de13
0x5e13de13 0xde14de14 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00848484 0x84848484 0x84000000 0x00e4d5d4
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
>;
};
@@ -0,0 +1,263 @@
/* Factory EEPROM for PCIe MT7916 radio - Acer Connect Vero W */
/* Offset 0xa0000 in the "factory" GPT partition on eMMC */
&pcie_wifi {
mediatek,eeprom-data = <
0x16790000 0x000c4326 0x60000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x50750000 0x07670700 0x00000400 0x50710000
0x00000000 0x00000400 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0xb101e748 0xf57f5e99
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000800 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x12924848 0x003e003f 0x3a100000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x81a3a380
0xa4910091 0x00910091 0x00910000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x000a0000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x0000c500 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000013 0x12120000 0x00000000
0x00000000 0x00000303 0x03030303 0x03030303
0x03030303 0x03030505 0x05050505 0x05050505
0x05050505 0x05050000 0x001b1919 0x19181818
0x180f0006 0x1c0e080a 0x170e080a 0x170d0809
0x170d020a 0x0e0d020a 0x0e0d020a 0x0e0b020a
0x0e22222c 0x2c2b2b2b 0x2b2b2b2b 0x2b2b2b2b
0x2b2b2b2b 0x2b2b2b2b 0x2b000000 0x00000000
0x00000000 0x001e201e 0x201e2020 0x201e201e
0x20201e20 0x20272929 0x29272727 0x27272929
0x29272727 0x27000000 0x00000000 0x00000000
0x00000000 0x00cdcfcf 0xcfcfcf00 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x007f7f20 0x2530363c 0x41014347 0x4c52575c
0x7f7f0000 0x00000000 0x00000000 0x00000000
0x0000007f 0x7f252834 0x3c424a01 0x4d4f555f
0x636e7f7f 0x7f7f202a 0x303b444a 0x014d5158
0x5f666e7f 0x7f7f7f7f 0x8080c5c5 0xcbcbd9d9
0xe1e1ebeb 0x40408080 0xcfcfdbdb 0xe3e3efef
0xf7f74040 0x8080c1c1 0xcdcdd5d5 0xe1e1eded
0x40408080 0xbbbbc7c7 0xcfcfdbdb 0xe7e74040
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0xb0900000 0x0000c0f0 0xf8000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x02000200 0x02000200 0x02000200 0x02000200
0x02000200 0x02000200 0x02000200 0x02000200
0x02000200 0x02000200 0x02000200 0x02000200
0x02000200 0x02000200 0x02000200 0x02000200
0x000000c6 0xc6c6c6c4 0x0000c5c5 0xc5c4c1c1
0x818383c3 0xc3c2c100 0x81848400 0xc5c5c4c1
0xc1818383 0x8585c3c3 0xc2c10081 0x84848686
0xc5c5c4c1 0xc1818383 0x8585c5c5 0xc4c1c181
0x83838585 0xc5c5c4c1 0xc1818383 0x8585c6c6
0xc4c300c6 0x00c6c4c3 0xc1008181 0xc6c6c4c3
0xc1008181 0x00c5c5c3 0xc2008182 0x8200c6c6
0xc4c3c100 0x81818686 0xc6c6c4c3 0xc1008181
0x8686c5c5 0xc3c20081 0x82828787 0xc5c5c3c2
0x00818282 0x8787c6c6 0xc4c3c100 0x81818686
0xc6c6c4c3 0xc1008181 0x8686c6c6 0xc4c3c100
0x81818686 0xc6c6c4c3 0x00c6c6c4 0xc3c10081
0x818686c6 0xc6c4c3c1 0x00818186 0x86c5c5c3
0xc2008182 0x828787c5 0xc5c3c281 0x82838388
0x88c6c6c4 0xc3c10081 0x818686c6 0xc6c4c3c1
0x00818186 0x86c6c6c4 0xc3c10081 0x81868600
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00b70000 0x00b70000 0x00000000 0x00000000
0x01000000 0x0000c400 0xb8008700 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0xc7c60000 0x89898987 0x87858381 0x898a8b8b
0x8a898785 0x88898988 0x87868584 0x00000000
0x00000000 0xcccfcecd 0xcdcacecd 0xcbcfcece
0xcfcfcfc7 0xcececdce 0xc7cfcec7 0xcfcfcfcf
0xcfcf0000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x7fe2f0e4 0x00000000 0xa4de24df 0xa4e0a4e1
0xa4e1a4de 0x24dfa4e0 0xa4e1a4e1 0xa4dea4df
0xa4e0a4e1 0xa4e1a4de 0xa4df24e0 0xa4e1a4e1
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0xde0fde0f 0xde0fde10
0xde11de11 0x5e12de12 0xde10de10 0xde10de11
0xde12de12 0xde13de13 0x5a085a09 0x5a0a5a0a
0x5a0a5a0a 0x5a0a5a0a 0x5a055a06 0x5a075a08
0x5a085a09 0x5a095a09 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00ded453
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
>;
};
@@ -0,0 +1,63 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7986a-acer-connect-vero-w6m-common.dtsi"
#include "mt7986a-acer-connect-vero-w6m-pcie-eeprom.dtsi"
/ {
model = "Acer Connect Vero W6m";
compatible = "acer,connect-vero-w", "mediatek,mt7986a";
aliases {
serial0 = &uart0;
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
};
&i2c0 {
led-controller@30 {
compatible = "kinetic,ktd2026";
reg = <0x30>;
vin-supply = <&reg_5v>;
vio-supply = <&reg_3p3v>;
led_status: multi-led {
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STATUS;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
};
&nvmem {
eeprom_factory_a0000: eeprom@a0000 {
reg = <0xa0000 0x1000>;
};
precal_factory_a1010: precal@a1010 {
reg = <0xa1010 0x62810>;
};
};
&swport0 {
label = "internet";
};
@@ -0,0 +1,86 @@
image cfg.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image var.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image #INFIX_ID##VERSION#-vero-w-#TARGET#.img {
hdimage {
partition-table-type = "gpt"
gpt-no-backup = true
}
/*
* Factory partitions (1-4) -- secure boot, do not overwrite.
* Offsets and sizes match the stock Acer GPT exactly.
* No image data is written, preserving factory content.
*/
partition u-boot-env {
offset = 8192s
size = 1024s
}
partition factory {
offset = 9216s
size = 4096s
}
partition fip {
offset = 13312s
size = 4096s
}
/* Infix U-Boot, chainloaded by stock bootloader */
partition infix-uboot {
offset = 17408s
image = "u-boot.bin"
size = 32M
}
partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
}
partition primary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition secondary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition cfg {
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
image = "cfg.ext4"
}
partition var {
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
image = "var.ext4"
}
}
@@ -0,0 +1,488 @@
{
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"name": "USB",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
},
{
"class": "infix-hardware:usb",
"name": "USB2",
"state": {
"admin-state": "unlocked"
}
},
{
"name": "radio0",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "2.4GHz",
"channel": "auto"
}
},
{
"name": "radio1",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "6GHz",
"channel": "auto"
}
},
{
"name": "radio2",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "5GHz",
"channel": "auto"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.0.1",
"prefix-length": 24
}
]
}
},
{
"name": "lan1",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan2",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan3",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lo",
"type": "infix-if-type:loopback",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"prefix-length": 128
}
]
}
},
{
"name": "internet",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv4": {
"infix-dhcp-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "broadcast"
},
{
"id": "domain"
},
{
"id": "hostname",
"value": "auto"
},
{
"id": "dns-server"
},
{
"id": "router"
},
{
"id": "netmask"
},
{
"id": "vendor-class",
"value": "Acer Connect Vero W"
}
]
}
},
"ietf-ip:ipv6": {
"infix-dhcpv6-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "client-fqdn"
},
{
"id": "domain-search"
},
{
"id": "dns-server"
}
]
}
}
},
{
"name": "wifi0-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio0",
"access-point": {
"ssid": "Infix",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "wifi1-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio1",
"access-point": {
"ssid": "Infix6G",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "wifi2-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio2",
"access-point": {
"ssid": "Infix5G",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
}
]
},
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
},
"symmetric-keys": {
"symmetric-key": [
{
"name": "wifi",
"cleartext-symmetric-key": "aW5maXhpbmZpeA==",
"key-format": "infix-crypto-types:passphrase-key-format"
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"read-default": "permit",
"write-default": "permit",
"exec-default": "permit",
"groups": {
"group": [
{
"name": "admin",
"user-name": [
"admin"
]
},
{
"name": "operator",
"user-name": []
},
{
"name": "guest",
"user-name": []
}
]
},
"rule-list": [
{
"name": "admin-acl",
"group": [
"admin"
],
"rule": [
{
"name": "permit-all",
"module-name": "*",
"access-operations": "*",
"action": "permit",
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "operator-acl",
"group": [
"operator"
],
"rule": [
{
"name": "permit-system-rpcs",
"module-name": "ietf-system",
"rpc-name": "*",
"access-operations": "exec",
"action": "permit",
"comment": "Operators can reboot, shutdown, and set system time."
}
]
},
{
"name": "guest-acl",
"group": [
"guest"
],
"rule": [
{
"name": "deny-all-write+exec",
"module-name": "*",
"access-operations": "create update delete exec",
"action": "deny",
"comment": "Guests cannot change anything or exec rpcs."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-access",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access password hashes."
},
{
"name": "deny-keystore-access",
"module-name": "ietf-keystore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access cryptographic keys."
},
{
"name": "deny-truststore-access",
"module-name": "ietf-truststore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access trust store."
}
]
}
]
},
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-bind": [
{
"local-address": "::"
}
]
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
"ietf-system:system": {
"hostname": "acer-connect-%m",
"ntp": {
"server": [
{
"name": "default",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-dhcp-server:dhcp-server": {
"option": [
{
"id": "ntp-server",
"address": "auto"
},
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"subnet": [
{
"subnet": "192.168.0.0/24",
"pool": {
"start-address": "192.168.0.100",
"end-address": "192.168.0.250"
}
}
]
},
"infix-firewall:firewall": {
"default": "wan",
"zone": [
{
"name": "lan",
"action": "accept",
"interface": [
"br0"
]
},
{
"name": "wan",
"action": "drop",
"interface": [
"internet"
],
"service": [
"dhcpv6-client"
]
}
],
"policy": [
{
"name": "lan-to-wan",
"action": "accept",
"ingress": [
"lan"
],
"egress": [
"wan"
],
"masquerade": true
}
]
},
"infix-meta:meta": {
"version": "1.7"
},
"infix-services:mdns": {
"enabled": true
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
},
"infix-services:web": {
"enabled": true,
"console": {
"enabled": true
},
"netbrowse": {
"enabled": true
},
"restconf": {
"enabled": true
}
}
}
+1
View File
@@ -1,5 +1,6 @@
config BR2_PACKAGE_ALDER_ALDER
bool "Alder"
depends on BR2_aarch64
select BR2_PACKAGE_LINUX_FIRMWARE_INSIDE_SECURE_MINIFW
help
Alder
@@ -0,0 +1,2 @@
# Locally calculated
sha256 d2f96418893ac66156d0e691cda189b0d85ae1d814065d1d9aa1845383100f46 LICENSE
+2
View File
@@ -5,6 +5,8 @@ config BR2_PACKAGE_BANANAPI_BPI_R3
select BR2_PACKAGE_LINUX_FIRMWARE
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7986
select BR2_PACKAGE_LINUX_FIRMWARE_AIROHA_EN8811H
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7916
select SDCARD_AUX
help
Build Banana PI R3 support
+92 -46
View File
@@ -1,20 +1,29 @@
# Banana Pi BPI-R3
# Banana Pi BPI-R3 / BPI-R3 Mini
<img src="bananapi-bpi-r3.webp" alt="The board" width=800 padding=10>
## Overview
The Banana Pi R3 is a high-performance networking board with full Infix
support for all enabled features including switched Ethernet ports, WiFi,
and SFP interfaces.
The Banana Pi BPI-R3 and BPI-R3 Mini are high-performance networking
boards with full Infix support for all enabled features including
Ethernet, WiFi, and SFP interfaces.
Both boards share the same SoC and most peripherals. The key
differences are:
| Feature | BPI-R3 | BPI-R3 Mini |
|-----------------|--------------------|-------------------------|
| Ethernet switch | Yes (4x LAN + WAN) | No (WAN/LAN ports only) |
| SD card slot | Yes | No |
### Hardware Features
- MediaTek MT7986 ARM Cortex-A53 quad-core processor @ 2.0 GHz
- 2 GB DDR4 RAM
- 8 GB eMMC storage + microSD card slot
- 5x Gigabit Ethernet ports (4x LAN, 1x WAN)
- 2x SFP cages for fiber connectivity (1G/2.5G)
- 8 GB eMMC storage
- microSD card slot (BPI-R3 only)
- 5x Gigabit Ethernet ports with switch core (BPI-R3 only)
- 2x SFP cages for fiber connectivity (1G/2.5G) (BPI-R3 only)
- Dual-band WiFi (2.4 GHz + 5 GHz)
- USB 3.0 port
- Mini PCIe slot
@@ -23,16 +32,20 @@ and SFP interfaces.
Infix comes preconfigured with:
- **LAN ports** (lan1-lan4): Bridged for internal networking
- **LAN ports** (lan1-lan4): Bridged for internal networking (BPI-R3 only)
- **WAN port**: DHCP client enabled for internet connectivity
- **SFP ports** (sfp1, sfp2): Available for configuration
- **SFP ports** (sfp1, sfp2): Available for configuration (BPI-R3 only)
- **WiFi interfaces** (wifi0, wifi1): Available for configuration
## Getting Started
### Quick Start with SD Card
### BPI-R3: Quick Start with SD Card
The easiest way to get started is using an SD card:
The easiest way to get started with the BPI-R3 is using an SD card:
> [!NOTE]
> SD card boot works but we have observed stability issues. For production
> use or long-term reliability, we recommend installing to eMMC (see below).
1. **Download the SD card image:** [infix-bpi-r3-sdcard.img][2]
2. **Flash the image to an SD card:** see [this guide][0]
@@ -45,67 +58,63 @@ The easiest way to get started is using an SD card:
- Connect to LAN port or console (115200 8N1)
- Default login: `admin` / `admin`
### BPI-R3 Mini: Getting Started
The BPI-R3 Mini does not have an SD card slot, so you must install
directly to eMMC. See [Installing to eMMC — BPI-R3
Mini](#bpi-r3-mini) below.
### Boot Switch Reference
The BPI-R3 has a 4-position DIP switch that controls boot media:
<img align="right" src="bootstrap-switch.webp" alt="DIP switches" width=200 padding=10>
| Position | Mode | Description |
|----------|-------------|---------------------------------------|
| 0000 | SD card | Boot from microSD card (recommended) |
| 0110 | eMMC | Boot from internal eMMC storage |
| 1010 | SPI NAND | Boot from SPI NAND (advanced users) |
| ABCD | Mode | Description |
|------|----------|---------------------------------------|
| 0000 | SD card | Boot from microSD card |
| 0101 | SPI NAND | Boot from SPI NAND (advanced users) |
| 1001 | eMMC | Boot from internal eMMC (recommended) |
> [!NOTE]
> Switch position is read from left to right: "0" = OFF, "1" = ON.
> Switch position is read from left to right: "0" = OFF, "1" = ON.
> When the DIP switch is in the "UP" position it is OFF(0).
## Advanced: Installing to eMMC
## Installing to eMMC
For production deployments or better performance, you can install Infix
to the internal eMMC storage. This is more complex but provides faster
boot times and eliminates the external SD card.
to the internal eMMC storage.
### Why Use eMMC?
**Advantages:**
- Faster boot and better performance
- No external SD card to manage
- More robust for industrial/embedded deployments
**Disadvantages:**
- More complex installation process
- Requires intermediate NAND boot step
- Harder to recover from errors
> [!IMPORTANT]
> While Infix boots on both SD card and eMMC on the BPI-R3, we have
> observed stability issues with SD cards on this platform. **eMMC is
> recommended** for reliable operation.
### Prerequisites
- FTDI USB-to-serial cable (3.3V) for console access
- microSD card with Infix (for initial boot)
- USB flash drive (FAT32 formatted)
- microSD card with Infix, for initial boot (BPI-R3 only)
- Downloaded files (see below)
### Required Files
Download and place these files on a FAT32-formatted USB drive:
1. **Intermediate NAND bootloader** (from Frank-W's U-Boot):
- [bpi-r3_spim-nand_bl2.img][5] (BL2 loader)
- [bpi-r3_spim-nand_fip.bin][6] (FIP image)
2. **Infix eMMC image:**
1. **Infix eMMC image:**
- [infix-bpi-r3-emmc.img][3] (Complete system image)
3. **eMMC bootloader** (extracted from):
2. **eMMC bootloader** (extracted from):
- [bpi-r3-emmc-boot-2025.01-latest.tar.gz][4]
- Extract `bl2.img` from the tarball to your USB drive
3. **Intermediate NAND bootloader** (BPI-R3 only, from Frank-W's U-Boot):
- [bpi-r3_spim-nand_bl2.img][5] (BL2 loader)
- [bpi-r3_spim-nand_fip.bin][6] (FIP image)
> [!WARNING]
> The following process involves multiple boot mode changes. Take your
> time verify each step carefully.
> time and verify each step carefully.
### Installation Steps
### BPI-R3
#### Step 1: Boot from SD card
@@ -141,6 +150,7 @@ From the U-Boot prompt:
usb start
fatload usb 0:1 0x50000000 infix-bpi-r3-emmc.img
setexpr blocks ${filesize} / 0x200
mmc dev 0
mmc write 0x50000000 0x0 ${blocks}
```
@@ -167,13 +177,49 @@ mmc partconf 0 1 1 0
Your BPI-R3 should now boot Infix from internal eMMC storage!
### BPI-R3 Mini
The BPI-R3 Mini does not have an SD card slot, so you have to go
through the factory-installed Linux (OpenWRT) to flash the Infix
bootloader and OS to eMMC.
#### Step 1: Boot from NAND (factory default)
<img src="r3mini_nandboot2.png" alt="BPI-R3 Mini NAND boot switch position" width=400>
1. Ensure boot switches are set to NAND mode (factory default)
2. Place `infix-bpi-r3-emmc.img` and `bl2.img` on a USB drive
3. Power on and boot into Linux
4. Mount the USB drive to `/mnt`
#### Step 2: Flash Infix to eMMC
From the Linux shell:
```
echo 0 > /proc/sys/kernel/printk
dd if=/mnt/infix-bpi-r3-emmc.img of=/dev/mmcblk0
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=/mnt/bl2.img of=/dev/mmcblk0boot0
sync
```
#### Step 3: Boot from eMMC
<img src="r3mini_emmcboot.png" alt="BPI-R3 Mini eMMC boot switch position" width=400>
1. Power off the board
2. Set boot switches to eMMC mode (see image above)
3. Power on
## Troubleshooting
### Board won't boot
- Verify boot switch positions (check twice!)
- Ensure power supply provides adequate current (12V/2A recommended)
- Try booting from SD card with switches at **0000**
- Try booting from SD card with switches at **0000** (BPI-R3 only)
### Can't break into U-Boot
@@ -185,9 +231,9 @@ Your BPI-R3 should now boot Infix from internal eMMC storage!
- Boot from NAND (**1010**) and verify eMMC image was written
- Check USB drive contents - ensure all files are present
- Re-run Step 5 (eMMC boot configuration)
- Re-run the eMMC boot configuration step
### Reverting to SD card
### Reverting to SD card (BPI-R3 only)
Simply set boot switches back to **0000** and boot from SD card. The
eMMC installation does not affect SD card functionality.
@@ -218,8 +264,8 @@ make aarch64
./utils/mkimage.sh -odt emmc bananapi-bpi-r3
```
[0]: https://kernelkit.org/posts/flashing-sdcard/
[1]: https://kernelkit.org/infix/latest/
[0]: https://www.kernelkit.org/posts/flashing-sdcard/
[1]: https://www.kernelkit.org/infix/latest/
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-sdcard.img
[3]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-emmc.img
[4]: https://github.com/kernelkit/infix/releases/download/latest-boot/bpi-r3-emmc-boot-2025.01-latest.tar.gz
@@ -0,0 +1,2 @@
# Locally calculated
sha256 dbe4eae8debbba8135297e15f24aeefef0b4c03781f3f9328db4398d58a728b3 LICENSE
@@ -6,9 +6,10 @@ define BANANAPI_BPI_R3_LINUX_CONFIG_FIXUPS
$(call KCONFIG_SET_OPT,CONFIG_I2C_GPIO,y)
$(call KCONFIG_SET_OPT,CONFIG_MTK_THERMAL,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_UART)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_WATCHDOG)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_WATCHDOG)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_GE_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
$(call KCONFIG_SET_OPT,CONFIG_AIR_EN8811H_PHY,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_MEDIATEK_SOC)
$(call KCONFIG_SET_OPT,CONFIG_NET_DSA_MT7530,m)
+1 -1
View File
@@ -1 +1 @@
dtb-y += mediatek/mt7986a-bananapi-bpi-r3-sd.dtb mediatek/mt7986a-bananapi-bpi-r3-emmc.dtb
dtb-y += mediatek/mt7986a-bananapi-bpi-r3-sd.dtb mediatek/mt7986a-bananapi-bpi-r3-emmc.dtb mediatek/mt7986a-bananapi-bpi-r3-mini.dtb
@@ -1,2 +1,4 @@
#include <arm64/mediatek/mt7986a-bananapi-bpi-r3.dts>
#include "mt7986a-bananapi-bpi-r3.dtsi"
#include "mt7986a-bananapi-bpi-r3-emmc.dtsi"
@@ -19,4 +19,34 @@ possible to use dtbo in sysboot unless present in syslinux.conf
no-sd;
no-sdio;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
card@0 {
compatible = "mmc-card";
reg = <0>;
partitions {
compatible = "gpt-partitions";
partition-factory {
partname = "factory";
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_wmac: eeprom@0 {
reg = <0x0 0x1000>;
};
eeprom_factory_pcie: eeprom@a0000 {
reg = <0xa0000 0x1000>;
};
};
};
};
};
};
@@ -0,0 +1,12 @@
#include <arm64/mediatek/mt7986a-bananapi-bpi-r3-mini.dts>
#include "mt7986a-bananapi-bpi-r3.dtsi"
#include "mt7986a-bananapi-bpi-r3-emmc.dtsi"
&phy0 {
compatible = "ethernet-phy-id03a2.a411";
};
&phy1 {
compatible = "ethernet-phy-id03a2.a411";
};
@@ -0,0 +1,2 @@
#include "mt7986a-bananapi-bpi-r3.dtsi"
#include "mt7986a-bananapi-bpi-r3-emmc.dtsi"
@@ -1,2 +1,4 @@
#include <arm64/mediatek/mt7986a-bananapi-bpi-r3.dts>
#include "mt7986a-bananapi-bpi-r3.dtsi"
#include "mt7986a-bananapi-bpi-r3-sd.dtsi"
@@ -1,5 +1,3 @@
#include <arm64/mediatek/mt7986a-bananapi-bpi-r3.dts>
/ {
chosen {
infix {
@@ -10,6 +8,33 @@
};
};
};
/*
From 236317dd4e55512933dcdaec3d0b4a0824f5e5bd Mon Sep 17 00:00:00 2001
From: Shiji Yang <yangshiji66@outlook.com>
Date: Sun, 10 Aug 2025 18:11:01 +0800
Subject: [PATCH] arm64: dts: mediatek: mt7986: increase ATF reserved memory to
256 kiB
The latest Mediatek open-source Trusted Firmware-A project has
reserved 256 KiB for BL2 and BL31. It is better to increase the
reserved memory region in the Linux kernel to protect the data.
https://github.com/openwrt/openwrt/blob/main/target/linux/mediatek/patches-6.12/199-arm64-dts-mediatek-mt7986-increase-ATF-reserved-memo.patch
*/
&secmon_reserved {
reg = <0 0x43000000 0 0x40000>;
};
/*
* The T-PHY's pcie-phy sub-node only claims clk40m ("ref") in the SoC
* dtsi. CLK_TOP_PCIE_PHY_SEL ("da_ref") is left unclaimed, so the
* kernel's clk_disable_unused late_initcall gates it — killing the
* PCIe REFCLK output to the endpoint mid-probe. Wire it here so the
* clock stays enabled while the PHY is active.
*/
&pcie_port {
clocks = <&clk40m>, <&topckgen CLK_TOP_PCIE_PHY_SEL>;
clock-names = "ref", "da_ref";
};
&cpu_thermal {
/delete-node/ trips;
@@ -51,6 +51,11 @@ image #INFIX_ID##VERSION#-bpi-r3-#TARGET#.img {
size = 4096s
}
partition en8811h_fw {
size = 10M
image = "en8811h-fw.bin"
}
partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

@@ -17,6 +17,24 @@
"state": {
"admin-state": "unlocked"
}
},
{
"name": "radio0",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "2.4GHz",
"channel": "auto"
}
},
{
"name": "radio1",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "5GHz",
"channel": "auto"
}
}
]
},
@@ -112,7 +130,8 @@
"id": "domain"
},
{
"id": "hostname"
"id": "hostname",
"value": "auto"
},
{
"id": "dns-server"
@@ -150,12 +169,36 @@
}
},
{
"name": "wifi0",
"type": "infix-if-type:wifi"
"name": "wifi0-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio0",
"access-point": {
"ssid": "Infix",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "wifi1",
"type": "infix-if-type:wifi"
"name": "wifi1-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio1",
"access-point": {
"ssid": "Infix5Ghz",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
}
]
},
@@ -171,10 +214,22 @@
"certificates": {}
}
]
},
"symmetric-keys": {
"symmetric-key": [
{
"name": "wifi",
"cleartext-symmetric-key": "aW5maXhpbmZpeA==",
"key-format": "infix-crypto-types:passphrase-key-format"
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"read-default": "permit",
"write-default": "permit",
"exec-default": "permit",
"groups": {
"group": [
{
@@ -182,6 +237,14 @@
"user-name": [
"admin"
]
},
{
"name": "operator",
"user-name": []
},
{
"name": "guest",
"user-name": []
}
]
},
@@ -201,6 +264,37 @@
}
]
},
{
"name": "operator-acl",
"group": [
"operator"
],
"rule": [
{
"name": "permit-system-rpcs",
"module-name": "ietf-system",
"rpc-name": "*",
"access-operations": "exec",
"action": "permit",
"comment": "Operators can reboot, shutdown, and set system time."
}
]
},
{
"name": "guest-acl",
"group": [
"guest"
],
"rule": [
{
"name": "deny-all-write+exec",
"module-name": "*",
"access-operations": "create update delete exec",
"action": "deny",
"comment": "Guests cannot change anything or exec rpcs."
}
]
},
{
"name": "default-deny-all",
"group": [
@@ -208,11 +302,25 @@
],
"rule": [
{
"name": "deny-password-read",
"module-name": "ietf-system",
"name": "deny-password-access",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny"
"action": "deny",
"comment": "No user except admins can access password hashes."
},
{
"name": "deny-keystore-access",
"module-name": "ietf-keystore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access cryptographic keys."
},
{
"name": "deny-truststore-access",
"module-name": "ietf-truststore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access trust store."
}
]
}
@@ -1,3 +0,0 @@
#!/bin/sh
udevadm control --reload-rules
udevadm trigger --subsystem-match=net --action=add
@@ -0,0 +1,11 @@
{
"sfp1": {
"comment": "Reports it supports autoneg, but if setting it, dagger crashes",
"broken-autoneg": true
},
"sfp2": {
"comment": "Reports it supports autoneg, but if setting it, dagger crashes",
"broken-autoneg": true
}
}
@@ -0,0 +1,446 @@
{
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"name": "USB",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
},
{
"class": "infix-hardware:usb",
"name": "USB2",
"state": {
"admin-state": "unlocked"
}
},
{
"name": "radio0",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "2.4GHz",
"channel": "auto"
}
},
{
"name": "radio1",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
"band": "5GHz",
"channel": "auto"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.0.1",
"prefix-length": 24
}
]
}
},
{
"name": "lan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lo",
"type": "infix-if-type:loopback",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"prefix-length": 128
}
]
}
},
{
"name": "wan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv4": {
"infix-dhcp-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "broadcast"
},
{
"id": "domain"
},
{
"id": "hostname",
"value": "auto"
},
{
"id": "dns-server"
},
{
"id": "router"
},
{
"id": "netmask"
},
{
"id": "vendor-class",
"value": "Banana Pi BPI-R3"
}
]
}
},
"ietf-ip:ipv6": {
"infix-dhcpv6-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "client-fqdn"
},
{
"id": "domain-search"
},
{
"id": "dns-server"
}
]
}
}
},
{
"name": "wifi0-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio0",
"access-point": {
"ssid": "Infix",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "wifi1-ap",
"type": "infix-if-type:wifi",
"infix-interfaces:wifi": {
"radio": "radio1",
"access-point": {
"ssid": "Infix5Ghz",
"security": {
"secret": "wifi"
}
}
},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
}
]
},
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
},
"symmetric-keys": {
"symmetric-key": [
{
"name": "wifi",
"cleartext-symmetric-key": "aW5maXhpbmZpeA==",
"key-format": "infix-crypto-types:passphrase-key-format"
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"read-default": "permit",
"write-default": "permit",
"exec-default": "permit",
"groups": {
"group": [
{
"name": "admin",
"user-name": [
"admin"
]
},
{
"name": "operator",
"user-name": []
},
{
"name": "guest",
"user-name": []
}
]
},
"rule-list": [
{
"name": "admin-acl",
"group": [
"admin"
],
"rule": [
{
"name": "permit-all",
"module-name": "*",
"access-operations": "*",
"action": "permit",
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "operator-acl",
"group": [
"operator"
],
"rule": [
{
"name": "permit-system-rpcs",
"module-name": "ietf-system",
"rpc-name": "*",
"access-operations": "exec",
"action": "permit",
"comment": "Operators can reboot, shutdown, and set system time."
}
]
},
{
"name": "guest-acl",
"group": [
"guest"
],
"rule": [
{
"name": "deny-all-write+exec",
"module-name": "*",
"access-operations": "create update delete exec",
"action": "deny",
"comment": "Guests cannot change anything or exec rpcs."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-access",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access password hashes."
},
{
"name": "deny-keystore-access",
"module-name": "ietf-keystore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access cryptographic keys."
},
{
"name": "deny-truststore-access",
"module-name": "ietf-truststore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access trust store."
}
]
}
]
},
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-bind": [
{
"local-address": "::"
}
]
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
"ietf-system:system": {
"hostname": "bpi-%m",
"ntp": {
"server": [
{
"name": "default",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-dhcp-server:dhcp-server": {
"option": [
{
"id": "ntp-server",
"address": "auto"
},
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"subnet": [
{
"subnet": "192.168.0.0/24",
"pool": {
"start-address": "192.168.0.100",
"end-address": "192.168.0.250"
}
}
]
},
"infix-firewall:firewall": {
"default": "wan",
"zone": [
{
"name": "lan",
"action": "accept",
"interface": [
"br0"
]
},
{
"name": "wan",
"action": "drop",
"interface": [
"wan"
],
"service": [
"dhcpv6-client"
]
}
],
"policy": [
{
"name": "lan-to-wan",
"action": "accept",
"ingress": [
"lan"
],
"egress": [
"wan"
],
"masquerade": true
}
]
},
"infix-meta:meta": {
"version": "1.7"
},
"infix-services:mdns": {
"enabled": true
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
},
"infix-services:web": {
"enabled": true,
"console": {
"enabled": true
},
"netbrowse": {
"enabled": true
},
"restconf": {
"enabled": true
}
}
}
@@ -0,0 +1,2 @@
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth0", NAME="lan"
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth1", NAME="wan"
@@ -3,6 +3,9 @@ CONFIG_BOOTDELAY=2
# CONFIG_MMC_PCI is not set
CONFIG_ENV_IS_NOWHERE=y
# CONFIG_ENV_IS_IN_MMC is not set
CONFIG_MULTI_DTB_FIT=y
CONFIG_OF_LIST="mt7986a-bpi-r3-sd mt7986a-bpi-r3-emmc mt7986a-bpi-r3-mini mt7986a-acer-connect-vero-w6m"
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_MTK=y
@@ -26,8 +29,17 @@ CONFIG_MTD_SPI_NAND=y
CONFIG_MTK_SPIM=y
CONFIG_MTK_SNOR=y
CONFIG_DM_MDIO=y
CONFIG_DM_ETH_PHY=y
CONFIG_PHY_ETHERNET_ID=y
CONFIG_PHY_AIROHA=y
CONFIG_PHY_AIROHA_EN8811H=y
CONFIG_PHY_AIROHA_FW_IN_MMC=y
CONFIG_CMD_SF=y
CONFIG_CMD_USB=y
CONFIG_CMD_MTD=y
CONFIG_CMD_MDIO=y
CONFIG_CMD_MTDPARTS=y
CONFIG_CMD_DM=y
@@ -15,6 +15,10 @@
scriptaddr = "0x48000000";
ramdisk_addr_r = "0x4A000000";
en8811h_fw_part = "0#en8811h_fw";
en8811h_fw_dm_dir = "EthMD32.dm.bin";
en8811h_fw_dsp_dir = "EthMD32.DSP.bin";
/* This is a development platform, keep
* developer mode statically enabled.
*/
+11
View File
@@ -0,0 +1,11 @@
config BR2_PACKAGE_BANANAPI_BPI_R4
bool "Banana Pi R4"
depends on BR2_aarch64
select BR2_PACKAGE_FEATURE_WIFI
select BR2_PACKAGE_LINUX_FIRMWARE
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7988
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7996
select SDCARD_AUX
help
Build Banana PI R4 support
+13
View File
@@ -0,0 +1,13 @@
Copyright (c) 2026 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+402
View File
@@ -0,0 +1,402 @@
# Banana Pi BPI-R4 / BPI-R4-2g5 / BPI-R4P
<img src="banana_pi_bpi-r4_poe.jpg" alt="The board" width=800 padding=10>
## Overview
The Banana Pi BPI-R4 is a high-performance networking board built around the
MediaTek MT7988A SoC (Filogic 880). It is a successor to the BPI-R3 and
represents a significant step up: the CPU switches from in-order Cortex-A53
cores to out-of-order Cortex-A73 cores, and the MT7531 switch is now part of
the SOC. The base model comes with two SFP+ cages supporting 1.25/2.5/5/10
Gbps, and the R4P model comes with one SFP+ cage and one 2.5 Gbps RJ45 jack,
which with an optional PoE board means the board can act as PD. Unlike the
BPi-R3, however, there is no on-board WiFi support, that requires an external
tri-band WiFi 7 (IEEE 802.11be) card.
### Variants
| **Feature** | **BPI-R4** | **BPI-R4-2g5** | **BPI-R4P** |
|------------------|------------------|-------------------|---------------------------|
| 1G switch ports | wan, lan1lan3 | lan0lan3 | lan0lan3 |
| 2.5G RJ45 (WAN) | — | wan | wan (PoE input) |
| SFP+ port(s) | sfp1, sfp2 (10G) | sfp1 (10G) | sfp1 (10G) |
| Linux DT | bpi-r4 | bpi-r4-2g5 | bpi-r4-2g5 (same) |
On the standard BPI-R4 the four 1G switch ports are labeled `wan`, `lan1`, `lan2`,
and `lan3`. On the R4-2g5 and R4P, the port that would otherwise be `wan` on the
switch is relabeled `lan0` via a device tree overlay, since the actual WAN port on
those variants is the dedicated 2.5G internal PHY on the separate RJ45 jack.
The BPI-R4P is mechanically and electrically identical to the BPI-R4-2g5
with an additional PoE daughterboard header. From a Linux kernel and
Infix perspective the two boards are treated identically.
### SoC: MediaTek MT7988A vs MT7986 (BPI-R3)
The MT7988A (Filogic 880) and MT7986 (Filogic 820) may look similar from
their part numbers, but they are built on entirely different silicon with
distinct system architectures:
| **Aspect** | **MT7988A (BPI-R4)** | **MT7986 (BPI-R3)** |
|------------------|--------------------------|---------------------------|
| CPU cores | 4x Cortex-A73 @ 1.8 GHz | 4x Cortex-A53 @ 2.0 GHz |
| CPU architecture | ARMv8-A, out-of-order | ARMv8-A, in-order |
| Internal switch | 1 Gbps per port | 1 Gbps per port |
| Uplinks | USXGMII (native 10 Gbps) | USXGMII (native 2.5 Gbps) |
| WiFi | MT7996E PCIe module | MT7915E (built-in) |
| WiFi standard | WiFi 7 (802.11be) | WiFi 6 (802.11ax) |
| WiFi bands | 2.4 / 5 / 6 GHz | 2.4 / 5 GHz |
| Hardware crypto | EIP-197 NPU | EIP-93 |
| PCIe slots | 4 (2x mPCIe, 2x M.2) | 1 mPCIe |
| Boot ROM offset | Sector 1024 (0x80000) | Sector 1024 (0x80000) |
### Hardware Features
- **SoC:** MediaTek MT7988A (Filogic 880)
- **CPU:** Quad-core ARM Cortex-A73, up to 1.8 GHz
- **RAM:** 4 GB DDR4
- **Storage:** 8 GB eMMC, microSD card slot, SPI NAND flash
- **Ethernet switch:** 4-port 1 GbE (10/100/1000) internal DSA switch
- **SFP+ ports:** 2x 10 Gbps USXGMII (standard R4) or 1x SFP+ (R4-2g5/R4P)
- **WiFi:** optional MediaTek MT7996E PCIe module — tri-band WiFi 7 (2.4/5/6 GHz)
- **USB:** 1x USB 3.0 (xHCI)
- **PCIe:** 2x mPCIe (SIM2/SIM3), 1x M.2 Key-B (SIM1), 1x M.2 Key-M (SSD)
- **RTC:** PCF8563 on I2C
- **Fan:** PWM-controlled cooling with thermal management
- **Console:** UART at 115200 8N1 (3.3 V, USB-to-serial adapter required)
### Default Network Configuration
Infix ships with the following factory defaults.
**Standard BPI-R4:**
- **LAN bridge** (`br0`, 192.168.0.1/24): `lan1`, `lan2`, `lan3` (1G switch ports)
- **WAN port** (`wan`): DHCP client, used for internet uplink (1G switch port)
- **SFP+ ports** (`sfp1`, `sfp2`): Present but unconfigured
**BPI-R4-2g5 and BPI-R4P:**
- **LAN bridge** (`br0`, 192.168.0.1/24): `lan0`, `lan1`, `lan2`, `lan3` (1G switch ports)
- **WAN port** (`wan`): DHCP client, used for internet uplink (2.5G internal PHY)
- **SFP+ port** (`sfp1`): Present but unconfigured
> [!NOTE]
> If an optional WiFi 7 (MT7996E) PCIe card is installed, the radio interfaces
> are bridged into the LAN as access points. WiFi is not included with the board
> and is not part of the factory default configuration.
## SIM Card Installation
The BPI-R4 has three SIM holders, one per PCIe slot:
| Slot | PCIe socket | Typical use |
|----------|-------------|--------------------------|
| **SIM1** | M.2 Key-B | 4G/5G WWAN modem |
| **SIM2** | mPCIe #1 | Cellular or other modem |
| **SIM3** | mPCIe #2 | Cellular or other modem |
All three take **nano-SIM (4FF)** cards.
> [!NOTE]
> The official Banana Pi pages show an older board revision with a sliding
> "sled" holder. Newer boards ship with a fixed friction-fit holder instead:
> there is no lid to lift and no spring eject. The [closest matching photo on
> bananapi.org][15] shows the current mechanism.
### Inserting a SIM
1. Orient the card with the gold contacts facing the PCB (printed
side up) and the cut corner pointing toward the M.2/mPCIe socket,
which on this board is also toward the outer edge. The silkscreen
next to each holder shows the same outline.
2. Push the SIM straight in until it is fully seated. There is no
click and the holder is not spring-loaded, so press firmly until
the contacts engage and the rear edge of the card sits flush with
the holder.
3. A SIM that still protrudes is not fully inserted; push again.
### Removing a SIM
The friction grip on these holders is tight. Gently pry the card out
with a fingernail or a thin plastic spudger. Avoid metal tweezers
near the contacts. Removing the front panel of the metal case is
absolutely necessary to access the SIM holder.
For software configuration once the modem is recognised, see the
[Cellular Modem User's Guide][16].
## Getting Started
<img align="right" src="console-header.png" alt="Console header pins" width=200 padding=10>
### Quick Start with SD Card
1. **Download the SD card image:** [infix-bpi-r4-sdcard.img][2]
2. **Flash the image to an SD card:** see [this guide][0]
3. **Set boot switches to SD card mode** (see Boot Switch Reference below)
4. **Insert the SD card, connect power and a serial console (115200 8N1)**
5. Default login: `admin` / `admin`
### Boot Switch Reference
<img align="right" src="bootstrap-sw3.png" alt="DIP switches" width=140 padding=10>
The BPI-R4 has a 2-position DIP switch (SW3) that selects the boot media.
Switch positions are printed on the board near the SD card slot.
| A | B | Boot media (SW3) |
|-----|-----|------------------|
| OFF | ON | SPI NAND |
| ON | OFF | eMMC |
| ON | ON | SD card |
> [!NOTE]
> "OFF" = switch in the UP position = logical 0.
## Installing to eMMC
For production use or better reliability, install Infix to the internal
eMMC storage.
> [!IMPORTANT]
> The MT7988A has a single MMC controller that can only operate in one mode
> (SD or eMMC) per boot session. The SD card U-Boot cannot switch to eMMC
> mode mid-session, so an intermediate NAND bootloader step is required to
> write the eMMC — the same approach as BPi-R3.
>
> The MT7988A boot chain is: **BROM → BL2 → FIP (BL31 + U-Boot)**. The FIP
> (Firmware Image Package) bundles ARM Trusted Firmware (BL31) and U-Boot
> together; it is not just a U-Boot binary. When BL2 runs, it loads the FIP
> from a fixed offset and hands off to BL31, which then jumps into U-Boot.
>
> The factory SPI NAND contains a minimal recovery U-Boot that only supports
> TFTP — it has no USB command. You cannot use it to load files from a USB
> drive. Similarly, the factory eMMC ships with a basic OpenWRT image.
> You must first flash a full-featured U-Boot (from Frank-W) to SPI NAND via
> the SD card U-Boot before you can write the eMMC.
>
> This process involves three boot mode changes and multiple flash operations.
> Take your time and verify each step carefully.
### Prerequisites
- USB-to-serial adapter (3.3 V) for console access
- USB flash drive (FAT32 formatted)
- microSD card with Infix SD image, for initial boot
- Downloaded files (see below)
### Required Files
Place these files on a FAT32-formatted USB drive:
1. **Infix eMMC image:** [infix-bpi-r4-emmc.img][3]
2. **eMMC bootloader** (from): [bpi-r4-emmc-boot-2026.01-latest.tar.gz][4]
- Extract `bl2.img` from the tarball to your USB drive
3. **Intermediate NAND bootloader** from Frank-W's U-Boot (for BPI-R4, SPI NAND):
- [bpi-r4_spim-nand_bl2.img][13] — BL2 first-stage loader
- [bpi-r4_spim-nand_fip.bin][14] — FIP image (BL31 + U-Boot)
### Step 1: Boot from SD card
1. Set boot switches to **SD card mode** (SW3: A=ON, B=ON)
2. Insert the SD card with the Infix image
3. Power on and break into U-Boot (press Ctrl-C during countdown)
### Step 2: Flash intermediate NAND bootloader
This installs a full-featured U-Boot to SPI NAND so the board can load files
from USB in the next step. From the SD card U-Boot prompt:
```
usb start
mtd erase spi-nand0
fatload usb 0:1 0x50000000 bpi-r4_spim-nand_bl2.img
mtd write spi-nand0 0x50000000 0x0 0x100000
fatload usb 0:1 0x50000000 bpi-r4_spim-nand_fip.bin
mtd write spi-nand0 0x50000000 0x580000 0x200000
```
### Step 3: Boot from NAND
1. Power off the board
2. Set boot switches to **SPI NAND mode** (SW3: A=OFF, B=ON)
3. Power on — you should boot into U-Boot again
### Step 4: Write Infix image to eMMC
From the U-Boot prompt:
```
usb start
fatload usb 0:1 0x50000000 infix-bpi-r4-emmc.img
setexpr blocks ${filesize} / 0x200
mmc write 0x50000000 0x0 ${blocks}
```
### Step 5: Configure eMMC boot partition
Write the BL2 bootloader to the eMMC boot partition:
```
mmc partconf 0 1 1 1
mmc erase 0x0 0x400
fatload usb 0:1 0x50000000 bl2.img
mmc write 0x50000000 0x0 0x400
mmc partconf 0 1 1 0
```
### Step 6: Boot from eMMC
1. Power off the board
2. Set boot switches to **eMMC mode** (SW3: A=ON, B=OFF)
3. Remove the SD card (optional, recommended to verify eMMC boot)
4. Power on
Your BPI-R4 should now boot Infix from internal eMMC storage.
## Troubleshooting
### Board won't boot
- Verify boot switch positions — double-check against the wiki
- Ensure the power supply provides adequate current (12 V / 3 A recommended)
- Check the serial console output at 115200 8N1
### Can't break into U-Boot
- Connect the serial console before powering on
- Press Ctrl-C immediately when boot messages appear
- Try power cycling and pressing Ctrl-C repeatedly during the countdown
### eMMC boot fails after installation
- Boot from NAND (SW3=ON) and verify the eMMC write completed without errors
- Re-run the `mmc partconf` sequence — a missed step is the most common
cause of failure
- Use `mmc info` to confirm the eMMC is detected
### No network connectivity
The interface names on BPI-R4 differ from BPI-R3. Confirm what Linux
has created with `ip link` and compare with the factory configuration:
- `wan`, `lan1``lan3`: 1G switch ports (standard R4)
- `wan`, `lan0``lan3`: on R4-2g5/R4P, `wan` is the 2.5G internal PHY; `lan0``lan3` are 1G switch ports
- `sfp1` (and `sfp2` on standard R4): 10G SFP+ cage(s)
If interface renames look wrong, check `dmesg | grep renamed` and if
you spot any errors, please report as an issue to the Infix tracker
on GitHub.
## Board Variants
### BPI-R4
The base model BPi-R4 ports look like this, the `wan` port is the same physical
switch port as `lan0` on the R4-2g5/R4P, but here it serves as the WAN port in
the factory default configuration.
```
.-.
| | .-----.-----.-----.-----.
| | _______ _______ | | | | | .---.
| | | | | | | | | | | | | .-----.
'-' '-------' '-------' '-----'-----'-----'-----' '---' '-----'
USB1 sfp1 sfp2 wan lan1 lan2 lan3 DC12V PD20V
```
### BPI-R4-2g5 and BPI-R4P
These variants substitute one SFP+ cage for an internal 2.5 Gbps PHY
connected to a standard RJ45 jack. From a kernel perspective they use
the `mt7988a-bananapi-bpi-r4-2g5` device tree.
The BPI-R4P additionally supports an optional PoE input daughterboard on
the 2.5 Gbps RJ45 port. The PoE circuitry is passive with respect to
Linux — no special kernel driver is required for basic operation.
For these board variants, the WAN role moves to the dedicated 2.5G internal PHY,
so all four switch ports become LAN ports (`lan0``lan3`) instead of three:
```
.-.
| | .-----. .-----.-----.-----.-----.
| | _______ | | | | | | | .---.
| | | | | | | | | | | | | .-----.
'-' '-------' '-----' '-----'-----'-----'-----' '---' '-----'
USB1 sfp1 wan lan0 lan1 lan2 lan3 DC12V PD20V
```
### Selecting the Board Variant
U-Boot cannot automatically distinguish the standard R4 from the R4-2g5/R4P at
boot time (the on-board EEPROM is not programmed from factory). Instead, the
variant is read from the persistent U-Boot environment on the `aux` partition,
and you have to set it manually using `fw_setenv` from a UNIX shell:
```bash
# For BPI-R4-2g5 or BPI-R4P (1x SFP+ + 1x 2.5 Gbps RJ45):
sudo fw_setenv BOARD_VARIANT 2g5
# To revert to the standard BPI-R4 (2x SFP+) clear the setting:
sudo fw_setenv BOARD_VARIANT
```
> [!IMPORTANT]
> The change takes effect on the next reboot. No re-flashing is required, but
> you may want to do a factory reset to activate the changes in your system
> `startup-config`: `sudo factory -y` from shell, or the CLI.
`fw_setenv` writes to the `uboot.env` file on the aux partition. U-Boot
reads this at every boot (before loading the kernel) and selects the
matching device tree:
| `BOARD_VARIANT` | Device tree loaded |
|-----------------|-----------------------------------|
| *(unset)* | `mt7988a-bananapi-bpi-r4.dtb` |
| `2g5` | `mt7988a-bananapi-bpi-r4-2g5.dtb` |
## Additional Resources
- [Infix Documentation][1]
- [Official BPI-R4 Page][7]
- [BPI-R4 Forum][8]
- [Frank-W's site][9]
- [Release Downloads][10]
- [Bootloader Builds][11]
## Building Custom Images
```bash
# Build bootloaders for SD and eMMC
make x-bpi-r4-sd-boot
make x-bpi-r4-emmc-boot
# Build main system
make aarch64
# Create SD card image
./utils/mkimage.sh -od bananapi-bpi-r4
# Create eMMC image
./utils/mkimage.sh -odt emmc bananapi-bpi-r4
```
[0]: https://www.kernelkit.org/posts/flashing-sdcard/
[1]: https://www.kernelkit.org/infix/latest/
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r4-sdcard.img
[3]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r4-emmc.img
[4]: https://github.com/kernelkit/infix/releases/download/latest-boot/bpi-r4-emmc-boot-2026.01-latest.tar.gz
[7]: https://docs.banana-pi.org/en/BPI-R4/BananaPi_BPI-R4
[8]: https://forum.banana-pi.org/
[9]: https://wiki.fw-web.de/doku.php?id=en:bpi-r4:start
[10]: https://github.com/kernelkit/infix/releases/tag/latest
[11]: https://github.com/kernelkit/infix/releases/tag/latest-boot
[12]: https://github.com/frank-w/u-boot/releases
[13]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2026-01-bpi-2026.01-2026-01-15_2013/bpi-r4_spim-nand_bl2.img
[14]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2026-01-bpi-2026.01-2026-01-15_2013/bpi-r4_spim-nand_fip.bin
[15]: https://docs.banana-pi.org/bpi-r4/bpi-r4_4g5g_2.jpg
[16]: https://www.kernelkit.org/infix/latest/modem/
Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

@@ -0,0 +1,2 @@
# Locally calculated
sha256 d48246c717b505cc11df95171f2fd548b389e1a463f1af4c68d0b69fe0d1009b LICENSE
@@ -0,0 +1,49 @@
define BANANAPI_BPI_R4_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_MACH_MT7988)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_MT7988)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_MT6577)
$(call KCONFIG_SET_OPT,CONFIG_I2C_GPIO,y)
$(call KCONFIG_SET_OPT,CONFIG_MTK_THERMAL,m)
$(call KCONFIG_SET_OPT,CONFIG_MTK_LVTS_THERMAL,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_UART)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_WATCHDOG)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_GE_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_GE_SOC_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_MEDIATEK_SOC)
$(call KCONFIG_SET_OPT,CONFIG_NET_DSA_MT7530,m)
$(call KCONFIG_SET_OPT,CONFIG_MT7996E,m)
$(call KCONFIG_SET_OPT,CONFIG_PCIE_MEDIATEK_GEN3,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_SCPSYS)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_MTK)
$(call KCONFIG_SET_OPT,CONFIG_I2C_MT65XX,m)
$(call KCONFIG_SET_OPT,CONFIG_USB_XHCI_MTK,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_TPHY,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_XSPHY,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_XFI_TPHY,m)
$(call KCONFIG_SET_OPT,CONFIG_PCS_STANDALONE,y)
$(call KCONFIG_SET_OPT,CONFIG_PCS_MTK_USXGMII,y)
$(call KCONFIG_SET_OPT,CONFIG_PWM_MEDIATEK,m)
$(call KCONFIG_SET_OPT,CONFIG_SENSORS_PWM_FAN,m)
$(call KCONFIG_SET_OPT,CONFIG_NVMEM_MTK_EFUSE,m)
$(call KCONFIG_SET_OPT,CONFIG_MEDIATEK_2P5GE_PHY,m)
$(call KCONFIG_SET_OPT,CONFIG_CRYPTO_DEV_SAFEXCEL,m)
endef
LINUX_DTS_MT7988 = $(LINUX_DIR)/arch/arm64/boot/dts/mediatek
define BANANAPI_BPI_R4_KERNEL_DTBS_INSTALL_TARGET
@$(call MESSAGE,"Installing kernel DTBs and DTBOs for BPI-R4")
$(foreach f, \
mt7988a-bananapi-bpi-r4.dtb \
mt7988a-bananapi-bpi-r4-2g5.dtb \
mt7988a-bananapi-bpi-r4-sd.dtbo \
mt7988a-bananapi-bpi-r4-emmc.dtbo, \
$(INSTALL) -D $(LINUX_DTS_MT7988)/$(f) \
$(TARGET_DIR)/boot/mediatek/$(f)$(sep))
endef
BANANAPI_BPI_R4_POST_INSTALL_TARGET_HOOKS += BANANAPI_BPI_R4_KERNEL_DTBS_INSTALL_TARGET
$(eval $(ix-board))
$(eval $(generic-package))
Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

@@ -0,0 +1,2 @@
dtb-y += infix/bananapi,bpi-r4.dtbo
dtb-y += infix/bananapi,bpi-r4-2g5.dtbo
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/dts-v1/;
/plugin/;
/ {
compatible = "bananapi,bpi-r4-2g5";
};
/*
* On the 2g5 variant, GMAC1 uses the internal 2.5G PHY (eth1 renamed to
* "wan" by udev). The switch's port0, which is labeled "wan" in the base
* DTS, would cause a name collision when the switch driver registers it.
* Rename it to "lan0" here so the kernel names it correctly from the start.
*/
&gsw_port0 {
label = "lan0";
};
/*
* The upstream mt7988a.dtsi sets compatible = "ethernet-phy-ieee802.3-c45"
* on the internal 2.5G PHY node. That gives genphy_c45 (built-in) OF-match
* priority over the PHY-ID-based mtk-2p5ge driver, leaving the PHY powered
* down and unclaimed. Replace it with the standard ethernet-phy-idXXXX.XXXX
* form so of_get_phy_id() registers the PHY as C22 with explicit ID 0x00339c11.
* mtk-2p5ge then matches via PHY_ID_MATCH_VENDOR(0x00339c00) instead of
* genphy_c45 winning via OF-match.
* Note: /delete-property/ is not used because U-Boot fdt apply does not
* implement property deletion in overlays.
*/
&int_2p5g_phy {
compatible = "ethernet-phy-id0033.9c11";
};
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/dts-v1/;
/plugin/;
/ {
compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
};
/*
* The upstream mt7988a-bananapi-bpi-r4.dtsi sets stdout-path = "serial0:..."
* but the aliases node there only has ethernet entries. Linux resolves
* stdout-path by looking in /aliases, so we must add serial0 here.
* Path references in overlay aliases cannot use &label, so use the full path.
*/
&{/} {
aliases {
serial0 = "/soc/serial@11000000";
};
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
usb-ports = <&ssusb1>;
usb-port-names = "USB";
};
};
};
@@ -0,0 +1,81 @@
image cfg.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image #INFIX_ID##VERSION#-bpi-r4-#TARGET#.img {
hdimage {
partition-table-type = "gpt"
gpt-no-backup = true
}
# BL2 bootloader partition (MediaTek official location)
partition bl2 {
image = "bl2.img"
offset = 1024s # 0x80000 = sector 1024
size = 4M # 0x400000
bootable = true
}
# Factory/calibration data (sectors 9216-13311)
partition factory {
offset = 4608K # 0x480000
size = 2M # 0x200000
}
# FIP partition - BL31 + U-Boot (sectors 13312-17407)
partition fip {
image = "fip.bin"
offset = 13312s
size = 4096s
}
partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
}
partition primary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition secondary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition cfg {
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
image = "cfg.ext4"
}
partition var {
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
image = "var.ext4"
}
}
@@ -0,0 +1,5 @@
label Infix (aarch64)
kernel /boot/Image
fdtdir /boot
fdtoverlays /boot/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtbo /boot/infix/bananapi,bpi-r4.dtbo /boot/infix/bananapi,bpi-r4-2g5.dtbo
append ${bootargs_root} ${bootargs_log} usbcore.authorized_default=2 -- ${bootargs_user}
@@ -0,0 +1,5 @@
label Infix (aarch64)
kernel /boot/Image
fdtdir /boot
fdtoverlays /boot/mediatek/mt7988a-bananapi-bpi-r4-sd.dtbo /boot/infix/bananapi,bpi-r4.dtbo /boot/infix/bananapi,bpi-r4-2g5.dtbo
append ${bootargs_root} ${bootargs_log} usbcore.authorized_default=2 -- ${bootargs_user}
@@ -0,0 +1,5 @@
label Infix (aarch64)
kernel /boot/Image
fdtdir /boot
fdtoverlays /boot/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtbo /boot/infix/bananapi,bpi-r4.dtbo
append ${bootargs_root} ${bootargs_log} usbcore.authorized_default=2 -- ${bootargs_user}
@@ -0,0 +1,5 @@
label Infix (aarch64)
kernel /boot/Image
fdtdir /boot
fdtoverlays /boot/mediatek/mt7988a-bananapi-bpi-r4-sd.dtbo /boot/infix/bananapi,bpi-r4.dtbo
append ${bootargs_root} ${bootargs_log} usbcore.authorized_default=2 -- ${bootargs_user}
@@ -0,0 +1,411 @@
{
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"name": "USB",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
},
{
"name": "USB2",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.0.1",
"prefix-length": 24
}
]
}
},
{
"name": "lan0",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan1",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan2",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan3",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lo",
"type": "infix-if-type:loopback",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"prefix-length": 128
}
]
}
},
{
"name": "wan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv4": {
"infix-dhcp-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "broadcast"
},
{
"id": "domain"
},
{
"id": "hostname",
"value": "auto"
},
{
"id": "dns-server"
},
{
"id": "router"
},
{
"id": "netmask"
},
{
"id": "vendor-class",
"value": "Banana Pi BPI-R4"
}
]
}
},
"ietf-ip:ipv6": {
"infix-dhcpv6-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "client-fqdn"
},
{
"id": "domain-search"
},
{
"id": "dns-server"
}
]
}
}
}
]
},
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"read-default": "permit",
"write-default": "permit",
"exec-default": "permit",
"groups": {
"group": [
{
"name": "admin",
"user-name": [
"admin"
]
},
{
"name": "operator",
"user-name": []
},
{
"name": "guest",
"user-name": []
}
]
},
"rule-list": [
{
"name": "admin-acl",
"group": [
"admin"
],
"rule": [
{
"name": "permit-all",
"module-name": "*",
"access-operations": "*",
"action": "permit",
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "operator-acl",
"group": [
"operator"
],
"rule": [
{
"name": "permit-system-rpcs",
"module-name": "ietf-system",
"rpc-name": "*",
"access-operations": "exec",
"action": "permit",
"comment": "Operators can reboot, shutdown, and set system time."
}
]
},
{
"name": "guest-acl",
"group": [
"guest"
],
"rule": [
{
"name": "deny-all-write+exec",
"module-name": "*",
"access-operations": "create update delete exec",
"action": "deny",
"comment": "Guests cannot change anything or exec rpcs."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-access",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access password hashes."
},
{
"name": "deny-keystore-access",
"module-name": "ietf-keystore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access cryptographic keys."
},
{
"name": "deny-truststore-access",
"module-name": "ietf-truststore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access trust store."
}
]
}
]
},
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-bind": [
{
"local-address": "::"
}
]
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
"ietf-system:system": {
"hostname": "bpi-%m",
"ntp": {
"server": [
{
"name": "default",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-dhcp-server:dhcp-server": {
"option": [
{
"id": "ntp-server",
"address": "auto"
},
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"subnet": [
{
"subnet": "192.168.0.0/24",
"pool": {
"start-address": "192.168.0.100",
"end-address": "192.168.0.250"
}
}
]
},
"infix-firewall:firewall": {
"default": "wan",
"zone": [
{
"name": "lan",
"action": "accept",
"interface": [
"br0"
]
},
{
"name": "wan",
"action": "drop",
"interface": [
"wan"
],
"service": [
"dhcpv6-client"
]
}
],
"policy": [
{
"name": "lan-to-wan",
"action": "accept",
"ingress": [
"lan"
],
"egress": [
"wan"
],
"masquerade": true
}
]
},
"infix-meta:meta": {
"version": "1.8"
},
"infix-services:mdns": {
"enabled": true
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
},
"infix-services:web": {
"enabled": true,
"console": {
"enabled": true
},
"netbrowse": {
"enabled": true
},
"restconf": {
"enabled": true
}
}
}
@@ -0,0 +1,5 @@
# The mtk-2p5ge PHY driver uses MDIO PHY ID matching, not OF compatible
# matching. udev auto-loading is based on MODALIAS, which for DT-described
# devices is "of:N...C<compatible>" — a format that never matches the driver's
# "mdio:..." module alias. Match on OF_COMPATIBLE_0 explicitly instead.
ACTION=="add", SUBSYSTEM=="mdio_bus", ENV{OF_COMPATIBLE_0}=="ethernet-phy-id0033.9c11", RUN+="/sbin/modprobe -b mtk-2p5ge"
@@ -0,0 +1,2 @@
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth1", NAME="wan"
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth2", NAME="sfp1"
@@ -0,0 +1,403 @@
{
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"name": "USB",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
},
{
"name": "USB2",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.0.1",
"prefix-length": 24
}
]
}
},
{
"name": "lan1",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan2",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan3",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lo",
"type": "infix-if-type:loopback",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"prefix-length": 128
}
]
}
},
{
"name": "wan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv4": {
"infix-dhcp-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "broadcast"
},
{
"id": "domain"
},
{
"id": "hostname",
"value": "auto"
},
{
"id": "dns-server"
},
{
"id": "router"
},
{
"id": "netmask"
},
{
"id": "vendor-class",
"value": "Banana Pi BPI-R4"
}
]
}
},
"ietf-ip:ipv6": {
"infix-dhcpv6-client:dhcp": {
"option": [
{
"id": "ntp-server"
},
{
"id": "client-fqdn"
},
{
"id": "domain-search"
},
{
"id": "dns-server"
}
]
}
}
}
]
},
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"read-default": "permit",
"write-default": "permit",
"exec-default": "permit",
"groups": {
"group": [
{
"name": "admin",
"user-name": [
"admin"
]
},
{
"name": "operator",
"user-name": []
},
{
"name": "guest",
"user-name": []
}
]
},
"rule-list": [
{
"name": "admin-acl",
"group": [
"admin"
],
"rule": [
{
"name": "permit-all",
"module-name": "*",
"access-operations": "*",
"action": "permit",
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "operator-acl",
"group": [
"operator"
],
"rule": [
{
"name": "permit-system-rpcs",
"module-name": "ietf-system",
"rpc-name": "*",
"access-operations": "exec",
"action": "permit",
"comment": "Operators can reboot, shutdown, and set system time."
}
]
},
{
"name": "guest-acl",
"group": [
"guest"
],
"rule": [
{
"name": "deny-all-write+exec",
"module-name": "*",
"access-operations": "create update delete exec",
"action": "deny",
"comment": "Guests cannot change anything or exec rpcs."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-access",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access password hashes."
},
{
"name": "deny-keystore-access",
"module-name": "ietf-keystore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access cryptographic keys."
},
{
"name": "deny-truststore-access",
"module-name": "ietf-truststore",
"access-operations": "*",
"action": "deny",
"comment": "No user except admins can access trust store."
}
]
}
]
},
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-bind": [
{
"local-address": "::"
}
]
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
"ietf-system:system": {
"hostname": "bpi-%m",
"ntp": {
"server": [
{
"name": "default",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-dhcp-server:dhcp-server": {
"option": [
{
"id": "ntp-server",
"address": "auto"
},
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"subnet": [
{
"subnet": "192.168.0.0/24",
"pool": {
"start-address": "192.168.0.100",
"end-address": "192.168.0.250"
}
}
]
},
"infix-firewall:firewall": {
"default": "wan",
"zone": [
{
"name": "lan",
"action": "accept",
"interface": [
"br0"
]
},
{
"name": "wan",
"action": "drop",
"interface": [
"wan"
],
"service": [
"dhcpv6-client"
]
}
],
"policy": [
{
"name": "lan-to-wan",
"action": "accept",
"ingress": [
"lan"
],
"egress": [
"wan"
],
"masquerade": true
}
]
},
"infix-meta:meta": {
"version": "1.8"
},
"infix-services:mdns": {
"enabled": true
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
},
"infix-services:web": {
"enabled": true,
"console": {
"enabled": true
},
"netbrowse": {
"enabled": true
},
"restconf": {
"enabled": true
}
}
}
@@ -0,0 +1,2 @@
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth1", NAME="sfp2"
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth2", NAME="sfp1"
@@ -0,0 +1 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi mt7988-emmc-env.dtsi"
@@ -0,0 +1,40 @@
CONFIG_AUTOBOOT=y
CONFIG_BOOTDELAY=2
# CONFIG_MMC_PCI is not set
CONFIG_ENV_IS_NOWHERE=y
# CONFIG_ENV_IS_IN_MMC is not set
CONFIG_MULTI_DTB_FIT=y
CONFIG_OF_LIST="mt7988a-bananapi-bpi-r4 mt7988a-bananapi-bpi-r4-2g5"
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_MTK=y
CONFIG_USB_MTU3=y
CONFIG_PHY=y
CONFIG_PHY_MTK_TPHY=y
CONFIG_MTK_SPIM=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_SPI_FLASH=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_SPI_NAND=y
CONFIG_MTK_SPIM=y
CONFIG_MTK_SNOR=y
CONFIG_BUTTON=y
CONFIG_BUTTON_CMD=y
CONFIG_BUTTON_GPIO=y
CONFIG_CMD_SF=y
CONFIG_CMD_USB=y
CONFIG_CMD_MTD=y
CONFIG_CMD_MTDPARTS=y
CONFIG_CMD_DM=y
@@ -0,0 +1,7 @@
#include <mt7988-env.dtsi>
&env {
fdtfile = "mediatek/mt7988a-bananapi-bpi-r4.dtb";
board = "bananapi,bpi-r4-emmc";
ixvariant = "if test \"${BOARD_VARIANT}\" = \"2g5\"; then setenv fdtfile mediatek/mt7988a-bananapi-bpi-r4-2g5.dtb; setenv board bananapi,bpi-r4-2g5-emmc; fi";
};
@@ -0,0 +1,27 @@
/ {
config {
env: environment {
bootcmd = "run ixboot";
boot_targets = "mmc0";
ethprime = "eth0";
fdt_addr_r = "0x43f00000";
kernel_addr_r = "0x44000000";
fdtoverlay_addr_r = "0x47f00000";
scriptaddr = "0x48000000";
ramdisk_addr_r = "0x4A000000";
/*
* Apply BOARD_VARIANT from aux uboot.env.
* Infix writes BOARD_VARIANT=2g5 via fw_setenv on
* BPI-R4-2g5 / BPI-R4P boards to select the correct
* device tree. Unset = standard R4 (2x SFP+).
*/
ixvariant = "if test \"${BOARD_VARIANT}\" = \"2g5\"; then setenv fdtfile mediatek/mt7988a-bananapi-bpi-r4-2g5.dtb; fi";
/* This is a development platform, keep
* developer mode statically enabled.
*/
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
};
};
};
@@ -0,0 +1,7 @@
#include <mt7988-env.dtsi>
&env {
fdtfile = "mediatek/mt7988a-bananapi-bpi-r4.dtb";
board = "bananapi,bpi-r4-sdmmc";
ixvariant = "if test \"${BOARD_VARIANT}\" = \"2g5\"; then setenv fdtfile mediatek/mt7988a-bananapi-bpi-r4-2g5.dtb; setenv board bananapi,bpi-r4-2g5-sdmmc; fi";
};
@@ -0,0 +1,2 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi mt7988-sd-env.dtsi"
CONFIG_OF_LIST="mt7988a-bananapi-bpi-r4-sd"
+7
View File
@@ -0,0 +1,7 @@
config BR2_PACKAGE_BANANAPI_BPI_R64
bool "Banana Pi R64"
depends on BR2_aarch64
select BR2_PACKAGE_FEATURE_WIFI
select SDCARD_AUX
help
Build Banana PI R64 support
+13
View File
@@ -0,0 +1,13 @@
Copyright (c) 2026 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+148
View File
@@ -0,0 +1,148 @@
# Banana Pi BPI-R64
## Overview
<img align="right" src="banana_pi_bpi-r64_interface.jpg" alt="Board Overview" width=400 padding=10>
The Banana Pi BPI-R64 is a networking board based on the MediaTek MT7622
(dual Cortex-A53, AArch64) SoC.
### Hardware Features
- MediaTek MT7622 ARM Cortex-A53 dual-core processor @ 1.35 GHz
- 1 GB DDR3L RAM
- 8 GB eMMC storage
- microSD card slot
- MT7531 Gigabit Ethernet switch (4x LAN + 1x WAN)
- MT7622 WMAC built-in 2.4 GHz 802.11ac WiFi
- USB 3.0 port
- 2x Mini PCIe slots
### Default Network Configuration
Infix comes preconfigured with:
- **LAN ports** (lan0-lan3): Bridged for internal networking
- **WAN port**: DHCP client enabled for internet connectivity
- **WiFi** (wifi0-ap): Bridged to LAN (MT7622 WMAC, 2.4 GHz; or MT7615 PCIe card if fitted)
## Boot Switch Reference
<img align="right" src="bpi-r64-sw1.png" alt="SW1 Boot Switch" width=90 padding=10>
The BPI-R64 has a 2-position DIP switch (SW1) for selecting the boot device.
The MT7622 Boot ROM always tries SD first if a card is present, so you can
leave SW1 in the OFF (eMMC) position and simply insert or remove an SD card
to control boot device selection.
| SW1 | Boot device |
|-----|-------------|
| OFF | eMMC |
| ON | SD card |
## Getting Started
### Quick Start with SD Card
1. **Flash the image to an SD card** (the filename includes the version, e.g.
`infix-25.01-bpi-r64-sdcard.img`):
<img align="right" src="debug-uart.png" alt="Debug UART" width=100 padding=10>
```sh
dd if=infix-*-bpi-r64-sdcard.img of=/dev/sdX bs=4M status=progress
```
2. **Insert SD card and power on**
3. **Connect console:** 115200 8N1 — use the dedicated Debug UART header
just below the 40-pin GPIO header; pins are labeled GND, RX, TX on the board
4. **Default login:** `admin` / `admin`
## Installing to eMMC
Unlike the BPI-R3 (where SD and eMMC share a bus, requiring a NAND intermediate
step), the BPI-R64 has separate controllers for SD (mmc1/MSDC1) and eMMC
(mmc0/MSDC0). You can write directly to eMMC while booted from SD.
### eMMC Boot ROM Behaviour
> [!IMPORTANT]
> The MT7622 Boot ROM reads BL2 from the eMMC BOOT0 hardware partition (offset
> 0), not from the User Data Area where the main disk image lives. The
> installation procedure below writes BL2 to BOOT0 separately to handle this.
### Procedure
Boot from SD and write the eMMC image from U-Boot using a FAT32-formatted USB
drive.
#### Step 1: Boot from SD card
1. Insert SD card with Infix
2. Power on and break into U-Boot (press Ctrl-C during boot)
#### Step 2: Write the eMMC image from U-Boot
Place `infix-bpi-r64-emmc.img` and `bl2.img` on a FAT32-formatted USB drive,
then from the U-Boot prompt:
```
usb start
fatload usb 0:1 0x44000000 infix-bpi-r64-emmc.img
setexpr blocks ${filesize} / 0x200
mmc dev 0
mmc write 0x44000000 0x0 ${blocks}
```
#### Step 3: Write BL2 to eMMC BOOT0
```
fatload usb 0:1 0x44000000 bl2.img
mmc partconf 0 1 1 1
setexpr blkcnt ${filesize} + 0x1ff
setexpr blkcnt ${blkcnt} / 0x200
mmc write 0x44000000 0x0 ${blkcnt}
mmc partconf 0 1 1 0
```
#### Step 4: Boot from eMMC
1. Power off the board
2. Remove SD card and USB drive
3. Power on
## Platform Notes
### WiFi
The MT7622 SoC includes a built-in WMAC that provides 2.4 GHz 802.11b/g/n/ac
(2×2) — there is no 5 GHz capability from the onboard radio.
For dual-band operation, a PCIe card can be fitted in one of the two Mini PCIe
slots. The [Banana Pi BPI-MT7615][bpi-mt7615] is a purpose-built dual-band
(2.4 + 5 GHz, 802.11ac 4×4) module designed for BPI router boards and is a
natural fit. With it installed, Infix will use it in preference to the onboard
WMAC for the `wifi0-ap` interface.
[bpi-mt7615]: https://docs.banana-pi.org/en/BPI-MT7615/BananaPi_MT7615
### mmc0 = eMMC, mmc1 = SD
On MT7622, MSDC0 (mmc0) is the 8-bit eMMC controller and MSDC1 (mmc1) is the
4-bit SD card controller — the reverse of many other platforms.
## Building
```sh
# Bootloader only (SD)
make O=x-boot-bpir64-sd bpi_r64_sd_boot_defconfig && make O=x-boot-bpir64-sd
# Bootloader only (eMMC)
make O=x-boot-bpir64-emmc bpi_r64_emmc_boot_defconfig && make O=x-boot-bpir64-emmc
# Compose SD image (pass the Infix rootfs output directory)
utils/mkimage.sh -b x-boot-bpir64-sd -r x-aarch64/images bananapi-bpi-r64
# Compose eMMC image
utils/mkimage.sh -b x-boot-bpir64-emmc -r x-aarch64/images -t emmc bananapi-bpi-r64
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

@@ -0,0 +1,2 @@
# Locally calculated
sha256 d48246c717b505cc11df95171f2fd548b389e1a463f1af4c68d0b69fe0d1009b LICENSE
@@ -0,0 +1,35 @@
define BANANAPI_BPI_R64_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_MACH_MT7622)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_MT7622)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_MT6577)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_UART)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_WATCHDOG)
# Ethernet subsystem clock controller — required for the eth MAC,
# MT7531 DSA switch, and HSDMA to get their clocks from &ethsys.
# Without this, eth probe fails and the switch is never detected.
$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_MT7622_ETHSYS)
# HIF subsystem clock controller — required for PCIe and USB.
$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_MT7622_HIFSYS)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_GE_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_MEDIATEK_SOC)
$(call KCONFIG_SET_OPT,CONFIG_NET_DSA_MT7530,m)
$(call KCONFIG_SET_OPT,CONFIG_MT7603E,m)
$(call KCONFIG_SET_OPT,CONFIG_PCIE_MEDIATEK,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_MTK)
$(call KCONFIG_SET_OPT,CONFIG_USB_XHCI_MTK,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_TPHY,m)
$(call KCONFIG_SET_OPT,CONFIG_MTK_THERMAL,m)
$(call KCONFIG_SET_OPT,CONFIG_MTK_SOC_THERMAL,m)
$(call KCONFIG_SET_OPT,CONFIG_I2C_MT65XX,m)
$(call KCONFIG_SET_OPT,CONFIG_PWM_MEDIATEK,m)
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_MT6380,m)
$(call KCONFIG_SET_OPT,CONFIG_NVMEM_MTK_EFUSE,m)
$(call KCONFIG_SET_OPT,CONFIG_CRYPTO_DEV_SAFEXCEL,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_DRV_MT7622)
endef
$(eval $(ix-board))
$(eval $(generic-package))
Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

@@ -0,0 +1 @@
dtb-y += mediatek/mt7622-bananapi-bpi-r64.dtb

Some files were not shown because too many files have changed in this diff Show More