Compare commits

...
926 Commits
Author SHA1 Message Date
Joachim WibergandMattias Walström 4828087b80 doc: add information on ospf debug settings
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-12 12:25:09 +01:00
Mattias Walström 8f1ae7f6a4 Update changelog for 25.11.1 2025-12-12 12:24:17 +01:00
Joachim WibergandMattias Walström cb10855b4a confd: add support for toggling OSPF debug logs
Fixes #1281

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-12 12:21:40 +01:00
Joachim WibergandGitHub 19a09a818c Merge pull request #1298 from kernelkit/releng
Release Infix v25.11.0
2025-12-02 16:01:15 +01:00
Joachim Wiberg bcf33f9dbf Update ChangeLog for Infix v25.11.0 release
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 15:52:54 +01:00
Joachim WibergandGitHub 76bc8dab73 Merge pull request #1287 from kernelkit/support
Support data collection
2025-12-02 15:22:43 +01:00
Joachim Wiberg 1620fb56f6 Update ChangeLog, new 'support' command
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 14:11:01 +01:00
Joachim Wiberg 1728b68483 utils: initial support data analysis tool
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 14:11:00 +01:00
Joachim Wiberg d6721742c4 test: new test, verify support data collection
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 14:11:00 +01:00
Joachim Wiberg d1f053b41c test: minor, update test specifications
Sync with latest updates, including test path changes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 14:11:00 +01:00
Joachim Wiberg cfeb875b2b bin: collect data by default to /var/lib/support
Also, adjust file suffix for json files.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 13:58:25 +01:00
Joachim WibergandGitHub b32c95623b Merge pull request #1296 from kernelkit/kernel-upgrade-711c9fb8-b7a1-4dd4-83ea-f452dd509f26
Upgrade to kernel 6.12.60
2025-12-02 13:44:55 +01:00
Joachim Wiberg 9ce47017d8 bin: add optional support for encrypting the support tarball
This commit adds optional support for encrypting the tarball before it
leaves the target system.  Documentation and usage text updated.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 13:38:42 +01:00
Joachim Wiberg 0650e16810 doc: add Support Data Collection section to User Guide
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 13:38:42 +01:00
Joachim Wiberg a1067fd049 bin: add system support data collection
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 13:38:41 +01:00
Mattias WalströmandGitHub 8b48679401 Merge pull request #1295 from kernelkit/fix-log-warning
statd: reduce log warning to debug
2025-12-02 11:16:02 +01:00
ael-bot 23abcfdc07 Upgrade Linux kernel to 6.12.60 2025-12-02 10:09:16 +00:00
Joachim Wiberg 51f289a273 statd: reduce log warning to debug
This fixes the following log message on systems w/o firewall enabled
dumping operational data:

Dec  2 09:24:57 test-00-02-00 yanger[5352]: Failed to connect to firewalld D-Bus: org.freedesktop.DBus.Error.ServiceUnknown: The name org.fedoraproject.FirewallD1 was not provided by any .service files

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 11:02:06 +01:00
Joachim WibergandGitHub cd0a5f3063 Merge pull request #1290 from kernelkit/hostkey-warning
Fix SSH host key generation warnings
2025-12-02 10:59:57 +01:00
Joachim Wiberg d23f9ea25b confd: fix SSH host key generation warnings
Validate keys in gen_hostkey() before passing empty keys to shell scripts,
preventing:

Nov 04 2024 10:54:25 confd[2697]: SSH key (genkey) does not exist, generating...
Nov 04 2024 10:54:25 confd[2697]: writing RSA key
Nov 04 2024 10:54:26 confd[2697]: do_convert_from_pkcs8: /tmp/tmp.FH1Hr1 is not a recognised public key format

Also, fix base64 content formatting with proper 64-character line wrapping
using printf+fold instead of echo.

Use PKCS#1 RSA format for public keys as required by netopeer2-server, while
keeping PKCS#8 format for private keys.  Use proper ssh-keygen format flag
(PKCS8) for correct conversion.

Fixes #1289

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 09:50:24 +01:00
Tobias WaldekranzandGitHub 2e7b9a6c00 Merge pull request #1286 from kernelkit/missing-test-specs
Add missing test specs
2025-12-02 09:15:48 +01:00
Joachim WibergandGitHub 245f31cd68 Merge pull request #1288 from kernelkit/misc
Fix 'show dhcp-server' output in CLI and operational
2025-12-01 11:08:23 +01:00
Joachim Wiberg fdb02895fb statd: add pwm fan support
Due to their nature we cannot read out the RPM of the pwm fans on the
BPi-R3.  But we can at least show it's alive, or steering out a signal
to the fan.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-30 17:16:21 +01:00
Joachim Wiberg 5e62adae7e doc: update ChangeLog for release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-30 13:41:36 +01:00
Joachim Wiberg 8c291d3a94 statd: fix EXPIRES column alignment in 'show dhcp-server'
The EXPIRES column was misaligned due to multiple issues:
- Column header used width 10 while data rows used width 9
- Expiry values had leading space intended for the narrower width
- CLIENT ID column width (19) was too narrow for typical client IDs
  like "01:00:a0:85:00:01:05" (20 chars), causing overflow

Fixed by using consistent width for EXPIRES, removing the leading
space from expiry values, and widening CLIENT ID column to 22.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-30 13:37:08 +01:00
Joachim Wiberg 6c194007a1 statd: fix double timezone in DHCP lease expiry timestamps
The isoformat() method already includes the timezone offset when the
datetime object has timezone info.  Appending "+00:00" created an
invalid double-timezone suffix like "2025-11-30T13:13:49+00:00+00:00"
which failed YANG validation.

Error was:
  admin@bpi-26-60-00:/> show dhcp-server
  Error running sysrepocfg: Command '['sysrepocfg', '-f', 'json', '-X',
  '-d', 'operational', '-x', '/infix-dhcp-server:dhcp-server']' returned
  non-zero exit status 1.
  No interface data retrieved.

With syslog showing:
  statd[4291]: libyang[0]: Invalid union value
  "2025-11-30T13:13:49+00:00+00:00" - no matching subtype found

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-30 13:36:44 +01:00
Joachim Wiberg 58e1238967 board/aarch64: firewall forwarding and enable dhcpv6 client on wan
- firewall: allow traffic to be forwarded from lan to wan zone
- dhcpv6: enable client on wan interface

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-30 13:13:18 +01:00
Joachim Wiberg 72445004c8 test: add missing test specs
Add missing test specs for new dhcpv6 tests.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-27 19:37:23 +01:00
Joachim WibergandGitHub bd2f3467f8 Merge pull request #1285 from kernelkit/yanger-robustness 2025-11-27 19:03:16 +01:00
Joachim Wiberg 173daf8fce statd: skip CAN interfaces in IETF interface model
Skip CAN interfaces that don't fit the IETF interface model.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-27 17:03:08 +01:00
Joachim WibergandGitHub ba87358844 Merge pull request #1277 from kernelkit/flaky-test
Stabilize syslog hostname filtering test
2025-11-27 09:52:09 +01:00
Joachim WibergandGitHub 0d5cc155a4 Merge pull request #1282 from kernelkit/arm 2025-11-26 21:15:52 +01:00
Tobias WaldekranzandGitHub de036b23dc Merge pull request #1283 from kernelkit/probe-fixes
Fix chassis MAC fallbak detection
2025-11-26 20:44:10 +01:00
Joachim Wiberg 458a77628d doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-26 19:46:56 +01:00
Joachim Wiberg defdd97843 board/aarch64: disable BootROM debug on RPi's
Now that we've got everything working, it's just annoying, so disable it
but leave it in with a comment.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-26 19:46:55 +01:00
Joachim Wiberg 69c350c92f board/aarch32: initial support for Raspberry Pi 2B
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-26 19:46:55 +01:00
Joachim Wiberg 209faa70b6 test: attempt to stabilize syslog hostname filtering
- Refactor to use a common function for all messages
- Use until() to retry check_log()

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-26 19:28:48 +01:00
Joachim Wiberg a98cb5897c probe: fix chassis MAC detection with CAN/tunnel interfaces
Simplify fallback MAC detection to return lowest valid MAC address.
This is the easiest to document and explain to end users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-26 14:48:39 +01:00
Joachim WibergandGitHub 9386f00bd0 Merge pull request #1279 from kernelkit/ci-improvements
CI: Add workflow customization for upstream callers

[skip ci]
2025-11-25 17:50:21 +01:00
Joachim WibergandGitHub cd94de7bb4 Merge pull request #1278 from kernelkit/cyclonedx-build-target
Add top level makefile target to build cyclonedx

[skip ci]
2025-11-25 16:26:31 +01:00
Richard Alpe ddf766d951 Add top level makefile target to build cyclonedx
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-11-25 15:17:18 +01:00
Richard Alpe 79ec2fbc30 CI: allow upstream caller to specify branch
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-11-25 15:14:52 +01:00
Richard Alpe d2e2adf878 CI: add pre-test-script workflow call variable
This allows a caller (Spin) to run arbitrary code before test starts.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-11-25 15:14:49 +01:00
Tobias WaldekranzandGitHub 737b131e23 Merge pull request #1276 from kernelkit/misc
Misc
2025-11-24 16:42:38 +01:00
Joachim WibergandGitHub 9e679c4ce6 Merge pull request #1275 from kernelkit/kernel-upgrade-892ca8de-c208-4bc6-9688-d969ff734bc5
Upgrade to kernel 6.12.59
2025-11-24 16:42:15 +01:00
Joachim Wiberg a77ed01a5f doc: prepare fore v25.11 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-24 13:58:38 +01:00
ael-bot e113614645 Upgrade Linux kernel to 6.12.59 2025-11-24 10:48:22 +00:00
Joachim Wiberg b0aaf8fd89 package/klish: fix integer size bug on 32-bit systems
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-24 11:34:21 +01:00
Joachim WibergandGitHub ffe9a836ed Merge pull request #1274 from kernelkit/check 2025-11-23 18:37:00 +01:00
Joachim Wiberg e01888f3d9 Fix Coverity Scan build target
When PR #1271 was merged (commit c34c8db4), it:

 1. Created a new coverity-build target in src/Makefile
 2. Updated .github/workflows/coverity.yml to call make coverity-build
 3. Forgot to add coverity-build as an explicit target in the top-level Makefile

This commit also simplifies src/Makfile a lot for readability.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-22 21:37:08 +01:00
Joachim WibergandGitHub cb78723c46 Merge pull request #1272 from kernelkit/brup
Upgrade Buildroot to 2025.02.8 (LTS)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-21 11:30:27 +01:00
Joachim WibergandGitHub c592b26b94 Merge pull request #1271 from kernelkit/scanbuild
Reclaim 'make check' for manual use, add scan-build support

[skip ci]
2025-11-21 10:58:40 +01:00
Joachim WibergandGitHub ca86421715 Merge pull request #1270 from kernelkit/rpi4-doc
Update RPi64 docs a bit

[skip ci]
2025-11-21 10:54:12 +01:00
Joachim Wiberg e76f1ebd68 Upgrade Buildroot to 2025.02.8 (LTS)
https://lore.kernel.org/buildroot/f35f9987-0ba1-4a4c-904e-85f8552f00a3@rnout.be/

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-21 10:12:10 +01:00
Joachim WibergandGitHub 9a8d13191b Merge pull request #1269 from kernelkit/rename 2025-11-21 09:17:54 +01:00
Joachim Wiberg b9a56924ac confd: drop ietf/infix prefix from function names
SIMPLIFY, Simplify, simplify ... as my uni English professor always said.

> “Perfection is achieved not when there is nothing more to add, but when
>  there is nothing left to take away.” -- Antoine de Saint-Exupéry

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:25 +01:00
Joachim Wiberg c398e42ca9 confd: drop leading ietf/infix prefix in source files
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:24 +01:00
Joachim Wiberg b40c605ac5 test/case: simplify and add load-bearing sleep(2)
This (new) test sometimes fail on HW, so let's hold off a while before
sending our log messages.  Ths should allow the DUTs to settle.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:24 +01:00
Joachim Wiberg 1bbd80d8c7 test: drop leading ietf/infix prefix from directories
Let's drop the leading IETF or Infix prefixes from tests.  Initially the
idea was to mimnic the YANG models, but it's difficult to navigate and
does not provide any real benefit to developers or end-users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:23 +01:00
Joachim Wiberg 834f325097 board/aarch64: update RPi64 ddocs a bit
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 19:51:05 +01:00
Joachim Wiberg c34c8db435 src: reclaim 'make check' for manual use, add scan-build support
Let's give Coverity Scan its own make target so we can reuse 'make check'
for our own scan-build or cppcheck needs.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 19:31:04 +01:00
Joachim WibergandGitHub 492fed58b4 Merge pull request #1268 from kernelkit/syslog-matching
Syslog Enhancements
2025-11-20 16:11:26 +01:00
Joachim Wiberg 79dd5d27ec doc: update ChangeLog with new syslog features
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:39 +01:00
Joachim Wiberg d127e1665c doc: update syslog documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:39 +01:00
Joachim Wiberg 93333ca3b2 test: add new tests to test specification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:38 +01:00
Joachim Wiberg 956f2b620d test: new syslog test to verify property based filtering
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:38 +01:00
Joachim Wiberg ed6db59e68 confd: extend syslogd support with property-based filtering
This is the last commit in the series that extend syslog matching and sorting
to the level of sysklogd 2.7.0 and later.  Like hostname filtering, property
based filtering is not supported natively in the IETF RFC, and the modeling is
unfortunately a bit clunky.  The most confusing part is probably 'negate'
which is the '!' operator that inverts the matching, e.g., !icase_regex match
everthing *not* in the regexp.

Fixes #1091

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:37 +01:00
Joachim Wiberg efb3d88e35 test: new syslog test to verify filtering by hostname
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:37 +01:00
Joachim Wiberg 18e80ceb11 confd: extend syslogd support with hostname-based filtering
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:36 +01:00
Joachim Wiberg f71755d8ca test: new syslog tests to verify regexp and comparison ops
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:06 +01:00
Joachim Wiberg c1b57c17bd confd: extend syslogd with regexp matching and advanced severity ops
Unlock more of the optional features in ietf-syslog.yang: select-match and
select-adv-compare, for regexp and advanced severity comparison operators.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:06 +01:00
Joachim Wiberg a048a312c7 test: review syslog remote test, coding style
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:05 +01:00
Joachim Wiberg a99f231984 test: review syslog-basic, improve test description
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:05 +01:00
Joachim Wiberg e110bd0743 board/common: enable unicode support with c.utf-8 locale
Set LANG=C.UTF-8 in finit.conf for system-wide coverage, in profile.d
for login shells, and in bash.bashrc for interactive shells to ensure
comprehensive Unicode support across all user interactions.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:04 +01:00
Joachim Wiberg 442b572478 patches/sysklogd: backport fixes
- Allow parenthesis in tag names
- Unescape Linux /dev/kmsg messages for unicode characters

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 11:59:59 +01:00
Joachim WibergandGitHub f88ebc9cde Merge pull request #1258 from kernelkit/hostname-stability
Hostname stability

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 11:59:25 +01:00
Joachim Wiberg b65aa32fbb .github: markdown syntax fixes and new section on code signing
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:45 +01:00
Joachim Wiberg c2e422a91b doc: update ChangeLog, dhcp hostname fix and boot time
Fixes #1255

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:44 +01:00
Joachim Wiberg 74351c51c1 test: add new tests to test specification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:44 +01:00
Joachim Wiberg df1df83229 test: new test, dhcp hostname priority test
Verify deterministic hostname management via /etc/hostname.d/, rules:

 1. Configured hostname takes precedence over default
 2. DHCP hostname takes precedence over configured
 3. Hostname reverts when DHCP lease ends

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:43 +01:00
Joachim Wiberg 0d44b44bac test: redirect python cache to /tmp to fix cleanup issues
Set PYTHONPYCACHEDIR=/tmp/__pycache__ in test/env to avoid permission issues
during git cleanup operations.  When tests run in Docker containers as root,
__pycache__ directories and .pyc files end up owned by root, preventing the
CI user from cleaning them up.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:43 +01:00
Joachim Wiberg 6b467b99a8 test/infamy: allow more fine-grained control of macvlans
This change exposes the macvlan mode to tests, unlocking support for running
certain types of tests on systems with only a single Ethernet port.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:43 +01:00
Joachim Wiberg e241b14c2a test/infamy: pep-8, minor whitespace
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:42 +01:00
Joachim Wiberg 762ae77158 board: update factory-configs with dhcpv4 vendor-class
Devices should tell the server what they are in case an administrator
wants to group or hand out dedicated leases and information to some
devices on the lan.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:42 +01:00
Joachim Wiberg a53b7dd1ea board/common: basic support for smbios/dmi based systems in probe
This allows us to gather better product information in /run/system.json
also for x86 based systems.  For Qemu x86_64 systems the 'product-name'
changes from 'VM' to 'Standard PC (i440FX + PIIX, 1996)'.

Also, add new 'product-version' field for, e.g., board revisions, and add
missing 'serial-number' value for systems like Rasperry Pi that inject it
in the device tree.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 09:34:00 +01:00
Joachim Wiberg 3aa22a7c63 board/common: only apply explicitly requested DHCP options in client
Validate that DHCP options were requested in the parameter request
list before applying them. This prevents malicious or misconfigured
DHCP servers from forcing unwanted configuration changes.

Validates: hostname (12), DNS (6), domain (15), search (119),
router (3), static routes (121), and NTP (42).

Fail-safe behavior: rejects options if config file unavailable.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 09:34:00 +01:00
Joachim Wiberg 52320a973a confd: add support for dhcpv4 vendor-class option
The vendor-class option was previously hard-coded to "Infix vXX.YY.Z",
but since this option usually describes the type of the device asking
for a lease, the default has been changed to use the product-name.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 09:33:59 +01:00
Joachim Wiberg 90f619bfa6 confd: add deterministic hostname management via /etc/hostname.d/
Resolve race condition between DHCP and configured hostname by introducing
priority-based hostname management using /etc/hostname.d/ directory pattern.

Priority order (highest wins):
  90-dhcp-<iface>  - DHCP assigned hostname
  50-configured    - YANG /system/hostname config
  10-default       - Bootstrap/factory default

The new /usr/libexec/infix/hostname helper reads all sources and applies the
highest priority hostname.  It exits early if hostname unchanged, preventing
unnecessary service restarts.

Fixes #1112

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 19:07:25 +01:00
Joachim WibergandGitHub 889120e9da Merge pull request #1251 from kernelkit/dhcpv6-client
Add DHCPv6 client support
2025-11-18 19:04:14 +01:00
Joachim Wiberg 548e0c4881 board/common: don't change link status of interface
After some discussion we agreed that this operation is the domain of
confd (or dagger) and any DHCP client should not mess with the admin
state of the interface it runs on.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 18:11:35 +01:00
Joachim Wiberg 635ebeb29b doc: update ChangeLog, DHCPv6 client support
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 18:11:34 +01:00
Joachim Wiberg 9d0e9109f4 doc: update networking guide with dhcpv6 details
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 18:11:33 +01:00
Joachim Wiberg c91fc1f38b test: add dhcpv6 client tests
- Basic DHCPv6 client, request a lease and verify Linux installs a
   default route from the Router Advertisements (option not included
   in DHCPv6), hence the 'enable-ra' option to dnsmasq.  Also verify
   DNS resolution over IPv6, including the resolvconf dance
 - Prefix delegation, verifies that the client can actually request
   and receives a prefix from a DHCPv6 server.  We don't do anything
   with it today though

Two new DHCP server implementations, the basic test relies on dnsmasq
and the prefix delegation test requires an ISC based dhcp server with
server side support for ipv6 prefix delegation.  We could reuse the
latter for both tests, but this way we get compatibility testing.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 18:11:32 +01:00
Joachim Wiberg 987dd40e1f test/infamy: support ipv6 addresses in iface.address_exist()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 13:28:17 +01:00
Joachim Wiberg 9226a4ac0d test/infamy: minor, whitespace + coding style
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 13:28:16 +01:00
Joachim Wiberg 9b83b82754 test: add dnsmasq and dhcpd to infamy container
Also, update docker/README, because after last confusing update I
couldn't follow my own instructions.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 13:28:16 +01:00
Joachim Wiberg a568f31309 confd: add support for dhcpv6 client
Basic DHCPv6 support as a per-interface ipv6 setting, not in line with
the IETF YANG model, which has this as a root container.

Note, this also fixes DHCPv4 option inference after the relocation of
/dhcp-client to /interfaces, in 764bd8e.

Fixes #1110

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 13:28:15 +01:00
Joachim WibergandGitHub 8ea9644c81 Merge pull request #1263 from kernelkit/misc
Misc fixes
2025-11-17 13:09:08 +01:00
Joachim Wiberg 5fd0cdbed0 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-17 11:27:36 +01:00
Joachim Wiberg d89283a14e doc: fix intra-document links
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-17 11:27:36 +01:00
Joachim Wiberg 25d220ee1f cli: add 'show boot-order' and 'set boot-order a b c' commands
Fixes #1032

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-17 11:27:35 +01:00
Joachim Wiberg 7348f5cab1 test: increase timeout for gre/vxlan tunnel-ttl
Send 10 pings, expect at least one.  The GRE test passes with two
received ICMP messages on the Styx test rig, while the VXLAN test
fails with -c 3, so try waiting a bit longer.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-17 11:27:35 +01:00
Joachim Wiberg 70c12c328c configs: enable MVEBU SafeXcel Crypto Engine 'minifw'
Used in Marvell Armada SOCs like the 37xx, 7k, 8k, and CN913x series.
Fixes the following kernel warnings:

[   16.074759] crypto-safexcel f2800000.crypto: Firmware load failed.
[   16.087330] crypto-safexcel f2800000.crypto: HW init failed (-2)
[   16.102696] crypto-safexcel f2800000.crypto: probe with driver crypto-safexcel failed with error -2

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-17 11:27:34 +01:00
Joachim WibergandGitHub 3fe6d617af Merge pull request #1262 from kernelkit/kernel-upgrade-4f1d25b4-7675-4b7a-8ecd-09382a88fc09
Upgrade to kernel 6.12.58
2025-11-16 19:30:05 +01:00
Mattias WalströmandGitHub 93bf42d85a Merge pull request #1264 from kernelkit/add-emmc-extras
bpi-r3: uboot: add extra eMMC commands
2025-11-15 16:26:55 +01:00
Mattias Walström b98b8b57ee bpi-r3: uboot: add extra eMMC commands
expose mmc bootpart e.g.
2025-11-15 14:46:24 +01:00
Joachim WibergandGitHub 72edfcd242 Merge pull request #1257 from kernelkit/test-netconf
Fix NETCONF backend in Infamy to propagate RPC errors

[skip ci]
2025-11-15 14:32:41 +01:00
Joachim WibergandGitHub 51d302361e Merge pull request #1261 from kernelkit/update-bpi-r3-readme
bpi-r3: Update README

[skip ci]
2025-11-15 13:35:44 +01:00
ael-bot 114ad5ab9d Upgrade Linux kernel to 6.12.58 2025-11-15 12:01:12 +00:00
Mattias Walström 154393d2dd bpi-r3: Update README
* Correct switch modes for NAND
* Remove bootbus
2025-11-15 11:52:04 +01:00
Joachim WibergandGitHub 488562d485 Merge pull request #1260 from kernelkit/fix-kernel-update-script
kernel-upgrade: Fix when a linux update already exist.

[skip ci]
2025-11-15 11:39:02 +01:00
Mattias Walström 7f7eecaaeb kernel-upgrade: Fix when a linux update already exist.
In this case, it should just be replaced.
2025-11-15 10:26:41 +01:00
Joachim Wiberg 47f0917660 test: fix NETCONF backend to propagate RPC errors
The put_config() retry loop was catching and printing RpcError
exceptions but never re-raising them after exhausting retries.
This caused tests to silently continue despite configuration
failures, masking validation errors.

Now properly propagates errors after all retries are exhausted,
matching the error handling behavior of the RESTCONF backend.

Fixes #1250

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-14 08:16:01 +01:00
Joachim WibergandGitHub 00f20612f2 Merge pull request #1240 from kernelkit/bananapi-emmc
Bananapi eMMC support
2025-11-14 06:02:05 +01:00
Joachim WibergandGitHub dba3a0b848 Merge pull request #1254 from kernelkit/ospf-fixes
Improvements to OSPF and BFD operational data and CLI commands
2025-11-13 12:47:37 +01:00
Joachim Wiberg baf554248d board/aarch64: update bpi-r3 readme
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-13 00:05:19 +01:00
Joachim Wiberg 612ef6e557 doc: update ChangeLog with OSPF, BFD, and CLI changes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:59:54 +01:00
Joachim Wiberg 101185934b cli: use infintive form of verb, interfaces -> interface
We use the infinitive, or basic form, in configure context, as do most
other network vendors, so let's do the same in admin exec context.

Also, drop the 'name' qualifier, it is not needed in configure context
so we shouldn't have to use it in admin exec either.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:59:54 +01:00
Joachim Wiberg 4b45fffc5f cli: add missing ipv6 commands available already for ipv4
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:59:53 +01:00
Joachim Wiberg fc0567e0ca cli: consolidate 'show [ip|ipv6] route' commands
In an effort to consolidate and use familiar command paths for our most
common commands, let's follow suite with Cisco, vtysh, et al.

Add deprecation warning to legacy 'show route [ip|ipv6]' command.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:59:53 +01:00
Joachim Wiberg 7859611359 test: update unit test reference json, a lot more data now
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:59:52 +01:00
Joachim Wiberg f135202b40 .github: update workflow to build emmc image for bpi-r3
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:40:31 +01:00
Joachim Wiberg 95cd83542a utils: add support for generating both sdcard and emmc images
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 23:07:59 +01:00
Joachim Wiberg 77de4d749a confd: add support for configuring ospf interface priority
Since we just un-deviated this node to be able to create operational
data for ospf interfaces, we should also allow users to set it.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 22:28:19 +01:00
Joachim Wiberg f79c0ee903 statd: extend ospf operational data to replace vtysh commands in cli
Collect more data from FRR to the OSPF and BFD operational datastore.
Refactor CLI commands to use the YANG datastore instead of vtysh.

Additionally, the BFD command(s) have been moved to the top level of
admin-exec, which is where vtysh has them.

Finally, preparing for future OSPFv3 support, all commands have been
given a new context under 'show ip ospf'.  Deprecation warnings have
been added to the existing 'show ospf' commands.

Also, for consistency, all commands names in plural have been changed to
their singular form: routes -> route, interfaes -> interface, etc.  This
is what vtysh, Cisco, and others do as well.

Fixes #1190

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 22:28:18 +01:00
Joachim Wiberg b1f83e5ce7 confd: add must expression to verify ospf backbone is not nssa/stub
Silently drop any area-type setting for ospf backbone in a migrate
script to prevent any field issues after upgrading to this fix.

Fixes #1247

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-12 22:28:18 +01:00
Joachim WibergandGitHub 57ec2dcbc0 Merge pull request #1249 from kernelkit/releng 2025-11-08 20:55:03 +01:00
Joachim Wiberg 94fa7ea21c .github: drop rootfs.squashfs from release tarballs
Release tarballs waste ~131MB per architecture by including both
rootfs.itb and rootfs.squashfs, even though rootfs.itb already
contains the squashfs (itb = 4096-byte header + squashfs).

This change removes rootfs.squashfs from releases and provides two
solutions for users who need it:

1. utils/extract-squashfs.sh - Full-featured utility for extracting
   squashfs from release tarballs or .itb files. Includes validation
   and helpful error messages.

2. board/common/qemu/qemu.sh - Auto-extraction support. When running
   in initrd mode, automatically extracts rootfs.squashfs from
   rootfs.itb if missing. Zero user impact - ./qemu.sh just works!

Space savings: ~262MB per release (2 architectures × 131MB)

Fixes #858

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-08 12:57:35 +01:00
Joachim Wiberg 7a6b1ea311 .github: only set latest tag on .0 releases
Prevent patch releases from stealing the "latest" tag from newer minor
versions. Only vXX.YY and vXX.YY.0 releases should be marked as latest.

Fixes #1187

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-08 12:57:35 +01:00
Joachim Wiberg 5c08c48521 .github: trim down release tarballs
Collect only the most relevant info for SBOM. The CycloneDX format seems
to be what most tools are standardizing around, and they suggest saving
manifest.csv and cpe.json files.  This commit includes all *.csv files
and drops sources and licenses for release builds, as decided in #1192

Fixes #1217 resolves #1192

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-08 12:57:34 +01:00
Mattias Walström 27073033e3 bpi-r3: Document eMMC flashing and booting with Infix 2025-11-07 21:15:56 +01:00
Mattias Walström 42195d7394 bpi-r3: Build device tree for eMMC version 2025-11-07 21:15:56 +01:00
Mattias Walström a1b5e3b63b bpi-r3: Add eMMC bootloader 2025-11-07 21:15:55 +01:00
Joachim WibergandGitHub 102e13a412 Merge pull request #1248 from kernelkit/pre-build-followup
buildroot: restore bump to 2025.02.7
2025-11-07 18:10:53 +01:00
Joachim Wiberg 5c71e6f34f buildroot: restore bump to 2025.02.7
In bf2e739 a downgrade of Buildroot to 2025.02.6 was mistakenly merged,
this commit restores the submodule to the git revision prior to that,
Buildroot 2025.02.7-kkit, with KernelKit backports and upgrades.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 17:06:55 +01:00
Joachim WibergandGitHub 0a31770071 Merge pull request #1246 from kernelkit/gre-plus-plus
Add TTL, ToS/DSCP, and PMTU Discovery configuration to tunnels
2025-11-07 15:54:19 +01:00
Joachim WibergandGitHub bf2e739a0e Merge pull request #1239 from kernelkit/ci-improvements
CI: Allow upstream caller to run pre build script

[skip ci]
2025-11-07 15:20:03 +01:00
Joachim Wiberg 461d8b7e08 doc: update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 14:46:56 +01:00
Joachim Wiberg e49f9adca4 test: new test, verify TTL on GRE/VXLAN tunnels
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 14:46:55 +01:00
Joachim Wiberg eb1daf0ecd test: minor, cleanup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 14:46:55 +01:00
Joachim Wiberg a76b1adc1e confd: enable IFF_MULTICAST on GRE tunnel interfaces
Required for protocol daemons like ospfd to join multicast groups.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 14:46:54 +01:00
Joachim Wiberg 777650bbca confd: add tunnel ttl, tos, and pmtu-discovery settings
Adds support for configuring TTL, ToS/DSCP, and Path MTU Discovery
on GRE and VXLAN tunnels. TTL defaults to 64 instead of inherit to
prevent issues with routing protocols like OSPF that use TTL=1.

Refactors tunnel YANG models by merging local-remote into a unified
tunnel-common grouping for cleaner organization.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 14:46:54 +01:00
Joachim WibergandGitHub f45344d859 Merge pull request #1245 from kernelkit/silence-rpi4
rpi-4: Remove product specific gen-interfaces file
2025-11-07 12:33:41 +01:00
Joachim Wiberg 0b8e5108a8 doc: refresh tunnel documentation, add ospf example
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 08:43:50 +01:00
Joachim Wiberg e634e945e9 doc: shorten ps1 in examples with …
Many of the example prompts used in the documentation are very long and
do not fit in generated documentation (web/pdf).  This is a proposal to
shorten them, sometimes significantly, by keeping only the start and end
of an xpath, replacing everything in between with '/…/'.

This is a feature that also could be added to the klish-plugin-sysrepo
to improve usability.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-07 08:43:49 +01:00
Mattias Walström 16d53e1ce4 rpi-4: Remove product specific gen-interfaces file
This could not have worked, it is a read-only filesystem, and
it should not be there since rpi-4 has it's own factory-config.

This fix #1191
2025-11-07 08:38:32 +01:00
Mattias WalströmandGitHub 85da67ad98 Merge pull request #1243 from kernelkit/allow-tests-to-fail
test: imfamy: Allow broken images
2025-11-06 21:31:39 +01:00
Joachim WibergandGitHub 764bd8ef66 Merge pull request #1223 from kernelkit/migrate-dhcp-client
Relocate /dhcp-client to /interfaces/interface/ipv4/dhcp
2025-11-06 20:03:12 +01:00
Joachim WibergandGitHub f01291b050 Merge pull request #1242 from kernelkit/fix-check-kernel-update-workflow
workflow: update-kernel: Only run on kernelkit/infix

[skip ci]
2025-11-06 20:02:43 +01:00
Joachim Wiberg 80e8ccf273 confd: fix inference from CLI, follow-up to ed235583
The callback refactoring forgot to call ietf_interfaces_cand_init(),
breaking inference of interface types and DHCP client options.

Also fixes UPDATE event handling for ietf-keystore and infix-meta.

Fixes #1244

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-06 17:42:39 +01:00
Joachim Wiberg 15a6f69e03 confd: drop 'enabled' node from IPv4 autoconf container
Neither the IPv6 autonconf container, nor the recently moved DHCP client
container have an 'enabled' flag.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-06 16:36:57 +01:00
Joachim Wiberg 7f555fd2bd confd: relocate /dhcp-client to /interfaces/interface/ipv4/dhcp
Please note, this change drops not only the global enabled flag, but also the
per-interface enabled flag, converting it to a presence container.  The name
of the container is also shortened from dhcp-client -> dhcp.  A pattern that
expected to be reused also for the DHCPv6 client.

Fixes #1109

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-06 16:36:56 +01:00
Mattias Walström 357950b782 test: imfamy: Allow broken images
If ping succeed but fail to check if netconf port is open,
the testsystem will hang forever.

This will allow totally broken images to be loaded at the device.
2025-11-06 13:39:52 +01:00
Mattias Walström c563a7caeb workflow: update-kernel: Only run on kernelkit/infix
[skip ci]
2025-11-06 10:22:21 +01:00
Tobias WaldekranzandGitHub 20673c3a84 Merge pull request #1236 from kernelkit/recopy
bin: copy: Fix various resource leaks introduced by refactor
2025-11-06 09:26:00 +01:00
Joachim Wiberg 5496258e54 confd: minor, silence libyang warning when built w/o containers
Silence confd[3582]: libyang[0]: Invalid argument ctx_node (lyd_find_xpath())
warning in syslog.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-06 09:08:22 +01:00
Joachim WibergandGitHub 0328700afb Merge pull request #1232 from kernelkit/boot-warnings2
Fixes to misc. boot warnings
2025-11-06 08:13:00 +01:00
Tobias Waldekranz e718644112 board/common: mksshkey: Clean up stray temporary file 2025-11-06 08:03:55 +01:00
Tobias Waldekranz f83fbc6105 bin: copy: Fix various resource leaks introduced by refactor
Thanks coverity! <3

Fixes: d26e311c6d ("bin: copy: Refactor")
2025-11-06 08:03:49 +01:00
Joachim Wiberg f08947092b confd: fix update of /cfg/startup-config.cfg
Follow-up to ed23558

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-05 20:41:59 +01:00
Joachim Wiberg 33999ceebc confd: fix annoying warning in log
This fixes the annoying libyang warning after commit da29771.

    confd[3375]: libyang[0]: Invalid argument ctx_node (lyd_find_xpath()).

This happens when the diff is used in the wrong event when it is NULL.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-05 20:41:58 +01:00
Joachim Wiberg 79ad653150 confd: minor coding style fixes and refactoring
Collapse, simplify, and break up ietf_keystore_change() into multiple
functions.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-05 20:41:58 +01:00
Joachim Wiberg b38e13a08a board/common: check if partition/LABEL is available
Check if partition/LABEL is available before trying to run tune2fs and
mount commands on it.  This change masks the kernel output:

    LABEL=var: Can't lookup blockdev

commne when running `make run` on x86_64 builds.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-05 20:41:57 +01:00
Joachim Wiberg 04c86478c3 board/common: fix boot warnings, follow-up to 45efa94
In 45efa94 we introduced new mount options for the: 'aux', 'cfg', and
'var' partitions.  To save boot time, we also disabled the periodic fsck
check, which does not affect journal replay or other Ext4 safety or
integrity checks.  The latter involved calling tune2fs at runtime, but
this caused the following to appear for the 'aux' partition, which is a
reduced ext4 for systems that need to change U-Boot settings, e.g., to
set MAC address on systems without a VPD.

   EXT4-fs: Mount option(s) incompatible with ext2

Note, this is a "bogus" warning, setting the fstypt to ext2 in fstab is
not the way around this one.  That's been tried.

To make matters worse, the new mount option(s), e.g., 'commit=30', gave
us another set of warnings from the kernel.  This was due to the fstype
being 'auto', so the kernel objected to options not being applicable to
every filesystem it tried before ending up with extfs:

    squashfs: Unknown parameter 'commit'
    vfat: Unknown parameter 'commit'
    exfat: Unknown parameter 'commit'
    fuseblk: Unknown parameter 'commit'
    btrfs: Unknown parameter 'errors'

This commit explicitly sets cfg and var to ext4, leaving mnt as auto, we
also check before calling tune2fs that the partition/disk image is ext4.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-05 20:41:57 +01:00
Joachim Wiberg 9c220d8a51 board/common: utilize new finit-style logging for factory reset
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-05 20:41:56 +01:00
Mattias WalströmandGitHub 7ea340d6fd Merge pull request #1238 from kernelkit/gns3-fixes
Improve bump-gns3.py error handling and usage text
2025-11-04 21:50:18 +01:00
Joachim Wiberg 9df64f163c utils: improve bump-gns3.py error handling and usage text
Split download and MD5 computation into separate functions for clarity.
Add proper error handling for HTTP 404 and network errors. Improve help
text to mention appliances/ directory location.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-04 15:07:48 +01:00
Richard Alpe 0b8d3307db .github: allow upstream caller to run pre build script
Allow a workflow caller to run pre-build scripts though a workflow
call variable. This is potentially dangerous as code can be injected
here. If for example a malicious actor wants to run there C2 code in
the context of someone else they could perhaps inject it here. I
assume this is protected by the same mecahism as the workflow files
themself. I.e. github users untrusted to the Infix org won't be able
to trigger workflows before being explicitly allowed to do so.

This patch also adds a checkout secret. This allows upstream callers
to fetch there own spin / fork though the infix workflows, if they
provide a checkout token with the correct permissions to do so.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-11-04 10:12:49 +01:00
Mattias WalströmandGitHub 543ecb3768 Merge pull request #1234 from kernelkit/improve-kernel-upgrade
CI: Improve check for new kernel
2025-11-03 16:34:38 +01:00
Mattias Walström 0fde346a43 CI: Improve check for new kernel
Improve the script to be able to run in workflow and fix
the worflow and run each night.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
2025-11-03 16:01:32 +01:00
Mattias WalströmandGitHub 966fb48ef2 Merge pull request #1196 from saba8814/furl-refactoring
refactor Furl() as a plain function
2025-11-03 15:11:17 +01:00
Ejub Sabic 51d5ae4540 Refactor Furl into general curl
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2025-11-03 15:10:09 +01:00
Mattias WalströmandGitHub 26c005f498 Merge pull request #1235 from kernelkit/kernel-upgrade-4868c760-a6f5-4534-829b-401bd6b5363b
Upgrade to kernel 6.12.57
2025-11-03 12:26:18 +01:00
ael-bot a832dfe57b Upgrade Linux kernel to 6.12.57 2025-11-03 09:09:54 +00:00
Joachim WibergandGitHub 4b3ee0fa5e Merge pull request #1222 from kernelkit/xpi-boot-time 2025-11-02 08:33:00 +01:00
Joachim Wiberg 06a4995a13 doc: prepare next release cycle in ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-01 23:13:19 +01:00
Joachim Wiberg 45efa9484e board/common: speed up mounting and boot
Reduce /var image size to 128M (resized at first boot anyway) and tune
mke2fs options for faster mounting.  Set ext4 'uninit_bg' feature and
use '-m 0 -i 4096' extraargs in genimage to optimize filesystem creation
and reduce overhead.  The genimage tool has several tweaks enabled by
default already, the 'uninit_bg' feature speeds up the time to check
the file system.

Disable periodic fsck with tune2fs at boot while keeping safety checks
intact.  Adjust mount options in fstab to reduce journal syncs and
improve boot time.

Fix severe performance regression in find_partition_by_label() that was
calling sgdisk on every block device including virtual devices (ram, loop,
dm-mapper). This caused boot delays of up to 24 seconds on systems with
many block devices. Now skip virtual devices that don't have GPT tables,
reducing the delay to ~2 seconds.

Also clean up is_mmc() function to use cached result.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-01 23:05:19 +01:00
Joachim Wiberg b9e53e5721 board/common: minor fixes to new boot status print
Also, these comments got lost, helps a bit understanding what's going on.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-01 23:05:18 +01:00
Joachim Wiberg 1a0dbec571 utils: add support for downloading latest bootloader
This commit adds support to simplify sdcard.img generation by downloading the
latest bootloader build for a board from the 'latest-boot' release tag.  The
tarball is saved in dl/bootloader/ and is extracted to a temporary directory
in output/build/boot-$board-xxxx on every invocation of mkimage.sh.  This is
used for invoking genimage and bmaptool before copying the resulting images
to output/images/.  (If $O is set, it is used instead of output/, above).

New options:
 -d   Download latest bootloader build for the given board
 -f   Force re-download even if bootlaoder tarball existgs

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-01 23:05:18 +01:00
Mattias WalströmandGitHub 151d04a2dd Merge pull request #1221 from kernelkit/silence-confd 2025-11-01 17:59:25 +01:00
Mattias Walström 10ef03c971 confd: Remove debug prints 2025-11-01 16:57:49 +01:00
Mattias WalströmandGitHub f4fb2f4f84 Merge pull request #1220 from kernelkit/nanopi-boot 2025-10-31 23:21:45 +01:00
Joachim Wiberg c3b1c28551 configs: rename rpi4_boot to rpi64_boot for consistency
Align bootloader naming with the board name raspberrypi-rpi64.

[skip ci]

Signed-off-by: Claude <noreply@anthropic.com>
2025-10-31 23:14:37 +01:00
Joachim Wiberg 97d4068f68 board: raspberrypi-rpi64: rename SD card image from rpi4 to rpi64
Align the SD card image naming with the board name for consistency.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 22:57:37 +01:00
Joachim Wiberg 38bd71614f .github: add NanoPi R2S to list of supported boot laoders
Also, sort the list alphabetically.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 22:33:41 +01:00
Mattias WalströmandGitHub 8ffb15773d Merge pull request #1219 from kernelkit/rbf
Fix board paths in bootloader defconfigs
2025-10-31 21:12:19 +01:00
Joachim Wiberg 7b26f096fa configs: fix board paths in bootloader defconfigs
Update board paths to match the restructuring in commit ab56c1be.
Fixes rpi4, cn9130_crb, and aarch64_qemu bootloader builds.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 21:09:19 +01:00
Joachim WibergandGitHub f82534d828 Merge pull request #1216 from kernelkit/coverity-fixes 2025-10-31 18:18:46 +01:00
Joachim WibergandGitHub ed2355833e Merge pull request #1209 from kernelkit/confd-refactor-callbacks
Major refactor of how sysrepo callbacks is used in confd

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 17:49:53 +01:00
Joachim Wiberg 089b160029 confd: fix possible NULL pointer deref.
Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 16:59:30 +01:00
Joachim WibergandGitHub 75c25201ae Merge pull request #1215 from kernelkit/robustness
Add error handling to prevent interface query failures

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 16:16:36 +01:00
Joachim Wiberg f1f2c66934 statd: wifi: Add error handling to prevent interface query failures
Wrap wpa_cli operations in try-except blocks to ensure WiFi errors don't
cause sysrepocfg to fail.  Interface queries now return data for working
interfaces even when WiFi has issues.

Fixes:

    admin@rpi-79-41-1d:/> show interfaces
    Error running sysrepocfg: Command '['sysrepocfg', '-f', 'json', '-X', '-d', 'operational', '-x', '/ietf-interfaces:interfaces']' returned non-zero exit status 1.
    No interface data retrieved.
    admin@rpi-79-41-1d:/>

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 14:44:43 +01:00
Joachim WibergandGitHub 4b37474d8e Merge pull request #1214 from kernelkit/rpi-and-more
Board refactor, sensors and NanoPi R2S, RPi 3B + CM4 support

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 14:31:18 +01:00
Joachim Wiberg b1e08bd32f doc: update ChangeLog for v25.10 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:10 +01:00
Joachim Wiberg 2fa495b112 .github: cleanup podman state before each run
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:09 +01:00
Joachim Wiberg 02615be500 configs: rename BPi-R3 bootloader defconfig for consistency
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:09 +01:00
Joachim Wiberg daf8b29178 uttls/mkimage.sh: consolidate sdcard.img generation
This commit consolidates mkimage.sh scripts into a unified SD card image
creation tool that works for all boards.  It needs a bootloader an $ARCH
rootfs.squashfs image and a genimage.cfg.in template.

- Detects build directories from `O=` environment variable or `output/`
- Sources `.config` to discover Buildroot paths
- Uses Buildroot's `support/scripts/genimage.sh` when available
- Automatically generates `.bmap` files if `bmaptool` is available
- Fallback to direct `genimage` invocation if wrapper not found

See the online instructions for usage.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:09 +01:00
Joachim Wiberg 24755e7e5f board/aarch64: add broken-flow-control interface quirk
Add new interface quirk to allow skipping disabling of flow control on
all RPi 3B/4B devices that have the smsc95xx driver.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:08 +01:00
Joachim Wiberg 4b55e38741 board/aarch64: use %m modifier in default xPi hostnames
The xPi's usually don't have a VPD so the chassis mac-address probed at
boot is usually null in /run/system.json.  This commit adds a fallbkack
mechanism to populate this field so it can be used for unique hostnames
even on these boards.

Ths ietf-hardware.yang model does not have a notion of physical address,
so we augment one tht is generic enought to be used for other hardware
components than Ethernet, similar to what ietf-interfaces.yang use.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:08 +01:00
Joachim Wiberg c66c0b46b5 board/aarch64: update BPi-R3 factory-config
- Enable bridging of LAN ports in br0, default IP: 192.168.0.1/24
- Enable firewall with two zones: 'wan' and 'lan', policy: lan-to-wan
- Enable DHCP server on br0

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:07 +01:00
Joachim Wiberg 7784e68347 board/aarch64: bump NanoPi R2S to tier 2 status
This commit drops the board specific defconfig in favor of proper BSP
support for the FriendlyARM NanoPi R2S to Infix as part of the default
Aarch64 build.

The name FriendlyARM was elected over FriendlyELEC ("new" name) to be
consistent with both kernel and Buildroot naming standards.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:07 +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 8af593707a Rename raspberry-pi-4 -> raspberry-pi64
With the additional support for RPi3, including Zero 2W, this commit renames
all relevant directories and Config.In options to match.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:06 +01:00
Joachim Wiberg 20d09febeb test: fix container-upgrade $ARCH mapping on Aarch64 systems
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:05 +01:00
Joachim Wiberg 921c4c809d test: update mock data for 'show hardware'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:05 +01:00
Joachim Wiberg d1fda087ec statd: refactor, use parent node for sensor relationships
For more advanced hardware with multiple sensor types per device
(e.g., SFP modules with temperature, voltage, current, and power
sensors), use the YANG parent/child relationship to group related
sensors together for better presentation.

Changes:
 - Remove parent/parent-rel-pos deviations from infix-hardware.yang
 - Create parent components (class: module) for multi-sensor devices
 - Add parent references to child sensor components
 - Add human-readable descriptions from hwmon labels
 - Extend hwmon discovery to support voltage, current, and power
 - Normalize sensor names: strip vendor prefixes (mt7915_phy0 -> phy0)
 - Remove redundant TYPE column, clarify units (V -> VDC, add spaces)
 - Simplify child sensor display by stripping parent prefix
 - Fix "show system" to only show CPU temperature and fan speed

Example output from "show hardware":

  NAME                     VALUE               STATUS
  ===================================================
  sfp1:
    Rx Power               0.000 W             ok
    Tx Power               0.001 W             ok
    Vcc                    3.35 VDC            ok
    Bias                   0.006 A             ok
    Temperature            30.3 °C             ok

  sfp2:
    Rx Power               0.000 W             ok
    Tx Power               0.001 W             ok
    Vcc                    3.34 VDC            ok
    Bias                   0.006 A             ok
    Temperature            32.0 °C             ok

  cpu                      42.8 °C             ok
  phy0                     47.0 °C             ok
  phy1                     53.0 °C             ok

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:04 +01:00
Joachim Wiberg 46919e2d1f statd: add chassis information to ietf-hardware.yang
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:04 +01:00
Joachim Wiberg 08c9c97823 confd: add system resource usage to ietf-system.yang
This commit adds resource usage: memory, loadavg, and filesystem usage
by augmenting ietf-system:/system-state.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:03 +01:00
Joachim Wiberg 8b10cce172 confd: add support for temperature sensors in ietf-hardware.yang
- Remove class deviation to allow iana-hardware:sensor
 - Populate sensor operational data from /sys/class/thermal
 - Extend 'show hardware'

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:03 +01:00
Joachim Wiberg ee6def793c cli: add 'reboot' option to upgrade command
Usually, when upgrading a system, you want to reboot it so the upgrade
takes effect.  This commit adds a 'reboot' option/flag, alongside the
'force' option, to facilitate this.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:02 +01:00
Joachim Wiberg ee37a19ab0 cli: add support for admin-exec 'show system' overview
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:02 +01:00
Joachim Wiberg 3265f46990 board/aarch64: ensure dwc2 controller is in host mode
The DWC2 controller is a very common IP block in ARM and RiscV SoCs.  With the
USB subsystem back to a built-in we can now enable host mode for the DWC2 (USB
2.0) ports on RPi.  It also opens up for merging the NanoPi R2S into the
generic aarch64 build.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:02 +01:00
Joachim Wiberg e39b9cfee4 board/common: allow resizing /var on any mmc block device
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:01 +01:00
Joachim Wiberg db06ddb93b board/common: move resize2fs of /var to after reboot
On some boards, and in particular with a hybrid mbr/gpt partition table,
like on the RPi64, we must resize ext *after* reboot.

Also, do some cleanup and consolidation of error handling to prevent us
from entering an endless boot loop.

Follow-up to 391e9715

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:01 +01:00
Joachim Wiberg 6aaf612095 board/common: simplify USB port discovery and fix duplicate entries
This commit refactors USB port probing to:

- Eliminate duplicates: previously, 'authorized' and 'authorized_default'
  were listed as separate USB port entries (confusing).  Now each USB
  port is represented once, with the path pointing to the USB device
  directory, confd appends the appropriate attribute file as needed

- Add support for Raspberry Pi 4B and CM4 USB port(s) using a generic
  discovery function that scans /sys/bus/usb/devices for USB root hubs.
  This should work seamlessly across all platforms

- For backwards compatibility and better UX:
   - Single USB port systems: Named "USB" (no number)
   - Multi-port systems: Named "USB1", "USB2", etc.

- Device tree-based discovery is tried first (for boards like Alder with
  explicit DT USB port definitions), with fallback to generic discovery
  for boards without DT

Fixes: #315

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:00 +01:00
Joachim Wiberg 54d88cc00e Support for Compute Module 4 IoT Router Broad Mini
This commit adds support for the Raspberry Pi CM4 based mini DFRobot IoT
Router board, SKU:DFR0767.  It comes with an additional RTL8111 PCIe NIC
hence the addidtional kernel module and firmware.  The latter fixes:

r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168h-2.fw failed with error -2
r8169 0000:01:00.0: Unable to load firmware rtl_nic/rtl8168h-2.fw (-2)

Please note, the change in BCMGENET from module to built-in is to ensure
it is probed before any PCIe NIC, both this board and the CM4-based NVME
NAS base board enumerate the built-in MAC as eth0.

Also, unlike the RPi 3B/4B, it is not a given fact that a CM4 based board
comes with WiFi onboard, and since most compute module setups are DYI, we
take the easy way out and leave it as an exercise to the user to add WiFi
interface to the config.

https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:00 +01:00
Joachim Wiberg 9b057ad547 Support for Raspberry Pi 3B (BCM2837)
The BCM2837 core is used not just in the RPi 3B but also in the Zero 2W,
both device trees have been added to the board config.

The BCM2711 support has been extended to include RPi 400 and CM4 I/O.

To support the BCM2837 family more firmware options habe been enabled,
since the RPi3 does not have bootcode.bin flashed in the SoC.  The SD
card image now uses a hybrid GPT/MBR format so the RPi3 bootcode.bin
can read all files from the first VFAT partition.

The default device tree for Linux is now chosen by the U-Boot probe and
the only exception is the "laundry room" detector that looks for a RPi4
with a 7" touch screen, which then selects the DSI enabled RPi4 variant.
This is enough to properly load an RPi 3B and a CM4 based router board.

The BCM2837 does not have PCI/PCIe or a built-in MAC so it relies on the
USB to Ethernet LAN78xx which does not support disabling pause frames.
I have opted for checking for EOPNOTSUPP instead of adding yet another
quirk, because it is likely to be a common limitation of more drivers
and chipsets, and this code is best-effort anyway.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:25:59 +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 804fd1e08e statd: fix "show firewall" crash if no zone description
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:25:58 +01:00
Joachim WibergandGitHub eb829afb93 Merge pull request #1213 from kernelkit/copyright
Right some wrongs with `copy`

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 12:44:48 +01:00
Mattias Walström a280960d47 kernel-upgrade: Improve error handling 2025-10-31 09:47:37 +01:00
Mattias Walström 98b30d7d45 confd: Remove core hooks
Not needed anymore, the configuration change is sequential in change_cb.
2025-10-30 13:14:49 +01:00
Mattias Walström 5cdcf1f4fe confd: Add support for dependency tracking between modules
Sysrepo lack the functionallity for if change in model A also
should demand actions of model B. Previous we have handled this by
having callbacks for keystore changes in for example infix-services
to be able to reconfigure SSH on asymmetric key changes.

This commit instead add a pass where dependencies are found and added
to the diff.
2025-10-30 13:14:49 +01:00
Mattias Walström da29771398 confd: Refactor how sysrepo callbacks are handled
Sysrepo only care about model changes, but we want the system
configuration. Therefore add a common callback for all modules
and handle dependencies between the modules, if someone should be
run before another for example.
2025-10-30 12:28:03 +01:00
Mattias Walström 021e864a6f all.yaml: meta/bootorder.py needs to be run after ietf-system (where upgrade resides)
To verify the bootorder is still valid after that part of the suite has run.
2025-10-30 12:28:02 +01:00
Mattias Walström 9aba65e14b test: ntp: Make NTP tests more robust 2025-10-30 12:28:00 +01:00
Mattias Walström 489487be16 test: syslog: Make syslog/remote test more robust 2025-10-29 22:05:29 +01:00
Mattias WalströmandGitHub aad3f83a6a Merge pull request #1212 from kernelkit/kernel-upgrade 2025-10-29 16:40:36 +01:00
Tobias Waldekranz 0977ab476b bin: copy: Always get startup from sysrepo
This will make sure to apply NACM rules for all the data. It also
makes it possible for a luser access a subset of the data, even if
they to do not have read access to /cfg/startup-config.cfg.
2025-10-29 16:36:04 +01:00
Tobias Waldekranz d26e311c6d bin: copy: Refactor
copy() made some...creative...use of control flow that made it quite
difficult to follow.

Take a first priciples approach to simplify the logic.
2025-10-29 16:36:03 +01:00
Tobias Waldekranz 11cf4ddda9 bin: copy: Add a rudimenary test script
Add a simple script that verifies all the common use-cases of copy.
2025-10-29 16:35:56 +01:00
Mattias Walström b5b35e7615 Update developers guide on howto upgrade Linux kernel 2025-10-29 15:30:10 +01:00
Mattias Walström bb274dcdd7 Automate kernel updates to new minor version
This will fix #1106, in time, but only allows manual trigger for now,
needs more test and verification

utils/kernel-upgrade.sh at least automate all the manual manual processes
for upgrading the kernel.
2025-10-29 15:24:35 +01:00
Mattias Walström 483ee14dbe Upgrade Linux kernel to 6.12.56 (LTS) 2025-10-29 15:11:22 +01:00
Joachim WibergandGitHub 9d271eb7c6 Merge pull request #1033 from kernelkit/yang-add-services
Add new operational support for services

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-29 09:59:33 +01:00
Joachim WibergandGitHub b72fb8fc7d Merge pull request #1211 from kernelkit/misc-fixes 2025-10-28 20:43:19 +01:00
Joachim Wiberg 7e37fc49a3 confd: prevent IP addresses on bridge ports
Bridge ports should not have IP addresses configured. The IP address
should be configured on the bridge interface itself, not its member ports.

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

Fixes #1122

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-28 19:35:32 +01:00
Joachim Wiberg cb5d804a88 confd: add dhcp-server validation of address pool and/or static host
A valid DHCP server setup for a subnet is one of pool and/or at least one
static host entry/lease.  If pool is enabled the pool must have a start
and an end address.

To allow setting up a DHCP server with no pool and at least one static host
entry/lease, we make the pool a presence container, otherwise the pool will
always be set and trigger the below inference.

When an interactive CLI/Web user enables the address pool we infer a default
range .100-.250, but only for /24, C-class networks.  This is what most users
know and expect.

The YANG model now validates that:
- If an address pool is created, both start-address and end-address must be set
- Each subnet must have either a pool or at least one static host entry
- The pool container is now a presence container, so "no pool" fully deletes it

Fixes #1121

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-28 19:34:53 +01:00
Joachim Wiberg d80186a556 test/docker: security analysis of GHSA-cq46-m9x9-j8w2 for scapy
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-28 17:31:32 +01:00
Joachim Wiberg f8e62fb8df patch/libyang: follow-up to 77963d5, fix wrong arguments to LOGDBG()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-28 17:31:31 +01:00
Joachim Wiberg a5fc2f797b .github: add free-disk-space action to generic x86_64 workflow
Addresses disk space issues in GitHub Actions for generic x86_64 builds
by removing unused tools (Android SDK, .NET, Docker images, etc.) before
the build starts.  This frees up ~30GB of space.

Fixes #1210

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-28 17:31:31 +01:00
Richard Alpe b6d7e4f24e test: add unit tests for system services
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-10-28 16:59:08 +01:00
Richard Alpe cc86463233 confd: use keyless services list, allow duplicate PIDs
Multiple services can have PID 0 when stopped/done, making PID
unsuitable as a unique key. There could also be multiple services with
the same name (I would assume?).

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-10-28 15:35:44 +01:00
Richard Alpe 3870bd562a cli: add new show services command
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-10-28 15:14:06 +01:00
Richard Alpe 99dd268682 cli-pretty: add pretty printing of system services
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-10-28 15:03:57 +01:00
Richard Alpe d457d43753 show: add system services command
Add the command show system services.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-10-28 15:02:05 +01:00
Richard Alpe c119436f97 confd: augment new services container to ietf-system
This patch adds operational data support for system services. The
data is in a generic format but is intended to be able to represent
finit information (initctl) nicely.

The reason for augmenting this to ietf-system and not to
infix-services is that we consider this generic system information
which is totally disconnected from what ever services infix might
provide.

In this first state we only support pid, name, description and state.
Making the data look something like:

  "infix-system:services": {
    "service": [
      {
        "pid": 1185,
        "name": "udevd",
        "status": "running",
        "description": "Device event daemon (udev)"
      }]

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-10-27 15:30:29 +01:00
Mattias WalströmandGitHub 3384507040 Merge pull request #1208 from kernelkit/coverity-fixes 2025-10-25 17:32:45 +02:00
Joachim Wiberg b7d91e4747 bin: fix Coverity Scan issues in copy command
Address two issues identified by Coverity Scan:

1. CID 550484 (TOCTOU): Remove access() check before realpath()
   - realpath() already fails if file doesn't exist, making the
     access() check redundant and introducing a TOCTOU race
   - Simplifies code while improving security

2. CID 550483 (CHECKED_RETURN): Mark unchecked remove() calls
   - Add (void) cast to two remove() calls to explicitly indicate
     we don't care about the return value
   - These are cleanup operations for temp files where failure
     is acceptable, even expected

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-25 08:10:30 +02:00
Tobias WaldekranzandGitHub 171b757acb Merge pull request #1206 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.55 (LTS)
2025-10-23 22:17:25 +02:00
Mattias Walström 2903f6f472 Upgrade Linux kernel to 6.12.55 (LTS) 2025-10-23 21:07:10 +02:00
Joachim WibergandGitHub 18d177328d Merge pull request #1151 from kernelkit/recontain
Container Lifecycle and Upgrade Improvements

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 18:04:01 +02:00
Joachim Wiberg f081bef3ba doc: update changelog with fixes and new features
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:24:01 +02:00
Joachim Wiberg ef73ec6ce8 doc: explain docker image tags and rewrite upgrade section
Much of the content was made obsolete by recent changes, we now optimize
the experience for users, avoiding recreate at boot unless checksums for
configuration or base image have changed.

This was also a good time to explain the difference between mutable and
immutable tags, which sometimes is a cause for great confusion.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:24:00 +02:00
Joachim Wiberg ff175c02f7 doc: add section on container volume management
Since there is no safe way (unique hash/id) to identify unused named
volumes, we cannot automate removal of them.  Since volume data, when
compared to a container image, is quite small, it was decided that we
document this instead.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:24:00 +02:00
Joachim Wiberg 21256a8ac1 bin: add bash completion for copy command
Add bash completion for the common datastores, like we already do in the
CLI, and update the usage text accordingly.

Also, make sure to install to /usr/bin, not /bin since we've now merged
the hierarchies since a while back.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:59 +02:00
Joachim Wiberg 3e03ece1d9 cli: sanitize regular file to file copy
The regular file-to-file copy, was missing calls to cfg_adjust(), this
commit fixes that and adds some helpful comments for each use-case.

Also, drop insecure mktemp() in favor of our own version which uses the
basename of the remote source file.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:59 +02:00
Joachim Wiberg ad96965b16 cli: restrict copy and erase commands
This is a follow-up to PR #717 where path traversal protection was
discussed.  A year later and it's clear that having a user-friendly
copy tool in the shell is a good thing, but that we proably want to
restrict what it can do when called from the CLI.

A sanitize flag (-s) is added to control the behavior, when used in the
shell without -s, both commands act like traditional UNIX tools and do
assume . for relative paths, and allow ../, whereas when running from
the CLI only /media/ is allowed and otherwise files are assumed to be
in $HOME or /cfg

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:59 +02:00
Joachim Wiberg 92e80b4239 cli: fix copy to missing startup-config file
Fixes #981

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:58 +02:00
Joachim Wiberg e6a04fbd95 cli: add 'validate', or '-n', dry run to copy command
This commit adds config file validation to the copy command, discussed
in #373.  Allowing users to test their config files before restoring a
backup.  The feature could also be used for the automatic rollback when
downgrading to an earlier version of the OS.

Fixes #373

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:58 +02:00
Joachim Wiberg 3b24fab324 cli: fix 'copy FILE running-config' use-case
When copying to the running datastore we cannot use sr_copy_config(),
instead we must use sr_replace_config().  This fix covers both the case
of 'copy startup-config running-config' and 'copy FILE running-config'.

Fixes #1203

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:57 +02:00
Joachim Wiberg ce8dc0de9c test: update firewall/basic topology and doc
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:57 +02:00
Joachim Wiberg 9273f4cd1e test: remove redundant container_ prefix from test directories
Rename test directories in infix_containers/ to remove the redundant
'container_' prefix since they already live under infix_containers/:

  container_basic          -> basic
  container_bridge         -> bridge
  container_enabled        -> enabled
  container_environment    -> environment
  container_firewall_basic -> firewall_basic
  container_host_commands  -> host_commands
  container_phys           -> phys
  container_veth           -> veth
  container_volume         -> volume

Also update references in all.yaml and Readme.adoc files.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:56 +02:00
Joachim Wiberg 905df0dab7 test: verify container upgrade
This commit adds four (small) container images to the Infamy test container
which are used in the new container upgrade test.  The test verifies that a
mutable container can be upgraded and that old images are properly cleaned
up from the container store.

Fixes #624

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:56 +02:00
Joachim Wiberg 640a47bceb test: add support for 'make V=1 test-spec' to debug
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:56 +02:00
Joachim Wiberg 671fc93ce0 confd: add support for upgrade action (rpc)
Already supported in the CLI.  This makes it official, and quite handy
for users that run mutable containers.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:55 +02:00
Joachim Wiberg ea2c4be237 container: refactor and cleanup per review comments
Shell script:

 - Factor out big portions of code into more logical helper functions
 - Simplify calling setup script by checking for remote image first
 - Simplify meta/sha up-to-date handling and clarify terminology
 - Consistent use of -f instead of -e in file-exists checks
 - Fix unsafe use of 'mktemp -u'

C code:
 - Clarify meta/sha terminology: rename meta-sha256 -> meta-image-sha256
 - Refactor weird archive_offset() function to local_path() helper
 - Factor out helper function calc_sha()
 - Check len of sha256 >= 64

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:55 +02:00
Joachim Wiberg da5b4bcfff container: remove old image when upgrading at startup
One unique feature of Infix OS is that you can embed your OCI archive in
the rootfs.squashfs.  This way your container instance does not need to
download anything from the network.  To upgrade you drop in a new image
and rebuild Infix, when the new Infix boots the container script 'setup'
command will recognize that the OCI archive has changed and will reload
it into the container store.

This patch is an improvement of the way too generic 'podman image prune'
command used previously.  Instead of looking for any dangling image, we
now surgically remove the old image.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:54 +02:00
Joachim Wiberg f53d26bf34 container: upgrade fixes for mutable images
Container instances that run with mutable images, e.g., tagged with `:latest`
or similar non-versioned tags, can be upgraded without changing the config.

This commit fixes two issues found with this support:

- force container image re-fetch on upgrade, even if the file exists locally
- surgically remove old image from container store after upgrade

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:54 +02:00
Joachim Wiberg 7fbc2eba4f container: make 'container remove' cli command slightly more useful
Usually, when your system is up and running properly, you want to clean
up anything unused from your previous experiments.  This change alllows
that by calling the interactive 'podman image prune -a -f' command from
the CLI command 'container remove all'

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:54 +02:00
Joachim Wiberg 5b7325261a container: use 'nice' for podman load and create
When loading big OCI images at boot the `podman load` process completely
monopolizes all cores of an Arm Cortex-A72.  It blocks on I/O, sure, but
with 'nice' we can get some attention at least to more critical services
at boot.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:53 +02:00
Joachim Wiberg 0eddd1ba64 container: refactor cleanup on instance removal
This commit reverts 477f7ae and bb19d06, which intended to fix an issue
with lingering old images, see #1098.  However, as detailed in #1147,
this caused severe side effects while working with multiple larger
containers.  Basically, the prune operation of one container removed
images of other containers that are just being created in parallel.

Instead of using the podman prune command we can use the meta datain the
start script to pinpoint exactly which image(s) to remove, including any
downloaded OCI archives when the container instance is removed.

Fixes #1147

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:53 +02:00
Joachim Wiberg 68bb01545c container: optimize startup of preexisting containers
This commit adds metadata to track loaded OCI archives to allow skipping
'delete + load' of OCI images when restarting either the container or the
system as a whole.  The sha256 of all loaded OCI archives is stored in a
sidecar file in our downloads directory.  Then we verify the checksum of
the OCI archives against their same-named sidecar to determine if the OCI
archive is already loaded or not.

Additionally, the instance using the image is labled with metadata to detect
changes in the container configuration.  This in turn allow skipping the
delete + create phase also of the instance.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:52 +02:00
Joachim Wiberg c6f3e75aa4 container: only retry remote images on network changes
Fixes #1148

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:52 +02:00
Joachim Wiberg af7c2d7801 container: increase podman stop timeout
The default timeout for 'podman stop foo' is 10 seconds, which for
heavily loaded systems with intricate shutdown process is *waaaay*
too short.  Increase it to the container script default 30s, which
coincidentally is also the container@.conf template's kill delay.

Fixes #1149

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:51 +02:00
Joachim Wiberg e5da7f0473 confd: create container script even if disabled
Not only great for debugging, but also allows users to start their
containers manually in another way.  But yeah, mostly for debug.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:51 +02:00
Joachim Wiberg a880939a2e confd: add new container and volume name type
This rectifies an omission from the initial yang model.  Not all
charachters are supported in container and volume names.  E.g.,
simply attempting to create a volume or container with a space
in the name causes this error message from podman:

 podman: Error: running volume create option: names must match [a-zA-Z0-9][a-zA-Z0-9_.-]*: invalid argument

In addition to the regexp, the new 'ident' type also enforces a
minimum and maximum length.  Sure, technically a single char is
allowed, but let's be reasonable, and who in their right mind
wants an identifier > 64 chars?  We have description for that.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:51 +02:00
Joachim Wiberg 6c742b5cda package/finit: backport support for longer service identifiers
Fixes #1146

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-23 15:23:48 +02:00
Mattias WalströmandGitHub 2aab13088c Merge pull request #1205 from kernelkit/add-wifi-bridgable
yang: Make possible to add WiFi interfaces to bridge
2025-10-23 14:00:13 +02:00
Mattias Walström bc24a8b64e yang: Make possible to add WiFi interfaces to bridge 2025-10-23 13:05:26 +02:00
Tobias WaldekranzandGitHub 365618526d Merge pull request #1204 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.54 (LTS)
2025-10-20 14:04:43 +02:00
Joachim WibergandGitHub 30104bd1b6 Merge pull request #1201 from kernelkit/badge 2025-10-20 10:51:58 +02:00
Mattias Walström f5496b3c6a Upgrade Linux kernel to 6.12.54 (LTS) 2025-10-20 10:15:11 +02:00
Tobias WaldekranzandGitHub bafad20ef2 Merge pull request #1202 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.53 (LTS)
2025-10-15 20:15:18 +02:00
Mattias Walström 5a4c676782 Upgrade Linux kernel to 6.12.53 (LTS) 2025-10-15 12:55:07 +02:00
Joachim Wiberg 57dd35f419 Add releae badge and reposition bitSign
Slight refactor of page, adding another badge for the latest release,
and restructuring the Technical Details section a bit.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-14 21:57:35 +02:00
Mattias WalströmandGitHub 8e6323d663 Merge pull request #1199 from kernelkit/upgrade-kernel
Upgrade kernel and buildroot
2025-10-14 17:13:46 +02:00
Mattias Walström 7fd3a47bf1 Upgrade Buildroot to 2025.02.7 (LTS) 2025-10-14 14:22:59 +02:00
Mattias Walström e2aef716b3 Upgrade Linux kernel to 6.12.52 (LTS) 2025-10-14 13:10:04 +02:00
Joachim WibergandGitHub 042f9f8c51 Merge pull request #1198 from kernelkit/misc
Mixed bag of fixes mostly for RPi4

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-14 09:20:44 +02:00
Joachim Wiberg acb6cdc043 doc: update changelog with latest features and fixes in v25.10
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:18 +02:00
Joachim Wiberg 887e34e0ef doc: fix RESTCONF scripting examples and curl.sh wrapper
The curl.sh wrapper script had several issues:
- Used 'shift 2' incorrectly without proper argument validation
- Required hostname as enviroment variable instead of option
- Lacked proper option parsing, should behave like a cross between
  curl and sysrepocfg

All examples have been updated to match the refactored script, and
a local copy in utils/curl.sh has been added.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:17 +02:00
Joachim Wiberg c972eebaac doc: drop TODO.org file, replaced entirely with issues and project
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:17 +02:00
Joachim Wiberg 151f3491a2 cli: fix error handling in text-editor and change commands
Fixes #1194

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:16 +02:00
Joachim Wiberg 948247254b board/bpi: minor, whitespace cleanup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:16 +02:00
Joachim Wiberg c76f3ea164 board/rpi: support standalone run of mkimage.sh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:15 +02:00
Joachim Wiberg 4123074272 board/rpi: match bpi rootfs partition sizes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:15 +02:00
Joachim Wiberg b3ea0f3207 board/aarch64: add support for std partition labels on cmdline
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:15 +02:00
Joachim Wiberg 391e971573 board/common: expand var partition on sdcard
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:14 +02:00
Joachim Wiberg 0957fc3c11 board/common: wait for mmc probe on rpi
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:14 +02:00
Joachim Wiberg 81f1da6272 package/board: fix RPi4 boot from aarch64 image
Fixes a minor regression after merge of BPi-R3.  The RPi4 device tree,
specifically regulator-sd-io-1v8 in bcm2711-rpi-4-b.dts, requires the
GPIO voltage regulator be built-in for the SD card controller.

Fixes #1197

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:11 +02:00
Joachim Wiberg 20316daf2d confd: fix possible resource leak in firewall conf change
Coverity scan detected a memory leak in the new firewall change() cb
where allocated memory from ietf_interfaces_get_all_l3() was not freed
on error paths when srx_get_diff() failed or returned NULL.

This commit consolidates all cleanup paths to use the 'done:' label,
ensuring ifaces, diff, and cfg are properly freed in all exit scenarios.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 11:31:47 +02:00
Richard AlpeandGitHub 5f00184bb1 Merge pull request #1162 from kernelkit/sign-with-bitsign
Add workflow for signing releases using bitSign (https://bitsign.se)
2025-10-13 11:20:24 +02:00
Joachim WibergandGitHub f91aa0b705 Merge pull request #1114 from kernelkit/fw
Add basic zone-based firewall
2025-10-10 16:25:33 +02:00
Joachim Wiberg 5903d36861 Minor, update slogan also in alt text
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:15 +02:00
Joachim Wiberg 23ed6e2f03 test: new test, zone migration, custom service, and IPv6
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:15 +02:00
Joachim Wiberg e6d945b77c test: new test, IPv6 version of lan-wan firewall
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:14 +02:00
Joachim Wiberg c069308c27 test: new test, wan-dmz-lan firewall with snat and dnat
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:14 +02:00
Joachim Wiberg a81f7c82e9 test: new test, lan-wan gateway with snat
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:14 +02:00
Joachim Wiberg 47c4ddfb7d test: new test, basic firewall zone verification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:13 +02:00
Joachim Wiberg 1735a97dce test/infamy: add nmap to test container
- Sort packages alphabetically
 - Add nmap for firewall tests

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:13 +02:00
Joachim Wiberg 7c87034d5e doc: add firewall documentation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:12 +02:00
Joachim Wiberg 3224f49b65 confd: initial zone-based firewall support, based on firewalld
Add supoprt for infix-firewall.yang, modeled on the zone-based firewalld
The terminology is a mix of firewalld, classic netfilter and inspired by
Ubiquity.  E.g., zone 'policy' -> 'action', and the zone matrix overview.

 - Port forwarding allows forwarding a range of ports
 - Operational data comes from firewalld active rules
 - Firewall logging goes to /var/log/firewall.log
 - Show implicit/built-in rules and zones (HOST) in firewall matrix,
   includes "locked" policy for the default-drop behavior
 - The zone services field in admin-exec 'show firewall' shows ANY when
   the zone default action is set to 'accept'
 - Zone 'forwarding' and 'masquerade' settings live in Infix in the
   policys instead, meaning users need to explicitly add a policy
   to allow both intra-zone and inter-zone forwarding
 - Support for emergency lockdown (kill switch)
 - Pre-defined services (xml+enums) are filtered and included as a
   separate YANG model, extensions added for netconf and restconf
 - Includes initial support for firewalld rich rules

firewalld policy rules, including rich rules, have an obnoxious priority
field which is extremely hard to get right, so in Infix we use the far
superior YANG construct 'ordered-by user;'.  This ensure all rules are
generated in that order by setting the priority field, on read-back from
firewalld (operational) the priority field is used to sort the output
of rules in the CLI.

Fixes #448

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 15:14:12 +02:00
Joachim Wiberg c4ac9e44a7 confd: new helper function, get all l3 interfaces
Used by infix-firewall.c when figuring out interfaces that are not
explicitly assigned to any zone.  Placing them in the default zone

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 12:57:22 +02:00
Joachim Wiberg d1f7abcc3e libsrx: new helper, srx_set_bool()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 12:57:22 +02:00
Joachim Wiberg 4790806d8d buildroot: bump firewalld, v2.0.2 to v2.3.1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-10 12:57:19 +02:00
Joachim WibergandGitHub af2de7708a Merge pull request #1185 from kernelkit/fix-latest
Only publish to latest release from main branch
2025-10-03 16:19:57 +02:00
Joachim Wiberg 1ef8465095 .github; only publish to latest release from main branch
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-03 16:14:02 +02:00
Joachim WibergandGitHub 9bc5f06d4c Merge pull request #1183 from kernelkit/ospf-neigh-regression-test
Verify OSPF neighbors in setup with non-OSPF interface
2025-10-03 13:04:08 +02:00
Joachim Wiberg 5f51ef065e test: verify ospf neighbors in setup with non-ospf interface
Extend OSPF basic with a regression test for issue #1169

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-03 12:55:43 +02:00
Joachim WibergandGitHub 4cfd0eb7a0 Merge pull request #1182 from kernelkit/doc2
doc: update scripting with restconf and add similar for netconf
2025-10-03 08:59:58 +02:00
Joachim Wiberg e12920bd67 doc: update scripting with restconf and add similar for netconf
Fixes #1156

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-03 08:59:16 +02:00
Joachim WibergandGitHub e91ffebfda Merge pull request #1180 from kernelkit/misc
Build, test, and release workflow fixes
2025-10-02 19:47:38 +02:00
Joachim WibergandGitHub 701dcda535 Merge pull request #1181 from kernelkit/upgrade-kernel
Upgrade Linux kernel to 6.12.50 (LTS)
2025-10-02 18:15:14 +02:00
Joachim Wiberg 1125f3b549 .github: update release checklist
Fixes #1175

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:09:44 +02:00
Joachim Wiberg 0c52bac4d7 doc: sync example output from 'show interfaces'
The 'brief' keyword has been gone for a while now.  Also, update the
ouput to match the "new" cli-pretty formatting.

Fixes #1174

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:02:44 +02:00
Joachim Wiberg fcd2e15019 .github: include link to GNS3 appliance in Release changelog snippet.
Fixes #1173

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:02:43 +02:00
Joachim Wiberg 1ba91236b7 .github: clean up stale containers and ports
Fixes the following issue, see also https://devops.stackexchange.com/a/17853/26590:

make[1]: Entering directory '/home/github-jaffa/actions-runner/_work/infix/infix/buildroot'
/home/github-jaffa/actions-runner/_work/infix/infix/test/env -r -b /home/github-jaffa/actions-runner/_work/infix/infix
/home/github-jaffa/actions-runner/_work/infix/infix/test/9pm/9pm.py -v
/home/github-jaffa/actions-runner/_work/infix/infix/test/case/all-repo.yaml
/home/github-jaffa/actions-runner/_work/infix/infix/test/case/all-unit.yaml
Error: rootlessport conflict with ID 1
make[1]: *** [/home/github-jaffa/actions-runner/_work/infix/infix/test/test.mk:58: test-unit] Error 126
make[1]: Leaving directory '/home/github-jaffa/actions-runner/_work/infix/infix/buildroot'
make: *** [Makefile:31: test-unit] Error 2

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:02:42 +02:00
Joachim Wiberg 2d7cb12afe .github: new weekly workflow to verify release workflow
Fixes #1003

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:02:41 +02:00
Joachim Wiberg ff5b5f98b4 .github: simplify a bit now that we have a check-trigger
With all jobs now depending on check-trigger we can do the evaluations
there and set some variables that can be reused later.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:02:40 +02:00
Joachim Wiberg 97fd671c12 .github: alternative fix to issue #1154
Here we use a check-trigger job that all the others depend on, which
should prevent duplicate workflows starting a bit more elegantly than
killing one of them with the concurrency checker.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 17:02:39 +02:00
Tobias WaldekranzandGitHub ebb37732f4 Merge pull request #1177 from kernelkit/multi-dsa-tree-fixes
Multi DSA tree fixes
2025-10-02 16:09:19 +02:00
Mattias Walström 3cc7923058 Upgrade Linux kernel to 6.12.50 (LTS) 2025-10-02 15:58:03 +02:00
Tobias Waldekranz 94f8d1a700 common: nameif: Handle nested dsa ports
In setups like this...

    CPU
    eth0
     |
.----0----.
| dst0sw0 |
'-1-2-3-4-'
        |
   .----0----.
   | dst1sw0 |
   '-1-2-3-4-'

...both eth0 and dst0sw0p4 are DSA ports. But the latter is _also_ a
physical port as far as devlink is concerned. As a result, it would
first be marked as "internal" and is then instantly reclassified as a
"port".

Catch this condition and stick with the initial "internal"
classification.
2025-10-02 14:51:34 +02:00
Tobias Waldekranz 39b4101d19 common: has-quirk: Add support for matching based on "ethtool -i"
In addition to matching on interface names, add support for matching
on ethtool information.

Example:

    {
        "@ethtool:driver=st_gmac": {
	    "broken-mqprio": true
	}
    }

This would mark any interface using the "st_gmac" driver as having a
broken mqprio implementation. Whereas this:

    {
        "@ethtool:driver=st_gmac;bus-info:30bf0000.ethernet": {
	    "broken-mqprio": true
	}
    }

Only matches an st_gmac-backed interface at the specified location.

As matching becomes more complicated, use the shell implementation
from confd as well, to make sure that they are always in agreement.
2025-10-02 14:51:29 +02:00
Joachim Wiberg 5cd9197fa8 .github: re-enable massive parallel build
Fixes #1152

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 10:30:14 +02:00
Joachim Wiberg dcc39da87d test/9m: bump to latest version
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-02 10:30:14 +02:00
Joachim WibergandGitHub a096a56428 Merge pull request #1170 from kernelkit/ospf-show-neighbor-fix
OSPF: skip interfaces without OSPF enabled
2025-09-30 09:33:20 +02:00
Richard Alpe 0b81e46306 OSPF: skip interfaces without OSPF enabled
Fix a bug where systems with OSPF enabled on some, but not all,
interfaces would cause the OSPF iterator to fail when accessing
iface['area'], which was missing. This caused the ospf_status.py
tool to return {}, resulting in empty OSPF data in sysrepo.

Fixes #1169 Expected neighbors not shown in sysrepocfg

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-09-29 14:38:25 +02:00
Joachim WibergandGitHub 3720e09779 Merge pull request #1167 from kernelkit/kernel-update
Upgrade Linux kernel to 6.12.49 (LTS)
2025-09-29 14:34:28 +02:00
Mattias Walström 91fdf6144c Upgrade Linux kernel to 6.12.49 (LTS) 2025-09-29 12:33:26 +02:00
Mattias WalströmandGitHub c23c2245f2 Merge pull request #1168 from kernelkit/doc-updates
Doc updates
2025-09-29 11:28:17 +02:00
Joachim Wiberg cb85b6fc43 doc: update changelog, error in log message, and prep for release
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-29 11:07:20 +02:00
Joachim Wiberg 9ca0dd6cdc Minor update, mention new Banana Pi-R3 support
Also, split out the i.MX8MP EVK to a separate item.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-29 11:07:07 +02:00
Joachim WibergandGitHub c59f53eeed Merge pull request #1163 from kernelkit/finit-warning
Fix log error at boot about unsupported command
2025-09-29 09:40:11 +02:00
Joachim Wiberg 040bd5b10c doc: update changelog, error in log message, and prep for release
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-29 09:39:45 +02:00
Joachim Wiberg bb07f87f9c confd: simplify dnsmasq management during DHCP server reconf
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-29 09:37:12 +02:00
Joachim Wiberg 40755424ee Fix error in log during boot about unsupported command
Sep 27 04:10:06 infix finit[1]: api_cb():Unsupported command
	(cmd: 13, data: dnsmasq) in runlevel S and 6/0.

Fixes #1161

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-29 09:37:06 +02:00
Joachim WibergandGitHub fe8610b30d Merge pull request #1166 from kernelkit/infamy
Mix of test framework fixes and improvements
2025-09-29 08:49:31 +02:00
Joachim Wiberg a0a4051c8a test/infamy: fix xpath_to_uri() to handle multiple predicates
The xpath_to_uri() method only processed the first predicate in XPath
expressions with multiple [key='value'] patterns.  Each re.sub() call
was performed on the original xpath instead of the result the previous
substitutions, causing subsequent predicates to be ignored.

Example XPath that would fail:

    /infix-firewall:firewall/zone[name='untrusted']/interface[.='e2']

Would incorrectly convert to:

    /infix-firewall:firewall/zone[name='untrusted']/interface=e2

Instead of the correct RESTCONF URL:

    /infix-firewall:firewall/zone=untrusted/interface=e2

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 22:02:58 +02:00
Joachim WibergandGitHub d38c3f3406 Merge pull request #1164 from kernelkit/rauc-fixes
Rauc integration fixes
2025-09-28 21:44:29 +02:00
Joachim Wiberg 9d9e099cdb test/infamy: slight improvement to tap.py::Test.__exit__()
Before this change:

  ok 2 - Configure basic end-device firewall
  not ok 3 - Verify unused interface assigned to default zone
  # Exiting (2025-09-25 11:33:00)
  # Traceback (most recent call last):
  #   File "/home/jocke/src/x-misc/test/./case/infix_firewall/basic/test.py", line 127, in <module>
  #     assert unused_if not in public_zone["interface"], \
  #            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  # AssertionError: Unused interface e4 should be in default zone 'public', got interfaces: ['e2', 'e3', 'e5', 'e7', 'e8']

After this change:

  ok 2 - Configure basic end-device firewall
  not ok 3 - Verify unused interface assigned to default zone
  # Exiting (2025-09-25 11:35:00)
  #   File "/home/jocke/src/x-misc/test/./case/infix_firewall/basic/test.py", line 127, in <module>
  #     assert unused_if not in public_zone["interface"], \
  #            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  # Unused interface e4 should be in default zone 'public', got interfaces: ['e2', 'e3', 'e5', 'e7', 'e8']

Slightly shorter and arguably easier to read for a non-pythonic human.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 21:35:32 +02:00
Joachim Wiberg a9430070d2 test/infamy: add optional msg support to tap.py::Test.fail()
A very common pattern in our tests is:

  if (condition):
    print(f"the condition failed with {output}")
    test.fail()

This change allows us to write:

  if (condition):
    test.fail(f"the condition failed with {output}")

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 21:35:32 +02:00
Joachim Wiberg a3d30eb32f test/infamy: minor, whitespace only
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 21:35:31 +02:00
Joachim Wiberg 6bd00d8403 doc: update changelog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 21:34:08 +02: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
Joachim Wiberg 81a56fe304 confd: replace depracated rauc install d-bus method
Fixes #1080

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 21:32:57 +02:00
Joachim WibergandGitHub 99c87d0f1d Merge pull request #1165 from kernelkit/misc
Misc fixes
2025-09-28 21:18:44 +02:00
Joachim Wiberg 3a164e294d doc: update changelog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:45 +02:00
Joachim Wiberg c42b0b536d test: minor, cleanup of specifications
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:45 +02:00
Joachim Wiberg c61b4361ab test: simplify and skip UNIX backup files
- Drop 'local', not available in POSIX shell scripts
 - Check for an assortment of backup file combos
 - Simplify nested if-statements, skip whitelist first

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:45 +02:00
Joachim Wiberg 065f86a74c confd: minor, replace hard-coded string with define
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:44 +02:00
Joachim Wiberg 0f6c7608ec package/confd: simplify, relocate netconf service
Follow the good example set by the restconf service.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:44 +02:00
Joachim Wiberg 93d59b024a package/rousette: add '--log-level LEVEL' command line option
The default 'trace' log level is quite verbose for our production systems.
This commit changes the default to 'info' and adds a command line option
to control the log level if needed.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:43 +02:00
Joachim Wiberg 096a8ab2e2 package/rousette: use v2-kkit branch for reduced patch set
To be able to maintain our own set of patches on top rousette, a kkit
branch have been set up with a reduced set of backported fixes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:43 +02:00
Joachim Wiberg 1a3e1dcabc package/nghttp2-asio: bump to CESNET fork
This is the CESNET fork of nghttp2-asio, introduced here:
https://github.com/CESNET/rousette/commit/fff3429

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 07:26:42 +02:00
Joachim Wiberg 69056bfb2c board/common: fixes for unicode translation in log/pager commands
- cli: add '-r' to log/pager/follow for "raw" control chars, including unicode
 - sysklogd: backport unicode fix for em-dash character (—) in slogan
 - sysklogd: drop old patches
 - sysklogd: run in 8-bit safe mode

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 03:50:23 +02:00
Joachim Wiberg dd4221802f utils: silence srload (debug messages)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 03:50:22 +02:00
Joachim Wiberg e1783f3c23 cli: minor, xml optimization
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 03:50:22 +02:00
Joachim Wiberg 0957774208 cli: add terminal reset|resize commands
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 03:50:22 +02:00
Joachim Wiberg 77963d5267 patches/libyang: follow-up to e7f68be
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-28 03:50:14 +02:00
Richard Alpe 03f4a8d044 doc: mention bitSign code signing in main README
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-09-24 14:43:42 +02:00
Richard Alpe 8cca8913a7 .github: add bitSign workflow for signing releases
This is currently a standalone workflow that needs manual trigger via
workflow_dispatch, but the end goal here is to chain it to the release
job.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-09-23 14:44:55 +02:00
Mattias WalströmandGitHub 2f13fc7843 Merge pull request #1160 from kernelkit/upgrade-sysrepo
Bump sysrepo, netopeer,libyang and libnetconf2, libyang-cpp, rousette
2025-09-17 10:41:04 +02:00
Mattias Walström e7f68be143 Bump sysrepo, netopeer,libyang and libnetconf2, libyang-cpp, sysrepo-cpp, rousette 2025-09-17 08:51:31 +02:00
Mattias WalströmandGitHub 197bb1507e Merge pull request #1159 from kernelkit/misc
Misc fixes
2025-09-16 09:27:42 +02:00
Joachim Wiberg b18a719cee Add repobeats analytics
[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-16 07:55:05 +02:00
Joachim Wiberg b330c6c70d .github: prevent duplicate builds when ci:main label is added to PRs
Add concurrency control to trigger workflow to cancel in-progress builds
when new events (like adding ci:main label) occur on the same PR.  This
prevents resource waste from duplicate builds and handles the common
workflow where developers add the ci:main label after PR creation.

Fixes #1154
2025-09-15 19:12:51 +02:00
Joachim Wiberg 64a3770a76 doc: update changelog with latest changes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 18:58:16 +02:00
Joachim Wiberg 6a745f50f8 board/common: adjust log level of udhcpc script, fix missing iface
Issue #1100

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 18:08:40 +02:00
Joachim Wiberg f41ff6d3e7 confd: reduce dhcp client logging overhead by 70%
Adjust DHCP client retry behavior:

 -t 3  (was -t 10) : Maximum discovery attempts per cycle
 -T 5  (was -T 3)  : Seconds to wait between attempts
 -A 30 (was -A 10) : Seconds to wait after all attempts fail

Before: 10 attempts × 3 seconds = 30 seconds of rapid trying, then 10
        second pause = 40 second total cycle

After: 3 attempts × 5 seconds = 15 seconds of trying, then 30 second
       pause = 45 second total cycle

=> 70% fewer log messages during active attempts, with longer quiet
       periods between cycles.

Fixes #1100

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 18:07:50 +02:00
Joachim Wiberg 400691af85 package/klish-plugin-sysrepo: improve CLI UX for no enabled command
Fixes #1119

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 17:25:23 +02:00
Joachim Wiberg 0bada691fc Add neofetch
Fixes #1143
2025-09-15 17:08:08 +02:00
Joachim Wiberg 164a1018a0 board/common: improve default bash settings for better UX
Add HISTCONTROL=ignoreboth to ignore duplicate commands and those
starting with space, enable histappend, and improve tab completion
behavior.  Also add /etc/inputrc for better readline key bindings.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 16:55:55 +02:00
Joachim Wiberg 805acdf782 test: bump 9pm for test ID and meta data section in report
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 16:23:20 +02:00
Joachim Wiberg df3f9f2e40 Add mtr and iperf3
Fixes #1144

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 16:22:13 +02:00
Joachim Wiberg 2761a17abc cli: fix 'show ospf' commands regression, introduced in 827dc098e
Fixes #1155

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 16:22:13 +02:00
Joachim Wiberg 77b364d682 board/common: set show-legacy wrapper as executable
Fix #1150

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 16:22:10 +02:00
Joachim WibergandGitHub 1989effaad Merge pull request #1135 from kernelkit/test-fixes
Test fixes

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 16:21:23 +02:00
Joachim Wiberg 142e4e95b7 test: consistent naming for all yaml files
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:06 +02:00
Joachim Wiberg 44d37808f1 test/case: use 9pm 'name:' for all test names
To reduce the duplication of effort between 9pm and the Infamy framework
this change consolidates the move from local 'infamy: title:' extension
to 9pm 'name:'.

For the parameterized tunnel tests we leverage the 9pm dynamic test-spec
variable, which looks for a correspodning <case>.adoc instead of static
Readme.adoc, when generating the test report.

Each test documentation should cover all aspects of the test, much like
the usage text of a UNIX program.  To this end, the tunnel test docs are
now more spelled out, including all invariants.

Some refactoring of these tests were also necessary, e.g., replacing any
reserved Python keywords like 'type', and other PEP-8 fixes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:06 +02:00
Joachim Wiberg eb3e64d243 test/case: rename foo.adoc -> test.adoc and update all Readme.adoc
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:05 +02:00
Joachim Wiberg 2171fd12ca test/case/infix_dhcp: allow generating subsystem test resports
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:04 +02:00
Joachim Wiberg 249af70dcd test: add intro blurb to each subsystem
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:04 +02:00
Joachim Wiberg b4a5b35c0e test/spec: refactor test spec & report generation
Import new 9pm version for improved test report generation.  With this
in place we can take the opportunity to also refactor and simplify the
test spec. generation.

Fixes #1129

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 14:26:03 +02:00
Joachim Wiberg fe2d0f488d test/case: simplify AsciiDoc image references
This commit greatly simplifies AsciiDoc image references in generated
Readme.adoc files.  The two focused use-cases that remain after this
change are working references in:

 - Generated output/images/test-report.pdf
 - Viewing test's Readme.adoc from GitHub

Previously we aimed to have working images also when the test's Readme
was included in the parent directory's Readme.adoc.  This, however, is
not supported as of this commit.  It seems unlikely also to ever be a
supported feature of AsciiDoc on GitHub, for details, see the following
issue: <https://github.com/github/markup/issues/1095>

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:38 +02:00
Joachim Wiberg c14140a8fe test: relocate logic for creating test-report.pdf from workflow
It should be possible to create test reports manually, so logically
the GitHub workflow should call a make rule in test.mk

Untested: branding, or any case where Infix is used as a BR2_EXTERNAL

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:38 +02:00
Joachim Wiberg 9fe661f422 test/infamy: silence schema download in restconf backend
NETCONF backedn already silenced.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:38 +02:00
Joachim Wiberg 87f9b58957 test/spec: pep-8 fixes, minor cleanup only
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:37 +02:00
Joachim Wiberg b657183209 test/case/infix_services: refactor mdns-allow-deny
Major refactor to redesign how listeners and traffic is started in parallel.

Fixes #1130

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:37 +02:00
Joachim Wiberg 1aad255846 test/case/infix_container: refactor container-environment
Refactor test to use httpd container instead and return ENV with a CGI.

Fixes #1131

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:36 +02:00
Joachim Wiberg 52beeb5814 test/infamy: refactor Furl class to support list of needles
Also, add some documentation to lower barrier of entry/use.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-15 06:40:35 +02:00
Joachim Wiberg c1ad8075a8 board/common: ensure efi-part.vfat is saved in build tree
Fixes #1132

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-14 22:05:23 +02:00
Mattias WalströmandGitHub 3fcb6a376a Merge pull request #1142 from kernelkit/banana-pi
Add support for Banana Pi (BPi-R3)
2025-09-14 14:56:12 +02:00
Mattias Walström 33e873c2fa workflows: create-image: add banana pi r3 as target board
No eMMC support added yet, only SD card.
2025-09-14 13:37:49 +02:00
Mattias Walström 56fce18d66 workflows/build-boot: Add mt7976 bootloader
It is the chipset used on banana pi r3.
2025-09-14 13:37:49 +02:00
Mattias Walström 399894e9a1 Add new board banana pi r3
The Banana Pi R3 is a high-performance networking board featuring:
- MediaTek MT7986 ARM Cortex-A53 quad-core processor
- 4x Gigabit LAN ports (lan1-lan4)
- 1x Gigabit WAN port
- 2x SFP ports (sfp1, sfp2) for fiber connectivity
- Dual WiFi interfaces (wifi0 for 2.4GHz, wifi1 for 5GHz)
- USB support
- SD card boot support
2025-09-14 13:37:48 +02:00
Mattias Walström 8146e0570e gen-interfaces: Fix bug when generating on boards with mounted Wi-Fi chipsets
These should not appear in a generated factory-config or failure-config.
2025-09-12 23:23:14 +02:00
Mattias WalströmandGitHub 153ceda2f4 Merge pull request #1153 from kernelkit/upgrade-buildroot
Upgrade buildroot and linux kernel
2025-09-11 14:12:49 +02:00
Mattias Walström b134733dd2 Upgrade Buildroot to 2025.02.6 (LTS) 2025-09-11 09:21:39 +02:00
Mattias Walström 8082b271d9 Upgrade Linux kernel to 6.12.46 (LTS) 2025-09-11 09:21:38 +02:00
Mattias WalströmandGitHub 02d8c97e98 Merge pull request #1145 from kernelkit/add-resize
Add resize2fs to be able to resize ext partitions
2025-09-08 10:44:09 +02:00
Mattias Walström 7bb3f64191 Add resize2fs to be able to resize ext partitions
This is useful when using sdcard images, to expand /var to cover rest of disk.
2025-09-08 08:27:16 +02:00
Joachim WibergandGitHub f2af4d6cdf Merge pull request #1141 from kernelkit/defconfig-branding
Update factory-configs and links and description in defconfigs
2025-09-07 23:00:14 +02:00
Joachim Wiberg 4417465135 Update factory-config.cfg for NanoPi and RPi
The motd-banner was behind on the new slogan:

.-------.
|  . .  | Infix OS — Immutable.Friendly.Secure
|-. v .-| https://kernelkit.org
'-'---'-'

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-07 19:30:21 +02:00
Joachim Wiberg cf50c75a3e Update links to vendor + docs, and a more relevant description
Fixes #1134

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-07 19:30:12 +02:00
Joachim WibergandGitHub 7ab265992a Merge pull request #1140 from kernelkit/more-logo-sizes 2025-09-07 18:43:08 +02:00
Joachim Wiberg 35cf9e4cc9 doc: add more logos for convenience
This commit completes the collection.  We now have small, medium, and
large sizes.  Useful for easy conversion to other formats, e.g., bmp.

[skip ci]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-09-07 18:21:36 +02:00
Mattias WalströmandGitHub 3fbbd16690 Merge pull request #1118 from kernelkit/create-sdcard
Create sdcard
2025-09-07 18:07:40 +02:00
Mattias Walström 01029321c9 board: rpi4: Add splashscreen on boot
Show splash in uboot.
2025-09-07 18:06:43 +02:00
Mattias Walström 0477446e49 package/bootloader-splashscreen: New packet for adding/modify bootloader splash 2025-09-07 18:06:43 +02:00
Mattias Walström 700ec2f855 Add crete SD Card workflow 2025-09-07 13:43:27 +02:00
Mattias Walström 709f2769ce Build aux when build infix 2025-09-07 13:43:26 +02:00
Mattias Walström 19b965ac41 RPI4: dts: Create a new device tree for the DSI display 2025-09-07 13:43:26 +02:00
Mattias Walström 28d8748bdb uboot: Att uboot patches for 2025.01
- Fix CTRL-C misbehave
- Add new command to detect RPI standard display
2025-09-07 13:43:25 +02:00
Mattias WalströmandGitHub 497990a2d3 Merge pull request #1138 from kernelkit/test-sanity 2025-09-05 18:55:18 +02:00
Mattias Walström dce9a9c53d test: Add new sanity check tests
One to verify it is the correct version on the duts and one
that check that it is the correct bootorder.
2025-09-05 16:34:11 +02:00
Mattias Walström 4f0aded5a0 utils: Add script to add a new version to GNS3 marketplace
You need first to clone gns3-registry from https://github.com/GNS3/gns3-registry

Follow this steps:
1. ./utils/bump-gns3.py 25.08.0 ../../gns3/gns3-registry/appliances/infix.gns3a
2. TEST in gns3, just add the new version, start it.
3. run python3 check.py inside gns3-registry, verify infix is ok.
4. Create a pull request to gns3-registry

This fix #1107
2025-09-04 17:48:43 +02:00
Mattias Walström 73298469d5 Upgrade Linux kernel to 6.12.45 (LTS) 2025-09-04 17:48:42 +02:00
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
1562 changed files with 52957 additions and 26183 deletions
+29 -24
View File
@@ -3,34 +3,39 @@ Checklists for Pull Requests and Releases
Maintainer checklists for reviewing pull requests and doing releases.
Pull Requests
-------------
- If applicable, is there a readable ChangeLog entry?
- If any LICENSE file has been updated, has the `.hash` file been updated?
- If any change to a Finit `.svc` file, does any run/task linger?
I.e., is there a runlevel and/or condition defined to prevent them
from running outside of their intended runlevel?
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
- If any change to logging, have the resulting logs been audited?
- Check for duplicate entries, misspellings
- Check for sneaky severity changes, e.g., error vs note, error vs warning
- If new subsystem, or major changes to a subsystem, have the docs been updated?
- If change to mDNS, has it been tested with netbrowse?
- If change to `_defconfig`, verify `local.mk` and sync with other archs
- Test manually as well, e.g., CLI changes do not have ha regression tests
- Build from distclean, or use artifacts built by build servers, for manual tests
- If applicable, is there a readable ChangeLog entry?
- If any LICENSE file has been updated, has the `.hash` file been updated?
- If any change to a Finit `.svc` file, does any run/task linger?
I.e., is there a runlevel and/or condition defined to prevent them
from running outside of their intended runlevel?
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
- If any change to logging, have the resulting logs been audited?
- Check for duplicate entries, misspellings
- Check for sneaky severity changes, e.g., error vs note, error vs warning
- If new subsystem, or major changes to a subsystem, have the docs been updated?
- If change to mDNS, has it been tested with netbrowse?
- If change to `_defconfig`, verify `local.mk` and sync with other archs
- Test manually as well, e.g., CLI changes do not have ha regression tests
- Build from distclean, or use artifacts built by build servers, for manual tests
Releases
--------
- Make at least one -betaN release to verify the GitHub workflow well in time release day
- Stuff happens, remember kernelkit/infix#735
- Make at least one -rcN to flush out any issues in customer repos
- 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
Recommended checkpoints, use at your own discretion:
- Make at least one -betaN release to verify the GitHub workflow well in time release day
- Stuff happens, remember kernelkit/infix#735
- Make at least one -rcN to flush out any issues in customer repos
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
- Verify release artifacts (checksums, completeness, no corrupted files)
- Test on actual hardware for at least one architecture
- Review ChangeLog for completeness
- Check for release-blocking issues
- Verify generated GNS3 appliance, no marketplace update on -rc builds
- 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
+154 -64
View File
@@ -9,15 +9,15 @@ forms of collaboration as well. [Let's talk!][support] :handshake:
If you are unsure how to start implementing an idea or fix:
- :bug: open an issue, there are human friendly templates for _bugs_
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
- :speech_balloon: use the [Q&A Forum][discuss]
- :technologist: The [Developer's Guide][devguide] is also a useful start
- :bug: open an issue, there are human friendly templates for _bugs_
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
- :speech_balloon: use the [Q&A Forum][discuss]
- :technologist: The [Developer's Guide][devguide] is also a useful start
> _Talking about code and problems first is often the best way to get
> [!IMPORTANT]
> Talking about code and problems first is often the best way to get
> started before submitting a pull request. We have found it always
> saves time, yours and ours._
> saves time, yours and ours.
:sparkles: General Guidelines
-----------------------------
@@ -27,21 +27,20 @@ version the change is made against, what it does, and, more importantly
*why* -- from your perspective, why is it a bug, why does the code need
changing in this way. Start with why.
- :bug: Bug reports need metadata like Infix version or commit hash
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
corresponding issue number for the ChangeLog
- :new: New features, you need to get approval of the YANG model first!
:speech_balloon: Please use the [Forum][discuss], e.g., category:
*Ideas*, or open a :pray: feature request issue
- :white_check_mark: New features also need new regression tests, this
can be basic tests or more complex use-case tests comprising multiple
subsystems, see [Testing Changes](#test_tube-testing-changes), below
- :bug: Bug reports need metadata like Infix version or commit hash
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
corresponding issue number for the ChangeLog
- :new: New features, you need to get approval of the YANG model first!
:speech_balloon: Please use the [Forum][discuss], e.g., category:
*Ideas*, or open a :pray: feature request issue
- :white_check_mark: New features also need new regression tests, this
can be basic tests or more complex use-case tests comprising multiple
subsystems, see [Testing Changes](#test_tube-testing-changes), below
Please take care to ensure you follow the project coding style and the
commit message format. If you follow these recommendations you help
the maintainers and make it easier for them to include your code.
:woman_technologist: Coding Style
---------------------------------
@@ -51,39 +50,40 @@ and it is expected that you provide a human-readable summary for the
release notes (ChangeLog) and at least a configuration example in the
manual for new features.
> **Tip:** consider ["Readme driven development"][RDD] for new features.
> It is amazing how many flaws in your own bright ideas come to bare
> when you suddenly have to explain them to someone else!
> [!TIP]
> Consider ["Readme driven development"][RDD] for new features. It is
> amazing how many flaws in your own bright ideas come to bare when you
> suddenly have to explain them to someone else!
We expect code contributions for:
- C code in [Linux Coding Style][Linux]
- Python code should follow [PEP-8][]
- C code in [Linux Coding Style][Linux]
- Python code should follow [PEP-8][]
> [!IMPORTANT]
> **However,** always submit code that follows the style of surrounding
> code! Legacy takes precedence, and remember, we read code a lot more
> than write it, so legibility is important.
The ChangeLog deserves a separate mention:
- Releases are listed in reverse chronological order order, so the
latest/next release is at the beginning of the file
- Only *user-facing bugs and features* are detailed, so code refactor,
new tests, etc. are not listed.
- Add your changes/features to the Changes section
- Add your Fix line in the Fixes section, in numeric order
- Changes and fixes without an issue number are listed after all
numbered ones
- YANG model changes are documented in their respective model, for
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
`infix-interfaces.yang` detail augments/deviations as revisions.
- Releases are listed in reverse chronological order order, so the
latest/next release is at the beginning of the file
- Only *user-facing bugs and features* are detailed, so code refactor,
new tests, etc. are not listed.
- Add your changes/features to the Changes section
- Add your Fix line in the Fixes section, in numeric order
- Changes and fixes without an issue number are listed after all
numbered ones
- YANG model changes are documented in their respective model, for
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
`infix-interfaces.yang` detail augments/deviations as revisions.
A final note, lines of code are allowed to be longer than 72 characters
these days, unless you live by PEP-8 (see above). There is no enforced
maximum, but the team usually keep it around 100 characters for both C
and Python.
:test_tube: Testing Changes
---------------------------
@@ -97,9 +97,8 @@ the same pull request.
For help getting started with testing, see the following resources:
- [Developer's Guide][devguide]
- [Regression Testing][testing]
- [Developer's Guide][devguide]
- [Regression Testing][testing]
:memo: Commit Messages
----------------------
@@ -110,45 +109,135 @@ proud of your work and set up a proper GIT identity for your commits:
<img src="../doc/jack.png" width=70 align="right">
$ git config --global user.name "Jacky Linker"
$ git config --global user.email jacky.linker@example.com
```bash
$ git config --global user.name "Jacky Linker"
$ git config --global user.email jacky.linker@example.com
```
Example commit message from one of many [online guides][cbeams]. Use
`git commit -s` to automatically add a `Signed-off-by` for proof of
origin, see [DCO][] for more info.
subsystem: brief, but clear and concise summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as
the subject of an email and the rest of the text as the body. The
empty line separating summary from body is critical. Tools like
rebase can get confused if the empty line is missing.
Further paragraphs should be separated with empty lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
```text
subsystem: brief, but clear and concise summary of changes
If you use an issue tracker, put references to them at the bottom,
like this:
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as
the subject of an email and the rest of the text as the body. The
empty line separating summary from body is critical. Tools like
rebase can get confused if the empty line is missing.
Resolves: #123
See also: #456, #789
Further paragraphs should be separated with empty lines.
Signed-off-by: Jacky Linker <jacky.linker@example.com>
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
If you use an issue tracker, put references to them at the bottom,
like this:
Resolves: #123
See also: #456, #789
Signed-off-by: Jacky Linker <jacky.linker@example.com>
```
This is an example of how to [automatically close][closing] an issue
when the commit is merged to mainline. Several keywords are available.
:lock_with_ink_pen: Signing Commits with GPG
---------------------------------------------
To ensure the authenticity and integrity of your contributions, we
**require** all commits to be signed with GPG. This cryptographically
verifies that commits come from a trusted source.
### Generating a GPG Key
If you don't already have a GPG key, generate one:
```bash
$ gpg --full-generate-key
```
When prompted, choose:
- Key type: `RSA and RSA` (default)
- Key size: `4096` bits (recommended for security)
- Expiration: `0` (key does not expire)
- Real name and email: Use the same email as your Git configuration
> [!NOTE]
> We recommend keys that do not expire for signing commits. Expiration
> creates a "usability time bomb" without providing meaningful security
> benefits for code signing. See [this article][pgpfan] for details.
### Configuring Git to Sign Commits
First, find your GPG key ID:
```bash
$ gpg --list-secret-keys --keyid-format=long
```
Look for the line starting with `sec`, the key ID is the part after the `/`.
For example, in `sec rsa4096/ABCD1234EFGH5678`, the key ID is `ABCD1234EFGH5678`.
Configure Git to use your GPG key:
```bash
$ git config --global user.signingkey ABCD1234EFGH5678
$ git config --global commit.gpgsign true
```
The second command enables automatic signing for all commits. Alternatively,
you can sign individual commits with `git commit -S`.
### Publishing Your Public Key
To allow others to verify your signatures, publish your public key to a
keyserver:
```bash
$ gpg --keyserver hkps://keys.openpgp.org --send-keys ABCD1234EFGH5678
```
> [!IMPORTANT]
> The keyserver will send a verification email to the address associated
> with your key. You **must** click the link in that email to confirm
> ownership before your key becomes searchable by email address.
Alternative keyservers you can use:
- `hkps://keyserver.ubuntu.com`
- `hkps://pgp.mit.edu`
### Adding Your GPG Key to GitHub
For GitHub to show your commits as "Verified", you need to add your public
key to your account:
1. Export your public key:
```bash
$ gpg --armor --export ABCD1234EFGH5678
```
2. Copy the entire output, including the `-----BEGIN PGP PUBLIC KEY BLOCK-----`
and `-----END PGP PUBLIC KEY BLOCK-----` lines.
3. Go to [GitHub Settings → SSH and GPG keys](https://github.com/settings/keys)
4. Click **New GPG key** and paste your public key.
Now your signed commits will display a "Verified" badge on GitHub! :white_check_mark:
For more details, see GitHub's [official documentation on commit signature verification][gpg-verify].
:twisted_rightwards_arrows: Pull Requests
-----------------------------------------
> _The git repository is the canonical location for information._
> [!NOTE]
> _The git repository is the canonical location for all information._
A pull request should preferably address a single issue or change. This
may of course include multiple related changes, but what is important to
@@ -167,7 +256,6 @@ Buildroot, consider the pull request message body similar to the cover
letter for a series of patches -- it's a summary of changes, and it is
lost when the changes are merged to the mainline branch.
:balance_scale: Code of Conduct
-------------------------------
@@ -184,6 +272,8 @@ other contributions that are not aligned to this Code of Conduct."*
[PEP-8]: https://peps.python.org/pep-0008/
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
[cbeams]: https://cbea.ms/git-commit/#seven-rules
[conduct]: CODE-OF-CONDUCT.md
[DCO]: https://developercertificate.org/
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
[conduct]: CODE-OF-CONDUCT.md
[DCO]: https://developercertificate.org/
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
[gpg-verify]: https://docs.github.com/en/authentication/managing-commit-signature-verification
[pgpfan]: https://articles.59.ca/doku.php?id=pgpfan:expire
+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.
+215
View File
@@ -0,0 +1,215 @@
name: bitSign Infix Release
on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version (e.g., v25.08.0)'
required: true
type: string
push:
branches: [ sign-with-bitsign ]
jobs:
sign-infix-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate release version format
id: validate
run: |
# Use default version for push events, input version for manual dispatch
if [ "${{ github.event_name }}" = "push" ]; then
VERSION="v25.08.0"
echo "Using default version for push trigger: $VERSION"
else
VERSION="${{ inputs.release_version }}"
echo "Using input version for manual trigger: $VERSION"
fi
# Check if version starts with 'v' and has proper format
if ! echo "$VERSION" | grep -qE '^v[0-9]+\.[0-9]+(\.[0-9]+)?(-alpha[0-9]*|-beta[0-9]*|-rc[0-9]*)?$'; then
echo "❌ Invalid version format. Expected format: vYY.MM(.PP)(-alphaN|-betaN|-rcN)"
echo "Examples: v25.08.0, v25.08.0-alpha1, v25.08.0-rc1"
exit 1
fi
# Extract version without 'v' prefix for filename
FILE_VERSION="${VERSION#v}"
FILENAME="infix-x86_64-${FILE_VERSION}.tar.gz"
RELEASE_URL="https://github.com/kernelkit/infix/releases/download/${VERSION}/${FILENAME}"
echo "✅ Version format valid"
echo "file_version=${FILE_VERSION}" >> $GITHUB_OUTPUT
echo "filename=${FILENAME}" >> $GITHUB_OUTPUT
echo "release_url=${RELEASE_URL}" >> $GITHUB_OUTPUT
- name: Download Infix release
run: |
RELEASE_URL="${{ steps.validate.outputs.release_url }}"
FILENAME="${{ steps.validate.outputs.filename }}"
echo "Downloading Infix release: $FILENAME"
echo "From: $RELEASE_URL"
if ! curl -L "$RELEASE_URL" -o "$FILENAME" --fail --show-error --progress-bar; then
echo "❌ Failed to download release file from: $RELEASE_URL"
echo "Please verify that the release version exists and contains the x86_64 build."
echo "You can check available releases at: https://github.com/kernelkit/infix/releases"
exit 1
fi
# Verify download
if [ -f "$FILENAME" ] && [ -s "$FILENAME" ]; then
FILE_SIZE=$(ls -lh "$FILENAME" | awk '{print $5}')
echo "✅ Successfully downloaded: $FILENAME ($FILE_SIZE)"
else
echo "❌ Failed to download release file"
exit 1
fi
- name: Create signing request
id: create_request
run: |
FILENAME="${{ steps.validate.outputs.filename }}"
FILE_VERSION="${{ steps.validate.outputs.file_version }}"
RELEASE="infix-x86_64-${FILE_VERSION}"
echo "Creating signing request for $FILENAME..."
echo "RELEASE parameter: $RELEASE"
# Create signing request using bitSign API
RESPONSE=$(curl -s -X POST "https://portal.bitsign.se/api/v1/requests" \
-H "Authorization: Bearer ${{ secrets.BITSIGN_API_KEY }}" \
-F "file=@$FILENAME" \
-F "key=bit42-Demo1" \
-F "job=Infix-x86" \
-F "parameters={\"RELEASE\": \"$RELEASE\"}")
echo "API Response: $RESPONSE"
# Check if request was successful
if echo "$RESPONSE" | jq -e '.success == true' > /dev/null; then
REQUEST_ID=$(echo "$RESPONSE" | jq -r '.requestId')
echo "✅ Request created successfully with ID: $REQUEST_ID"
echo "request_id=$REQUEST_ID" >> $GITHUB_OUTPUT
else
echo "❌ Failed to create signing request"
echo "$RESPONSE" | jq -r '.error // .message // "Unknown error"'
exit 1
fi
- name: Wait for signing completion
id: wait_completion
run: |
REQUEST_ID="${{ steps.create_request.outputs.request_id }}"
echo "Waiting for signing completion for request: $REQUEST_ID"
# Poll status for up to 10 minutes (600 seconds) - longer timeout for larger files
MAX_WAIT=600
WAITED=0
while [ $WAITED -lt $MAX_WAIT ]; do
RESPONSE=$(curl -s -X GET "https://portal.bitsign.se/api/v1/requests/$REQUEST_ID/status" \
-H "Authorization: Bearer ${{ secrets.BITSIGN_API_KEY }}")
STATUS=$(echo "$RESPONSE" | jq -r '.status')
echo "Current status: $STATUS (waited ${WAITED}s)"
if [ "$STATUS" = "completed" ]; then
echo "✅ Signing completed successfully!"
break
elif [ "$STATUS" = "failed" ]; then
echo "❌ Signing failed"
echo "$RESPONSE" | jq -r '.error // .message // "Unknown error"'
exit 1
fi
sleep 10
WAITED=$((WAITED + 10))
done
if [ $WAITED -ge $MAX_WAIT ]; then
echo "❌ Timeout: Signing did not complete within ${MAX_WAIT} seconds"
exit 1
fi
- name: Download signed file
id: download_signed
run: |
REQUEST_ID="${{ steps.create_request.outputs.request_id }}"
FILENAME="${{ steps.validate.outputs.filename }}"
FILE_VERSION="${{ steps.validate.outputs.file_version }}"
SIGNED_FILENAME="infix-x86_64-${FILE_VERSION}-signed.tar.gz"
echo "Downloading signed file for request: $REQUEST_ID"
echo "Expected signed filename: $SIGNED_FILENAME"
# Download the signed file
curl -X GET "https://portal.bitsign.se/api/v1/requests/$REQUEST_ID/download" \
-H "Authorization: Bearer ${{ secrets.BITSIGN_API_KEY }}" \
-o "$SIGNED_FILENAME" \
--fail --show-error
if [ -f "$SIGNED_FILENAME" ] && [ -s "$SIGNED_FILENAME" ]; then
FILE_SIZE=$(ls -lh "$SIGNED_FILENAME" | awk '{print $5}')
echo "Successfully downloaded signed file: $SIGNED_FILENAME ($FILE_SIZE)"
echo "signed_filename=$SIGNED_FILENAME" >> $GITHUB_OUTPUT
# Calculate SHA256 checksums for both files
ORIGINAL_SHA256=$(sha256sum "$FILENAME" | cut -d' ' -f1)
SIGNED_SHA256=$(sha256sum "$SIGNED_FILENAME" | cut -d' ' -f1)
echo "original_sha256=$ORIGINAL_SHA256" >> $GITHUB_OUTPUT
echo "signed_sha256=$SIGNED_SHA256" >> $GITHUB_OUTPUT
else
echo "Failed to download signed file"
exit 1
fi
- name: Upload signed artifacts
uses: actions/upload-artifact@v4
with:
name: signed-infix-${{ steps.validate.outputs.file_version }}
path: ${{ steps.download_signed.outputs.signed_filename }}
retention-days: 90
- name: Summary
run: |
# Determine the actual version used (could be from push or input)
if [ "${{ github.event_name }}" = "push" ]; then
ACTUAL_VERSION="v25.08.0"
else
ACTUAL_VERSION="${{ inputs.release_version }}"
fi
cat >> $GITHUB_STEP_SUMMARY << EOF
# bitSign Infix Release Signing Complete
The Infix release has been successfully signed using the bitSign API.
## Signing Details
| Property | Value |
|----------|-------|
| 📦 **Original File** | \`${{ steps.validate.outputs.filename }}\` (\`${{ steps.download_signed.outputs.original_sha256 }}\`) |
| ✍️ **Signed File** | \`${{ steps.download_signed.outputs.signed_filename }}\` (\`${{ steps.download_signed.outputs.signed_sha256 }}\`) |
| 🔑 **Signing Key** | \`bit42-Demo1\` |
| ⚙️ **Job Type** | \`Infix-x86\` |
| 🆔 **Request ID** | \`${{ steps.create_request.outputs.request_id }}\` |
| 📋 **Release Version** | \`\$ACTUAL_VERSION\` |
| 🌐 **API Endpoint** | \`portal.bitsign.se\` |
## Download Files
> **The signed release file is available as a workflow artifact:**
> **\`signed-infix-${{ steps.validate.outputs.file_version }}\`**
>
> The artifact contains the signed file: \`${{ steps.download_signed.outputs.signed_filename }}\`
---
**Next Steps:** The signed release can now be distributed with cryptographic verification of authenticity.
EOF
+146
View File
@@ -0,0 +1,146 @@
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:
- aarch64_qemu_boot
- bpi_r3_sd_boot
- bpi_r3_emmc_boot
- cn9130_crb_boot
- fireant_boot
- nanopi_r2s_boot
- rpi64_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
+376
View File
@@ -0,0 +1,376 @@
name: Create SD Card & eMMC Images
on:
workflow_dispatch:
inputs:
board:
description: 'Board to create image for'
type: choice
required: true
options:
- raspberrypi-rpi64
- bananapi-bpi-r3
- friendlyarm-nanopi-r2s
default: 'raspberrypi-rpi64'
use_latest_release:
description: 'Use latest release artifacts instead of workflow artifacts'
type: boolean
default: false
jobs:
create-image:
name: Create SD Card Image for ${{ inputs.board }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
clean: true
fetch-depth: 0
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
genimage \
u-boot-tools \
parted \
gdisk \
qemu-utils \
dosfstools \
e2fsprogs \
genext2fs \
mtools \
jq
- name: Prepare build environment
run: |
# Set up directory structure similar to buildroot build
mkdir -p output/images
mkdir -p build
- name: Set bootloader and target based on board
run: |
case "${{ inputs.board }}" in
raspberrypi-rpi64)
echo "BOOTLOADER=rpi64_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
;;
bananapi-bpi-r3)
echo "BOOTLOADER_SD=bpi_r3_sd_boot" >> $GITHUB_ENV
echo "BOOTLOADER_EMMC=bpi_r3_emmc_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=true" >> $GITHUB_ENV
;;
friendlyarm-nanopi-r2s)
echo "BOOTLOADER=nanopi_r2s_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
;;
*)
echo "Error: Unknown board ${{ inputs.board }}"
exit 1
;;
esac
echo "Target: $TARGET for board: ${{ inputs.board }}"
if [ "$BUILD_EMMC" = "true" ]; then
echo "Building both SD and eMMC images"
echo "SD Bootloader: $BOOTLOADER_SD"
echo "eMMC Bootloader: $BOOTLOADER_EMMC"
else
echo "Building SD image only"
echo "Bootloader: $BOOTLOADER"
fi
- name: Download bootloader artifacts
if: ${{ !inputs.use_latest_release }}
run: |
# Download from latest bootloader build workflow on main branch
gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
BOOT_RUN_ID=$(cat latest_boot_run_id)
if [ "$BUILD_EMMC" = "true" ]; then
# Download both SD and eMMC bootloaders for boards that support both
echo "Downloading SD bootloader: ${BOOTLOADER_SD}"
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_SD} --dir temp_bootloader_sd/
mkdir -p output_sd/images
cd temp_bootloader_sd/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
cd ../
rm -rf temp_bootloader_sd/
echo "Downloading eMMC bootloader: ${BOOTLOADER_EMMC}"
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_EMMC} --dir temp_bootloader_emmc/
mkdir -p output_emmc/images
cd temp_bootloader_emmc/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_bootloader_emmc/
echo "SD bootloader files:"
ls -la output_sd/images/
echo "eMMC bootloader files:"
ls -la output_emmc/images/
else
# Single bootloader for boards that only support SD
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
# Extract bootloader directly to output/images
cd temp_bootloader/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_bootloader/
echo "Bootloader files extracted to output/images:"
ls -la output/images/
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download Infix artifacts
if: ${{ !inputs.use_latest_release }}
run: |
# Download from latest Kernelkit Trigger workflow for main branch
gh run list --workflow=164295764 --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
INFIX_RUN_ID=$(cat latest_infix_run_id)
if [ "$BUILD_EMMC" = "true" ]; then
# Copy Infix artifacts to both SD and eMMC output directories
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_infix/
echo "Infix files extracted to output_sd/images:"
ls -la output_sd/images/
echo "Infix files extracted to output_emmc/images:"
ls -la output_emmc/images/
else
# Single output directory for SD-only boards
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
# Extract Infix directly to output/images
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_infix/
echo "Infix files extracted to output/images:"
ls -la output/images/
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download from latest releases
if: ${{ inputs.use_latest_release }}
run: |
if [ "$BUILD_EMMC" = "true" ]; then
# Download both SD and eMMC bootloaders
gh release download latest-boot --pattern "*${BOOTLOADER_SD}*" --dir temp_bootloader_sd/
mkdir -p output_sd/images
cd temp_bootloader_sd/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
cd ../
rm -rf temp_bootloader_sd/
gh release download latest-boot --pattern "*${BOOTLOADER_EMMC}*" --dir temp_bootloader_emmc/
mkdir -p output_emmc/images
cd temp_bootloader_emmc/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_bootloader_emmc/
# Download Infix once and extract to both directories
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_infix/
echo "SD files extracted to output_sd/images:"
ls -la output_sd/images/
echo "eMMC files extracted to output_emmc/images:"
ls -la output_emmc/images/
else
# Download latest bootloader release
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/
cd temp_bootloader/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_bootloader/
# Download latest Infix release
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_infix/
echo "All files extracted to output/images:"
ls -la output/images/
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Verify extracted files
run: |
if [ "$BUILD_EMMC" = "true" ]; then
echo "Files available for SD image:"
ls -la output_sd/images/
echo ""
echo "Files available for eMMC image:"
ls -la output_emmc/images/
else
echo "Files available for mkimage.sh:"
ls -la output/images/
echo ""
echo "File types:"
file output/images/* || true
fi
- name: Create SD card image
run: |
if [ "$BUILD_EMMC" = "true" ]; then
export BINARIES_DIR=$PWD/output_sd/images
export BUILD_DIR=$PWD/build
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh -t sdcard ${{ inputs.board }}
else
export BINARIES_DIR=$PWD/output/images
export BUILD_DIR=$PWD/build
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh ${{ inputs.board }}
fi
- name: Create eMMC image
if: ${{ env.BUILD_EMMC == 'true' }}
run: |
export BINARIES_DIR=$PWD/output_emmc/images
export BUILD_DIR=$PWD/build
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh -t emmc ${{ inputs.board }}
- name: Verify created images
run: |
if [ "$BUILD_EMMC" = "true" ]; then
echo "SD card image:"
ls -lh output_sd/images/*-sdcard.img* 2>/dev/null || true
if ls output_sd/images/*-sdcard.img 1> /dev/null 2>&1; then
for img in output_sd/images/*-sdcard.img; do
echo "- $(basename $img)"
file "$img"
fdisk -l "$img" 2>/dev/null | head -20
done
fi
echo ""
echo "eMMC image:"
ls -lh output_emmc/images/*-emmc.img* 2>/dev/null || true
if ls output_emmc/images/*-emmc.img 1> /dev/null 2>&1; then
for img in output_emmc/images/*-emmc.img; do
echo "- $(basename $img)"
file "$img"
fdisk -l "$img" 2>/dev/null | head -20
done
fi
# Copy both images to output/images for artifact upload
mkdir -p output/images
cp output_sd/images/*-sdcard.img* output/images/ 2>/dev/null || true
cp output_emmc/images/*-emmc.img* output/images/ 2>/dev/null || true
else
echo "Contents of output/images after mkimage.sh:"
ls -lh output/images/
# Look for SD card image with pattern: *-sdcard.img
if ls output/images/*-sdcard.img 1> /dev/null 2>&1; then
echo "Found SD card image(s):"
for img in output/images/*-sdcard.img; do
echo "- $(basename $img)"
file "$img"
fdisk -l "$img" 2>/dev/null || true
done
else
echo "No SD card image found matching pattern: *-sdcard.img"
echo "Available files:"
ls -la output/images/
exit 1
fi
fi
- name: Upload images as artifacts
uses: actions/upload-artifact@v4
with:
name: images-${{ inputs.board }}
path: |
output/images/*-sdcard.img*
output/images/*-emmc.img*
retention-days: 30
- name: Create checksums
run: |
cd output/images/
for file in *-sdcard.img *-emmc.img; do
if [ -f "$file" ]; then
sha256sum "$file" > "$file.sha256"
fi
done
- name: Upload to release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitName: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
tag: "latest-boot"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "output/images/*-sdcard.img*,output/images/*-emmc.img*"
- name: Generate summary
run: |
if [ "$BUILD_EMMC" = "true" ]; then
cat <<EOF >> $GITHUB_STEP_SUMMARY
# SD Card & eMMC Image Build Complete! 🚀
**Board:** ${{ inputs.board }}
**Target:** ${{ env.TARGET }}
**SD Bootloader:** ${{ env.BOOTLOADER_SD }}
**eMMC Bootloader:** ${{ env.BOOTLOADER_EMMC }}
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
## Created Images
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
## Download
Both SD card and eMMC images are available as workflow artifacts above and in the latest-boot release.
EOF
else
cat <<EOF >> $GITHUB_STEP_SUMMARY
# SD Card Image Build Complete! 🚀
**Board:** ${{ inputs.board }}
**Target:** ${{ env.TARGET }}
**Bootloader:** ${{ env.BOOTLOADER }}
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
## Created Images
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
## Download
The SD card image is available as a workflow artifact above.
EOF
fi
+119
View File
@@ -0,0 +1,119 @@
# Needed for make pkg-stats
# sudo apt install python3-aiohttp
---
name: Build Release
on:
workflow_call:
inputs:
version:
required: true
type: string
use_cache:
required: false
type: boolean
default: true
jobs:
build:
name: Build Infix ${{ inputs.version }} [${{ matrix.target }}]
runs-on: [self-hosted, release]
strategy:
matrix:
target: [aarch64, x86_64]
fail-fast: false
steps:
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- uses: actions/checkout@v4
with:
clean: true
submodules: recursive
- name: Set Release Variables
id: vars
run: |
ver=${{ inputs.version }}
echo "ver=${ver}" >> $GITHUB_OUTPUT
fver=${ver#v}
target=${{ matrix.target }}-${fver}
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
- name: Restore Cache of dl/
if: ${{ inputs.use_cache }}
uses: actions/cache@v4
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
if: ${{ inputs.use_cache }}
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-${{ matrix.target }}-
ccache-
- name: Configure & Build
env:
INFIX_RELEASE: ${{ steps.vars.outputs.ver }}
run: |
target=${{ matrix.target }}_defconfig
echo "Building $target ..."
make $target
make
- name: Generate SBOM from Build
run: |
# Generate manifest files in CSV format for CycloneDX
make legal-info
# Generate cpe.json for CycloneDX
make -s show-info > output/cpe.json
# Generate pkg-stats.{json,html} for humans
make pkg-stats
- name: Build test specification
run: |
make test-spec
- name: Prepare Artifacts
run: |
cd output/
# Collect relevant files for SBOM and CPE info. for more info, see:
# https://github.com/CycloneDX/cyclonedx-buildroot
mkdir images/sbom
mv pkg-stats.* images/sbom/
mv cpe.json images/sbom/
mv legal-info/*.csv images/sbom/
# Remove rootfs.squashfs from release (can be extracted from rootfs.itb)
# Saves ~131MB per architecture. See issue #858
rm -f images/rootfs.squashfs
mv images ${{ steps.vars.outputs.dir }}
ln -s ${{ steps.vars.outputs.dir }} images
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
- 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
+120 -151
View File
@@ -1,26 +1,73 @@
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
infix_branch:
description: 'Branch/tag/commit to checkout (for spin overrides)'
default: ''
type: string
workflow_call:
inputs:
target:
required: true
type: string
name:
required: true
type: string
infix_repo:
required: false
type: string
default: kernelkit/infix
infix_branch:
required: false
type: string
default: ''
description: 'Branch/tag/commit to checkout (for spin overrides). Defaults to github.ref if not specified'
parallel:
required: false
type: boolean
default: true
pre_build_script:
required: false
type: string
default: ''
description: 'Optional script to run after checkout (for spin customization)'
secrets:
CHECKOUT_TOKEN:
required: false
description: 'Token for cross-repository access'
env:
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
INFIX_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_branch || inputs.infix_branch }}
jobs:
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 }}
@@ -31,11 +78,34 @@ jobs:
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- uses: actions/checkout@v4
- name: Checkout infix repo
uses: actions/checkout@v4
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
clean: true
fetch-depth: 0
submodules: recursive
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
- name: Run pre-build script
if: ${{ inputs.pre_build_script != '' }}
run: |
cat > ./pre-build.sh << 'EOF'
${{ inputs.pre_build_script }}
EOF
chmod +x ./pre-build.sh
bash ./pre-build.sh
- name: Set Build Variables
id: vars
@@ -50,26 +120,13 @@ jobs:
"${{ github.event.number }}" "${{ github.event.pull_request.head.sha }}" \
| tee -a $GITHUB_OUTPUT $GITHUB_ENV
fi
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
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:
@@ -82,23 +139,42 @@ 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: Cleanup stale containers and ports
run: |
podman rm -af || true
pkill -9 -f rootlessport || true
- 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: |
@@ -119,121 +195,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 [ -n "${{ needs.build.outputs.build_id }}" ]; then
echo "INFIX_BUILD_ID=${{ needs.build.outputs.build_id }}" \
>>$GITHUB_ENV
fi
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
- name: Generate Test Report for x86_64${{ steps.vars.outputs.flv }}
# Ensure this runs even if Regression Test fails
if: always()
run: |
asciidoctor-pdf \
--theme test/9pm/report/theme.yml \
-a pdf-fontsdir=test/9pm/report/fonts \
test/.log/last/report.adoc \
-o test/.log/last/report.pdf
- name: Upload Test Report as Artifact
uses: actions/upload-artifact@v4
with:
name: test-report
path: test/.log/last/report.pdf
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 }}
+140
View File
@@ -0,0 +1,140 @@
name: Check Kernel 6.12 Release
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
check-kernel:
if: github.repository == 'kernelkit/infix'
runs-on: ubuntu-latest
steps:
- name: Check out infix repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
- name: Fetch kernel.org and check for 6.12 release
id: check
run: |
set -e -o pipefail
# Fetch the kernel.org frontpage and extract 6.12 version
CURRENT_VERSION=$(curl -s https://www.kernel.org/ | grep -oP '6\.12\.\d+' | head -n1)
if [ -z "$CURRENT_VERSION" ]; then
echo "Failed to fetch kernel version"
exit 1
fi
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "Current 6.12 kernel version: $CURRENT_VERSION"
# Get the version from infix defconfig
INFIX_VERSION=$(grep 'BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=' configs/aarch64_defconfig | cut -d'"' -f2)
echo "infix_version=$INFIX_VERSION" >> $GITHUB_OUTPUT
echo "Infix kernel version: $INFIX_VERSION"
if [ "$CURRENT_VERSION" != "$INFIX_VERSION" ]; then
# Check if there's already an open PR for this version
PR_EXISTS=$(gh pr list --state open --search "Upgrade to kernel $CURRENT_VERSION in:title" --json number --jq 'length')
if [ "$PR_EXISTS" -gt 0 ]; then
echo "new_release=false" >> $GITHUB_OUTPUT
echo "PR already exists for kernel $CURRENT_VERSION, skipping"
else
echo "new_release=true" >> $GITHUB_OUTPUT
echo "🎉 New 6.12 kernel released: $CURRENT_VERSION (infix version: $INFIX_VERSION)"
fi
else
echo "new_release=false" >> $GITHUB_OUTPUT
echo "No change - still at $CURRENT_VERSION"
fi
env:
GH_TOKEN: ${{ secrets.KERNEL_UPDATE_TOKEN }}
- name: Generate branch name
if: steps.check.outputs.new_release == 'true'
id: branch
run: |
BRANCH_NAME="kernel-upgrade-$(uuidgen | tr '[:upper:]' '[:lower:]')"
echo "name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "Branch name: $BRANCH_NAME"
- name: Import GPG key
if: steps.check.outputs.new_release == 'true'
run: |
# Import the GPG key
echo "${{ secrets.AEL_BOT_GPG_PRIVATE_KEY }}" | gpg --batch --import
# Get the key ID
GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format=long | grep '^sec' | head -1 | awk '{print $2}' | cut -d'/' -f2)
echo "GPG_KEY_ID=$GPG_KEY_ID" >> $GITHUB_ENV
# Configure GPG agent for non-interactive use
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
gpg-connect-agent reloadagent /bye || true
- name: Set up git credentials
if: steps.check.outputs.new_release == 'true'
run: |
set -e -o pipefail
git config --global user.email "ael-bot@users.noreply.github.com"
git config --global user.name "ael-bot"
git config --global commit.gpgsign true
git config --global user.signingkey ${{ env.GPG_KEY_ID }}
# Configure git to use the token for HTTPS operations
git config --global url."https://ael-bot:${{ secrets.KERNEL_UPDATE_TOKEN }}@github.com/".insteadOf "git@github.com:"
git config --global url."https://ael-bot:${{ secrets.KERNEL_UPDATE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Run kernel upgrade script
if: steps.check.outputs.new_release == 'true'
env:
GIT_TERMINAL_PROMPT: 0
BRANCH_NAME: ${{ steps.branch.outputs.name }}
run: |
set -e -o pipefail
./utils/kernel-upgrade.sh linux "$BRANCH_NAME"
- name: Create pull request
if: steps.check.outputs.new_release == 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
script: |
const { data: pulls } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
head: `${context.repo.owner}:kernel-upgrade`,
state: 'open'
});
if (pulls.length === 0) {
const { data: pr } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `Upgrade to kernel ${{ steps.check.outputs.current_version }}`,
head: '${{ steps.branch.outputs.name }}',
base: 'main',
body: `Automated kernel upgrade to version ${{ steps.check.outputs.current_version }}.\n\n**Previous version:** ${{ steps.check.outputs.infix_version }}\n**New version:** ${{ steps.check.outputs.current_version }}\n**Source:** https://www.kernel.org/\n\nThis PR was automatically created by the kernel release monitoring workflow.`
});
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: ['ci:main']
});
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
reviewers: ['troglobit', 'wkz', 'mattiaswal']
});
}
+5 -3
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,12 +65,14 @@ 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
- name: Build applications for Coverity
run: |
export PATH=`pwd`/coverity/bin:$PATH
cov-build --dir cov-int make check
cov-build --dir cov-int make coverity
- name: Submit results to Coverity Scan
env:
+68
View File
@@ -0,0 +1,68 @@
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
pipx inject mkdocs mkdocs-glightbox
# 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
+84
View File
@@ -0,0 +1,84 @@
name: Generic X86 GitHub Build
on:
push:
jobs:
build:
if: github.repository != 'kernelkit/infix'
name: Infix x86_64
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- 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
+34 -71
View File
@@ -18,91 +18,46 @@ on:
type: string
jobs:
build:
set-version:
if: github.repository == 'kernelkit/infix' && startsWith(github.ref, 'refs/tags/')
name: Build Infix ${{ github.ref_name }} [${{ matrix.target }}]
runs-on: [ self-hosted, release ]
strategy:
matrix:
target: [aarch64, x86_64]
fail-fast: false
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-ver.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
clean: true
submodules: recursive
- name: Set Release Variables
id: vars
- id: set-ver
run: |
if [ -n "${{ inputs.version }}" ]; then
ver=${{ inputs.version }}
else
ver=${GITHUB_REF#refs/tags/}
fi
echo "ver=${ver}" >> $GITHUB_OUTPUT
fver=${ver#v}
target=${{ matrix.target }}-${fver}
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
echo "version=${ver}" >> $GITHUB_OUTPUT
- name: Restore Cache of dl/
uses: actions/cache@v4
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
path: .ccache/
key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
restore-keys: |
ccache-${{ matrix.target }}-
ccache-
- name: Configure & Build
env:
INFIX_RELEASE: ${{ steps.vars.outputs.ver }}
run: |
target=${{ matrix.target }}_defconfig
echo "Building $target ..."
make $target
make
- name: Generate SBOM from Build
run: |
make legal-info
- name: Build test specification
run: |
make test-spec
- name: Prepare Artifacts
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 }}
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 }}
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.target }}
path: output/*.tar.gz
build:
needs: set-version
uses: ./.github/workflows/build-release.yml
with:
version: ${{ needs.set-version.outputs.version }}
use_cache: true
release:
name: Release Infix ${{ github.ref_name }}
needs: build
runs-on: [ self-hosted, release ]
runs-on: [self-hosted, release]
permissions:
contents: write
discussions: write
steps:
- name: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- uses: actions/checkout@v4
with:
submodules: 'true'
@@ -120,7 +75,7 @@ jobs:
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
elif echo $ver | grep -qE '^v[0-9]+\.[0-9]+(\.0)?$'; then
echo "pre=false" >> $GITHUB_OUTPUT
echo "latest=true" >> $GITHUB_OUTPUT
echo "cat=Releases" >> $GITHUB_OUTPUT
@@ -141,11 +96,19 @@ 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: |
awk '/^-----*$/{if (x == 1) exit; x=1;next}x' doc/ChangeLog.md \
|head -n -1 > release.md
echo "" >> release.md
echo "> [!TIP]" >> release.md
echo "> **Try Infix in GNS3!** Download the appliance from the [GNS3 Marketplace](https://gns3.com/marketplace/appliances/infix) to test Infix in a virtual network environment without hardware." >> release.md
cat release.md
- uses: ncipollo/release-action@v1
@@ -154,8 +117,8 @@ jobs:
prerelease: ${{ steps.rel.outputs.pre }}
makeLatest: ${{ steps.rel.outputs.latest }}
discussionCategory: ${{ steps.rel.outputs.cat }}
bodyFile: release.md
artifacts: "*.tar.gz*"
bodyFile: release.md
artifacts: "*.tar.gz*,*.qcow2*"
- name: Summary
run: |
+145
View File
@@ -0,0 +1,145 @@
name: Test Infix
on:
workflow_dispatch:
inputs:
infix_repo:
description: 'Repo to checkout (for spin overrides)'
required: false
default: kernelkit/infix
type: string
infix_branch:
description: 'Branch/tag/commit to checkout (for spin overrides)'
default: ''
type: string
workflow_call:
inputs:
target:
required: true
type: string
name:
required: true
type: string
infix_repo:
required: false
type: string
default: kernelkit/infix
infix_branch:
required: false
type: string
default: ''
description: 'Branch/tag/commit to checkout (for spin overrides). Defaults to github.ref if not specified'
ninepm-conf:
required: false
type: string
default: ''
test-path:
required: false
type: string
default: 'test'
pre_test_script:
required: false
type: string
default: ''
description: 'Optional script to run after checkout (for spin customization)'
secrets:
CHECKOUT_TOKEN:
required: false
description: 'Token for cross-repository access'
env:
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
INFIX_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_branch || inputs.infix_branch }}
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: Cleanup podman state
run: |
set -x
podman ps -a || true
podman stop -a || true
podman rm -a -f || true
podman volume prune -f || true
podman system prune -a -f || true
podman system migrate || true
- name: Checkout infix repo
uses: actions/checkout@v4
with:
repository: ${{ env.INFIX_REPO }}
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
clean: true
fetch-depth: 0
submodules: recursive
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
- name: Run pre-test script
if: ${{ inputs.pre_test_script != '' }}
run: |
cat > ./pre-test.sh << 'EOF'
${{ inputs.pre_test_script }}
EOF
chmod +x ./pre-test.sh
bash ./pre-test.sh
- 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: |
make test-dir="$(pwd)/$TEST_PATH" test-report
- name: Upload Test Report as Artifact
uses: actions/upload-artifact@v4
with:
name: test-report
path: output/images/test-report.pdf
+75
View File
@@ -0,0 +1,75 @@
name: Kernelkit Trigger
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
push:
branches:
- main
- ci-work
workflow_dispatch:
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Gate all builds through this check to prevent wasted runs. Only run on
# 'labeled' events when the label is actually 'ci:main'. Concurrency control
# above handles canceling the 'opened' event when 'labeled' arrives quickly
# after (e.g., when creating a PR with ci:main already attached). See #1154.
check-trigger:
if: |
startsWith(github.repository, 'kernelkit/') &&
(github.event_name != 'pull_request' ||
github.event.action != 'labeled' ||
github.event.label.name == 'ci:main')
runs-on: ubuntu-latest
outputs:
x86_64_target: ${{ steps.set-targets.outputs.x86_64_target }}
aarch64_target: ${{ steps.set-targets.outputs.aarch64_target }}
steps:
- run: |
echo "Triggering build, logging meta data ..."
echo "Event : ${{ github.event_name }}"
echo "Action : ${{ github.event.action }}"
echo "Ref : ${{ github.ref }}"
echo "PR : ${{ github.event.pull_request.number }}"
echo "Label : ${{ github.event.label.name }}"
- id: set-targets
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]] && \
! echo '${{ toJSON(github.event.pull_request.labels.*.name) }}' \
| grep -q "ci:main"; then
echo "x86_64_target=x86_64_minimal" >> $GITHUB_OUTPUT
echo "aarch64_target=aarch64_minimal" >> $GITHUB_OUTPUT
else
echo "x86_64_target=x86_64" >> $GITHUB_OUTPUT
echo "aarch64_target=aarch64" >> $GITHUB_OUTPUT
fi
build-x86_64:
needs: check-trigger
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ needs.check-trigger.outputs.x86_64_target }}
build-aarch64:
needs: check-trigger
uses: ./.github/workflows/build.yml
with:
name: "infix"
target: ${{ needs.check-trigger.outputs.aarch64_target }}
test-run-x86_64:
needs: [check-trigger, build-x86_64]
uses: ./.github/workflows/test.yml
with:
target: ${{ needs.check-trigger.outputs.x86_64_target }}
name: "infix"
test-publish-x86_64:
if: ${{ github.repository_owner == 'kernelkit' && github.ref_name == 'main' }}
needs: test-run-x86_64
uses: ./.github/workflows/publish.yml
+68
View File
@@ -0,0 +1,68 @@
# Weekly release build to catch flaky tests and verify clean builds.
# Runs without caches (ccache) to ensure reproducibility. See issue #1003.
name: Weekly Build
on:
schedule:
- cron: '5 0 * * 6' # Saturday at 00:05 UTC, same as Coverity
workflow_dispatch:
jobs:
build:
if: github.repository == 'kernelkit/infix'
uses: ./.github/workflows/build-release.yml
with:
version: "latest"
use_cache: false
publish:
name: Publish Weekly Build
needs: 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
if ls *.qcow2 &>/dev/null; then
for file in *.qcow2; do
sha256sum "$file" > "$file.sha256"
done
fi
- uses: ncipollo/release-action@v1
with:
tag: latest
name: "Latest Weekly Build"
prerelease: true
makeLatest: false
allowUpdates: true
removeArtifacts: true
body: |
Automated weekly build from `${{ github.sha }}`.
This build runs without caches to catch potential flaky tests and build issues.
Not intended for production use - use official releases instead.
**Commit:** ${{ github.sha }}
**Built:** ${{ github.run_id }}
artifacts: "*.tar.gz*,*.qcow2*"
- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Weekly Build Published! :package:
Latest artifacts uploaded to:
<https://github.com/kernelkit/infix/releases/tag/latest>
Built from commit: \`${{ github.sha }}\`
EOF
+3 -1
View File
@@ -1,3 +1,5 @@
source "$BR2_EXTERNAL_INFIX_PATH/board/Config.in"
menu "Branding"
config INFIX_VENDOR
@@ -65,7 +67,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.
+7 -3
View File
@@ -16,8 +16,7 @@ bmake = $(MAKE) -C buildroot O=$(O) $1
all: $(config) buildroot/Makefile
@+$(call bmake,$@)
check dep:
@echo "Starting local check, stage $@ ..."
check dep coverity:
@make -C src $@
$(config):
@@ -33,6 +32,11 @@ $(config):
legal-info: | buildroot/Makefile
$(call bmake,legal-info LINUX_LICENSE_FILES=COPYING)
cyclonedx: | buildroot/Makefile
@echo "Generating package information..."
@$(MAKE) --no-print-directory -C buildroot O=$(O) show-info | ./buildroot/utils/generate-cyclonedx > $(O)/cyclonedx-sbom.json
@echo "CycloneDX SBOM generated: $(O)/cyclonedx-sbom.json"
# Workaround, see board/x86_64/board.mk
test:
@+$(call bmake,$@)
@@ -40,4 +44,4 @@ test:
buildroot/Makefile:
@git submodule update --init
.PHONY: all check test
.PHONY: all check coverity dep test cyclonedx
+125 -68
View File
@@ -1,56 +1,70 @@
[![License Badge][]][License] [![GitHub Status][]][GitHub] [![Coverity Status][]][Coverity Scan] [![Discord][discord-badge]][discord-url]
[![License Badge][]][License] [![Release Badge][]][Release] [![GitHub Status][]][GitHub] [![Coverity Status][]][Coverity Scan] [![Discord][discord-badge]][discord-url]
<img align="right" src="doc/logo.png" alt="Infix - Linux <3 NETCONF" width=480 border=10>
<img align="right" src="doc/logo.png" alt="Infix — Immutable.Friendly.Secure" width=480 padding=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
with native support for Docker containers, the operating system 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,45 +95,89 @@ 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
- **Banana Pi-R3** - Your next home router and gateway
- **NanoPi R2S** - Compact dual-port router in a tiny package
- **x86_64** - Run in VMs or on mini PCs for development and testing
- **Marvell CN9130 CRB, EspressoBIN** - High-performance ARM64 platforms
- **Microchip SparX-5i** - Enterprise switching capabilities
- **NXP i.MX8MP EVK** - Highly capable ARM64 SoC
- **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
<a href="https://bitsign.se">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://bitsign.se/assets/badges/bitsign-badge-dark-mode.png">
<source media="(prefers-color-scheme: light)" srcset="https://bitsign.se/assets/badges/bitsign-badge-light-mode.png">
<img alt="bitSign - Code Signing" src="https://bitsign.se/assets/badges/bitsign-badge-light-mode.png" align="right" width=150 padding=10>
</picture>
</a>
Built on proven open-source foundations: [Linux][0], [Buildroot][1], and
[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
- **Code Signing**: Releases are cryptographically signed for integrity verification
Perfect for everything from resource-constrained edge devices to
high-throughput network appliances.
With the entire system modeled in YANG, scalability is no longer an
issue, be it in development, testing, or end users deploying and
monitoring their devices. All knobs and dials are accessible from the
CLI (console/SSH), or remotely using the native NETCONF or RESTCONF
APIs.
> 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>
![Alt](https://repobeats.axiom.co/api/embed/5ce7a2a67edc923823afa0f60c327a6e8575b6e9.svg "Repobeats analytics image")
[0]: https://www.kernel.org
[1]: https://buildroot.org/ "Buildroot Homepage"
[2]: https://www.sysrepo.org/ "Sysrepo Homepage"
[3]: https://kernelkit.org/infix/latest/cli/introduction/
[4]: https://kernelkit.org/infix/
[5]: https://github.com/kernelkit/infix/releases
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest "Latest build"
[License]: https://en.wikipedia.org/wiki/GPL_license
[License Badge]: https://img.shields.io/badge/License-GPL%20v2-blue.svg
[Release]: https://github.com/kernelkit/infix/releases
[Release Badge]: https://img.shields.io/github/v/release/kernelkit/infix
[GitHub]: https://github.com/kernelkit/infix/actions/workflows/build.yml/
[GitHub Status]: https://github.com/kernelkit/infix/actions/workflows/build.yml/badge.svg
[Coverity Scan]: https://scan.coverity.com/projects/29393
+8
View File
@@ -0,0 +1,8 @@
menu "Board Support"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch32/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/riscv64/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/x86_64/Config.in"
endmenu
+5
View File
@@ -0,0 +1,5 @@
if BR2_arm
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch32/raspberrypi-rpi2/Config.in"
endif
+7
View File
@@ -0,0 +1,7 @@
aarch32
=======
Board Specific Documentation
----------------------------
- [Raspberry Pi 2 Model B (32-bit)](raspberrypi-rpi2/)
+1
View File
@@ -0,0 +1 @@
+7
View File
@@ -0,0 +1,7 @@
blkmap get boot dev devnum
load blkmap ${devnum} ${kernel_addr_r} /boot/zImage
#TODO: LOAD FDT
setenv bootargs "${bootargs_root} ${bootargs_rauc} ${bootargs_log}"
bootz ${kernel_addr_r} ${ramdisk} ${fdt_addr}
+395
View File
@@ -0,0 +1,395 @@
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_AUDIT=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_PREEMPT=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CPUSETS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_KEXEC=y
CONFIG_ARCH_MULTI_V6=y
CONFIG_ARCH_MULTI_V7=y
CONFIG_ARCH_VIRT=y
CONFIG_ARCH_BCM=y
CONFIG_ARCH_BCM2835=y
CONFIG_SMP=y
CONFIG_NR_CPUS=4
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPUFREQ_DT=y
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
CONFIG_AEABI=y
CONFIG_VFP=y
CONFIG_NEON=y
CONFIG_KERNEL_MODE_NEON=y
# CONFIG_SUSPEND is not set
CONFIG_PM=y
CONFIG_JUMP_LABEL=y
# CONFIG_GCC_PLUGINS is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_PARTITION_ADVANCED=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_COMPAT_BRK is not set
CONFIG_KSM=y
CONFIG_CMA=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE_DEMUX=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
CONFIG_NET_IPVTI=m
CONFIG_NET_FOU_IP_TUNNELS=y
CONFIG_IPV6_SIT=m
CONFIG_IPV6_GRE=m
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
CONFIG_IPV6_PIMSM_V2=y
CONFIG_NETWORK_PHY_TIMESTAMPING=y
CONFIG_NETFILTER=y
CONFIG_BRIDGE_NETFILTER=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_TABLES=y
CONFIG_NF_TABLES_INET=y
CONFIG_NF_TABLES_NETDEV=y
CONFIG_NFT_CT=m
CONFIG_NFT_CONNLIMIT=m
CONFIG_NFT_LOG=m
CONFIG_NFT_LIMIT=m
CONFIG_NFT_MASQ=m
CONFIG_NFT_REDIR=m
CONFIG_NFT_NAT=m
CONFIG_NFT_TUNNEL=m
CONFIG_NFT_QUEUE=m
CONFIG_NFT_REJECT=m
CONFIG_NFT_COMPAT=m
CONFIG_NFT_HASH=m
CONFIG_NFT_XFRM=m
CONFIG_NFT_SOCKET=m
CONFIG_NFT_OSF=m
CONFIG_NFT_DUP_NETDEV=m
CONFIG_NFT_FWD_NETDEV=m
CONFIG_NFT_REJECT_NETDEV=m
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_NETFILTER_XT_MATCH_CGROUP=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_MATCH_AH=m
CONFIG_IP6_NF_MATCH_EUI64=m
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
CONFIG_IP6_NF_FILTER=m
CONFIG_IP6_NF_TARGET_REJECT=m
CONFIG_IP6_NF_RAW=m
CONFIG_IP6_NF_NAT=m
CONFIG_IP6_NF_TARGET_MASQUERADE=m
CONFIG_IP6_NF_TARGET_NPT=m
CONFIG_NF_TABLES_BRIDGE=m
CONFIG_NFT_BRIDGE_META=m
CONFIG_NF_CONNTRACK_BRIDGE=m
CONFIG_BRIDGE_NF_EBTABLES=m
CONFIG_BRIDGE_EBT_BROUTE=m
CONFIG_BRIDGE_EBT_T_FILTER=m
CONFIG_BRIDGE_EBT_T_NAT=m
CONFIG_BRIDGE_EBT_802_3=m
CONFIG_BRIDGE_EBT_ARP=m
CONFIG_BRIDGE_EBT_IP=m
CONFIG_BRIDGE_EBT_IP6=m
CONFIG_BRIDGE_EBT_LIMIT=m
CONFIG_BRIDGE_EBT_PKTTYPE=m
CONFIG_BRIDGE_EBT_STP=m
CONFIG_BRIDGE_EBT_VLAN=m
CONFIG_BRIDGE_EBT_ARPREPLY=m
CONFIG_BRIDGE_EBT_DNAT=m
CONFIG_BRIDGE_EBT_REDIRECT=m
CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_BRIDGE=y
CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_BRIDGE_MRP=y
CONFIG_BRIDGE_CFM=y
CONFIG_NET_DSA=y
CONFIG_VLAN_8021Q=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_MQPRIO=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_BPF=y
CONFIG_NET_CLS_FLOWER=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_GACT=y
CONFIG_NET_ACT_MIRRED=y
CONFIG_NET_ACT_SKBEDIT=y
CONFIG_DCB=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=y
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
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_PCIEPORTBUS=y
CONFIG_PCI_IOV=y
CONFIG_PCI_AARDVARK=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCIE_ARMADA_8K=y
CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
CONFIG_RASPBERRYPI_FIRMWARE=y
CONFIG_FW_CFG_SYSFS=y
CONFIG_FW_CFG_SYSFS_CMDLINE=y
CONFIG_OF_OVERLAY=y
CONFIG_BLK_DEV_NULL_BLK=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_VIRTIO_BLK=y
CONFIG_BLK_DEV_NVME=y
CONFIG_SRAM=y
CONFIG_EEPROM_AT24=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_SAS_LIBSAS=y
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
CONFIG_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_INIT=y
CONFIG_DM_VERITY=y
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
CONFIG_NETDEVICES=y
CONFIG_BONDING=m
CONFIG_DUMMY=m
CONFIG_MACVLAN=m
CONFIG_MACVTAP=m
CONFIG_IPVLAN=m
CONFIG_IPVTAP=m
CONFIG_VXLAN=m
CONFIG_GENEVE=m
CONFIG_BAREUDP=m
CONFIG_MACSEC=m
CONFIG_TUN=m
CONFIG_VETH=m
CONFIG_VIRTIO_NET=y
CONFIG_NLMON=y
CONFIG_NET_VRF=y
CONFIG_BCMGENET=y
CONFIG_SMSC911X=y
CONFIG_USB_LAN78XX=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_SMSC95XX=y
CONFIG_BRCMFMAC=m
CONFIG_ZD1211RW=m
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_BCM2835AUX=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_TTY_PRINTK=y
CONFIG_HVC_DRIVER=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_BCM2835=m
CONFIG_SPI=y
CONFIG_SPI_BCM2835=y
CONFIG_SPI_BCM2835AUX=y
CONFIG_GPIO_SYSFS=y
CONFIG_SENSORS_RASPBERRYPI_HWMON=m
CONFIG_THERMAL=y
CONFIG_BCM2711_THERMAL=y
CONFIG_BCM2835_THERMAL=m
CONFIG_WATCHDOG=y
CONFIG_BCM2835_WDT=y
CONFIG_I6300ESB_WDT=y
CONFIG_MFD_SYSCON=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_GPIO=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_DRM=y
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_TOSHIBA_TC358762=m
CONFIG_DRM_V3D=m
CONFIG_DRM_VC4=m
CONFIG_DRM_VC4_HDMI_CEC=y
CONFIG_DRM_SIMPLEDRM=y
CONFIG_FB=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_BCM2835_SOC_I2S=y
CONFIG_HID_GENERIC=m
CONFIG_USB=y
CONFIG_USB_OTG=y
CONFIG_USB_STORAGE=y
CONFIG_USB_DWC2=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_GADGET=y
CONFIG_USB_ETH=m
CONFIG_USB_ETH_EEM=y
CONFIG_USB_G_SERIAL=m
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_IPROC=y
CONFIG_MMC_BCM2835=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_TRANSIENT=y
CONFIG_LEDS_TRIGGER_CAMERA=y
CONFIG_DMADEVICES=y
CONFIG_DMA_BCM2835=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_INPUT=y
CONFIG_VIRTIO_MMIO=y
CONFIG_STAGING=y
CONFIG_SND_BCM2835=m
CONFIG_VIDEO_BCM2835=m
CONFIG_CLK_RASPBERRYPI=y
CONFIG_MAILBOX=y
CONFIG_BCM2835_MBOX=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_RASPBERRYPI_POWER=y
CONFIG_PWM=y
CONFIG_PWM_BCM2835=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_BTRFS_FS=y
CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_QUOTA=y
CONFIG_FUSE_FS=y
CONFIG_VIRTIO_FS=y
CONFIG_OVERLAY_FS=y
CONFIG_VFAT_FS=y
CONFIG_EXFAT_FS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_9P_FS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
# CONFIG_XZ_DEC_ARM is not set
# CONFIG_XZ_DEC_ARMTHUMB is not set
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=32
CONFIG_PRINTK_TIME=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_SCHED_DEBUG is not set
# CONFIG_RCU_TRACE is not set
CONFIG_FUNCTION_TRACER=y
# CONFIG_STRICT_DEVMEM is not set
CONFIG_MEMTEST=y
+15
View File
@@ -0,0 +1,15 @@
config BR2_PACKAGE_RASPBERRYPI_RPI2
bool "Raspberry Pi 2 Model B (32-bit ARMv7)"
depends on BR2_arm
select SDCARD_AUX
select BR2_PACKAGE_FEATURE_WIFI
select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI
select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_WIFI
help
Support for the 32-bit ARMv7 Raspberry Pi 2B single-board computer
(SBC) with BCM2836 quad-core Cortex-A7 processor.
This was the only Raspberry Pi model with the BCM2836 and the 2B
actually got a BCM2837 (Cortex-A53) underclocked an w/o wifi in
the v1.2 board revision.
+13
View File
@@ -0,0 +1,13 @@
Copyright (c) 2025 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+96
View File
@@ -0,0 +1,96 @@
Raspberry Pi 2 Model B
======================
The [Raspberry Pi 2 Model B][1] is a 32-bit ARM single-board computer,
powered by the Broadcom BCM2836 quad-core Cortex-A7 processor @ 900 MHz
with 1 GB RAM.
The board features:
- 4x USB 2.0 ports
- Fast Ethernet (100 Mbps)
- microSD card slot for storage
- HDMI port
- GPIO header (40-pin)
> [!NOTE]
> Revision 1.2 of the Pi 2B actually uses a BCM2837 (Cortex-A53) underclocked
> and without WiFi, making it very similar to the Pi 3B hardware-wise but
> running in 32-bit mode. This revision is not supported.
How to Build
------------
Since there are no pre-built images for ARM32, you need to build both Infix
and the bootloader from source.
1. Clone the repository
git clone https://github.com/kernelkit/infix.git
cd infix
2. Build the bootloader (in separate tree)
make O=x-boot rpi2_boot_defconfig
make O=x-boot
3. Build Infix (in another tree)
make O=x-arm32 aarch32_defconfig
make O=x-arm32
4. Create the SD card image
./utils/mkimage.sh -b x-boot -r x-arm32 raspberrypi-rpi2
The resulting image can be found in `x-boot/images/infix-arm-sdcard.img`
Flashing to SD Card
-------------------
[Flash the image][0] to a microSD card (at least 4 GB):
```bash
sudo dd if=x-boot/images/infix-arm-sdcard.img of=/dev/mmcblk0 \
bs=1M status=progress oflag=direct
```
You can also use `bmaptool`:
```bash
sudo bmaptool copy x-boot/images/infix-rpi2-sdcard.img /dev/mmcblk0
```
> [!WARNING]
> Ensure `/dev/mmcblk0` is the correct device for your SD card and not used by
> the host system! Use `lsblk` to verify.
Booting the Board
-----------------
1. Insert the flashed SD card into the Raspberry Pi
2. Connect an Ethernet cable (DHCP will be used to get an IP address)
3. Power up the board using a 5V/2.5A micro-USB power supply
The board will boot and obtain an IP address via DHCP on the Ethernet port.
Find the assigned IP and SSH in with the default login credentials, user/pass:
`admin` / `admin`.
Console Port (Optional)
-----------------------
A serial console can be useful for debugging. Connect a USB-to-TTL
serial adapter (3.3V) to GPIO pins:
- GND → Pin 6, ground
- TxD → Pin 8, GPIO 14
- RxD → Pin 10, GPIO 15
Serial settings: 115200 8N1
> [!WARNING]
> Use only 3.3V serial adapters. 5V adapters will damage your Raspberry Pi!
[0]: https://kernelkit.org/posts/flashing-sdcard/
[1]: https://www.raspberrypi.com/products/raspberry-pi-2-model-b/
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
mkdir /mnt/primary
mount /dev/disk0.primary /mnt/primary
global.bootm.image="/mnt/primary/boot/zImage"
global.bootm.oftree="/mnt/primary/boot/broadcom/bcm2836-rpi-2-b.dtb"
global.linux.bootargs.base="quiet console=ttyAMA0,115200 console=tty1 rauc.slot=primary"
global.linux.bootargs.dyn.root="root=PARTLABEL=primary rootwait ro"
bootm
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Barebox configuration for Raspberry Pi 2
# Boot timeout (seconds)
global autoboot_timeout=3
# Default boot order
global boot.default="mmc net"
# Enable colored output if supported
global allow_color=true
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
# Automount MMC partitions
mkdir -p /mnt/mmc
automount /mnt/mmc 'mci0.probe=1 && mount /dev/disk0.0 /mnt/mmc'
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# Set boot order: try mmc first, then network
global.boot.default="mmc net"
@@ -0,0 +1,17 @@
# Minimal Barebox configuration for Raspberry Pi 2
# Basic boot only - A/B partitioning and secure boot to be added later
# Enable custom embedded environment
CONFIG_DEFAULT_ENVIRONMENT=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
# Enable GPT partition table support for hybrid partition tables
CONFIG_PARTITION_DISK_EFI=y
# Enable SquashFS support for reading rootfs
CONFIG_FS_SQUASHFS=y
CONFIG_FS_SQUASHFS_LZ4=y
CONFIG_FS_SQUASHFS_LZO=y
CONFIG_FS_SQUASHFS_XZ=y
CONFIG_FS_SQUASHFS_ZLIB=y
CONFIG_FS_SQUASHFS_ZSTD=y
@@ -0,0 +1 @@
root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200
+19
View File
@@ -0,0 +1,19 @@
# Raspberry Pi bootloader (start.elf) configuration
#
# uart_2ndstage=1 - Enable early boot debug output from the bootloader
# Useful for debugging boot failures before Barebox starts
# Comment out for production to reduce boot noise
[all]
kernel=barebox-raspberry-pi-2.img
disable_overscan=1
enable_uart=1
#uart_2ndstage=1
[pi2]
start_file=start.elf
fixup_file=fixup.dat
gpu_mem=100
@@ -0,0 +1 @@
dtb-y += broadcom/bcm2836-rpi-2-b.dtb
@@ -0,0 +1 @@
# Placeholder - dtb-y is defined in parent Makefile
@@ -0,0 +1,19 @@
#include <arm/broadcom/bcm2836-rpi-2-b.dts>
#include "infix.dtsi"
/ {
/* CMA pool for GPU and video */
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
cma-reserved {
compatible = "shared-dma-pool";
size = <0x4000000>; /* 64MB */
alignment = <0x1000000>; /* 16MB aligned */
linux,cma-default;
reusable;
};
};
};
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Common Infix OS defaults
*/
/ {
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
};
@@ -0,0 +1,78 @@
image boot.vfat {
vfat {
files = {
#BOOT_FILES#
}
}
size = 32M
}
image cfg.ext4 {
empty = true
temporary = true
size = 16M
ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image #INFIX_ID##VERSION#-rpi2-sdcard.img {
hdimage {
partition-table-type = "hybrid"
}
partition boot {
partition-type = 0xc
bootable = "true"
image = "boot.vfat"
}
partition aux {
partition-type-uuid = srv
image = "aux.ext4"
}
partition primary {
partition-type-uuid = linux
bootable = "true"
size = 250M
image = "rootfs.squashfs"
}
partition secondary {
partition-type-uuid = linux
bootable = "true"
size = 250M
image = "rootfs.squashfs"
}
partition cfg {
partition-type-uuid = srv
image = "cfg.ext4"
}
partition var {
partition-type-uuid = var
image = "var.ext4"
}
}
@@ -0,0 +1,61 @@
# Raspberry Pi 2 Model B specific kernel configuration
define RASPBERRYPI_RPI2_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_SOUND)
$(call KCONFIG_ENABLE_OPT,CONFIG_SND)
$(call KCONFIG_ENABLE_OPT,CONFIG_SND_SOC)
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_MOUSE)
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_KEYBOARD)
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_TOUCHSCREEN)
$(call KCONFIG_SET_OPT,CONFIG_INPUT_MOUSEDEV,m)
$(call KCONFIG_SET_OPT,CONFIG_HID_GENERIC,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_BCM)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_BCM2835)
$(call KCONFIG_SET_OPT,CONFIG_BCM2835_MBOX,y)
$(call KCONFIG_ENABLE_OPT,CONFIG_BCM2835_WDT)
$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_BCM2835)
$(call KCONFIG_ENABLE_OPT,CONFIG_RASPBERRYPI_FIRMWARE)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_BCM2835)
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_BCM2835)
$(call KCONFIG_SET_OPT,CONFIG_BRCMFMAC,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_BRCMFMAC_SDIO)
$(call KCONFIG_SET_OPT,CONFIG_I2C_BCM2835,m)
$(call KCONFIG_SET_OPT,CONFIG_BCM2835_THERMAL,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_BCM2835)
$(call KCONFIG_ENABLE_OPT,CONFIG_RASPBERRYPI_POWER)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_CONSOLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_BCM2835AUX)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_EXTENDED)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_SHARE_IRQ)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_BROADCOM)
$(call KCONFIG_SET_OPT,CONFIG_SMSC911X,y)
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_GPIO,y)
$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_BCM2835)
$(call KCONFIG_ENABLE_OPT,CONFIG_CLK_RASPBERRYPI)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_KMS_HELPER)
$(call KCONFIG_SET_OPT,CONFIG_DRM_V3D,m)
$(call KCONFIG_SET_OPT,CONFIG_DRM_VC4,m)
$(call KCONFIG_SET_OPT,CONFIG_STAGING,y)
$(call KCONFIG_SET_OPT,CONFIG_SND_BCM2835,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_VC4_HDMI_CEC)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_LOAD_EDID_FIRMWARE)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_PANEL_BRIDGE)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_BRIDGE)
$(call KCONFIG_SET_OPT,CONFIG_DRM_TOSHIBA_TC358762,m)
$(call KCONFIG_SET_OPT,CONFIG_DRM_PANEL_SIMPLE,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_FB)
$(call KCONFIG_ENABLE_OPT,CONFIG_FRAMEBUFFER_CONSOLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_FBDEV_EMULATION)
$(call KCONFIG_SET_OPT,CONFIG_TOUCHSCREEN_EDT_FT5X06,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
endef
$(eval $(ix-board))
$(eval $(generic-package))
@@ -2,6 +2,17 @@
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"name": "USB",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
@@ -25,21 +36,22 @@
}
},
{
"name": "lan",
"name": "eth0",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.2.1",
"prefix-length": 24
}
]
},
"ietf-ip:ipv6": {}
},
{
"name": "wan",
"type": "infix-if-type:ethernet"
"infix-dhcp-client:dhcp": {
"option": [
{"id": "netmask"},
{"id": "broadcast"},
{"id": "router"},
{"id": "domain"},
{"id": "hostname"},
{"id": "dns-server"},
{"id": "ntp-server"},
{"id": "vendor-class", "value": "Raspberry Pi 2 Model B"}
]
}
}
}
]
},
@@ -48,9 +60,9 @@
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "ietf-crypto-types:ssh-public-key-format",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "ietf-crypto-types:rsa-private-key-format",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
@@ -92,7 +104,7 @@
],
"rule": [
{
"name": "deny-password-read",
"name": "deny-password-read",
"module-name": "ietf-system",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
@@ -131,7 +143,7 @@
}
},
"ietf-system:system": {
"hostname": "r2s",
"hostname": "rpi-%m",
"ntp": {
"enabled": true,
"server": [
@@ -140,7 +152,7 @@
"udp": {
"address": "pool.ntp.org"
},
"iburst": true
"iburst": true
}
]
},
@@ -153,40 +165,10 @@
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCAtLSBhIE5ldHdvcmsgT3BlcmF0aW5nIFN5c3RlbQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQuZ2l0aHViLmlvCictJy0tLSctJwo="
},
"infix-dhcp-client:dhcp-client": {
"client-if": [
{
"if-name": "wan",
"option": [
{
"name": "broadcast"
},
{
"name": "dns"
},
{
"name": "domain"
},
{
"name": "hostname"
},
{
"name": "ntpsrv"
},
{
"name": "router"
},
{
"name": "subnet"
}
]
}
]
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-meta:meta": {
"infix-meta:version": "1.2"
"version": "1.6"
},
"infix-services:mdns": {
"enabled": true
@@ -202,5 +184,23 @@
"restconf": {
"enabled": true
}
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
}
}
@@ -0,0 +1,8 @@
{
"eth0": {
"phy-detached-when-down": true
},
"@ethtool:driver=smsc95xx": {
"broken-flow-control": true
}
}
@@ -0,0 +1,13 @@
# CONFIG_MMC_PCI is not set
CONFIG_OF_OVERLAY_LIST="rpi-env infix-key"
# CONFIG_ENV_IS_IN_FAT is not set
# Increase early malloc heap to handle DTB with embedded scripts
CONFIG_SYS_MALLOC_F_LEN=0x2000
# Compression support needed for SquashFS
CONFIG_LZ4=y
CONFIG_LZMA=y
CONFIG_CMD_LZMADEC=y
CONFIG_CMD_UNLZ4=y
CONFIG_CMD_UNZIP=y
@@ -0,0 +1,27 @@
/dts-v1/;
/plugin/;
&{/} {
config {
environment {
vendor = "infix";
preboot = "run ixpreboot";
ixbootdelay = "0.5";
bootdelay = "-2";
bootmenu_delay = "10";
boot_targets = "mmc0";
ethprime = "eth0";
bootcmd = "run ixboot";
ixpreboot = /incbin/("scripts/ixpreboot.sh");
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
ixbtn-factory = "echo \"No button available, use bootmenu\"";
ixfactory = /incbin/("scripts/ixfactory.sh");
ixboot = /incbin/("scripts/ixboot.sh");
ixbootslot = /incbin/("scripts/ixbootslot.sh");
ixprepblk = /incbin/("scripts/ixprepblk.sh");
ixprepdhcp = /incbin/("scripts/ixprepdhcp.sh");
};
};
};
+13
View File
@@ -0,0 +1,13 @@
if BR2_aarch64
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/alder-alder/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/bananapi-bpi-r3/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/freescale-imx8mp-evk/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/friendlyarm-nanopi-r2s/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/marvell-cn9130-crb/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/marvell-espressobin/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/microchip-sparx5-pcb135/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/raspberrypi-rpi64/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/styx-dcp-sc-28p/Config.in"
endif
+2
View File
@@ -4,6 +4,8 @@ aarch64
Board Specific Documentation
----------------------------
- [Banana Pi R3](banana-pi-r3/)
- [Marvell CN9130-CRB](cn9130-crb/)
- [Microchip SparX-5i PCB135 (eMMC)](sparx5-pcb135/)
- [NanoPi R2S](r2s/)
- [Raspberry Pi 64-bit](raspberry-pi64/)
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_BANANAPI_BPI_R3
bool "Banana Pi R3"
depends on BR2_aarch64
select BR2_PACKAGE_FEATURE_WIFI
select BR2_PACKAGE_LINUX_FIRMWARE
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7986
select SDCARD_AUX
help
Build Banana PI R3 support
+13
View File
@@ -0,0 +1,13 @@
Copyright (c) 2025 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+229
View File
@@ -0,0 +1,229 @@
# Banana Pi BPI-R3
<img src="bananapi-bpi-r3.webp" alt="The board" width=800 padding=10>
## Overview
The Banana Pi R3 is a high-performance networking board with full Infix
support for all enabled features including switched Ethernet ports, WiFi,
and SFP interfaces.
### Hardware Features
- MediaTek MT7986 ARM Cortex-A53 quad-core processor @ 2.0 GHz
- 2 GB DDR4 RAM
- 8 GB eMMC storage + microSD card slot
- 5x Gigabit Ethernet ports (4x LAN, 1x WAN)
- 2x SFP cages for fiber connectivity (1G/2.5G)
- Dual-band WiFi (2.4 GHz + 5 GHz)
- USB 3.0 port
- Mini PCIe slot
### Default Network Configuration
Infix comes preconfigured with:
- **LAN ports** (lan1-lan4): Bridged for internal networking
- **WAN port**: DHCP client enabled for internet connectivity
- **SFP ports** (sfp1, sfp2): Available for configuration
- **WiFi interfaces** (wifi0, wifi1): Available for configuration
## Getting Started
### Quick Start with SD Card
The easiest way to get started is using an SD card:
1. **Download the SD card image:** [infix-bpi-r3-sdcard.img][2]
2. **Flash the image to an SD card:** see [this guide][0]
3. **Set boot switches:**
- Set DIP switches to **0000** (SD card boot mode)
- Switch positions are on the underside of the board near the SD slot
4. **Boot the board:**
- Insert the SD card
- Connect power
- Connect to LAN port or console (115200 8N1)
- Default login: `admin` / `admin`
### Boot Switch Reference
The BPI-R3 has a 4-position DIP switch that controls boot media:
<img align="right" src="bootstrap-switch.webp" alt="DIP switches" width=200 padding=10>
| Position | Mode | Description |
|----------|-------------|---------------------------------------|
| 0000 | SD card | Boot from microSD card (recommended) |
| 0110 | eMMC | Boot from internal eMMC storage |
| 1010 | SPI NAND | Boot from SPI NAND (advanced users) |
> [!NOTE]
> Switch position is read from left to right: "0" = OFF, "1" = ON.
> When the DIP switch is in the "UP" position it is OFF(0).
## Advanced: Installing to eMMC
For production deployments or better performance, you can install Infix
to the internal eMMC storage. This is more complex but provides faster
boot times and eliminates the external SD card.
### Why Use eMMC?
**Advantages:**
- Faster boot and better performance
- No external SD card to manage
- More robust for industrial/embedded deployments
**Disadvantages:**
- More complex installation process
- Requires intermediate NAND boot step
- Harder to recover from errors
### Prerequisites
- FTDI USB-to-serial cable (3.3V) for console access
- microSD card with Infix (for initial boot)
- USB flash drive (FAT32 formatted)
- Downloaded files (see below)
### Required Files
Download and place these files on a FAT32-formatted USB drive:
1. **Intermediate NAND bootloader** (from Frank-W's U-Boot):
- [bpi-r3_spim-nand_bl2.img][5] (BL2 loader)
- [bpi-r3_spim-nand_fip.bin][6] (FIP image)
2. **Infix eMMC image:**
- [infix-bpi-r3-emmc.img][3] (Complete system image)
3. **eMMC bootloader** (extracted from):
- [bpi-r3-emmc-boot-2025.01-latest.tar.gz][4]
- Extract `bl2.img` from the tarball to your USB drive
> [!WARNING]
> The following process involves multiple boot mode changes. Take your
> time verify each step carefully.
### Installation Steps
#### Step 1: Boot from SD card
1. Set boot switches to **0000** (SD card mode)
2. Insert SD card with Infix
3. Power on and break into U-Boot (press Ctrl-C during boot)
#### Step 2: Flash intermediate NAND bootloader
This step installs a temporary bootloader to NAND that will help us
flash the eMMC. From the U-Boot prompt:
```
usb start
mtd erase spi-nand0
fatload usb 0:1 0x50000000 bpi-r3_spim-nand_bl2.img
mtd write spi-nand0 0x50000000 0x0 0x100000
fatload usb 0:1 0x50000000 bpi-r3_spim-nand_fip.bin
mtd write spi-nand0 0x50000000 0x380000 0x200000
```
#### Step 3: Boot from NAND
1. Power off the board
2. Set boot switches to **1010** (NAND mode)
3. Power on - you should boot into U-Boot again
#### Step 4: Write Infix image to eMMC
From the U-Boot prompt:
```
usb start
fatload usb 0:1 0x50000000 infix-bpi-r3-emmc.img
setexpr blocks ${filesize} / 0x200
mmc write 0x50000000 0x0 ${blocks}
```
This writes the complete Infix system (partitions, rootfs, etc.) to eMMC.
#### Step 5: Configure eMMC boot
Now configure the eMMC boot partition and write the bootloader:
```
mmc partconf 0 1 1 1
mmc erase 0x0 0x400
fatload usb 0:1 0x50000000 bl2.img
mmc write 0x50000000 0x0 0x400
mmc partconf 0 1 1 0
```
#### Step 6: Boot from eMMC
1. Power off the board
2. Set boot switches to **0110** (eMMC mode)
3. Remove SD card (optional, but recommended to verify eMMC boot)
4. Power on
Your BPI-R3 should now boot Infix from internal eMMC storage!
## Troubleshooting
### Board won't boot
- Verify boot switch positions (check twice!)
- Ensure power supply provides adequate current (12V/2A recommended)
- Try booting from SD card with switches at **0000**
### Can't break into U-Boot
- Ensure serial console is connected properly (115200 8N1, 3.3V)
- Press Ctrl-C immediately when you see boot messages
- Try power cycling and pressing Ctrl-C repeatedly
### eMMC boot fails after installation
- Boot from NAND (**1010**) and verify eMMC image was written
- Check USB drive contents - ensure all files are present
- Re-run Step 5 (eMMC boot configuration)
### Reverting to SD card
Simply set boot switches back to **0000** and boot from SD card. The
eMMC installation does not affect SD card functionality.
## Additional Resources
- [Infix Documentation][1]
- [Official BPI-R3 Wiki][7]
- [Release Downloads][8]
## Building Custom Images
See the main Infix documentation for building from source. To build both
SD card and eMMC images locally:
```bash
# Build bootloaders for both SD and eMMC
make x-bpi-r3-sd-boot
make x-bpi-r3-emmc-boot
# Build main system
make aarch64
# Create SD card image
./utils/mkimage.sh -od bananapi-bpi-r3
# Create eMMC image
./utils/mkimage.sh -odt emmc bananapi-bpi-r3
```
[0]: https://kernelkit.org/posts/flashing-sdcard/
[1]: https://kernelkit.org/infix/latest/
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-sdcard.img
[3]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-emmc.img
[4]: https://github.com/kernelkit/infix/releases/download/latest-boot/bpi-r3-emmc-boot-2025.01-latest.tar.gz
[5]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-10-bpi-2025.10-2025-10-13_1032/bpi-r3_spim-nand_bl2.img
[6]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-10-bpi-2025.10-2025-10-13_1032/bpi-r3_spim-nand_fip.bin
[7]: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
[8]: https://github.com/kernelkit/infix/releases/tag/latest-boot
@@ -0,0 +1,36 @@
define BANANAPI_BPI_R3_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_MACH_MT7986)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_MT7986)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_MT6577)
$(call KCONFIG_SET_OPT,CONFIG_I2C_GPIO,y)
$(call KCONFIG_SET_OPT,CONFIG_MTK_THERMAL,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_UART)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_WATCHDOG)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_GE_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MEDIATEK)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_MEDIATEK_SOC)
$(call KCONFIG_SET_OPT,CONFIG_NET_DSA_MT7530,m)
$(call KCONFIG_SET_OPT,CONFIG_MT7915E,m)
$(call KCONFIG_SET_OPT,CONFIG_PCIE_MEDIATEK_GEN3,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_SCPSYS)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_MTK)
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_HSDMA)
$(call KCONFIG_SET_OPT,CONFIG_MT7915E,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_MT798X_WMAC)
$(call KCONFIG_SET_OPT,CONFIG_MTK_SOC_THERMAL,m)
$(call KCONFIG_SET_OPT,CONFIG_I2C_MT65XX,m)
$(call KCONFIG_SET_OPT,CONFIG_USB_XHCI_MTK,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_TPHY,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_XSPHY,m)
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_GPIO,y)
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_MT6380,m)
$(call KCONFIG_SET_OPT,CONFIG_PWM_MEDIATEK,m)
$(call KCONFIG_SET_OPT,CONFIG_SENSORS_PWM_FAN,m)
$(call KCONFIG_SET_OPT,CONFIG_NVMEM_MTK_EFUSE,m)
$(call KCONFIG_SET_OPT,CONFIG_CRYPTO_DEV_SAFEXCEL,m)
endef
$(eval $(ix-board))
$(eval $(generic-package))
Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

@@ -0,0 +1 @@
dtb-y += mediatek/mt7986a-bananapi-bpi-r3-sd.dtb mediatek/mt7986a-bananapi-bpi-r3-emmc.dtb
@@ -0,0 +1,2 @@
#include "mt7986a-bananapi-bpi-r3.dtsi"
#include "mt7986a-bananapi-bpi-r3-emmc.dtsi"
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Copyright (C) 2021 MediaTek Inc.
* Author: Sam.Shih <sam.shih@mediatek.com>
*/
/*
This is copied from linux where it is an overlay, unfortunatly it is not
possible to use dtbo in sysboot unless present in syslinux.conf
*/
&{/soc/mmc@11230000} {
bus-width = <8>;
max-frequency = <200000000>;
cap-mmc-highspeed;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
hs400-ds-delay = <0x14014>;
non-removable;
no-sd;
no-sdio;
status = "okay";
};
@@ -0,0 +1,2 @@
#include "mt7986a-bananapi-bpi-r3.dtsi"
#include "mt7986a-bananapi-bpi-r3-sd.dtsi"
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Copyright (C) 2021 MediaTek Inc.
* Author: Sam.Shih <sam.shih@mediatek.com>
*/
/*
This is copied from linux where it is an overlay, unfortunatly it is not
possible to use dtbo in sysboot unless present in syslinux.conf
*/
&{/soc/mmc@11230000} {
bus-width = <4>;
max-frequency = <52000000>;
cap-sd-highspeed;
status = "okay";
};
@@ -0,0 +1,59 @@
#include <arm64/mediatek/mt7986a-bananapi-bpi-r3.dts>
/ {
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
usb-ports = <&ssusb>;
usb-port-names = "USB";
};
};
};
&cpu_thermal {
/delete-node/ trips;
/delete-node/ cooling-maps;
trips {
cpu_trip_active_cool: cpu-trip-active-cool {
temperature = <40000>; // 40°C
hysteresis = <2000>; // 2°C hysteresis
type = "active";
};
cpu_trip_active_low: cpu-trip-active-low {
temperature = <45000>; // 40°C
hysteresis = <2000>; // 2°C hysteresis
type = "active";
};
cpu_trip_active_med: cpu-trip-active-med {
temperature = <60000>; // 60°C
hysteresis = <2000>; // 2°C hysteresis
type = "active";
};
cpu_trip_hot: cpu-trip-hot {
temperature = <80000>; // 80°C
hysteresis = <2000>; // 2°C hysteresis
type = "hot";
};
cpu_trip_critical: cpu-trip-critical {
temperature = <90000>; // 90°C
hysteresis = <2000>; // 2°C hysteresis
type = "critical";
};
};
cooling-maps {
map-cpu-40deg {
cooling-device = <&fan 0 0>;
trip = <&cpu_trip_active_cool>;
};
map-cpu-45deg {
cooling-device = <&fan 1 1>;
trip = <&cpu_trip_active_low>;
};
map-cpu-60deg {
cooling-device = <&fan 2 2>;
trip = <&cpu_trip_active_med>;
};
};
};
@@ -0,0 +1,82 @@
image cfg.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image #INFIX_ID##VERSION#-bpi-r3-#TARGET#.img {
hdimage {
partition-table-type = "gpt"
}
# BL2 bootloader partition (MediaTek official location)
partition bl2 {
image = "bl2.img"
offset = 1024s # 0x80000 = sector 1024
size = 4M # 0x400000
bootable = true
}
# Factory/calibration data (sectors 9216-13311)
partition factory {
offset = 4608K # 0x480000
size = 2M # 0x200000
}
# FIP partition - BL31 + U-Boot (sectors 13312-17407)
partition fip {
# partition-type = 0x83 # Linux filesystem
image = "fip.bin"
offset = 13312s
size = 4096s
}
partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
}
partition primary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition secondary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition cfg {
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
image = "cfg.ext4"
}
partition var {
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
image = "var.ext4"
}
}
@@ -0,0 +1,345 @@
{
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"name": "USB",
"class": "infix-hardware:usb",
"state": {
"admin-state": "unlocked"
}
},
{
"class": "infix-hardware:usb",
"name": "USB2",
"state": {
"admin-state": "unlocked"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.0.1",
"prefix-length": 24
}
]
}
},
{
"name": "lan1",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan2",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan3",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lan4",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lo",
"type": "infix-if-type:loopback",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"prefix-length": 128
}
]
}
},
{
"name": "sfp1",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {}
},
{
"name": "sfp2",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {}
},
{
"name": "wan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"ietf-ip:ipv4": {
"infix-dhcp-client:dhcp": {
"option": [
{"id": "ntp-server"},
{"id": "broadcast"},
{"id": "domain"},
{"id": "hostname"},
{"id": "dns-server"},
{"id": "router"},
{"id": "netmask"},
{"id": "vendor-class", "value": "Banana Pi BPI-R3"}
]
}
},
"ietf-ip:ipv6": {
"infix-dhcpv6-client:dhcp": {
"option": [
{"id": "ntp-server"},
{"id": "client-fqdn"},
{"id": "domain-search"},
{"id": "dns-server"}
]
}
}
},
{
"name": "wifi0",
"type": "infix-if-type:wifi"
},
{
"name": "wifi1",
"type": "infix-if-type:wifi"
}
]
},
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"groups": {
"group": [
{
"name": "admin",
"user-name": [
"admin"
]
}
]
},
"rule-list": [
{
"name": "admin-acl",
"group": [
"admin"
],
"rule": [
{
"name": "permit-all",
"module-name": "*",
"access-operations": "*",
"action": "permit",
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-read",
"module-name": "ietf-system",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny"
}
]
}
]
},
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-address": "::"
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
"ietf-system:system": {
"hostname": "bpi-%m",
"ntp": {
"server": [
{
"name": "default",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-dhcp-server:dhcp-server": {
"option": [
{
"id": "ntp-server",
"address": "auto"
},
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"subnet": [
{
"subnet": "192.168.0.0/24",
"pool": {
"start-address": "192.168.0.100",
"end-address": "192.168.0.250"
}
}
]
},
"infix-firewall:firewall": {
"default": "wan",
"zone": [
{
"name": "lan",
"action": "accept",
"interface": [
"br0"
]
},
{
"name": "wan",
"action": "drop",
"interface": [
"wan"
],
"service": [
"dhcpv6-client"
]
}
],
"policy": [
{
"name": "lan-to-wan",
"action": "accept",
"ingress": [
"lan"
],
"egress": [
"wan"
],
"masquerade": true
}
]
},
"infix-meta:meta": {
"version": "1.6"
},
"infix-services:mdns": {
"enabled": true
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
},
"infix-services:web": {
"enabled": true,
"console": {
"enabled": true
},
"netbrowse": {
"enabled": true
},
"restconf": {
"enabled": true
}
}
}
@@ -0,0 +1,3 @@
#!/bin/sh
udevadm control --reload-rules
udevadm trigger --subsystem-match=net --action=add
@@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/15100000.ethernet/net/eth1", NAME="sfp1"
@@ -0,0 +1,3 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi mt7986-emmc-env.dtsi"
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BOOT_DEVICE=emmc DRAM_USE_DDR4=1 USE_MKIMAGE=1 MKIMAGE=$(HOST_DIR)/bin/mkimage"
CONFIG_SUPPORT_EMMC_BOOT=y
@@ -0,0 +1,33 @@
CONFIG_AUTOBOOT=y
CONFIG_BOOTDELAY=2
# CONFIG_MMC_PCI is not set
CONFIG_ENV_IS_NOWHERE=y
# CONFIG_ENV_IS_IN_MMC is not set
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_MTK=y
CONFIG_USB_MTU3=y
CONFIG_PHY=y
CONFIG_PHY_MTK_TPHY=y
CONFIG_MTK_SPIM=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_SPI_FLASH=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_SPI_NAND=y
CONFIG_MTK_SPIM=y
CONFIG_MTK_SNOR=y
CONFIG_CMD_SF=y
CONFIG_CMD_USB=y
CONFIG_CMD_MTD=y
CONFIG_CMD_MTDPARTS=y
CONFIG_CMD_DM=y
@@ -0,0 +1,5 @@
#include <mt7986-env.dtsi>
&env {
fdtfile = "mediatek/mt7986a-bananapi-bpi-r3-emmc.dtb";
};
@@ -0,0 +1,25 @@
/ {
config {
env: environment {
/* After the MMC driver has enabled bus power,
* the controller seems to sometimes detect a
* card removal state , which causes it to
* disable power again. This hack re-enables the
* bus power in those cases.
*/
bootcmd = "run ixboot";
boot_targets = "mmc0";
ethprime = "eth0";
fdt_addr_r = "0x43f00000";
kernel_addr_r = "0x44000000";
scriptaddr = "0x48000000";
ramdisk_addr_r = "0x4A000000";
/* This is a development platform, keep
* developer mode statically enabled.
*/
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
ixbtn-factory = "echo \"No button available, use bootmenu\"";
};
};
};
@@ -0,0 +1,5 @@
#include <mt7986-env.dtsi>
&env {
fdtfile = "mediatek/mt7986a-bananapi-bpi-r3-sd.dtb";
};
@@ -0,0 +1 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi mt7986-sd-env.dtsi"
@@ -0,0 +1,6 @@
config BR2_PACKAGE_FREESCALE_IMX8MP_EVK
bool "NXP i.MX8MP EVK"
depends on BR2_aarch64
help
NXP i.MX8MP EVK
@@ -0,0 +1 @@
dtb-y += freescale/imx8mp-evk.dtb
@@ -0,0 +1,113 @@
#include <arm64/freescale/imx8mp-evk.dts>
#include <dt-bindings/usb/pd.h>
&usb3_phy0 {
status = "okay";
};
&iomuxc {
pinctrl_typec_mux: typec1muxgrp {
fsl,pins = <
MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20 0x16
>;
};
pinctrl_typec: typec1grp {
fsl,pins = <
MX8MP_IOMUXC_SAI1_TXD7__GPIO4_IO19 0x1c4
>;
};
};
&i2c2 {
ptn5110: tcpc@50 {
compatible = "nxp,ptn5110";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_typec>;
reg = <0x50>;
interrupt-parent = <&gpio4>;
interrupts = <19 8>;
port {
typec_dr_sw: endpoint {
remote-endpoint = <&usb3_drd_sw>;
};
};
usb_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
power-role = "dual";
data-role = "dual";
try-power-role = "sink";
source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
PDO_VAR(5000, 20000, 3000)>;
op-sink-microwatt = <15000000>;
self-powered;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;
typec_con_ss: endpoint {
remote-endpoint = <&usb3_data_ss>;
};
};
};
};
};
};
&usb3_phy0 {
fsl,phy-tx-vref-tune = <0xe>;
fsl,phy-tx-preemp-amp-tune = <3>;
fsl,phy-tx-vboost-level = <5>;
fsl,phy-comp-dis-tune = <7>;
fsl,pcs-tx-deemph-3p5db = <0x21>;
fsl,phy-pcs-tx-swing-full = <0x7f>;
status = "okay";
};
&usb3_0 {
status = "okay";
};
&usb_dwc3_0 {
dr_mode = "otg";
hnp-disable;
srp-disable;
adp-disable;
usb-role-switch;
role-switch-default-mode = "none";
snps,dis-u1-entry-quirk;
snps,dis-u2-entry-quirk;
status = "okay";
port {
usb3_drd_sw: endpoint {
remote-endpoint = <&typec_dr_sw>;
};
};
};
/ {
gpio-sbu-mux {
compatible = "gpio-sbu-mux";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_typec_mux>;
switch-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
orientation-switch;
port {
usb3_data_ss: endpoint {
remote-endpoint = <&typec_con_ss>;
};
};
};
chosen {
infix {
/* "admin" */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
};
@@ -0,0 +1,46 @@
define FREESCALE_IMX8MP_EVK_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_NXP)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_MXC)
$(call KCONFIG_ENABLE_OPT,CONFIG_FEC)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_STMICRO)
$(call KCONFIG_ENABLE_OPT,CONFIG_STMMAC_ETH)
$(call KCONFIG_ENABLE_OPT,CONFIG_DWMAC_IMX8)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_IMX)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_IMX_CONSOLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_IMX)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_IMX)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_IMX8MP)
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_MXC)
$(call KCONFIG_ENABLE_OPT,CONFIG_IMX2_WDT)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_OF_ESDHC)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_ESDHC_IMX)
$(call KCONFIG_ENABLE_OPT,CONFIG_CLK_IMX8MP)
$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM_IMX_OCOTP)
$(call KCONFIG_ENABLE_OPT,CONFIG_INTERCONNECT)
$(call KCONFIG_ENABLE_OPT,CONFIG_INTERCONNECT_IMX)
$(call KCONFIG_ENABLE_OPT,CONFIG_INTERCONNECT_IMX8MP)
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
# For X
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_ETNAVIV)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE)
$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_FSL_SAMSUNG_HDMI_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_IMX8MP_HDMI_PVI)
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_IMX_LCDIF)
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_MOUSE)
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_MOUSEDEV)
$(call KCONFIG_ENABLE_OPT,CONFIG_HID_GENERIC)
# For USB
$(call KCONFIG_DISABLE_OPT,CONFIG_USB)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC3)
$(call KCONFIG_DISABLE_OPT,CONFIG_USB_DWC3_GADGET)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC3_HOST)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_IMX_BUS_DEVFREQ)
$(call KCONFIG_ENABLE_OPT,CONFIG_TYPEC_TCPCI)
$(call KCONFIG_ENABLE_OPT,CONFIG_TYPEC_SWITCH_GPIO)
endef
$(eval $(ix-board))
$(eval $(generic-package))
@@ -0,0 +1,8 @@
{
"eth0": {
"phy-detached-when-down": true
},
"eth1": {
"broken-mqprio": true
}
}
@@ -0,0 +1,9 @@
config BR2_PACKAGE_FRIENDLYARM_NANOPI_R2S
bool "FriendlyElec NanoPi R2S"
depends on BR2_aarch64
select SDCARD_AUX
select BR2_PACKAGE_INPUT_EVENT_DAEMON
select BR2_PACKAGE_LINUX_FIRMWARE_RTL_815X
help
FriendlyElec NanoPi R2S is a compact router board based on
the Rockchip RK3328 SoC with dual Gigabit Ethernet ports.
@@ -0,0 +1,13 @@
Copyright (c) 2025 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1 @@
dtb-y += rockchip/rk3328-nanopi-r2s.dtb
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Common Infix OS defaults
*/
/ {
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
};
@@ -0,0 +1,23 @@
#include <arm64/rockchip/rk3328-nanopi-r2s.dts>
#include "infix.dtsi"
&rtl8153 {
/*
* Fix port number: device is on port 1, not port 2
*
* The kernel's usb_of_get_connect_type() function checks for child
* nodes with a 'reg' property matching the physical port number to
* determine if a USB port is "hard-wired" (internal) vs external.
* With authorized_default=2, only hard-wired ports are automatically
* authorized. The RTL8153 shows up as device 3-1 (hub 3, port 1), so
* reg must be <1> for the kernel to mark it as USB_PORT_CONNECT_TYPE_HARD_WIRED
* and authorize it automatically at boot.
*/
reg = <1>;
};
&{/chosen/infix} {
/* Expose only the external USB 2.0 port for user management */
usb-ports = <&usb_host0_ehci>;
usb-port-names = "USB";
};
@@ -0,0 +1,78 @@
define FRIENDLYARM_NANOPI_R2S_LINUX_CONFIG_FIXUPS
# Rockchip RK3328 SoC
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_ROCKCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_IOMMU)
$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_PM_DOMAINS)
$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_IODOMAIN)
# PHY drivers
$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_ROCKCHIP_EMMC)
$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_ROCKCHIP_INNO_USB2)
$(call KCONFIG_ENABLE_OPT,CONFIG_PHY_ROCKCHIP_TYPEC)
$(call KCONFIG_SET_OPT,CONFIG_PHY_ROCKCHIP_USB,m)
$(call KCONFIG_SET_OPT,CONFIG_PHY_ROCKCHIP_PCIE,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_ROCKCHIP_PHY)
# Clocks and Power Management
$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_ROCKCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_CLK_RK3328)
$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_PWM)
$(call KCONFIG_ENABLE_OPT,CONFIG_PWM_ROCKCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_GPIO)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_RK808)
$(call KCONFIG_ENABLE_OPT,CONFIG_CHARGER_RK817)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_RK805)
# I2C Controller
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_RK3X)
# I2C/SPI/MFD
$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_RK8XX_I2C)
$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_RK8XX_SPI)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_ROCKCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_RK805_PWRKEY)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_DRV_RK808)
# MMC/Storage
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_DW_ROCKCHIP)
# PCIe
$(call KCONFIG_SET_OPT,CONFIG_PCIE_ROCKCHIP_HOST,m)
$(call KCONFIG_ENABLE_OPT,CONFIG_PCIE_ROCKCHIP_DW_HOST)
# Thermal and ADC
$(call KCONFIG_SET_OPT,CONFIG_ROCKCHIP_THERMAL,m)
$(call KCONFIG_SET_OPT,CONFIG_ROCKCHIP_SARADC,m)
# Crypto
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ROCKCHIP)
# NVMEM
$(call KCONFIG_SET_OPT,CONFIG_NVMEM_ROCKCHIP_EFUSE,m)
$(call KCONFIG_SET_OPT,CONFIG_NVMEM_ROCKCHIP_OTP,m)
# Network: STMMAC Ethernet (WAN port - RK3328 GMAC with RTL8211E PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_STMICRO)
$(call KCONFIG_ENABLE_OPT,CONFIG_STMMAC_ETH)
$(call KCONFIG_ENABLE_OPT,CONFIG_STMMAC_PLATFORM)
$(call KCONFIG_ENABLE_OPT,CONFIG_DWMAC_ROCKCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
# Network: USB Ethernet (LAN port - RTL8153 via USB 3.0)
$(call KCONFIG_SET_OPT,CONFIG_USB_NET_DRIVERS,m)
$(call KCONFIG_SET_OPT,CONFIG_USB_RTL8152,m)
# USB 3.0 xHCI Controller (required for RTL8153 LAN port)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_XHCI_HCD)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_XHCI_PLATFORM)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC3)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_DWC3_HOST)
# USB 2.0 Host
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_HCD)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_HCD_PLATFORM)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_ROOT_HUB_TT)
endef
$(eval $(ix-board))
$(eval $(generic-package))
@@ -5,21 +5,28 @@ image cfg.ext4 {
ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 512M
size = 128M
ext4 {
label = "var"
use-mke2fs = true
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image sdcard.img {
image #INFIX_ID##VERSION#-nanopi-r2s-sdcard.img {
hdimage {
partition-table-type = "gpt"
}
@@ -0,0 +1,295 @@
{
"ieee802-dot1ab-lldp:lldp": {
"infix-lldp:enabled": true
},
"ietf-hardware:hardware": {
"component": [
{
"class": "infix-hardware:usb",
"name": "USB",
"state": {
"admin-state": "unlocked"
}
}
]
},
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.0.1",
"prefix-length": 24
}
]
}
},
{
"name": "lan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
{
"name": "lo",
"type": "infix-if-type:loopback",
"ietf-ip:ipv4": {
"address": [
{
"ip": "127.0.0.1",
"prefix-length": 8
}
]
},
"ietf-ip:ipv6": {
"address": [
{
"ip": "::1",
"prefix-length": 128
}
]
}
},
{
"name": "wan",
"type": "infix-if-type:ethernet",
"ietf-ip:ipv6": {},
"ietf-ip:ipv4": {
"infix-dhcp-client:dhcp": {
"option": [
{"id": "ntp-server"},
{"id": "broadcast"},
{"id": "domain"},
{"id": "hostname"},
{"id": "dns-server"},
{"id": "router"},
{"id": "netmask"},
{"id": "vendor-class", "value": "NanoPi R2S"}
]
}
},
"ietf-ip:ipv6": {
"infix-dhcpv6-client:dhcp": {
"option": [
{"id": "ntp-server"},
{"id": "client-fqdn"},
{"id": "domain-search"},
{"id": "dns-server"}
]
}
}
}
]
},
"ietf-keystore:keystore": {
"asymmetric-keys": {
"asymmetric-key": [
{
"name": "genkey",
"public-key-format": "infix-crypto-types:ssh-public-key-format",
"public-key": "",
"private-key-format": "infix-crypto-types:rsa-private-key-format",
"cleartext-private-key": "",
"certificates": {}
}
]
}
},
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
"groups": {
"group": [
{
"name": "admin",
"user-name": [
"admin"
]
}
]
},
"rule-list": [
{
"name": "admin-acl",
"group": [
"admin"
],
"rule": [
{
"name": "permit-all",
"module-name": "*",
"access-operations": "*",
"action": "permit",
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "default-deny-all",
"group": [
"*"
],
"rule": [
{
"name": "deny-password-read",
"module-name": "ietf-system",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny"
}
]
}
]
},
"ietf-netconf-server:netconf-server": {
"listen": {
"endpoints": {
"endpoint": [
{
"name": "default-ssh",
"ssh": {
"tcp-server-parameters": {
"local-address": "::"
},
"ssh-server-parameters": {
"server-identity": {
"host-key": [
{
"name": "default-key",
"public-key": {
"central-keystore-reference": "genkey"
}
}
]
}
}
}
}
]
}
}
},
"ietf-system:system": {
"hostname": "r2s-%m",
"ntp": {
"server": [
{
"name": "default",
"udp": {
"address": "pool.ntp.org"
}
}
]
},
"authentication": {
"user": [
{
"name": "admin",
"password": "$factory$",
"infix-system:shell": "bash"
}
]
},
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-dhcp-server:dhcp-server": {
"option": [
{
"id": "ntp-server",
"address": "auto"
},
{
"id": "dns-server",
"address": "auto"
},
{
"id": "router",
"address": "auto"
}
],
"subnet": [
{
"subnet": "192.168.0.0/24",
"pool": {
"start-address": "192.168.0.100",
"end-address": "192.168.0.250"
}
}
]
},
"infix-firewall:firewall": {
"default": "wan",
"zone": [
{
"name": "lan",
"action": "accept",
"interface": [
"br0"
]
},
{
"name": "wan",
"action": "drop",
"interface": [
"wan"
],
"service": [
"dhcpv6-client"
]
}
],
"policy": [
{
"name": "lan-to-wan",
"action": "accept",
"ingress": [
"lan"
],
"egress": [
"wan"
],
"masquerade": true
}
]
},
"infix-meta:meta": {
"version": "1.6"
},
"infix-services:mdns": {
"enabled": true
},
"infix-services:ssh": {
"enabled": true,
"hostkey": [
"genkey"
],
"listen": [
{
"name": "ipv4",
"address": "0.0.0.0",
"port": 22
},
{
"name": "ipv6",
"address": "::",
"port": 22
}
]
},
"infix-services:web": {
"enabled": true,
"console": {
"enabled": true
},
"netbrowse": {
"enabled": true
},
"restconf": {
"enabled": true
}
}
}
@@ -0,0 +1,3 @@
#!/bin/sh
udevadm control --reload-rules
udevadm trigger --subsystem-match=net --action=add
@@ -1,2 +1,2 @@
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/ff540000.ethernet/net/eth0", NAME="wan"
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/ff600000.usb/xhci-hcd.0.auto/usb3/3-1/3-1:1.0/net/*", NAME="lan"
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/ff600000.usb/xhci-hcd.0.auto/usb5/5-1/5-1:1.0/net/*", NAME="lan"

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