Compare commits

...
849 Commits
Author SHA1 Message Date
Mattias WalströmandGitHub 7c019190c8 Merge pull request #1133 from kernelkit/ci-fixes
CI: Only build minimal for PRs without ci:main tag
2025-09-02 14:22:33 +02:00
Richard Alpe 17df77ca0f .github: rename ci work branch
This branch can be used to test push events which is especially
useful when working on the CI infrastructure.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-09-02 13:16:05 +02:00
Richard Alpe a188f4269d .github: only run _minimal build for PRs
PRs which doesn't have the label ci:main.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-09-02 13:14:39 +02:00
Mattias WalströmandGitHub 6cdcd5775d Merge pull request #1126 from kernelkit/misc
Upgrade podman to fix critical container issues
2025-09-02 12:05:17 +02:00
Joachim Wiberg 1d0c2be515 patches: silence libyang "Obsolete schema node" warnings in log
Fixes #1127

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-02 10:53:49 +02:00
Joachim Wiberg fc7e1d0745 test/case/infix_containers: extend retry for containers
For a heavily loaded system, 10 seconds/retries is not enough time to
expect containers to have started up.  Particularly after the changes
done recently to do prune before and after a container is started.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-02 10:53:49 +02:00
Joachim Wiberg 950a6ef794 test/case/infix_containers: new test, verify environment
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-02 10:53:48 +02:00
Joachim Wiberg 7f829cfbdf test/case/infix_containers: new test, verify enable/disable
Regression test for issue #1123

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-02 10:53:48 +02:00
Joachim Wiberg 86df54c107 test/case/infix_containers: ensure IP forwarding is enabled
Usually the CNI bridge plugin "takes care" of enabling IPv4 forwarding
on all interfaces, see issue #1125, but when the container tests are run
in a different order from the infix_containers.yaml, Infix may reset the
IPv4 forwarding on this critical interface.

This change is both future proof and also ensures the test works as it
was intended even if tests are run out-of-order.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-02 10:53:47 +02:00
Joachim Wiberg 34dead1a50 test/case: disable mdns-allow-deny for release, unstable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-02 10:53:47 +02:00
Joachim Wiberg 313554d12e test/case: minor, cleanup
- Drop redundant comments
 - Drop redundant imports
 - PEP-8 fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 14:03:51 +02:00
Joachim Wiberg 8b39d3fdc7 confd: explicitly declare cni backends
- the port-mapping plugin supports iptables or nftables
 - the firewall plugin support only iptables or firewalld

Enforce use of iptables wrapper for nftables, for now, in both plugins.
This all needs to be refactored to run podman with "unmanaged" networks
in the future.

Related to issue #1125

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 14:03:51 +02:00
Joachim Wiberg 66a5e5304b board/common: fix container network change detection on pull
When a container's image is on an inaccessible remote server, the
container wrapper script waits in the background for any netowrk
changes to retry download of the image.

This change avoids the dangerous previous construct, and is also
easier to read: timeuot after 60 seconds unless ip monitor reads
at least one event before that.

Fixes #1124

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 14:03:50 +02:00
Joachim Wiberg 12df83e6d2 board/common: allow containers to shut down properly
The extended kill delay (10 sec) is sometimes not enough for complex
system containers.  Also, podman sometimes take the opportunity to do
housekeeping tasks when stopping a container.  So, allow for up to 30
sec. grace period before we send SIGKILL.

With the latest image prune extension, set a 60 sec. timeout for the
cleanup task, in case podman gets stuck.  This to prevent any future
mishaps.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 14:03:50 +02:00
Joachim Wiberg 6b0145f92e board/common: minor fix to usage text, and silence logs
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 14:03:50 +02:00
Joachim Wiberg b21043c7e5 package/podman: bump 4.5.0 -> 4.9.5
This major upgrade, along with the upgrade to Finit v4.14, is what is
needed to fix #1123, which was caused by some odd futex locking bug in
Podman that left lingering issues in /var/lib/containers state files.
The root cause as fixed already in v4.7.x, but since CNI is supported
up to and including 4.9.5, going with a later release seemd prudent.

Full changelogs at:
 - <https://github.com/containers/podman/releases/tag/v4.5.1>
 - <https://github.com/containers/podman/releases/tag/v4.6.0>
 - <https://github.com/containers/podman/releases/tag/v4.6.1>
 - <https://github.com/containers/podman/releases/tag/v4.6.2>
 - <https://github.com/containers/podman/releases/tag/v4.7.0>
 - <https://github.com/containers/podman/releases/tag/v4.7.1>
 - <https://github.com/containers/podman/releases/tag/v4.7.2>
 - <https://github.com/containers/podman/releases/tag/v4.8.0>
 - <https://github.com/containers/podman/releases/tag/v4.8.1>
 - <https://github.com/containers/podman/releases/tag/v4.8.2>
 - <https://github.com/containers/podman/releases/tag/v4.8.3>
 - <https://github.com/containers/podman/releases/tag/v4.9.0>
 - <https://github.com/containers/podman/releases/tag/v4.9.1>
 - <https://github.com/containers/podman/releases/tag/v4.9.2>
 - <https://github.com/containers/podman/releases/tag/v4.9.3>
 - <https://github.com/containers/podman/releases/tag/v4.9.4>
 - <https://github.com/containers/podman/releases/tag/v4.9.5>

Fixes #1123

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 12:25:55 +02:00
Joachim Wiberg ab9b2f555b package/finit: bump to v4.14
Highlights:
 - fixes to systemd and s6 type services
 - bare-bones libsystemd replacement with #include <systemd/sd-daemon.h>
 - new reload:script mimicking systemd ExecReload, and
 - new stop:script mimicking systemd ExecStop
 - exit status/signal info when a process dies
 - service kill:SEC now support up to 300 sec.
 - the /tmp/norespawn trick now also covers service_retry()
 - the sysv 'stop' command process environment is now same as 'start'
 - State machine ordering issue: enter new config generation after
   services disabled in previous generation have been stopped

Full changelog at:
 - <https://github.com/troglobit/finit/releases/tag/4.13>
 - <https://github.com/troglobit/finit/releases/tag/4.14>

Fixes #1123

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 12:25:54 +02:00
Joachim Wiberg cfeefc1d86 doc: slight refresh and pivot
As Infix matures as an operating system it is quickly becoming more and
more useful also for end-device use-cases.  The README should reflect
this change in focus.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 12:25:54 +02:00
Joachim Wiberg d65c478a28 doc: update logo with new slogan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 11:05:36 +02:00
Joachim Wiberg 477f7aed72 Follow-up to bb19d064, prune *all* unused images
From the documentation:

> 'podman image prune' removes all dangling images from local storage.
> With the all option, all unused images are deleted (i.e., images not
> in use by any container).
>
> The image prune command does not prune cache images that only use
> layers that are necessary for other images.

So, when the container script is called in the cleanup phase of the
lifetime of a container, we can use the '--all' option to ensure we also
remove this container's loaded image.  In the case this happens before
a reboot of the system, there will be no old version of the image loaded
to /var/lib/containers after boot.

Issue #1098

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-01 11:05:35 +02:00
Joachim WibergandGitHub da3bf57515 Merge pull request #1116 from kernelkit/ci-fixes
.github: various small improvements

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-31 23:51:58 +02:00
Joachim WibergandGitHub 0d43e135a9 Merge pull request #1120 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.44 (LTS)
2025-08-29 09:53:34 +02:00
Mattias Walström ddd5172a6b Upgrade Linux kernel to 6.12.44 (LTS) 2025-08-29 08:41:18 +02:00
Tobias WaldekranzandGitHub 6717bbbe26 Merge pull request #1117 from kernelkit/test-stability
Test stability
2025-08-27 13:23:15 +02:00
Mattias Walström 7683466424 test: infamy: Silence reachability check
This was to verbose.
2025-08-26 14:38:42 +02:00
Mattias Walström 6cc380d8ce test: Remove meta test case wait
It is now redundant, check has been moved to attach in Env.
2025-08-26 14:38:42 +02:00
Mattias Walström 8740b2eb23 test: infamy: Add a timeout when starting each test if the DUTs is not reachable
This to cover if you run one test, but the DUTs are still booting.
2025-08-26 14:38:42 +02:00
Richard Alpe 7244fad2e8 .github: include flavor in target
There are 2 main reasons for this:

1) It's almost impossible to write complex logical expressions in GH
workflows. I wanted to pass "" as flavor when not building _minimal.
So that the end target string would become TARGET + FLAVOR where
FLAVOR is empty, making it x86_64 for example.

As it turns out "" is false in GH workflow logical expressions, this
in conjunction with the limitations the interpreter has made it hard
to actually write sane expressions in the "with:" variables when
calling downstream jobs via workflow calls.

Here's an example of what I was trying to do and could not:

with:
  flavor: ${{ (
    github.event_name == 'pull_request' &&
    contains(github.event.pull_request.labels.*.name, 'ci:main')
  ) && '' || '_minimal' }}

As '' is false, the first sets of expressions always evaluates to
false making the string "_minimal". I tried bracing this in various
ways and to use "null" or various JSON objects, all in vain.

2) It reduces complexity instead of adding additional.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-26 14:37:13 +02:00
Mattias Walström edbc28a48b test: container_host_commands: Test more than one time
Have been seen Occasionally in tests that hostname not have been set,
try harder to check if it is set.
2025-08-25 16:47:09 +02:00
Richard Alpe 33c95e860b .github: replace existing artifacts
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-25 13:51:23 +02:00
Mattias WalströmandGitHub a60968b7b2 Merge pull request #1113 from kernelkit/upgrade-kernel 2025-08-24 10:19:38 +02:00
Mattias Walström 8abc27e698 board: rpi4: Use a more minimal xorg.conf 2025-08-23 23:45:41 +02:00
Mattias Walström 2646a48227 Remove rpi4_defconfig
RPI4 is now located in normal aarch64 image
2025-08-23 22:22:22 +02:00
Mattias Walström a8f57618b8 Upgrade linux kernel to 6.12.43 (LTS) 2025-08-23 22:22:21 +02:00
Mattias Walström 9374feefb0 board: rpi-4: Reserve memory correct for GPU 2025-08-23 22:22:21 +02:00
Mattias Walström d4726aff82 board: rpi-4: Do not rotate display in device tree 2025-08-23 19:51:12 +02:00
Mattias WalströmandGitHub 3ac6eaa16b Merge pull request #1111 from kernelkit/rpi-4-dsi-display
Raspberry Pi 4 DSI display
2025-08-22 23:46:26 +02:00
Mattias Walström e6bd55c0be doc: Document Raspberry pi support
Including touchscreen support.
2025-08-22 22:23:07 +02:00
Mattias Walström c3975f4ce5 board/rpi-4: Add support for RPI official touchscreen
This adds support for Raspberry Pi Official touchscreen (only version 1)
Can be seen here: https://www.raspberrypi.com/products/raspberry-pi-touch-display/

Sound is enabled in the kernel due to it is required by the GPU.
2025-08-22 22:23:06 +02:00
Mattias Walström 611c1a6d51 Rename rpi postimage to what it actually is, sdcard creater. 2025-08-22 21:43:44 +02:00
Mattias Walström d5536fa536 board/common/post-image: Remove hack for building sdcards images
Bootloaders is not built during normal build, not possible to create
sdcard images.
2025-08-22 21:43:44 +02:00
Mattias Walström ce895a4c59 boards/rpi-4: Remove stuff related to bootloader build 2025-08-22 21:43:43 +02:00
Joachim WibergandGitHub a7d91b4f80 Merge pull request #1104 from kernelkit/prune-dangling-containers
containers: prune dangling images
2025-08-20 17:30:12 +02:00
Richard Alpe bb19d064d5 containers: prune dangling images
Previously, upgrading Podman containers with the same tag left
behind dangling images, causing overlay storage to grow and fill
disk space.

This change ensures dangling images are cleaned up using
podman image prune. The command is run without -a, so only
unreferenced images are removed. This provides safe cleanup while
preventing unnecessary overlay growth.

Fixes #1098

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-19 12:57:35 +02:00
Mattias WalströmandGitHub fa7c743843 Merge pull request #1101 from kernelkit/upgrade-kernel2
Upgrade Linux kernel to 6.12.42 (LTS)
2025-08-15 14:10:26 +02:00
Mattias Walström a2a11e816a Upgrade Linux kernel to 6.12.42 (LTS) 2025-08-15 12:46:52 +02:00
Joachim WibergandGitHub 7c73ddeaaf Merge pull request #1099 from kernelkit/x86-64-debug-info 2025-08-14 17:19:41 +02:00
Tobias Waldekranz bc6180680d x86_64: Build kernel with debug info, like all other archs
The defconfigs for all architectures other than x86_64 has this
enabled, so align it with the rest.

This has no on-target impact, but it enables us to attach to a live VM
instance and debug it, or do offline debugging like resolving stack
trace lines from oops messages to source locations.
2025-08-14 13:03:07 +02:00
Joachim WibergandGitHub 21df66d221 Merge pull request #1097 from kernelkit/doc
Drop doc build on PR, only main and doc branch triggers
2025-08-12 14:44:56 +02:00
Joachim WibergandGitHub 684bbafad5 Merge pull request #1096 from kernelkit/dependabot
Fix dependabot moderate CVE warning in Infamy container
2025-08-12 14:35:03 +02:00
Mattias WalströmandGitHub ce6b4729cd Merge pull request #1095 from kernelkit/upgrade-kerneln
Upgrade buildroot and kernel
2025-08-12 13:04:26 +02:00
Joachim Wiberg b0a6e167bc .github: drop doc build on PR, only main and doc branch triggers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 13:02:50 +02:00
Joachim Wiberg 54bb3a01e2 test: fix dependabot moderate CVE warning in Infamy container
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 12:55:59 +02:00
Mattias Walström fcce71fe23 Upgrade linux kernel to 6.12.41 (LTS) 2025-08-12 11:39:53 +02:00
Mattias Walström de4db3e6bc Upgrade buildroot to 2025.02.5 (LTS) 2025-08-12 11:39:50 +02:00
Joachim WibergandGitHub 7803f6bc10 Merge pull request #1092 from kernelkit/github-wokflow-impovments
GitHub wokflow impovments
2025-08-12 11:38:24 +02:00
Joachim WibergandGitHub 5c1bcbaf44 Merge pull request #1093 from kernelkit/images
Add workflow for building bootloaders
2025-08-12 11:37:28 +02:00
Joachim Wiberg eefe84fd4b configs: update dependencies for fireant and disable CONFIG_MMC_PCI
The board/common/uboot/extras.config was updated with CONFIG_MMC_PCI
*after* we last built the SparX5i bootloader, and this was really only
needed for the Qemu build, so let's move the requirement there.

Also, we now (Buildroot 2025.02) need to update the dependencies for the
Fireant bootloader with libbsd (for some reason) and dtc, of course.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:35 +02:00
Joachim Wiberg a3c26c4ef3 configs: drop signing step for bootloaders
There's nothing to sign and only causes build errors.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:35 +02:00
Joachim Wiberg a845c3e9f3 configs: drop disk image (qcow2) from all bootloader builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:34 +02:00
Joachim Wiberg d151b5ef7c board/common: skip qemu.sh et al for bootloader builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:34 +02:00
Joachim Wiberg 0491c1f195 patches/arm-trusted-firmware: drop local patch for cn9130-crb
Build root now (as of 2025.02 LTS) carry a version of this patch for us,
for the same reason.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:33 +02:00
Joachim Wiberg 1c04409cf3 .github: nightly build of bootloaders
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:33 +02:00
Joachim WibergandGitHub 14dd7cbc33 Merge pull request #1087 from kernelkit/cleanup 2025-08-11 17:33:38 +02:00
Joachim Wiberg ebf4157e2c configs: new defconfig for rpi4 bootloader
This commit migrates the bootloader build from Raspberry Pi 4 board
package to a dedicated bootloader defconfig.  The idea is to set up
dedicated wokflows for building bootloaders, which change rarely,
streamlining the Infix image builds.

A dedicated workflow, or job in an existing workflow, can then do
the composition to minimal SD-card images useful for starting up
Infix on boards where SD-card is the primary boot source.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-11 16:50:57 +02:00
Richard Alpe 8a1747db2c .github: don't run generic build in kernelkit/infix
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 16:11:59 +02:00
Richard Alpe ded65cf94a .github: remove test-spec target
Has to many dependencies such as asciidoctor-pdf.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 16:08:31 +02:00
Richard Alpe 30757c8160 test: add statd usb data captured by yanger
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 14:33:09 +02:00
Richard Alpe b3fe0d58d8 yager: handle usb info though the HOST api
Prior to this commit yanger looked at the running system using
os.path..., this meant that the static reply / capture data wasn't
used properly. This resulted in strange behavior during unit testing
on GitHub runners where USB ports are missing.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 14:33:07 +02:00
Richard Alpe 15a2221b23 .github: add generic x86 build that runs on GH hardware
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 08:32:50 +02:00
Richard Alpe c135230289 .github: only run main workflow on kernelkit/
Avoid trying to run on forks, which most likely will cause erros
and other ugliness.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 08:32:48 +02:00
Richard Alpe 99af0ba0e5 .github: fix parallel selection for workflow call
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-08-11 08:32:44 +02:00
Joachim WibergandGitHub 2f296e9857 Merge pull request #1090 from kernelkit/doc
doc: minor markdownlint cleanup and fixes to admonitions
2025-08-08 15:22:19 +02:00
Joachim Wiberg f02048e904 doc: minor markdownlint cleanup and fixes to admonitions
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-08 15:21:49 +02:00
Joachim Wiberg bdc391b4ce src/bin: fix possible toctou in erase
Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-04 08:07:38 +02:00
Joachim Wiberg 9aacd251b8 src/bin: minor, fix warning from Coverity Scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-04 07:58:47 +02:00
Joachim Wiberg 867ea6e92a package/execd: drop unused local package
The execd runner has not been used since Nov, 2024, ca0e54b.  This
weekend it started triggering a warning from Coverity Scan, so let
us drop it for good this time.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-04 07:53:46 +02:00
Joachim WibergandGitHub ce89499518 Merge pull request #1086 from kernelkit/doc
Switch from GitHub to MkDocs Material for documentation

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Jon-Olov Vatn <jo@vatn.se>
2025-07-30 15:04:17 +02:00
Joachim Wiberg cf4a29da84 Update link to (new) documentation and fix admonition
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:59:24 +02:00
Joachim Wiberg edc1346753 doc: update developer's guide, how to build documentation
Tested successfully on one unsuspecting team member :-)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:16 +02:00
Joachim Wiberg ed5baf5839 doc: theme & svg logo tweak, grey to slightly darker lines and font
This commits tweaks the material orange theme to use the exact color hue
of Jackys footies.  To match this and give a slightly better contrast we
also change Jacksy border and logo text color to a slightly darker tone.

The original logo.svg is retained for reference, the new logo is logo2,
which all the .png variants have now been updated to.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:15 +02:00
Joachim Wiberg 5b100fb99e doc: collapse about + introduction into a single index.md
In the spirit of my uni English teacher; "simplify, Simplify, SIMPLIFY!"
This commit collapses the About and Introduction into a single document,
doc/index.md.

Also, relocate the System Boot section to doc/boot.md, which we alrady
have and covers the initial bootloader part of it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:14 +02:00
Joachim Wiberg dc8fc40002 doc: much improved disposition of navigation
Lot of work still remains, but this new disposition should serve as a
more representative template.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:13 +02:00
Joachim Wiberg 5a339e46cb doc: clarify sections and use "home styled" admonitions
Files in doc/cli/*.md are used in and displayed as help text in the CLI
admin-exec level.  So we cannot use standard admonitions (yet) since the
terminal markdown converter (lowdown) doesn't support the syntax.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:12 +02:00
Joachim Wiberg 90ec35c69e doc: retitle ssh+sysrepocfg -> Legacy Scripting
We want to discourage people to use sysrepocfg and instead move to use
NETCONF, or even better, RESTCONF.  When something's missing we should
add it to these two official, and standardized, interfaces.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:12 +02:00
Joachim Wiberg f98b00fcca doc: retitle -> Device Discovery
And make the ASCII image more generic to ease any branding work we may
need to do for certain customers later on.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:11 +02:00
Joachim Wiberg 83f2c27e6d doc: initial support for pdf export at doc. generation
- custom cover page for pdf
 - Center and resize logo
 - Place slogan just below logo
 - Ensure all text on cover page is in matching grey

Please note, the mkdocs-to-pdf plugin works, but it has a bug in the
enumeration of sections.  We may need to fork it to make it work the
way users expect.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:10 +02:00
Joachim Wiberg b0adf85f12 doc: minor, adjust image syntax and headings
- Consistent formatting of image formatting
 - Make container examples easier to see

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:09 +02:00
Joachim Wiberg fcbd75a0ef doc: split scripting.md into multiple files
Way too long.  By splitting it in multiple files we can also user
simpler (shorter) headings, which makes navigation easier.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:08 +02:00
Joachim Wiberg d1e71454cf doc: markdown syntax, whitespace cleanup, and admonitions
Consistency between different sections in the documentation is critical.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:07 +02:00
Joachim Wiberg fdf1aaebcc doc: add versioning using "mike"
The Python tool 'mike'[1] helps manage multiple versions of MkDocs-powered
documentation.  Only required when building the kernelkit.org site docs!

For each new tag, that steps year or month, a new version of is created of
the documentation, in a separate sub-directory on the gh-pages branch.

Strategy - Version Grouping with Early Publishing:

- Extract YEAR.MONTH from tag
  E.g., v25.06.0-beta1, v25.06.0-rc1, v25.06.0, v25.06.1 → become version 25.06
- From first pre-release onwards:
  - v25.06.0-beta1 → creates docs version 25.06
  - v25.06.0-rc1 → updates docs version 25.06
  - v25.06.0 (GA) → updates docs version 25.06
  - v25.06.1 (patch) → updates docs version 25.06
- New major/minor series:
  - v25.07.0-beta1 → creates new docs version 25.07

Benefits:
 - Users get docs as soon as beta/rc is available
 - Patches update existing docs (logical since patches rarely change docs significantly)
 - Clean version grouping by YEAR.MONTH
 - Mike handles create vs update automatically

[1]: https://github.com/jimporter/mike

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:06 +02:00
Joachim Wiberg 238ea9118b doc: refactor section 'Upgrading Packages'
Major overhaul and simplification of both language and structure to
improve accessibility and UX in new documentation framework.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:06 +02:00
Joachim Wiberg 67838fa66b doc: minor cleanup, fix markdown syntax and admonitions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:05 +02:00
Joachim Wiberg c574f23210 doc: reformat eth-counters.md to a proper markdown table
This will be easier to typset also in the PDF generated version.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:04 +02:00
Joachim Wiberg a66e000699 doc: fix broken links, GitHub vs MkDocs autolinking
Note, this change breaks some links on GitHub due to the difference in
how MkDocs and GitHub implement "autolinking" and anchors.  Since the
idea is to make MkDocs our primary documentation framework, breaking
links on GitHub in favor of MkDocs is the best compromise.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:03 +02:00
Joachim Wiberg c692c93f94 doc: split system.md -> system.md + upgrade.md
This makes it a lot easier to find relevant information on how to
perform a system upgrade.  Further consolidation may come later.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:02 +02:00
Joachim Wiberg a491f2a88b doc: minor syntax changes/cleanup, rephrase + use admonitions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:58:01 +02:00
Joachim Wiberg 9d912446a7 doc: initial support for MkDocs Material framework
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-30 14:57:57 +02:00
Richard AlpeandGitHub 3d3a4cac55 Merge pull request #1083 from kernelkit/trigger-github-workflow
.github: workflow dispatch fixes
2025-07-29 13:07:42 +02:00
Richard Alpe fc0a68a18a .github: add name and target parameter to dispatch build
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-29 09:26:28 +02:00
Richard Alpe ea2627d4f6 .github: remove explicit required from build dispatch
Reduce number of lines. Required = false is the default.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-29 08:36:00 +02:00
Richard Alpe 21321f0196 .github: allow upstream workflow caller to set parallel
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-29 08:03:56 +02:00
Mattias WalströmandGitHub dadb90a6d8 Merge pull request #1068 from kernelkit/raspberry-pi
Raspberry pi
2025-07-12 11:23:12 +02:00
Mattias Walström d5d3eef08b rpi4: Move to a board package and normal aarch64 build
Features availible on RPI4 so far is:

* WiFi
* USB
* (Graphics, untested)
2025-07-11 17:06:39 +02:00
Mattias Walström 14fb93f5cf developers-guide: Add new builddep (for raspberry pi)
Add mtools
2025-07-11 17:06:38 +02:00
Mattias Walström 7b3cd7d663 probe: Add USB support for RPI4
Need some special handling for RPI, since RPI does not present a phandle
for the USB in sysfs (PCI device)
2025-07-11 17:06:37 +02:00
Mattias Walström 67817a182c board: common: Add a watchdogd configuration
Also increase the timeout and kick more often (required by RPI4)
2025-07-11 17:06:36 +02:00
Joachim WibergandGitHub 692fa166d1 Merge pull request #1049 from kernelkit/document-kernel-buildroot-update
Document process about upgrade buildroot and kernel

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-11 13:40:58 +02:00
Joachim WibergandGitHub c5d9a7c8b3 Merge pull request #1078 from kernelkit/ci-workflow-redesign
Redesign CI to use workflow calls

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-07-09 11:52:54 +02:00
Richard Alpe 45c588567d .github: fix parallel typo in dispatch
Fixes: 874c0a54 Use massive parallel in workflow for PRs

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-09 10:42:40 +02:00
Richard Alpe 2a8580edcc .github: allow workflow caller to pass test dir
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-07 09:53:06 +02:00
Richard Alpe ffd0c05f41 .github: allow workflow caller to pass 9pm config 2025-07-07 09:53:05 +02:00
Richard Alpe 9271c2439f .github: add name when calling test from self trigger 2025-07-07 09:53:04 +02:00
Richard Alpe 7295077f27 .github: update test.yml to support workflow call 2025-07-07 09:53:03 +02:00
Richard Alpe b3d76de8f3 .github: quote workflow call variables in trigger 2025-07-07 09:53:02 +02:00
Richard Alpe 56f14ff520 .github: build _minimal on self-trigger
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-07 09:53:01 +02:00
Richard Alpe 9845e3b0c7 .github: make flavor selection into a env option 2025-07-07 09:53:00 +02:00
Richard Alpe 08e6833266 .github: allow repo checkout override
Needed when called by spins inside different organizations.
2025-07-07 09:52:59 +02:00
Richard Alpe df54982978 .github: simplify flavor selection 2025-07-07 09:52:58 +02:00
Richard Alpe efd6cce842 .github: pass (Infix) name as workflow_call input
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-07 09:52:57 +02:00
Richard Alpe 1dc84af095 .github: use workflow calls to build and test
Redesign how GH actions are triggered. This new design uses a
self-trigger to start jobs which are only started via workflow_calls.

The main benefit of this is to be able to start workflows from various
Infix Spins without needing to duplicate the workflow files in them.

Upcoming patches are intended to parameterize to allow Spins to pass
different architectures, brand names and such.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-07 09:52:55 +02:00
Tobias WaldekranzandGitHub d6c0d4bea7 Merge pull request #1042 from kernelkit/ixbin
ixbin: Add util script to update image contents
2025-07-04 11:23:33 +02:00
Tobias Waldekranz 85c4b579d3 ixbin: Add util script to update image contents
[skip-ci]
2025-07-04 11:20:46 +02:00
Joachim WibergandGitHub 1f268a7b90 Merge pull request #1079 from kernelkit/gen-test-spec
Minor Test Update
2025-07-03 14:51:04 +02:00
Ahmed Karic 562fd253c4 test: Update description in speed/duplex test 2025-07-03 14:01:27 +02:00
Ahmed Karic be547ba9a8 test: Generate forgotten test-spec
- container_host_commands test is missing .adoc and .svg files
2025-07-03 13:59:55 +02:00
Richard AlpeandGitHub 40e94883c6 Merge pull request #1076 from kernelkit/update-changelog
doc: update changelog date for v25.06
2025-07-01 14:19:41 +02:00
Richard Alpe 9f268606e4 doc: update changelog date for v25.06
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-07-01 11:29:04 +02:00
Jon-Olov VatnandGitHub de113503ea Merge pull request #1075 from kernelkit/update-changelog-v25.06.0
Update Changelog for Infix v25.06.0
2025-06-30 09:48:30 +02:00
Jon-Olov Vatn 6f203b1c78 Update Changelog for Infix v25.06.0
[skip ci]
2025-06-30 08:40:45 +02:00
Mattias WalströmandGitHub c31bbbefa9 Merge pull request #1074 from kernelkit/wifi-fixes 2025-06-29 22:24:23 +02:00
Mattias Walström 0d03f874ee confd: wifi: Fix several bugs in WiFi implemenation
* Did not work to reconfigure
* Was not possible to run from startup
* Othe minor things.
2025-06-29 21:07:10 +02:00
Mattias Walström 51176c7d26 feature: wifi: Allow to set regulation setting (country-code)
We was missing the firmware required for this, and for this to work
cfg80211 needs to be as module since the rootfs is not loaded when it
is loaded if compiled in kernel.

And add iw since it very useful for debugging.
2025-06-29 21:06:33 +02:00
Mattias WalströmandGitHub 88958a0b1f Merge pull request #1073 from kernelkit/upgrade-kernel
Bump kernel to 6.12.35 (LTS)
2025-06-27 15:04:49 +02:00
Mattias Walström e3f87799b6 utils/kernel-refresh.sh: Stage defconfigs
Everything else got staged, but not defconfigs
2025-06-27 13:39:31 +02:00
Mattias Walström ebcb38be37 Bump kernel to 6.12.35 (LTS) 2025-06-27 13:36:41 +02:00
Ahmed KaricandGitHub 889fb3eb79 Merge pull request #1072 from kernelkit/container-remote-exec
Verify Host Command Execution from Container
2025-06-26 14:11:28 +02:00
Ahmed Karic 2a6e7e5208 test: Verify host command execution
Add test to verify a container on Infix can execute commands on the
host by mounting a script to `/etc/rc.local` with proper permissions.
The test confirms host hostname change using `nsenter` from inside
a privileged container.

Resolves #1024
2025-06-26 13:10:43 +02:00
Joachim WibergandGitHub 9629e2eef4 Merge pull request #1071 from kernelkit/mount-mode
Add support for setting mode of a container content mount
2025-06-26 12:35:02 +02:00
Joachim Wiberg a0c48e7b5f Add support for setting mode of a container content mount
Fixes #1070

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-25 19:49:47 +02:00
Ahmed KaricandGitHub edd2e60dd5 Merge pull request #1059 from kernelkit/speed_duplex
Verify auto-negotiated speed/duplex
2025-06-25 10:00:10 +02:00
Ahmed Karic ec82d68a9f test: Verify auto-negotiated speed/duplex (copper) 2025-06-25 08:54:33 +02:00
Ahmed Karic 20d5426935 test/docker: Upgrade docker image to include ethtool
Add `ethtool` to the Docker test environment to support
interface auto-negotiation tests.
2025-06-25 08:01:13 +02:00
Mattias WalströmandGitHub 9d6d0e2388 Merge pull request #1069 from kernelkit/upgrade-buildroot 2025-06-24 19:55:41 +02:00
Joachim WibergandGitHub 6167f2a6a4 Merge pull request #1067 from kernelkit/misc
New slogan and updated containers

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-24 15:11:06 +02:00
Joachim Wiberg 4ad2664b78 doc: update changelog for v25.06
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-24 13:54:54 +02:00
Joachim Wiberg fe031f1a10 package/klish: fix by-word movement and kill buffer support
- Fix by-word movement, detect word barrier using non-alphanum chars
 - Fix delete word left/right, make sure to save word in kill buffer

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-24 13:54:54 +02:00
Joachim Wiberg 0a3277caf2 package/curious-*: bump to v25.06.0
- Buildroot updated to v25.02.3
 - Tefactor of nftables container

The nftables container now includes BusyBox, a shell with vi and some
basic filesystem tools, as well as nsenter and unshare, suitable for
testing and other more advanced tasks.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-24 13:54:53 +02:00
Joachim Wiberg cac357458c Rebranding, make slogan more inclusive, Infix is more now ...
Fixes #1052

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-24 13:54:53 +02:00
Mattias Walström 7b8bc43bca Bump buildroot to 2025.02.4 (LTS) 2025-06-24 13:36:36 +02:00
Joachim Wiberg 5c7fc3f570 package/tetris: bump to v1.5.0
ChangeLog https://github.com/troglobit/tetris/releases/tag/1.5.0

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-22 21:12:50 +02:00
Joachim WibergandGitHub bae70ec85a Merge pull request #1066 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.34 (LTS)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-06-20 09:52:54 +02:00
Mattias Walström eeb10b0f07 Upgrade Linux kernel to 6.12.34 (LTS) 2025-06-19 21:14:30 +02:00
Mattias WalströmandGitHub b92c9daedd Merge pull request #1058 from kernelkit/wifi-support 2025-06-19 18:34:35 +02:00
Mattias Walström eabaaac7c2 Document process about upgrade buildroot and kernel 2025-06-19 15:47:54 +02:00
Mattias Walström de33df14e2 test: case: ietf_syslog/remote: Fix typo of interface type
Has not been triggered before because we ignored operations on fixed
interfaces.
2025-06-19 15:23:32 +02:00
Mattias Walström 5eeed0e743 changelog: Update with Wi-Fi client
Also add kernel update to correct release.
2025-06-19 15:23:31 +02:00
Mattias Walström 24852caad0 doc: Add Wi-Fi Documention 2025-06-19 15:23:31 +02:00
Mattias Walström 08f4207277 configs: Enable Wi-Fi support 2025-06-19 15:23:30 +02:00
Mattias Walström 5fbb30fed5 Wi-Fi: Add Wi-Fi information to operational and CLI output
* show wifi scan <ifname> to see located SSIDs
* interface status
2025-06-19 15:23:30 +02:00
Mattias Walström f25f0ab050 Wi-Fi: Add template finit service for wpa_supplicant 2025-06-19 15:23:29 +02:00
Mattias Walström b53c1612f0 confd: Add basic Wi-Fi client support
Support implemented:
* WPA2/3 support
* scanning (in background, results in operational)
* Unencrypted networks

No certificate support, only PSK

*only* client so far, no AP
2025-06-19 15:23:28 +02:00
Mattias Walström 57d5bf1577 confd: Add script to wait for an interface
usage: wait-interface wlan0 30
2025-06-19 15:23:27 +02:00
Mattias Walström 0ad8fab5c7 wpa_supplicant: Add support for pidfile when not daemonize 2025-06-19 15:23:27 +02:00
Mattias Walström ecabce86c7 Add meta-package for adding Wi-Fi support
Helps adding everything that needs to be compiled to get
Wi-Fi support working.

Both modules, firmware and applications are selected here
2025-06-19 15:23:26 +02:00
Mattias Walström a7e72a46d9 confd: Simplify enabling features in YANG models
If a extra infix feature  require features to be added to an already
loaded module. Instead of have the exact module definition in multiple
places (with date), this will allow a much more flexible sytax:

MODULES=(
	"infix-interfaces -e containers"
)

This require that the infix-interfaces is loaded *before* this file
is run.
2025-06-19 15:23:25 +02:00
Mattias Walström 915bef2dd4 udev: Rename all wlan interfaces wifiN and start scanning
This since the feature is called 'wifi' in Infix, this makes the naming
consistent over the system.

Also trigger start of a wpa_supplicant, for scanning in the background.
The scanning results is available operational.
2025-06-19 15:23:24 +02:00
Mattias Walström 7f9a1df6f7 qemu: Increase memory for virtual machine
Image is too big, more memory is required
2025-06-19 15:23:24 +02:00
Mattias Walström 67a6fc18d5 confd: Always run netdag_gen_afspec_set and netdag_gen_afspec_add on all iftypes
If an iftype does not need to do anything, just return 0.
This makes the code much more easy to follow.
2025-06-19 15:23:23 +02:00
Mattias Walström 8538888069 confd: core: Allow all other flags then SR_SUBSCR_UPDATE
Other flags may be load-bearing in some modules, but SR_SUBSCR_UPDATE,
we never want to keep track on in the core hooks.
2025-06-19 10:34:46 +02:00
Mattias WalströmandGitHub 5a1cf7f9f8 Merge pull request #1063 from kernelkit/upgrade-kernel
Upgrade Linux kernel to v6.12.33 (LTS)
2025-06-18 07:56:21 +02:00
Ahmed Karic 6755011b25 Upgrade Linux kernel to 6.12.33 (LTS) 2025-06-16 10:49:02 +02:00
Mattias WalströmandGitHub e5a8514fa0 Merge pull request #1061 from kernelkit/update-changelog-v25.05.1
Update changelog for Infix v25.05.1
2025-06-12 15:03:41 +02:00
Jon-Olov Vatn 82c3eb1ee7 Update changelog for Infix v25.05.1 2025-06-12 12:31:35 +02:00
Jon-Olov VatnandGitHub 159135786a Merge pull request #1060 from kernelkit/fix-missing-cmd-regression
Restore missing CLI commands moved to show context
2025-06-11 09:14:09 +02:00
Richard Alpe 8a9415f0b4 klish-plugin-infix: restore missing CLI commands moved to show context
Some CLI commands where inadvertently moved from the global CLI
context into the show context.

For example the upgrade command.

As a result, commands like upgrade were unavailable at the top-level
prompt:admin@ix-00-00-00:/> upgrade ?
Error: Command not found, or incomplete.

However, these commands remained accessible under the "show" context
as a temporary workaround:

admin@ix-00-00-00:/> show upgrade ?
URI  [(ftp|tftp|http|https|ftp)://(dns.name | ip.address)/path/to/]upgrade-bundle.pkg

This patch restores the affected commands to the global CLI context so
that commands like upgrade function as intended at the root prompt.

Fixes: 9c0a8e39 klish-plugin-infix: fix indentation in infix.xml

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-06-10 16:06:12 +02:00
Mattias WalströmandGitHub 93cffaedde Merge pull request #1057 from kernelkit/upgrade-kernel 2025-06-04 21:22:39 +02:00
Ahmed Karic 991364b411 Upgrade linux kernel to v6.12.32 (LTS) 2025-06-04 18:21:11 +02:00
Mattias WalströmandGitHub 22cf97fdbd Merge pull request #1056 from kernelkit/upgrade-kernel 2025-05-30 12:49:48 +02:00
Ahmed Karic 16c1b50349 Upgrade Linux kernel to 6.12.31 (LTS) 2025-05-30 11:26:53 +02:00
Richard AlpeandGitHub d2e5c2cd29 Merge pull request #1054 from kernelkit/update-changelog
Update changelog for v25.05.0
2025-05-27 12:04:05 +02:00
Richard Alpe 8bca1bed9e Update changelog for v25.05.0
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-05-27 11:04:25 +02:00
Mattias WalströmandGitHub b88841952a Merge pull request #1048 from kernelkit/fix-downgrade-documentation
Fix downgrade documentation
2025-05-27 09:55:53 +02:00
Jon-Olov Vatn 9c3e951286 Update downgrade doc to recommend explicitly store/use backup cfg
- relying on config version and files backed up during
  configuration is not enough.
- storing a configuration file before upgrading, to be used
  when downgrading, is more reliable.

[skip ci]
2025-05-27 08:04:52 +02:00
Jon-Olov VatnandGitHub c7c01e3616 Merge branch 'main' into fix-downgrade-documentation 2025-05-26 16:20:02 +02:00
Mattias WalströmandGitHub a6889fa8c5 Merge pull request #1053 from kernelkit/rpi4
Add support for Raspberry Pi 4B
2025-05-26 11:23:26 +02:00
Joachim Wiberg 6cd92c25a8 doc: introduce Raspberry Pi 4B support
Also, fix placement of the VisionFive2, it's not an Aarch64 boartd.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 23:15:37 +02:00
Joachim Wiberg ff4e20221c configs,rpi4: complete port, Infix booting
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 23:15:37 +02:00
Joachim Wiberg 808edf0a29 configs,rpi4: quirk, phy-detached-when-down
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 23:15:36 +02:00
Joachim Wiberg 3f68e297ef configs,rpi4: quirk, override /etc/watchdogd.conf
Apparently the BCM2835 watchdog driver does not hook into /dev/watchdog
but creates its own /dev/watchdog0, and is very picky about interval and
timeout as well it seems.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 23:15:36 +02:00
Joachim Wiberg 0158fe1adb configs,rpi4: add factory default password
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 23:15:35 +02:00
Joachim Wiberg 4345ec1694 configs,rpi4: switch to mainline kernel, fix console access
- switch to 6.12 LTS, same as other Infix boards
 - trim down kernel config a bit
 - sync defconfig with r2s to switch to Finit

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 23:15:35 +02:00
Joachim Wiberg ebace5020b configs: new rpi4_defconfig
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 20:37:27 +02:00
Joachim Wiberg ae4424dafe board/common: create infix-key.dtso as well for U-Boot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 20:37:27 +02:00
Joachim Wiberg 50036e086d confd: fix yang description of dhcp client option
Update description to match new option name: subnet -> netmask.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-05-25 20:37:26 +02:00
Mattias WalströmandGitHub 6d53d92346 Merge pull request #1050 from kernelkit/upgrade-buildroot
Upgrade Buildroot to 2025.02.3 (LTS)
2025-05-23 16:00:04 +02:00
Ahmed Karic e0696c453a Upgrade Buildroot to 2025.02.3 (LTS) 2025-05-23 11:24:35 +02:00
Ahmed KaricandGitHub 8b9a452f0c Merge pull request #1051 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.30 (LTS)
2025-05-23 09:30:18 +02:00
Ahmed Karic 8bc7858694 Upgrade Linux kernel to 6.12.30 (LTS) 2025-05-22 18:28:23 +02:00
Ahmed KaricandGitHub 0065aeef47 Merge pull request #1046 from kernelkit/resctrict-mount-in-cont
confd: Add mount constraint for container config
2025-05-22 18:26:29 +02:00
Ahmed Karic dfc350a783 confd: Validate container mount source path
If an invalid mount source path is specified, the container logs a
  "file not found" error and subsequently crashes.

  Adding a check inside the SR_EV_CHANGE event handler performs an
  early validation of the mount source path, allowing to reject
  configurations that reference non-existent or unreadable files before
  they are committed to the datastore.
2025-05-19 09:35:38 +02:00
Ahmed Karic 21a78c7639 confd: Add mount constraint for container config
This change ensures configuration correctness by enforcing that each
  container mount has either a source or content set. Without this, the
  system may generate invalid runtime arguments (src=(null)), leading
  to container startup failures.
2025-05-19 09:35:38 +02:00
Tobias WaldekranzandGitHub d6d621af36 Merge pull request #1047 from kernelkit/ix-board-fix
board: Make ix-board reusable from upper externals
2025-05-16 22:32:06 +02:00
Tobias Waldekranz e6ea2991e1 board: Make ix-board reusable from upper externals
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
2025-05-16 20:06:09 +02:00
Ahmed KaricandGitHub 00f69baace Merge pull request #1039 from kernelkit/verify-ieee-group-fwd
Verify ieee group fwd
2025-05-16 14:26:42 +02:00
Jon-Olov Vatn e5299fff1c Update downgrade doc to recommend explicitly store/use backup cfg
- relying on config version and files backed up during
  configuration is not enough.
- storing a configuration file before upgrading, to be used
  when downgrading, is more reliable.

[skip ci]
2025-05-16 12:46:24 +02:00
Jon-Olov Vatn d5e96a8232 Add link to netbooting howto from boot doc
[skip ci]
2025-05-15 13:00:52 +02:00
Ahmed Karic aff385f37f statd: Drop unsupported Chassis-ID and Port-ID Subtypes 2025-05-13 16:59:35 +02:00
Ahmed Karic e40fc33a55 doc: Document LLDP config support 2025-05-13 16:59:25 +02:00
Ahmed Karic 71b4aed05d test: Reorganize infix_services test 2025-05-13 16:59:12 +02:00
Ahmed Karic 50a94e8175 test: Verify ieee-group-forward LLDP 2025-05-13 16:58:57 +02:00
Ahmed Karic 2cbba5cf1f test: Cleanup topologies 2025-05-13 16:58:46 +02:00
Ahmed Karic 00f2a4cf33 statd: Refactor cli_pretty.py
- Sort commands in an alphabetical order
2025-05-13 16:58:38 +02:00
Ahmed Karic ec7891c097 statd: Fix function and class separation in cli_pretty.py
Fix new lines according to PEP8
2025-05-13 16:58:31 +02:00
Ahmed Karic 9c0a8e39ec klish-plugin-infix: fix indentation in infix.xml 2025-05-13 16:58:21 +02:00
Ahmed Karic 4a4325baa3 cli: Add CLI option to show LLDP neighbors 2025-05-13 16:58:14 +02:00
Ahmed Karic cae5cfd3f0 statd: Set default dest-mac-address for LLDP 2025-05-13 16:58:02 +02:00
Mattias WalströmandGitHub fa7c3d0a51 Merge pull request #1045 from kernelkit/activate-full-parallel
Use massive parallel in workflow for PRs
2025-05-13 10:40:37 +02:00
Mattias Walström 874c0a54c4 Use massive parallel in workflow for PRs
This to get quick turnaround development -> test when
doing PRs main branch builds and release builds are still
build sequentially.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2025-05-13 08:02:16 +02:00
Mattias WalströmandGitHub 6a2abd962f Merge pull request #989 from kernelkit/enable-full-parallel
Enable full parallel
2025-05-12 09:36:57 +02:00
Mattias WalströmandGitHub aa995e3321 Merge pull request #1044 from kernelkit/upgrade-kernel
Bump kernel to 6.12.28 (LTS)
2025-05-12 09:36:30 +02:00
Mattias Walström 0a74ba341f confd: Refactor when yang models are installed
And add support for BR2_PER_PACKAGE_DIR
2025-05-12 08:39:54 +02:00
Mattias Walström 13de8be58d confd: Fix some typos in sysrepo.inc
* Install correct yang file, instead of one that does not exist at all
* Remove some models only used in tests (and is causing troubble!)
2025-05-12 08:39:54 +02:00
Mattias Walström 606aee68db package/lowdown: Fix configure script for parallel builds 2025-05-12 08:39:53 +02:00
Mattias Walström e4578364b6 package: python-libyang: Add missing libyang dependency 2025-05-12 08:39:53 +02:00
Mattias Walström 5cdaebf5e8 package: nghttp-asio: Add missing openssl dependency 2025-05-12 08:39:52 +02:00
Mattias Walström 2848cd62bc package: landing: Create target directory before copying files
The directory may not exist in parallel builds
2025-05-12 08:39:52 +02:00
Mattias Walström 2303fc08aa Bump kernel to 6.12.28 (LTS) 2025-05-12 08:10:41 +02:00
Joachim WibergandGitHub 6277aaedcd Merge pull request #1043 from kernelkit/lacp-descr 2025-05-08 17:45:36 +02:00
Ahmed Karic f81b74458d confd: Correct description for LAG LACP modes
Fixes #1031
2025-05-08 15:54:59 +02:00
Mattias WalströmandGitHub 8f61879966 Merge pull request #1041 from kernelkit/imx8-graphic
imx8mp-evk: Add USB and HDMI support
2025-05-07 15:18:52 +02:00
Mattias Walström 5560266e19 containers: Allow to have multiple mounts
Only first mount was sent to podman.
2025-05-07 13:24:07 +02:00
Mattias Walström d8cbdd7d92 imx8mp-evk: Add USB and HDMI support 2025-05-07 13:24:04 +02:00
Jon-Olov VatnandGitHub 7560da80a7 Merge pull request #1038 from kernelkit/doc-upgrade-downgrade-policy
Doc upgrade/downgrade policy
2025-05-05 09:45:49 +02:00
Jon-Olov Vatn 413cb61112 Fixing review comments (upgrade/downgrade doc)
[skip ci]
2025-05-05 09:41:50 +02:00
Jon-Olov Vatn e3c6f749ad Fixing #1009 Doc upgrade/downgrade policy
- Add section on upgrading/downgrading and boot-order to system.md
- Add or update references on upgrading from other pages
  - boot.md (update ref)
  - cli/upgrade.md (add ref)
  - management.md (add ref)

[skip ci]
2025-05-02 16:21:12 +02:00
Mattias WalströmandGitHub a990e559f7 Merge pull request #1037 from kernelkit/upgrade-kernel
Upgrade kernel to 6.12.26 (LTS)
2025-05-02 13:46:15 +02:00
Mattias Walström a0b06b2593 Upgrade kernel to 6.12.26 (LTS) 2025-05-02 10:51:36 +02:00
Mattias WalströmandGitHub 354650c0a5 Merge pull request #1035 from kernelkit/upgrade-sysrepo
Upgrade sysrepo
2025-05-02 10:49:36 +02:00
Mattias Walström 12e5b4c1b4 test: Update files for unittest 2025-04-30 11:51:45 +02:00
Mattias Walström cfbdce1b90 Change timezone test to check timezone in operational instead of checking time
Libyang is smart, it "fixes" the timezone for you, this was overriden by a
hack in netconf.py and restconf.py, but what you really want is to see
in operational what the current timezone is.
2025-04-30 11:51:45 +02:00
Mattias Walström 0b29e9eee4 Bump sysrepo, netopeer2, libnetconf2, libyang, libyang-cpp, sysrepo-cpp, rousette 2025-04-30 11:51:44 +02:00
Mattias WalströmandGitHub 3f0a0e3df0 Merge pull request #1034 from kernelkit/update-changelog
Update changelog for v25.04.0
2025-04-30 09:45:26 +02:00
Mattias Walström 3b261b331d Update changelog for v25.04.0 2025-04-30 08:58:56 +02:00
Richard AlpeandGitHub 066ec71736 Merge pull request #1030 from kernelkit/allow-user-sysrepo-access
Allow user sysrepo access
2025-04-29 15:02:39 +02:00
Tobias WaldekranzandGitHub 71295e0e37 Merge pull request #1027 from kernelkit/add-mqprio-quirk
imx8mp-evk: Disable mqprio for eth1
2025-04-28 16:57:36 +02:00
Richard Alpe ac89f94580 sysrepo: allow non-wheel users access to sysrepo data
Non-privileged users in the sys-cli group can now access sysrepo data.

The data is now solely protected by the NCAM rules and not Unix file
permissions. Any stray user that's not part of the (default) sys-cli
group still can't access syrepo, like users added from the shell.

Fixes #932

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-28 15:41:09 +02:00
Richard Alpe 399984082f Bump buildroot (still 2025.02.1)
Use new buildroot branching strategy where all our commits are placed
on top of a buildroot release on a branch named BR_RELEASE-kkit.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-28 15:32:10 +02:00
Mattias Walström 3375555911 imx8mp-evk: Disable mqprio for eth1
The kernel just hang, adding a quirk for it.
2025-04-28 13:44:19 +02:00
Tobias WaldekranzandGitHub 794872ca0c Merge pull request #1028 from kernelkit/bump-finit
Bump Finit to v4.12
2025-04-28 08:09:52 +02:00
Joachim Wiberg b7f110dbdc package/finit: bump to v4.12
- Improve notify:s6 readiness compatibility
 - Update `runparts` usage text
 - Fix variable overloading in urandom plugin
 - Fix buffer overwrite in urandom plugin, reported by Aaron Andersen

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-28 00:50:30 +02:00
Mattias WalströmandGitHub af20325cc4 Merge pull request #1026 from kernelkit/upgrade-kernel 2025-04-25 18:09:49 +02:00
Mattias Walström 7a5c9d0324 Upgrade kernel to 6.12.25 (LTS)
Also backport some fixes for freescale-imx8mp-evk
2025-04-25 13:04:37 +02:00
Mattias WalströmandGitHub a2533aa9c4 Merge pull request #1025 from kernelkit/upgrade-buildroot 2025-04-25 12:10:52 +02:00
Mattias Walström 4d650bad7f Upgrade buildroot to 2025.02.1 (LTS)
2025.02.1, released April 22nd, 2025

	Changes with potentially large impact:

	- gstreamer1 and related packages: updated from 1.22.x to 1.24.x.
	  1.22.x was already EOL when Buildroot 2025.02 was released, so
	  GStreamer should really already have been udpated to 1.24.x.
	  This update was needed to fix a lot of vulnerabilities.
	- frr: updated from 9.1.3 to 10.3. Version 9 is no longer
	  maintained upstream, and not in any distro either. This update
	  was needed to fix a vulernability.

	Important / security related fixes:

	- libmodsecurity: CVE-2025-27110.
	- tinyxml2: CVE-2024-50615.
	- xserver_xorg-server & xwayland: CVE-2024-9632, CVE-2025-26594,
	    CVE-2025-26595, CVE-2025-26596, CVE-2025-26597,  CVE-2025-26598,
	    CVE-2025-26599, CVE-2025-26600, CVE-2025-26601.
	- exim: CVE-2025-30232.
	- mbedtls: CVE-2025-27809, CVE-2025-27810.
	- libfreeglut: CVE-2024-24258, CVE-2024-24259.
	- libopenh264: CVE-2025-27091.
	- gstreamer1: CVE-2024-47834, CVE-2024-47835, CVE-2024-47778,
	    CVE-2024-47777 CVE-2024-47776, CVE-2024-47775, CVE-2024-47774,
	    CVE-2024-47615, CVE-2024-47613, CVE-2024-47607, CVE-2024-47606,
	    CVE-2024-47603, CVE-2024-47602, CVE-2024-47601, CVE-2024-47600,
	    CVE-2024-47599, CVE-2024-47598, CVE-2024-47597, CVE-2024-47596,
	    CVE-2024-47546, CVE-2024-47545, CVE-2024-47544, CVE-2024-47543,
	    CVE-2024-47542, CVE-2024-47541, CVE-2024-47540, CVE-2024-47539,
	    CVE-2024-47538, CVE-2024-47537.
	- augeas: CVE-2025-2588.
	- libndp: CVE-2024-5564.
	- python-jinja2: CVE-2025-27516.
	- python-django: CVE-2025-26699.
	- libarchive: CVE-2024-57970, CVE-2025-1632.
	- frr: CVE-2024-55553.

	Updated / fixed packages: libmodsecurity, intel-mediadriver,
	intel-vpl-gpu-rt, python-aerich, python-aiohttp, python-maturin,
	python-tortoise-orm, python-sqlalchemy, kodi-pvr-waipu, tor, mc,
	tinyxml2, libgeos, intel-vpl-gpu-rt, intel-mediadriver, ruby,
	ncftp, xserver_xorg-server, exim, mbedtls, gdb, freerdp, uclibc,
	libsoup3, cairo, zabbix, armadillo, spdlog, go, linux, linux-tools,
	gstreamer, linux-header, ethtool, apr, mali-driver, libcoap, libcap
	python-fastapi, python-twisted.

	Test Improvements:

	- linux-tools: selftests: Add path containing BPF binary.
	- testing: make time setting portable.
	- testing: set date in emulated machine.
	- testing: add git runtime test.
	- test_gstreamer1: fix test by using bootlin toolchain.

	Infrastructure updates/fixes:

	- kconfig: Handle backspace (^H) key.
	- xilinx-embeddedsw: fix menuconfig visualization.
	- DEVELOPERS: change arnout's address.
	- support/download/svn: use 'svn info' whith LC_ALL=C
	- glibc: disable on RISC-V ilp32f and lp64f, not supported.
	- dillo: Fix an issue related to _SITE url for make show-info.
	- pkg-stats: add -v/--verbose option

	Build issues/problems solved for packages:

	dillo, freerdp, freeswitch, gdb, glibc, linux-tools,
	mesa3d-demos, ncftp, tesseract-ocr,
	v4l2loopback, zabbix
2025-04-24 20:12:43 +02:00
Tobias WaldekranzandGitHub ff5b71b825 Merge pull request #1019 from kernelkit/move-operational
statd: Move operational from confd to statd (yanger)
2025-04-23 16:18:42 +02:00
Mattias Walström 2b5cf29bb9 statd: Add new README to describe statd
Whats required from your system and what to expect when you run it
outside Infix.
2025-04-23 13:45:50 +02:00
Mattias Walström 513c03a764 statd: Add script to install yang-tools locally (under /home)
This to be able to run statd locally on your computer.
2025-04-23 13:45:50 +02:00
Mattias Walström 5a982ab9ff statd: Allow to specify yanger path 2025-04-23 13:45:50 +02:00
Mattias Walström 4ea451362f yanger: DHCP: Fix bug when search exist but no nameserver
When running a DHCP test `resolvconf -l` looked like this:
admin@client:~$ resolvconf -l
search example.com # e5
admin@client:~$

This resulted in broken result when reading operational data from
system-state (which used resolvonf -l)
2025-04-23 13:45:49 +02:00
Mattias Walström 44be4e57f0 test: statd: Update unit testfiles 2025-04-23 13:45:49 +02:00
Mattias Walström dc0871a093 yanger: Do not fail if rauc or /run/system.json exist
This allowes to run statd on your computer.
2025-04-23 13:45:48 +02:00
Mattias Walström c6b44db18a statd: Move operational from confd to statd (yanger) 2025-04-23 13:45:48 +02:00
Mattias WalströmandGitHub a4def1379c Merge pull request #1018 from kernelkit/clean-srload 2025-04-14 07:40:45 +02:00
Mattias Walström 028ab7c1f9 srload: Cleanup when running outside buildtree
The original syntax did not work and the initial intention,
that root is always required is also false.
2025-04-11 20:31:43 +02:00
Mattias WalströmandGitHub cc03a59725 Merge pull request #1013 from kernelkit/move-yang-models-to-confd
Move yang models to confd
2025-04-11 13:45:26 +02:00
Mattias Walström 092964a10b confd: Install *all* YANG modules from confd
Sysrepo, netopeer etc are still responsible to install the modules in
target directory, this will make that we will discover quickly if something
is updated.

Also this enables rm -rf output/target/etc/sysrepo/data/* && make confd-rebuild
This will reinstall all modules again.
2025-04-11 08:21:51 +02:00
Mattias Walström d0277de958 srload: Add support for multiple search directories 2025-04-11 08:21:50 +02:00
Mattias WalströmandGitHub 2df84e20af Merge pull request #1016 from kernelkit/fix-ssh-migrate
Fix migration when SSH server settings exist
2025-04-11 08:20:34 +02:00
Mattias WalströmandGitHub 9de4633c13 Merge pull request #1017 from kernelkit/update-kernel
Upgrade linux kernel to 6.12.23 (LTS)
2025-04-10 19:50:39 +02:00
Mattias Walström 50f955c242 Upgrade linux kernel to 6.12.23 (LTS) 2025-04-10 15:21:36 +02:00
Mattias Walström f2f539b492 Fix migration when SSH server settings exist
This fix #1015
2025-04-10 14:29:56 +02:00
Joachim WibergandGitHub 2b439298fb Merge pull request #1014 from kernelkit/fix-migrate-version 2025-04-09 17:04:06 +02:00
Richard Alpe 2ef759a9d8 confd: remove prefix from version leaf in migrate
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-09 15:51:11 +02:00
Mattias WalströmandGitHub 6fe4db8431 Merge pull request #1011 from kernelkit/update-kernel
Update kernel to 6.12.22 (LTS)
2025-04-07 18:44:55 +02:00
Mattias Walström b2525e29e1 Upgrade linux kernel to 6.12.22 (LTS) 2025-04-07 18:26:07 +02:00
Joachim WibergandGitHub 7ef5223fca Merge pull request #1010 from kernelkit/netboot-doc
Netboot HowTo

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 17:57:56 +02:00
Joachim Wiberg 323bfc9d66 doc: add netboot howto, for developers
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 17:56:59 +02:00
Mattias WalströmandGitHub d6be23fa6b Merge pull request #1012 from kernelkit/run-migrate-script-locally
Run migrate script locally
2025-04-07 17:07:21 +02:00
Mattias Walström c7c2998e33 Require a valid sha256 checksum for all package downloaded 2025-04-07 16:57:17 +02:00
Mattias Walström 184ed470d7 kernel-refresh.sh: Update linux hash on update 2025-04-07 16:57:17 +02:00
Richard Alpe 75352a9f77 confd: add no log option (-e) to migrate script
Write logs to stderr instead of syslog. Useful when running on a
non-target system.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 15:20:54 +02:00
Richard Alpe e3c601f2fd confd: add script path option (-s) to migrate script
This allows a user to run in on any system which has the Infix source
code that contains the modification scripts.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 15:09:36 +02:00
Richard Alpe 0ab9e2a36a confd: fix indentation of bin/migrate
Don't mix tabs and spaces.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 14:57:17 +02:00
Joachim WibergandGitHub 7b20665cf9 Merge pull request #1004 from kernelkit/new-show-command
Add new show command

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 14:34:35 +02:00
Mattias WalströmandGitHub 3d86ecd2ee Merge pull request #1005 from kernelkit/fix-images
Change type of disk image
2025-04-07 09:41:01 +02:00
Richard Alpe 403b79d370 test: update unit test data (cli/show-software)
The software list from sysrepo is no longer reversed, the reverse now
happens in cli-pretty. This commit reflects that.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 09:06:29 +02:00
Richard Alpe 740ecbcc43 cli: integrate (use) new show command in cli 2025-04-07 09:06:28 +02:00
Richard Alpe 42af6eec30 show: add bash tab-completions
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 09:06:27 +02:00
Richard Alpe c584af356b show: add new show tool written in python3
The reason for this is:
1) We want to use the same fetch tool for all operational data, to
   avoid having duplicated xpaths scattered across the repo.
2) We want to call this directly from the CLI, which means it need to
   be escape safe. A unprivileged user shall be able to use it but not
   escape into a shell or do other malicious stuff.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 09:06:26 +02:00
Richard Alpe 827dc098e4 board/common: deprecate existing show command
There's several reasons for this. The main reason is that it was
developed as an intermediate way of getting system information when
the operational datastore was almost empty. There's not a lot of data
available in the operational datastore and we shall rely on that data
primarily. This command isn't safe to run from a jailed CLI as i
doesn't validate input and run commands directly in the shell, making
it hard to protect against a CLI jail break.

In upcoming patches we will introduce a new show tool that relies
solely on operational data and which sanitize the user input.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-04-07 09:06:25 +02:00
Richard Alpe bc5dd949d7 cli: fix indentation of infix.xml 2025-04-07 09:06:20 +02:00
Mattias Walström 4a932dec11 Update changelog for 2025.04 2025-04-07 08:20:21 +02:00
Mattias Walström d5c5e38604 CI: Store qcow2 disk images as release artififacts
This to make it easier to use  GNS3 appliance file from
GNS3 marketplace.
2025-04-07 08:16:34 +02:00
Mattias Walström 02080bfb6c qeneth: Move Infix test templates from qeneth to Infix 2025-04-07 08:16:33 +02:00
Mattias Walström d3fa51e4fa Use qcow2 for disk image instead of raw image
This make the release bundle much smaller, the disk image size
change from 512M to 2xsizeof(squashimage)
2025-04-07 08:16:33 +02:00
Mattias Walström 6cfe5f8c58 Fix symlink in release packages
Fix #1002
2025-04-07 08:16:33 +02:00
Mattias Walström b4f3e4eab8 migrate: Fix typo resulting in not logging correctly 2025-04-07 08:16:32 +02:00
Joachim WibergandGitHub b188e781ee Merge pull request #1007 from kernelkit/r2s-fixes
Fix NanoPi R2S Regression

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 08:16:09 +02:00
Joachim Wiberg 8156179f1b doc: update ChangeLog for v25.04 release cycle
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 06:22:19 +02:00
Joachim Wiberg 55632eebaa utils: update usage text with example, add -f
- Update usage text for readability, add example
 - Reindent getopts case and add -h
 - Allow 'git rm -f' to remove already staged patches

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 06:06:42 +02:00
Joachim Wiberg 71b11026bb configs/r2s_defconfig: bump kernel to 6.12.21 (LTS)
- Bump kernel to 6.12.21, same as other tier one boards
 - Fix #1006 byt enabling netlink for ethtool (now works!)
 - Sync defconfigs:
   - LIBXCRYPT now in an rdep of another package
   - Disable FORCE check hashes for now
 - Drop patches for 6.10 tree (r2s kernel)
 - Port RTL8153b patch for R2S LAN LED support

Fixes #1006

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 05:54:54 +02:00
Joachim Wiberg 2b28733fda confd: set correct file version of migrated files in backup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 05:32:05 +02:00
Joachim Wiberg 8c115e17c4 board/common: set wheel group on /cfg/backup dir
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-04-07 05:32:05 +02:00
Mattias WalströmandGitHub 10f62f679b Merge pull request #1000 from kernelkit/logging-fixes
Misc. fixes related to logging found in -rc1
2025-03-31 15:08:10 +02:00
Joachim Wiberg fa4f7c6532 doc: update ChangeLog with fixes for -rc1 issues
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 13:49:34 +02:00
Joachim Wiberg 0647541988 patches/sysklogd: sync with latest version in Buildroot 2025.02
Buildroot 2025.02 currently has sysklogd v2.7.0, which has new features,
but also a few bugs.  This commit drops all patches for v2.5.2 and adds
all patches for sysklogd v2.7.2

For more information, see:

 - https://github.com/troglobit/sysklogd/releases/tag/v2.7.1
 - https://github.com/troglobit/sysklogd/releases/tag/v2.7.2

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 13:43:19 +02:00
Joachim Wiberg 2602ddc0b8 board/common: skip product init if no product specific dir
This silences a bogus warning in the log when runparts is called with no
argument.  I.e., when there is no product specific init files available.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 13:35:44 +02:00
Joachim Wiberg 3886b284d3 confd: fix invalid priority argument to logger
There is no such loglevel 'critical', only 'crit' is defined.

For some reason this issue has not been spotted until the upgrade to
Buildroot 2025.02, which includes sysklogd v2.7.0, and Finit v4.11.

Introduced in 3e48af6, when the concept of failure-config was added.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 13:14:34 +02:00
Joachim Wiberg 22a9405d1e confd: shellcheck fixes to load script
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 13:13:43 +02:00
Mattias WalströmandGitHub 2902dccf11 Merge pull request #999 from kernelkit/bump-version
Bump version for v25.03.0 GA
2025-03-31 11:37:27 +02:00
Joachim Wiberg 644374bb29 doc: bump version for v25.03.0 GA
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 11:32:02 +02:00
Tobias WaldekranzandGitHub a868307637 Merge pull request #998 from kernelkit/mvpp2-tcam-fix-main
patches/linux: net: mvpp2: Prevent parser TCAM memory corruption
2025-03-31 11:27:03 +02:00
Tobias Waldekranz d213861e02 patches/linux: net: mvpp2: Prevent parser TCAM memory corruption
[skip ci]
2025-03-31 11:26:27 +02:00
Joachim WibergandGitHub 3d538d4eca Merge pull request #992 from kernelkit/bump-finit
Fix reboot when containers are in setup state

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 11:21:52 +02:00
Joachim WibergandGitHub 06a6dd17f8 Merge pull request #997 from kernelkit/rename-lag-yang
Rename infix-if-lag to correct version
2025-03-31 10:55:17 +02:00
Joachim Wiberg 18659fd45a doc: update ChangeLog for v25.03
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 10:00:00 +02:00
Joachim Wiberg 7253be7619 Allow writing to the ttyd console after Buildroot bump
Fixes #990

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 09:54:14 +02:00
Joachim Wiberg 910749bab1 board/common: send SIGTERM when container is in its setup phase
When stopping a container that is (stuck) in setup state, e.g., fetching
its container image, we need to send SIGTERM to the container wrapper
script rather than forwarding the 'stop' command to podman.

With this fix, and the Finit upgrade, there is no longer a 10 second
timeout before Finit sends SIGKILL to the PID.  Instead, the script now
immediately react to the initial SIGTERM.

Related to issue #980

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 09:54:13 +02:00
Joachim Wiberg 4f9b3146a1 package/finit: bump to v4.11
ChangeLog: https://github.com/troglobit/finit/releases/tag/4.11

Fixes #980

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-31 09:54:10 +02:00
Mattias Walström b026abd0bc Rename infix-if-lag to correct version
Fix libyang warning: [WRN] File name "infix-if-lag@2024-12-08.yang" does not match module revision "2025-03-28".
2025-03-31 09:39:42 +02:00
Tobias WaldekranzandGitHub 08658a37c4 Merge pull request #996 from kernelkit/update-kernel
Upgrade linux kernel to 6.12.21 (LTS)
2025-03-31 08:07:07 +02:00
Mattias Walström 6bbf2d02a8 Upgrade linux kernel to 6.12.21 (LTS) 2025-03-30 21:40:43 +02:00
Mattias WalströmandGitHub 538185c29e Merge pull request #995 from kernelkit/yang-warning
confd: drop unused must expression from infix-if-lag.yang
2025-03-30 21:39:44 +02:00
Joachim Wiberg bd05715ba0 confd: drop unused must expression from infix-if-lag.yang
Fixes #964

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-28 13:11:56 +01:00
Mattias WalströmandGitHub 6960cd30eb Merge pull request #993 from kernelkit/relase-tarball-fixes
.github: preserve symlinks in tarballs
2025-03-28 12:55:35 +01:00
Joachim Wiberg c5c21dec83 .github: preserve symlinks in tarballs
Fixes #991

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-28 11:15:49 +01:00
Mattias WalströmandGitHub 73de6b6d42 Merge pull request #988 from kernelkit/pre-built-go
Use prebuilt GO toolchain
2025-03-20 10:52:30 +01:00
Mattias Walström f698d5f0ee Use prebuilt GO toolchain
Do NOT built it from source
2025-03-20 08:53:53 +01:00
Mattias WalströmandGitHub 7e59406436 Merge pull request #972 from kernelkit/update-buildroot
Update buildroot to new LTS base (2025.02)
2025-03-20 08:39:26 +01:00
Mattias Walström b8a9dc9743 Update Changelog
[skip ci]
2025-03-17 19:51:46 +01:00
Mattias Walström 1b5aa16652 dnsmasq: Remove relay agent info patch 2025-03-17 19:45:05 +01:00
Mattias Walström 3f491ea785 yangdoc: Add patch to remove pip-tools as requirement
Not used
2025-03-17 19:45:05 +01:00
Mattias Walström 9bdad9bc8b podman: Update podman hash
Just minor change of filename from podman-4.5.0.tar.gz to
podman-4.5.0-go2.tar.gz
2025-03-17 19:45:05 +01:00
Mattias Walström de711b0123 netsnmp: Update patch after toolchain upgrade 2025-03-17 19:45:04 +01:00
Mattias Walström b52c462cfa Update patches for new versions 2025-03-17 19:45:04 +01:00
Mattias Walström f4e75dfecb Update the name in hash file for the packages for fetched from git
Buildroot have change the named for the tar-package
created for a package created from a git repo.
2025-03-17 19:45:03 +01:00
Mattias Walström c5fe10aada busybox: Add patch for the new version 2025-03-17 19:45:03 +01:00
Mattias Walström 97623b989c frr: Add upstream compat patch to work with libyang 3 2025-03-17 19:45:03 +01:00
Mattias Walström ed2a776c55 Remove obsolete patches 2025-03-17 19:45:02 +01:00
Mattias Walström ac4fcb61c6 Update buildroot to new LTS base (2025.02) 2025-03-17 19:45:02 +01:00
Tobias WaldekranzandGitHub 41fa664a86 Merge pull request #984 from kernelkit/update-kernel
Update kernel to 6.12.19 (LTS)
2025-03-13 20:02:07 +01:00
Mattias Walström 4f54cbe975 Update kernel to 6.12.19 (LTS) 2025-03-13 13:31:54 +01:00
Mattias WalströmandGitHub 2291e9fd11 Merge pull request #979 from kernelkit/copy-owner
Fix annoying "permission denied" when saving running-config
2025-03-11 16:04:43 +01:00
Richard Alpe 095c9c331e bin: copy: fix return type of in_group()
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-11 13:31:55 +01:00
Richard Alpe b8fc8b7f62 bin: copy: fix segfault for one argument
The code assumes both SRC and DST is passed, here we ensure this
early.

Prior to this patch:
root@host:~$ copy foo
Segmentation fault (core dumped)

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-11 09:30:46 +01:00
Richard Alpe 95931c8c0a bin: copy: add newline to same-same error message
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-11 09:30:19 +01:00
Richard Alpe dd788f5611 bin: copy: save errno in chown error path
Prior to this patch the errno value was overwritten by getgrgid()
making the printouts invalid:

Error: setting group owner wheel (10) on /cfg/startup-config.cfg:
Success

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-10 16:18:20 +01:00
Richard Alpe 5d99c12089 bin: copy: use dirname() to derive parent directory
Cosmetic change intended to improve code readability.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-10 16:16:52 +01:00
Richard Alpe 03437fc936 bin: copy: use NGROUPS_MAX when probing user groups
Avoid a theoretical race between getting the number of groups a user
belongs to and actually processing them. We should not need to check
the return value of getgrouplist() as we know the number of groups fit
inside the buffer.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-10 14:52:22 +01:00
Mattias WalströmandGitHub 56a086ef52 Merge pull request #978 from kernelkit/update-kernel
Upgrade kernel to 6.12.18 (LTS)
2025-03-10 10:52:42 +01:00
Mattias Walström 3f3fb4eeb4 Upgrade kernel to 6.12.18 (LTS) 2025-03-09 19:27:12 +01:00
Joachim Wiberg 4998e320c5 doc: update ChangeLog with copy command fix
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-09 16:50:27 +01:00
Joachim Wiberg 496d56e975 cli: fix dir command's $HOME when not logged in as root
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-09 16:46:30 +01:00
Joachim Wiberg 82df624ae9 cli: show file extension of copy src and dst on tab completion
As per earlier decsision, the .cfg suffix is no longer implied when a
user copy to a regular file, so we should allow tab completion in the
copy command to show foo.cfg, otherwise the copy command will fail.

Skip /cfg/startup-config.cfg since it's treated as a special case and
added to the list by the infix_datastore() plugin function.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-09 16:44:41 +01:00
Joachim Wiberg 5021a1da88 bin: copy: set group owner on (new) files
When copying a file to a directory, the file should be accessible (read
+ write) by all members of the group that are allowed write access.

E.g., an 'admin' level user creating a new file /cfg/foo.cfg should
result in the file being owned by $LOGNAME:wheel with 0660 perms,
because /cfg is root:wheel.

Writing to already existing file, e.g., created by 'root' at first boot,
say /cfg/startup-config.cfg should be possible by all members of the
'wheel' group.  In this case thef file already exists as root:wheel and
any user trying to chgrp it will fail, this is fine.

Fixes #977

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-09 16:44:23 +01:00
Joachim Wiberg df1fc6f2d7 bin: copy: reduce confusion username vs user -> remote_user
For future readers, the user paramenter to the copy() function is
actually the remote user in any curl command.

Also, realign columns in infix_config[].

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-09 16:44:18 +01:00
Richard AlpeandGitHub 2ebcf26ede Merge pull request #975 from kernelkit/update-changelog
doc: update ChangeLog
2025-03-04 16:27:48 +01:00
Richard Alpe b1a77deadf doc: update ChangeLog
[skip ci]

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-04 16:21:15 +01:00
Richard AlpeandGitHub bce1b34873 Merge pull request #974 from kernelkit/bump-9pm
Bump 9pm submodule
2025-03-04 16:07:02 +01:00
Richard Alpe 91f31c00c3 Bump 9pm submodule
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-04 14:57:14 +01:00
Richard AlpeandGitHub 4b4ffdd14e Merge pull request #973 from kernelkit/export-9pm-proj-conf
test: pass 9pm project conf to test environment
2025-03-04 12:41:57 +01:00
Richard Alpe 50c83f1be7 test: pass 9pm project conf to test environment
Make the NINEPM_PROJ_CONFIG environment variable available for 9pm
inside the test env.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-04 11:03:11 +01:00
Richard AlpeandGitHub ee86d12dc2 Merge pull request #970 from kernelkit/fix-testreport-paths-again
test: fix image paths in test specifications (again)
2025-03-03 15:49:38 +01:00
Richard Alpe b388e080ad test: fix image paths in test specifications (again)
{topdoc} is needed for asciidoctor to find the image during test
report generation.

This is the same functional change as 02d8288863 but with the
generation script actually updated. This was forgotten in the last
commit.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-03-03 14:11:44 +01:00
Joachim WibergandGitHub 6e630018df Merge pull request #969 from kernelkit/bump-finit
Upgrade Finit to v4.10
2025-03-03 07:01:50 +01:00
Joachim Wiberg 9de5e5b802 package/finit: bump to v4.10
ChangeLog: https://github.com/troglobit/finit/releases/tag/4.10

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-03-03 04:17:30 +01:00
Joachim WibergandGitHub 399d3c365d Merge pull request #967 from kernelkit/misc
Miscellaneous fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:16:59 +01:00
Joachim Wiberg 3867abe4da doc: update ChangeLog
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:14:25 +01:00
Joachim Wiberg 90d2ae3868 doc: update restconf section with some more examples
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:10:29 +01:00
Joachim Wiberg 581d1742e5 package/finit: bump to v4.10-rc2
ChangeLog: https://github.com/troglobit/finit/releases/tag/4.10-rc2

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:10:29 +01:00
Joachim Wiberg 172d7607bb statd: add missing .pid file, used for readiness signaling
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:10:28 +01:00
Joachim Wiberg 62a4b48679 patches/openresolv: drop unused patches
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:10:28 +01:00
Joachim Wiberg 3e07c9a960 Fix missing /etc/resolv.conf when starting with failure-config
Turns out the root cause for the odd log message in #896 was that the
system did not properly call `resolvconf -u` when starting in failure
mode.

This patch simplifies the code by moving all `resolvconf -u` calls to
the same Finit task.  Ensuring it is first launched when confd has
successfully consumed any configuration at boot, and then every time
a static DNS server is added.  (The udhcpc client script already call
`resolvconf -u` when dynamic DNS servers are learned.)

Fixes #896

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:10:27 +01:00
Joachim Wiberg 05c197c457 patches/avahi: improve log message in chroot communication
The following log message does not stem from an error in setting up the
chroot, but from the internal communication with the chroot.  This patch
adds the crucial missing file name in the log message.

  avahi-daemon[3590]: chroot.c: open() failed: No such file or directory

So that when the user sees this message, e.g., with "/etc/resolv.conf"
as the arg. to open(), they can be certain; "ah, no a biggie, we have
not created that file yet!"

Issue #896

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 16:10:24 +01:00
Jon-Olov VatnandGitHub 77c321daa3 Merge pull request #968 from kernelkit/sponsored
Add sponsor section to README
2025-02-28 15:05:30 +01:00
Joachim Wiberg 3d99af87d6 Add sponsor section to README
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-28 14:56:44 +01:00
Mattias WalströmandGitHub 28c2a4a6cc Merge pull request #966 from kernelkit/update-kernel
Upgrade linux kernel to 6.12.17 (LTS)
2025-02-28 11:11:06 +01:00
Mattias Walström 1bbd62c021 Upgrade linux kernel to 6.12.17 (LTS) 2025-02-28 09:29:28 +01:00
Joachim WibergandGitHub ecc0b63da2 Merge pull request #965 from kernelkit/split-test-to-suites
Split test to suites

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-26 17:32:29 +01:00
Mattias Walström 347e493542 test-spec: Update generated test specification documents 2025-02-26 13:09:16 +01:00
Mattias Walström 77499790ba test: Split up tests in logical suites
This fix #960
2025-02-26 13:09:16 +01:00
Joachim WibergandGitHub a960267c40 Merge pull request #959 from kernelkit/ipv6-fwd 2025-02-25 18:42:32 +01:00
Joachim Wiberg b9f3254ba7 doc: update ChangeLog for v25.02 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-25 17:32:21 +01:00
Joachim Wiberg 266f18bbeb doc: misc. cleanup
Either indent by four spaces or use backticks.  Depending on the output
generator they may apply different styling though.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-25 17:31:32 +01:00
Joachim Wiberg b70129f178 Fix #785: disable global IPv6 fwd by default
Enabled by user enabling IPv6 forwarding on any interface.  This change
also enables net.ipv6.conf.all.accept_ra (=2) to accept any IPv6 route
advertisements even when acting as a router.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-25 17:31:32 +01:00
Richard AlpeandGitHub 888f0c4207 Merge pull request #963 from kernelkit/fix-testreport-paths
test: fix image paths in test specifications
2025-02-25 13:53:36 +01:00
Tobias WaldekranzandGitHub 88fa47c664 Merge pull request #955 from kernelkit/lingering-containers
Lingering containers
2025-02-25 13:41:55 +01:00
Richard AlpeandGitHub 2ecc2c3602 Merge pull request #962 from kernelkit/security-policy
.github: add security policy (SECURITY.md)
2025-02-25 13:01:45 +01:00
Richard Alpe 02d8288863 test: fix image paths in test specifications
{topdoc} is needed for asciidoctor to find the image during test
report generation.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-02-25 12:58:16 +01:00
Richard Alpe d1dde5406e .github: add security policy (SECURITY.md)
This file is interpreted by Github.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-02-25 10:04:06 +01:00
Joachim Wiberg fd7b4bbe39 doc: update ChangeLog for v25.02 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:19 +01:00
Joachim Wiberg c28ea1db19 doc: refresh container documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:19 +01:00
Joachim Wiberg d68dacdc80 test: new test, verify volume content is not lost
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:18 +01:00
Joachim Wiberg 91f0094048 test: add missing path to container images
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:18 +01:00
Joachim Wiberg 5660f6239d test: refine container bridge test
The phys container test verifies custom mounts, so let's refine and
consolidate this test to focus on docker bridge features.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:17 +01:00
Joachim Wiberg 58cf5abf0b test: verify modifying a running container takes
Add new test step that adds a content mount to /var/www/index.html to
verify that changes to a running container are activated.

This test pass was previously part of the container bridge test, but
was moved here to allow that test to focus on bridge specific checks.

Issue #930

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:31:17 +01:00
Joachim Wiberg fc32d8a9db container: add meta data to container shell script
For tasks like upgrade we need, e.g., the image URI.  Instead of
guessing where on the container command line the image is, use a
meta-data field in the container shell script.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:24:58 +01:00
Joachim Wiberg 4b2f140140 container: add support for running commands inside container
- More logging when deleting a container
 - Update 'exec' and 'shell' commands to support running commands

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:22:15 +01:00
Joachim Wiberg 67cb307f2d container: refactor cleanup stage to use Finit cleanup:script
Containers in Infix are read-only, any persistent data is either stored
in volumes or content mounts.  To prevent lingering containers, as have
been seen on some test systems, we move cleanup stage from confd to use
the Finit cleanup:script mechanism.

The resulting code is simpler, shorter, and easier to debug and use.

As an added benefit, confd no longer prunes "unused" volumes by itself
on (any!) reconfiguration event, which with the new container life cycle
in Infix was quite fragile.  Instead the CLI command 'container prune'
is extended with 'podman volume prune', which coincidentally the help
text already alluded to.

This patch requires Finit v4.10-rc1, or later.

Fixes #902

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:22:15 +01:00
Joachim Wiberg 3811df9ab2 container: refactor setup stage to use Finit pre: script
When updating a container configuration we need to rerun the setup stage
of the container.  However, a run/task in Finit only runs once for each
runlevel, meaning changes at runtime of a container was broken.

This is a refactor of the container script to allow it to also run as a
pre:script in the Finit setup stage of a sysv/service.  Also included is
a fix to the timeout/retry handling in case the container setup fails.
We must call `read -t 60` *before* calling `ip monitor`, otherwise it
will not be called until `ip monitor` returns.

This patch requires Finit v4.9, or later.

Fixes #930

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:22:14 +01:00
Joachim Wiberg 53d0995d0c container: fix check if image exists already
- Rename local variables
 - Extract image name, using basename, for podman image exists

Fixes the following syslog error message:

    root@foo:~$ podman image exists docker://ghcr.io/kernelkit/curios:edge
    Error: unsupported transport "docker" for looking up local images

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 22:22:14 +01:00
Joachim Wiberg 7a692fd57d busybox: sync and add timeout tool
- Add missing tool: timeout
 - Add extra flags to sync
 - Allow wc to work with large files
 - Update defconfig sync -> enable PAM

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 21:56:46 +01:00
Joachim Wiberg 73e1c158f5 confd: minor, rearrange for readability
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 21:56:46 +01:00
Joachim Wiberg ab3b389f69 test: set up duts in parallel
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 21:56:46 +01:00
Joachim Wiberg 417d48f015 test: update topology to new syntax
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 21:39:35 +01:00
Joachim Wiberg b6aa604cdd package/finit: bump to v4.10-rc1
ChangeLog: https://github.com/troglobit/finit/releases/tag/4.10-rc1

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 21:39:28 +01:00
Tobias WaldekranzandGitHub 0dbf99cc82 Merge pull request #958 from kernelkit/upgrade-kernel
Upgrade linux kernel to 6.12.16 (LTS)
2025-02-24 10:53:45 +01:00
Mattias Walström 7127caf6b5 Upgrade linux kernel to 6.12.16 (LTS) 2025-02-24 09:15:12 +01:00
Joachim WibergandGitHub 638862d268 Merge pull request #957 from kernelkit/misc
misc fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 09:13:53 +01:00
Joachim Wiberg 2d7dedf79c doc: update ChangeLog for v25.02
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-24 05:41:34 +01:00
Joachim Wiberg f690cd216c Fix #923: drop default route for IPv4 autoconf
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-23 16:06:29 +01:00
Joachim Wiberg 6a5bf66a42 Fix #956: skip chown() on running-config, not applicable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-23 16:01:58 +01:00
Tobias WaldekranzandGitHub 5707711d84 Merge pull request #926 from kernelkit/test-doc
Create test/README.md
2025-02-22 12:16:33 +01:00
Tobias WaldekranzandGitHub 5b3eb23aeb Merge branch 'main' into test-doc 2025-02-22 12:15:29 +01:00
Joachim WibergandGitHub 51987948ad Merge pull request #946 from kernelkit/admin-vtysh-privs
confd: ensure admin users have full access to vtysh

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-22 10:15:22 +01:00
Joachim Wiberg e70559a68d test: use doc/testing.md as README for directory
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-22 10:04:39 +01:00
Joachim Wiberg 83797ca19c confd: ensure admin users have full access to vtysh
Future Infix defconfigs for smaller system may exclude Frr and set all
routes directly in the kernel.  So failing to add a user to the frrvty
group should not cause an error, hence the new group_exists().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-22 09:24:44 +01:00
Joachim WibergandGitHub d82b3e51ea Merge pull request #953 from kernelkit/update-buildroot
Update buildroot to 2024.02.11

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-22 01:13:46 +01:00
Mattias Walström e03bd37660 Update buildroot to 2024.02.11
This is an important security release, fixing bugs
in OpenSSH, fixes: CVE-2025-26465 (ssh) , CVE-2025-26466 (sshd)
2025-02-21 14:54:35 +01:00
Tobias WaldekranzandGitHub ee26cec88a Merge pull request #952 from kernelkit/imx8mp-evk
i.MX8MP EVK Support
2025-02-20 21:52:09 +01:00
Tobias Waldekranz 88763034ed board: imx8mp-evk: Add 2025-02-20 14:39:46 +01:00
Tobias Waldekranz dad1c024aa confd: Support interfaces that detach from their PHYs when down
Some netdev drivers, e.g. the FEC found on many i.MX SoCs from NXP,
will detach from their PHYs when configured down.

This means that when confd tries to configure L1 settings for the link
before bringing it up, ethtool fails - since there is no PHY to talk
to.

For interfaces that behave this way, delay the configuration until
after NETDAG_INIT, when the interface is brought up. This is not
optimal, since we are generating needless noise for the link partner,
which is why we only fall back to it as a last resort.

Fix #951
2025-02-20 14:39:05 +01:00
Tobias Waldekranz f92d3846db confd: Let products declare quirks of particular interfaces
Ideally, all drivers should behave the same. Alas, that is not the
world we live in. For quirks that we can not reliably probe for in any
other way, let products supply a JSON file that declares them.
2025-02-20 14:35:50 +01:00
Tobias WaldekranzandGitHub ffab761274 Merge pull request #948 from kernelkit/update-kernel
Update kernel to 6.12.14 (LTS)
2025-02-17 20:55:46 +01:00
Mattias Walström b4c648229a Update kernel to 6.12.14 (LTS) 2025-02-17 20:08:26 +01:00
Joachim WibergandGitHub 1ca7acda14 Merge pull request #943 from kernelkit/update-doc
Update Processes Documentation

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-17 18:30:25 +01:00
Ahmed Karic 8f30f88967 doc: Update developers-guide
- communicate regarding YANG
- add StatD with focus on Yanger
- add test dev procedures

[ci skip]

Resolves #934
2025-02-17 14:31:30 +01:00
Ahmed KaricandGitHub 8eaaaa9d38 Merge pull request #933 from kernelkit/doc-update-yang2ethtool-mapping
Update documentation for YANG to Ethtool counter mappings
2025-02-17 12:47:45 +01:00
Mattias WalströmandGitHub 4e0ad1df1b Merge pull request #944 from kernelkit/coverity-fixes
Coverity fixes
2025-02-16 12:36:56 +01:00
Joachim WibergandGitHub dc3b78e678 Merge pull request #945 from kernelkit/repeat-in-9pm 2025-02-16 11:33:46 +01:00
Tobias Waldekranz 4d7dde5366 test: bridge_stp_basic: Skip on multi-chip mv88e6xxx systems
Until we fix kernelkit/linux#2, tag the affected nodes as providing
"broken-stp", and skip this test on those rigs.
2025-02-16 10:55:03 +01:00
Tobias Waldekranz 3c0679991d confd: bridge: Refactor init_snippets() to avoid unreachable code
Fix coverity CID 464653
2025-02-16 10:55:03 +01:00
Tobias Waldekranz fe741a92f3 confd: Explicitly return OK when registration is successful
Fix coverity CID 464654
2025-02-16 10:55:03 +01:00
Tobias Waldekranz f6879e24cc bin: Fix unchecked return codes
Fix coverity CID 425560
2025-02-16 10:55:03 +01:00
Tobias Waldekranz 7e252ba941 confd: Fix unchecked return codes
Fix coverity CIDS:
- 464651
- 464652
- 464655
- 507413
- 507414
2025-02-16 10:55:03 +01:00
Tobias Waldekranz 46d5e750d7 confd: Simplify GRE and VXLAN iface setup
CID 507415 from coverity was the origin for this change. As it turns
out, the unreachable MAC address generation for VXLANs was hidden by
the generic setup (netdag_gen_link_addr()) saving the day. That is
likely something we want to phase out though, so the VXLAN code should
stand on its own.

Align the GRE code while we're here, because why not? :)
2025-02-16 10:51:27 +01:00
Joachim Wiberg 5988249f84 test: 9pm: bump for new --repeat option
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-16 10:29:44 +01:00
Joachim WibergandGitHub 7aee2600ba Merge pull request #942 from kernelkit/fix
Bump Finit to fix flaky DHCP server subnets test

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-15 08:14:49 +01:00
Joachim Wiberg 6f99a9c2dc package/finit: bump to v4.9
Primarily fixes issue with DHCP server multiple subnets test, which
triggers an ordering issue between reconfiguration of dnsmasq and the
`initctl reload` command.

For the full ChangeLog, please see:

   https://github.com/troglobit/finit/releases/tag/4.9

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-15 07:21:01 +01:00
Tobias WaldekranzandGitHub eee1ce32fa Merge pull request #940 from kernelkit/remove-etherlike
Remove etherlike
2025-02-14 21:28:46 +01:00
Joachim Wiberg d9f2f2c8f9 confd: refactor core_post_hook()
- Reduce complexity
 - Change type, simplify
 - Allow errors from initctl

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-14 13:50:47 +01:00
Mattias Walström 31d0f79a10 Migrate configuration for etherlike
Migrate infix-if-type:etherlike in configuration to infix-if-type:ethernet
2025-02-14 09:52:37 +01:00
Mattias Walström b290e44318 Remove interface type Etherlike
Instead check if the interface support autonegotion
before setting it to an interface.

This fix #877 and fix #584
2025-02-13 20:27:01 +01:00
Mattias Walström 2d806de2cd yanger: Refactor how ethtool is read from interfaces
Upgrade ethtool to get json support for main command:

ethtool --json eth1
2025-02-13 20:27:00 +01:00
Tobias WaldekranzandGitHub c5db34b491 Merge pull request #873 from kernelkit/lag
Add support for static & lacp link aggragetes
2025-02-13 09:23:44 +01:00
Tobias Waldekranz 3d816d2525 linux: Import mv88e6xxx standalone LAG fix 2025-02-12 23:22:11 +01:00
Tobias Waldekranz fb394db981 test: lag_*: Ensure that links making up a LAG are compatible
Do not allow the topology matcher to setup a LAG where one link is
running at 10G while the other one runs at 1G, since the bond will
never use the 1G port as long as there the 10G link is up.
2025-02-12 23:22:10 +01:00
Tobias Waldekranz da39855cec test: infamy: Allow tests to refine the topology matching process
To run LAG tests on hardware, we have to make sure that the chosen
links are running at the same speed.  We do not want to require a
specific link speed from the logical topology, as the real requirement
is merely that the two (or however many) links are of the _same_
speed, not any _particular_ speed.

Rather than having to complicate the topology matcher, let it take
care of the common pattern of matching requirements to provided
features, then let tests pass custom node/edge matchers for the
complicated cases.
2025-02-12 23:22:09 +01:00
Joachim WibergandTobias Waldekranz a6b79857db doc: update ChangeLog, static+lacp link aggregation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz f1271f28b9 doc: new section, Link Aggregation (updated images)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz f62900699a doc: add logo and update ingress
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz cf16efe499 test: new test, verify degraded link aggregate members in LACP mode
Verify connectivity from host to the second DUT via the first, over a
link aggregate.  Both aggregate member links are connected to a TPMR
link breaker to hide link down from the DUTs.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 4260d24143 test: new test, verify basic lag setup
Verify connectivity from host to the second DUT via the first, over a
link aggregate.  The lag starts in static mode and then changes to an
LACP aggregate.  This verifies not just basic aggregate functionality,
but also changing mode, which is quite tricky to get right.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 3ef1da1096 test: minor cleanup using new APIs
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz a90a39e8d8 test: infamy: allow easy debugging of differences in config data
Unclear if the libyang merge operation actually does it's job of merging
all the data properly in the restconf backend.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz dc5c7732d7 test: infamy: return None if port doesn't exist
Follow-up to e4535aa, allowing tests to be even simpler.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 5bf9200880 test: infamy: drop debug message breaking tap output
When first starting up the YANG models are downloaded.  Initially all
were printed on the test console, so this was later changed to become
a sort of progress output.  However, that broke tap output, causing a
missing leading '#' for the final "YANG models downloaded." message.

Thist patch drops the output entirely from the netconf transport, it
was never added to the restconf transport.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz f9b155b49f test: infamy: use decorator to reduce boilerplate for test args
Example use:

    @infamy.test_argument("--mode", help="one of 'static' or 'lacp'")
    class TestArgs(infamy.ArgumentParser):
        pass

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 9782ac9afa test: update virt topologies, add lag
This commit adds two SVGs for previewing the virtual test topologies.

quad: fix a lot of copy-paste mistakes, rename nodes and ports to their
      correct names.  Replace shell comments with C++ style comments,
      not all tools, e.g., dotty, support shell comments.  The neato
      absolute positioning has also been fixed to make it possible to
      see all the edges, to facilitate this the used ports have been
      swapped around a abit.  Colors are used according to the schema
      agreed on for tests.  Finally, a second link for lag tests have
      been added between dut2 and dut3.

dual: coloring similar to quad, update to new edge attribute matcher.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 773683bfd5 test: spec: catch and format dot file errors
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 3dbb1759eb klish-plugin-infix: need CAP_NET_ADMIN for some data
When reading lag status, like LACP actor system prio, port key,
etc., we need CAP_NET_ADMIN.  See net/bonding/bond_netlink.c

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz d7895d5c9c confd: handle dup calls to dagger_add_dep()
Some callbacks may run twice, e.g., lag_gen_ports().  Check if the link
already exists, and is the same, then we can exit silently.  However, in
case the link exists and does *not* point to the same target, we log an
error with current target for the post mortem.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 78499757b0 confd,statd: add support for link aggregates
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz ec2e161649 confd: add link aggregate model, lacp and static
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 18d8c439bd confd: drop unused yang import
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 1ca11f1fe7 statd: yanger: ignore 'podman' errors when built without containers
- Avoid unnecessary error messages in syslog when build w/o containers
 - Simplify log messages slightly

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz b70d0015a6 confd: silence any error from dagger 'ls *.tar.gz'
Do not log error if no tarballs exist.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 6a417f2f23 package/confd: drop unnecessary conditional
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz f212f0cc16 board/common: ensure virtio ports have an initial speed/duplex
The speed/duplex of a virtio interface is not eenforced in any way.  The
driver initializes them to unknown/unkown:

https://github.com/torvalds/linux/blob/dccbe2047a5b0859de24bf463dae9eeea8e01c1e/drivers/net/virtio_net.c#L5375-L5381

It is however possible to set them since there are kernel subsystems
that rely on them, e.g., miimon in the bond driver, which in turn is
required for use with the 802.3ad (lacp) mode.

If we do not initialize speed/duplex the miimon will complain in the log
on virtual test systems every second:

Dec 13 22:34:08 laggy kernel: lag0: (slave e1): failed to get link speed/duplex

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 01d07b4942 utils: rename sysrepo-load-modules.sh -> srload
Simplify name, follow new srop tool naming convention.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 039cb5db74 utils: fix linter warnings, simplify, and improve log messages on update
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Joachim WibergandTobias Waldekranz 65bce0378e .github: install libite from git
Latest libite-dev in Ubuntu does not have the latest libite features
needed by confd et al.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-12 23:21:08 +01:00
Ahmed Karic 91cef6d57b doc: Provide remaining mappings for eth-counters
[skip ci]

Fixes #770
2025-02-12 13:53:09 +01:00
Ahmed KaricandGitHub f3da31b18c Merge pull request #931 from kernelkit/verify-lldp
Verify LLDP administrative states
2025-02-12 12:41:54 +01:00
Ahmed Karic af1f173497 test: Verify LLDP admin status 2025-02-12 10:41:46 +01:00
Ahmed Karic 14fede3e56 statd: Add LLDP operational data retrieval
Enable statd to fetch LLDP neighbor data via lldpcli for verifying
LLDP admin status. Currently, only chassis ID and chassis ID subtype
are retrieved.
2025-02-12 10:41:46 +01:00
Tobias WaldekranzandGitHub d3bfbb57b6 Merge pull request #937 from kernelkit/update-kernel
Update linux kernel to 6.12.13 (LTS)
2025-02-11 21:58:00 +01:00
Tobias Waldekranz 3203ee925a confd: Add missing interface type for loopback 2025-02-11 20:37:03 +01:00
Tobias Waldekranz fae1265587 confd: Refactor custom-phys-address setup
The management of custom-phys-address was made more complicated by the
fact that physical interfaces require restoring the permanent address
when a custom setting is removed.

Simplify this by moving the restoration to the delete path, so we only
have to worry about if there is a custom mac or not during interface
setup.

Also:
- Fix some legacy naming on *_gen() functions
- Fix custom-phys-address on dummy interfaces
2025-02-11 20:37:02 +01:00
Tobias Waldekranz 97f3db8fdb confd: Always generate a valid interface DAG
Fix #938

Before this change, interface dependencies were only setup when
interfaces were created. This led to problems in flows like this:

1.
    configure
        set interface br0
        set interface br0.10
        leave

2.
    configure
        set interface dummy0
        leave

2.
    configure
        no interface br0
        no interface br0.10
        leave

Since neither br0 nor br0.10 was created in (2), no dependencies were
setup. Because of that, when the deletion scripts from generation (2)
are generated when entering (3), dagger is free to execute them in any
order. This means that it may choose to remove br0 before br0.10,
which will mean that br0.10 is already gone when we try to remove it.

Therefore, make sure that we generate the full dependency graph on
every iteration.

Also, get rid of the need to keep on-disk state for VETH pairs, and
use the name as a descriminator for which side to create/delete.
2025-02-11 20:37:01 +01:00
Tobias Waldekranz a8b5120871 confd: Allow reconfigurations on dummy and gre interfaces
With the new iftype enum, we see that configuring an existing dummy or
gre interface types was wrongly classified as an error rather than as
a NOP.

Example, before this change, this was OK:

    configure
    set interface foo
    set interface foo ipv4 address 10.0.0.1 prefix-length 24
    leave

However, this was not:

     configure
     set interface foo
    +leave
    +configure
     set interface foo ipv4 address 10.0.0.1 prefix-length 24
     leave
    +<KABOOM>
2025-02-11 20:37:00 +01:00
Tobias Waldekranz c22339c2cd confd: Create an enumerator for interface types
This has multiple advantages:

- Less chances of typos is repeated "infix-if-type:foo" strings
  scattered throughout the code

- We can lean on GCC's `-Werror=switch` to make sure that iface
  specific logic always handles all types (which was not always the
  case - see follow-up commits)

- We can potentially create a `struct afspec_ops` in the future, which
  could then be indexed by this enum
2025-02-11 20:36:27 +01:00
Tobias Waldekranz b1830a36d4 confd: Remove unneeded nodes from the interface DAG
The only interfaces that would be in difs, but not in cifs, are
deleted interfaces. But these will be removed from the exit action of
the previous generation, and will never be referenced in the new
generation.
2025-02-11 14:46:31 +01:00
Mattias Walström 05510c5001 Upgrade Linux kernel to 6.12.13 (LTS) 2025-02-09 15:40:22 +01:00
Mattias WalströmandGitHub 343c465352 Merge pull request #935 from kernelkit/infix-crypto-types
Introduce infix-crypto-types
2025-02-08 18:19:16 +01:00
Mattias Walström 0cb2987de4 Introduce infix-crypto-types
To only show supported types, simpler when autogenerate web/cli.
2025-02-08 13:40:35 +01:00
Mattias WalströmandGitHub 7d646c9494 Merge pull request #929 from kernelkit/gh-dl-artifact
utils/gh-dl-artifact: Accept any prefix for tar.gz package
2025-02-04 20:16:52 +01:00
Mattias Walström 395b21c693 utils/gh-dl-artifact: Accept any prefix for tar.gz package
When brandlabling this may not be infix-, rather vendor-,
 use *- for now.
2025-02-04 19:36:57 +01:00
Richard AlpeandGitHub 6ef3ad9020 Merge pull request #915 from rical/fix-history-in-gh-actions
Fix history in GitHub actions
2025-02-04 15:00:44 +01:00
Tobias WaldekranzandGitHub a608c4a36d Merge pull request #928 from kernelkit/update-generate-defconfig
generate-defconfig.sh: Allow to have multiple change configurations
2025-02-04 14:24:37 +01:00
Richard Alpe e48da5bb21 Bump 9pm submodule
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-02-04 09:40:16 +01:00
Richard Alpe f389a1f087 .github: don't shallow-clone main project
The test report needs to lookup the last tag.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-02-04 09:40:11 +01:00
Tobias WaldekranzandGitHub 84521ea9b5 Merge pull request #927 from kernelkit/qemu-speedup 2025-02-03 21:57:45 +01:00
Mattias Walström 4ba43e2ddd generate-defconfig.sh: Allow to have multiple change configurations
Example: one common.conf and one arch-specific config
2025-02-03 20:19:27 +01:00
Joachim Wiberg 3606bc05cf board/common: use fast pointer authentication emulation for aarch64
Pointer authentication emulation is expensive.  By default, QEMU use the
standard cryptographic algorithm (QARMA5), which is very time consuming.

This commit switches to the fast implementation.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-02-03 16:06:19 +01:00
Mattias WalströmandGitHub 5e89d8ef3e Merge pull request #887 from kernelkit/dhcp-server
Add basic DHCP server support
2025-01-31 15:11:07 +01:00
Joachim Wiberg 028fc578b1 doc: update changelog, dhcp server support
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg 52e957d47f doc: add documentation for DHCPv4 server
Fixes #798

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg 95cfcaa2fe confd: refactor dhcp server counters
Counters should follow the format from ieee802-ethernet-interface
model, which use:

 - in/out for Rx/Tx
 - plural from

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg 340330b75b confd: refactor dhcp client/server modeling of client-id
Instead of encoding hex data in regular strings, using an 'id:' prefix,
or guessing based on pattern in C code, we have decided for a breaking
change in the DHCP client model.

This commit introduces string and hex values for client-id in the models
for both DHCP client and server.  The *breaking* part of the changes are
strictly related to how a user pass binary data as colon-separated hex
digits.  The dedicated leaf node `client-id` is now reserved for string
values and the generic `list option` can be used to input user defined
string or hex values.  Even non-conformant client-id options can now be
encoded.  All described in detail in infix-dhcp-client.yang

The server model has been updated to be able to send generic options in
hex format, and the static host lease matcher for client-id now require
a 'str' or 'hex' modifier.

Note: dnsmasq is RFC compliant and will not match non-conforming option
      61 (client-id) even though the client can send such payload.

To increase test coverage, the server_host test has been updated to
check both string and hex client-id.  Matching on hostname is already
covered by other test(s).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg af8a90d651 confd: remap legacy dhcp client options to consolidated options
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg ee44da6272 confd: consolidate dhcp options between client and server
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg a5aba02ddd cli: handle case when dhcp server is not active
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg cb73ddf6bf test: update unit test with DNS resolver operational data
With support for dns resolver in place, the ietf-system output needs to
be complemented with additional data collected from both the dnsmasq and
openresolv subsystems.

System date taken from 'client3' in the Infix DHCP server-subnets test.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg e45fcfca41 test: new test, verify DHCP server with multiple subnets
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg 27dae1edf0 Add support for DNS resolver operational data
Example status output:

    "infix-system:dns-resolver": {
      "options": {
        "timeout": 3,
        "attempts": 5
      },
      "search": [
        "example.com",
        "foo.com"
      ],
      "server": [
        {
          "address": "1.2.3.4",
          "origin": "static"
        },
        {
          "address": "192.168.2.1",
          "origin": "dhcp",
          "interface": "e5"
        }
      ]
    }

Fixes #510

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg d1e1c9ad33 test: new test, verify static dhcp host leases
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg d28fff67f2 confd: work around limited client-id handling in udhcpc
Fixes #899

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg 62d539c424 test: new test, verify basic dhcp server
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
Joachim Wiberg 3c1e9f3199 confd: reduce dhcp-server to minimal scope
- dnsmasq:
   - allow listening to all interfaces again to serve DHCP leases
   - disable most of the default DHCP options, keep broadcast and
     netmask because when dnsmasq can infer these they are better
     than breaking networking for clients -- note, they can still
     be overridden from global/subnet/host scope -- and for relay
     setups they need to be supplied anyway
 - confd:
   - drop per-interface dnsmasq, although practical for many use-cases,
     having a per-subnet focused server means improved integration with
     future stand-alone dhcp relay setup
   - implement suggested, simplified, yang model

Fixes #703

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:28 +01:00
Joachim Wiberg b196194e5f test: rename dhcp client tests dhcp_ -> client_
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 5ee78e28ad confd: add support for setting fqdn hostnames
The hostname leaf in ietf-system.yang defines it as an fqdn.  This patch
adds support for splitting the host and domain parts to set them in
Linux according to hosts(5).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg bcfd3d4a5b confd: dhcp-client hostname option fixes
A DHCP client should be able to request a DHCP server assigned hostname,
*and* advertise its current hostname (as a client-id).  This change lets
the client do either, instead of always assuming the latter.

Alt 1)
     option id:hostname                        => request hostname

Alt 2)
     option id:hostname, value:<STRING | auto> => advertise hostname

This also fixes a bug where the hostname sent to the server could be the
old hostname.  The fix picks up any new hostname directly from sysrepo.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg f86f184783 confd: rename dhcp-client option name -> id
For consistency with the new dhcp-server model, which has an option
value 'name', options are now referred to as id's or identifiers.

This means bumping the confd syntax version 1.3 -> 1.4 and adding a
migration script for existing dhcp-client configuration files.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Stefan SchlosserandJoachim Wiberg 60f459687c Add support for DHCP server/relay
This patch introduces a new yang yang model for DHCP server and relay,
using dnsmasq to provide the functionality on a per-interface basis.

Available DHCP options will be queried by confd on startup and can
then be configured in a flexible manner.

The DHCP option 82 feature has been realized by patching dnsmasq
(see patches/dnsmasq/2.90/0000-relay-agent-info.patch).

Signed-off-by: Stefan Schlosser <sgs@grmmbl.org>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 455c384164 confd: initial yang model for dhcp server
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 1fef35f77c confd: silence lldpcli errors in log when lldpd is disabled
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 8bc389987c confd: skip password node in operational data if locked/empty pwd
Skip the password node in operational data for entries that have locked
or empty password, otherwise the YANG validation (regexp) will fail.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg ee56ebc205 libsrx: replace sr_get_item() with sr_get_node()
The sr_get_item() function logs an error: "No data found for ..." in
case the referenced XPatjh does not exist, causing unnecessarily scary
log message about missing genkey elements in /ietf-keystore:keystore/

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 9198383742 test: spec: for new tests a Readme.adoc does not exist
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg b010ad04bf cli: fix "show ntp" command when ntp is not enabled
Instead of 'show ntp' =>

    Error, top level "ietf-system:system-state" missing

Try something nicer:

    NTP client not enabled.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 4458e03cd2 utils: add update operation and support multiple args for uninstall
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 4a37369750 yanger: add HOST.read_multiline() methods + missing file encoding
Similar to the run_multiline() method, sometimes files contain more than
one line and a common read_multiline() quickly becomes useful.  This is
currently only used by ietf-system for reading /etc/resolv.conf.head.

Also, fix pylint warning for missing encoding to all open() calls.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
Joachim Wiberg 7af75c0786 yanger: fix, no such argument 'file' to LOG.warning()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:55:35 +01:00
ael-botandGitHub 0fbe225b05 Merge pull request #922 from kernelkit/bump-frr
Bump FRR to 9.1.3
2025-01-31 13:55:20 +01:00
Mattias Walström 2405c002e4 Bump FRR to 9.1.3
This is only a bugfix release.

Full changelog since 9.1.2: https://github.com/FRRouting/frr/releases/tag/frr-9.1.3
2025-01-31 13:13:01 +01:00
Mattias WalströmandGitHub 1cc9e3c9c8 Merge pull request #920 from kernelkit/fix-storing-to-startup
Fix issue with storing authorized SSH key to startup
2025-01-30 18:26:18 +01:00
Mattias Walström a64c9695cc Fix issue with storing authorized SSH key to startup
The problem was that the sysrepo callback was never called,
except on update (not availible on startup)

This fix #777
2025-01-30 15:32:59 +01:00
Tobias WaldekranzandGitHub d9be0b3a64 Merge pull request #918 from kernelkit/changelog-869
Update ChangeLog.md
2025-01-30 13:39:58 +01:00
Tobias Waldekranz 8b4682ac8b Update ChangeLog.md
[skip ci]
2025-01-30 13:39:22 +01:00
Jon-Olov VatnandGitHub a975da2159 Merge pull request #916 from kernelkit/doc-console
Doc console and other management interfaces
2025-01-29 13:18:42 +01:00
Jon-Olov Vatn e483ddb487 Update support info, company name change
Company "Addiva Elektronik" is now named "Wires"
2025-01-29 12:32:48 +01:00
Jon-Olov Vatn 267c8e0103 Fix #787 Add doc on Mgmt via Console (and SSH and Web)
- Updating SSH information
- Adding Web services information (general, RESTCONF and Web Console)
- Adding Console information
  Generic info, and some updates w.r.t specific boards (baudrate, etc)
2025-01-29 12:27:48 +01:00
Ahmed KaricandGitHub 25f0d8ca2e Merge pull request #912 from kernelkit/various-test-updates
Various test updates
2025-01-28 15:17:15 +01:00
Tobias WaldekranzandGitHub be0edc00cc Merge pull request #913 from kernelkit/fix-bug-in-test-mode
Fix error when running 251+ reconfigurations (in test-mode)
2025-01-27 20:34:17 +01:00
Ahmed Karic dc393946ce test: split infix_services test into mdns and lldp
mDNS and LLDP tests should run independently to avoid interference.
Previously, mDNS tests were blocked due to LLDP's transmit interval
limitations. Moreover, mDNS operates at Layer 3, while LLDP operates
at Layer 2, making IP configuration unnecessary for LLDP tests.
2025-01-27 15:48:44 +01:00
Ahmed Karic 80a522ce08 test: update forgotten .adoc files 2025-01-27 15:48:44 +01:00
Ahmed Karic b3ad9e5693 test/infamy: add option to set interface up by default
Introduce a parameter in IsolatedMacVlans to set interfaces up by
default. This removes the need to manually bring the interface up
inside the addip function.
2025-01-27 15:48:44 +01:00
Mattias WalströmandGitHub cc8c917de1 Merge pull request #911 from kernelkit/update-doc
Update doc
2025-01-27 15:19:55 +01:00
Mattias Walström 2a3fcbacd0 Fix error when running 251+ reconfigurations (in test-mode)
The context was aquired but never released, this caused a lockup
in sysrepo.

This fix #861
2025-01-27 15:12:11 +01:00
Mattias Walström 5c9cf276df infix-services: ssh: add must expression on listen
Both address and port is required.
2025-01-27 14:14:24 +01:00
Mattias Walström 76203b392a infix-system.yang: Add proper documentation about SSH listen command 2025-01-27 14:14:24 +01:00
Mattias Walström 18913770fe Update Changlog 2025-01-27 13:17:24 +01:00
Tobias WaldekranzandGitHub 2f23baf745 Merge pull request #909 from kernelkit/update-kernel
Update kernel to latest LTS (6.12.11)
2025-01-24 22:20:49 +01:00
Tobias WaldekranzandGitHub a7ce8c2ab4 Merge pull request #910 from kernelkit/stp-operational
Operational data support for STP
2025-01-24 21:53:05 +01:00
Mattias Walström d7ac84cf99 Update changelog with kernel and buildroot changes 2025-01-24 21:35:16 +01:00
Mattias Walström 04b739b0bd Remove old (6.6.52) linux patches 2025-01-24 21:35:16 +01:00
Mattias Walström 131c0b1d4b Update kernel to latest LTS (6.12.11) 2025-01-24 21:35:16 +01:00
Mattias Walström f42c35d8ab kernel-refresh: Update defconfigs as well 2025-01-24 21:35:16 +01:00
Tobias Waldekranz 0187d62246 test: bridge_stp_basic: Add explicit prioritiy test 2025-01-24 16:48:16 +01:00
Tobias Waldekranz 01201708e3 test: statd: Update test data after moving STP port state 2025-01-24 15:17:13 +01:00
Tobias Waldekranz 986a28c891 confd: Avoid managing a finit user condition to start/stop mstpd
By declaring the service as manually configured, we can control it
from dagger (confd) without the indirection via a condition.

This has the benefit of mstpd being in the "stopped", rather than the
somewhat confusing "waiting", state when not running.

Fixes #890
2025-01-24 14:52:25 +01:00
Tobias Waldekranz 0bbcd7ec43 board/common: show: Add show stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz f9dacaa0ff klish-plugin-infix: Add show bridge stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 8f6a75806f yang: Add STP hello-time
This was an oversight in the original model, but was noticed in
review.
2025-01-24 14:52:25 +01:00
Tobias Waldekranz 05cb07c0ec cli_pretty: Add per-port status to show bridge stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz d6ace7cc73 cli_pretty: Add bridge-wide status to show bridge stp 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 9ef6d2d038 yang: Remove old STP port state from operational 2025-01-24 14:52:25 +01:00
Tobias Waldekranz c1e6f0c53b yanger: Provide per-port STP state 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 0e82c108bc yanger: Provide bridge-wide STP state 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 9427b6a655 yanger: Generalize converting time deltas to YANG dates
Make sure that we have one way of getting from Python's native
datetime to a YANG compatible format.
2025-01-24 14:52:25 +01:00
Tobias Waldekranz 6a09e2c797 yang: Define operational data model for per-port STP state 2025-01-24 14:52:25 +01:00
Tobias Waldekranz 3b0b38360c yang: Define operational data model for bridge-wide STP state 2025-01-24 14:52:25 +01:00
Tobias WaldekranzandGitHub 3b3fe18f9d Merge pull request #907 from kernelkit/provides-requires
Match on Edge Attributes when Mapping Topologies
2025-01-24 12:43:08 +01:00
Mattias WalströmandGitHub dedab8c2a2 Merge pull request #906 from kernelkit/fix-yanger
Yanger and CLI pretty fixes
2025-01-24 12:29:34 +01:00
Ahmed Karic 3e0b816351 test: Match on edge attributes when mapping topologies
Implemented logic to check if the system supports required services.
Logical edges with 'requires' fields are mapped only if physical edges
provide corresponding services. If not, the test is skipped.
This ensures that tests only run when the required services are available
in the test system configuration.

Fixes #654
2025-01-24 11:51:55 +01:00
Mattias Walström 3f8fae2f16 cli-pretty: show-interfaces: Refactor protocol type
now will *only* ethernet interfaces be protocol ethernet,
gretap will be protocol gretap and so on.
2025-01-24 10:56:58 +01:00
Mattias Walström 70bcebc451 yanger: Add oprational information about vxlan interfaces 2025-01-24 10:56:58 +01:00
Mattias Walström 6a384bf48b test: update verify_all_interface_types for collecting data
To collect vxlan interfaces and add some addresses to some interfaces
to increase coverage of unit_test (show interface)
2025-01-24 10:56:58 +01:00
Mattias Walström 10add98d90 yanger: Fix bug when collecting data 2025-01-24 10:56:58 +01:00
Mattias WalströmandGitHub a2257731ca Merge pull request #908 from kernelkit/update-buildroot
Update buildroot LTS to 2024.02.10
2025-01-24 10:23:05 +01:00
Mattias Walström 6be990f1bb Update buildroot LTS to 2024.02.10 2025-01-24 08:45:54 +01:00
Ahmed KaricandGitHub 370920e931 Merge pull request #882 from kernelkit/lldp-tx-interval
confd: Enable config for lldp tx interval
2025-01-23 14:45:48 +01:00
Ahmed Karic ee441e172d confd: LLDP upgrade to support per-port admin-status
This update enhances the LLDP configuration by enabling per-port
administration through the `admin-status` parameter. Users can now
individually enable or disable LLDP operation on specific ports.

Fixes #578
2025-01-23 13:16:40 +01:00
Tobias WaldekranzandGitHub 5e90bde8b9 Merge pull request #903 from kernelkit/yanger-missing-container-iface-fix
yanger: Handle the case when a container interface can not be found
2025-01-22 21:55:05 +01:00
Tobias Waldekranz 0b2f53e3b4 test: ssh_*: Wait for server start before further testing commences
On slow systems, we don't want test steps involving tools like scp or
ssh-keyscan to fail because the server had not come up yet.

Therefore, make sure that the server is ready to accept connections
before moving on to subsequent test steps.
2025-01-22 20:32:33 +01:00
Tobias Waldekranz 1fd55c484a test: ssh_key_authentication: Consolidate and mark static data
Use CAPTIALIZED names for static data and collect them at the top.

Make a note about for future readers about why a test called
ssh_key_authentication suspiciously does not enable the SSH service :)
2025-01-22 20:32:17 +01:00
Tobias Waldekranz 1d13c5ea9e test: infamy: Generalize netconf_syn() to test for any TCP service
Being able to check for a TCP based service is generally useful, not
only for NETCONF. Therefore, break it out to a separate function that
allows any port to be queried.
2025-01-22 20:16:47 +01:00
Mattias WalströmandGitHub 26303f5168 Merge pull request #901 from kernelkit/fix-memory-leaks
Fix memory leaks
2025-01-22 16:17:20 +01:00
Tobias Waldekranz 19c1f49fd3 test: Whitespace cleanup 2025-01-22 15:53:41 +01:00
Mattias Walström 5b8b1eec57 test: syslog: Convert from put_config_dict to put_config_dicts 2025-01-22 15:05:48 +01:00
Mattias Walström d83c333b2d generate-defconfig: Fix typo in script
Should not call merge_config.sh with -n parameter, this will result
in an invalid defconfig.
2025-01-22 15:05:48 +01:00
Mattias Walström 4598585d4a confd: Fix memory leaks in ietf-keystore and ietf-syslog 2025-01-22 15:05:48 +01:00
Tobias Waldekranz c2959cf41e yanger: Handle the case when a container interface can not be found
Due to #902 (which has not been root caused at this time), podman may
indicate the existance of an interface that yanger is not able to
locate in any namespace. Therefore, make sure that we verify that the
interface was actually found before trying to create the operational
data for it.
2025-01-22 14:11:37 +01:00
Tobias WaldekranzandGitHub a640460baf Merge pull request #895 from kernelkit/yanger
Yanger Interfaces Refactor
2025-01-22 10:27:44 +01:00
Tobias Waldekranz 5d6180a395 yanger: Improve option names and validation after review
Break up the --test parameter into either:

--capture: Write system command output to a local directory for later
           consumption by...
--replay:  Which can replay a previous capture

Rename --wrap-commands => --cmd-prefix
2025-01-22 09:44:52 +01:00
Ahmed Karic 28c0cee4e3 confd: Enable configuring LLDP tx interval
This change introduces the configuration of the tx-interval parameter
for the LLDP service, allowing control over the frequency of LLDP hello
messages. This improvement eliminates the need to toggle the interface
down and up to force the emission of LLDP packets in the test
environment.
2025-01-21 22:44:59 +01:00
Richard AlpeandGitHub 27bba2c47c Merge pull request #865 from rical/ci-generate-test-report
Generate 9pm Test Report
2025-01-21 20:35:09 +01:00
Richard Alpe 4753e35d7f test: add project topdoc to 9pm project config
Used when generating test specifications.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:12 +01:00
Richard Alpe 28f67ff608 test: add topdoc dir to all test specifications
This should be a non functional change. The idea is to use the topdoc
dir from 9pm when generating the test report.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:11 +01:00
Richard Alpe e1a033b97d test: add 9pm project config
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:10 +01:00
Richard Alpe 2b7d2b4005 test: add verbose flag to 9pm execution
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:09 +01:00
Richard Alpe 39de797b10 test: specify test specification in top suite
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:08 +01:00
Richard Alpe de9b1cdd2d CI: Generate and publish 9pm test report
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:07 +01:00
Richard Alpe f0c57da4ab test: bump 9pm submodule
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 15:02:05 +01:00
Mattias WalströmandGitHub b5218f7149 Merge pull request #893 from kernelkit/add-merge-script
Add script for merging defconfigs
2025-01-21 14:39:01 +01:00
Mattias WalströmandGitHub 7cb311b5bc Merge pull request #900 from rical/test-add-git-to-docker
test: add git to docker container
2025-01-21 14:21:52 +01:00
Richard Alpe 254c922254 test: add git to docker container
Intended to be used when fetching version information for the test
report.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-01-21 14:00:12 +01:00
Mattias Walström 4fb26b1119 Add script to merge defconfigs
Useful to only create a new image with only small diff with for example
aarch64_defconfig.

example:
If the only diff is the VENDOR, instead of KernelKit you want 'foobar'.
create a file with the change:
INFIX_VENDOR="foobar"

and call ./utils/generate-defconfig.sh -b aarch64_defconfig -c foobar-diff.conf -o configs/foobar_defconfig
2025-01-21 13:59:39 +01:00
Mattias WalströmandGitHub ad262459b7 Merge pull request #894 from kernelkit/upgrade-netopeer2
Bump sysrepo, netopeer,libyang and libnetconf2
2025-01-21 11:16:39 +01:00
Mattias WalströmandGitHub 71b89d06d7 Merge pull request #898 from kernelkit/fix-memory-leaks
confd: Fix memory leaks in ietf-system.c
2025-01-21 11:16:22 +01:00
Mattias Walström 72b3058774 confd: Fix memory leaks in ietf-system.c 2025-01-21 10:12:20 +01:00
Tobias Waldekranz 57c8d0cf1b test: statd: Add unittest for bridge-mdb 2025-01-20 13:44:14 +01:00
Tobias Waldekranz f4c9a57bb5 test: statd: Add unittest for ietf-{hardware,system} 2025-01-20 13:44:14 +01:00
Tobias Waldekranz 9879e8b685 test: statd: Add unittest for containers 2025-01-20 13:44:14 +01:00
Tobias Waldekranz beecff2acf test: statd: Refactor cli and yanger testing
Existing tests relied on manually captured system data from various
points in Infix's history, making them hard to extend as we add new
features.

Move to a new model where we:

To update a unit test:
1. Use Infamy tests to setup a DUT in a known state
2. Use yanger's wrapper mode to capture the system state needed to
   produce operational data for a set of YANG models
3. Use cli-pretty to create the expected output for a set of show
   commands

When running unit tests, we can then use the captured data to verify
that yanger and cli-pretty works as expected without the need for a
running Infix system - just like before.  The difference is that it is
now much easier to capture a new snapshot when the system evolves.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz 6f2face898 test: verify_all_interface_types: Add GRE tunnels
Ensure that all flavors of GRE tunnels can be configured. In addition
to the increased test coverage, it will also be useful as a basis for
collecting representative system state for CLI testing.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz ddc8282dd7 test: verify_all_interface_types: Add IP addresses
Having addresses configured is useful when using this test to collect
representative system state for CLI testing.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz c244042e55 test: verify_all_interface_types: Add bridge VLANs
Ensure that VLANs can be configured on VLAN filtering bridges. In
addition to the increased test coverage, it will also be useful as a
basis for collecting representative system state for CLI testing.
2025-01-20 13:44:14 +01:00
Tobias Waldekranz 78b7b34799 yanger: Break up ietf-interfaces implementation into modules 2025-01-20 10:56:56 +01:00
Tobias Waldekranz e397012394 yanger: Add support for connecting to remote hosts
Allow all host commands to be run with a prefix (e.g. `ssh
user@remotehost sudo`), such that yanger can be tested against the
current state of a remote system.

If a command wrapper _and_ a test directory is specified, the output
of all commands and files are recorded for use by a future test
execution.

Example:

1. Launch a `make run` instance and setup some config for which we
   want to test yanger and cli-pretty

2. Capture the output of all commands needed to produce the data for
   some YANG model:
   `yanger -t /tmp/ifs -w "ixll -A ssh qtap1 sudo" ietf-interfaces`

3. Kill the instance (we do not need it any more)

4. Test cli-pretty using the captured state:
   `yanger -t /tmp/ifs ietf-interfaces | cli-pretty show-interfaces
`
2025-01-20 10:56:56 +01:00
Mattias Walström 5cc73ab97c Bump sysrepo, netopeer,libyang and libnetconf2
A lot of changes in sysrepo, required to add extra patches (bugfixes) to sysrepo,
sysrepo-cpp and rousette.
2025-01-20 09:18:09 +01:00
Tobias Waldekranz be1b7cdf45 confd: Enable remote SSH access via IPv6 in {factory,failure}-config
The default was set to only accept connections from localhost when
connecting via IPv6. This was not caught in testing since the
test-config accepts connections from all hosts (::).

Accept connections from all hosts in all builtin configs. Inherit
test-config's service definition from factory-config, since we want
testing to be done as close as possible to what are users are running.
2025-01-17 14:33:41 +01:00
Tobias Waldekranz 41f3fe15a6 confd: Drop unsupported default-priority bridge port option 2025-01-17 14:33:41 +01:00
Tobias Waldekranz df3a55d6a0 ixll: Disable key checking for admin:admin sessions
This is a shorthand for the common case when we're attaching to a
random Infix device during testing, so don't bother with key checking.
2025-01-17 14:33:41 +01:00
Tobias Waldekranz 4e83520b0e ixll: Fix ping(8)s that require all options precede address
The default ping(8) shipped with alpine does not support `ping <addr>
-c1`, but happily executes `ping -c1 <addr>`. Therefore, make sure
that the address is always the last argument.
2025-01-17 14:33:41 +01:00
Tobias WaldekranzandGitHub 94cd526772 Merge pull request #888 from kernelkit/vxlan
Add simple VXLAN support
2025-01-15 10:36:00 +01:00
Mattias Walström 4782cee201 Add support for simple VXLAN tunnels
This is just a first step to add VXLAN tunnels, much more remains.
Implemented right now is as GRE, local, remote and a VNI.

Also refactor gre_basic and gre_bridged to generic tunnel tests,
the same test now tests VXLAN as well.
2025-01-14 14:31:21 +01:00
Mattias Walström 907401f6f2 generate_spec: Allow to run script manually and show all output 2025-01-14 13:43:59 +01:00
Mattias Walström 9a831217e4 test-specification: Add support for python f-strings in step and description
This is only availible for tests that require paramters. If the test have a
parameter --data the description and test steps can contain {data} which will
be replaced with tha actual data of the parameter data in the test specification.
2025-01-14 10:54:05 +01:00
Joachim WibergandMattias Walström 1aab75d86a test: spec: remove .tmp files when done
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-13 20:16:37 +01:00
Tobias WaldekranzandGitHub 147cb713ed Merge pull request #884 from kernelkit/test-spec-ng
Test specification refactor
2025-01-11 23:40:06 +01:00
Mattias Walström 12b6146551 Add new generated specification files 2025-01-10 21:42:10 +01:00
Mattias Walström 29031be4e9 test-specification: Generate test specification from suite file
The suite can also contain meta data for the test specification,
One meta data that is implemented is title, which is used when the
same test code is used twice with parameters.

Also if a test case should not be present in the test specification
for some case. You can add specification: False as meta data.
2025-01-10 21:42:10 +01:00
Mattias Walström b2db59f3bc infamy: Add support for parameters to tests
All test added parameters is required and no default behaviour is allowed.
2025-01-10 21:40:42 +01:00
Tobias WaldekranzandGitHub cf129d1f9c Merge pull request #883 from kernelkit/yanger
Yanger Modularization
2025-01-10 11:21:35 +01:00
Tobias Waldekranz 41b96e8a01 utils/ixyang: Simplify linting of infix YANG models
Usage examples:

Run yanglint on all infix models:

    ixyang check

Lint a single model:

    ixyang lint infix-interfaces

Dump a tree of ietf-interfaces with all infix augments:

    ixyang lint infix-interfaces ietf-interfaces -- -f tree
2025-01-10 10:12:22 +01:00
Tobias Waldekranz 805ddf6c92 utils: Make srop's output directory resolution reusable 2025-01-10 10:12:22 +01:00
Tobias Waldekranz 547a9cd632 yanger: Remove dead code remaining after modularization 2025-01-10 10:12:22 +01:00
Tobias Waldekranz 2ec226640e yanger: Move ietf-{interfaces,routing} implementations to separate modules
Should this have been two commits: yes.

Should we spend time on splitting them after the fact because yours
truly dropped the ball: no.
2025-01-10 10:12:22 +01:00
Tobias Waldekranz a0e4e813dd yanger: Move ietf-ospf implementation to separate module 2025-01-10 09:57:40 +01:00
Tobias Waldekranz 8812ae7052 yanger: Move ietf-hardware implementation to separate module 2025-01-10 09:57:40 +01:00
Tobias Waldekranz 28bf2d6c3c yanger: Move infix-containers implementation to separate module 2025-01-09 23:59:20 +01:00
Tobias Waldekranz dadf0e2d16 yanger: Start the modularization process with ietf-system
The yanger source grown significantly, code is disorganized, the
namespace is all over the place, etc.

Take a stab at remedying the situation by splitting out the individual
YANG models in separate Python modules, starting with ietf-system.
2025-01-09 23:59:20 +01:00
Tobias Waldekranz c4a79766b7 statd: Make sure subpackages in python packages are distributed
Rather than explicitly defining the sources, specify the package names
and let poetry figure out the details. Otherwise, subpackages are not
included, which we want to start using in yanger.
2025-01-09 16:23:26 +01:00
Tobias Waldekranz 385eab2016 statd: Ignore generated Python byte code files
When interactively running, for exampe, yanger interactively from the
source tree, we end up with compiled files in our working tree. Make
sure to ignore these.
2025-01-09 16:02:43 +01:00
Tobias Waldekranz bc33d8bc8a confd: Reactivate supported interface counter in-total-frames
This was always supported, but was accendentally marked as
not-supported.
2025-01-09 16:02:36 +01:00
Tobias Waldekranz 061fa5fc72 confd: Add missing module dependencies
These are also provided by other packages (sysrepo, netopeer, etc.)
but having them in here allows us to lint all of our own models
without the need for a build tree.
2025-01-09 16:02:36 +01:00
Tobias WaldekranzandGitHub ac0acfe7c1 Merge pull request #867 from kernelkit/stp
STP
2025-01-08 11:25:14 +01:00
Tobias Waldekranz f3f313bb98 infamy: Fix default transport selection
Using `sys.argv[0]` does not quite achieve the effect we want, namely
that any (test-case, $PYTHONHASHSEED) tuple should always default to
the same transport.

For example, the following two examples should always use the same
transport:

    $ make PYTHONHASHSEED=1337 test-sh
    infamy0:test$ ./case/ietf_system/hostname/test.py

    $ make PYTHONHASHSEED=1337 test-sh
    infamy0:test$ cd ./case/ietf_system/hostname
    infamy0:hostname$ ./test.py

But, since their argv[0]'s are different, they don't.

Therefore use the _last two components_ of argv[0]'s full path
instead. This should:

- Spread the allocation over an entire suite run, since the
  penultimate component is usually the test name.

- Keep the allocation stable when test code is modified (which is
  common during debugging of failing tests)

- Avoid instabilities stemming from the local storage location (i.e.,
  home directory names etc.)
2025-01-08 10:14:46 +01:00
Tobias Waldekranz 3ef40031dd test: bridge_stp_basic: Add 2025-01-08 10:14:46 +01:00
Tobias Waldekranz 44b60956a8 test: upgrade: Add .gitignore for package symlink 2025-01-08 10:14:46 +01:00
Tobias Waldekranz e4535aa856 test: infamy: Make it easier to resolve mapped port names
The somewhat clumsy construct of resolving a logical port name to its
physical counterpart has been with us from Infamy's inception:

    _, physical_port = env.ltop.xlate(logical_node, logical_port)

This is needlessly verbose. Since devices already have access to the
mappings which applies to it, make them easy to access:

    target = env.attach("target")

    # Get physical port names via the subscript operator
    target["data0"]
2025-01-08 10:14:46 +01:00
Tobias Waldekranz 343400c5fe test: infamy: Default to attaching to DUTs via the "mgmt" port
This convention is now well established, so it seems silly to have to
repeat it in every test.
2025-01-08 10:14:46 +01:00
Tobias Waldekranz bfeeade43b confd: bridge: Add STP/RSTP support 2025-01-08 10:14:46 +01:00
Tobias Waldekranz b425edffce libsrx: Add lyx versions of lyd_find_xpath
- Helper to get a set of nodes, using a formatted path
- Helper to get a single node, using a formatted path
2025-01-08 09:57:55 +01:00
Tobias Waldekranz f041d009b5 defconfig: all: Build mstpd 2025-01-08 09:57:55 +01:00
Tobias Waldekranz 26d06bd13b skeleton: mstpd: Let /sbin/bridge-stp add/remove bridges 2025-01-08 09:57:55 +01:00
Joachim WibergandTobias Waldekranz 9d51470ee2 utils: add srop, for operating on target sysrepo db
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-08 09:57:55 +01:00
Tobias WaldekranzandGitHub 49a003088b Merge pull request #881 from kernelkit/gre-tunnels
GRE tunnels
2025-01-07 17:02:37 +01:00
Joachim WibergandMattias Walström c099d887af Add support for GRE tunnels
Basic support GRE and GRETAP tunnels both for IPv4 and IPv6.
Limited support right now, only possible to configure local
ip address and remote ip address.
2025-01-07 15:33:37 +01:00
Mattias Walström 08990556e2 confd: Fix typo in veth code
Should check if any node under veth is changed instead
of peer (does not exist).
2024-12-20 19:47:18 +01:00
Mattias WalströmandGitHub cd5b076751 Merge pull request #879 from kernelkit/update-buildroot
Update buildroot to 2024.02.9
2024-12-20 19:46:23 +01:00
Mattias Walström 081f8e8412 Update buildroot to 2024.02.9 2024-12-20 14:28:02 +01:00
Mattias WalströmandGitHub 465d8cbc82 Merge pull request #838 from kernelkit/add-ssh-config
Add ssh config
2024-12-20 10:44:12 +01:00
Mattias Walström 323c77b702 Update branding document for the new behaviour with SSH hostkeys 2024-12-19 14:42:17 +01:00
Mattias Walström 780077e729 Document SSH configuration 2024-12-19 14:42:17 +01:00
Mattias Walström 324bcb2533 Update changelog for configurable SSH server 2024-12-19 14:42:17 +01:00
Ahmed KaricandMattias Walström e29a721571 test: move ssh_key_authentication to infix_services 2024-12-19 14:42:17 +01:00
Mattias Walström 389fc96794 test: Verify ssh server config
Fixes #441
2024-12-19 14:42:17 +01:00
Mattias Walström da260fabf9 infamy: restconf: Add support to delete individual entries in leaf-lists 2024-12-19 14:42:17 +01:00
Mattias Walström 79bec6877c Bump confd to 1.3
This since there is breaking changes.
2024-12-19 14:42:17 +01:00
Mattias Walström 37b97d9e4c Add support for configurable SSH server 2024-12-19 14:42:17 +01:00
Mattias Walström 2e81e99224 Generate any (SSH) key without content
This also makes it possible to remove the key 'genkey' if the
user wants.
2024-12-19 14:42:17 +01:00
Mattias Walström bea18c2fa9 Add new helper function rmrf
for recursive delete of directories
2024-12-19 14:42:17 +01:00
Tobias WaldekranzandGitHub 0233fdbf35 Merge pull request #878 from kernelkit/fix-build-id
build: Source build id from the correct repo, fix #872
2024-12-19 12:54:10 +01:00
Tobias Waldekranz 23ca94ea42 build: Source build id from the correct repo, fix #872
INFIX_OEM_PATH is `""` by default (i.e., not empty in `make`'s
eyes). So we called `git` with `-C ""`, which it interpreted as "from
the current directory" and thus we sourced the autogenerated build id
from _buildroot_ instead of Infix.

Therefore, make sure to strip any quotes from the OEM path before
determining the top directory.
2024-12-19 11:37:07 +01:00
Mattias WalströmandGitHub a8545e3369 Merge pull request #876 from kernelkit/change-boot-order
Change boot order
2024-12-19 11:23:45 +01:00
Tobias WaldekranzandGitHub 1f2973d93f Merge pull request #874 from kernelkit/br-refactor
Bridge refactor
2024-12-19 10:29:05 +01:00
Mattias Walström e00737ef78 test: Refactor upgrade test
* Use new cleanup in infamy to ensure the boot order gets restored
* Use new boot order in operational and use RPC to set boot order
  to remove all SSH commands.
2024-12-19 10:14:15 +01:00
Mattias Walström a90294fe08 test: infamy: Add optional test cleanup
If a test need to clean up itself disregarding test status,
it can add an optional test-cleanup phase.

This is useful if the test in some circomstances leave the device in a
bad state. This can be used to restore the unit to its ordinary state.
2024-12-19 10:14:15 +01:00
Tobias Waldekranz 77215aeb87 infamy: furl: Handle connection resets
Furl answers the question "is this URL serving the content I expect?"

Sometimes, we might be asking a server that in the middle of being
reconfigured, is crashing, is buggy, etc. - in which case it might RST
the connection. In that case the answer to the question is "False" and
not "BURN IT ALL DOWN!!"
2024-12-19 09:33:45 +01:00
Tobias Waldekranz 7dfb1f131e board/common: container: Use syslog log backend for containers
Now that conmon can do it, make use of it.
2024-12-18 23:25:07 +01:00
Tobias Waldekranz 7fecac2973 package/podman: Add syslog support
The only reliable way of getting logs from the container at all times
is to let conmon be the logging agent.

Unfortunately, the k8s-file format does not handle multiline output
very well, which is something we often see on the stdout/stderr of
containers.

Therefore, add proper syslog support to conmon instead, and make sure
that podman knows enough about it to pass the information along to
conmon.
2024-12-18 23:25:07 +01:00
Tobias Waldekranz bb939ccdff confd: Avoid initctl reload after exiting previous generation
Instead of running initctl reload, which also prematurely enables
services which are not supposed to be started until we have run
through the netdag and evolved to the next generation.

Handle the original use-case of disabling zeroconf is managed by
asking finit to stop the service immediately in the exit action, and
deferring the cleanup of the service until we call `initctl reload`
after the init action of the new generation.
2024-12-18 23:25:07 +01:00
Mattias Walström 8e38b34c55 doc: Add new boot order to the Changelog 2024-12-18 17:44:40 +01:00
Mattias Walström ff8669e735 Add support to set configure with RPC and read it from operational datastore 2024-12-18 17:44:40 +01:00
Ahmed KaricandGitHub 6a4c8f738e Merge pull request #875 from kernelkit/verify-mac-mcast
Verify MAC Multicast
2024-12-18 15:45:07 +01:00
Ahmed Karic 03cab6d1e4 Verify MAC multicast
Fixes #649
2024-12-18 14:55:00 +01:00
Tobias Waldekranz 96779c2620 confd: bridge: Simplify function names after review
Agreement: Avoid abbreviations in exported functions. Use short,
prefix-less, names for local functions.
2024-12-17 22:59:39 +01:00
Tobias Waldekranz e9a71ec3f7 confd: dagger: Define the script order on init/exit actions
In ye olde confd, we basically had `50-init.ip` - and that was fine.

Then came containers, VLANs, bridges, etc.; and with it: a whole
forest of setup/teardown scripts - and it was not fine anymore.

For example: if found an init script running at 61, you would have to
grep the source tree and look at _all_ other call sites to get a sense
of what runs before and/or after it.

Therefore: create enums for the init/exit actions where the order is
explicitly stated, and use those for all interface scripts.
2024-12-17 22:59:39 +01:00
Tobias Waldekranz b3da4c50fc confd: bridge: Refactor port setup
Clean up bridge-port config generation to align with the bridge upper
code.

- Remove lots of unnecessary guards that we model guaratees are always
  met (existance of containers and leafs).  This reduces indentation
  depth and increases readability, IMHO.

- Split the generation into smaller pieces, each with a clear purpose.

- Try  to include  all edge  cases around the  tricky subject  of PVID
  migrations,  with the  actions running  in either  exit or  init, as
  appropriate.
2024-12-17 22:59:39 +01:00
Tobias Waldekranz eb9ae5e4dd confd: bridge: Use confd god object to access dagger
Now that we have a god object, we might as well use it to make our
functions signatures a bit more readable.
2024-12-17 22:59:31 +01:00
Tobias Waldekranz 9591093379 confd: bridge: Refactor setup
TL;DR:
> New code, all bugs removed ;)

Incremental reconfiguration of bridge related settings had lots of
ordering issues.

This change tries to remedy that by:

- Introducing the concept of "snippets": Instead of having to run C
  code in the correct order (which is doomed to fail since teardowns
  typically need to run in reverse), collect related settings in a
  snippet.  Later on, we can then concatenate snippets into a larger
  file in the proper order.

- Refactoring the bridge setup to take advantage of snippets.  Now we
  can call out to functions that _both_ generate the VLAN config _and_
  sets some bridge global options, for example.  This gets us out of
  having to pass back settings to the main generation function.

- Ensuring that deleted objects are always removed - in the proper
  order - in the exit action of the previous generation.  This was
  previously not true for VLANs, fix #869.

- Generating `mcd`:s config orthogonally from the bridge setup.  Since
  we need to keep track of _all_ bridges, figure out when VLAN uppers
  exist etc., it becomes _very_ messy to generate the configuration
  from the diff of a single interface. There were lots of cases here
  where disabling the querier service on one bridge would disable the
  whole daemon, thereby disabling the service for other bridges that
  still had it enabled.
2024-12-17 22:59:31 +01:00
Tobias Waldekranz 68d8c19b53 confd: dagger: Fix archive naming
One `.tar.gz` extension ought to be enough for everyone.
2024-12-17 16:51:37 +01:00
Ahmed Karic dc2ced8e09 test/docker: Add scapy for verifying MAC multicast
'msend' only supports IP multicast
2024-12-16 16:31:40 +01:00
Mattias WalströmandGitHub 02a8c3d78d Merge pull request #871 from kernelkit/move-operational-from-confd
Move operational data about software state from confd => yanger
2024-12-16 08:36:07 +01:00
Mattias Walström a4ef38fbee test: upgrade: Add some debug print to see whats happen over time 2024-12-13 20:32:07 +01:00
Mattias Walström 5608e9457d Move operational data about software state from confd => yanger
Statd is now responsible for operational, move last big part
(infix-system-software) to yanger.
2024-12-13 20:32:07 +01:00
Tobias WaldekranzandGitHub 34f0c5a462 Merge pull request #870 from kernelkit/confd-ifaces-split
confd: Split up ietf-interfaces.c
2024-12-13 13:08:38 +01:00
Tobias Waldekranz 5675f89d37 confd: Split up ietf-interfaces.c
Fact: ietf-interface.c has become too unwieldy.

Therefore, split it, roughly based on the YANG structure, into
multiple files.

There is much more to do here, like cleaning up the naming (which is
all over the place), moving more system commands into dagger, etc. But
I wanted to keep this change to a strict code reshuffle.
2024-12-13 10:32:03 +01:00
Joachim WibergandGitHub 6d6f4e6dd9 Merge pull request #868 from kernelkit/remove-duplicates 2024-12-12 14:58:39 +01:00
Mattias Walström f06a42987a srx: helpers: Remove duplicate functions that has been moved to libite
Instead use the libite functions.
2024-12-12 09:11:54 +01:00
Mattias WalströmandGitHub 76ab0fe07a Merge pull request #866 from kernelkit/update-rousette
Add upstream patches for rousette
2024-12-11 13:29:56 +01:00
Mattias Walström 734958b89d test: restconf: Remove extra / when delete xpath 2024-12-11 12:23:02 +01:00
Mattias Walström 397568f1c8 infamy: restconf: Do not percent encode ':' 2024-12-11 10:13:52 +01:00
Mattias Walström a2c3919c0f test: restconf: Remove extra / when getting datastore 2024-12-11 10:13:52 +01:00
Mattias Walström e08576b008 RESTCONF: Update rousette to upstream
This fix #781
2024-12-11 10:13:50 +01:00
Joachim WibergandGitHub 83238aad7e Merge pull request #864 from kernelkit/iproute2-6.12
Bump iproute2 to 6.12
2024-12-10 15:15:21 +01:00
Tobias Waldekranz 1863297b5a package/iproute2: Remove patches for outdated versions 2024-12-10 14:33:23 +01:00
Tobias Waldekranz 9cd9440515 buildroot: Bump to latest 2024.02.x-kkit for iproute2 6.12.0 2024-12-10 14:19:52 +01:00
Tobias WaldekranzandGitHub ec64c1585c Merge pull request #862 from kernelkit/dagger-mem-usage
Dagger memory usage
2024-12-10 10:42:54 +01:00
Tobias Waldekranz 429c4f1573 confd: dagger: Always increment generation number
Previously, the generation number was only increased for successful
evolutions. This led to a confusing state in /run/net where multiple
<N>-ABANDONED-<date> directories could exist, with the same value of
N.

Move to a scheme where the generation increments every time we evolve,
even if the evolution fails. If multiple consecutive evolutions fail,
we can now unabiguously determine the order in which they were
executed.
2024-12-10 09:46:20 +01:00
Tobias Waldekranz 28ae8fca42 confd: dagger: Get rid of some code duplication 2024-12-09 13:35:24 +01:00
Tobias Waldekranz c076f0a770 confd: dagger: Reduce memory usage
When reconfiguring the system many times (seen during regression
testing), the RAM usage of keeping all generations around starts to
add up.

A tmpfs file, no matter how small, will always consume at least one
full page (4k). So one generation of tiny setup scripts and log files
can end up locking a 1 MB (!) of memory.

Therefore: Once we're done with a generation, archive it in a
compressed tarball, which typically fits inside a single 4k
page. Limit the total number of archives to 10. This should give full
visibility into the history of a system in all normal situations,
while still allowing hammering systems with reconfig cycles in testing
scenarios.
2024-12-09 13:35:17 +01:00
Tobias WaldekranzandGitHub 219c61081d Merge pull request #860 from kernelkit/linux-6.12.3
linux: Upgrade to 6.12.3
2024-12-06 09:06:57 +01:00
Tobias Waldekranz ad32129a13 linux: Upgrade to 6.12.3 2024-12-06 08:22:10 +01:00
Mattias WalströmandGitHub 1db039d6b4 Merge pull request #846 from kernelkit/fix-upgrade-test
Update upgrade test
2024-12-06 00:30:22 +01:00
Mattias Walström f023304823 Update upgrade test to not mess up boot order
Works on both virtual and physical target
2024-12-05 21:24:52 +01:00
Mattias Walström 85603eb53d Refactor file_server to run in a netns 2024-12-05 21:24:52 +01:00
Tobias WaldekranzandGitHub 1f231c2b2a Merge pull request #854 from kernelkit/pr-build-version
.github: Set usable version strings on PR builds
2024-12-05 14:54:18 +01:00
Tobias Waldekranz 967388395f test: netns: Avoid infinite hangs on exceptions in .call()s
If the callable threw an exception, then the process running inside
the netns would exit before sending back a value on the tx pipe, which
meant that `rx.recv()` would hang in the original process.

Make sure that we catch any exceptions, and send that instead of the
result over the pipe in those scenarios. Then in the original process,
re-raise the exception.
2024-12-05 13:10:42 +01:00
Tobias Waldekranz 94cffd2c48 doc: Mention kernel 6.12 update in the ChangeLog 2024-12-05 13:10:42 +01:00
Tobias Waldekranz 89c5b67a13 .github: Set more informative build id on PR builds 2024-12-05 13:10:42 +01:00
Tobias Waldekranz 3436cd68ac doc: branding: Update documentation around version variables 2024-12-05 11:02:47 +01:00
Tobias Waldekranz d16ad7eedc build: Define build id and version in one place
Before this change, setting `GIT_VERSION` in `make`'s environment was
intended to allow the user to specify a custom build id.  As it turns
out, `test/test.mk` had duplicated the logic from
`board/common/post-build.sh` to unconditionally override any value set
in it.  Because of the way `make` handles variables, where assignments
to variables inherited from the environment are exported back to
it[^1], this would mean that `test.mk` would always clobber any value
set by the user.  Furthermore, there is also this file called
`buildroot/package/git/git.mk`, which also (reasonably) has opinions
about what the proper value of `GIT_VERSION` should be.  In summary,
this was a bit of a mess.

Therefore: Make sure that there is one single place where we determine
the build id and version, and make sure that those variables are
scoped under the `INFIX_` prefix to avoid clashing with any other
component.

[^1]: https://www.gnu.org/software/make/manual/html_node/Environment.html
2024-12-05 10:29:21 +01:00
Tobias Waldekranz e635e3e720 test: Remove dead code 2024-12-04 23:00:19 +01:00
Tobias WaldekranzandGitHub 42b7cf9f94 Merge pull request #833 from kernelkit/mdns-settings
Expand mDNS settings
2024-12-04 15:01:47 +01:00
Tobias WaldekranzandGitHub 7d9211a3ba Merge pull request #848 from kernelkit/linux-6.12
Linux 6.12
2024-12-04 14:37:39 +01:00
Joachim Wiberg 1895e161d2 doc: update ChangeLog with mDNS and sysctl changes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 14:25:43 +01:00
Joachim Wiberg 7804787201 doc: update discovery document
Overhaul text and grammar.  Simplify, correct, and add information about
the new mDNS settings.  Replace 'unit' with 'device', which is the more
common term for hardware.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 14:25:04 +01:00
Joachim Wiberg 3576450982 test: verify mDNS allow/deny interfaces
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Joachim Wiberg bb987cfe9e test: minor, spelling
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Joachim Wiberg 997310f9a2 test: fix xpath_delete() over NETCONF
Fixes the following issue when deleting /infix-services:mdns/interfaces,
which works fine over RESTCONF:

Traceback (most recent call last):
  File "/home/jocke/src/infix/test/./case/infix_services/mdns_allow_deny/test.py", line 142, in <module>
    dut.delete_xpath("/infix-services:mdns/interfaces")
  File "/home/jocke/src/infix/test/infamy/netconf.py", line 418, in delete_xpath
    oldd = mod.parse_data_dict(old, no_state=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.infix/venv/lib/python3.11/site-packages/libyang/schema.py", line 215, in parse_data_dict
    return dict_to_dnode(
           ^^^^^^^^^^^^^^
  File "/root/.infix/venv/lib/python3.11/site-packages/libyang/data.py", line 1277, in dict_to_dnode
    result.root().validate(
  File "/root/.infix/venv/lib/python3.11/site-packages/libyang/data.py", line 430, in validate
    self.validate_all(no_state, validate_present)
  File "/root/.infix/venv/lib/python3.11/site-packages/libyang/data.py", line 449, in validate_all
    raise self.context.error("validation failed")
libyang.util.LibyangError: validation failed:
    Invalid leafref value "e3" - no target instance "/if:interfaces/if:interface/if:name" with the same value.

The patch skips validation of the diff in favor of checking the result
of libyang.xpath_del().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Joachim Wiberg bf23f53770 test: minor, pep8 fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Joachim Wiberg e8f9032339 package/skeleton-init-finit: avahi needs to be restarted
The Avahi daemon needs to be restarted when changing its configuration
file in /etc/avahi/avahi-daemon.conf, not sufficient to SIGHUP.

Also, minor reformatting for new style.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Joachim Wiberg 80e4018b20 confd: expose more avahi-daemon settings in mdns service context
Use container for interface allow/deny and for reflector settings.
Hopefully there will be more settings in the future, e.g., control
reflector interfaces independently.

Fix #678

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 12:57:04 +01:00
Tobias Waldekranz 27b7d831d0 styx-dcp-sc-28p: Move board specific overlay files to package
This way, we only install these files if the board is enabled.
2024-12-04 11:27:03 +01:00
Tobias Waldekranz f0ae1aa835 package/board: Rsync overlay directory, if available 2024-12-04 11:27:03 +01:00
Tobias Waldekranz 88f7c6070a package/board: Let the user select the set of boards to support
Introduce a new approach to dtb-building:

Old way: `rsync` an overlay containing our dt source to the kernel,
and then build via buildroot's `_INTREE_DTS_NAME`. This does not work
in recent kernels (at least since 6.12), which requires all dtb's to
be explicitly listed in a `Makefile`.

New way: Create a separate package for every board, and build the
device trees via the kernel's standard interface for building external
modules. This has two main advantages:

1. We can easily interpose a patched version of an upstream device
   tree. E.g., we can easily set the factory password.

2. It is much easier to get an overview of which boards are enabled,
   rather than scrolling back and forth in the `_INTREE_DTS_NAME` list.

Enable all fully supported boards in the defconfigs.
2024-12-04 11:27:03 +01:00
Tobias Waldekranz a3f85a3872 linux: Upgrade to 6.12.1
Exploratory change to smoke out any regressions that this might
introduce.
2024-12-04 11:27:03 +01:00
Joachim Wiberg 7467b2fcf4 board/common: review sysctl defaults
These changes are based on the sysctl recommendations by Frr [1].

Not all recommendations have been incorporated, e.g., ip forwarding is
not enabled per interface, because in Infix this is an opt-in feature.

A readme.txt has been added, documenting the various settings.

New for IPv4:
 - Adjust IGMP max memberships: 20 -> 1000
 - Use neighbor information on nexthop selection
 - Use inbound interface address on ICMP errors
 - Ignore routes with link down
 - Disable rp_filter

ARP settings have been changed to better fit routers, i.e., systems
with multiple interfaces:

 - Always use best local address when sending ARP
 - Only reply to ARP if target IP is on the inbound interface
 - Generate ARP requests when device is brought up or HW address changes

New for IPv6:
 - Keep static global addresses on link down
 - Ignore routes with link down

Fixes #829

[1]: https://github.com/FRRouting/frr/blob/master/doc/user/Useful_Sysctl_Settings.md

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 11:26:42 +01:00
Joachim Wiberg 3e387d74c2 doc: minor grammar and clarification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-12-04 11:26:42 +01:00
Tobias WaldekranzandGitHub f961bcfe86 Merge pull request #840 from kernelkit/ntp-status
Ntp status
2024-12-04 10:38:32 +01:00
Mattias Walström ce05139452 Document NTP client status 2024-12-03 22:45:18 +01:00
Mattias Walström a74eb58000 test: Add unit test for 'show cli' 2024-12-03 16:29:28 +01:00
Mattias Walström 5cafd18b79 CLI: Add as 'show ntp' that normal persons understand 2024-12-03 16:29:28 +01:00
Mattias Walström 7334d0e54b test: add test for ntp client 2024-12-03 16:29:28 +01:00
Mattias Walström fffe427497 Implement NTP client status 2024-12-03 16:29:28 +01:00
Ahmed KaricandGitHub 168647ace9 Merge pull request #849 from kernelkit/deviate-address-family-ospf
Deviate address-family in OSPF
2024-12-03 13:03:50 +01:00
Tobias WaldekranzandGitHub 0e14e05ae5 Merge pull request #847 from kernelkit/test-log-sw
test: reproducible: Log software versions
2024-12-03 12:51:19 +01:00
Ahmed Karic 3ab7a7d531 confd: Deviate address-family in OSPF
In the OSPF(v2) context, there is an "address-family" setting available.
However, since only IPv4 routes are supported in OSPF, currently
this setting is not relevant.

Fixes #813
2024-12-02 21:40:51 +01:00
Tobias Waldekranz fcef1ead3a utils: kernel-refresh.sh: Only remove old patches if they exist
E.g., when upgrading to a new version, there are no previous patches
to remove.
2024-12-02 16:52:35 +01:00
Tobias Waldekranz 784b391467 test: reproducible: Log software versions
Make sure that we keep a record of the versions and boot source used
by all devices under test when running the full suite - in case we
ever suspect that there is a mismatch between the intended test image
and the actual one.

Since this test now needs to communicate with the devices, make sure
that we run the wait test first.
2024-12-02 12:42:28 +01:00
Tobias Waldekranz 6d18ba4c39 test: infamy: Unify {NET,REST}CONF operational data formatting
Replace the existing remove-module-names-pass in the RESTCONF
transport -- which only worked for top-level containers -- with
libyang's standard `.print_dict()` used by the NETCONF transport
implementation.

As a bouns, the implementation of `.get_iface()` is now transport
agnostic.
2024-12-02 12:42:28 +01:00
Tobias WaldekranzandGitHub fbe18a4ae0 Merge pull request #844 from kernelkit/releng
Final ChangeLog updates for v24.11.1
2024-11-29 08:05:29 +01:00
Joachim Wiberg 020f0d0980 doc: final ChangeLog updates for v24.11.1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 20:56:05 +01:00
Joachim WibergandGitHub 3fd4f2c72f Merge pull request #843 from kernelkit/drop-execd
Redesign and simplify container creation/removal
2024-11-28 17:48:00 +01:00
Joachim Wiberg fbabf0e857 doc: update ChangeLog for v24.11.1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 16:36:56 +01:00
Joachim Wiberg a23dc89592 confd: disabling a container should not delete volumes
When disabling a container in the configuration we should not remove it,
because then any volumes used by it may be lost.  Instead, we now simply
disable the service to prevent it from starting, or stopping it, if it
was running.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 16:36:56 +01:00
Tobias WaldekranzandJoachim Wiberg 36d9056e8f board/common: Use finit's log: to capture output from containers
Since `conmon` only logs the output from the monitored container's
`stdout`/`stderr`, we might as well get rid of `k8s-logger`, and let
the output pass through to finit, which will then pipe the messages to
syslog.

Fix #836
2024-11-28 16:36:56 +01:00
Joachim Wiberg ca0e54b50b configs: drop execd from defconfigs, not needed anymore
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 16:36:56 +01:00
Joachim Wiberg bb1a656a05 confd: drop fragile asynchronous container create/delete using execd
This is a complete redesign of how the system creates/deletes containers
from the running-config.  Containers are now removed synchronously from
confd before any interfaces they may be using are removed, and created
in parallel, using a Finit task, well after confd has finished setting
up interfaces.

The logic previously provided by execd to retry container create on any
route/address changes, or periodically every 60 seconds, is now handled
by a new 'setup' command in the container wrapper script.

Additionally, container create is now split in wget/curl/podman pull of
the image and 'podman create'.  This to both consolidate image fetching
and improve user feedback since most of the retry logic (above) revolves
around the image download.

Fixes #835

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 16:36:56 +01:00
Joachim Wiberg 7483a6f454 confd: make sure to stop zeroconf agent on interface removal
When deleting interfaces we skip a lot of steps in netdag_gen_iface(),
this patch ensures we at least call netdag_gen_ipv4_autoconf() to drop
any running zeroconf agent in the same generation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 15:11:26 +01:00
Joachim Wiberg 6072ec45b3 patches: add support for adjusting avahi-daemon log level
The mDNS daemon, Avahi, is very verbose in its syslog output.  So much
that it often overshadows other subsystems, and on switches and routers
with more than the "normal" amount of ports and interfaces, it quickly
becomes unbearable.

The patches consist of:

 - Add -l LEVEL support to avahi-daemon
 - Add missing casll to setlogmask() in libdaemon:daemon_set_verbosity()

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 15:11:26 +01:00
Joachim Wiberg 1ac07b5a7b board/common: drop less -S from pager
The -S switch to less seemed at the time a good idea -- chop off too
long lines and allow horizontal scrolling -- however, the -F option, to
skip pager for content that fit the first screen is overridden by the -S
switch.  This makes commands like "show containers", and similar that
normally have waaaaay too few lines for a pager to always page.

So let's drop -S to regain the original behavior.  This will cause lines
to be wrapped, but with the new raw mode in the CLI this seems to work
without any weird screen artifacts.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 15:11:21 +01:00
Joachim Wiberg ad9c432ff9 cli: jump to end of 'show log' commands automatically
Instead of having to scroll to the end (Shift G, or page down til end),
let's instead start at the end now that we have control over paging in
the CLI ourselves.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 15:10:48 +01:00
Joachim Wiberg af0e24adf8 package/finit: backport fix to prevent restaring template siblings
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 15:10:48 +01:00
Tobias WaldekranzandGitHub e39ef89150 Merge pull request #832 from kernelkit/rocker
Initial support for Qemu Rocker switch
2024-11-28 15:07:44 +01:00
Tobias WaldekranzandGitHub 877e3f3d81 Merge pull request #837 from kernelkit/vlan-iface-termination
Prevent traffic assigned to locally terminated VLANs from being forwarded
2024-11-28 15:07:22 +01:00
Tobias Waldekranz ddfdcb40bb test: vlan_iface_termination: Fix test spec issues
- Use standard topology
- Include test case specification in parent README
2024-11-28 14:23:53 +01:00
Tobias Waldekranz f4557ff8ab doc: update ChangeLog
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
2024-11-28 12:53:19 +01:00
Joachim WibergandTobias Waldekranz b6f9b6d967 test: safe setup of Infamy swN bridges
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-28 12:53:19 +01:00
Tobias Waldekranz 6c2ab33028 test: ospf_container: Enable VLAN filtering on br0
As it turns out, the setup with a 802.1D bridge in combination with
VLAN uppers stacked on the bridge ports is not possible to support
on mv88e6xxx ports.

Enable VLAN filtering to ensure proper isolation of the locally
terminated VLANs.
2024-11-28 12:52:09 +01:00
Tobias Waldekranz 63e1ff1fe9 test: vlan_iface_termination: Add test
This will fail on a system running a vanilla kernel, where the dut's
ports are backed by mv88e6xxx, because:

1. The ports are attached to the same bridge, and are thus in the same
   PVT group.

2. Creation of the VLAN uppers causes the DSA layer to add both ports
   to the same VTU entry.

As a result, hardware behaves as if both ports had been configured as
tagged members of VLAN 10, instead of just terminating incoming
traffic locally.

Add this test to catch hardware which behaves in this way.
2024-11-28 12:52:09 +01:00
Tobias Waldekranz 0c88c464f1 statd: Support reporting PVID on bridges
Now that PVID can be configured on bridges, make sure that we reflect
that in the operational database.
2024-11-28 12:52:09 +01:00
Tobias Waldekranz 70e8895478 confd: Support PVID configuration on bridges 2024-11-28 12:52:09 +01:00
Mattias WalströmandGitHub 371db579ea Merge pull request #839 from kernelkit/ospf-tests
Add a new test for default-route-advertise
2024-11-28 12:20:00 +01:00
Mattias Walström 591397d3c7 test: ospf: add new test for testing 'default-route-advertise' 2024-11-28 11:13:56 +01:00
Mattias Walström 88ab2a6f43 test: ospf-basic: Test redistribute static as well 2024-11-28 11:13:56 +01:00
Mattias WalströmandGitHub f6bd2094f0 Merge pull request #842 from kernelkit/update-vlan-separation-test
test: bridge_vlan_separation: Make test more robust
2024-11-28 11:13:03 +01:00
Mattias Walström b36e55e642 test: bridge_vlan_separation: Make test more robust
Only check for the broadcast sent.

And add more test specification steps
2024-11-28 10:31:54 +01:00
Ahmed KaricandGitHub eabf79c7c4 Merge pull request #824 from kernelkit/add-routing-pref-tests
Add Routing Preference Tests
2024-11-27 14:42:23 +01:00
Joachim Wiberg 963364d4e9 confd: allow setting IP address directly on dot1Q bridges
This patch drops a needless restriction of IP addresses on VLAN filtering
bridges from 2024-03-06.  The obvious use-case is when the bridge is an
untagged member of a VLAN and only ony management VLAN is required.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-27 11:25:21 +01:00
Tobias Waldekranz bc9c6a4871 patches/linux: net: dsa: mv88e6xxx: Trap locally terminated VLANs 2024-11-26 22:14:16 +01:00
Ahmed Karic d9eae887a0 test: Verify routing preference 255 is inactive
Fixes #784
2024-11-26 15:29:32 +01:00
Ahmed Karic e9efd224f7 test: Verify route preference (OSPF vs Static) 2024-11-25 18:05:51 +01:00
Ahmed Karic e9fc62b365 test: Verify route preference (DHCP vs Static) 2024-11-25 18:05:51 +01:00
Ahmed Karic 03a2cf7b3b test/infamy: Initialize DHCP server interface parameter 2024-11-25 18:05:51 +01:00
Ahmed Karic 289534e0d5 test/infamy: Fix adding ip address inside IsolatedMacVlans 2024-11-25 18:05:51 +01:00
Ahmed Karic d81b20ca0b test/infamy: Enhance route verification
- Ensure _exist_route function performs complete checks without early
    returns.
  - Add support for verifying 'active' state in route checks.
2024-11-25 18:05:51 +01:00
Mattias WalströmandGitHub 68c86c8a89 Merge pull request #820 from kernelkit/ospf-container
Ospf container
2024-11-25 15:08:01 +01:00
Mattias Walström de50179b3b test-spec: Remove autogenerated file
Add it to gitignore to not be added again.
2024-11-25 14:44:32 +01:00
Mattias Walström 66ae02363e infamy: Stability fix for getting OSPF status
Always return {} if fail to get OSPF status, it may not have started
yet.
2024-11-25 14:25:26 +01:00
Joachim WibergandMattias Walström 866b9de779 test: factor out file server from upgrade test
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-25 14:25:26 +01:00
Joachim WibergandMattias Walström 77df9a327d test: add drawio original and update images in use-case test
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-25 14:25:26 +01:00
Mattias Walström 1cfbf9bc11 test: case: ospf_container: Update test
Add "VLAN switches" between each Router, to only pass the tagged traffic
between the routers.

Add test specification and add to test suite
2024-11-25 14:25:26 +01:00
Mattias Walström 81f80bd307 ospf_containers: Convert to use put_config_dicts 2024-11-25 14:04:07 +01:00
Joachim WibergandMattias Walström f381977e7b test/case: minor, grammar and formatting
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-25 14:04:07 +01:00
Joachim WibergandMattias Walström 6d6a788749 test/case: update use-case internal network description
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-25 14:04:07 +01:00
Mattias Walström 7a642f9f8c test: use_case: Update test with HTTP container and ABR
Add ABR configuration and a HTTP Container
2024-11-25 14:04:07 +01:00
Joachim WibergandMattias Walström c0ee09047b test/case: add description for ospf container use-case
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-25 14:04:07 +01:00
Joachim WibergandMattias Walström 14dea0ca97 README: minor, grammar.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-25 14:04:07 +01:00
Mattias Walström bbc9a55c1e Add new test: ospf_container
Aims to test a complex setup with multiple containers, OSPF and NAT
2024-11-25 14:04:07 +01:00
Mattias Walström 82fd4bdb68 infamy: Expose the new IsolatedMacVlans for tests 2024-11-25 14:03:03 +01:00
Mattias Walström c7db71d095 test-spec: Add support for images in description 2024-11-25 14:03:03 +01:00
Mattias Walström 5264a1c32b infamy: Update template topologies to use the correct font 2024-11-25 14:03:03 +01:00
Tobias WaldekranzandMattias Walström fabb28b5df yanger: Tolerate missing DR/BDR IDs in OSPF neighbor info
With the FRR upgrade to 9.1.2, OSPF sometimes reports neighbors
without reporting the routerDesignatedId and routerDesignatedBackupId
attributes. Ensure that these attributes are available before trying
to copy them to the output.
2024-11-25 14:03:03 +01:00
Tobias WaldekranzandMattias Walström de47caec38 buildroot: Bump to latest 2024.02.x-kkit for FRR 9.1.2
During development of the upcoming ospf_container test, an issue was
discovered where zebra's view of the system drifted from the kernel's
ditto. Specifically: when transitioning from test-config to one with
many virtual interfaces (VLANs VETH pairs etc.), zebra would not
process events for all interfaces, which meant OSPF would not pick
them up.

Our experience matches very well with a bug reported upstream in:

https://github.com/FRRouting/frr/issues/13630

> If we delete kernel interface and create it and set its ip in a
> short time, in rare cases, interface ip will be lost in zebra which
> can be confirmed by vtysh show interface brirf command. This will
> lead to abnormal behavior of other protocol daemons, for example,
> bgpd does not announce the route corresponding to interface ip even
> it was specified by network command.

The issue was marked as fixed by PR 13396, which was merged in the 9.0
cycle:

https://github.com/FRRouting/frr/pull/13396

Therefore, upgrade FRR to the latest patch release from that major.
2024-11-25 14:03:03 +01:00
Tobias WaldekranzandMattias Walström d99b6fd557 confd: Abort if callback tracking ever fails
During debugging of a reconfiguration issue, one hypothesis was that
the tracking of callbacks used to determine when a transaction has
completed (as sysrepo has no hooks for this) was out of sync, causing
us to call `initctl reload` prematurely. This was not the case, but if
it ever occurs in the future, make sure that it is a fatal error that
won't go unnoticed.
2024-11-25 14:03:03 +01:00
Tobias WaldekranzandMattias Walström a3af3f9be4 x86_64: Enable kprobes and ftrace in kernel
This avoids full recompiles every time we want to use things like ply.
2024-11-25 14:03:03 +01:00
Ahmed KaricandGitHub 260d9615ec Merge pull request #828 from kernelkit/update-br-vlan-sep
Verify that bridge vlan separation works properly for broadcast packets
2024-11-25 09:35:40 +01:00
Ahmed Karic 798194b64a test: update bridge vlan separation test
- Verify that broadcast packets are also properly moved accross the
  bridge, i.e. the broadcast packets sent from vlan interface VLAN10
  do not reach VLAN20

Fixes #773
2024-11-25 08:46:20 +01:00
Joachim Wiberg 0160fd539e package/skeleton-init-finit: ensure zebra+ospfd log to syslog
Fix lack of syslog messages from Zebra and add support to easily enable
debug logs for common Zebra subsystems.

Same change made to ospfd for symmetry.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-24 20:50:12 +01:00
Joachim Wiberg df2689ca34 board/common: minor fixes to udhcpc.script
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-24 20:50:12 +01:00
Joachim Wiberg f9d21e5839 board/common: trick pager into using line drawing charachters
This fixes a regression in v24.11.0, introduced in 46dd0c7, where line
drawing characters are not properly displayed in the CLI anymore.

admin@infix:/> show interfaces
INTERFACE       PROTOCOL   STATE       DATA
lo              ethernet   UP          00:00:00:00:00:00
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
br0             bridge
<E2><94><82>               ethernet   UP          02:00:00:00:00:00
<E2><94><82>               ipv4                   169.254.1.3/16 (random)
<E2><94><82>               ipv6                   fe80::ff:fe00:0/64 (link-layer)
<E2><94><9C> swp1          bridge     FORWARDING
<E2><94><9C> swp2          bridge     FORWARDING
<E2><94><9C> swp3          bridge     FORWARDING
<E2><94><9C> swp4          bridge     FORWARDING
<E2><94><9C> swp5          bridge     FORWARDING
<E2><94><9C> swp6          bridge     FORWARDING
<E2><94><9C> swp7          bridge     FORWARDING
<E2><94><9C> swp8          bridge     FORWARDING
<E2><94><9C> swp9          bridge     FORWARDING
<E2><94><94> swp10         bridge     FORWARDING

This is because the raw tty from klish disables IUTF8 and the fact that
it does not source any environment, e.g., /etc/profile.  (We do not have
any locale settings in the enviornment either, but that's a discussion
for another day.)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-24 20:50:12 +01:00
Joachim Wiberg c8046bfbda board/common: add '-k' to keep new qemu.run script after session
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-24 20:50:12 +01:00
Joachim Wiberg 74a12b3e31 board/common: initial rocker switch support
Fix #540

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-24 20:49:34 +01:00
Joachim Wiberg efaad3c5b8 board/common: misc shellcheck fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-23 20:52:36 +01:00
Tobias WaldekranzandGitHub 3d189d8ec6 Merge pull request #831 from kernelkit/boot-wait-slow-devs
Wait for slow devices before continuing boot
2024-11-22 15:36:41 +01:00
Tobias Waldekranz 06721a17b3 board/common: Address review feedback on hw-wait
- Fix various shellcheck warnings
- Use idiomatic formatting of multiline finit stanzas
2024-11-22 15:00:40 +01:00
Tobias Waldekranz d7c7c33e72 doc: Document #685 fix in ChangeLog
[skip ci]
2024-11-22 14:19:04 +01:00
Tobias Waldekranz 47bb54254c Revert "Make detection of DSA interface more robust"
This reverts commit 0ee973b2b2.

Turns out that this workaround simply reduced the size of the window
where this issue can occur.

The previous change now ensures that the DSA tree is always fully
setup by the time nameif runs.
2024-11-22 11:10:02 +01:00
Tobias Waldekranz 30028f36a9 board/common: Wait for slow devices before continuing boot
Before this change, we relied on `udevadm settle` to act as a barrier
which we could only cross after all devices had been probed. As it
turns out, when drivers defer probing due to missing dependencies,
`udevadm settle` may exit (as no events are generated for a period of
time) before all devices are set up. This was the root cause behind
issue #685, for which #752 was the initial attempt at a fix.

As we know that systems using mv88e6xxx will always have a device link
referencing the conduit interface, add a script to finit's system
runparts directory, which will block while any device link consumers
are still probing.

As a consequence of this, we can no longer rely on the sysklogd.conf
shipped with finit. Therefore, install an Infix specific one, which
will make sure that the aforementioned script has run before launching
the syslog daemon, which most other things depend on.

Fixes #685
2024-11-22 11:08:20 +01:00
Tobias WaldekranzandGitHub 131d9e99b3 Merge pull request #826 from kernelkit/container-fixes
Container fixes
2024-11-20 11:36:13 +01:00
Joachim Wiberg 1ed8ad1233 doc: update ChangeLog for v24.11
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 09:19:53 +01:00
Joachim Wiberg 8d32a525f3 doc: add ghfm note highlights
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 09:19:53 +01:00
Joachim Wiberg 3bbe9a9a9d doc: update container doucmentation
- No more default writable layer
 - Don't mention read-only (deprecated, and always on now)
 - Use ghfm note highlights

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 09:19:53 +01:00
Joachim Wiberg ee0adce2a3 package/curios-nftables: bump to v24.11.0
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:54:11 +01:00
Joachim Wiberg 09077c6122 package/curios-httpd: bump to v24.11.0
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:54:11 +01:00
Joachim Wiberg 4c78613c4c package/curios-*: add latest symlinks for easy upgrades
This patch adds latest symlinks to the curiOS containers to make system
upgrades easier.  I.e., a user can now reference the bundled image with:

    set image oci-archive:/lib/oci/curios-httpd-latest.tar.gz

So that when they upgrade to the latest Infix, which might include an
update of curiOS httpd, they will get a seamless upgrade also of the
container(s) running.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:54:11 +01:00
Joachim Wiberg 7ec37a7efb board/common: new shell tool 'cfg [edit] arg', replaces alias
This commit replaces the 'cfg' alias for 'sysrepocfg -f json' with a
small shell script.  Currently only an 'edit' command, similar to the
CLI 'text-editor' command for modifying base64 encoded YANG nodes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:51:09 +01:00
Joachim Wiberg 904040098a board/common: refactor error logging and clean up on error
- Refactor logging to simplify code and get proper log level
 - Clean up lingering directories from any extracted tarball on error

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:50:45 +01:00
Joachim Wiberg 8838efaf9d board/common: enable/disable Finit service for container
This patch allows running the configure script manually to create and
delete containers.  The normal flow via confd has additional handling
to ensure containers are started/stopped on inictl reload.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:50:29 +01:00
Joachim Wiberg 2d37e4be2c board/common: extract OCI archives in /var/tmp
Instead of using $HOME, which may be a ramdisk, use /var/tmp which
podman also uses by default.  Also, make sure to clean up after
ourselves.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:50:26 +01:00
Joachim Wiberg e480e26065 board/common: workaround missing --retry=NUM flag to podman
Disable the default "podman pull" retry value.  We use execd to retry
"podman create" on failure.  Wihtout this change, a single container
can block start of other containers by 3 * 20 seconds.  Now we only
block max 20 seconds before we try starting the next container.

Modern versions of podman (>= 5.0) have this --retry option, but it
does not have CNI, so this is a temporary workaround.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:50:03 +01:00
Joachim Wiberg 2aea461e7e execd: add retry timer for pending jobs
When an Infix device is connected to a LAN where the gateway has yet to
connect to the Internet, the container script will fail pulling images
from any remote server.

    Nov 16 12:48:13 infix container[3490]: Error: initializing source docker://ghcr.io/kernelkit/curios:edge: pinging container registry ghcr.io: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io on 127.0.0.1:53: read udp 127.0.0.1:55422->127.0.0.1:53: i/o timeout
    Nov 16 12:48:13 infix container[3641]: Error: failed creating container fw, please check the configuration.
    Nov 16 12:48:13 infix execd[3490]: /run/containers/queue/S01-fw.sh failed, exit code: 1

Since execd until now only retries on netlink/inotify events, or manual
SIGUSR1, jobs would get stuck even though Internet connectivity had been
established.  This patch fixes that with the addition of a retry timer
which runs while there are pending jobs in the queue.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:50:03 +01:00
Joachim Wiberg 7b389f6d0a confd: quiet container script log messages
Should be inverted to a --verbose or --debug flag instead.  After this
change we still see the full 'podman create ...' command, with all the
optionas and arguments.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:50:03 +01:00
Joachim Wiberg 43635c2727 confd: fix pyang linter errors
Issue #815 detail issues found running the Clixon Controllar and
Cisco Yangsuite.  The errors and warnings listed are very similar
to pyang, which the undersigned has, the following changes fixes
the pyang errors:

 - relocate 'feature containers' to submodule
 - drop already deviated ospf:database deviations
 - drop unused imports

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:49:56 +01:00
Joachim Wiberg c79e198615 confd: add support for fetching container images over ftp/http/https
- Anonymous FTP, or URL encoded ftp://user:hostname@addr/oci.tar.gz
 - HTTP/HTTPS fetched with curl, optional credentials support
 - Verify download against an optional sha256 checksum

Ensure the unpacked directory name does not contain a ':', it is a
restricted character and cannot be part of the file name.  If this
syntax is used we retain it as the name and retag it after load.

Fix #801

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:49:27 +01:00
Joachim Wiberg 021767c903 confd: refactor and refine container creation
- Reduce the amount of queues: 3 -> 1
 - Simplify post hook
 - Refine execd

The resulting simplification of infix_containers_post_hook(), and
touching execd, also ensure container environment variable changes
are propagated.

Fixes #822

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:27 +01:00
Joachim Wiberg 449fd46ea7 package/execd: clean up any lingering containers at boot
To be able to handle container restarts, incl. restart policy, at
runtime, most of the container data lives in /var/lib/containers,
which on most systems is backed by a persistent store.

As of issue #823 we no longer keep a writable layer for containers,
nor should we cache container state across reboots, all containers
are recreated at boot.  This task cleans up any lingering state.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:27 +01:00
Joachim Wiberg 4a9d977682 board/common: revert parts of 8353963
Running 'shred' on files stored on eMMC is pointless since the writes
are spread out over other sectors rather than overwriting the content
of the files as it was supposed to on old rotating media.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:27 +01:00
Joachim Wiberg 5ace3afa5f board/common: clean up stale files in /var/tmp/frr on boot
On unclean shutdowns Frr leaves a lot of per-thread message buffers in
/var/tmp/frr/<daemon>[-<instance>].<pid>/*

See https://docs.frrouting.org/en/latest/setup.html

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:27 +01:00
Joachim Wiberg 1347080b4a confd: major behavior change, run container --read-only always
Container support in Infix was released with v24.02, so this change may
unfortunately break a few use-cases out there.  Regrettable as this is,
the default behavior, including how containers are started after boot,
break other use-cases that were considered more important.

As of this commit:

 - all containers in Infix run in read-only mode, use volumes and
   mounts for persistence across reboot/stop/start/upgrade
 - all containers are now "recreated" at boot or related config changes,
   this ensures an OCI image embedded in the Infix image, /lib/oci/, is
   always used as the base for a running container

Fixes #823

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:27 +01:00
Joachim Wiberg db447712f7 board/common: ensure containers are handled as sysv scripts
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:27 +01:00
Joachim Wiberg 2922b909af confd: add validation of min/max interface name length
A sane interface name is at least two characters long, and in Linux the
interface name (using ip link) is at most 15 characthers long.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-20 08:48:20 +01:00
Joachim WibergandGitHub 28c5f5e56f Merge pull request #827 from kernelkit/cli-fixes
CLI pager fixes
2024-11-18 14:34:10 +01:00
Joachim Wiberg 46dd0c7467 src/klish-plugin-infix: use shell pager instead of klish pager
With interactive mode (out="tty") klish puts the tty in raw mode which
fixes all weird issues reported around paged output in the CLI.

Fixes #659

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-17 16:18:02 +01:00
Joachim Wiberg aa538820de board/common: replace pager symlink with a tiny shell script
These are basically the same flags as was passed to klish, but now we
use -R instead of -r to make sure only ANSI coloŕ escapes can affect
the behavior of less.

This change will make it posslbe to shop off too long lines and scroll
vertically on really long lines instead for them breaking output.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-17 16:15:30 +01:00
Joachim Wiberg 7670f23805 src/klish-plugin-infix: adapt to new klish plugin path
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-17 14:38:36 +01:00
Joachim Wiberg c55b534005 package/klish-plugin-sysrepo: bump for new library and plugin paths
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-17 14:37:47 +01:00
Joachim Wiberg cbcd39cdd6 package/klish: bump for raw mode fixes, alternate quotes, etc.
This update include more backports from Klish 3.1.0, including, but not
limited to:

 - Syslog fixes
 - Return code fixes
 - Changed library and plugin paths (!)
 - TTY raw mode fixes
 - Use raw mode for interactive commands
 - Allow single quotes (') as alternative to regular quotes for commands

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-17 14:31:18 +01:00
Joachim WibergandGitHub 032a51b9fc Merge pull request #821 from rical/rauc-add-install-output
rauc: improve upgrade output
2024-11-12 16:38:21 +01:00
Richard Alpe f4bf72de85 rauc: improve installation output
The first patch 0003.. is sent upstream but not reviewed yet.

Signed-off-by: Richard Alpe <richard@bit42.se>
2024-11-12 15:21:27 +01:00
Joachim WibergandGitHub deee48d36a Merge pull request #817 from kernelkit/rel
Minor release engineering fixes
2024-11-08 19:37:58 +01:00
Joachim Wiberg 23e24635fe .github: create new discussion only on GA releases
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-08 18:51:09 +01:00
Joachim Wiberg eb38d4538f .github: remember to sync tags
The gh repo sync, used by our internal cronjob, does not sync tags, for
details see <https://github.com/cli/cli/issues/5023>.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-11-08 18:38:50 +01:00
1311 changed files with 75800 additions and 20382 deletions
+1
View File
@@ -33,3 +33,4 @@ Releases
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
- Ensure the markdown link for the release diff is updated
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
- Sync tags for all repo. sync activities
+26
View File
@@ -0,0 +1,26 @@
# Security Policy
## Reporting a Vulnerability
If you discover a security vulnerability in Infix, please use GitHub's built-in
[Report a Vulnerability](https://github.com/kernelkit/infix/security/advisories/new)
feature for a private and secure disclosure.
When reporting, include:
- A clear description of the vulnerability.
- Steps to reproduce the issue.
- Potential impact of the vulnerability.
## Supported Versions
We provide security updates only for the main branch.
Individual support contracts are provided by _Wires_. See
[Support](https://github.com/kernelkit/infix/blob/main/.github/SUPPORT.md)
for more information.
## Acknowledgments
We appreciate the efforts of the security community to help improve the security
of Infix. Thank you for your responsible disclosure.
+3 -3
View File
@@ -6,7 +6,7 @@ project on GitHub, and Discord, see <https://github.com/kernelkit>:
Support contracts, development of new features, fast-tracking of reviews
and contributions, customer branding of Infix, and even customer specific
features for dedicated products is provided by Addiva Elektronik.
features for dedicated products is provided by _Wires_.
&nbsp;&nbsp; :globe_with_meridians: <https://www.addiva.se/electronics/>
&nbsp;&nbsp; :e-mail: <mailto:ael@addiva.se>
&nbsp;&nbsp; :globe_with_meridians: <https://www.wires.se>
&nbsp;&nbsp; :e-mail: <mailto:infix@wires.se>
+143
View File
@@ -0,0 +1,143 @@
name: Build Bootloaders
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build from'
default: 'main'
type: string
jobs:
build:
name: Build ${{ matrix.defconfig }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
defconfig:
- fireant_boot
- cn9130_crb_boot
- aarch64_qemu_boot
- rpi4_boot
env:
MAKEFLAGS: -j5
steps:
- name: Cleanup Build Folder
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- name: Checkout infix repo
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
clean: true
fetch-depth: 0
submodules: recursive
- name: Set Build Variables
id: vars
run: |
defconfig=${{ matrix.defconfig }}
version=$(awk -F'"' '/BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE=/ {print $2}' configs/${defconfig}_defconfig)
version=${version:-git}
filename=$(echo "${defconfig}" | tr '_' '-')
# TODO: Replace hardcoded rev with actual revision stepping
rev="latest"
archive="${filename}-${version}-${rev}.tar.gz"
dirname="${filename}-${version}-${rev}"
echo "defconfig=${defconfig}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "rev=${rev}" >> $GITHUB_OUTPUT
echo "archive=${archive}" >> $GITHUB_OUTPUT
echo "dirname=${dirname}" >> $GITHUB_OUTPUT
echo "Building ${defconfig}_defconfig, version ${version}-${rev}, artifact ${archive} ..."
- name: Restore Cache of dl/
uses: actions/cache@v4
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-
- name: Configure ${{ matrix.defconfig }}_defconfig
run: |
make ${{ matrix.defconfig }}_defconfig
- name: Build ${{ matrix.defconfig }}_defconfig
run: |
echo "Building ${{ matrix.defconfig }}_defconfig ..."
make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))
- name: Resulting size of build
run: |
printf "Size of output/images/: "
ls -l output/images/
- name: Prepare ${{ matrix.defconfig }} Artifact
run: |
cd output/
mv images ${{ steps.vars.outputs.dirname }}
tar cfz ${{ steps.vars.outputs.archive }} ${{ steps.vars.outputs.dirname }}/
- uses: actions/upload-artifact@v4
with:
path: output/${{ steps.vars.outputs.archive }}
name: artifact-${{ matrix.defconfig }}
publish:
name: Upload Bootloader Artifacts
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true
- name: Create checksums ...
run: |
for file in *.tar.gz; do
sha256sum $file > $file.sha256
done
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitName: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
tag: "latest-boot"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "*.tar.gz*"
- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Bootloader Build Complete! :rocket:
For the public download links of these bootloader artifacts, please see:
<https://github.com/kernelkit/infix/releases/tag/latest-boot>
EOF
+88 -129
View File
@@ -1,27 +1,57 @@
name: Bob the Builder
name: Build
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
push:
branches:
- main
workflow_dispatch:
inputs:
minimal:
description: 'Build minimal defconfigs'
required: false
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
workflow_call:
inputs:
target:
required: true
type: string
name:
required: true
type: string
infix_repo:
required: false
type: string
default: kernelkit/infix
parallel:
required: false
type: boolean
default: false
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 }}
jobs:
build:
name: Build Infix ${{ matrix.target }}
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:
matrix:
target: [aarch64, x86_64]
fail-fast: false
outputs:
build_id: ${{ steps.vars.outputs.INFIX_BUILD_ID }}
steps:
- name: Cleanup Build Folder
run: |
@@ -30,34 +60,35 @@ jobs:
rm -rf ./.??* || true
ls -la ./
- uses: actions/checkout@v4
- name: Checkout infix repo
uses: actions/checkout@v4
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ github.ref }}
clean: true
fetch-depth: 0
submodules: recursive
- name: Set Build Variables
id: vars
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ "${{ github.event.inputs.minimal }}" == "true" ]; then
flavor="_minimal"
fi
else
# Ensure 'release' job get the proper image when building main
if [ "$GITHUB_REF_NAME" != "main" ]; then
flavor="_minimal"
else
flavor=""
fi
if ${{ contains(github.event.pull_request.labels.*.name, 'ci:main') }}; then
flavor=""
fi
if [ -n "${{ github.event.pull_request.head.sha }}" ]; then
# Since PRs are built from an internally generated merge
# commit, reverse lookups of PRs and/or commits from
# image version information are cumbersome. Therefore:
# explicitly set a build id that references both the PR
# and the commit.
printf "INFIX_BUILD_ID=pr%d.%.7s\n" \
"${{ github.event.number }}" "${{ github.event.pull_request.head.sha }}" \
| tee -a $GITHUB_OUTPUT $GITHUB_ENV
fi
target=${{ matrix.target }}
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
echo "flv=$flavor" >> $GITHUB_OUTPUT
echo "Building target ${target}${flavor}_defconfig"
target=${{ env.TARGET }}
name=${{ env.NAME }}
echo "dir=${name}-${target}" >> $GITHUB_OUTPUT
echo "tgz=${name}-${target}.tar.gz" >> $GITHUB_OUTPUT
echo "Building target ${target}_defconfig"
- name: Restore Cache of dl/
uses: actions/cache@v4
with:
@@ -70,23 +101,37 @@ jobs:
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
key: ccache-${{ env.TARGET }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-${{ matrix.target }}-
ccache-${{ env.TARGET }}-
ccache-
- name: Configure ${{ matrix.target }}${{ steps.vars.outputs.flv }}
- name: Configure ${{ env.TARGET }}
run: |
make ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig
make ${{ env.TARGET }}_defconfig
- name: Unit Test ${{ matrix.target }}
- name: Unit Test ${{ env.TARGET }}
run: |
make test-unit
- name: Build ${{ matrix.target }}${{ steps.vars.outputs.flv }}
- name: Prepare parallel build
id: parallel
run: |
echo "Building ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig ..."
make
if [ "$PARALLEL" == "true" ]; then
echo "BR2_PER_PACKAGE_DIRECTORIES=y" >> output/.config
MAKE="make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
echo "Building in parallel with -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
else
echo "Disabling parallel build"
MAKE="make"
fi
echo "MAKE=$MAKE" >> $GITHUB_OUTPUT
- name: Build ${{ env.TARGET }}
run: |
echo "Building ${{ env.TARGET }}_defconfig ..."
eval "${{ steps.parallel.outputs.MAKE }}"
- name: Check SBOM from Build
run: |
@@ -107,100 +152,14 @@ jobs:
printf "Size of output/images/: "
ls -l output/images/
- name: Prepare ${{ matrix.target }} Artifact
- name: Prepare ${{ env.TARGET }} Artifact
run: |
cd output/
mv images ${{ steps.vars.outputs.dir }}
ln -s ${{ steps.vars.outputs.dir }} images
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
- uses: actions/upload-artifact@v4
with:
path: output/${{ steps.vars.outputs.tgz }}
name: artifact-${{ matrix.target }}
test:
name: Regression Test of Infix x86_64
needs: build
runs-on: [ self-hosted, regression ]
steps:
- uses: actions/checkout@v4
with:
clean: true
submodules: recursive
- name: Set Build Variables
id: vars
run: |
if [ "$GITHUB_REF_NAME" != "main" ]; then
flavor="_minimal"
else
flavor=""
fi
echo "flv=$flavor" >> $GITHUB_OUTPUT
- name: Configure x86_64${{ steps.vars.outputs.flv }}
run: |
make x86_64${{ steps.vars.outputs.flv }}_defconfig
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true
- name: Restore x86-64${{ steps.vars.outputs.flv }} output/
run: |
ls -l
mkdir -p output
mv infix-x86_64.tar.gz output/
cd output/
tar xf infix-x86_64.tar.gz
ln -s infix-x86_64 images
- name: Regression Test x86_64${{ steps.vars.outputs.flv }}
run: |
make test
- name: Publish Test Result for x86_64${{ steps.vars.outputs.flv }}
# Ensure this runs even if Regression Test fails
if: always()
run: cat test/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
release:
if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}}
name: Upload Latest Build
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true
- name: Create checksums ...
run: |
for file in *.tar.gz; do
sha256sum $file > $file.sha256
done
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitName: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
tag: "latest"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "*.tar.gz*"
- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Latest Build Complete! :rocket:
For the public download links of these build artifacts, please see:
<https://github.com/kernelkit/infix/releases/tag/latest>
EOF
name: artifact-${{ env.TARGET }}
+3 -1
View File
@@ -55,7 +55,7 @@ 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 libite-dev
libuev-dev
- name: Build dependencies
run: |
@@ -65,6 +65,8 @@ jobs:
git clone https://github.com/sysrepo/sysrepo.git
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
- name: Check applications
+67
View File
@@ -0,0 +1,67 @@
name: User Guide Generator
on:
push:
branches:
- doc
- main
tags:
- 'v*'
paths:
- 'doc/**'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
permissions:
contents: write
concurrency:
group: "docs-${{ github.ref }}"
cancel-in-progress: false
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pipx install mkdocs
pipx inject mkdocs mkdocs-material
pipx inject mkdocs pymdown-extensions
pipx inject mkdocs mkdocs-callouts
pipx inject mkdocs mike
pipx inject mkdocs mkdocs-to-pdf
# Workaround, if pipx inject fails to install symlink
ln -s "$(pipx environment -V PIPX_LOCAL_VENVS)/mkdocs/bin/mike" \
"$(pipx environment -V PIPX_BIN_DIR)/mike" || true
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy dev version
if: github.event_name == 'push' && (github.ref == 'refs/heads/doc' || github.ref == 'refs/heads/main')
run: |
mike deploy --push --update-aliases dev latest
mike set-default --push latest
- name: Deploy tagged version
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: |
TAG=${GITHUB_REF#refs/tags/v}
# Extract YEAR.MONTH from tag (e.g., v25.06.0-beta1 -> 25.06)
VERSION=$(echo $TAG | sed -E 's/^([0-9]+\.[0-9]+)(\.[0-9]+)?(-.*)?$/\1/')
echo "Deploying tag $TAG as docs version $VERSION"
mike deploy --push --update-aliases $VERSION latest
mike set-default --push latest
+73
View File
@@ -0,0 +1,73 @@
name: Generic X86 GitHub Build
on:
push:
jobs:
build:
if: github.repository != 'kernelkit/infix'
name: Infix x86_64
runs-on: ubuntu-latest
steps:
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
bc binutils build-essential bzip2 cpio \
diffutils file findutils git gzip \
libncurses-dev libssl-dev perl patch \
python3 rsync sed tar unzip wget \
autopoint bison flex autoconf automake \
mtools
- name: Checkout infix repo
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
fetch-depth: 0
submodules: recursive
- name: Set Build Variables
id: vars
run: |
echo "INFIX_BUILD_ID=${{ github.run_id }}" >> $GITHUB_OUTPUT
echo "dir=Infix-x86_64" >> $GITHUB_OUTPUT
echo "tgz=Infix-x86_64.tar.gz" >> $GITHUB_OUTPUT
- name: Configure x86_64_minimal
run: |
make x86_64_minimal_defconfig
- name: Unit Test x86_64
run: |
make test-unit
- name: Build x86_64_minimal
run: |
make
- name: Check SBOM
run: |
make legal-info
- name: Report Build Size
run: |
du -sh .
du -sh output
du -sh dl || true
ls -l output/images/
- name: Prepare Artifact
run: |
cd output/
mv images Infix-x86_64
ln -s Infix-x86_64 images
tar cfz Infix-x86_64.tar.gz Infix-x86_64
- uses: actions/upload-artifact@v4
with:
path: output/Infix-x86_64.tar.gz
name: artifact-x86_64
+44
View File
@@ -0,0 +1,44 @@
name: Publish latest Infix
on:
workflow_dispatch:
workflow_call:
jobs:
publish:
name: Upload Latest Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true
- name: Create checksums ...
run: |
for file in *.tar.gz; do
sha256sum $file > $file.sha256
done
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
replacesArtifacts: true
omitName: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
tag: "latest"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "*.tar.gz*"
- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Latest Build Complete! :rocket:
For the public download links of these build artifacts, please see:
<https://github.com/kernelkit/infix/releases/tag/latest>
EOF
+16 -4
View File
@@ -85,16 +85,21 @@ jobs:
cd output/
mv images ${{ steps.vars.outputs.dir }}
ln -s ${{ steps.vars.outputs.dir }} images
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
mv legal-info legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
tar chfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
tar cfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.target }}
path: output/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: artifact-disk-image-${{ matrix.target }}
path: output/images/*.qcow2
release:
name: Release Infix ${{ github.ref_name }}
needs: build
@@ -116,12 +121,14 @@ jobs:
ver=${GITHUB_REF#refs/tags/}
fi
echo "ver=${ver}" >> $GITHUB_OUTPUT
echo "cat=" >> $GITHUB_OUTPUT
if echo $ver | grep -qE 'v[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then
echo "pre=true" >> $GITHUB_OUTPUT
echo "latest=false" >> $GITHUB_OUTPUT
elif echo $ver | grep -qE '^v[0-9.]+\.[0-9.]+(\.[0-9]+)?$'; then
echo "pre=false" >> $GITHUB_OUTPUT
echo "latest=true" >> $GITHUB_OUTPUT
echo "cat=Releases" >> $GITHUB_OUTPUT
else
echo "pre=false" >> $GITHUB_OUTPUT
echo "latest=false" >> $GITHUB_OUTPUT
@@ -139,6 +146,11 @@ jobs:
for file in *.tar.gz; do
sha256sum $file > $file.sha256
done
if ls *.qcow2 &>/dev/null; then
for file in *.qcow2; do
sha256sum "$file" > "$file.sha256"
done
fi
- name: Extract ChangeLog entry ...
run: |
@@ -151,9 +163,9 @@ jobs:
name: Infix ${{ github.ref_name }}
prerelease: ${{ steps.rel.outputs.pre }}
makeLatest: ${{ steps.rel.outputs.latest }}
discussionCategory: Releases
discussionCategory: ${{ steps.rel.outputs.cat }}
bodyFile: release.md
artifacts: "*.tar.gz*"
artifacts: "*.tar.gz*,*.qcow2*"
- name: Summary
run: |
+110
View File
@@ -0,0 +1,110 @@
name: Test Infix
on:
workflow_dispatch:
inputs:
infix_repo:
description: 'Repo to checkout (for spin overrides)'
required: false
default: kernelkit/infix
type: string
workflow_call:
inputs:
target:
required: true
type: string
name:
required: true
type: string
infix_repo:
required: false
type: string
default: kernelkit/infix
ninepm-conf:
required: false
type: string
default: ''
test-path:
required: false
type: string
default: 'test'
env:
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 }}
NINEPM_CONF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ninepm-conf || inputs.ninepm-conf }}
TEST_PATH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test-path || inputs.test-path }}
jobs:
test:
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: Checkout infix repo
uses: actions/checkout@v4
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ github.ref }}
clean: true
fetch-depth: 0
submodules: recursive
- name: Set Build Variables
id: vars
run: |
if [ -n "${{ needs.build.outputs.build_id }}" ]; then
echo "INFIX_BUILD_ID=${{ needs.build.outputs.build_id }}" \
>>$GITHUB_ENV
fi
- name: Configure ${{ env.TARGET }}
run: |
make ${{ env.TARGET }}_defconfig
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true
- name: Restore ${{ env.TARGET }} output/
run: |
target=${{ env.TARGET }}
name=${{ inputs.name }}
ls -l
mkdir -p output
mv ${name}-${target}.tar.gz output/
cd output/
tar xf ${name}-${target}.tar.gz
ln -s ${name}-${target} images
- name: Regression Test ${{ env.TARGET }}
run: |
if [ -n "$NINEPM_CONF" ]; then
export NINEPM_PROJ_CONFIG="${GITHUB_WORKSPACE}/$NINEPM_CONF"
echo "DEBUG: NINEPM_PROJ_CONFIG is '$NINEPM_PROJ_CONFIG'"
fi
make test
- name: Publish Test Result for ${{ env.TARGET }}
# Ensure this runs even if Regression Test fails
if: always()
run: cat $TEST_PATH/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
- name: Generate Test Report for ${{ env.TARGET }}
# Ensure this runs even if Regression Test fails
if: always()
run: |
asciidoctor-pdf \
--theme $TEST_PATH/9pm/report/theme.yml \
-a pdf-fontsdir=$TEST_PATH/9pm/report/fonts \
$TEST_PATH/.log/last/report.adoc \
-o $TEST_PATH/.log/last/report.pdf
- name: Upload Test Report as Artifact
uses: actions/upload-artifact@v4
with:
name: test-report
path: ${{ env.TEST_PATH }}/.log/last/report.pdf
+38
View File
@@ -0,0 +1,38 @@
name: Kernelkit Trigger
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
push:
branches:
- main
- ci-work
workflow_dispatch:
jobs:
build-x86_64:
if: startsWith(github.repository, 'kernelkit/')
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:main') && 'x86_64_minimal' || 'x86_64' }}
build-aarch64:
if: startsWith(github.repository, 'kernelkit/')
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:main') && 'aarch64_minimal' || 'aarch64' }}
test-run-x86_64:
if: startsWith(github.repository, 'kernelkit/')
needs: build-x86_64
uses: ./.github/workflows/test.yml
with:
target: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:main') && 'x86_64_minimal' || 'x86_64' }}
name: "infix"
test-publish-x86_64:
if: startsWith(github.repository, 'kernelkit/')
needs: test-run-x86_64
uses: ./.github/workflows/publish.yml
+1
View File
@@ -8,3 +8,4 @@
/test/.venv
/test/.log
/local.mk
/test/spec/Readme.adoc
+1 -1
View File
@@ -65,7 +65,7 @@ config INFIX_COMPATIBLE
config INFIX_TAGLINE
string "Operating system tagline"
default "Infix -- a Network Operating System"
default "Infix OS — Immutable.Friendly.Secure"
help
Mandatory. Used for identifying the OS, e.g. as PRETTY_NAME in
/etc/os-release and description in the GNS3 appliance.
+101 -66
View File
@@ -2,55 +2,69 @@
<img align="right" src="doc/logo.png" alt="Infix - Linux <3 NETCONF" width=480 border=10>
Infix is a free, Linux based, immutable Network Operating System (NOS)
built on [Buildroot][1], and [sysrepo][2]. A powerful mix that ease
porting to different platforms, simplify long-term maintenance, and
provide made-easy management using NETCONF, RESTCONF[^2], or the
built-in command line interface (CLI) from a console or SSH login.
Turn any ARM or x86 device into a powerful, manageable network appliance
in minutes. From $35 Raspberry Pi boards to enterprise switches — deploy
routers, IoT gateways, edge devices, or custom network solutions that
just work.
> Click the **▶ Example CLI Session** foldout below for an example, or
> head on over to the [Infix Documentation](doc/README.md) for more
> information on how to set up the system.
## Our Values
Although primarily focused on switches and routers, the core values
may be appealing for other use-cases as well:
**🔒 Immutable**
Your system never breaks. Read-only filesystem with atomic upgrades
means no configuration drift, no corrupted updates, and instant rollback
if something goes wrong. Deploy once, trust forever.
- Runs from a squashfs image on a read-only partition
- Single configuration file on a separate partition
- Built around YANG with standard IETF models
- Linux switchdev provides open switch APIs
- Atomic upgrades to secondary partition
- Highly security focused
**🤝 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.
An immutable[^1] operating system enhances security and inherently makes
it maintenance-free. Configuration and data, e.g, containers, is stored
on separate partitions to ensure complete separation from system files
and allow for seamless backup, restore, and provisioning.
**🛡️ Secure**
Built with security as a foundation, not an afterthought. Minimal
attack surface, separation between system and data, and container
isolation. Sleep better knowing your infrastructure is protected.
In itself Infix is perfectly suited for dedicated networking tasks and
native support for Docker containers provides a versatile platform that
can easily be adapted to any customer need. Be it legacy applications,
network protocols, process monitoring, or edge data analysis, it can run
close to end equipment. Either directly connected on dedicated Ethernet
ports or indirectly using virtual network cables to exist on the same
LAN as other connected equipment.
## Why Choose Infix
The simple design of Infix provides complete control over both system
and data, minimal cognitive burden, and makes it incredibly easy to get
started.
**Hardware Flexibility**: Start with a $35 Raspberry Pi, scale to
enterprise switching hardware. Same OS, same tools, same reliability.
<details><summary><b>Example CLI Session</b></summary>
**Standards-Based**: Built around YANG models and IETF standards. Learn
once, use everywhere - no vendor lock-in.
The CLI configure context is automatically generated from the loaded
YANG models and their corresponding [sysrepo][2] plugins. The following
is brief example of how to set the IP address of an interface:
**Container Ready**: Run your applications alongside networking
functions. GPIO access, dedicated Ethernet ports, custom protocols —
your device, your rules.
```
## Use Cases
1. **Home Labs & Hobbyists**:
Transform a Raspberry Pi into a full-featured router with WiFi
1. **IoT & Edge Computing**:
Bridge devices to the cloud with reliable, updatable gateways
1. **Small Business Networks**:
Enterprise-grade features without the complexity or cost
1. **Developers & Makers**:
Test networking concepts, prototype IoT solutions, or build custom
appliances
1. **Network Professionals**:
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
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
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
type ethernet;
@@ -59,7 +73,6 @@ ipv4 {
prefix-length 24;
}
}
ipv6
admin@infix-12-34-56:/config/interface/eth0/> diff
interfaces {
interface eth0 {
@@ -82,43 +95,65 @@ lo ethernet UP 00:00:00:00:00:00
admin@infix-12-34-56:/> copy running-config startup-config
```
[Click here][3] for more details.
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.
</details>
Infix can run on many different types of architectures and boards, much
thanks to Linux and Buildroot. Currently the focus is on 64-bit ARM
devices, optionally with switching fabric supported by Linux switchdev.
The [following boards](board/aarch64/README.md) are fully supported:
> [Full CLI documentation →][3]
- Marvell CN9130 CRB
- Marvell EspressoBIN
- Microchip SparX-5i PCB135 (eMMC)
- StarFive VisionFive2
- NanoPi R2S
## Get Started
An x86_64 build is also available, primarily intended for development
and testing, but can also be used for evaluation and demo purposes. For
more information, see: [Infix in Virtual Environments](doc/virtual.md).
Get [pre-built images][5] for your hardware. Use the CLI, web
interface, or standard NETCONF/RESTCONF tools, e.g., `curl`. Add
containers for any custom functionality you need.
> See the [GitHub Releases](https://github.com/kernelkit/infix/releases)
> page for our pre-built images. The *[Latest Build][]* has bleeding
> edge images, if possible we recommend using a versioned release.
>
> For *customer specific builds* of Infix, see your product repository.
### Supported Platforms
[^1]: An immutable operating system is one with read-only file systems,
atomic updates, rollbacks, declarative configuration, and workload
isolation. All to improve reliability, scalability, and security.
For more information, see <https://ceur-ws.org/Vol-3386/paper9.pdf>
and <https://www.zdnet.com/article/what-is-immutable-linux-heres-why-youd-run-an-immutable-linux-distro/>.
- **Raspberry Pi 4B** - Perfect for home labs, learning, and prototyping
- **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 ARM platforms
- **Microchip SparX-5i, NXP i.MX8MP EVK** - Enterprise switching capabilities
- **StarFive VisionFive2** - RISC-V architecture support
[^2]: Partial RESTCONF support, features like HTTP PATCH, OPTIONS, HEAD,
and copying between datastores are still missing.
*Why start with Raspberry Pi?* It's affordable, widely available, has
built-in WiFi + Ethernet, and runs the exact same Infix OS you'd deploy
in production. Perfect for learning, prototyping, or even small-scale
deployments.
[1]: https://buildroot.org/
[2]: https://www.sysrepo.org/
[3]: doc/cli/introduction.md
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest
> 📖 **[Complete documentation][4]** • 💬 **[Join our Discord][discord-url]**
## Technical Details
Built on proven open-source foundations ([Buildroot][1] + [sysrepo][2])
for reliability you can trust:
- **Immutable OS**: Read-only filesystem, atomic updates, instant rollback
- **YANG Configuration**: Industry-standard models with auto-generated tooling
- **Hardware Acceleration**: Linux switchdev support for wire-speed packet processing
- **Container Integration**: Docker support with flexible network and hardware access
- **Memory Efficient**: Runs comfortably on devices with as little as 256 MB RAM
Perfect for everything from resource-constrained edge devices to
high-throughput network appliances.
> Check the *[Latest Build][]* for bleeding-edge features.
---
<div align="center">
<a href="https://github.com/wires-se"><img src="https://raw.githubusercontent.com/wires-se/.github/main/profile/play.svg" width=300></a>
<br />Infix development is sponsored by <a href="https://wires.se">Wires</a>
</div>
[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
[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
[GitHub]: https://github.com/kernelkit/infix/actions/workflows/build.yml/
+45
View File
@@ -7,3 +7,48 @@ Board Specific Documentation
- [Marvell CN9130-CRB](cn9130-crb/)
- [Microchip SparX-5i PCB135 (eMMC)](sparx5-pcb135/)
- [NanoPi R2S](r2s/)
- [Raspberry Pi 4 b](#raspberry-pi-4-b)
# Raspberry Pi 4 b
## Support level
Full support for base board but not any extension board on the
GPIOs.
### Touch screen
The [Raspberry Pi touch display v1][RPI-TOUCH] is supported, including
touch functionality. There are multiple touchscreens on the market for
Raspberry Pi, but only the official (first version with 800x480
resolution) is currently supported. Infix supplies all drivers
required to utilize the hardware, but you need to add the actual
graphical application in a container.
There are some important considerations you need to know about when
using Infix for graphical applications. The container needs access to
/dev/dri/ to be able to access the graphics card, and it also needs
access to /run/udev to be able to find the input devices.
Example of running Doom in Infix:
```cli
admin@example:/> configure
admin@example:/config/> edit container doom
admin@example:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
admin@example:/config/container/doom/> set privileged
admin@example:/config/container/doom/> edit mount udev
admin@example:/config/container/doom/mount/udev/> set type bind
admin@example:/config/container/doom/mount/udev/> set target /run/udev/
admin@example:/config/container/doom/mount/udev/> set source /run/udev/
admin@example:/config/container/doom/mount/udev/> end
admin@example:/config/container/doom/mount/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
admin@example:/config/container/doom/mount/xorg.conf/> set target /etc/X11/xorg.conf
admin@example:/config/container/doom/mount/xorg.conf/> end
admin@example:/config/container/doom/> edit volume var
admin@example:/config/container/doom/volume/var/> set target /var
admin@example:/config/container/doom/volume/var/> leave
admin@example:/>
```
[RPI-TOUCH]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
+4
View File
@@ -128,5 +128,9 @@ SD-card partition.
> If possible, serve `infix-aarch64.pkg` over HTTP instead, as
> libcurl's TFTP implementation is quite slow.
## Console Port
The console port runs at 115200 baud, 8N1.
[release]: https://github.com/kernelkit/infix/releases
[mvebu64boot]: https://github.com/addiva-elektronik/mvebu64boot
+11 -3
View File
@@ -34,6 +34,10 @@ CONFIG_PROFILING=y
CONFIG_ARCH_SPARX5=y
CONFIG_ARCH_MVEBU=y
CONFIG_ARCH_VEXPRESS=y
CONFIG_ARM64_ERRATUM_2441007=y
CONFIG_ARM64_ERRATUM_1286807=y
CONFIG_ARM64_ERRATUM_1542419=y
CONFIG_ARM64_ERRATUM_2441009=y
CONFIG_ARM64_VA_BITS_48=y
CONFIG_SCHED_MC=y
CONFIG_NR_CPUS=64
@@ -57,6 +61,7 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_KSM=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_CMA=y
CONFIG_CMA_AREAS=7
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_XDP_SOCKETS=y
@@ -165,7 +170,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_BPFILTER=y
CONFIG_BRIDGE=y
CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_BRIDGE_MRP=y
@@ -227,6 +231,7 @@ CONFIG_SCSI_SAS_ATA=y
CONFIG_SCSI_VIRTIO=y
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_SATA_MOBILE_LPM_POLICY=0
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_AHCI_MVEBU=y
CONFIG_PATA_OF_PLATFORM=y
@@ -282,6 +287,7 @@ CONFIG_NET_DSA_MV88E6XXX_PTP=y
CONFIG_MVNETA=m
CONFIG_MVPP2=m
# CONFIG_NET_VENDOR_MELLANOX is not set
# CONFIG_NET_VENDOR_META is not set
# CONFIG_NET_VENDOR_MICREL is not set
CONFIG_SPARX5_SWITCH=y
# CONFIG_NET_VENDOR_MICROSEMI is not set
@@ -353,13 +359,14 @@ CONFIG_SERIAL_XILINX_PS_UART=y
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
CONFIG_SERIAL_MVEBU_UART=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_CN10K=m
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_GPIO=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_MUX_PINCTRL=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_DESIGNWARE_CORE=y
CONFIG_I2C_MV64XXX=y
CONFIG_I2C_SLAVE=y
CONFIG_SPI=y
@@ -495,6 +502,7 @@ CONFIG_EXTCON_USB_GPIO=y
CONFIG_IIO=y
CONFIG_TI_ADC081C=y
CONFIG_PWM=y
CONFIG_RESET_GPIO=y
CONFIG_PHY_MVEBU_CP110_COMPHY=y
CONFIG_PHY_MVEBU_CP110_UTMI=y
CONFIG_PHY_SAMSUNG_USB2=y
@@ -523,13 +531,13 @@ CONFIG_9P_FS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_SECURITY=y
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,bpf"
CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_GHASH_ARM64_CE=y
CONFIG_CRYPTO_SHA1_ARM64_CE=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=0
+3
View File
@@ -0,0 +1,3 @@
# QEMU-specific U-Boot config
# Enable PCI MMC for QEMU virtualized environment
CONFIG_MMC_PCI=y
+7
View File
@@ -101,6 +101,13 @@ Worth noting, unlike many other boards, the Rockchip family of chipsets
runs the UART at 1500000 bps (1.5 Mbps) 8N1.
Console Port
------------
Unlike many other boards, the NanoPi R2S console, and in fact all
Rockchip family chipsets, runs at 1500000 bps (1.5 Mbps) 8N1.
Secure Boot
-----------
-2
View File
@@ -230,7 +230,6 @@ CONFIG_MAC80211_LEDS=y
CONFIG_RFKILL=y
CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
# CONFIG_ETHTOOL_NETLINK is not set
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCI_IOV=y
@@ -481,7 +480,6 @@ CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_GPIO=m
CONFIG_I2C_RK3X=y
CONFIG_I2C_SLAVE=y
+7 -7
View File
@@ -45,11 +45,11 @@ The default credentials for the demo builds is
login: admin
password: admin
Infix -- a Network Operating System v24.09.0-rc1 (hvc0)
Infix OS — Immutable.Friendly.Secure v24.09.0-rc1 (hvc0)
infix-00-00-00 login: admin
Password:
.-------.
| . . | Infix -- a Network Operating System
| . . | Infix OS — Immutable.Friendly.Secure
|-. v .-| https://kernelkit.org
'-'---'-'
@@ -122,9 +122,9 @@ There's a lot of tutorials and guides online, start here:
About
-----
Infix is a free, Linux based, immutable Network Operating System (NOS)
built on Buildroot, and sysrepo. A powerful mix that ease porting to
different platforms, simplify long-term maintenance, and provide easy
management using NETCONF, RESTCONF, or the built-in command line
interface (CLI) from a console or SSH login.
Infix is a free, Linux-based, immutable operating system built around
Buildroot, and sysrepo. A powerful mix that ease porting to different
platforms, simplify long-term maintenance, and provide easy management
using NETCONF, RESTCONF, or the built-in command line interface (CLI)
from a console or SSH login.
+5 -5
View File
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.36.1
# Tue Oct 22 13:12:02 2024
# Sun Feb 9 12:25:37 2025
#
CONFIG_HAVE_DOT_CONFIG=y
@@ -17,7 +17,7 @@ CONFIG_SHOW_USAGE=y
CONFIG_FEATURE_VERBOSE_USAGE=y
# CONFIG_FEATURE_COMPRESS_USAGE is not set
CONFIG_LFS=y
# CONFIG_PAM is not set
CONFIG_PAM=y
CONFIG_FEATURE_DEVPTS=y
CONFIG_FEATURE_UTMP=y
CONFIG_FEATURE_WTMP=y
@@ -325,7 +325,7 @@ CONFIG_FEATURE_STAT_FILESYSTEM=y
CONFIG_STTY=y
CONFIG_SUM=y
CONFIG_SYNC=y
# CONFIG_FEATURE_SYNC_FANCY is not set
CONFIG_FEATURE_SYNC_FANCY=y
CONFIG_FSYNC=y
# CONFIG_TAC is not set
CONFIG_TAIL=y
@@ -336,7 +336,7 @@ CONFIG_TEST=y
CONFIG_TEST1=y
CONFIG_TEST2=y
CONFIG_FEATURE_TEST_64=y
# CONFIG_TIMEOUT is not set
CONFIG_TIMEOUT=y
CONFIG_TOUCH=y
CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_TR=y
@@ -357,7 +357,7 @@ CONFIG_BASE32=y
CONFIG_BASE64=y
CONFIG_UUENCODE=y
CONFIG_WC=y
# CONFIG_FEATURE_WC_LARGE is not set
CONFIG_FEATURE_WC_LARGE=y
CONFIG_WHO=y
CONFIG_W=y
CONFIG_USERS=y
+5 -3
View File
@@ -127,7 +127,7 @@ bootdata=
diskimg=disk.img
bootimg=
bootpart=
tmpimage=$(mktemp)
while getopts "a:b:B:n:s:" opt; do
case ${opt} in
a)
@@ -166,7 +166,7 @@ awk \
-vimgsize=$imgsize \
-vcfgsize=$cfgsize \
-vvarsize=$varsize \
-vdiskimg=$diskimg \
-vdiskimg=$tmpimage \
-vbootimg="$bootimg" -vbootpart="$bootpart" \
'{
sub(/@TOTALSIZE@/, total);
@@ -211,5 +211,7 @@ genimage \
--rootpath "$root" \
--tmppath "$tmp" \
--inputpath "$BINARIES_DIR" \
--outputpath "$BINARIES_DIR" \
--config "$root/genimage.cfg"
qemu-img convert -c -O qcow2 "$tmpimage" "$BINARIES_DIR/$diskimg"
rm "$tmpimage"
+1 -3
View File
@@ -2,8 +2,6 @@
set -e
GIT_VERSION=$(git -C "$BR2_EXTERNAL_INFIX_PATH" describe --always --dirty --tags)
name=$1
compat=$2
sign=$3
@@ -26,7 +24,7 @@ cp -f "$BINARIES_DIR/rootfs.itbh" "$work/rootfs.itbh"
cat >"$work/manifest.raucm" <<EOF
[update]
compatible=${compat}
version=${GIT_VERSION}
version=${INFIX_VERSION}
[bundle]
format=verity
+11 -21
View File
@@ -39,22 +39,6 @@ if [ -n "${ID_LIKE}" ]; then
ID="${ID} ${ID_LIKE}"
fi
if [ -z "$GIT_VERSION" ]; then
infix_path="$BR2_EXTERNAL_INFIX_PATH"
if [ -n "$INFIX_OEM_PATH" ]; then
# Use version from br2-external OEM:ing Infix
infix_path="$INFIX_OEM_PATH"
fi
GIT_VERSION=$(git -C "$infix_path" describe --always --dirty --tags)
fi
# Override VERSION in /etc/os-release and filenames for release builds
if [ -n "$INFIX_RELEASE" ]; then
VERSION="$INFIX_RELEASE"
else
VERSION=$GIT_VERSION
fi
if [ -n "$INFIX_IMAGE_ID" ]; then
NAME="$INFIX_IMAGE_ID"
else
@@ -71,12 +55,12 @@ rm -f "$TARGET_DIR/etc/os-release"
{
echo "NAME=\"$INFIX_NAME\""
echo "ID=$INFIX_ID"
echo "PRETTY_NAME=\"$INFIX_TAGLINE $VERSION\""
echo "PRETTY_NAME=\"$INFIX_TAGLINE $INFIX_VERSION\""
echo "ID_LIKE=\"${ID}\""
echo "DEFAULT_HOSTNAME=$BR2_TARGET_GENERIC_HOSTNAME"
echo "VERSION=\"${VERSION}\""
echo "VERSION_ID=${VERSION}"
echo "BUILD_ID=\"${GIT_VERSION}\""
echo "VERSION=\"${INFIX_VERSION}\""
echo "VERSION_ID=${INFIX_VERSION}"
echo "BUILD_ID=\"${INFIX_BUILD_ID}\""
if [ -n "$INFIX_IMAGE_ID" ]; then
echo "IMAGE_ID=\"$INFIX_IMAGE_ID\""
fi
@@ -102,7 +86,7 @@ rm -f "$TARGET_DIR/etc/os-release"
fi
} > "$TARGET_DIR/etc/os-release"
echo "$INFIX_TAGLINE $VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
echo "$INFIX_TAGLINE $INFIX_VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
# In case of ambguities, this is what the image was built from
cp "$BR2_CONFIG" "$TARGET_DIR/usr/share/infix/config"
@@ -130,6 +114,12 @@ grep -qsE '^/bin/true$$' "$TARGET_DIR/etc/shells" \
grep -qsE '^/bin/false$$' "$TARGET_DIR/etc/shells" \
|| echo "/bin/false" >> "$TARGET_DIR/etc/shells"
boards=$(${BR2_EXTERNAL_INFIX_PATH}/board/common/selected-boards.sh ${BR2_EXTERNAL_INFIX_PATH} ${O})
for board in $boards; do
[ ! -f "${BR2_EXTERNAL_INFIX_PATH}/src/board/${board}/post-build.sh" ] && continue
${BR2_EXTERNAL_INFIX_PATH}/src/board/${board}/post-build.sh
done
# Allow clish (symlink to /usr/bin/klish) to be a login shell
grep -qsE '^/bin/clish$$' "$TARGET_DIR/etc/shells" \
|| echo "/bin/clish" >> "$TARGET_DIR/etc/shells"
+20 -18
View File
@@ -23,7 +23,7 @@ if [ -n "$IMAGE_ID" ]; then
else
NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/')
fi
diskimg=disk.img
diskimg=disk.qcow2
ver()
{
@@ -48,7 +48,7 @@ fi
load_cfg DISK_IMAGE
if [ "$DISK_IMAGE" = "y" ]; then
ixmsg "Creating Disk Image"
diskimg="${NAME}-disk$(ver).img"
diskimg="${NAME}-disk$(ver).qcow2"
bootcfg=
if [ "$DISK_IMAGE_BOOT_DATA" ]; then
bootcfg="-b $DISK_IMAGE_BOOT_DATA -B $DISK_IMAGE_BOOT_OFFSET"
@@ -86,25 +86,27 @@ if [ "$FIT_IMAGE" = "y" ]; then
$common/mkfit.sh
fi
# Only for regular builds, not bootloader-only builds
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" = "y" ]; then
rel=$(ver)
ln -sf rootfs.squashfs "$BINARIES_DIR/${NAME}${rel}.img"
if [ -n "$rel" ]; then
ln -sf "$BINARIES_DIR/${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
ln -sf "${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
fi
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/usr/bin/onieprom" "$BINARIES_DIR/"
# Menuconfig support for modifying Qemu args in release tarballs
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/"
sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \
-e "s/@DISK_IMG@/$diskimg/" \
< "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \
> "$BINARIES_DIR/Config.in"
rm -f "$BINARIES_DIR/qemu.cfg"
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
# Quick intro for beginners, with links to more information
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/README.txt" "$BINARIES_DIR/"
fi
# Menuconfig support for modifying Qemu args in release tarballs
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/usr/bin/onieprom" "$BINARIES_DIR/"
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/"
sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \
-e "s/@DISK_IMG@/$diskimg/" \
< "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \
> "$BINARIES_DIR/Config.in"
rm -f "$BINARIES_DIR/qemu.cfg"
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
# Quick intro for beginners, with links to more information
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/README.txt" "$BINARIES_DIR/"
+11 -3
View File
@@ -66,7 +66,7 @@ endchoice
config QEMU_MACHINE
string "Select emulated machine"
default "qemu-system-aarch64 -M virt,accel=kvm:tcg -cpu max" if QEMU_aarch64
default "qemu-system-aarch64 -M virt,accel=kvm:tcg -cpu max,pauth-impdef=on" if QEMU_aarch64
default "qemu-system-x86_64 -M pc,accel=kvm:tcg -cpu max" if QEMU_x86_64
help
You should not have to change this setting, although you may
@@ -78,7 +78,7 @@ config QEMU_MACHINE
config QEMU_MACHINE_RAM
string "RAM size (k/M/G)"
default "384M"
default "448M"
help
The default, 384 MiB, works for most configurations. However,
if you get kernel panic with: "System is deadlocked on memory",
@@ -189,7 +189,7 @@ config QEMU_CLOCK
comment "Networking"
choice
prompt "Mode"
prompt "Network Mode"
default QEMU_NET_USER
config QEMU_NET_NONE
@@ -204,6 +204,9 @@ config QEMU_NET_USER
config QEMU_NET_TAP
bool "TAP"
config QEMU_NET_ROCKER
bool "Rocker"
endchoice
config QEMU_NET_MODEL
@@ -229,3 +232,8 @@ config QEMU_NET_TAP_N
int "Number of TAPs"
depends on QEMU_NET_TAP
default 1
config QEMU_NET_PORTS
int "Number of Rocker switch ports"
depends on QEMU_NET_ROCKER
default 10
+68 -30
View File
@@ -17,9 +17,10 @@
#
# ./qemu.sh -h
#
# shellcheck disable=SC3037
# Local variables
imgdir=$(readlink -f $(dirname "$0"))
imgdir=$(readlink -f "$(dirname "$0")")
prognm=$(basename "$0")
usage()
@@ -30,6 +31,7 @@ usage()
echo "Options:"
echo " -c Run menuconfig to change Qemu settings"
echo " -h This help text"
echo " -k Keep generated qemu.run script (name shown at end)"
echo
echo "Arguments:"
echo " ARGS1 Args before the '--' separator are for kernel space"
@@ -54,19 +56,20 @@ die()
load_qemucfg()
{
local tmp=$(mktemp -p /tmp)
tmp=$(mktemp -p /tmp)
grep ^CONFIG_QEMU_ $1 >$tmp
. $tmp
rm $tmp
grep ^CONFIG_QEMU_ "$1" >"$tmp"
# shellcheck disable=SC1090
. "$tmp"
rm "$tmp"
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
[ "$CONFIG_QEMU_KERNEL" -a "$CONFIG_QEMU_BIOS" ] \
[ -n "$CONFIG_QEMU_KERNEL" ] && [ -n "$CONFIG_QEMU_BIOS" ] \
&& die "QEMU_KERNEL conflicts with QEMU_BIOS"
[ ! "$CONFIG_QEMU_KERNEL" -a ! "$CONFIG_QEMU_BIOS" ] \
[ -z "$CONFIG_QEMU_KERNEL" ] && [ -z "$CONFIG_QEMU_BIOS" ] \
&& die "QEMU_KERNEL or QEMU_BIOS must be set"
}
@@ -93,7 +96,7 @@ append_args()
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ]; then
# Size of initrd, rounded up to nearest kb
local size=$((($(stat -c %s $CONFIG_QEMU_ROOTFS) + 1023) >> 10))
size=$((($(stat -c %s "$CONFIG_QEMU_ROOTFS") + 1023) >> 10))
echo -n "root=/dev/ram0 ramdisk_size=${size} "
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
echo -n "root=PARTLABEL=primary "
@@ -117,7 +120,7 @@ rootfs_args()
echo -n "-device sd-card,drive=mmc "
echo -n "-drive id=mmc,file=$CONFIG_QEMU_ROOTFS,if=none,format=raw "
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
echo -n "-drive file=$CONFIG_QEMU_ROOTFS.qcow2,if=virtio,format=qcow2,bus=0,unit=0 "
echo -n "-drive file=qemu.qcow2,if=virtio,format=qcow2,bus=0,unit=0 "
fi
}
@@ -198,13 +201,24 @@ host_args()
net_dev_args()
{
local name="e$1"
local mac=$(printf "02:00:00:00:00:%02x" $1)
name="e$1"
mac=$(printf "02:00:00:00:00:%02x" "$1")
echo -n "-device $CONFIG_QEMU_NET_MODEL,netdev=$name,mac=$mac "
echo "$name $mac" >>"$mactab"
}
rocker_port_args()
{
sw=$1
port=$2
name="sw${sw}p${port}"
mac=$(printf "02:00:00:00:%02x:%02x" "$sw" "$port")
echo -n "-netdev tap,id=$name,ifname=$name,script=no,downscript=no "
echo "$name $mac" >> "$mactab"
}
net_args()
{
# Infix will pick up this file via fwcfg and install it to /etc
@@ -216,14 +230,25 @@ net_args()
echo -n "-netdev bridge,id=e1,br=$CONFIG_QEMU_NET_BRIDGE_DEV "
net_dev_args 1
elif [ "$CONFIG_QEMU_NET_TAP" = "y" ]; then
for i in $(seq 1 $(($CONFIG_QEMU_NET_TAP_N))); do
for i in $(seq 1 "$CONFIG_QEMU_NET_TAP_N"); do
echo -n "-netdev tap,id=e$i,ifname=qtap$i "
net_dev_args $i
net_dev_args "$i"
done
elif [ "$CONFIG_QEMU_NET_ROCKER" = "y" ]; then
sw=sw0 # Only single switch support atm.
echo -n "-device '{\"driver\":\"rocker\", \"name\":\"${sw}\", "
echo -n "\"fp_start_macaddr\":\"02:00:00:00:00:01\", "
echo -n "\"ports\":["
for i in $(seq 1 "$CONFIG_QEMU_NET_PORTS"); do
[ "$i" -gt 1 ] && echo -n ", "
echo -n "\"${sw}p${i}\""
done
echo -n "]}' "
for i in $(seq 1 "$CONFIG_QEMU_NET_PORTS"); do
rocker_port_args 0 "$i"
done
elif [ "$CONFIG_QEMU_NET_USER" = "y" ]; then
local useropts=
[ "$CONFIG_QEMU_NET_USER_OPTS" ] && useropts=",$CONFIG_QEMU_NET_USER_OPTS"
echo -n "-netdev user,id=e1${useropts} "
net_dev_args 1
else
@@ -291,18 +316,17 @@ gdb_args()
run_qemu()
{
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
if ! qemu-img check "${CONFIG_QEMU_ROOTFS}.qcow2"; then
rm -f "${CONFIG_QEMU_ROOTFS}.qcow2"
if ! qemu-img check "qemu.qcow2"; then
rm -f "qemu.qcow2"
fi
if [ ! -f "${CONFIG_QEMU_ROOTFS}.qcow2" ]; then
if [ ! -f "qemu.qcow2" ]; then
echo "Creating qcow2 disk image for Qemu ..."
qemu-img create -f qcow2 -o backing_file="$CONFIG_QEMU_ROOTFS" \
-F raw "${CONFIG_QEMU_ROOTFS}.qcow2" > /dev/null
-F qcow2 "qemu.qcow2" > /dev/null
fi
fi
local qemu
read qemu <<EOF
read -r qemu <<EOF
$CONFIG_QEMU_MACHINE -nodefaults -m $CONFIG_QEMU_MACHINE_RAM \
$(loader_args) \
$(rootfs_args) \
@@ -317,18 +341,28 @@ run_qemu()
$(gdb_args) \
$CONFIG_QEMU_EXTRA
EOF
# Save resulting command to a script, because I cannot for the life
# of me figure out how to embed the JSON snippet for Rocker and run
# it here without issues, spent way too much time on it -- Joachim
run=$(mktemp -t run.qemu.XXX)
echo "#!/bin/sh" > "$run"
if [ "$CONFIG_QEMU_KERNEL" ]; then
echo "$qemu -append \"$(append_args)\" $*" >> "$run"
else
echo "$qemu $*" >> "$run"
fi
chmod +x "$run"
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
line=$(stty -g)
stty raw
if [ "$CONFIG_QEMU_KERNEL" ]; then
$qemu -append "$(append_args)" "$@"
else
$qemu "$@"
fi
$run
stty "$line"
if [ -n "$keep" ]; then
echo "Keeping generated qemu.run script: $run"
else
rm "$run"
fi
}
dtb_args()
@@ -364,7 +398,7 @@ generate_dot()
hostports="<qtap1> qtap1"
targetports="<e1> e1"
edges="host:qtap1 -- target:e1 [kind=mgmt];"
for tap in $(seq 2 $(($CONFIG_QEMU_NET_TAP_N - 1))); do
for tap in $(seq 2 $((CONFIG_QEMU_NET_TAP_N - 1))); do
hostports="$hostports | <qtap$tap> qtap$tap "
targetports="$targetports | <e$tap> e$tap "
edges="$edges host:qtap$tap -- target:e$tap;"
@@ -404,7 +438,8 @@ menuconfig()
exec kconfig-mconf Config.in
}
cd $(dirname $(readlink -f "$0"))
scriptdir=$(dirname "$(readlink -f "$0")")
cd "$scriptdir" || (echo "Failed cd to $scriptdir"; exit 1)
while [ "$1" != "" ]; do
case $1 in
@@ -414,6 +449,9 @@ while [ "$1" != "" ]; do
-h)
usage
;;
-k)
keep=true
;;
*)
break
esac
@@ -9,46 +9,20 @@
# $3 IP adddress
PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"
NAME="/etc/frr/static.d/$2-zeroconf.conf"
NEXT="${NAME}+"
log()
{
logger -I $$ -t zeroconf -p user.notice "$*"
}
# Reduce changes needed by comparing with previous route(s)
act()
{
case $1 in
add)
echo "! Generated by avahi-autoipd" > "$NEXT"
echo "ip route 0.0.0.0/0 $2 254" >> "$NEXT"
cmp -s "$NAME" "$NEXT" && return
mv "$NEXT" "$NAME"
;;
del)
[ -f "$NAME" ] || return
rm "$NAME"
;;
*)
return
;;
esac
initctl -nbq restart staticd
}
case "$1" in
BIND)
ip addr flush dev "$2" proto random
ip addr add "$3"/16 brd 169.254.255.255 scope link dev "$2" proto random
act add "$2"
log "set ipv4ll $3 on iface $2"
;;
CONFLICT|UNBIND|STOP)
act del "$2"
ip addr flush dev "$2" proto random
log "clr ipv4ll on iface $2"
;;
+2
View File
@@ -0,0 +1,2 @@
# --log-level debug
OSPFD_ARGS="-A 127.0.0.1 -u frr -g frr -f /etc/frr/ospfd.conf --log syslog"
+2
View File
@@ -0,0 +1,2 @@
# --log-level debug
ZEBRA_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog "
+9 -6
View File
@@ -3,16 +3,19 @@
# and similar events feed servers and configuration to dnsmasq.
domain-needed
# Only listen to loopback (local system)
interface=lo
bind-dynamic
#listen-address=127.0.0.1,::1
# Allow configuration and cache clear over D-Bus
enable-dbus
# Disable the following dnsmasq default DHCP options
#dhcp-option=option:netmask
#dhcp-option=28 # option:broadcast
#dhcp-option=option:domain-name
dhcp-option=option:router
dhcp-option=option:dns-server
dhcp-option=12 # option:hostname
# Generated by openresolv
resolv-file=/var/lib/misc/resolv.conf
# Include all files in a directory which end in .conf
conf-dir=/etc/dnsmasq.d/,*.conf
@@ -1,4 +1,7 @@
service :%i pid:!/run/k8s-logger-%i.pid <usr/container:%i> \
[2345] k8s-logger -cni %i -f local1 /run/containers/%i.fifo -- Logger for container %i
sysv :%i pid:!/run/container:%i.pid <pid/k8s-logger:%i> log kill:10 \
[2345] container -n %i -- container %i
# Start a container instance (%i) and redirect logs to /log/container
# Give podman enough time to properly shut down the container, kill:30
# The pre:script, which is responsibe for fetching a remote image, must
# not have a timeout. The cleanup should take no longer than a minute.
sysv log:prio:local1,tag:%i kill:30 pid:!/run/container:%i.pid \
pre:0,/usr/sbin/container cleanup:60,/usr/sbin/container \
[2345] <!> :%i container -n %i -- container %i
@@ -0,0 +1,9 @@
# A single mstpd instance can manage multiple bridges, which are
# dynamically added/removed by the kernel via the /sbin/bridge-stp
# usermode helper. We use a manual service so that confd can
# enable/disable it without an initctl barrier, since it needs to
# already be running when a bridge interface with spanning tree
# enabled is created.
service env:-/etc/default/mstpd manual:yes \
[S0123456789] mstpd $MSTPD_ARGS -- Spanning Tree daemon
@@ -0,0 +1,4 @@
# Use <pid/syslogd> as barrier for other system tasks and service that
# rely on modules, firmware, and device nodes to be ready.
service if:udevd nowarn env:-/etc/default/sysklogd <run/udevadm:post/success> \
[S0123456789] syslogd -F $SYSLOGD_ARGS -- System log daemon
@@ -1 +1 @@
service [2345] <!> ttyd -i lo -p 8001 login -- Web terminal daemon (ttyd)
service [2345] <!> ttyd -i lo -W -p 8001 login -- Web terminal daemon (ttyd)
@@ -0,0 +1,5 @@
service name:wpa_supplicant :%i \
[2345] wpa_supplicant -s -i %i -c /etc/wpa_supplicant-%i.conf -P/var/run/wpa_supplicant-%i.pid \
-- WPA supplicant @%i
task name:wifi-scanner :%i [2345] <pid/wpa_supplicant:%i> /usr/libexec/infix/wifi-scanner %i -- Start scanning for SSID @ %i
+1
View File
@@ -0,0 +1 @@
../available/mstpd.conf
+1 -1
View File
@@ -1,4 +1,4 @@
.-------.
| . . | Infix -- a Network Operating System
| . . | Infix OS — Immutable.Friendly.Secure
|-. v .-| https://kernelkit.org
'-'---'-'
@@ -1,2 +1 @@
alias cli='clish'
alias cfg='sysrepocfg -f json'
@@ -1,3 +0,0 @@
HostKey /var/lib/ssh/ssh_host_rsa_key
HostKey /var/lib/ssh/ssh_host_ecdsa_key
HostKey /var/lib/ssh/ssh_host_ed25519_key
@@ -1,3 +0,0 @@
net.ipv4.ip_forward=1
net.ipv4.ip_forward_update_priority=0
net.ipv6.conf.all.forwarding=1
@@ -1 +1,32 @@
# Router defaults
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.lo.rp_filter=0
net.ipv4.icmp_errors_use_inbound_ifaddr=1
net.ipv4.conf.all.ignore_routes_with_linkdown=1
# Use neigh information on selection of nexthop for multipath hops
net.ipv4.fib_multipath_use_neigh=1
# Sane ARP defaults for a switch/router
net.ipv4.conf.default.arp_announce=2
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.default.arp_notify=1
net.ipv4.conf.all.arp_notify=1
net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
# IP Routing
net.ipv4.ip_forward=1
net.ipv4.ip_forward_update_priority=0
net.ipv4.conf.all.forwarding=0
net.ipv4.conf.default.forwarding=0
# Multicast group subscriptions
net.ipv4.igmp_max_memberships=1000
net.ipv4.neigh.default.mcast_solicit=10
+19 -1
View File
@@ -1,5 +1,23 @@
net.ipv6.conf.all.forwarding=1
# Router defaults
net.ipv6.route.max_size=131072
net.ipv6.conf.all.ignore_routes_with_linkdown=1
# IP Routing is disabled by default, enabled globally, and per
# interface, for each interface in confd. See also accept_ra.
net.ipv6.conf.all.forwarding=0
net.ipv6.conf.default.forwarding=0
# Accept router advertisements even when forwarding is enabled
net.ipv6.conf.all.accept_ra=2
net.ipv6.conf.default.accept_ra=2
# IPv6 SLAAC
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.default.autoconf=0
# Keep permanent addresses on an admin down
net.ipv6.conf.all.keep_addr_on_down=1
net.ipv6.conf.default.keep_addr_on_down=1
# Multicast group subscriptions
net.ipv6.mld_max_msf=512
+145
View File
@@ -0,0 +1,145 @@
Many of the defaults here are are taken from the Frr recommendations [1].
Below are relevant excerpts from the kernel documentation.
accept_ra, accept Router Advertisements; autoconfigure using them, also
determines whether or not to transmit Router Solicitations.
If and only if the functional setting is to accept Router
Advertisements, Router Solicitations will be transmitted.
0 - Do not accept Router Advertisements.
1 - Accept Router Advertisements if forwarding is disabled.
2 - Overrule forwarding behaviour. Accept Router Advertisements even
if forwarding is enabled.
Default:
- enabled if local forwarding is disabled
- disabled if local forwarding is enabled
accept_ra_pinfo, learn Prefix Information in Router Advertisement.
Default:
- enabled if accept_ra is enabled
- disabled if accept_ra is disabled
autoconf, autoconfigure IPv6 addresses using Prefix Information in
Router Advertisements.
Default:
- enabled if accept_ra_pinfo is enabled
- disabled if accept_ra_pinfo is disabled
arp_announce, define restriction level for announcing the local source
address from IP packets in ARP requests sent on interface:
0 - (default) Use any local address, configured on any interface
1 - Try to avoid local addresses that are not in the targets subnet
for this interface. Useful when target hosts reachable via this
interface require the source IP address in ARP requests to be part
of their logical network configured on the receiving interface.
When we generate the request we will check all our subnets that
include the target IP and will preserve the source address if it
is from such subnet. If there is no such subnet we select source
address according to the rules for level 2.
2 - Always use the best local address for this target. In this mode we
ignore the source address in the IP packet and try to select local
address that we prefer for talks with the target host. Such local
address is selected by looking for primary IP addresses on all our
subnets on the outgoing interface that include the target address.
If no suitable local address is found we select the first local
address we have on the outgoing interface or on all other
interfaces, with the hope we will receive reply for our request
and even sometimes no matter the source IP address we announce.
arp_notify, define mode for notification of address and device changes.
0 - (default): do nothing
1 - generate gratuitous arp requests when device is brought up or
hardware address changes.
arp_ignore, define different modes for sending replies in response to
received ARP requests that resolve local target addresses:
0 - (default): reply for any local target IP address, configured on
any interface
1 - reply only if the target IP address is a local address configured
on the incoming interface
2 - reply only if the target IP address is local address configured on
the incoming interface and both with the senders IP address are part
from same subnet on this interface
3 - do not reply for local addresses configured with scope host, only
resolutions for global and link addresses are replied
4-7 - reserved
8 - do not reply for all local addresses
arp_accept, define behavior for accepting gratuitous ARP (garp) frames
from devices that are not already present in the ARP table:
0 - dont create new entries in the ARP table
1 - create new entries in the ARP table
2 - create new entries only if the source IP address is in the same
subnet as an address configured on the interface that received
the garp message.
Both replies and requests type gratuitous arp will trigger the ARP
table to be updated, if this setting is on. If the ARP table already
contains the IP address of the gratuitous arp frame, the arp table
will be updated regardless if this setting is on or off.
icmp_errors_use_inbound_ifaddr
0 - (default): icmp error messages are sent with the primary address
of the exiting interface.
1 - the message will be sent with the primary address of the interface
that received the packet that caused the icmp error. This is the
behaviour many network administrators will expect from a router.
And it can make debugging complicated network layouts much easier.
Note, if no primary address exists for the interface selected, then
the primary address of the first non-loopback interface that has one
will be used regardless of this setting.
rp_filter, reverse path source filtering:
0 - (default): no source validation.
1 - Strict mode as defined in RFC3704, 'Strict Reverse Path'. Each
incoming packet is tested against the FIB and if the interface is
not the best reverse path the packet check will fail. By default
failed packets are discarded.
2 - Loose mode as defined in RFC3704, 'Loose Reverse Path'. Each
incoming packets source address is also tested against the FIB
and if the source address is not reachable via any interface the
packet check will fail.
Current recommended practice in RFC3704 is to enable strict mode to
prevent IP spoofing from DDos attacks. If using asymmetric routing or
other complicated routing, then loose mode is recommended.
The max value from conf/{all,interface}/rp_filter is used when doing
source validation on the {interface}.
[1]: https://github.com/FRRouting/frr/blob/master/doc/user/Useful_Sysctl_Settings.md
@@ -0,0 +1 @@
SUBSYSTEM=="net", ACTION=="add", TEST=="/sys/class/net/$name/wireless", NAME="wifi%n"
+165
View File
@@ -0,0 +1,165 @@
# /etc/watchdogd.conf sample
# Commented out values are program defaults.
#
# The checker/monitor `warning` and `critical` levels are 0.00-1.00,
# i.e. 0-100%, except for load average which can vary a lot between
# systems and use-cases, not just because of the number of CPU cores.
# Use the `script = ...` setting to call script when `warning` and
# `critical` are reached for a monitor. In `critical` the monitor
# otherwise triggers an unconditional reboot.
#
# NOTE: `critical` is optional, omitting it disables the reboot action.
#
### Watchdogs ##########################################################
# Global settings that can be overridden per watchdog
# Do not set WDT timeout and kick interval too low, the daemon runs at
# SCHED_OTHER level with all other tasks, unless the process supervisor
# is enabled. The monitor plugins (below) need CPU time as well.
#timeout = 20
#interval = 10
# With safe-exit enabled (true) the daemon will ask the driver disable
# the WDT before exiting (SIGINT). However, some WDT drivers (or HW)
# may not support this.
#safe-exit = true
# Multiple watchdogs can be kicked, the default, even if no .conf file
# is found or device node given on the command line, is /dev/watchdog
device /dev/watchdog {
timeout = 60
interval = 5
safe-exit = true
}
#device /dev/watchdog2 {
# timeout = 20
# interval = 10
# safe-exit = true
#}
### Supervisor #########################################################
# Instrumented processes can have their main loop supervised. Processes
# subscribe to this service using the libwdog API, see the docs for more
# on this. When the supervisor is enabled and the priority is set to a
# value > 0, watchdogd runs as a SCHED_RR process with elevated realtime
# priority. When disabled, or the priority is set to zero (0), it runs
# as a regular SCHED_OTHER process, this is the default.
#
# When a supervised process fails to meet its deadline, the daemon will
# perform an unconditional reset having saved the reset reason. If a
# script is provided in this section it will be called instead. The
# script is called as:
#
# script.sh supervisor CODE PID LABEL
#
# Availabel CODEs for the reset reason are avilable in wdog.h
#
#supervisor {
# !!!REMEMBER TO ENABLE reset-reason (below) AS WELL!!!
# enabled = true
# priority = 98
# script = "/path/to/supervisor-script.sh"
#}
### Reset reason #######################################################
# The following section controls if/how the reset reason & reset counter
# is tracked. By default this is disabled, since not all systems allow
# writing to disk, e.g. embedded systems using MTD devices with limited
# number of write cycles.
#
# The default file setting is a non-volatile path, according to the FHS.
# It can be changed to another location, but make sure that location is
# writable first.
reset-reason {
enabled = true
file = "/var/lib/misc/watchdogd.state"
}
### Checkers/Monitors ##################################################
#
# Script or command to run instead of reboot when a monitor plugin
# reaches any of its critical or warning level. Setting this will
# disable the built-in reboot on critical, it is therefore up to the
# script to perform reboot, if needed. The script is called as:
#
# script.sh {filenr, fsmon, loadavg, meminfo} {crit, warn} VALUE
#
#script = "/path/to/reboot-action.sh"
# Monitors file descriptor leaks based on /proc/sys/fs/file-nr
filenr {
# enabled = true
interval = 300
logmark = false
warning = 0.9
critical = 1.0
# script = "/path/to/alt-reboot-action.sh"
}
# Monitors a file system, blocks and inode usage against watermarks
# The script is called with fsmon as the first argument and there
# are two environment variables FSMON_NAME, for the monitored path,
# and FSMON_TYPE indicating either 'blocks' or 'inodes'.
#fsmon /var {
# enabled = true
# interval = 300
# logmark = false
# warning = 0.95
# critical = 1.0
# script = "/path/to/alt-reboot-action.sh"
#}
# Monitors load average based on sysinfo() from /proc/loadavg
# The level is composed from the average of the 1 and 5 min marks.
loadavg {
# enabled = true
interval = 300
logmark = false
warning = 1.0
critical = 2.0
# script = "/path/to/alt-reboot-action.sh"
}
# Monitors free RAM based on data from /proc/meminfo
meminfo {
# enabled = true
interval = 300
logmark = false
warning = 0.9
critical = 0.95
# script = "/path/to/alt-reboot-action.sh"
}
# Monitor temperature. The critical value is unset by default, so no
# action is taken at that watermark (by default). Both the critical and
# warning watermarks are relative to the trip/critical/max value from
# sysfs. The warning is default 0.9, i.e., 90% of critical. Use script
# to to reset the fan controller or poweroff(8) the system.
#
# Each temp monitor caches the last 10 values, calculates the mean, and
# compares that to the warning and critical levels. Logging is only
# done every 10 x interval (if enabled).
#tempmon /sys/class/hwmon/hwmon0/temp1_input {
# enabled = true
# interval = 30
# warning = 0.9
# critical = 0.95
# logmark = true
# script = "/script/to/log/and/poweroff.sh"
#}
# Monitor a generic script, executes 'monitor-script' every 'interval'
# seconds, with a max runtime of 'timeout' seconds. When the exit code
# of the monitor script is above the critical level watchdogd either
# starts the reboot, or calls the alternate 'script' to determin the
# next cause of action.
#generic /path/to/monitor-script.sh {
# enabled = true
# interval = 300
# timeout = 60
# warning = 1
# critical = 10
# script = "/path/to/alt-reboot-action.sh"
#}
+58
View File
@@ -0,0 +1,58 @@
#!/bin/sh
# User-friendly wrapper for sysrepocfg
# TODO: add import/export, copy, ...
# Edit YANG binary types using sysrepo, base64, and duct tape.
edit()
{
xpath=$1
if [ -z "$xpath" ]; then
echo "Usage: cfg edit \"/full/xpath/to/binary/leaf\""
exit 1
fi
if tmp=$(sysrepocfg -G "$xpath"); then
file=$(mktemp)
echo "$tmp" | base64 -d > "$file"
if /usr/bin/editor "$file"; then
tmp=$(base64 -w0 < "$file")
sysrepocfg -S "$xpath" -u "$tmp"
fi
rm -f "$file"
else
echo "Failed to retrieve value for $xpath"
exit 1
fi
}
usage()
{
echo "Usage:"
echo " cfg CMD [ARG]"
echo
echo "Command:"
echo " edit XPATH Edit YANG binary type"
echo " help This help text"
echo
echo "As a backwards compatible fallback, this script forwards"
echo "all other commands as options to sysrepocfg."
echo
exit 0
}
cmd=$1; shift
case $cmd in
edit)
edit "$1"
;;
help)
usage
;;
*)
set -- "$cmd" "$@"
exec sysrepocfg -f json "$@"
;;
esac
+5 -1
View File
@@ -21,7 +21,11 @@ dir()
if [ -d "$1" ]; then
dir "$1"
else
dir "$HOME"
if [ "$USER" = "root" ]; then
dir "$HOME"
else
dir "/home/$USER"
fi
dir "/cfg"
dir "/log"
fi
-1
View File
@@ -1 +0,0 @@
less
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# -d ;; suppress error message "the terminal is dumb"
# -F :: exit if the entire file can be displayed on the first screen
# -I :: Ignore case, even for patterns
# -K :: exit immediately when an interrupt character (usually ^C) is typed
# -R :: Almost raw control charachters, only ANSI color escape sequences and
# OSC 8 hyperlink sequences are output. Allows veritcal scrolling
# -X :: No termcap initialization and deinitialization set to the terminal.
# This is what leaves the contents of the output on screen.
export LESS="-P %f (press h for help or q to quit)"
export LANG=en_US.UTF-8
less -RIKd -FX "$@"
+49
View File
@@ -70,12 +70,14 @@ options:
-p Show plain output, no bells or whistles
commands:
dhcp Show DHCP server
port PORT Show port configuration and link information
ports Show ports available for bridging
vlans Show port groups in bridge
ifaces Show interfaces and their addresses
fdb Show forwarding database (unicast)
mdb Show multicast forwarding database
stp Show spanning tree status
ip addr Show IPv4 addresses
route Show routing table
ipv6 addr Show IPv6 addresses
@@ -87,6 +89,41 @@ commands:
EOF
}
is_dhcp_running()
{
sysrepocfg -X -f json -m infix-dhcp-server | jq -r '
."infix-dhcp-server:dhcp-server".enabled as $global |
if ."infix-dhcp-server:dhcp-server".subnet? then
(."infix-dhcp-server:dhcp-server".subnet[] |
select(.enabled != false)) |
if $global != false and . then "true" else "false" end
else "false" end
' 2>/dev/null | grep -q true
}
dhcp()
{
if ! is_dhcp_running; then
echo "DHCP server not enabled."
exit 0
fi
case $1 in
detail)
sysrepocfg -f json -X -d operational -m infix-dhcp-server | \
jq -C .
;;
stat*)
sysrepocfg -f json -X -d operational -m infix-dhcp-server | \
/usr/libexec/statd/cli-pretty "show-dhcp-server" -s
;;
*)
sysrepocfg -f json -X -d operational -m infix-dhcp-server | \
/usr/libexec/statd/cli-pretty "show-dhcp-server"
;;
esac
}
# Usage 1: show port eth0
# Usage 2: show port
# Usage 3: show ports
@@ -188,6 +225,12 @@ rstp()
mstpctl showport br0
}
stp()
{
sysrepocfg -f json -X -d operational -m ietf-interfaces | \
/usr/libexec/statd/cli-pretty "show-bridge-stp"
}
fdb()
{
bridge $bopt fdb show
@@ -288,6 +331,9 @@ case $cmd in
help)
usage
;;
dhcp | dhcp-server)
dhcp $*
;;
port*)
ports $*
;;
@@ -353,6 +399,9 @@ case $cmd in
span*)
rstp
;;
stp*)
stp
;;
sys*)
system
;;
@@ -0,0 +1,9 @@
# Extend finit's default udevadm settle synchronization for situations
# where device are very slow to probe (see #685)
run nowarn if:udevd cgroup.init <service/udevd/ready> log \
[S] /usr/libexec/infix/hw-wait -- Probing hardware
# Now that everything should be probed, do a final pass over the
# uevent queue before starting syslogd and everything else
run nowarn if:udevd cgroup.init :post <service/udevd/ready> log \
[S] udevadm settle -t 30 --
@@ -1,8 +1,6 @@
d /run/containers/args 0700 - -
d /run/containers/files 0700 - -
d /var/lib/containers/active 0700 - -
d /var/lib/containers/oci 0755 - -
d /run/containers/inbox 0700 - -
d /run/containers/queue 0700 - -
d /var/lib/containers 0700 - -
d /var/lib/containers/oci 0700 - -
d /run/cni 0755 - -
L+ /var/lib/cni - - - - /run/cni
@@ -1 +1,2 @@
d /var/run/frr 0755 frr frr -
R /var/tmp/frr - - - -
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
if [ $# -lt 2 ]; then
echo "usage: $0 <quirk-name> <ifname>"
exit 1
fi
quirk=$1
ifname=$2
if [ -f "/etc/product/interface-quirks.json" ]; then
echo "$(jq -r --arg iface "$ifname" --arg quirk "$quirk" '.[$iface][$quirk] // "false"' /etc/product/interface-quirks.json)"
else
echo "false"
fi
+41
View File
@@ -0,0 +1,41 @@
#!/bin/sh
# (Ab)use the kernel's device link subsystem to detect consumer side
# devices that may be very slow to probe (looking at you, mv88e6xxx!).
ident=$(basename "$0")
report()
{
if [ -r "/tmp/$ident" ]; then
logger -k -p "user.$1" -t "$ident" "Waited for slow devices:"
sort "/tmp/$ident" | uniq -c | logger -k -p "user.$1" -t "$ident"
fi
rm -f "/tmp/$ident"
}
for _ in $(seq 50); do
again=
for dl in /sys/class/devlink/*; do
[ -r "$dl/status" ] || continue
status=$(cat "$dl/status")
if [ "$status" = "consumer probing" ]; then
basename "$(readlink "$dl/consumer")" >>"/tmp/$ident"
again=yes
fi
done
if [ -z "$again" ]; then
report notice
exit 0
fi
sleep .2
done
logger -k -p user.error -t "$ident" "Timeout waiting for devices to come online"
report error
exit 1
@@ -308,16 +308,52 @@ def probe_qemusystem(out):
subprocess.run("initctl -nbq cond set qemu".split(), check=False)
return 0
def rasberry_pi_4_usb_ports(out):
out["usb-ports"] = [
{
"name": "USB",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/authorized"
},
{
"name": "USB",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/authorized_default"
},
{
"name": "USB",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/authorized",
},
{
"name": "USB",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-0:1.0/authorized"
},
{
"name": "USB",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/authorized"
},
{
"name": "USB",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/authorized_default"
},
{
"name": "USB3",
"path": "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-0:1.0/authorized"
}
]
def probe_dtsystem(out):
"""Probe DTS based system, expects a VPD in ONIE PROM format."""
dtsys = DTSystem()
vpds = dtsys.infix_vpds()
dtsys.infix_usb_devices(out)
model = dtsys.base.str("model")
if model:
out["product-name"] = model
# Since rpi4 has USB on PCIe, there is no phandle reference
if model and model.startswith("Raspberry Pi 4"):
rasberry_pi_4_usb_ports(out)
else:
dtsys.infix_usb_devices(out)
out["compatible"] = dtsys.base.str_array("compatible")
staticpw = dtsys.infix.str("factory-password-hash")
@@ -39,8 +39,10 @@ fi
# init scripts to prevent select services from starting.
initctl -nbq cond set led
note "Calling runparts $PRODUCT_INIT/S[0-9]+.* start"
/usr/libexec/finit/runparts -bsp "$PRODUCT_INIT"
if [ -d "$PRODUCT_INIT" ]; then
note "Calling runparts $PRODUCT_INIT/S[0-9]+.* start"
/usr/libexec/finit/runparts -bsp "$PRODUCT_INIT"
fi
# Product specific init done.
initctl -nbq cond set product
@@ -14,24 +14,6 @@ for file in /sys/firmware/qemu_fw_cfg/by_name/opt/mactab/raw /etc/mactab; do
fi
done
# Sometimes the sysfs is not populated when the switch driver is loaded, with the result
# that the DSA interface was not found (no /dsa/tagging entry in sysfs. See issue #685.
#
# This mitigates that problem by waiting for sysfs to come up if a DSA switch is found
if [ -n "$(devlink -j dev info | jq -r '.info.[].driver' | grep -q mv88e6085)" ]; then
timeout=50
while [ -z "$(ls /sys/class/net/*/dsa/tagging)" ]; do
timeout=$((timeout-1))
if [ $timeout -eq 0 ]; then
logger -k -p user.emerg -t "$ident" "Failed to find DSA interface"
exit 1
fi
sleep 0.1
done
logger -k -p user.notice -t "$ident" "Found DSA interface in $timeout seconds"
fi
# Find CPU interfaces used for connecting to a switch managed by DSA
for netif in /sys/class/net/*; do
iface=$(basename "$netif")
@@ -43,6 +43,7 @@ while [ "$1" ]; do
txqs="$2"
shift 2
[ $(/usr/libexec/infix/has-quirk "broken-mqprio" "$iface") = "true" ] && echo "Skipping $iface, does not support mqprio" && continue
[ $txqs -lt 2 ] && continue
[ $txqs -gt 8 ] && txqs=8
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
# Initialize speed/duplex of virtio interfaces
# For virtual test systems (lacp tests)
ifaces=$(ip -d -json link show | jq -r '.[] | select(.parentbus == "virtio") | .ifname')
for iface in $ifaces; do
ethtool -s "$iface" speed 1000 duplex full
done
@@ -4,10 +4,14 @@
# the migrate tool inserts old version in name before .cfg extension.
CONFIG_FILE="/cfg/startup-config.cfg"
BACKUP_FILE="/cfg/backup/startup-config.cfg"
mkdir -p "$(dirname "$BACKUP_FILE")"
BACKUP_DIR="$(dirname "$BACKUP_FILE")"
mkdir -p "$BACKUP_DIR"
chown root:wheel "$BACKUP_DIR"
chmod 0770 "$BACKUP_DIR"
if [ ! -f "$CONFIG_FILE" ]; then
note "No $(basename "$CONFIG_FILE" .cfg) yet, likely factory reset."
logger -I $$ -k -p user.notice -t $(basename "$0") "No $(basename "$CONFIG_FILE" .cfg) yet, likely factory reset."
exit 0
elif migrate -cq "$CONFIG_FILE"; then
exit 0
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Store and convert RSA PUBLIC/PRIVATE KEYs to be able to use them in
# OpenSSHd.
set -e
NAME="$1"
DIR="$2"
PUBLIC="$3"
PRIVATE="$4"
TMP="$(mktemp)"
echo -e '-----BEGIN RSA PRIVATE KEY-----' > "$DIR/$NAME"
echo "$PRIVATE" >> "$DIR/$NAME"
echo -e '-----END RSA PRIVATE KEY-----' >> "$DIR/$NAME"
echo -e "-----BEGIN RSA PUBLIC KEY-----" > "$TMP"
echo -e "$PUBLIC" >> "$TMP"
echo -e "-----END RSA PUBLIC KEY-----" >> "$TMP"
ssh-keygen -i -m PKCS8 -f "$TMP" > "$DIR/$NAME.pub"
chmod 0600 "$DIR/$NAME.pub"
chmod 0600 "$DIR/$NAME"
chown sshd:sshd "$DIR/$NAME.pub"
chown sshd:sshd "$DIR/$NAME"
@@ -45,11 +45,6 @@ factory_reset()
find /sys/class/leds/ -type l -exec sh -c 'echo 100 > $0/brightness' {} \;
logger $opt -p user.crit -t "$nm" "Resetting to factory defaults."
# Shred all files to prevent restoring contents
find /mnt/cfg -type f -exec shred -zu {} \;
find /mnt/var -type f -exec shred -zu {} \;
# Remove any lingering directories and symlinks as well
rm -rf /mnt/cfg/* /mnt/var/*
logger $opt -p user.crit -t "$nm" "Factory reset complete."
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: $0 <ifname>"
exit 1
fi
ifname=$1
TIMEOUT=300
status=$(wpa_cli -i $ifname scan)
while [ "$status" != "OK" ]; do
status=$(wpa_cli -i $ifname scan)
TIMEOUT=$((TIMEOUT-1))
[ $TIMEOUT -eq 0 ] && logger -t wifi-scanner "Failed to start scanning $ifname" && exit 1
sleep 0.5
done
+371 -93
View File
@@ -1,5 +1,19 @@
#!/bin/sh
#!/bin/bash
# This script can be used to start, stop, create, and delete containers.
# It is what confd use, with the Finit container@.conf template, to set
# up, run, and delete containers.
#
# NOTE: when creating/deleting containers, remember 'initctl reload' to
# activate the changes! In confd this is already handled.
#
DOWNLOADS=/var/lib/containers/oci
BUILTIN=/lib/oci
BASEDIR=/var/tmp
container=$0
checksum=""
extracted=
timeout=30
dir=""
all=""
env=""
port=""
@@ -10,80 +24,225 @@ log()
logger -I $PPID -t container -p local1.notice -- "$*"
}
# Unpacks a given oci-archive.tar[.gz] in the current directory. Sanity
# checks, at least one index.json in the top-level dir of the archive.
# If there are more index files, this function does not handle them.
unpack_archive()
err()
{
image=$1
name=$2
rc=$1; shift
logger -I $PPID -t container -p local1.err -- "Error: $*"
if [ -n "$extracted" ] && [ -n "$tmpdir" ]; then
if [ -d "$tmpdir" ]; then
log "Cleaning up temporary directory $tmpdir"
rm -rf "$tmpdir"
fi
fi
[ "$rc" -eq 0 ] || exit "$rc"
}
pidfn()
{
echo "/run/containers/${1}.pid"
}
check()
{
file=$1
if [ -z "$checksum" ]; then
log "no checksum to verify $file against, continuing."
return 0
fi
if echo "${checksum} ${file}" | "$cmdsum" -c -s; then
log "$file checksum verified OK."
return 0
fi
got=$("$cmdsum" "${file}" | awk '{print $1}')
log "$file checksum mismatch, got $got, expected $checksum, removing file."
rm -f "$file"
return 1
}
# Fetch an OCI image over ftp/http/https. Use wget for FTP, which curl
# empirically does not work well with. Log progress+ & error to syslog.
fetch()
{
url=$1
file=$(basename "$url")
dst="$DOWNLOADS/$file"
cd "$DOWNLOADS" || return
if [ -e "$file" ]; then
log "$file already available."
if check "$file"; then
echo "$dst"
return 0
fi
fi
log "Fetching $url"
if echo "$url" | grep -qE "^ftp://"; then
cmd="wget -q $url"
elif echo "$url" | grep -qE "^https?://"; then
cmd="curl $creds -sSL --fail -o \"$file\" $url"
else
log "Unsupported URL scheme: $url"
return 1
fi
if out=$(eval "$cmd" 2>&1); then
log "$file downloaded successfully."
if check "$file"; then
echo "$dst"
return 0
fi
fi
# log error message from backend
while IFS= read -r line; do
log "$line"
done <<EOF
$out
EOF
return 1
}
# Extracts an oci-archive.tar[.gz] in a temporary directory. Finds and
# sanity checks that at least one index.json exist in the archive. This
# is the OCI directory fed to `podman load` and also used as repo name.
# NOTE: if there are >1 index.json, this function does not handle them.
load_archive()
{
uri=$1
tag=$2
img=$(basename "$uri")
# Supported transports for load and create
case "$image" in
case "$uri" in
oci:*) # Unpacked OCI image
file=${image#oci:}
file=${uri#oci:}
;;
oci-archive:*) # Packed OCI image, .tar or .tar.gz format
file=${image#oci-archive:}
file=${uri#oci-archive:}
;;
ftp://* | http://* | https://*)
if ! file=$(fetch "$uri"); then
return 1
fi
;;
*) # docker://*, docker-archive:*, or URL
echo "$image"
if podman image exists "$img"; then
echo "$img"
return 0
fi
# XXX: use --retry=0 with Podman 5.0 or later.
if ! id=$(podman pull --quiet "$uri"); then
log "Failed pulling $uri"
return 1
fi
# Echo image tag to caller
podman images --filter id="$id" --format "{{.Repository}}:{{.Tag}}"
return 0
;;
esac
if [ ! -e "$file" ]; then
if [ -e "/var/lib/containers/oci/$file" ]; then
file="/var/lib/containers/oci/$file"
elif [ -e "/lib/oci/$file" ]; then
file="/lib/oci/$file"
if [ -e "$DOWNLOADS/$file" ]; then
file="$DOWNLOADS/$file"
elif [ -e "$BUILTIN/$file" ]; then
file="$BUILTIN/$file"
else
log "Error: cannot find OCI archive $file in search path."
exit 1
err 1 "cannot find OCI archive $file in URI $uri"
fi
fi
file=$(realpath "$file")
if [ -d "$file" ]; then
index=$(find "$file" -name index.json)
if [ -z "$index" ]; then
log "Error: cannot find index.json in OCI image $file"
exit 1
err 1 "cannot find index.json in OCI image $file"
fi
else
index=$(tar tf "$file" |grep index.json)
# Extract files in a temporary directory, because most OCI
# archives are flat/bare, all files in the root w/o a dir/
tmpdir=$(mktemp -d -p "$BASEDIR") || err 1 "failed creating temporary directory"
cd "$tmpdir" || err 1 "failed cd to temporary directory $tmpdir"
index="$tmpdir/$(tar tf "$file" |grep index.json)"
if [ -z "$index" ]; then
log "Error: invalid OCI archive, cannot find index.json in $file"
exit 1
err 1 "invalid OCI archive, cannot find index.json in $file"
fi
[ -n "$quiet" ] || log "Extracting OCI archive $file ..."
tar xf "$file" || (log "Error: failed unpacking $file in $(pwd)"; exit 1)
remove=true
tar xf "$file" || err 1 "failed unpacking $file in $tmpdir"
extracted=true
cd - >/dev/null || err 0 "failed cd -"
fi
dir=$(dirname "$index")
# Handle flat tarballs without a sub-directory, because
# the $dir name is used as fallback when retagging below.
if [ -n "$extracted" ] && [ "$dir" = "$tmpdir" ]; then
parent=$(dirname "$dir")
dirnam=$(echo "$img" | sed 's/\(.*\)\.tar.*/\1/')
tmpdir="${parent}/${dirnam}"
mv "$dir" "$tmpdir"
dir="$tmpdir"
fi
if basename "$dir" | grep -q ":"; then
if [ -z "$tag" ]; then
tag=$(basename "$dir")
fi
sanitized_dir=$(echo "$dir" | cut -d':' -f1)
mv "$dir" "$sanitized_dir" || err 1 "failed renaming $dir to $sanitized_dir"
dir="$sanitized_dir"
fi
[ -n "$quiet" ] || log "Loading OCI image $dir ..."
podman load -qi "$dir" >/dev/null
output=$(podman load -qi "$dir")
# Rename image from podman default $dir:latest
if [ -n "$name" ]; then
podman tag "$dir" "$name" >/dev/null
podman rmi "$dir" >/dev/null
# Extract image ID from podman load output:
# "Loaded image: sha256:cd9d0aaf81be..."
if echo "$output" | grep -q "sha256:"; then
img_id="${output##*sha256:}"
else
name=$dir
# Fallback to directory name if no SHA found
img_id="$dir"
fi
if [ "$remove" = "true" ]; then
rm -rf "$file"
# On podman < 4.7.0 we had to retag images from default $dir:latest
# From >= 4.7.0 we always tag since loads come in as <none>:<none>
if [ -z "$tag" ]; then
tag=$(basename "$dir")
fi
echo "$name"
# Repo names must be lowercase, and only '[a-z0-9._/-]+' and ':tag'
tag=$(printf "%s" "$tag" | tr '[:upper:]' '[:lower:]' | tr -c 'a-z0-9._/:-' '-')
[ -n "$quiet" ] || log "Tagging loaded image $img_id as $tag"
if ! podman tag "$img_id" "$tag"; then
err 1 "failed tagging image as $tag"
fi
# Clean up after ourselves
if [ -n "$extracted" ]; then
log "Cleaning up extracted $dir"
rm -rf "$tmpdir"
fi
echo "$tag"
}
running()
{
run=$(podman inspect "$1" 2>/dev/null |jq .[].State.Running)
[ "$run" = "true" ] && return 0
status=$(podman inspect -f '{{.State.Status}}' "$1" 2>/dev/null)
[ "$status" = "running" ] && return 0
return 1
}
@@ -102,16 +261,19 @@ create()
# Unpack and load docker-archive/oci/oci-archive, returning image
# name, or return docker:// URL for download.
image=$(unpack_archive "$image")
if [ -z "$logging" ]; then
logging="--log-driver k8s-file --log-opt path=/run/containers/$name.fifo"
if ! image=$(load_archive "$image"); then
exit 1
fi
args="$args --replace --quiet --cgroup-parent=containers $caps"
if [ -z "$logging" ]; then
logging="--log-driver syslog"
fi
# When we get here we've already fetched, or pulled, the image
args="$args --read-only --replace --quiet --cgroup-parent=containers $caps"
args="$args --restart=$restart --systemd=false --tz=local $privileged"
args="$args $ro $vol $mount $hostname $entrypoint $env $port $logging"
pidfn=/run/container:${name}.pid
args="$args $vol $mount $hostname $entrypoint $env $port $logging"
pidfile=/run/container:${name}.pid
[ -n "$quiet" ] || log "---------------------------------------"
[ -n "$quiet" ] || log "Got name: $name image: $image"
@@ -134,22 +296,22 @@ create()
fi
# shellcheck disable=SC2048
log "Calling podman create --name $name --conmon-pidfile=$pidfn $args $image $*"
if podman create --name "$name" --conmon-pidfile="$pidfn" $args "$image" $*; then
[ -n "$quiet" ] || log "Successfully created container $name from $image"
rm -f "/run/containers/env/${name}.env"
log "podman create --name $name --conmon-pidfile=$pidfile $args $image $*"
if podman create --name "$name" --conmon-pidfile="$pidfile" $args "$image" $*; then
[ -n "$quiet" ] || log "Successfully created container $name from $image"
[ -n "$manual" ] || start "$name"
# Should already be enabled by confd (this is for manual use)
initctl -bnq enable "container@${name}.conf"
exit 0
fi
log "Error: failed creating container $name, please check the configuration."
exit 1
err 1 "failed creating container $name, please check the configuration."
}
delete()
{
name=$1
image=$2
if [ -z "$name" ]; then
echo "Usage:"
@@ -157,18 +319,31 @@ delete()
exit 1
fi
# Should already be stopped, but if not ...
container stop "$name" >/dev/null
while running "$name"; do
log "$name: still running, waiting for it to stop ..."
_=$((timeout -= 1))
if [ $timeout -le 0 ]; then
err 1 "timed out waiting for container $1 to stop before deleting it."
fi
sleep 1
done
podman rm -vif "$name" >/dev/null 2>&1
[ -n "$quiet" ] || log "Container $name has been removed."
cnt=$(podman image prune -af | wc -l)
log "Pruned $cnt image(s)"
}
waitfor()
{
timeout=$2
while [ ! -f "$1" ]; do
_=$((timeout -= 1))
if [ $timeout -le 0 ]; then
log "Timeout waiting for $1, aborting!"
exit 1
err 1 "timed out waiting for $1, aborting!"
fi
sleep 1;
done
@@ -183,7 +358,7 @@ start()
return
fi
initctl -bq cond set "container:$name"
initctl start container:$name
# Real work is done by wrap() courtesy of finit sysv emulation
}
@@ -196,7 +371,7 @@ stop()
return
fi
initctl -bq cond clr "container:$name"
initctl stop container:$name
# Real work is done by wrap() courtesy of finit sysv emulation
}
@@ -204,8 +379,27 @@ wrap()
{
name=$1
cmd=$2
pidfile=$(pidfn "$name")
podman "$cmd" "$name"
# Containers have three phases: setup, running, and teardown.
# The setup phase may run forever in the background trying to fetch
# the image. It saves its PID in /run/containers/${name}.pid
if [ "$cmd" = "stop" ] && [ -f "$pidfile" ]; then
pid=$(cat "$pidfile")
# Check if setup is still running ...
if kill -0 "$pid" 2>/dev/null; then
kill "$pid"
wait "$pid" 2>/dev/null
fi
rm -f "$pidfile"
return 0
fi
# Skip "echo $name" from podman start in log
podman "$cmd" "$name" >/dev/null
}
# Removes network $1 from all containers
@@ -236,6 +430,19 @@ netrestart()
done
}
cleanup()
{
pidfile=$(pidfn "$name")
log "Received signal, exiting."
if [ -n "$name" ] && [ -f "$pidfile" ]; then
log "$name: in setup phase, removing $pidfile ..."
rm -f "$pidfile"
fi
exit 1
}
usage()
{
cat <<EOF
@@ -248,6 +455,7 @@ options:
--dns-search LIST Set host lookup search list when creating container
--cap-add CAP Add capability to unprivileged container
--cap-drop CAP Drop capability, for privileged containter
--checksum TYPE:SUM Use md5/sha256/sha512 to verify ftp/http/https archives
-c, --creds USR[:PWD] Credentials to pass to curl -u for remote ops
-d, --detach Detach a container started with 'run IMG [CMD]'
-e, --env FILE Environment variables when creating container
@@ -267,14 +475,15 @@ options:
Syntax: [[ip:][hostPort]:]containerPort[/protocol]
-q, --quiet Quiet operation, called from confd
-r, --restart POLICY One of "no", "always", or "on-failure:NUM"
--read-only Do not create a writable layer
-s, --simple Show output in simplified format
-t, --timeout SEC Set timeout for delete/restart commands, default: 30
-v, --volume NAME:PATH Create named volume mounted inside container on PATH
commands:
create NAME IMAGE NET Create container NAME using IMAGE with networks NET
delete [network] NAME Remove container NAME or network NAME from all containers
exec NAME CMD Run a command inside a container
flush Clean up lingering containers and associated anonymous volumes
find [ifname PID] Find PID of container where '--net IFNAME' currently lives
or, find the name of our IFNAME inside the container @PID
help Show this help text
@@ -285,11 +494,13 @@ commands:
restart [network] NAME Restart a (crashed) container or container(s) using network
run NAME [CMD] Run a container interactively, with an optional command
save IMAGE FILE Save a container image to an OCI tarball FILE[.tar.gz]
shell Start a shell inside a container
setup NAME Create and set up container as a Finit task
shell [CMD] Start a shell, or run CMD, inside a container
show [image | volume] Show containers, images, or volumes
stat Show continuous stats about containers (Ctrl-C aborts)
start [NAME] Start a container, see -n
stop [NAME] Stop a container, see -n
upgrade NAME Upgrade a running container (stop, pull, restart)
volume [prune] Prune unused volumes
EOF
}
@@ -307,6 +518,25 @@ while [ "$1" != "" ]; do
shift
caps="$caps --cap-drop=$1"
;;
--checksum)
shift
type="${1%%:*}"
checksum="${1#*:}"
case "$type" in
md5)
cmdsum=md5sum
;;
sha256)
cmdsum=sha256sum
;;
sha512)
cmdsum=sha512sum
;;
*)
err 1 "Unsupported checksum type: $type"
;;
esac
;;
-c | --creds)
shift
creds="-u $1"
@@ -351,11 +581,10 @@ while [ "$1" != "" ]; do
--log-path)
shift
logging="$logging --log-opt path=$1"
log_path="$1"
;;
-m | --mount)
shift
mount="--mount=$1"
mount="$mount --mount=$1"
;;
--manual)
manual=true
@@ -386,12 +615,13 @@ while [ "$1" != "" ]; do
shift
restart=$1
;;
--read-only)
ro="--read-only=true"
;;
-s | --simple)
simple=true
;;
-t | --timeout)
shift
timeout=$1
;;
-v | --volume)
shift
vol="$vol -v $1"
@@ -408,6 +638,8 @@ if [ -n "$cmd" ]; then
shift
fi
trap cleanup INT HUP TERM
case $cmd in
# Does not work atm., cannot attach to TTY because
# we monitor 'podman start -ai foo' with Finit.
@@ -420,15 +652,24 @@ case $cmd in
;;
delete)
cmd=$1
name=$2
[ -n "$name" ] || name=$2
if [ "$cmd" = "network" ] && [ -n "$name" ]; then
netwrm "$name"
else
delete "$@"
[ -n "$name" ] || name=$1
delete "$name"
fi
;;
exec)
podman exec -it "$@"
if [ -z "$name" ]; then
name="$1"
shift
fi
podman exec -i "$name" "$@"
;;
flush)
echo "Cleaning up any lingering containers";
podman rm -av $force
;;
find)
cmd=$1
@@ -455,25 +696,12 @@ case $cmd in
usage
;;
load)
url=$1
name=$2
# shellcheck disable=SC2086
if echo "$url" | grep -q "://"; then
file=$(basename "$url")
curl -k $creds -Lo "$file" "$url"
else
file="$url"
fi
# shellcheck disable=SC2086
name=$(unpack_archive "$file" $name)
name=$(load_archive "$1" $2)
[ -n "$name" ] || exit 1
# Show resulting image(s) matching $name
if [ -n "$name" ]; then
podman images -n "$name"
else
exit 1
fi
podman images -n "$name"
;;
locate) # Find where the host's ifname lives
if [ -z "$network" ]; then
@@ -500,9 +728,9 @@ case $cmd in
podman images $all --format "{{.Repository}}:{{.Tag}}"
;;
oci)
find /lib/oci /var/lib/containers/oci -type f 2>/dev/null
find $BUILTIN $DOWNLOADS -type f 2>/dev/null
;;
*)
*)
podman ps $all --format "{{.Names}}"
;;
esac
@@ -542,8 +770,44 @@ case $cmd in
gzip "$file"
fi
;;
setup)
[ -n "$name" ] || err 1 "setup: missing container name."
script=/run/containers/${name}.sh
[ -x "$script" ] || err 1 "setup: $script does not exist or is not executable."
# Save our PID in case we get stuck here and someone wants to
# stop us, e.g., due to reconfiguration or reboot.
pidfile=$(pidfn "${name}")
echo $$ > "$pidfile"
while ! "$script"; do
log "${name}: setup failed, waiting for network changes ..."
# Timeout and retry after 60 seconds, on SIGTERM, or when
# any network event is caught.
timeout -s TERM -k 1 60 sh -c \
'ip monitor address route 2>/dev/null | head -n1 >/dev/null' || true
# On IP address/route changes, wait a few seconds more to ensure
# the system has ample time to react and set things up for us.
log "${name}: retrying ..."
sleep 2
done
rm -f "$pidfile"
cnt=$(podman image prune -f | wc -l)
log "setup: pruned $cnt image(s)"
;;
shell)
podman exec -it "$1" sh -l
if [ -z "$name" ]; then
name="$1"
shift
fi
if [ $# -gt 0 ]; then
podman exec -i "$name" sh -c "$*"
else
podman exec -it "$name" sh -l
fi
;;
show)
cmd=$1
@@ -596,12 +860,10 @@ case $cmd in
else
name=$1
stop "$name"
timeout=20
while running "$name"; do
_=$((timeout -= 1))
if [ $timeout -le 0 ]; then
log "Timeout waiting for container $1 to stop before restarting it."
exit 1
err 1 "timed out waiting for container $1 to stop before restarting it."
fi
sleep 1
done
@@ -627,7 +889,7 @@ case $cmd in
;;
upgrade)
# Start script used to initially create container
script=/var/lib/containers/active/S01-${1}.sh
script=/run/containers/${1}.sh
# Find container image
img=$(podman inspect "$1" | jq -r .[].ImageName)
@@ -638,15 +900,15 @@ case $cmd in
# Likely an OCI archive, or local directory, assume user has updated image.
if echo "$img" | grep -Eq '^localhost/'; then
file=$(awk '{s=$NF} END{print s}' "$script")
echo "Upgrading container ${1} with local archive: $file ..."
file=$(awk '/^# meta-image:/ {print $3}' "$script")
echo ">> Upgrading container $1 using $file ..."
else
printf ">> Stopping ... "
podman stop "$1"
printf ">> "
podman pull "$img" || (echo "Failed fetching $img, check your network (settings)."; exit 1)
echo ">> Starting $1 ..."
fi
echo ">> Starting $1 ..."
if ! "$script"; then
echo ">> Failed recreating container $1"
exit 1
@@ -658,7 +920,7 @@ case $cmd in
[ -n "$cmd" ] && shift
case $cmd in
prune)
podman volume $force prune
podman volume prune $force
;;
*)
false
@@ -666,6 +928,22 @@ case $cmd in
esac
;;
*)
if [ -n "$SERVICE_SCRIPT_TYPE" ] && [ -n "$SERVICE_ID" ]; then
case "$SERVICE_SCRIPT_TYPE" in
pre)
# Called as pre-script from Finit service
exec $container -q -n "$SERVICE_ID" setup
;;
cleanup)
# Called as cleanup-script from Finit service
log "Calling $container -n $SERVICE_ID delete"
exec $container -q -n "$SERVICE_ID" delete
;;
*)
false
;;
esac
fi
usage
exit 1
;;
@@ -50,7 +50,7 @@ set_dhcp_routes()
# format: dest1/mask gw1 ... destn/mask gwn
set -- $staticroutes
while [ -n "$1" -a -n "$2" ]; do
log "adding route $1 via $2 dev $interface proto dhcp"
log "adding route $1 via $2 metric $metric tag 100"
echo "ip route $1 $2 $metric tag 100" >> "$NEXT"
shift 2
done
@@ -115,7 +115,7 @@ case "$ACTION" in
/usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
fi
if /bin/ip addr add dev $interface $ip/$subnet $BROADCAST proto 5; then
if /bin/ip addr add dev $interface $ip/$subnet $BROADCAST proto dhcp; then
echo "$ip" > "$IP_CACHE"
fi
if [ -n "$ipv6" ] ; then
-1
View File
@@ -20,7 +20,6 @@ CONFIG_CMD_SETEXPR_FMT=y
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_PCI=y
CONFIG_CMD_MMC=y
CONFIG_FS_SQUASHFS=y
+11 -2
View File
@@ -17,14 +17,23 @@ endef
# U-Boot build tree. This will then be built in to the final U-Boot
# image's control DT via the CONFIG_DEVICE_TREE_INCLUDES option (see
# extras.config).
#
# Some platforms, most notably Raspberry Pi, load the device tree
# from the SPL, effectively overriding the built-in control DT.
# For that we bundle an overlay that can be included instead.
define UBOOT_PRE_BUILD_INSTALL_KEY
$(HOST_DIR)/bin/dtc <(echo '/dts-v1/; / { signature {}; };') >$(@D)/infix-key.dtb
$(HOST_DIR)/bin/dtc -a 1024 <(echo '/dts-v1/; / { signature {}; };') \
>$(@D)/infix-key.dtb
$(foreach key, \
$(call qstrip,$(TRUSTED_KEYS_DEVELOPMENT_PATH)) $(call qstrip,$(TRUSTED_KEYS_EXTRA_PATH)),\
$(call uboot-add-pubkey,$(key),$(@D)/infix-key.dtb))
$(HOST_DIR)/bin/dtc -I dtb -O dts \
<$(@D)/infix-key.dtb \
| sed -e 's:/dts-v[0-9]\+/;::' >$(@D)/arch/$(UBOOT_ARCH)/dts/infix-key.dtsi
| sed -e 's:/dts-v[0-9]\+/;::' \
| tee $(@D)/arch/$(UBOOT_ARCH)/dts/infix-key.dtsi \
| sed -e '1i\/dts-v1/;\n/plugin/;\n' -e '/^$$/d' -e 's:/ {:\&{/} {:' \
>$(@D)/arch/$(UBOOT_ARCH)/dts/infix-key.dtso
rm $(@D)/infix-key.dtb
endef
UBOOT_PRE_BUILD_HOOKS += UBOOT_PRE_BUILD_INSTALL_KEY
+6 -2
View File
@@ -33,6 +33,7 @@ CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_SMP=y
CONFIG_EFI=y
CONFIG_KPROBES=y
# CONFIG_GCC_PLUGINS is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
@@ -144,7 +145,6 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_BPFILTER=y
CONFIG_BRIDGE=y
CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_BRIDGE_MRP=y
@@ -161,12 +161,14 @@ CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=y
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_PKTGEN=y
# CONFIG_WIRELESS is not set
CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
CONFIG_LWTUNNEL=y
CONFIG_PCI=y
CONFIG_PCI_MSI=y
CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
@@ -208,6 +210,7 @@ CONFIG_NET_VRF=y
CONFIG_E1000=y
CONFIG_NE2K_PCI=y
CONFIG_8139CP=y
CONFIG_ROCKER=y
# CONFIG_WLAN is not set
CONFIG_INPUT_EVDEV=y
CONFIG_SERIAL_8250=y
@@ -258,11 +261,12 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_GCM=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=20
CONFIG_DETECT_HUNG_TASK=y
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
# CONFIG_FTRACE is not set
CONFIG_FUNCTION_TRACER=y
CONFIG_UNWINDER_FRAME_POINTER=y
+20 -12
View File
@@ -13,8 +13,8 @@ BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
@@ -27,17 +27,14 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="alder/alder styx/dcp-sc-28p-a styx/dcp-sc-28p-b marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B microchip/sparx5_pcb135_emmc_no_psci"
BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/dts"
BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_SYSREPO_GROUP="sys-cli"
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_DBUS_CXX=y
@@ -59,8 +56,8 @@ BR2_PACKAGE_PYTHON_GUNICORN=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBINPUT=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
@@ -80,6 +77,7 @@ BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPTABLES_NFTABLES=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_MSTPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NETCAT_OPENBSD=y
BR2_PACKAGE_NETSNMP=y
@@ -109,6 +107,7 @@ BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_RAUC_JSON=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
@@ -121,22 +120,28 @@ BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
BR2_PACKAGE_HOST_GENEXT2FS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_GO_BIN=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_DESC="Infix is an operating system based on Linux and modeled with YANG. It can be set up both as a switch, with offloading using switchdev, a router with firewalling, or a secure end device. All while supporting advanced networking scenarios and running Docker containers."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_ALDER_ALDER=y
BR2_PACKAGE_MARVELL_CN9130_CRB=y
BR2_PACKAGE_MARVELL_ESPRESSOBIN=y
BR2_PACKAGE_STYX_DCP_SC_28P=y
BR2_PACKAGE_RASPBERRY_PI_4=y
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_CURIOS_HTTPD=y
BR2_PACKAGE_CURIOS_NFTABLES=y
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_SHOW=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
@@ -147,7 +152,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
@@ -161,10 +165,14 @@ BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
BR2_PACKAGE_PODMAN_DRIVER_VFS=y
BR2_PACKAGE_TETRIS=y
BR2_PACKAGE_ROUSETTE=y
BR2_PACKAGE_LIBINPUT=y
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
BR2_PACKAGE_FEATURE_WIFI=y
BR2_PACKAGE_FEATURE_WIFI_DONGLE_REALTEK=y
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
DISK_IMAGE_BOOT_BIN=y
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_PACKAGE_GETENT=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
DISK_IMAGE_BOOT_BIN=y
GNS3_APPLIANCE_RAM=512
GNS3_APPLIANCE_IFNUM=10
+13 -6
View File
@@ -27,17 +27,14 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/linux_defconfig"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="alder/alder styx/dcp-sc-28p-a styx/dcp-sc-28p-b marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc marvell/armada-3720-espressobin-ultra marvell/cn9130-crb-A marvell/cn9130-crb-B microchip/sparx5_pcb135_emmc_no_psci"
BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/dts"
BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_SYSREPO_GROUP="sys-cli"
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_DBUS_CXX=y
@@ -75,6 +72,7 @@ BR2_PACKAGE_FRR=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_MSTPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NGINX=y
BR2_PACKAGE_NGINX_HTTP_SSL_MODULE=y
@@ -92,6 +90,7 @@ BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_RAUC_JSON=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
@@ -109,14 +108,19 @@ BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_DESC="Infix is an operating system based on Linux and modeled with YANG. It can be set up both as a switch, with offloading using switchdev, a router with firewalling, or a secure end device. All while supporting advanced networking scenarios and running Docker containers."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_ALDER_ALDER=y
BR2_PACKAGE_MARVELL_CN9130_CRB=y
BR2_PACKAGE_MARVELL_ESPRESSOBIN=y
BR2_PACKAGE_STYX_DCP_SC_28P=y
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_SHOW=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
@@ -134,6 +138,9 @@ BR2_PACKAGE_MCD=y
BR2_PACKAGE_MDNS_ALIAS=y
BR2_PACKAGE_LIBINPUT=y
BR2_PACKAGE_ROUSETTE=y
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_PACKAGE_GETENT=y
DISK_IMAGE_BOOT_BIN=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
+2 -6
View File
@@ -20,15 +20,11 @@ BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.07.02"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="qemu_arm64"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/qemu/uboot/extras.config"
BR2_TARGET_UBOOT_FORMAT_DTB=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
DISK_IMAGE_BOOT_BIN=y
DISK_IMAGE_BOOT_DATA="${BINARIES_DIR}/flash-image.bin"
DISK_IMAGE_BOOT_OFFSET=0x00200000
# GNS3_APPLIANCE is not set
+1 -5
View File
@@ -38,8 +38,4 @@ BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
DISK_IMAGE_BOOT_BIN=y
DISK_IMAGE_BOOT_DATA="${BINARIES_DIR}/flash-image.bin"
DISK_IMAGE_BOOT_OFFSET=0x00200000
# GNS3_APPLIANCE is not set
+3
View File
@@ -11,6 +11,7 @@ BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_LIBBSD=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_UBOOT=y
@@ -20,3 +21,5 @@ BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/kernelkit/u-boot.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="c3d9cdcc7d9e3eb490d4036f5eece3fb91a2485c"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mscc_fireant_pcb135_emmc"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config"
BR2_TARGET_UBOOT_NEEDS_DTC=y
# GNS3_APPLIANCE is not set
+8 -6
View File
@@ -8,7 +8,6 @@ BR2_CCACHE=y
BR2_CCACHE_DIR="${BR2_EXTERNAL_INFIX_PATH}/.ccache"
BR2_ENABLE_DEBUG=y
BR2_GLOBAL_PATCH_DIR="${BR2_EXTERNAL_INFIX_PATH}/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_TARGET_GENERIC_HOSTNAME="infix"
BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
@@ -30,7 +29,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image
BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/r2s/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.10.3"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/r2s/rk3328-nanopi-r2s-dts.patch"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/r2s/linux_defconfig"
@@ -42,6 +41,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_INFIX_PATH)/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_SYSREPO_GROUP="sys-cli"
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_LINUX_FIRMWARE=y
@@ -74,7 +74,6 @@ BR2_PACKAGE_PYTHON_GUNICORN=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBINPUT=y
BR2_PACKAGE_LIBCURL_CURL=y
@@ -128,6 +127,7 @@ BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_RAUC_JSON=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
@@ -170,14 +170,14 @@ BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_IMAGE_ID="${INFIX_ID}-r2s"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_DESC="Infix is an operating system based on Linux and modeled with YANG. It can be set up both as a switch, with offloading using switchdev, a router with firewalling, or a secure end device. All while supporting advanced networking scenarios and running Docker containers."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_SHOW=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
@@ -188,7 +188,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
@@ -202,7 +201,10 @@ BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
BR2_PACKAGE_PODMAN_DRIVER_VFS=y
BR2_PACKAGE_TETRIS=y
BR2_PACKAGE_ROUSETTE=y
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_PACKAGE_GETENT=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
# GNS3_APPLIANCE is not set
+8 -3
View File
@@ -39,6 +39,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_INFIX_PATH)/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_SYSREPO_GROUP="sys-cli"
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_LINUX_FIRMWARE=y
@@ -88,6 +89,7 @@ BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPTABLES_NFTABLES=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_MSTPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NETCAT_OPENBSD=y
BR2_PACKAGE_NETSNMP=y
@@ -117,6 +119,7 @@ BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_RAUC_JSON=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
@@ -159,15 +162,15 @@ BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_DESC="Infix is an operating system based on Linux and modeled with YANG. It can be set up both as a switch, with offloading using switchdev, a router with firewalling, or a secure end device. All while supporting advanced networking scenarios and running Docker containers."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
BR2_PACKAGE_CONFD=y
# BR2_PACKAGE_CONFD_TEST_MODE is not set
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_SHOW=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
@@ -178,7 +181,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
@@ -193,6 +195,9 @@ BR2_PACKAGE_PODMAN_DRIVER_VFS=y
BR2_PACKAGE_TETRIS=y
BR2_PACKAGE_ROUSETTE=y
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_PACKAGE_GETENT=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
# GNS3_APPLIANCE is not set
+37
View File
@@ -0,0 +1,37 @@
BR2_aarch64=y
BR2_cortex_a72=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_DL_DIR="$(BR2_EXTERNAL_INFIX_PATH)/dl"
BR2_CCACHE=y
BR2_CCACHE_DIR="$(BR2_EXTERNAL_INFIX_PATH)/.ccache"
BR2_ENABLE_DEBUG=y
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL_INFIX_PATH)/local.mk"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
BR2_SSP_NONE=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/src/board/raspberry-pi-4/config.txt"
BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE="${BR2_EXTERNAL_INFIX_PATH}/src/board/raspberry-pi-4/cmdline.txt"
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2025.01"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_arm64"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="${BR2_EXTERNAL_INFIX_PATH}/board/common/uboot/extras.config ${BR2_EXTERNAL_INFIX_PATH}/src/board/raspberry-pi-4/uboot/extras.config"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_FORMAT_DTB=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="arch/arm/dts/infix-key.dtbo arch/arm/dts/rpi-env.dtbo"
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="${BR2_EXTERNAL_INFIX_PATH}/src/board/raspberry-pi-4/uboot/rpi-env.dtso"
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
# GNS3_APPLIANCE is not set
+13 -7
View File
@@ -12,8 +12,8 @@ BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
@@ -26,7 +26,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INF
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
@@ -34,6 +34,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_SYSREPO_GROUP="sys-cli"
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_DBUS_CXX=y
@@ -54,10 +55,8 @@ BR2_PACKAGE_PYTHON_GUNICORN=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_LIBMNL=y
BR2_PACKAGE_NETOPEER2_CLI=y
BR2_PACKAGE_NSS_MDNS=y
BR2_PACKAGE_LINUX_PAM=y
@@ -76,6 +75,7 @@ BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPTABLES_NFTABLES=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_MSTPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NETCAT_OPENBSD=y
BR2_PACKAGE_NETSNMP=y
@@ -105,6 +105,7 @@ BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_RAUC_JSON=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
@@ -124,13 +125,14 @@ BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
BR2_PACKAGE_HOST_GENEXT2FS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_GO_BIN=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_DESC="Infix is an operating system based on Linux and modeled with YANG. It can be set up both as a switch, with offloading using switchdev, a router with firewalling, or a secure end device. All while supporting advanced networking scenarios and running Docker containers."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
@@ -138,9 +140,9 @@ BR2_PACKAGE_CONFD=y
BR2_PACKAGE_CONFD_TEST_MODE=y
BR2_PACKAGE_CURIOS_HTTPD=y
BR2_PACKAGE_CURIOS_NFTABLES=y
BR2_PACKAGE_EXECD=y
BR2_PACKAGE_GENCERT=y
BR2_PACKAGE_STATD=y
BR2_PACKAGE_SHOW=y
BR2_PACKAGE_FACTORY=y
BR2_PACKAGE_FINIT_PLUGIN_HOTPLUG=y
BR2_PACKAGE_FINIT_PLUGIN_HOOK_SCRIPTS=y
@@ -151,7 +153,6 @@ BR2_PACKAGE_FINIT_RTC_FILE="/var/lib/misc/rtc"
BR2_PACKAGE_FINIT_PLUGIN_TTY=y
BR2_PACKAGE_FINIT_PLUGIN_URANDOM=y
BR2_PACKAGE_IITO=y
BR2_PACKAGE_K8S_LOGGER=y
BR2_PACKAGE_KEYACK=y
BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LANDING=y
@@ -165,7 +166,12 @@ BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
BR2_PACKAGE_PODMAN_DRIVER_VFS=y
BR2_PACKAGE_TETRIS=y
BR2_PACKAGE_ROUSETTE=y
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
BR2_PACKAGE_FEATURE_WIFI=y
BR2_PACKAGE_FEATURE_WIFI_DONGLE_REALTEK=y
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_PACKAGE_GETENT=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
GNS3_APPLIANCE_RAM=512
+10 -6
View File
@@ -7,13 +7,14 @@ BR2_CCACHE=y
BR2_CCACHE_DIR="${BR2_EXTERNAL_INFIX_PATH}/.ccache"
BR2_ENABLE_DEBUG=y
BR2_GLOBAL_PATCH_DIR="${BR2_EXTERNAL_INFIX_PATH}/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_TARGET_GENERIC_HOSTNAME="ix"
BR2_TARGET_GENERIC_ISSUE="Infix by KernelKit"
BR2_INIT_FINIT=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt ${BR2_EXTERNAL_INFIX_PATH}/board/common/xattrs"
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_ROOTFS_MERGED_USR=y
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="@console"
BR2_TARGET_GENERIC_GETTY_TERM="xterm"
@@ -26,7 +27,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INF
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.52"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.44"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
@@ -34,6 +35,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig"
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_STRESS_NG=y
BR2_PACKAGE_SYSREPO_GROUP="sys-cli"
BR2_PACKAGE_JQ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_DBUS_CXX=y
@@ -50,10 +52,7 @@ BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN=y
BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_LIBSSH_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBSSH2_OPENSSL=y
BR2_PACKAGE_LIBXCRYPT=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_LIBMNL=y
@@ -71,6 +70,7 @@ BR2_PACKAGE_FRR=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPUTILS=y
BR2_PACKAGE_LLDPD=y
BR2_PACKAGE_MSTPD=y
BR2_PACKAGE_NETCALC=y
BR2_PACKAGE_NGINX=y
BR2_PACKAGE_NGINX_HTTP_SSL_MODULE=y
@@ -82,12 +82,14 @@ BR2_PACKAGE_TCPDUMP=y
BR2_PACKAGE_WHOIS=y
BR2_PACKAGE_BASH_COMPLETION=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_GETENT=y
BR2_PACKAGE_KMOD_TOOLS=y
BR2_PACKAGE_PWGEN=y
BR2_PACKAGE_RAUC=y
BR2_PACKAGE_RAUC_DBUS=y
BR2_PACKAGE_RAUC_GPT=y
BR2_PACKAGE_RAUC_NETWORK=y
BR2_PACKAGE_RAUC_JSON=y
BR2_PACKAGE_SYSKLOGD=y
BR2_PACKAGE_SYSKLOGD_LOGGER=y
BR2_PACKAGE_WATCHDOGD=y
@@ -113,7 +115,7 @@ BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
INFIX_VENDOR_HOME="https://github.com/kernelkit"
INFIX_DESC="Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling."
INFIX_DESC="Infix is an operating system based on Linux and modeled with YANG. It can be set up both as a switch, with offloading using switchdev, a router with firewalling, or a secure end device. All while supporting advanced networking scenarios and running Docker containers."
INFIX_HOME="https://github.com/kernelkit/infix/"
INFIX_DOC="https://github.com/kernelkit/infix/tree/main/doc"
INFIX_SUPPORT="mailto:kernelkit@googlegroups.com"
@@ -136,7 +138,9 @@ BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
BR2_PACKAGE_LOWDOWN=y
BR2_PACKAGE_MCD=y
BR2_PACKAGE_MDNS_ALIAS=y
BR2_PACKAGE_SHOW=y
BR2_PACKAGE_ROUSETTE=y
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
GNS3_APPLIANCE_RAM=512
+331 -2
View File
@@ -3,6 +3,306 @@ Change Log
All notable changes to the project are documented in this file.
[v25.08.0][] - 2025-09-01
-------------------------
### Changes
- Upgrade Buildroot to 2025.02.5 (LTS)
- Upgrade Linux kernel to 6.12.44 (LTS)
- Raspberry Pi 4 is now a part of the aarch64 image.
- Add support for [Raspberry Pi touch display][RPI-TOUCH] on Raspberry Pi 4
### Fixes
- Fix #1098: Prune dangling container images to reclaim disk space
- Fix #1123: Disabling or removing a container may cause podman to hang
- Fix #1124: Container setup with unreachable remote image spawns
excessive `ip monitor` processes
- Fix #1127: Silence libyang Obsolete schema node warnings in log
[RPI-TOUCH]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
[v25.06.0][] - 2025-07-01
-------------------------
### Changes
- Upgrade Buildroot to 2025.02.4 (LTS)
- Upgrade Linux kernel to 6.12.35 (LTS)
- Upgrade curiOS built-in containers to v25.06.0
- Add support for setting mode of a container content mount, issue #1070
- Add Wi-Fi client support and add support for some USB-Wi-Fi cards
- New slogan: Infix OS — Immutable.Friendly.Secure
### Fixes
- cli: fix by-word movement, detect word barrier using non-alphanum chars
- cli: fix delete word left/right, make sure to save word in kill buffer
[v25.05.1][] - 2025-06-12
-------------------------
### Changes
- Upgrade Linux kernel to 6.12.32 (LTS)
### Fixes
- Fix #1060: Restore of missing CLI commands, regression in Infix v25.05.0
[v25.05.0][] - 2025-05-27
-------------------------
### Changes
- Upgrade Buildroot to 2025.02.3 (LTS)
- Upgrade Linux kernel to 6.12.30 (LTS)
- Upgrade libyang to 3.12.2
- Upgrade sysrepo to 3.6.11
- Upgrade netopeer2 (NETCONF) to 2.4.1
- New hardware support: Raspberry Pi 4B (aarch64)
- Add documentation on Infix upgrading and downgrading, issue #1009
- Add HDMI and USB support for iMX8MP-evk
- Enforced strict format for LLDP destination MAC address:
- Only accepts colon-separated format: `01:80:C2:00:00:0E`
- Add `show lldp` command to show discovered neighbors per interface.
- Add configuration support for per-interface LLDP administrative status
### Fixes
- Fix containers with multiple mounts
- Correct description for LAG LACP modes
- Fix #1040: Add `mount` constraint for container config
[v25.04.0][] - 2025-04-30
-------------------------
### Changes
- Upgrade Linux kernel to 6.12.25 (LTS)
- Upgrade Buildroot to 2025.02.1 (LTS)
- Format for disk image (for QEMU) has changed to `qcow2`
### Fixes
- Fix #1002: Broken symlink in release package
- Fix #1006: NanoPi R2S corrupt startup, regression in Infix v25.02.0
- Bump R2S kernel, now same as tier one boards
- Fix #1015: Not possible to save custom SSH settings in startup-config
- Fix group owner and permissions of `/cfg/backup` directory
- Fix extraction of old version for `/cfg/backup/` files
- Fix configuration migration issues when upgrading
[v25.03.0][] - 2025-03-31
-------------------------
> [!IMPORTANT]
> This release is the first with the new Buildroot 2025.02 (LTS)
### Changes
- Upgrade Linux kernel to 6.12.21 (LTS)
- Upgrade Buildroot to 2025.02.0 (LTS)
### Fixes
- Fix #964: YANG schema warning in syslog: missing 'monitor' node for lag
- Fix #980: the system fails to reboot when a container is (stuck), for
whatever reason, in its 'setup' state
- Fix #990: web console, ttyd service, stopped working after upgrade to
Buildroot 2025.02, caused by new (missing) option `--writable`
- Fix TCAM memory corruption in `mvpp2` Ethernet controller
- Fix annoying (but harmless) usage message from the logger tool when
`startup-config` fails to load and the system reverts to failure mode
- Fix harmless log warning for product specific init when no product
specific init scripts are found
- Backport fixes for sysklogd, affecting hostname filtering and periods
in TAG names, pending official backport in Buildroot
[v25.02.0][] - 2025-03-04
-------------------------
### Changes
- Upgrade Linux kernel to 6.12.18 (LTS)
- Upgrade Buildroot to 2024.02.11 (LTS)
- Add support for link aggregation (lag), static (balance-xor) and LACP
- Add support for the [i.MX 8M Plus EVK][EVK]
- YANG type change for SSH private/public keys, from ietf-crypto-types
to infix-crypto-types
- Disable global IPv6 forwarding by default, enable by per-interface
setting. Note, route advertisements are always accepted. Issue #785
- Drop automatic default route (interface route) for IPv4 autoconf, not
necessary and causes more confusion than good. Issue #923
- Update scripting with new RESTCONF examples
### Fixes
- Fix #896: `/etc/resolv.conf` not properly generated when system runs
in fail secure mode (failing to load `startup-config`)
- Fix #902: containers "linger" in the system (state 'exited') after
having removed them from the configuration
- Fix #930: container configuration changes does not apply at runtime
only when saved to `startup-config` and system is rebooted
- Fix #936: DHCP server reconfiguration does not always take effect.
- Fix #956: CLI `copy` command complains it cannot change owner when
copying `factory-config` to `running-config`. Bogus error, the
latter is not really a file
- Fix #977: "Operation not permitted" when saving `running-config` to
`startup-config` (harmless warning but annoying and concerning)
[EVK]: https://www.nxp.com/design/design-center/development-boards-and-designs/8MPLUSLPD4-EVK
[v25.01.0][] - 2025-01-31
-------------------------
> [!NOTE]
> This release contains breaking changes in the configuration file
> syntax for DHCP clients. Specifically DHCP options *with value*,
> i.e., the syntax for sending a hexadecimal value now require `hex`
> prefix before a string of colon-separated pairs of hex values.
### Changes
- Upgrade Linux kernel to 6.12.11 (LTS)
- Upgrade Buildroot to 2024.02.10 (LTS)
- Upgrade FRR from 9.1.2 to 9.1.3
- Add support for configuring SSH server, issue #441. As a result,
both SSH and NETCONF now use the same host key in `factory-config`
- Add operational support for reading DNS resolver info, issue #510
- Add operational support for NTP client, issue #510
- Add support for more mDNS settings: allow/deny interfaces, acting
as "reflector" and filtering of reflected services. Issue #678
- Add DHCPv4 server support, multiple subnets with static hosts and
DHCP options on global, subnet, or host level, issue #703.
Contributed by [MINEx Networks](https://minexn.com/)
- DHCP client options aligned with DHCP server, `startup-config`
files with old syntax are automatically migrated
- Breaking change in DHCP client options *with value*. Hexadecimal
values must now be formatted as `{ "hex": "c0:ff:ee" }` (JSON)
- Add documentation on management via SSH, Web (RESTCONF, Web
Console), and Console Port, issue #787
- Add documentation of DNS client use and configuration, issue #798
- Add support for changing boot order for the system with an RPC,
including support for reading boot order from operational datastore
- Add support for GRE/GRETAP tunnels
- Add support for STP/RSTP on bridges
- Add support for VXLAN tunnels
- Add support for configuring global LLDP `message-tx-interval`
### Fixes
- Fix #777: Authorized SSH key not applied to `startup-config`
- Fix #829: Avahi (mDNS responder) not starting properly on switches
with *many* ports (>10). This led to a review of `sysctl`:
- New for IPv4:
- Adjust IGMP max memberships: 20 -> 1000
- Use neighbor information on nexthop selection
- Use inbound interface address on ICMP errors
- Ignore routes with link down
- Disable `rp_filter`
- ARP settings have been changed to better fit routers, i.e.,
systems with multiple interfaces:
- Always use best local address when sending ARP
- Only reply to ARP if target IP is on the inbound interface
- Generate ARP requests when device is brought up or HW address changes
- New for IPv6:
- Keep static global addresses on link down
- Ignore routes with link down
- Fix #861: Fix error when running 251+ reconfigurations in test-mode
- Fix #869: Setup of bridges is now more robust
- Fix #899: DHCP client with client-id does not work
- Minor cleanup of Networking Guide
- Fix memory leaks in `confd`
[v24.11.1][] - 2024-11-29
-------------------------
### Changes
- Upgrade Frr to 9.1.2, fixes an OSPF issue where *Zebra* lost netlink
messages and drifted out of sync with the kernel's view of addresses
and interfaces available in the system
- Allow setting IP address directly on VLAN filtering bridges. This
only works when the bridge is an untagged member of a (single) VLAN.
- cli: usability -- showing log files now automatically jump to the end
of the file, where the latest events are
- cli: usability -- showing container status, or other status that
overflows the terminal horizontally, now wrap the lines and exit the
pager immediately if the contents fit on the first screen
- The default log level of the mDNS responder, `avahi-daemon`, has been
adjusted to make it less verbose. Now only `LOG_NOTICE` and higher
severity is logged -- making it very quiet
### Fixes
- Fix #685: DSA conduit interface not always detected. Previous
attempt at a fix (v24.10.2) mitigated the issue, but did not
completely solve it.
- Fix #835: redesign how the system creates/deletes containers from the
`running-config`. Prior to this change, all removal and creation was
handled by a separate queue that ran asynchronously from the `confd`
process. This could lead to situations where new configurations are
applied before the queue had been fully processed. After this change
containers are deleted synchronously and new containers are created
in the same flow as during normal runtime operation (start/upgrade)
- Fix start of containers with `manual=True` option should now work
again, regression in v24.11.0
- Fix loss of writable volumes when temporarily disabling a container
in the configuration, now the container remains dormant with all its
volumes still available
- Fix presentation bug in CLI `show interfaces` where all line-drawing
characters showed up as hexadecimal values. Regression in v24.11.0
- Fix missing log messages from Frr Zebra daemon
- Stop the zeroconf (IPv4LL) agent, `avahi-autoipd`, when removing an
interface, e.g., `br0`
- Creating more than one container trigger restarts of previously set
up containers. Which in some cases may cause these earlier ones to
end up in an inconsistent state
- Prevent traffic assigned to locally terminated VLANs from being
forwarded, when the underlying ports are simultaneously attached to
a VLAN filtering bridge.
[v24.11.0][] - 2024-11-20
-------------------------
> [!CAUTION]
> This release contains breaking changes for container users! As of
> v24.11.0, all persistent[^1] containers always run in `read-only` mode
> and the setting itself is deprecated (kept only for compatibility
> reasons). The main reason for this change is to better serve users
> with embedded container images in their builds of Infix. I.e., they
> can now upgrade the OCI image in their build and rely on the container
> being automatically upgraded when Infix is upgraded, issue #823. For
> other users, the benefit is that *all* container configuration changes
> take when activated, issue #822, without having to perform any tricks.
### Changes
- Add validation of interface name lengths, (1..15), Linux limit
- Add support for ftp/http/https URI:s in container image, with a new
`checksum` setting for MD5/SHA256/SHA512 verification, issue #801
- Add a retry timer to the background container create service. This
will ensure failing `docker pull` operations from remote images are
retrying after 60 seconds, or quicker
- CLI base component, `klish`, has been updated with better support for
raw terminal mode and alternate quotes (' in addition to ")
- Log silenced from container activation messages, only the very bare
necessities are now logged, e.g., `podman create` command + status
- Factory reset no longer calls `shred` to "securely erase" any files
from writable data partitions. This will speed up the next boot
considerably
### Fixes
- Fix #659: paged output in CLI accessed via console port sometimes
causes lost lines, e.g. missing interfaces. With updated `klish`
and the terminal in raw mode, the pager (less) can now control both
the horizontal and vertical
- Fix #822: adding, or changing, an environment variable to a running
container does not take without the `container upgrade NAME` trick
- Fix #823: with an OCI image embedded in the Infix image, an existing
container in the configuration is not upgraded to the new OCI image
with the Infix upgrade.
- Frr leaves log files in `/var/tmp/frr` on unclean shutdowns. This
has now been fixed with a "tmpfiles" cleanup of that path at boot
[^1]: I.e., set up in the configuration, as opposed to temporary ones
started with `container run` from the CLI admin-exec context.
[v24.10.2][] - 2024-11-08
-------------------------
@@ -36,6 +336,7 @@ All notable changes to the project are documented in this file.
- Styx: override iitod (LED daemon) with a product specific LED script
### Fixes
- Fix #685: DSA conduit interface not always detected, randomly causing
major issues configuring systems with multiple switch cores
- Fix #778: reactivate OpenSSL backend for libssh/libssh2 for NanoPI R2S.
@@ -52,11 +353,13 @@ All notable changes to the project are documented in this file.
-------------------------
### Changes
- Add support for interface description, sometimes referred to as
"ifAlias". Saved as an Linux interface alias (not `altname`), e.g.,
`/sys/class/interfaces/veth0a/ifalias`, includes operational support
### Fixes
- Fix #735: `copy` and `erase` commands missing from CLI, regression
in Infix v24.10.0 defconfigs, now added as dep. in klish package
@@ -71,7 +374,9 @@ Also, heads-up to all downstream users of Infix. YANG models have been
renamed to ease maintenance, more info below.
### Changes
- Software control of port LEDs on the Styx platform has been disabled.
Default driver behavior, green link and green traffic blink, is kept
as-is, which should mitigate issues reported in #670
- Correcting documentation on QoS. For packets containing both a VLAN
@@ -107,6 +412,7 @@ renamed to ease maintenance, more info below.
see <https://kernelkit.org/posts/firewall-container/>
### Fixes
- Fix #499: add an NACM rule to factory-config, which by default deny
everyone to read user password hash(es)
- Fix #663: internal Ethernet interfaces shown in CLI tab completion
@@ -118,7 +424,7 @@ renamed to ease maintenance, more info below.
with `custom-phys-address` to allow for constructing more free-form
MAC addresses based on the chassis MAC (a.k.a., base MAC) address.
For more information, see the YANG model, a few examples are listed in
the updated documentation.
the updated documentation.
The syntax will be automatically updated in the `startup-config` and
`factory-config` -- make sure to verify the changes and update any
static `factory-config` used for your products
@@ -155,6 +461,7 @@ also been added to facilitate site specific adaptations. Please see the
documentation for details.
### Known Issues
- The CLI command `show interfaces` may for some terminal resolutions
not display all interfaces (on systems with >20 interfaces). This
problem is limited to the console port and only occurs for smaller
@@ -163,6 +470,7 @@ documentation for details.
using the CLI from an SSH session, is not affected. Issue #659
### Changes
- Upgrade Buildroot to 2024.02.6 (LTS)
- Upgrade Linux kernel to 6.6.52 (LTS)
- Upgrade libyang to 3.4.2
@@ -182,6 +490,7 @@ documentation for details.
by `mctl` reporting no multicast filtering enabled on bridge
### Fixes
- Fix #357: EUI-64 based IPv6 autoconf address on bridges seem to be
randomized. Problem caused by kernel setting a random MAC before any
bridge port is added. Fixed by using the device's base MAC address on
@@ -244,6 +553,7 @@ Finally, the following consumer boards are now fully supported:
- StarFive VisionFive2 (RISC-V)
### Changes
- Upgrade Buildroot to 2024.02.5 (LTS)
- Upgrade Linux kernel to 6.6.46 (LTS)
- Issue #158: enhance security of factory reset. All file content
@@ -295,6 +605,7 @@ Finally, the following consumer boards are now fully supported:
log messages. See `/var/log/debug` for *all* log messages
### Fixes
- Fix #274: add missing link/traffic LEDs on NanoPi R2S LAN port
- Fix #489: ensure all patches are versioned, including Linux kernel
- Fix #531: creating a new VLAN interface named `vlanN` should not set
@@ -324,6 +635,7 @@ Finally, the following consumer boards are now fully supported:
> upgrade, but before reboot, a factory reset is required!
### Changes
- Upgrade Buildroot to 2024.02.3 (LTS)
- Upgrade Linux kernel to 6.6.34 (LTS)
- Upgrade bundled curiOS httpd container to v24.05.0
@@ -390,6 +702,7 @@ Finally, the following consumer boards are now fully supported:
[yescrypt]: https://en.wikipedia.org/wiki/Yescrypt
### Fixes
- Fix #424: regression, root user can log in without password
- Fix build regressions in `cn9130_crb_boot_defconfig` caused by upgrade
to Buildroot v2024.02 and recent multi-key support in RAUC and U-Boot
@@ -421,11 +734,13 @@ Finally, the following consumer boards are now fully supported:
-------------------------
### Changes
- Add small delay in U-Boot to allow stopping boot on reference boards
- Document how to provision the bootloader and Infix on a blank board
- Use initial hostname from `/etc/os-release` as configuration fallback
### Fixes
- Fix build regressions in `cn9130_crb_boot_defconfig` caused by upgrade
to Buildroot v2024.02 and recent multi-key support in RAUC and U-Boot
- Fix provisioning script after changes to make GRUB loading more robust
@@ -440,6 +755,7 @@ Finally, the following consumer boards are now fully supported:
-------------------------
### Changes
- Default web landing page refactored into a Buildroot package to make
it possible to overload from customer repos.
- Enable DCB support in aarch64 kernel (for EtherType prio override)
@@ -450,6 +766,7 @@ Finally, the following consumer boards are now fully supported:
- Issue #374: add timestamps to dagger .log files
### Fixes
- Add missing LICENSE hash for factory reset tool
- Fix #424: regression, root user can log in without password
@@ -471,6 +788,7 @@ idea is to generate supported features from the models and include in
future releases.
### Changes
- Bump the base Buildroot version to v2024.02 LTS
- Bump the base Linux kernel version to 6.6 LTS
- Drop Classic variant to reduce overhead, simplify build & release
@@ -551,6 +869,7 @@ future releases.
named 'default'
### Fixes
- confd: Fix memory leak when operating on candidate configuration
- probe: Fix crash on systems without USB
- Reduced syslog errors for accesses no non-existing xpaths
@@ -1293,7 +1612,17 @@ Supported YANG models in addition to those used by sysrepo and netopeer:
- N/A
[buildroot]: https://buildroot.org/
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v24.10.1...HEAD
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v25.08.0...HEAD
[v25.08.0]: https://github.com/kernelkit/infix/compare/v25.06.1...v26.08.0
[v25.06.0]: https://github.com/kernelkit/infix/compare/v25.05.1...v26.06.0
[v25.05.1]: https://github.com/kernelkit/infix/compare/v25.05.0...v25.05.1
[v25.05.0]: https://github.com/kernelkit/infix/compare/v25.04.0...v25.05.0
[v25.04.0]: https://github.com/kernelkit/infix/compare/v25.03.0...v25.04.0
[v25.03.0]: https://github.com/kernelkit/infix/compare/v25.02.0...v25.03.0
[v25.02.0]: https://github.com/kernelkit/infix/compare/v25.01.0...v25.02.0
[v25.01.0]: https://github.com/kernelkit/infix/compare/v24.11.0...v25.01.0
[v24.11.1]: https://github.com/kernelkit/infix/compare/v24.11.0...v24.11.1
[v24.11.0]: https://github.com/kernelkit/infix/compare/v24.10.0...v24.11.0
[v24.10.2]: https://github.com/kernelkit/infix/compare/v24.10.1...v24.10.2
[v24.10.1]: https://github.com/kernelkit/infix/compare/v24.10.0...v24.10.1
[v24.10.0]: https://github.com/kernelkit/infix/compare/v24.09.0...v24.10.0
+11 -7
View File
@@ -1,13 +1,16 @@
<img align="right" src="logo.png" alt="Infix - Linux <3 NETCONF" width=480 border=10>
Welcome to Infix, your friendly Network Operating System! On these
pages you can find both user and developer documentation.
Welcome to Infix, your immutable, friendly, and secure operating system!
On these pages you can find both user and developer documentation.
> Topics on configuring the system include CLI examples, every setting
> is also possible to perform using NETCONF. In fact, the Infix test
> system solely relies on NETCONF for configuring network topologies.
Most topics on configuring the system include CLI examples, but every
setting, as well as status read-back from the operational datastore, is
also possible to perform using NETCONF or RESTCONF. In fact, the Infix
regression test system solely relies on NETCONF and RESTCONF.
The CLI documentation is also available from inside the CLI itself using
the `help` command.
> [!TIP]
> The CLI documentation is also available from inside the CLI itself
> using the `help` command in admin-exec mode.
- **CLI Topics**
- [Introduction to the CLI](cli/introduction.md)
@@ -18,6 +21,7 @@ the `help` command.
- [Introduction](introduction.md)
- [System Configuration](system.md)
- [Network Configuration](networking.md)
- [DHCP Server](dhcp.md)
- [Syslog Support](syslog.md)
- **Infix In-Depth**
- [Boot Procedure](boot.md)
+220 -145
View File
@@ -1,37 +1,36 @@
Boot Procedure
==============
# Boot Procedure
Systems running Infix will typically boot in multiple phases, forming
a boot chain. Each link in the chain has three main responsibilities:
1. Ensuring the integrity of the next link before passing control to
it. This avoids silent failures stemming from data corruption.
2. Ensuring the authenticity of the next link before passing control
1. Ensuring the authenticity of the next link before passing control
to it, commonly referred to as _Secure Boot_. This protects against
malicious attempts to modify a system's firmware.
3. Preparing the system state according to the requirements of the
1. Preparing the system state according to the requirements of the
next link. E.g. the Linux kernel requires the system's RAM to be
operational.
A typical chain consists of four stages:
.---------.
| ROM >---. Determine the location of and load the SPL
'---------' |
.-----------------'
| .---------.
'---> SPL >---. Perform DDR training and load the TPL
'---------' |
.-----------------'
| .---------.
'---> TPL >---. Load Linux kernel, device tree, and root filesystem
'---------' |
.-----------------'
| .---------.
'---> Infix | Get down to business
'---------'
```
.---------.
| ROM >---. Determine the location of and load the SPL
'---------' |
.-----------------'
| .---------.
'---> SPL >---. Perform DDR training and load the TPL
'---------' |
.-----------------'
| .---------.
'---> TPL >---. Load Linux kernel, device tree, and root filesystem
'---------' |
.-----------------'
| .---------.
'---> Infix | Get down to business
'---------'
```
After a reset, hardware will pass control to a program (_ROM_) which
is almost always programmed into the SoC by the vendor. This program
@@ -52,9 +51,7 @@ This document's focus is to describe the final two phases of the boot
chain, as the initial phases are very hardware dependent, better
described by existing documentation provided by the SoC vendor.
Bootloader
----------
## Bootloader
### Configuration
@@ -62,33 +59,42 @@ To mitigate the risk of a malicious user being able to circumvent the
bootloader's validation procedure, user configuration is kept to a
minimum. Two settings are available:
- **Boot order**: Since Infix maintains two copies of its software image,
and as some bootloaders support netbooting, the order in which boot
sources are considered can be configured. To select the active
source, use [RAUC][]:
**Boot order**: Since Infix maintains two copies of its software image,
and as some bootloaders support [netbooting][2], the order in which boot
sources are considered can be configured. To select the active
source, use [RAUC][]:
`rauc status mark-active <slot>`
```
root@example:~# rauc status mark-active <slot>
...
```
Where `<slot>` is one of:
Where `<slot>` is one of:
| `<slot>` | Source |
|----------|---------------------------|
| rootfs.0 | Primary partition |
| rootfs.1 | Secondary partition |
| net.0 | Netboot (where supported) |
| **`<slot>`** | **Source** |
|--------------|---------------------------|
| `rootfs.0` | Primary partition |
| `rootfs.1` | Secondary partition |
| `net.0` | Netboot (where supported) |
- **Debug**: By default, the kernel will only output errors to the
console during boot. Optionally, this can be altered such that all
enabled messages are logged.
**Debug**: By default, the kernel will only output errors to the
console during boot. Optionally, this can be altered such that all
enabled messages are logged.
On systems using _U-Boot_, this can be enabled by running `fw_setenv
DEBUG 1`. To restore the default behavior, run `fw_setenv DEBUG`.
On systems using _U-Boot_, this can be enabled by running `fw_setenv
DEBUG 1`. To restore the default behavior, run `fw_setenv DEBUG`.
On systems running _GRUB_, this can be enabled by running
`grub-editenv /mnt/aux/grub/grubenv set DEBUG=1`. To restore the
default behavior, run `grub-editenv /mnt/aux/grub/grubenv unset
DEBUG`
On systems running _GRUB_, this can be enabled by running:
```
root@example:~# grub-editenv /mnt/aux/grub/grubenv set DEBUG=1
```
To restore the default behavior, run:
```
root@example:~# grub-editenv /mnt/aux/grub/grubenv unset DEBUG
```
### U-Boot
@@ -107,8 +113,7 @@ and TFTP to transfer the image to the system's RAM.
Access to U-Boot's shell is disabled to prevent side-loading of
malicious software. To configure the active boot partition, refer to
the [Bootloader Interface](#bootloader-interface) section.
the [Bootloader Configuration](#configuration) section.
### GRUB
@@ -119,14 +124,82 @@ standard [System Upgrade](#system-upgrade) can be performed on
virtualized instances.
Access to the GRUB shell is not limited in any way, and the boot
partition can be selected interactively at boot using the arrow
keys. It is also possible to permanently configure the default
partition from Infix using the [Bootloader
Interface](#bootloader-interface).
partition can be selected interactively at boot using the arrow keys. It
is also possible to permanently configure the default partition from
Infix using the [Bootloader Configuration](#configuration).
## System Boot
System Upgrade
==============
After the system firmware (BIOS or and [boot loader](boot.md) start
Linux the following happens. The various failure modes, e.g., missing
password in VPD, are detailed later in this section.
![System boot flowchart](img/fail-secure.svg)
1. Before mounting `/cfg` and `/var` partitions, hosting read-writable
data like `startup-config` and container images, the system first
checks if a factory reset has been requested by the user, if so it
wipes the contents of these partitions
1. Linux boots with a device tree which is used for detecting generic
make and model of the device, e.g., number of interfaces. It may
also reference an EEPROM with [Vital Product Data](vpd.md). That is
where the base MAC address and per-device password hash is stored.
(Generic builds use the same MAC address and password)
1. On every boot the system's `factory-config` and `failure-config` are
generated from the YANG[^2] models of the current firmware version.
This ensures that a factory reset device can always boot, and that
there is a working fail safe, or rather *fail secure*, mode
1. On first power-on, and after a factory reset, the system does not
have a `startup-config`, in which case `factory-config` is copied
to `startup-config` -- if a per-product specific version exists it
is preferred over the generated one
1. Provided the integrity of the `startup-config` is OK, a system
service loads and activates the configuration
### Failure Modes
So, what happens if any of the steps above fail?
#### VPD Fail
The per-device password cannot be read, or is corrupt, so the system
`factory-config` and `failure-config` are not generated:
1. First boot, or after factory reset: `startup-config` cannot be
created or loaded, and `failure-config` cannot be loaded. The
system ends up in an unrecoverable state, i.e., **RMA[^3] Mode**
1. The system has booted (at least) once with correct VPD and password
and already has a `startup-config`. Provided the `startup-config`
is OK (see below), it is loaded and system boots successfully
In both cases, external factory reset modes/button will not help, and
in the second case will cause the device to fail on the next boot.
> [!NOTE]
> The second case does not yet have any warning or event that can be
> detected from the outside. This is planned for a later release.
#### Broken startup-config
If loading `startup-config` fails for some reason, e.g., invalid JSON
syntax, failed validation against the system's YANG model, or a bug in
the system's `confd` service, the *Fail Secure Mode* is triggered and
`failure-config` is loaded (unless VPD Failure, see above).
> [!TIP]
> Please see the [Branding & Releases](branding.md) document for how to
> provide per-product `failure-config`, or `factory-config` to suit your
> product's preferences.
*Fail Secure Mode* is a fail-safe mode provided for debugging the
system. The default[^4] creates a setup of isolated interfaces with
communication only to the management CPU, SSH and console login using
the device's factory reset password, IP connectivity only using IPv6
link-local, and device discovery protocols: LLDP, mDNS-SD. The login
and shell prompt are set to `failure-c0-ff-ee`, the last three octets of
the device's base MAC address.
## System Upgrade
Much of the minutiae of software upgrades is delegated to [RAUC][],
which offers lots of benefits out-of-the-box:
@@ -134,21 +207,21 @@ which offers lots of benefits out-of-the-box:
- Upgrade Bundles are always signed, such that their authenticity can
be verified by the running operating system, before the new one is
installed.
- The bureaucracy of interfacing with different bootloaders, manage
the boot order, is a simple matter of providing a compatible
configuration.
- Updates can be sourced from the local filesystem (including external
media like USB sticks or SD-cards) and from remote servers using FTP
or HTTP(S).
To initiate a system upgrade from the shell[^1], run:
rauc install <file|url>
```
root@example:~# rauc install <file|url>
...
```
Where the file or URL points to a [RAUC Upgrade
Bundle](#rauc-upgrade-bundle).
Where the file or URL points to a [RAUC Upgrade Bundle](#rauc-upgrade-bundle).
This will upgrade the partition not currently running. After a
successful upgrade is completed, you can reboot your system, which
@@ -156,14 +229,9 @@ will then boot from the newly installed image. Since the partition
from which you were originally running is now inactive, running the
same upgrade command again will bring both partitions into sync.
[RAUC]: https://rauc.io
## Image Formats
Image Formats
=============
SquashFS Image
--------------
### SquashFS Image
**Canonical Name**: `rootfs.squashfs`
@@ -174,10 +242,7 @@ this image, or is dependent on it, in one way or another.
On its own, it can be used as an [initrd][] to efficiently boot a
virtual instance of Infix.
[initrd]: https://docs.kernel.org/admin-guide/initrd.html
FIT Framed Squash Image
-----------------------
### FIT Framed Squash Image
**Canonical Name**: `rootfs.itb`
@@ -194,9 +259,9 @@ stored in the `/boot` directory of the filesystem.
On disk, this image is then stored broken up into its two components;
the _FIT header_ (`rootfs.itbh`) and the SquashFS image. The header
is stored on the [Auxiliary Data](#aux---auxiliary-data) partition of
is stored on the [Auxiliary Data](#aux-auxiliary-data) partition of
the [Disk Image](#disk-image), while the SquashFS image is stored in
one of the [Root Filesystem](#primarysecondary---root-filesystems)
one of the [Root Filesystem](#primarysecondary-root-filesystems)
partitions.
When the system boots, U-Boot will concatenate the two parts to
@@ -216,25 +281,20 @@ validate the SquashFS's contents. This path was chosen because:
In its full form, it can be used to netboot Infix, as it contains all
the information needed by U-Boot in a single file.
[FIT]: https://u-boot.readthedocs.io/en/latest/usage/fit.html
RAUC Upgrade Bundle
-------------------
### RAUC Upgrade Bundle
**Canonical Name**: `infix-${ARCH}.pkg`
Itself a SquashFS image, it contains the Infix [SquashFS
Image](#squashfs-image) along with the header of the [FIT Framed
Squash Image](#fit-framed-squash-image), and some supporting files to
let [RAUC][] know how install it on the target system.
Itself a SquashFS image, this bundle (sometimes referred to package)
contains the Infix [SquashFS Image](#squashfs-image) along with the
header of the [FIT Framed Squash Image](#fit-framed-squash-image), and
some supporting files to let [RAUC][] know how install it on the target
system.
When performing a [System Upgrade](#system-upgrade), this is the
format to use.
When performing a [System Upgrade](#system-upgrade), this is the format
to use.
Disk Image
----------
### Disk Image
**Canonical Name**: `disk.img`
@@ -242,35 +302,37 @@ Infix runs from a block device (e.g. eMMC or virtio disk) with the
following layout. The disk is expected to use the GPT partitioning
scheme. Partitions marked with an asterisk are optional.
.-----------.
| GPT Table |
:-----------:
| boot* |
:-----------:
| aux |
:-----------:
| |
| primary |
| |
:-----------:
| |
| secondary |
| |
:-----------:
| cfg |
:-----------:
| |
| var* |
| |
'-----------'
```
.-----------.
| GPT Table |
:-----------:
| boot* |
:-----------:
| aux |
:-----------:
| |
| primary |
| |
:-----------:
| |
| secondary |
| |
:-----------:
| cfg |
:-----------:
| |
| var* |
| |
'-----------'
```
### `boot` - Bootloader
#### `boot` - Bootloader
| Parameter | Value |
|-----------|-----------------------------------------|
| Required | No |
| Size | 4 MiB |
| Format | Raw binary, as dictated by the hardware |
| **Parameter** | **Value** |
|---------------|-----------------------------------------|
| Required | No |
| Size | 4 MiB |
| Format | Raw binary, as dictated by the hardware |
Optional partition containing the system's bootloader. May also reside
in a separate storage device, e.g. a serial FLASH.
@@ -278,14 +340,13 @@ in a separate storage device, e.g. a serial FLASH.
On x86_64, this partition holds the EFI system partition, containing
the GRUB bootloader.
#### `aux` - Auxiliary Data
### `aux` - Auxiliary Data
| Parameter | Value |
|-----------|-----------------|
| Required | Yes |
| Size | 4 MiB |
| Format | EXT4 filesystem |
| **Parameter** | **Value** |
|---------------|-----------------|
| Required | Yes |
| Size | 4 MiB |
| Format | EXT4 filesystem |
Holds information that is shared between Infix and its bootloader,
such as image signatures required to validate the chain of trust,
@@ -293,10 +354,12 @@ bootloader configuration etc.
Typical layout when using U-Boot bootloader:
/
├ primary.itbh
├ secondary.itbh
└ uboot.env
```
/
├ primary.itbh
├ secondary.itbh
└ uboot.env
```
During boot, an ITB header along with the corresponding root
filesystem image are concatenated in memory, by U-Boot, to form a
@@ -307,39 +370,36 @@ Note that the bootloader's primary environment is bundled in the
binary - `uboot.env` is only used to import a few settings that is
required to configure the boot order.
#### `primary`/`secondary` - Root Filesystems
### `primary`/`secondary` - Root Filesystems
| Parameter | Value |
|-----------|-------------------|
| Required | Yes |
| Size | >= 256 MiB |
| Format | Squash filesystem |
| **Parameter** | **Value** |
|---------------|-------------------|
| Required | Yes |
| Size | >= 256 MiB |
| Format | Squash filesystem |
Holds the [SquashFS Image](#squashfs-image). Two copies exist so that
an incomplete upgrade does not brick the system, and to allow fast
rollbacks when upgrading to a new version.
#### `cfg` - Configuration Data
### `cfg` - Configuration Data
| Parameter | Value |
|-----------|-----------------|
| Required | Yes |
| Size | >= 16 MiB |
| Format | EXT4 filesystem |
| **Parameter** | **Value** |
|---------------|-----------------|
| Required | Yes |
| Size | >= 16 MiB |
| Format | EXT4 filesystem |
Non-volatile storage of the system configuration and user data.
Concretely, user data is everything stored under `/root` and `/home`.
#### `var` - Variable Data
### `var` - Variable Data
| Parameter | Value |
|-----------|-----------------|
| Required | No |
| Size | >= 16 MiB |
| Format | EXT4 filesystem |
| **Parameter** | **Value** |
|---------------|-----------------|
| Required | No |
| Size | >= 16 MiB |
| Format | EXT4 filesystem |
Persistent storage for everything under `/var`. This is maintained as
a separate filesystem from the data in `cfg`, because while the system
@@ -349,5 +409,20 @@ can funtion reasonably well without a persistent `/var`, loosing
If `var` is not available, Infix will still persist `/var/lib` using
`cfg` as the backing storage.
[^1]: See [CLI Upgrade](cli/upgrade.md) for information on upgrading
via CLI.
[^1]: See [Upgrade & Boot Order](upgrade.md) for more information.
[^2]: YANG is a modeling language from IETF, replacing that used for
SNMP (MIB), used to describe the subsystems and properties of
the system.
[^3]: Return Merchandise Authorization (RMA), i.e., broken beyond repair
by end-user and eligible for return to manufacturer.
[^4]: Customer specific builds can define their own `failure-config`.
It may be the same as `factory-config`, with the hostname set to
`failure`, or a dedicated configuration that isolates interfaces, or
even disables ports, to ensure that the device does not cause any
security problems on the network. E.g., start forwarding traffic
between previously isolated VLANs.
[2]: netboot.md
[FIT]: https://u-boot.readthedocs.io/en/latest/usage/fit.html
[RAUC]: https://rauc.io
[initrd]: https://docs.kernel.org/admin-guide/initrd.html
+131 -107
View File
@@ -1,11 +1,9 @@
Branding & Releases
===================
# Branding & Releases
This document is for projects using Infix as a br2-external, i.e., OEMs.
This document is for projects using Infix as a br2-external, i.e., OEMs
that want to create *their own "Spin"* of Infix.
Branding
--------
## Branding
Branding is done in menuconfig, there are several settings affecting
it, most are in the Infix external subsection called "Branding", but
@@ -24,25 +22,18 @@ check this for you and you may end up with odd results.
Verify the result after a build by inspecting:
- `output/images/*`: names, missing prefix, etc.
- `output/target/etc/os-release`: this file is sourced by
other build scripts, e.g., `mkgns3a.sh`. For reference, see
https://www.freedesktop.org/software/systemd/man/os-release.html
- `output/images/*`: names, missing prefix, etc.
- `output/target/etc/os-release`: this file is sourced by other build
scripts, e.g., `mkgns3a.sh`. For reference, see [os-release(5)][]
> **Note:** to get proper GIT revision (hash) from your composed OS,
> remember in menuconfig to set `INFIX_OEM_PATH`. When unset the
> Infix `post-build.sh` script defaults to the Infix base path. The
> revision is stored in the file `/etc/os-release` as BUILD_ID and
> is also in the file `/etc/version`. See below for more info.
> [!IMPORTANT]
> To get a proper GIT revision (hash) from your OS spin, remember to set
> in menuconfig `INFIX_OEM_PATH`. When unset, the Infix `post-build.sh`
> script defaults to the Infix base path. The revision is stored in the
> file `/etc/os-release` as `BUILD_ID`, also in the file `/etc/version`.
> See below for more info.
[^1]: The base MAC address is defined in the device's Vital Product
Data (VPD) EEPROM, or similar, which is used by the kernel to
create the system interfaces. This MAC address is usually also
printed on a label on the device.
Factory & Failure Config
------------------------
## Factory & Failure Config
To support booting the same image (CPU architecture) on multiple boards,
Infix by default generates the device's initial configuration every time
@@ -50,37 +41,36 @@ at boot. This also ensures the device can always be restored to a known
state after a factory reset, since the `factory-config` is guaranteed to
be compatible with the YANG models for the given software version. (For
more information on how the system boots, please see the section [Key
Concepts](introduction.md#key-concepts) in the Introduction document.)
Concepts](index.md#key-concepts) in the Introduction document.)
However, for custom builds of Infix it is possible to override this with
a single static `/etc/factory-config.cfg` (and failure-config) in your
rootfs overlay -- with a [VPD](vpd.md) you can even support several!
### Variables & Format Specifiers
Parts of the configuration you likely always want to generated, like the
SSH hostkey used by NETCONF, a unique hostname, or the `admin` user's
SSH hostkey used by SSH server and NETCONF, a unique hostname, or the `admin` user's
unique (per-device with a VPD) password hash. This section lists the
available keywords, see the next section for examples of how to use
them:
- **Default password hash:** `$factory$` (from VPD, .dtb, or built-in)
XPath: `/ietf-system:system/authentication/user/password`
- **Default NETCONF hostkey:** `genkey` (regenerated at factory reset)
XPath: `/ietf-keystore:keystore/asymmetric-keys/asymmetric-key[name='genkey']`
- **Hostname format specifiers:**
XPath: `/ietf-system:system/hostname`
- **Default password hash:** `$factory$` (from VPD, .dtb, or built-in)
XPath: `/ietf-system:system/authentication/user/password`
- **Default SSH and NETCONF hostkey:** `genkey` (regenerated at factory reset)
XPath: `/ietf-keystore:keystore/asymmetric-keys/asymmetric-key[name='genkey']`
- **Hostname format specifiers:**
XPath: `/ietf-system:system/hostname`
- `%i`: OS ID, from `/etc/os-release`, from Menuconfig branding
- `%h`: Default hostname, from `/etc/os-release`, from branding
- `%m`: NIC specific part of base MAC, e.g., to `c0-ff-ee`
- `%%`: Literal %
### Static Files
> **Caveat:** maintaining static a factory-config and failure-config may
> seem like an obvious choice, but as YANG models evolve (even the IETF
> [!CAUTION]
> Maintaining a static `factory-config` and `failure-config` may seem
> like an obvious choice, but as YANG models evolve (even the IETF
> models get upgraded), you may need to upgrade your static files.
First, for one-off builds (one image per product), the simplest way is
@@ -103,9 +93,8 @@ after `00-probe` has run. The lower case version of the string is used.
I.e., create a rootfs overlay that provides any combination of:
- `/usr/share/product/<PRODUCT>/etc/factory-config.cfg`
- `/usr/share/product/<PRODUCT>/etc/failure-config.cfg`
- `/usr/share/product/<PRODUCT>/etc/factory-config.cfg`
- `/usr/share/product/<PRODUCT>/etc/failure-config.cfg`
### Dynamically Generated
@@ -113,14 +102,14 @@ The generated `factory-config` and `failure-config` files consist of
both static JSON files and part generated files at runtime for each
device. The resulting files are written to the RAM disk in `/run`:
- `/run/confd/factory-config.gen`
- `/run/confd/failure-config.gen`
- `/run/confd/factory-config.gen`
- `/run/confd/failure-config.gen`
Provided no custom overrides (see above) have been installed already,
these files are then copied to:
- `/etc/factory-config.cfg`
- `/etc/failure-config.cfg`
- `/etc/factory-config.cfg`
- `/etc/failure-config.cfg`
... where the bootstrap process expects them to be in the next step.
@@ -132,29 +121,33 @@ base hostname, set `BR2_TARGET_GENERIC_HOSTNAME` in your defconfig.
The static files are installed by Infix `confd` in `/usr/share/confd/`
at build time. It contains two subdirectories:
/usr/share/confd/
|- factory.d/
| |- 10-foo.json
| |- 10-bar.json
| `- 10-qux.json
`- failure.d/
|- 10-xyzzy.json
`- 10-garply.json
```
/usr/share/confd/
|- factory.d/
| |- 10-foo.json
| |- 10-bar.json
| `- 10-qux.json
`- failure.d/
|- 10-xyzzy.json
`- 10-garply.json
```
To override, or extend, these files in you br2-external, set up a rootfs
overlay and add it last in `BR2_ROOTFS_OVERLAY`. Your overlay can look
something like this:
./board/common/rootfs/
|- etc/
| |- confdrc # See below
| `- confdrc.local
`- usr/
`- share/
`- confd/
|- 10-foo.json # Override Infix foo
|- 30-bar.json # Extend, probably 10-bar.json
`- 30-fred.json # Extend, your own defaults
```
./board/common/rootfs/
|- etc/
| |- confdrc # See below
| `- confdrc.local
`- usr/
`- share/
`- confd/
|- 10-foo.json # Override Infix foo
|- 30-bar.json # Extend, probably 10-bar.json
`- 30-fred.json # Extend, your own defaults
```
Using the same filename in your overlay, here `10-foo.json`, completely
replaces the contents of the same file provided by Infix. If you just
@@ -168,17 +161,17 @@ provide a few custom ones that the `bootstrap` knows about, e.g.,
`gen-ifs-custom` that overrides `20-interfaces.json`. See the
bootstrap script for more help, and up-to-date information.
> **Note:** you may not need to provide your own `/etc/confdrc`. The
> one installed by `confd` is usually enough. However, if you want to
> adjust the behavior of `bootstrap` you may want to override it. There
> is also `confdrc.local`, which usually is enough to change arguments
> to scripts like `gen-interfaces`, e.g., to create a bridge by default,
> you may want to look into `GEN_IFACE_OPTS`.
> [!TIP]
> You may not need to provide your own `/etc/confdrc` for your spin.
> The one installed by `confd` is usually enough. However, if you want
> to adjust the behavior of `bootstrap` you may want to override it.
> There is also `confdrc.local`, which usually is enough to change
> arguments to scripts like `gen-interfaces`, e.g., to create a bridge
> by default, you may want to look into `GEN_IFACE_OPTS`.
### Example Snippets
**IETF System:**
#### IETF System
```hsib
"ietf-system:system": {
@@ -211,18 +204,19 @@ bootstrap script for more help, and up-to-date information.
The `motd-banner` is a binary type, which is basically a Base64 encoded
text file without line breaks (`-w0`):
```bash
$ echo "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCAtLSBhIE5ldHdvcmsgT3BlcmF0aW5nIFN5c3RlbQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQuZ2l0aHViLmlvCictJy0tLSctJwo=" |base64 -d
```
$ echo "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCAtLSBhIE5ldHdvcmsgT3BlcmF0aW5nIFN5c3RlbQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQuZ2l0aHViLmlvCictJy0tLSctJwo=" \
| base64 -d
.-------.
| . . | Infix -- a Network Operating System
| . . | Infix OS — Immutable.Friendly.Secure
|-. v .-| https://kernelkit.github.io
'-'---'-'
```
**IETF Keystore**
#### IETF Keystore
Notice how both the public and private keys are left empty here. The
`genkey` is always automatically regenerated after each factory reset.
Notice how both the public and private keys are left empty here, this
cause them to be always automatically regenerated after each factory reset.
Keeping the `factory-config` snippet like this means we can use the same
file on multiple devices, without risking them sharing the same host
keys. Sometimes you may want the same host keys, but that is the easy
@@ -245,9 +239,7 @@ use-case and not documented here.
},
```
The `genkey` is currently only used by the NETCONF SSH backend.
**IETF NETCONF Server**
#### IETF NETCONF Server
```json
"ietf-netconf-server:netconf-server": {
@@ -280,10 +272,30 @@ The `genkey` is currently only used by the NETCONF SSH backend.
},
```
#### Infix Services
```json
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::1",
"port": 22
}
]
}
```
Integration
-----------
## Integration
When integrating your software stack with Infix there may be protocols
that want to change system settings like hostname and dynamically set
@@ -310,7 +322,7 @@ root@infix-00-00-00:~# cat hostnm.xml
</system>
root@infix-00-00-00:~# edit hostnm.xml
root@infix-00-00-00:~# sysrepocfg -Ehostnm.xml
root@example:~#
root@example:~#
```
Second, perform all changes on `running-config`, the running datastore.
@@ -324,8 +336,8 @@ activate all.)
You can consider the system composed of two entities:
- NETCONF starts up the system using `startup-config`, then
- Hands over control to your application at runtime
- NETCONF starts up the system using `startup-config`, then
- Hands over control to your application at runtime
Infix is prepared for this by already having two "runlevels" for these
two states. The `startup-config` is applied in runlevel S (bootstrap)
@@ -333,15 +345,13 @@ and the system then enters runlevel 2 for normal operation.
This allow you to keep a set of functionality that is provided by the
underlying system, and another managed by your application. You can
of course in your br2-external provide a sysrepo plugin that block
of course in your br2-external provide a sysrepo plugin that block
operations on certain datastores when your application is enabled.
E.g., to prevent changes to startup after initial deployment. In
that case a proper factory reset would be needed to get back to a
"pre-deployment" state where you can reconfigure your baseline.
Releases
--------
## Releases
A release build requires the global variable `INFIX_RELEASE` to be set.
It can be derived from GIT, if the source tree is kept in GIT VCS. First,
@@ -351,14 +361,14 @@ let us talk about versioning in general.
Two popular scheme for versioning a product derived from Infix:
1. Track Infix major.minor, e.g. *Foobar v23.08.z*, where `z` is
your patch level. I.e., Foobar v23.08.0 could be based on Infix
v23.08.0, or v23.08.12, it is up to you. Maybe you based it on
v23.08.12 and then back ported changes from v23.10.0, but it was
the first release you made to your customer(s).
2. Start from v1.0.0 and step the major number every time you sync
with a new Infix release, or every time Infix bumps to the next
Buildroot LTS.
1. Track Infix major.minor, e.g. *Foobar v23.08.z*, where `z` is
your patch level. I.e., Foobar v23.08.0 could be based on Infix
v23.08.0, or v23.08.12, it is up to you. Maybe you based it on
v23.08.12 and then back ported changes from v23.10.0, but it was
the first release you made to your customer(s).
1. Start from v1.0.0 and step the major number every time you sync
with a new Infix release, or every time Infix bumps to the next
Buildroot LTS.
The important thing is to be consistent, not only for your own sake,
but also for your end customers. The *major.minor.patch* style is
@@ -366,26 +376,40 @@ the most common and often recommended style, which usually maps well
to other systems, e.g. PROFINET GSDML files require this (*VX.Y.Z*).
But you can of course use only two numbers, *major.minor*, as well.
> [!WARNING]
> What could be confusing, however, is if you use the name *Infix*
> with your own versioning scheme.
### Specifying Versioning Information
### `INFIX_RELEASE`
Two optional environment variables control the version information
recorded in images. Both of these **must be** a lower-case string (no
spaces or other characters outside of 09, az, '.', '_' and '-')
identifying the operating system version, excluding any OS name
information or release code name, and suitable for processing by
scripts or usage in generated filenames.
This global variable **must be** a lower-case string (no spaces or
other characters outside of 09, az, '.', '_' and '-') identifying
the operating system version, excluding any OS name information or
release code name, and suitable for processing by scripts or usage
in generated filenames.
#### `INFIX_BUILD_ID`
Used for `BUILD_ID` in `/etc/os-release`.
**Default:** `$(git describe --always --dirty --tags)`, from the _top
directory_. By default, the top directory refers to the root of the
Infix source tree, but this can be changed by setting the branding
variable `INFIX_OEM_PATH`, e.g. in a `defconfig` file or via `make
menuconfig`, to the path of an enclosing br2-external.
#### `INFIX_RELEASE`
Used for `VERSION` and `VERSION_ID` in `/etc/os-release` and
generated file names like disk images, etc.
**Default:** generated using `git describe --always --dirty --tags`,
with an additional `-C $infix_path`. This variable defaults to the
Infix tree and can be changed by setting the menuconfig branding
variable `INFIX_OEM_PATH` to that of the br2-external. It is also
possible to set the `GIT_VERSION` variable in your `post-build.sh`
script to change how the VCS version is extracted.
**Default:** `${INFIX_BUILD_ID}`
[NanoPi R2S]: https://github.com/kernelkit/infix/blob/main/board/aarch64/r2s/rootfs/etc/factory-config.cfg
[^1]: The base MAC address is defined in the device's Vital Product
Data (VPD) EEPROM, or similar, which is used by the kernel to
create the system interfaces. This MAC address is usually also
printed on a label on the device.
[NanoPi R2S]: https://github.com/kernelkit/infix/blob/main/board/aarch64/r2s/rootfs/etc/factory-config.cfg
[os-release(5)]: https://www.freedesktop.org/software/systemd/man/os-release.html
+37 -15
View File
@@ -1,5 +1,4 @@
Configure Context
-----------------
# CLI Configure Context
Enter the configure context from admin-exec by typing `configure`
followed by Enter. Available commands, press `?` at the prompt:
@@ -41,14 +40,17 @@ admin@host:/config/interface/eth0/> up
admin@host:/config/>
```
> **Note:** the tree structure in the configure context is automatically
> generated from the system's supported NETCONF YANG models, which may
> vary between products. However, the `ietf-interfaces.yang` and
> `ietf-ip.yang` models, for instance, that provide basic networking
----
> **Note:** commands in configure context are automatically generated
> from the system's YANG models, hence different products likely have a
> different set of commands. However, both the `ietf-interfaces.yang`
> and `ietf-ip.yang` models, for instance, that provide the networking
> support are common to all systems.
----
### Set IP Address on an Interface
## Set IP Address on an Interface
```
admin@host:/config/> edit interface eth0
@@ -73,7 +75,7 @@ interfaces {
```
### Saving Changes
## Saving Changes
Apply the changes (from candidate to `running-config`):
@@ -104,11 +106,14 @@ admin@host:/> copy running-config startup-config
The `startup-config` can also be inspected with the `show` command to
verify the changes are saved.
> **Note:** most (all) commands need to be spelled out, no short forms
> are allowed at the moment. Use the `TAB` key to make this easier.
----
> **Note:** all commands need to be spelled out, no short forms are
> allowed in the CLI. Use the `TAB` key to make your life easier.
### Changing Hostname
----
## Changing Hostname
Settings like hostname are located in the `ietf-system.yang` model.
Here is how it can be set.
@@ -123,11 +128,14 @@ admin@example:/>
Notice how the hostname in the prompt does not change until the change
is committed.
----
> **Note:** critical services like syslog, mDNS, LLDP, and similar that
> advertise the hostname, are restarted when the hostname is changed.
----
### Changing Password
## Changing Password
User management, including passwords, is also a part of `ietf-system`.
@@ -149,12 +157,15 @@ the `do password encrypt` command. This launches the admin-exec command
to hash, and optionally salt, your password. This encrypted string can
then be used with `set password ...`.
----
> **Tip:** if you are having trouble thinking of a password, there is
> also `do password generate`, which generates random but readable
> strings using the UNIX command `pwgen`.
----
### SSH Authorized Key
## SSH Authorized Key
Logging in remotely with SSH is possible by adding a *public key* to a
user. Here we add the authorized key to the admin user, multiple keys
@@ -174,11 +185,15 @@ key-data AAAAB3NzaC1yc2EAAAADAQABAAABgQC8iBL42yeMBioFay7lty1C4ZDTHcHyo739gc91rTT
admin@host:/config/system/authentication/user/admin/authorized-key/example@host/> leave
```
----
> **Note:** the `ssh-keygen` program already base64 encodes the public
> key data, so there is no need to use the `text-editor` command, `set`
> does the job.
### Creating a VETH Pair
----
## Creating a VETH Pair
The following example creates a `veth0a <--> veth0b` virtual Ethernet
pair which is useful for connecting, e.g., a container to the physical
@@ -214,12 +229,15 @@ admin@host:/config/> leave
See the bridging example below for more.
----
> **Note:** in the CLI you do not have to create the `veth0b` interface.
> The system _infers_ this for you. When setting up a VETH pair using
> NETCONF, however, you must include the `veth0b` interface.
----
### Creating a Bridge
## Creating a Bridge
Building on the previous example, we now create a non-VLAN filtering
bridge (`br0`) that forwards any, normally link-local, LLDP traffic
@@ -273,6 +291,10 @@ the VETH pair from the previous example) are now bridged. Any traffic
ingressing one port will egress the other. Only reserved IEEE multicast
is filtered, except LLDP frames as shown above.
----
> **Note:** the bridge can be named anything, provided the interface
> name is not already taken. However, for any name outside the pattern
> `br[0-9]+`, you have to set the interface type manually to `bridge`.
----
+15 -9
View File
@@ -1,4 +1,4 @@
# Introduction
# CLI Introduction
The command line interface (CLI, see-ell-aye) implements a CISCO-like,
or Juniper Networks JunOS-like, CLI. It is the traditional way of
@@ -10,8 +10,7 @@ Nevertheless, when it comes to initial deployment and debugging, it
is very useful to know how to navigate and use the CLI. This very
short guide intends to help you with that.
## About
----
New users usually get the CLI as the default "shell" when logging in,
but the default `admin` user logs in to `bash`. To access the CLI,
@@ -35,9 +34,12 @@ admin@host-12-34-56:/> show # Try: Tab or ?
admin@host-12-34-56:/> # Try: Tab or ?
```
> **Tip:** Even on an empty command line you can tap the Tab or ? keys.
> See `help keybindings` for more tips!
----
> **Note:** even on an empty command line, you can tap the `Tab` or `?` keys.
> See [`help keybindings`](keybindings.md) for more tips!
----
## Key Concepts
@@ -129,10 +131,15 @@ In *configure context* the following commands are available:
| `do command` | Call admin-exec command: `do show log` |
| `commit` | |
### Example Session
> Remember to use the `TAB` and `?` keys to speed up your navigation.
> See `help keybindings` for more tips!
## Example Session
----
> Remember to use the `TAB` and `?` keys to speed up your navigation.
> See [`help keybindings`](keybindings.md) for more tips!
----
In this example we enter configure context to add an IPv4 address to
interface `eth0`, then we apply the changes using the `leave` command.
@@ -180,4 +187,3 @@ admin@host-12-34-56:/> copy startup-config running-config
```
Or restarting the device.
+6 -4
View File
@@ -1,4 +1,4 @@
# Keybindings
# CLI Keybindings
Writing CLI commands by hand is very tedious. To make things easier the
CLI has several keybindings, most significant first:
@@ -27,10 +27,12 @@ CLI has several keybindings, most significant first:
| Ctrl-n | Down arrow | History, next command |
| Ctrl-r | | History, reversed interactive search (i-search) |
> **Note:** the Meta key is called Alt on most modern keyboards. If you
> have neither, first tap the Esc key instead of holding down Alt/Meta.
## What is Meta?
## Examples
The Meta key is called Alt on most modern keyboards. If you have
neither, first tap the Esc key instead of holding down Alt/Meta.
## Usage
Complete a word. Start by typing a few characters, then tap the TAB key
on your keyboard:
+3 -3
View File
@@ -1,4 +1,4 @@
## Usage
# Network Calculator
```
netcalc <ADDRESS/LEN | NETWORK NETMASK> [split <1-32 | 64-128>]
@@ -12,8 +12,8 @@ information about the subnet. Both IPv4 and IPv6 is supported.
A subnet can be entered in two ways:
- `192.168.2.0 255.255.255.0`: traditional IPv4 'address netmask' style
- `192.168.2.0/24`: modern prefix length, same also for IPv6
- `192.168.2.0 255.255.255.0`: traditional IPv4 'address netmask' style
- `192.168.2.0/24`: modern prefix length, same also for IPv6
An optional `split LEN` can be given as argument, the new length value
must be bigger than the current prefix length. See example below.
+10 -7
View File
@@ -1,4 +1,4 @@
# Quick Overview
# CLI Quickstart Guide
The question mark `?` key along with the `Tab` key are your best friends
in the command line interface. They provide context help and completion
@@ -16,14 +16,17 @@ of commands you input. See the table below for a handful of examples.
Explore the following topics for more information. Note, the
keybindings are really useful to learn!
| **Command** | **Description** |
|---------------------|--------------------------------------------|
| `help introduction` | An introduction to the CLI |
| `help configure` | How to use configure context |
| `help text-editor` | Help with the built-in text-editor command |
| `help keybindings` | Lists keybindings and other helpful tricks |
| **Command** | **Description** |
|---------------------|----------------------------------------------------|
| `help introduction` | An introduction to the CLI |
| `help configure` | How to use configure context |
| `help text-editor` | Help with the built-in text-editor command |
| `help keybindings` | Lists available keybindings & other helpful tricks |
----
> In `configure` context the `help setting` command shows the YANG
> description text for each node and container. To reach the admin
> exec help from configure context, e.g., `do help text-editor`
----
+7 -3
View File
@@ -1,4 +1,4 @@
## Network Traffic Inspection
# Network Monitoring
`tcpdump` is useful tool for analyzing and diagnosing network problems.
This document presents the limited feature set that exposed is in the
@@ -10,7 +10,7 @@ A section called [Examples](#examples) follows that, which may be what
you want to scroll down to.
### Hardware Overview
## Hardware Overview
Using `tcpdump` effectively requires an understanding of how the
underlying hardware works. For a standard PC, or common single-board
@@ -57,17 +57,21 @@ up the switch core to mirror traffic ingressing and/or egressing a set
of ports to another port. On this *monitor port* you can then run your
tcpdump, which means you need an external device (laptop).
----
> A planned feature is to support mirroring traffic to the CPU port,
> which would be an effective way to log and monitor traffic over a
> longer period of time. Highly effective for diagnosing intermittent
> and other rare network issues.
----
If only "proof of life" is required, then sometimes port counters, also
called *RMON counters*, can be very useful too. Seeing counters of a
particular type increment means traffic is ingressing or egressing.
### Examples
## Examples
Listen to all traffic on an interface:
+3
View File
@@ -44,10 +44,13 @@ C-x i insert C-x g goto-ln C-x o other win C-x C-x swap M-q reform
- tap `c`
- release `Ctrl`
----
> The status field at the bottom asks if you are really sure, and/or if
> you want to add a final Enter/newline to the file. For binary content
> that final newline may be important.
----
## Changing the Editor
+3 -2
View File
@@ -1,5 +1,4 @@
Upgrading the Software
----------------------
# Upgrading the System
The admin-exec command `upgrade` can be used to install software images, or
bundles. A bundle is a signed and self-contained package that carries all the
@@ -39,6 +38,8 @@ The secondary partition (`rootfs.1`) has now been upgraded and will be used as
the *active* partition on the next boot. Leaving the primary partition, with
the version we are currently running, intact in case of trouble.
See [Upgrade & Boot Order](../upgrade.md) for more information on upgrading.
[^1]: It is not possible to upgrade the partition we booted from. Thankfully
the underlying "rauc" subsystem keeps track of this. Hence, to upgrade
both partitions you must reboot to the new version (to verify it works)
+261 -126
View File
@@ -1,45 +1,25 @@
Containers in Infix
===================
<img align="right" src="img/docker.webp" alt="Docker whale" width=360>
Docker Container Support
========================
* [Introduction](#introduction)
* [Caution](#caution)
* [Getting Started](#getting-started)
* [Examples](#examples)
* [Container Images](#container-images)
* [Upgrading a Container Image](#upgrading-a-container-image)
* [Networking and Containers](#networking-and-containers)
* [Container Bridge](#container-bridge)
* [Container Host Interface](#container-host-interface)
* [Host Networking](#host-networking)
* [Mounts and Volumes](#mounts-and-volumes)
* [Content Mounts](#content-mounts)
* [Example Containers](#example-containers)
* [System Container](#system-container)
* [Application Container: nftables](#application-container-nftables)
* [Application Container: ntpd](#application-container-ntpd)
* [Advanced](#advanced)
* [Running Host Commands From Container](#running-host-commands-from-container)
Introduction
------------
![Docker whale](img/docker.webp){ align=right width="360" }
Infix comes with native support for Docker containers using [podman][].
The [YANG model][1] describes the current level of support, complete
enough to run both system and application containers.
Key design features, like using Linux switchdev, allow users to assign
switch ports directly to containers, not just bridged VETH pairs, this
is a rare and in many cases *unique* feature of Infix.
Key design features of Infix, like using Linux switchdev, allow users to
assign switch ports directly to containers, not just bridged VETH pairs.
This is a rare and in many cases *unique* feature of Infix.
All network specific settings are done using the IETF interfaces YANG
model, with augments for containers to ensure smooth integration with
container networking in podman.
> **Note:** even though the `podman` command can be used directly from a
> shell prompt, we strongly recommend using the CLI commands instead.
> They employ the services of a wrapper `container` script which handles
> the integration of containers in the system.
> [!IMPORTANT]
> Even though the `podman` command can be used directly from a shell
> prompt, we strongly recommend using the CLI commands instead. They
> employ the services of a wrapper `container` script which handles the
> integration of Docker containers in the system.
Caution
@@ -79,35 +59,36 @@ In the CLI, containers can be run in one of two ways:
1. `container run IMAGE [COMMAND]`, or
2. enter `configure` context, then `edit container NAME`
The former is useful mostly for testing, or running single commands in
an image. It is a wrapper for `podman run -it --rm ...`, while the
latter is a wrapper and adaptation of `podman create ...`.
The first is useful mostly for testing, or running single commands in
an image. It is a wrapper for `podman run -it --rm ...`.
The second create a container with a semi-persistent writable layer that
survives container restarts and host system restarts. However, if you
change the container configuration or upgrade the image (see below), the
container will be recreated and the writable layer is lost. This is why
it is recommended to set up a named volume for directories, or use file
[Content Mounts](#content-mounts), in your container if you want truly
persistent content.
The second creates a read-only container that by default automatically
start at every boot. It basically wraps `podman create ...`.
In fact, in many cases the best way is to create a `read-only` container
and use file mounts and volumes only for the critical parts. Podman
ensures (using tmpfs) `read-only` containers still have writable
directories for certain critical file system paths: `/dev`, `/dev/shm`,
`/run`, `/tmp`, and `/var/tmp`. Meaning, what you most often need is
writable volumes for `/var/lib` and `/etc`, or only file mounts for a
few files in `/etc`. The actual needs depend on the container image and
application to run.
When non-volatile storage is needed two complementary options exist:
> **Note:** when running containers from public registries, double-check
> that they support the CPU architecture of your host system. Remember,
> unlike virtualization, containers reuse the host's CPU and kernel.
- **Volumes:** data stored in a volume is persisted until explicitly
removed from the configuration, i.e., across host reboots and
container upgrades
- **[Content Mounts](#content-mounts):** where the content of a file
mounted into the container is kept along with the container
configuration in the device's `startup-config`
Podman ensures (using tmpfs) all containers have writable directories
for certain critical file system paths: `/dev`, `/dev/shm`, `/run`,
`/tmp`, and `/var/tmp`. Meaning, what you most often need is writable
volumes for `/var/lib` and `/etc`, or only file mounts for a few files
in `/etc`. The [actual requirements](#container-requirements) depend on
your container image and application to run.
<img align="right" src="img/docker-hello-world.svg" alt="Hello World" width=360>
> [!IMPORTANT]
> When running containers from public registries, double-check that they
> support the CPU architecture of your host system. Remember, unlike
> virtualization, containers reuse the host's CPU and kernel.
### Examples
![Hello World](img/docker-hello-world.svg){ align=right width="200" }
### Example: Hello World
Classic Hello World:
@@ -123,24 +104,32 @@ Classic Hello World:
Hello from Docker!
This message shows that your installation appears to be working correctly.
Persistent web server using nginx, sharing the host's network:
### Example: Web Server
A web server with [nginx][], using standard docker bridge. Podman will
automatically create a VETH pair for us, connecting the container to the
`docker0` bridge:
admin@example:/> configure
admin@example:/config> edit container web
admin@example:/config/container/web> set image docker://nginx:alpine
admin@example:/config/container/web> set publish 80:80
admin@example:/config/container/web> set network host
admin@example:/config/container/web> leave
admin@example:/config/> edit interface docker0
admin@example:/config/interface/docker0/> set container-network
admin@example:/config/interface/docker0/> end
admin@example:/config/> edit container web
admin@example:/config/container/web/> set image docker://nginx:alpine
admin@example:/config/container/web/> set network publish 8080:80
admin@example:/config/container/web/> set network interface docker0
admin@example:/config/container/web/> set volume cache target /var/cache
admin@example:/config/container/web/> leave
admin@example:/> show container
Exit to the shell and verify the service with curl, or try to attach
to your device's IP address using your browser:
admin@example:~$ curl http://localhost
admin@example:~$ curl http://localhost:8080
or connect to port 80 of your running Infix system with a browser. See
the following sections for how to add more interfaces and manage your
container at runtime.
or connect to port 8080 of your running Infix system with a browser.
See the following sections for how to add more interfaces and manage
your container at runtime.
Container Images
@@ -168,13 +157,20 @@ The CLI help shows:
oci-archive:/lib/oci/archive -- Use archive:latest from OCI archive
May be in .tar or .tar.gz format
Additionally, the following URIs are also supported for setups
that do not use a HUB or similar. Recommend using 'checksum'!
ftp://addr/path/to/archive -- Downloaded using wget
http://addr/path/to/archive -- Downloaded using curl
https://addr/path/to/archive -- Downloaded using curl
Note: if a remote repository cannot be reached, the creation of the
container will be put on a queue that retries pull every time
there is a route change in the host's system.
> **Note::** the built-in help system in the CLI is generated from the
> YANG model, so the same information is also available for remote
> NETCONF users.
> [!TIP]
> The built-in help system in the CLI is generated from the YANG model,
> so the same information is also available for remote NETCONF users.
The two most common variants are `docker://` and `oci-archive:/`.
@@ -217,44 +213,72 @@ mind.
-rw-r--r-- 1 root root 7261785 Mar 27 14:22 curios-oci-amd64.tar.gz
drwx------ 6 frr frr 4096 Mar 27 11:57 frr/
Importing the image into podman can be done either from the CLI
Importing the image into Podman can be done either from the CLI
admin-exec context ...
admin@example:/var/tmp$ cli
admin@example:/> container load /var/tmp/curios-oci-amd64.tar.gz name curios:edge
> The `name curios:edge` is the tag you give the imported
> (raw) archive which you can then reference in your container image
> configuration: `set image curios:edge`.
> [!TIP]
> The `name curios:edge` is the tag you give the imported (raw) archive
> which you can then reference in your container image configuration:
> `set image curios:edge`.
... or by giving the container configuration the full path to the OCI
archive, which helps greatly with container upgrades (see below):
admin@example:/config/container/system/> set image oci-archive:/var/tmp/curios-oci-amd64.tar.gz
**Checksum Example:**
admin@example:/> configure
admin@example:/config/> edit container sys
admin@example:/config/container/sys/> set hostname sys
admin@example:/config/container/sys/> set image ftp://192.168.122.1/curios-oci-amd64-v24.05.0.tar.gz
admin@example:/config/container/sys/> set checksum
md5 sha256 sha512
admin@example:/config/container/sys/> set checksum sha256 4f01077036527498ed910f1a3e80645ae3eff629d10043cf80ebc6850c99c629
admin@example:/config/container/sys/> leave
admin@example:/> copy running-config startup-config
admin@example:/> show container
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b02e945c43c9 localhost/curios-oci-amd64-v24.05.0:latest 5 seconds ago Up 5 seconds sys
admin@example:/> show log
...
Nov 20 07:24:56 infix container[5040]: Fetching ftp://192.168.122.1/curios-oci-amd64-v24.05.0.tar.gz
Nov 20 07:24:56 infix container[5040]: curios-oci-amd64-v24.05.0.tar.gz downloaded successfully.
Nov 20 07:24:56 infix container[5040]: curios-oci-amd64-v24.05.0.tar.gz checksum verified OK.
Nov 20 07:24:57 infix container[5040]: Cleaning up extracted curios-oci-amd64-v24.05.0
Nov 20 07:24:57 infix container[5040]: podman create --name sys --conmon-pidfile=/run/container:sys.pid --read-only --replace --quiet --cgroup-parent=containers --restart=always --systemd=false --tz=local --hostname sys --log-driver k8s-file --log-opt path=/run/containers/sys.fifo --network=none curios-oci-amd64-v24.05.0
Nov 20 07:24:57 infix container[3556]: b02e945c43c9bce2c4be88e31d6f63cfdb1a3c8bdd02179376eb059a49ae05e4
Upgrading a Container Image
---------------------------
<img align="right" src="img/shield-checkmark.svg" alt="Hello World" width=100>
![Up-to-date Shield](img/shield-checkmark.svg){ align=right width="100" }
The applications in your container are an active part of the system as a
whole, so make it a routine to keep your container images up-to-date!
> **Note:** the default writable layer is lost when upgrading the image.
> Use named volumes for content that you want to persist across upgrades.
Containers are created at first setup and at every boot. If the image
exists in the file system it is reused -- i.e., an image pulled from a
remote registry is not fetched again.
All container configurations are locked to the image hash at the time of
first download, not just ones that use an `:edge` or `:latest` tag. An
upgrade of containers using versioned images is more obvious -- update
the configuration to use the new `image:tag` -- the latter is a bit
trickier. Either remove the configuration and recreate it (leave/apply
the changes between), or use the admin-exec level command:
To upgrade a versioned image:
- update your `running-config` to use the new `image:tag`
- `leave` to activate the change, if you are in the CLI
- Podman pulls the new image in the background
- Your container is recreated with the new image
- The container is started
For "unversioned" images, e.g., images using a `:latest` or `:edge` tag,
use the following CLI command (`NAME` is the name of your container):
admin@example:/> container upgrade NAME
Where `NAME` is the name of your container. This command stops the
container, does `container pull IMAGE`, and then recreates it with the
new image. Upgraded containers are automatically restarted.
This stops the container, does `container pull IMAGE`, and recreates it
with the new image. Upgraded containers are automatically restarted.
**Example using registry:**
@@ -279,12 +303,30 @@ the upgrade command as
Upgrading container system with local archive: oci-archive:/var/tmp/curios-oci-amd64.tar.gz ...
7ab4a07ee0c6039837419b7afda4da1527a70f0c60c0f0ac21cafee05ba24b52
OCI archives can also be fetched from ftp/http/https URL, in that case
the upgrade can be done the same way as a registry image (above).
> [!TIP]
> Containers running from OCI images embedded in the operating system,
> e.g., `/lib/oci/mycontainer.tar.gz`, always run from the version in
> the operating system. To upgrade, install the new container image at
> build time, after system upgrade the container is also upgraded. The
> system unpacks and loads the OCI images into Podman every boot, which
> ensures the running container always has known starting state.
>
> **Example:** default builds of Infix include a couple of OCI images
> for reference, one is `/lib/oci/curios-nftables-v24.11.0.tar.gz`, but
> there is also a symlink called `curios-nftables-latest.tar.gz` in the
> same directory, which is what the Infix regression tests use in the
> image configuration of the container. This is what enables easy
> upgrades of the container along with the system itself.
Capabilities
-------------
An unprivileged container works for almost all use-cases, but there are
occasions where they are too restricted and users being looking for the
occasions where they are too restricted and users start looking for the
`privileged` flag. Capabilities offers a middle ground.
For example, a system container from which `ping` does not work:
@@ -300,9 +342,9 @@ For example, a system container from which `ping` does not work:
...
Infix supports a subset of all [capabilities][6] that are relevant for
containers. Please note, that this is and advanced topic and will
require time and analysis of your container application to figure out
which capabilities you need.
containers. Please note, that this is an advanced topic that require
time and analysis of your container application to figure out which
capabilities you need.
Networking and Containers
@@ -312,9 +354,16 @@ By default, unlike other systems, persistent[^1] containers have no
networking enabled. All network access has to be set up explicitly.
Currently two types of of container networks are supported:
- `host`: one end of a VETH pair, or a physical Ethernet port
- `host`: an managed host interface, e.g., one end of a VETH pair,
or even a physical interface
- `bridge`: an IP masquerading bridge
In the former the interface is delegated to (moved into) the container,
while in the latter a VETH pair is automatically created by Podman and
one end delegated to the container, while the other end is assigned to
the bridge (see the next section).
> [!TIP]
> For more information on VETH pairs, see the [Networking Guide][0].
@@ -347,10 +396,12 @@ have to set manually:
admin@example:/config/interface/docker0/> set type bridge
admin@example:/config/interface/docker0/> set container-network type bridge
> **Note:** when doing the same operation over NETCONF there is no
> inference, so all the "magic" settings need to be defined. This
> makes the CLI very useful for first setup and then extracting the
> resulting XML from the shell using the `cfg -X` command.
> [!IMPORTANT]
> When configuring the system via an API such as NETCONF or RESTCONF, no
> settings are inferred. Instead it is up to the caller to fully define
> the desired setup. This makes the CLI very useful for first setup and
> then extracting the resulting XML from the shell using the `cfg -X`
> command.
We have to declare the interface as a container network, ensuring the
interface cannot be used by the system for any other purpose. E.g., a
@@ -390,11 +441,11 @@ in a `bridge`. Below an example of a system container calls `set
network interface docker0`, here we show how to set options for that
network:
admin@example:/config/container/ntpd/> edit network docker0
admin@example:/config/container/ntpd/network/docker0/>
admin@example:/config/container/ntpd/network/docker0/> set option
admin@example:/config/container/ntpd/> edit network interface docker0
admin@example:/config/container/ntpd/network/interface/docker0/>
admin@example:/config/container/ntpd/network/interface/docker0/> set option
<string> Options for masquerading container bridges.
admin@example:/config/container/ntpd/network/docker0/> help option
admin@example:/config/container/ntpd/network/interface/docker0/> help option
NAME
option <string>
@@ -405,9 +456,9 @@ network:
mac=00:01:02:c0:ff:ee -- set fixed MAC address in container
interface_name=foo0 -- set interface name inside container
admin@example:/config/container/ntpd/network/docker0/> set option ip=172.17.0.2
admin@example:/config/container/ntpd/network/docker0/> set option interface_name=wan
admin@example:/config/container/ntpd/network/docker0/> leave
admin@example:/config/container/ntpd/network/interface/docker0/> set option ip=172.17.0.2
admin@example:/config/container/ntpd/network/interface/docker0/> set option interface_name=wan
admin@example:/config/container/ntpd/network/interface/docker0/> leave
### Container Host Interface
@@ -419,8 +470,12 @@ example.
The network `option` setting is available also for this case, but only
the `interface_name=foo0` option works. Which is still very useful. To
change the MAC address, you need to use the `custom-phys-address` in the
general network settings.
set:
- IP address, use IPv4/IPv6 settings in the interface settings
- MAC address, to use the `custom-phys-address` in the interface settings
For an example of both, see the next section.
[^3]: Something which the container bridge network type does behind the
scenes with one end of an automatically created VETH pair.
@@ -447,6 +502,7 @@ line where we declare the `ntpd` end as a container network interface:
admin@example:/config/interface/ntpd/> set custom-phys-address static 00:c0:ff:ee:00:01
admin@example:/config/interface/ntpd/> set container-network
> [!TIP]
> Notice how you can also set a custom MAC address at the same time.
Adding the interface to the container is the same as before, but since
@@ -456,6 +512,7 @@ can take a bit of a shortcut.
admin@example:/config/container/ntpd/> set network interface ntpd
admin@example:/config/container/ntpd/> leave
> [!TIP]
> Use the `set network interface ntpd option interface_name=foo0` to set
> the name of the interface inside the container to `foo0`.
@@ -478,6 +535,7 @@ We start by adding the second VETH pair:
admin@example:/config/interface/veth1a/> set veth peer veth1
admin@example:/config/interface/veth1a/> set ipv4 address 192.168.1.2 prefix-length 24
> [!NOTE]
> The LAN bridge (br1) in this example has IP address 192.168.1.1.
When a container has multiple host interfaces it can often be useful to
@@ -529,29 +587,40 @@ file system:
admin@example:/config/container/system/mount/leds> end
admin@example:/config/container/system/>
Sometimes *volumes* are a better fit. A volume is an automatically
Any type of file can be *bind mounted* into the container, just watch
out for permissions though. In the example above, `/sys/class/leds` is
not writable from a container unless it runs in *privileged* mode. For
plain configuration files you get more freedom, and your container can
rely on, e.g., *inotify* events to trigger reloading its services when
you change the file on the host.
So it depends on the container, and indeed your overall setup, what to
use. An intriguing option is *Content Mounts*, which when changed also
trigger a container restart.
Other times *volumes* are a better fit. A volume is an automatically
created read-writable entity that follows the life of your container.
admin@example:/config/container/ntpd/> set volume varlib target /var/lib
Volumes survive reboots and upgrading of the base image, unlike the
persistent writable layer you get by default, which does not survive
upgrades. The volume is created by podman when the container first
starts up, unlike a regular bind mount it synchronizes with the contents
of the underlying container image's path on the first start. I.e.,
"bind-mount, if empty: then rsync".
Volumes are persistent across both reboots and upgrades of the base
image. They are created by Podman when the container first starts up,
unlike a regular bind mount it synchronizes with the contents of the
underlying container image's path at first use. I.e., "bind-mount, if
empty: then rsync".
> [!NOTE]
> Infix support named volumes (only), and it is not possible to share a
> volume between containers. All the tricks possible with volumes may
> be added in a later release.
### Content Mounts
Content mount is a special type of where the file contents for the
container is stored alongside the container configuration. This can be
very useful when deploying similar systems at multiple sites. When the
host loads its `startup-config` (or even `factory-config`) a temporary
file is created using the decoded base64 data from the `content` node.
Content mounts are a special type of file mount where the file contents
is stored with the container configuration. This can be very useful
when deploying similar systems at multiple sites. When the host loads
its `startup-config` (or even `factory-config`) a temporary file is
created using the decoded base64 data from the `content` node.
admin@example:/config/container/ntpd/> edit mount ntpd.conf
admin@example:/config/container/ntpd/mount/ntpd.conf> text-editor content
@@ -564,9 +633,10 @@ The editor is a small [Emacs clone called Mg][2], see the built-in help
text, or press Ctrl-x Ctrl-c to exit and save. When the editor exits
the contents are base64 encoded and stored in the candidate datastore.
> **Note:** since these files are always recreated when the host is
> restarted, changes made by the container are not preserved, or saved
> back to the host's startup-config even if the read-only option is off.
> [!NOTE]
> Since these files are always recreated when the host is restarted,
> changes made by the container are not preserved, or saved back to the
> host's startup-config.
Infix has three different text editors available. For more information,
see [CLI Text Editor](cli/text-editor.md).
@@ -588,10 +658,11 @@ we created previously:
admin@example:/config/container/system/> set publish 222:22
admin@example:/config/container/system/> leave
> **Note:** ensure you have a network connection to the registry.
> If the image cannot be pulled, creation of the container will be
> put in a queue and be retried every time there is a change in the
> routing table, e.g., default route is added.
> [!NOTE]
> Ensure you have a network connection to the registry. If the image
> cannot be pulled, creation of the container will be put in a queue and
> be retried every time there is a change in the routing table, e.g.,
> default route is added, and every 60 seconds.
Provided the image is downloaded successfully, a new `system` container
now runs behind the docker0 interface, forwarding container port 22 to
@@ -707,12 +778,13 @@ Another *insecure* approach is to access the host system directly,
bypassing the namespaces that make up the boundary between host and
container.
> **Security:** Please note, this completely demolishes the isolation
> barrier between container and host operating system. It is only
> suitable in situations where the container serves more as a unit of
> distribution rather than as a separate component of the system.
> *Strongly recommended* to use this only in trusted setups! Consider
> also limiting the time frame in which this is active!
> [!CAUTION]
> Please note, this completely demolishes the isolation barrier between
> container and host operating system. It is only suitable in
> situations where the container serves more as a unit of distribution
> rather than as a separate component of the system. *Strongly
> recommended* to use this only in trusted setups! Consider also
> limiting the time frame in which this is active!
First, enable *Privileged* mode, this unlocks the door and allows the
container to manage resources on the host system. An example is the
@@ -747,6 +819,58 @@ control an Infix system this way, see [Scripting Infix](scripting.md).
it may not be enabled by default in BusyBox.
Container Requirements
----------------------
In addition to general [*best practices*][7] for container images, there
are a few more things to consider when targeting embedded systems:
- Ensure the image targets the CPU architecture of the target system,
learn more about [Multi-platform Builds][8]
- Follow [best practices for naming and tagging][10], e.g., `:latest` vs `:1.0`
- Follow [OCI recommendations and layout][9],
learn more about [OCI and Docker Exporters][6]
If the [Docker documentation][11] is not enough, there are plenty of
[guides online][12] with examples on how to create your own container
image. For the more advanced, please see the next section.
### Advanced Users
Most people prefer their system containers small, often based on Alpine
Linux, or similar, with only a few small applications, including their
own, and an SSH server perhaps. For some developers, even this is too
big, so they roll their own from source. This section is for you.
Depending on your needs, here is a checklist:
- you need something that can forward signals, e.g.,
- [tini][]
- [Bash only][13], or
- BusyBox init, a classic most embedded developers know, but read on ...
- a system container only need the bare necessities of a system bringup
- E.g., BusyBox's init, [but not everything][15]
- Some of the networking is set up by Podman and CNI for you, but
you may want to run a DHCP client?
- Do *not* rename interfaces inside the container, use the dedicated
`interface_name` option in the configuration instead
- Remember, Podman provides a `tmpfs` for all critical system paths:
`/dev`, `/dev/shm`, `/run`, `/tmp`, and `/var/tmp`, so you don't
need to clean or set up any of these mount points
Examples using `tini` and BusyBox init are available from the KernelKit
[curiOS project][14]. It is a small Buildroot based container image
builder that generates OCI compatible image tarballs without any tools
from Docker or Podman -- ready-made images exist for testing on both
AMD64 and ARM64 targets, as well as `docker pull` images and and OCI
tarballs with SHA256 checksums for integrity checking.
Finally, if you build your own version of Infix, and embed OCI tarballs
in the system image, then see the tip at the end of [Upgrading a
Container Image](#upgrading-a-container-image) (above).
[0]: networking.md
[1]: https://github.com/kernelkit/infix/blob/main/src/confd/yang/infix-containers.yang
[2]: https://github.com/troglobit/mg
@@ -754,4 +878,15 @@ control an Infix system this way, see [Scripting Infix](scripting.md).
[4]: system.md#ssh-authorized-key
[5]: https://docs.docker.com/build/exporters/oci-docker/
[6]: https://man7.org/linux/man-pages/man7/capabilities.7.html
[7]: https://docs.docker.com/build/building/best-practices/
[8]: https://docs.docker.com/build/building/multi-platform/
[9]: https://github.com/opencontainers/image-spec/blob/main/image-layout.md
[10]: https://docs.docker.com/get-started/docker-concepts/building-images/build-tag-and-publish-an-image/#tagging-images
[11]: https://www.docker.com/blog/multi-arch-images/
[12]: https://lemariva.com/blog/2018/05/tutorial-docker-on-embedded-systems-raspberry-pi-beagleboard
[13]: https://sirikon.me/posts/0009-pid-1-bash-script-docker-container.html
[14]: https://github.com/kernelkit/curiOS/
[15]: https://github.com/kernelkit/curiOS/blob/2e4748f65e356b2c117f586cd9420d7ba66f79d5/board/system/rootfs/etc/inittab
[tini]: https://github.com/krallin/tini
[nginx]: https://hub.docker.com/_/nginx
[podman]: https://podman.io
+286 -31
View File
@@ -14,6 +14,9 @@ the Buildroot `make menuconfig` system.
-> System configuration
-> [*]Enable root login with password
> [!IMPORTANT]
> Please see the [Contributing](#contributing) section, below, for
> details on how to fork and clone when contributing to Infix.
Cloning
-------
@@ -25,14 +28,12 @@ tree to your PC:
```bash
$ mkdir ~/Projects; cd ~/Projects
$ git clone https://github.com/kernelkit/infix.git
..
$ cd infix/
$ git submodule update --init
..
```
> Please see the [Contributing](#contributing) section, below, for
> details on how to fork and clone when contributing to Infix.
### Customer Builds
Customer builds add product specific device trees, more OSS packages,
@@ -57,6 +58,10 @@ Other caveats should be documented in the customer specific trees.
Building
--------
> [!TIP]
> For more details, see the Getting Started and System Requirements
> sections of the [excellent Buildroot manual][1].
Buildroot is almost stand-alone, it needs a few locally installed tools
to bootstrap itself. The most common ones are usually part of the base
install of the OS, but specific ones for building need the following.
@@ -67,12 +72,10 @@ $ sudo apt install bc binutils build-essential bzip2 cpio \
diffutils file findutils git gzip \
libncurses-dev libssl-dev perl patch \
python3 rsync sed tar unzip wget \
autopoint bison flex autoconf automake
autopoint bison flex autoconf automake \
mtools
```
> For details, see the Getting Started and System Requirements sections
> of the [excellent manual][1].
To build an Infix image; select the target and then make:
make x86_64_defconfig
@@ -95,12 +98,43 @@ and services are required on your system:
```bash
$ sudo apt install jq graphviz qemu-system-x86 qemu-system-arm \
ethtool gdb-multiarch tcpdump tshark
..
```
To be able to build the test specification you also need:
```bash
$ sudo apt-get install python3-graphviz ruby-asciidoctor-pdf
..
```
### Documentation
The documentation is written in Markdown, with GitHub extensions, and
published using [MkDocs, material theme][11]. This means some features
require MkDocs *hinting* which may not render fully when previewing on
GitHub -- this is OK.
MkDocs is packaged and available to install via `apt`, but not all of
the plugins and extensions we rely on are available, so instead we do
recommend using `pipx` to install the necessary tooling:
```bash
$ sudo apt install pipx
$ pipx install mkdocs
$ pipx inject mkdocs mkdocs-material pymdown-extensions mkdocs-callouts mike mkdocs-to-pdf
```
The last two packages, `mike` and `mkdocs-to-pdf`, are used for online
versioning and PDF generation by GitHub Actions, but since they are in
the `mkdocs.yml` file, everyone who wants to preview the documentation
have to install all the tooling.
Preview with:
```
$ cd ~/src/infix/
$ mkdocs serve
```
@@ -131,6 +165,16 @@ This rebuilds (and installs) `foo` and `bar`, the `all` target calls
on Buildroot to finalize the target filesystem and generate the images.
The final `run` argument is explained below.
### YANG Model
When making changes to the `confd` and `statd` services, you will often
need to update the YANG models. If you are adding a new YANG module,
it's best to follow the structure of an existing one. However, before
making any changes, **always discuss them with the Infix core team**.
This helps avoid issues later in development and makes pull request
reviews smoother.
### `confd`
The Infix `src/confd/` is the engine of the system. Currently it is a
@@ -164,29 +208,232 @@ Now you can rebuild `confd`, just as described above, and restart Infix:
make confd-rebuild all run
### `statd`
The Infix status daemon, `src/statd`, is responsible for populating the
sysrepo `operational` datastore. Like `confd`, it uses XPath subscriptions,
but unlike `confd`, it relies entirely on `yanger`, a Python script that
gathers data from local linux services and feeds it into sysrepo.
To apply changes, rebuild the image:
make python-statd-rebuild statd-rebuild all
Rebuilding the image and testing on target for every change during
development process can be tedious. Instead, `yanger` allows remote
execution, running the script directly on the host system (test
container):
infamy0:test # ../src/statd/python/yanger/yanger -x "../utils/ixll -A ssh d3a" ieee802-dot1ab-lldp
`ixll` is a utility script that lets you run network commands using an
**interface name** instead of a hostname. It makes operations like
`ssh`, `scp`, and network discovery easier.
Normally, `yanger` runs commands **locally** to retrieve data
(e.g., `lldpcli` when handling `ieee802-dot1ab-lldp`). However, when
executed with `-x "../utils/ixll -A ssh d3a"` it redirects these
commands to a remote system connected to the local `d3a` interface via
SSH. This setup is used for running `yanger` in an
[interactive test environment](testing.md#interactive-usage). The yanger
script runs on the `host` system, but key commands are executed on the
`target` system.
For debugging or testing, you can capture system command output and
replay it later without needing a live system.
To capture:
infamy0:test # ../src/statd/python/yanger/yanger -c /tmp/capture ieee802-dot1ab-lldp
To replay:
infamy0:test # ../src/statd/python/yanger/yanger -r /tmp/capture ieee802-dot1ab-lldp
This is especially useful when working in isolated environments or debugging
issues without direct access to the DUT.
## Upgrading Packages
### Buildroot
The Kernelkit team maintains an internal [fork of Buildroot][9], with
branches following the naming scheme `YYYY.MM.patch-kkit`
e.g. `2025.02.1-kkit`, which means a new branch should be created
whenever Buildroot is updated. These branches should contain **only**
changes to existing packages (but no new patches), modifications to
Buildroot itself or upstream backports.
The team tracks the latest Buildroot LTS (Long-Term Support) release and
updates. The impact of minor LTS release upgrades is expected to have a
very low impact and should be done as soon there is a patch release of a
Buildroot LTS available.
> **Depending on your setup, follow the appropriate steps below.**
#### Repo locally cloned already
1. Navigate to the Buildroot directory
cd buildroot/
1. Pull the latest changes from KernelKit
git pull
1. Fetch the latest tags from upstream
git fetch upstream --tags
#### No local repo yet
1. Clone the Kernelkit Buildroot repository
git clone git@github.com:kernelkit/buildroot.git
1. Add the upstream remote
git remote add upstream https://gitlab.com/buildroot.org/buildroot.git
1. Checkout old KernelKit branch
git checkout 2025.02.1-kkit
> [!NOTE]
> Below, it is **not** allowed to rebase the branch when bumped in Infix.
#### Continue Here
1. Create a new branch based on the **previous** KernelKit Buildroot
release (e.g. `2025.02.1-kkit`) and name it according to the naming
scheme (e.g. `2025.02.2-kkit`)
git checkout -b 2025.02.2-kkit
1. Rebase the new branch onto the corresponding upstream release
git rebase 2025.02.2
1. Push the new branch and tags
git push origin 2025.02.2-kkit --tags
1. In Infix, checkout new branch of Buildroot
cd buildroot
git fetch
git checkout 2025.02.2-kkit
1. Commit and push the changes. *Remember to update the ChangeLog!*
1. Create a pull request.
> [!NOTE]
> Remember to set the pull request label to `ci:main` to ensure full CI
> coverage.
### Linux kernel
The KernelKit team maintains an internal [fork of Linux kernel][10],
with branches following the naming scheme `kkit-linux-[version].y`,
e.g. `kkit-6.12.y`, which means a new branch should be created whenever
the major kernel version is updated. This branch should contain *all*
kernel patches used by Infix.
The team tracks the latest Linux kernel LTS (Long-Term Support) release
and updates. The upgrade of LTS minor releases is expected to have low
impact and should be done as soon as a patch release of the LTS Linux
kernel is available.
#### Repo locally cloned already
1. Navigate to the Linux kernel directory
cd linux
1. Get latest changes from KernelKit
git pull
1. Fetch the latest tags from upstream
git fetch upstream --tags
#### No local repo yet
1. Clone the KernelKit Linux kernel repository
git clone git@github.com:kernelkit/linux.git
1. Add the upstream remote
git remote add upstream git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
1. Checkout correct kernel branch
git checkout kkit-linux-6.12.y
#### Continue Here
1. Rebase on the upstream release
git rebase v6.12.29
1. Push changes and the tags
git push -f origin kkit-linux-6.12.y --tags
**Move to your Infix source tree**
> [!NOTE]
> See help of `kernel-refresh.sh` script for more information.
1. Generate patches
make x86_64_defconfig
cd output
../utils/kernel-refresh.sh -k /path/to/linux -o 6.12.28 -t v6.12.29
1. Commit and push the changes. Remember to update the ChangeLog
1. Create a pull request
> [!NOTE]
> Remember to set the pull request label to `ci:main` to ensure full CI
> coverage.
Testing
-------
Manual testing can be done using Qemu by calling <kbd>make run</kbd>,
see also [Infix in Virtual Environments](virtual.md).
see also [Infix in Virtual Environments](virtual.md), or on a physical
device by upgrading to the latest build or "[netbooting](netboot.md)"
and running the image from RAM. The latter is how most board porting
work is done -- **much quicker** change-load-test cycles.
The Infix automated test suite is built around Qemu and [Qeneth][2], see:
* [Testing](testing.md)
* [Docker Image](../test/docker/README.md)
* [Regression Testing with Infamy](testing.md)
* [Docker Image](https://github.com/kernelkit/infix/blob/main/test/docker/README.md)
With any new feature added to Infix, it is essential to include relevant
test case(s). See the [Test Development](testing.md#test-development)
section for guidance on adding test cases.
Reviewing
---------
While reviewing a pull request, you might find yourself wanting to
play around with a VM running that _exact_ version. For such
occations, [gh-dl-artifact.sh](../utils/gh-dl-artifact.sh) is your
friend in need! It will use the [GitHub CLI
(gh)](https://cli.github.com) to locate a prebuilt image from our CI
While reviewing a pull request, you might find yourself wanting to play
around with a VM running that _exact_ version. For such occasions,
[gh-dl-artifact.sh][8] is your friend in need! It employs the [GitHub
CLI (gh)](https://cli.github.com) to locate a prebuilt image from our CI
workflow, download it, and prepare a local output directory from which
you can launch both `make run` instances, and run regression tests
with `make test` and friends.
you can launch both `make run` instances, and run regression tests with
`make test` and friends.
For example, if you are curious about how PR 666 behaves in some
particular situation, you can use `gh` to switch to that branch, from
@@ -198,10 +445,10 @@ corresponding image for execution with our normal tooling:
cd x-artifact-a1b2c3d4-x86_64
make run
> **Note:** CI artifacts are built from a merge commit of the source
> and target branches. Therefore, the version in the Infix banner
> will not match the SHA of the commit you have checked out.
> [!NOTE]
> CI artifacts are built from a merge commit of the source and target
> branches. Therefore, the version in the Infix banner will not match
> the SHA of the commit you have checked out.
Contributing
------------
@@ -213,28 +460,32 @@ fork, and then use GitHub to create a *Pull Reqeuest*.
For this to work as *painlessly as possible* for everyone involved:
1. Fork Infix to your own user or organization[^1]
2. Fork all the Infix submodules, e.g., `kernelkit/buildroot` to your
1. Fork all the Infix submodules, e.g., `kernelkit/buildroot` to your
own user or organization as well
3. Clone your fork of Infix to your laptop/workstation
4. [Deactivate the Actions][6] you don't want in your fork
5. Please read the [Contributing Guidelines][5] as well!
1. Clone your fork of Infix to your laptop/workstation
1. [Deactivate the Actions][6] you don't want in your fork
1. Please read the [Contributing Guidelines][5] as well!
```bash
$ cd ~/Projects
$ git clone https://github.com/YOUR_USER_NAME/infix.git
...
$ cd infix/
$ git submodule update --init
...
```
> **Note:** when updating/synchronizing with upstream Infix changes you
> may have to synchronize your forks as well. GitHub have a `Sync fork`
> button in the GUI for your fork for this purpose. A cronjob on your
> server of choice can do this for you with the [GitHub CLI tool][7].
> [!NOTE]
> When updating/synchronizing with upstream Infix changes you may have
> to synchronize your forks as well. GitHub have a `Sync fork` button
> in the GUI for your fork for this purpose. A cronjob on your server
> of choice can do this for you with the [GitHub CLI tool][7].
[^1]: Organizations should make sure to lock the `main` (or `master`)
branch of their clones to ensure members do not accidentally merge
changes there. Keeping these branches in sync with upstream Infix
is highly recommended as a baseline and reference. For integration
of local changes another company-specific branch can be used instead.
of local changes another company-specific branch can be used instead.
[0]: https://github.com/kernelkit/infix/releases
[1]: https://buildroot.org/downloads/manual/manual.html
@@ -244,3 +495,7 @@ $ git submodule update --init
[5]: https://github.com/kernelkit/infix/blob/main/.github/CONTRIBUTING.md
[6]: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
[7]: https://cli.github.com/
[8]: https://github.com/kernelkit/infix/blob/main/utils/gh-dl-artifact.sh
[9]: https://github.com/kernelkit/buildroot
[10]: https://github.com/kernelkit/linux
[11]: https://squidfunk.github.io/mkdocs-material/
+171
View File
@@ -0,0 +1,171 @@
DHCP Server
===========
The DHCPv4 server provides automatic IP address assignment and network
configuration for clients. It supports address pools, static host
assignments, and customizable DHCP options. It also serves as a DNS
proxy for local subnets and can even forward queries to upstream DNS
servers[^1].
> [!NOTE]
> When using the CLI, the system automatically enables essential options
> like DNS servers and default gateway based on the system's network
> configuration. These options can be disabled, changed or overridden,
> at any level: global, subnet, or per-host.
## Basic Configuration
The following example configures a DHCP server for subnet 192.168.2.0/24
with an address pool:
```
admin@example:/> configure
admin@example:/config/> edit dhcp-server
admin@example:/config/dhcp-server/> edit subnet 192.168.2.0/24
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> set pool start-address 192.168.2.100 end-address 192.168.2.200
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> leave
```
When setting up the server from the CLI, the system automatically adds a
few default DHCP options that will be sent to clients: both DNS server
and default gateway will use the system address on the matching
interface.
```
admin@example:/> show running-config
"infix-dhcp-server:dhcp-server": {
"subnet": [
{
"subnet": "192.168.2.0/24",
"option": [
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"pool": {
"start-address": "192.168.2.100",
"end-address": "192.168.2.200"
}
}
]
}
```
> [!IMPORTANT]
> Remember to set up an interface in this subnet, avoid using addresses
> in the DHCP pool, or reserved for static hosts. In Class C networks
> the router usually has address `.1`. Depending on the use-case, you
> may also want to set up routing.
## Static Host Assignment
To reserve specific IP addresses for clients based on their MAC address,
hostname, or client ID:
```
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> edit host 192.168.2.10
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/host/192.168.2.10/> set match mac-address 00:11:22:33:44:55
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/host/192.168.2.10/> set hostname printer
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/host/192.168.2.10/> leave
```
Match hosts using a client identifier instead of MAC address:
```
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/> edit host 192.168.1.50
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/host/192.168.1.50/> edit match
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/host/192.168.1.50/match/> set client-id hex c0:ff:ee
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/host/192.168.1.50/match/> leave
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/host/192.168.1.50/> set lease-time infinite
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/host/192.168.1.50/> leave
```
The `hex` prefix here ensures matching of client ID is done using the
hexadecimal octets `c0:ff:ee`, three bytes. Without the prefix the
ASCII string "c0:ff:ee", eight bytes, is used.
> [!NOTE]
> The DHCP server is fully RFC conformant, in the case of option 61 this
> means that using the `hex` prefix will require the client to set the
> `htype` field of the option to `00`. See RFC 2132 for details.
## Custom DHCP Options
Configure additional DHCP options globally, per subnet, or per host:
```
admin@example:/config/dhcp-server/> edit subnet 192.168.2.0/24
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> edit option dns-server
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/option/dns-server/> set address 8.8.8.8
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/option/dns-server/> leave
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> edit option ntp-server
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/option/ntp-server/> set address 192.168.2.1
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/option/ntp-server/> leave
```
When configuring, e.g., `dns-server`, or `router` options with the value
`auto`, the system uses the IP address from the interface matching the
subnet. For example:
```
admin@example:/> show interfaces brief
Interface Status Address
eth0 UP 192.168.1.1/24
eth1 UP 192.168.2.1/24
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/> edit option dns-server
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/option/dns-server/> set address auto
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/option/dns-server/> leave
```
In this case, clients in subnet 192.168.1.0/24 will receive 192.168.1.1
as their DNS server address.
## Multiple Subnets
Configure DHCP for multiple networks:
```
admin@example:/> configure
admin@example:/config/> edit dhcp-server
admin@example:/config/dhcp-server/> edit subnet 192.168.1.0/24
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/> set pool start-address 192.168.1.100 end-address 192.168.1.200
admin@example:/config/dhcp-server/subnet/192.168.1.0/24/> leave
admin@example:/config/dhcp-server/> edit subnet 192.168.2.0/24
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> set pool start-address 192.168.2.100 end-address 192.168.2.200
admin@example:/config/dhcp-server/subnet/192.168.2.0/24/> leave
```
## Monitoring
View active leases and server statistics:
```
admin@example:/> show dhcp-server
IP ADDRESS MAC HOSTNAME CLIENT ID EXPIRES
192.168.2.22 00:a0:85:00:02:05 00:c0:ff:ee 3591s
192.168.1.11 00:a0:85:00:04:06 foo 01:00:a0:85:00:04:06 3591s
admin@example:/> show dhcp-server statistics
DHCP offers sent : 6
DHCP ACK messages sent : 5
DHCP NAK messages sent : 0
DHCP decline messages received : 0
DHCP discover messages received : 6
DHCP request messages received : 5
DHCP release messages received : 6
DHCP inform messages received : 6
```
[^1]: This requires the system DNS resolver to be configured.
+150 -59
View File
@@ -1,21 +1,21 @@
Discover Infix Units
====================
# Device Discovery
Infix advertises itself via the [mDNS-SD](#mdns-sd) and [LLDP](#lldp)
discovery protocols. mDNS-SD has good client support in Windows, macOS
and on Linux systems. More on these protocols later.
An even simpler method is available when directly attached to an Infix
device:
```
.----. Ethernet .-------.
| PC +---------------------+ Infix |
'----' if1 eth0 '-------'
.----. Ethernet .--------.
| PC +---------------------+ Device |
'----' if1 e1 '--------'
```
Figure 1: PC directly connected over Ethernet to Infix unit (here eth0).
When you wish to discover the IP address of an Infix switch, the simplest
way is probably to *ping the IPv6 all-hosts* address (ff02::1) over a
directly connected Ethernet cable. The unit's link-local IPv6 address is
seen in the response.
In the example below, the PC is connected to Infix via interface *tap0*
(*tap0* is *if1* in Figure 1) and Infix responds with address
With IPv6 you can *ping the all-hosts* address (ff02::1), the device's
link-local IPv6 address is then seen in the response. In the following
example, the PC here uses *tap0* as *if1*, Infix responds with address
*fe80::ff:fec0:ffed*.
```
@@ -31,7 +31,11 @@ rtt min/avg/max/mdev = 0.389/0.455/0.558/0.073 ms
linux-pc:#
```
The PC could connect then connect to Infix, e.g., using SSH.
> [!TIP]
> The `-L` option ignores local responses from the PC.
This address can then be used to connect to the device, e.g., using SSH.
Notice the syntax `username@address%interface`:
```
linux-pc:# ssh admin@fe80::ff:fec0:ffed%tap0
@@ -39,17 +43,13 @@ admin@fe80::ff:fec0:ffed%tap0's password: admin
admin@infix-c0-ff-ee:~$
```
## Discovery mechanisms available in Infix
Infix advertises its presence via the [mDNS](#mdns) and [LLDP](#lldp)
discovery protocols.
## LLDP
Infix supports LLDP (IEEE 802.1AB). For a device with factory default
settings, the link-local IPv6 address can be read from the Management
Address TLV using *tcpdump* or other sniffing tools[^1]:
### LLDP
Infix supports LLDP (IEEE 802.1AB). For a unit with factory default
settings, the PC can readout the link-local IPv6 address from the
Management Address TLV using *tcpdump* or other sniffing tools[^1].
```
linux-pc:# tcpdump -i tap0 -Qin -v ether proto 0x88cc
tcpdump: listening on tap0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
@@ -83,11 +83,12 @@ tcpdump: listening on tap0, link-type EN10MB (Ethernet), snapshot length 262144
linux-pc:#
```
If the unit has an IPv4 address assigned, it is shown in an additional
If the device has an IPv4 address assigned, it is shown in an additional
Management Address TLV.
> **Note** The Management Addresses shown by LLDP are not
> necessarily associated with the port transmitting the LLDP message.
> [!NOTE]
> The Management Addresses shown by LLDP are not necessarily associated
> with the port transmitting the LLDP message.
In the example below, the IPv4 address (10.0.1.1) happens to be
assigned to *eth0*, while the IPv6 address (2001:db8::1) is not.
@@ -130,9 +131,9 @@ tcpdump: listening on tap0, link-type EN10MB (Ethernet), snapshot length 262144
linux-pc:#
```
[^1]: [lldpd: implementation of IEEE 802.1ab
(LLDP)](https://github.com/lldp/lldpd) includes *lldpcli*, which
is handy to sniff and display LLDP packets.
The following capabilities are available via NETCONF/RESTCONF or the Infix CLI.
### LLDP Enable/Disable
The LLDP service can be disabled using the following commands.
@@ -143,13 +144,91 @@ admin@infix-c0-ff-ee:/config/> leave
admin@infix-c0-ff-ee:/>
```
### mDNS
To reenable it from the CLI config mode:
DNS-SD/mDNS can be used to discover Infix units and services. Infix
units present their IP addresses, services and hostname within the
.local domain. This method has good client support in Apple and Linux
systems. On Linux, tools such as *avahi-browse* or *mdns-scan*[^2] can
be used to search for devices advertising their services via mDNS.
```
admin@test-00-01-00:/config/> set lldp enabled
admin@test-00-01-00:/config/> leave
```
### LLDP Message Transmission Interval
By default, LLDP uses a `message-tx-interval` of 30 seconds, as defined
by the IEEE standard. Infix allows this value to be customized.
To change it using the CLI:
```
admin@test-00-01-00:/config/> set lldp message-tx-interval 1
admin@test-00-01-00:/config/> leave
```
### LLDP Administrative Status per Interface
Infix supports configuring the LLDP administrative status on a per-port
basis. The default mode is `tx-and-rx`, but the following options are
also supported:
- `rx-only` Receive LLDP packets only
- `tx-only` Transmit LLDP packets only
- `disabled` Disable LLDP on the interface
Example configuration:
```
admin@test-00-01-00:/config/> set lldp port e8 dest-mac-address 01:80:C2:00:00:0E admin-status disabled
admin@test-00-01-00:/config/> set lldp port e5 dest-mac-address 01:80:C2:00:00:0E admin-status rx-only
admin@test-00-01-00:/config/> set lldp port e6 dest-mac-address 01:80:C2:00:00:0E admin-status tx-only
admin@test-00-01-00:/config/> leave
```
> [!NOTE]
> The destination MAC address must be the standard LLDP multicast
> address: `01:80:C2:00:00:0E`.
### Displaying LLDP Neighbor Information
In CLI mode, Infix also provides a convenient `show lldp` command to
list LLDP neighbors detected on each interface:
```
admin@test-00-01-00:/> show lldp
INTERFACE REM-IDX TIME CHASSIS-ID PORT-ID
e5 1 902 00:a0:85:00:04:01 00:a0:85:00:04:07
e6 3 897 00:a0:85:00:03:01 00:a0:85:00:03:07
e8 2 901 00:a0:85:00:02:01 00:a0:85:00:02:05
```
## mDNS-SD
DNS-SD/mDNS-SD can be used to discover Infix devices and services. By
default, Infix use the `.local` domain for advertising services. Some
networks use `.lan` instead, so this configurable:
```
admin@infix-c0-ff-ee:/> configure
admin@infix-c0-ff-ee:/config/> edit mdns
admin@infix-c0-ff-ee:/config/mdns/> set domain lan
```
Other available settings include limiting the interfaces mDNS responder
acts on:
```
admin@infix-c0-ff-ee:/config/> set interfaces allow e1
```
or
```
admin@infix-c0-ff-ee:/config/> set interfaces deny wan
```
The `allow` and `deny` settings are complementary, `deny` always wins.
----
In Linux, tools such as *avahi-browse* or *mdns-scan*[^2] can be used to
search for devices advertising their services via mDNS.
```
linux-pc:# avahi-browse -ar
@@ -181,9 +260,15 @@ linux-pc:# avahi-browse -ar
linux-pc:#
```
> [!TIP]
> The `-t` option is also very useful, it stops browsing automatically
> when a "more or less complete list" has been printed. However, some
> devices on the LAN may be in deep sleep so run the command again if
> you cannot find the device you are looking for.
Additionally, *avahi-resolve-host-name* can be used to verify domain
name mappings for IP addresses. By default, it translates from IPv4
addresses. This function allows users to confirm that addresses are
name mappings for IP addresses. By default, it translates from IPv4
addresses. This function allows users to confirm that addresses are
mapped correctly.
```
@@ -209,7 +294,7 @@ rtt min/avg/max/mdev = 0.852/1.105/1.348/0.202 ms
linux-pc:# ssh admin@infix-c0-ff-ee.local
(admin@infix-c0-ff-ee.local) Password:
.-------.
| . . | Infix -- a Network Operating System
| . . | Infix OS — Immutable.Friendly.Secure
|-. v .-| https://kernelkit.org
'-'---'-
@@ -219,20 +304,21 @@ linux-pc:#
```
To disable mDNS/mDNS-SD, type the commands:
```
admin@infix-c0-ff-ee:/> configure
admin@infix-c0-ff-ee:/config/> no mdns
admin@infix-c0-ff-ee:/config/> leave
```
#### Human-Friendly Hostname Alias
### Human-Friendly Hostname Alias
Each Infix unit will advertise itself as *infix.local*, in addition to
its full hostname (e.g., *infix-c0-ff-ee.local* or *foo.local*). This
alias works seamlessly on a network with a single Infix device, and
makes it easy to connect when the exact hostname is not known in
advance. The examples below show how the alias can be used for
actions such as pinging or establishing an SSH connection:
Each Infix deviuce advertise itself as *infix.local*, in addition to its
full hostname (e.g., *infix-c0-ff-ee.local* or *foo.local*). This alias
works seamlessly on a network with a single Infix device, and makes it
easy to connect when the exact hostname is not known in advance. The
examples below show how the alias can be used for actions such as
pinging or establishing an SSH connection:
```
linux-pc:# ping infix.local -c 3
@@ -248,36 +334,39 @@ rtt min/avg/max/mdev = 0.751/1.482/2.281/0.626 ms
linux-pc:# ssh admin@infix.local
(admin@infix.local) Password:
.-------.
| . . | Infix -- a Network Operating System
| . . | Infix OS — Immutable.Friendly.Secure
|-. v .-| https://kernelkit.org
'-'---'-
Run the command 'cli' for interactive OAM
linux-pc:#
admin@infix-c0-ff-ee:~$
```
When multiple Infix devices are present on the LAN the alias will not
uniquely identify a device; *infix.local* will refer to any of the
Infix devices, likely the one that first appeared.
> When multiple Infix units are present, use the full hostname (e.g.,
> *infix-c0-ff-ee.local* or *foo.local*) rather than the alias
> infix.local to deterministically connect to a unit.
> [!NOTE]
> When multiple Infix devices are present on the LAN, use the full name,
> e.g., *infix-c0-ff-ee.local* or *foo.local* rather than the alias
> *infix.local* to deterministically connect to the device.
#### Netbrowse service to find all your devices
### Browse Network Using *network.local*
Another mDNS alias that all Infix devices can advertise is
*network.local*. This is a web service which basically runs avahi-browse
and displays a table of other Infix devices and their services.
Another mDNS alias that all Infix devices advertise is *network.local*.
This is a web service which basically runs `avahi-browse` and displays a
table of other Infix devices and their services.
![Netbrowse Service - network.local](img/network-local.png)
With multiple Infix devices on the LAN, one will be your portal to
access all others, if it goes down another will take its place.
With multiple Infix devices on the LAN, one will take the role of your
portal to access all others, if it goes down another takes its place.
To disable the netbrowse service, and the *network.local* alias, the
following commands can be used:
To disable the netbrowse service, the following commands can be used:
```
admin@infix-c0-ff-ee:/> configure
admin@infix-c0-ff-ee:/config/> edit web
@@ -285,6 +374,8 @@ admin@infix-c0-ff-ee:/config/web/> no netbrowse
admin@infix-c0-ff-ee:/config/web/> leave
```
[^1]: E.g., [lldpd](https://github.com/lldp/lldpd) which includes the
*lldpcli* too, handy to sniff and display LLDP packets.
[^2]: [mdns-scan](http://0pointer.de/lennart/projects/mdns-scan/): a
tool for scanning for mDNS/DNS-SD published services on the local
network
tool for scanning for mDNS/DNS-SD services on the local network.
+17 -30
View File
@@ -1,32 +1,19 @@
# YANG to Ethtool Mapping
# RMON Counters
This column contains the mapping between YANG and Linux / Ethtool counters.
This document show the mapping between YANG and Linux / Ethtool counters.
```
┌─────────────────────────────────┬──────────────────────────────────┐
│ YANG │ Linux / Ethtool │
├─────────────────────────────────┼──────────────────────────────────┤
│ out-frames │ FramesTransmittedOK │
├─────────────────────────────────┼──────────────────────────────────┤
│ out-multicast-frames │ MulticastFramesXmittedOK │
├─────────────────────────────────┼──────────────────────────────────┤
│ out-broadcast-frames │ BroadcastFramesXmittedOK │
├─────────────────────────────────┼──────────────────────────────────┤
│ in-total-frames FramesReceivedOK, │
│ │ FrameCheckSequenceErrors │
│ │ FramesLostDueToIntMACRcvError │
│ │ AlignmentErrors │
│ │ etherStatsOversizePkts │
│ │ etherStatsJabbers │
├─────────────────────────────────┼──────────────────────────────────┤
│ in-frames │ FramesReceivedOK │
├─────────────────────────────────┼──────────────────────────────────┤
│ in-multicast-frames │ MulticastFramesReceivedOK │
├─────────────────────────────────┼──────────────────────────────────┤
│ in-broadcast-frames │ BroadcastFramesReceivedOK │
├─────────────────────────────────┼──────────────────────────────────┤
│ in-error-undersize-frames │ undersize_pkts │
├─────────────────────────────────┼──────────────────────────────────┤
│ in-error-fcs-frames │ FrameCheckSequenceErrors │
└─────────────────────────────────┴──────────────────────────────────┘
```
| **YANG** | **Linux / Ethtool** |
|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| `in-total-octets` | `FramesReceivedOK`, `FrameCheckSequenceErrors`, `FramesLostDueToIntMACRcvError`, `AlignmentErrors`, `etherStatsOversizePkts`, `etherStatsJabbers` |
| `in-frames` | `FramesReceivedOK` |
| `in-multicast-frames` | `MulticastFramesReceivedOK` |
| `in-broadcast-frames` | `BroadcastFramesReceivedOK` |
| `in-error-fcs-frames` | `FrameCheckSequenceErrors` |
| `in-error-undersize-frames` | `undersize_pkts` |
| `in-error-oversize-frames` | `etherStatsJabbers`, `etherStatsOversizePkts` |
| `in-error-mac-internal-frames` | `FramesLostDueToIntMACRcvError` |
| `out-frames` | `FramesTransmittedOK` |
| `out-multicast-frames` | `MulticastFramesXmittedOK` |
| `out-broadcast-frames` | `BroadcastFramesXmittedOK` |
| `infix-eth:out-good-octets` | `OctetsTransmittedOK` |
| `infix-eth:in-good-octets` | `OctetsReceivedOK` |

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