43 Commits
Author SHA1 Message Date
Joachim Wiberg 16f26b02a8 board: sync linux_defconfigs between archs
- Enable Ext2 support where missing
 - Enable POSIX_ACLs where missing
 - Sync NLS code pages

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-29 20:41:26 +01:00
Joachim Wiberg d75ba2064a board: simplify usb debugging, allow announcement of new devices
Simplify USB device debugging by allowing USB core to always announce
details of every new USB device to syslog.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-24 18:08:32 +01:00
Mattias Walström 0e2d12e9ff Upgrade kernel to 6.18 2026-01-19 11:02:22 +01:00
Mattias Walström 7e5da21cf6 Add support for WireGuard
Almost full support for WireGuard

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

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

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

admin@server:/>
2026-01-09 11:11:32 +01:00
Tobias Waldekranz d720323b50 kernel: Enable test_lockup module
This will be us the ability to test a hardware watchdog's ability to
trigger on different kinds of lockups.
2025-12-16 09:33:58 +01:00
Joachim Wiberg c2a9ee4fbc board/*/linux_defconfig: panic on lockups and hung tasks
Turn on OOPS-to-panic, soft/hard lockup panic, hung-task panic, and
extra workqueue watchdog reporting. This makes latent stalls visible
instead of silently freezing, improving diagnosis of issues like the
recent resource-pressure lockup.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-08 17:01:54 +01:00
Joachim Wiberg ab56c1be50 Relocate src/board/* and package/board/* to board/
This commit consolidates all BSP support files into the Buildroot standard
board/ directory.  The concept of selectable boards in menuconfig remains
as-is but now lives in board/ instead.

Drop support for board-specific post-build.sh scripts, not needed atm. and
we should really use Buildroot _POST_INSTALL_HOOKS in the board .mk files
instead.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:06 +01:00
Joachim Wiberg 937d4c38c7 board: make usb subsystem a built-in
Use kernel cmdline option 'usbcore.authorized_default=2' to lock all
external/user-visible USB ports by default.

The kernel distinguishes internal vs external USB ports using ACPI
methods (_UPC and _PLD) on x86/x86_64 systems.  On ACPI systems, ports
marked as non-visible but connectable are considered internal (e.g.,
hard-wired USB-to-Ethernet adapters) and are automatically authorized,
while user-visible external ports require manual authorization.

However, on device tree systems the kernel lacks a standard mechanism
for identifying internal ports. The 'authorized_default=2' setting falls
back to requiring authorization for all devices on these platforms,

We list user-accessible USB ports in the device tree ('usb-ports' and
'usb-port-names'), with unlisted ports being implicitly internal and
managed separately.

Fixes #1065

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:25:59 +01:00
Joachim Wiberg b2a41e4868 board: drop team support, add common USB to Ethernet drivers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:25:59 +01:00
Joachim Wiberg d715f02da0 board: enable rauc upgrade history and event logging (json)
The rauc event logger is a separate glib logger that by default logs to
the system console, with annoying ANSI escape sequences.  This commit
drops the default stdout/stderr redirect of these log messages and adds
a more exhaustive bundle install and event log, in json format, instead.

For more information about event logging, see the rauc documentation:
https://rauc.readthedocs.io/en/latest/advanced.html

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 21:32:59 +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
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
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 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
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
Mattias Walström b0f4192f24 kernel: Reboot device if kernel panics
The worst way of handling a kernel crash is to do nothing at all.
2024-10-31 15:55:47 +01:00
Joachim Wiberg b9238b2a96 board: add support for exFAT file systems
From https://en.wikipedia.org/wiki/exFAT:

   ... a file system optimized for flash memory such as USB flash
   drives and SD cards.
   ... has been adopted by the SD Association as the default file
   system for SDXC and SDUC cards larger than 32 GB.

The exfatprogs is also a default installed package on most modern
distros, compared to dosfstools (mkfs.vfat) which is not.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-04 07:42:44 +02:00
Tobias Waldekranz 2c72aaf6e1 test: Move all test related targets from board/x86_64 to test/
The list of binaries needed inside the test environment is the only
architecture specific bit, so refactor that out to a separate
variable.
2024-05-20 16:21:06 +02:00
Joachim Wiberg ab3a09b260 board/x86_64: follow-up to c637ab4, allow console also on ttyS0
Fixes #419

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-05-01 10:45:17 +02:00
Mattias WalströmandJoachim Wiberg dcc80d0d8a Allow to run testsystem using disk image
This will run the testsystem with a disk
image containing grub bootloader.
2024-04-23 16:24:18 +02:00
Mattias WalströmandJoachim Wiberg c637ab4edb grub: Use same console for qeneth and make run
Console is now located on hvc0
2024-04-23 16:24:18 +02:00
Mattias WalströmandTobias Waldekranz ced93c89c7 grub: Select root partion from UUID 2024-04-22 14:22:50 +02:00
Joachim Wiberg efc4ea20d6 test: update .PHONY rule after test-unit relocation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-03 16:08:37 +02:00
Tobias Waldekranz 2e3d8881cc test: Allow unit tests to be run from non-x86 builds
Since there is no dependency on anything being built, move the
test-unit target to an architecture-neutral location.
2024-03-13 11:01:15 +01:00
Joachim Wiberg 3a04bec92d test: drop --interactive in non-interactive docker sessions
With a self-hosted runner we get the following classic error when
calling `make test-unit`:

    make[1]: Entering directory '/home/runner/_work/infix/infix/buildroot'
    /home/runner/_work/infix/infix/test/env /home/runner/_work/infix/infix/test/9pm/9pm.py /home/runner/_work/infix/infix/test/case/all-repo.yaml /home/runner/_work/infix/infix/test/case/all-unit.yaml
    the input device is not a TTY
    make[2]: *** [/home/runner/_work/infix/infix/board/x86_64/board.mk:14: test-unit] Error 1

This patch drops interactive from all non-interactive docker sessions.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-27 12:33:20 +01:00
Joachim Wiberg 5386ec9a3a test,doc,board: Infamy Made Easy
As of 4768cae6, we can use conserver/telnet to connect to the docker0
bridge IP:90XX, where XX is DUTXX.  This was a great UX improvement
and this patch set aims to further the experience by:

 - allow running Infamy (infix-test container) completely rootless¹
 - reduce the expsed port range 50->10 (can be improved further)
 - use 'podman --publish-all' ports, which allocates ten random
   ports for the exposed Qemu telnet ports
 - add Quick Start Guide to doc/testing.md

This restores the possiblity of running multiple "make test-sh"
instances, e.g., when multiple users share the same server.

The 'console' script included in this commit uses 'podman inspect' to
find the port number for a given DUT, and optional instance.  It takes
either the console/dut number (1-N), or the dut name from the topology.

Also in this commit:
 - set hostname for easy identification (for console script)
 - set conatainer --name to hostname
 - adjust workdir from buildroot to infix/test
 - simplify PS1 and add time to prompt (when did the test finish?)

When running 'make test-sh' the prompt now tells you which instance you
are running, e.g., infmay10.  Calling 'console 1 infamy10' connects to
console 1 (port 9001) on the infamy10 instance.

For more information, see the Quick Start Guide in doc/testing.md.  It
shows how to use the new helper scripts: console and shell.

Fix #227

_______
¹) devs using podman, instead of docker, with slirp4netns installed, can
   run the infix-test container completely rootless.  We like this, and
   as of today podman is our recommendation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Mattias Walström 746392cac5 x86_64: Update linux_defconfig with USB as module
This to be able to control USB ports in infix using authorized in /sys
2024-02-23 14:01:23 +01:00
Mattias WalströmandJoachim Wiberg 388c02b29a test: Create a larger OSPF test
This will test, multiple areas with cost and BFD (requires link
breakers in infamy, not yet implemented there yet)

Also test NSSA-areas.
2024-01-15 16:29:06 +01:00
Richard AlpeandMattias Walström 2661225aeb test: break out unit test and run early in GH actions
Break out unit tests to separate make target as they don't require all
the built code and infrastructure that the normal tests does.

Run the unit tests early in the Github action stage. They don't
require a full build. This will give early feedback to the users.

Signed-off-by: Richard Alpe <richard@bit42.se>
2023-12-05 10:02:51 +01:00
Joachim WibergandTobias Waldekranz e644d87c31 Relocate qeneth and 9pm submodules to test/
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-12-01 20:57:54 +01:00
Tobias WaldekranzandJoachim Wiberg 405aa6510d kernel: Enable netdev LED trigger
This trigger can be offloaded into hardware by the PHY or MAC LED
attached to the netdev in question.
2023-11-19 08:50:19 +01:00
Joachim Wiberg c1fd4506e6 test: validate defconfigs, ensure root login is disabled
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-11-14 10:20:00 +01:00
Richard AlpeandJoachim Wiberg f69b08ea59 test: add top level unit test suite
This currently includes cli-pretty tests. It could be executed
separately to clarify test results in github actions. This commit
includes it in the main test execution. The most important thing is
that it's executed.

Signed-off-by: Richard Alpe <richard@bit42.se>
2023-09-19 11:57:08 +02:00
Tobias WaldekranzandJoachim Wiberg 5be61a7013 test/case: Add ietf_system/upgrade
Verifies that RAUC bundles can be installed using NETCONF.

We choose to not add this to the "all" suite for now, as the qeneth
topologies do not run with full disk emulation.

To test locally, configure your "make run" instance to use the UEFI
loader, launch `make run`, and then run:

    make INFIX_TESTS=test/case/ietf_system/upgrade.py test-run
2023-06-30 15:33:10 +02:00
Tobias WaldekranzandJoachim Wiberg c4a1b2558d rauc: Increase maximum download size to 1 GiB
Default is 8 MiB which is, you know, not alot. Choose a very high
value and let the OS notify RAUC when the disk is full.
2023-06-30 15:33:10 +02:00
Tobias WaldekranzandJoachim Wiberg f056e20558 rauc: Bundle RAUC status file in disk image
This let's us report the installed software versions, before any
updates have been made. Since the info should _not_ be erased in a
factory reset (since the installed software versions will not change),
move the status file to aux, which is the proper place for this class
of information.
2023-06-30 15:33:10 +02:00
Tobias WaldekranzandJoachim Wiberg b02bba991d netboot: Consistently use /dev/ram0 as the root when ramloading
/dev/ram is accepted by the kernel during boot, but there's no actual
file with this name in /dev, so RAUC will get confused about which
slot is actually one we booted from.
2023-06-30 15:33:10 +02:00
Tobias WaldekranzandJoachim Wiberg 1202edc990 test: Ensure that the local pip environment is setup for test-run* 2023-06-30 15:33:10 +02:00
Tobias WaldekranzandJoachim Wiberg be7b57412e test/case: Add meta/play
Launches an interactive ipython environment, attached to Infix nodes.
This can be used as a playground for developing tests, testing out
NETCONF operations, etc.
2023-06-30 15:33:10 +02:00
Tobias WaldekranzandJoachim Wiberg 175f7e1c58 x86_64: Make the test environment more customizable
- Collect all test related targets under the test- prefix.

- Add target to run test suite against a `make run` instance. The
  intended use-case is that you are testing out a new build with `make
  run`, and then realize that you want to run some tests.  With this
  change, it is now possible to run `make infix-run-check` from a
  separate terminal - which attaches to the running instance and runs
  the tests.

- Provide -sh targets to spawn interactive environments, which is
  useful during debugging.

- Allow the user to supply a custom suite or list of tests to be run
  by 9PM.
2023-06-14 17:40:16 +02:00
Tobias WaldekranzandJoachim Wiberg 225395f749 x86_64: Add convenience target to run the test suite
Once infix has been built, the test suite can now be run by issuing:

    make infix-check
2023-06-08 11:10:31 +02:00
Joachim WibergandTobias Waldekranz b3761d84dc board: update kernel defconfigs for running containers (podman)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-05-21 20:39:12 +02:00
Joachim WibergandTobias Waldekranz 5d7e6bd693 Rename amd64 -> x86_64 and native -> classic
A long standing internal debate comes to its logical conclusion.  Arch
naming should follow GCC.  The "native /etc" has also found a better
name: classic!

README and GitHub action has been updated accordingly.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-27 09:59:35 +02:00