40 Commits
Author SHA1 Message Date
Joachim Wiberg 17a1b80b83 Namespace Infix Kconfig options under IX_
Infix defines its own Kconfig options with unprefixed names (IMAGE_*,
QEMU_*, TRUSTED_KEYS*) and an INFIX_ prefix.  Unprefixed names risk
clashing with Buildroot and with other br2-externals/spins that source
our tree.

Rename all 86 options to a common IX_ prefix, collapsing the existing
INFIX_ ones, e.g. INFIX_IMAGE_ID becomes IX_IMAGE_ID.  The os-release
INFIX_DESC field is a runtime interface, not a Kconfig option, and is
kept; the qemu Config.in generator's @ARCH@ symbol is updated to match.

Closes #1305

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-07-06 05:28:11 +02:00
Joachim Wiberg e412c28c37 webui: bundle on-device User's Guide
Build the mkdocs User's Guide into WebUI images and surface it in the UI.
post-build.sh runs `mkdocs build` from the top-level mkdocs.yml into
/var/www/guide when the webui package is selected and mkdocs is on the
build host; nginx serves it read-only at /guide/.  The build is
best-effort — a missing mkdocs warns and ships without the guide rather
than failing — and minimal images (no webui) skip it.

The WebUI gates a book icon in the topbar and a User Guide item in the
user menu on the docs being present on disk (os.Stat, fail-closed), both
opening /guide/ in a new tab.

CI: a local setup-mkdocs composite action installs mkdocs and the
plugins from mkdocs.yml; the build and release workflows run it before
the build so images produced in CI include the guide.  developers-guide
documents the new build dependency and restores the missing
mkdocs-glightbox plugin.

Fixes #633

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-15 19:45:25 +02:00
Joachim Wiberg 07f23ec4f5 board/common: move hostname.d setup at runtime to build-time
Follow-up to 90f619b which first introduced the /etc/hostname.d concept.

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

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-03-20 16:18:05 +01:00
Joachim Wiberg 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
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
Tobias Waldekranz d16ad7eedc build: Define build id and version in one place
Before this change, setting `GIT_VERSION` in `make`'s environment was
intended to allow the user to specify a custom build id.  As it turns
out, `test/test.mk` had duplicated the logic from
`board/common/post-build.sh` to unconditionally override any value set
in it.  Because of the way `make` handles variables, where assignments
to variables inherited from the environment are exported back to
it[^1], this would mean that `test.mk` would always clobber any value
set by the user.  Furthermore, there is also this file called
`buildroot/package/git/git.mk`, which also (reasonably) has opinions
about what the proper value of `GIT_VERSION` should be.  In summary,
this was a bit of a mess.

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

[^1]: https://www.gnu.org/software/make/manual/html_node/Environment.html
2024-12-05 10:29:21 +01:00
Joachim Wiberg cedb654643 Add support for overriding the compatible string
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-22 18:32:55 +02:00
Joachim Wiberg d0f3a5c8b4 board/common: include .config as /usr/share/infix/config.gz
Issue #597

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-05 07:04:58 +02:00
Joachim Wiberg cf1c4c32f1 board/common: disable unused pam_lastlog.so from PAM login
Fixes the following recurring login warning in syslog.  (We cannot use
pam_lastlog.so since it does not rotate its /var/log/lastlog file.)

login[2819]: PAM unable to dlopen(/lib/security/pam_lastlog.so): /lib/security/pam_lastlog.so: cannot open shared object file: No such file or directory

Follow-up to issue #542

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-30 15:29:11 +02:00
Joachim WibergandTobias Waldekranz 890d812b69 board/common: allow device specific compat strings for .pkg files
This patch allows us to define the rauc manifest compatibility string with
menuconfig.  The INFIX_IMAGE_ID is a direct replacement for the previously
composed "infix-$ARCH" in mkrauc.sh.

For example, the compatibility string "infix-aarch64" is replaced for the
NanoPi R2S with "infix-r2s" to ensure users get a proper warning if they
try upgrading to an image that maybe boots, but is not likely to work.

The CLI upgrade command gets a 'force' flag to override the compat string.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-16 16:47:28 +02:00
Joachim Wiberg 10744c5116 board/common: extract YANG documentation for all builds
This change builds on top of the earlier work to bootstrap Infix YANG
modules at build time.  Adding a step at the end of post-build.sh to
call the yangdoc tool.  The resulting yangdoc.html is a stand-alone HTML
file of (almost) all YANG nodes.  Almost because some top-level nodes
are unused by Infix atm. and have been filtered out for readability.

Fixes #432

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-06-28 12:54:27 +02:00
Joachim Wiberg b3bb8a3075 confd: enable/disable nginx servers using available/enabled symlinks
Relocate all nginx .conf files to board/common/rootfs/etc/nginx/ and
introduce available/*.conf with symlinks to enabled/*.conf

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg efec5f57cd confd: make web server and web console interface configurable
This commit adds an initial YANG model for Infix web services under the
infix-services.yang umbrella.  For now the nginx server statements in
/etc/nginx/nginx.conf are always on, but the backend ttyd, and the
entire nginx server can be disabled.

The default in the YANG model for both is disabled, the factory-config
has been updated to enable these services by default.

The Web Console Interface mDNS service has been updated to advertise
on port 7681, which nginx is set to forward to ttyd.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg 874873e727 board/common: add nginx HTTPS server, with dependency on mkcert
Refactor setup to automatically redirect http -> https, dropping
the /browse location for now.

Also, log to syslog, which has log rotation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg d1fe3b1311 confd: generate mDNS service records on hostname changes
This commit implements Infix mDNS TXT records, version 1, for available
services.  Hard coded for the moment.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg 92d3db46a7 netbrowse: convert to gunicorn and factor out mdns-alias app
Converting to gunicorn, which is the recommended production server for
Flask apps, means app main() function is no longer called at startup, so
we have to factor out the mDNS CNAME functionality for infix.local and
network.local to a separate app.

We take this opportunity to collapse the structure, move non-class
methods to __init.py__, and rename the AvahiAlias class.  A prototype
for replacing the overhead of mdns-alias with a C daemon is in its
early stages.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg c1836af7cc package/netbrowse: new package
- Advertises the build-time $hostname.local as a CNAME to the A and
   AAAA records already advertised by Avahi
 - Advertises a special network.local CNAME and provides a fastcgi
   service on unix:/tmp/netbrowse.sock for browsing mDNS services

This commit also activates netbrowse by default with nginx listeing
to port 80 on IPv4 and IPv6 /browse by default but also / if called
with server name network.local.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
Joachim Wiberg b55f74395b board/netconf: simplify and relocate to board/common
With Classic builds out of the way we can move everything back to common
again to simplify and reduce our collective cognitive overhead a bit.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-11 06:19:07 +02:00
Joachim Wiberg 493be97769 Drop legacy Classic builds
The Classic builds served for a while as an introduction to classic
embedded systems, with a user managed read-writable /etc.  Today we
decided to firmly take the plunge into the future with NETCONF and
focus on our core platforms aarch64 and x86_64 (for Qemu).

The reasons are several: reduce overhead, simplify build and release
work, as well as manual testing, since Classic builds do not have any
automated regression testing.

The Classic builds may be resurrected later in a dedicated project.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-11 06:19:07 +02:00
Joachim Wiberg 72b0f9f3eb board/common: add missing $VERSION to /etc/os-release PRETTY_NAME
Per spec[1], the PRETTY_NAME "May or may not contain a release code name
or OS version of some kind, as suitable." and seeing as this is not only
a common practice, Finit use this string in the heading when booting.

We've had this already in Infix a while back so it must have been lost
in one of many refactoring rounds.

[1]: https://www.freedesktop.org/software/systemd/man/latest/os-release.html

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-11-02 07:00:49 +01:00
Joachim Wiberg acecbe7e5d Allow custom image filename being set in menuconfig
This adds support for the two /etc/os-release variables:

 - IMAGE_ID
 - IMAGE_VERSION

The former is configurable, with fallback to name-arch, and the latter
is only set for relase builds.  During releae builds the release will
be appended to the image name.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-17 13:26:26 +02:00
Joachim Wiberg 09d48b35ee board/common: parameterized branding using menuconfig
This makes it possible for projects using Infix as a br2-external to
override lots of OS-specific strings and contact information that
previously was hard coded.

The generated /etc/os-release now takes most of its data from .config
Worth noting is the changes in VERSION and BUILD_ID fields.  The former
will be INFIX_RELEASE, during release builds, and the latter is always
the output from `git descibe ...`, or rather GIT_VERSION.  This variable
can be overloaded as well.

See the help text and the new doc/branding.md document for details.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-12 11:22:55 +02:00
Joachim Wiberg f2e30943ee board/common: generate images/Config.in and reduce x86 ram
The default arch and disk image filename needs to be generated
to be unique per, at least, each architecture build.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-12 11:22:55 +02:00
Joachim WibergandTobias Waldekranz e078465d19 confd: add support for specifying login shell for ietf-system users
- Add /bin/clish (symlink) to /etc/shells, as well as the traditional
   /bin/{true,false} for completeness
 - Validate shell string, with fallback to /bin/bash and /bin/sh
 - Step infix-system revision, keeping old model in tree

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-08-08 14:36:35 +02:00
Joachim WibergandTobias Waldekranz fd9d3a2723 board: minor shellsheck fixes
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-05 14:07:02 +02:00
Joachim WibergandTobias Waldekranz f8d5c3a9b8 Drop Infix Qemu support from "make menuconfig"
This change drops Qemu menuconfig from the regular 'make menuconfig' in
favor of full release tarball support.  Meaning "make update-defconfig"
will not longer cause unwanted diffs for Qemu defaults checked in when
the defconfigs are updated.

Details:

 - For "make run, run-menuconfig" and bootstrapping qemu.cfg we want to
   use the Buildroot menuconfig system. However, we must set the proper
   environment variables for it to not overwrite our product's .config,
   so the calls to conf and mconf are not pretty.

 - The qemu.sh script can probably be cleaned up further, I've just set
   a CONFIG_ prefix to all variables and dropped any images/ prefix vs.
   the original.  The CONFIG_ prefix is to make the qemu.cfg compatible
   with kconfig-mconf from the kconfig-frontends package.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-05 14:07:02 +02:00
Joachim Wiberg 806a0293a5 board/common: allow /bin/bash as login shell (BusyBox symlink)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-28 19:00:51 +02:00
Joachim WibergandTobias Waldekranz 8158d3bffb Simplify and refine NETCONF and Classic build variants
- board/common: drop everything not needed by NETCONF mode
 - board/classic: most board/common helpers relocated here
 - Simplify Finit scripts for critical services
 - Source variant from /etc/os-release to select ramdisk /etc

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-27 09:59:35 +02:00
Joachim Wiberg 2ff4f869fa board/common: add ID_LIKE, BUILD_ID and ARCHITECTURE to /etc/os-release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-24 01:50:36 +01:00
Joachim Wiberg c3d7405b8f Add support for using /usr/bin/pdmenu (setup) as a login shell
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 22:28:42 +01:00
Tobias Waldekranz fa4a83e38d board/common: Keep our own dhcpcd.conf
This avoids the issue where the config file keeps growing as more
"background" lines are appended to it with each build.
2023-02-09 09:43:15 +01:00
Tobias Waldekranz 16af6f9622 board/common: Remove remnants of dropbear key generation 2023-02-09 09:43:15 +01:00
Tobias Waldekranz 7740baf796 Revert "board/common: enable NETCONF over SSH"
This reverts commit 2ddf9448fe.

Two reasons:

1. We will move to a debian-style /etc/ssh/ssh_config.d/ structure
   soon.

2. In a managed scenario, NETCONF could be disabled, so mech should be
   responsible for activating it at boot.
2023-02-09 09:43:15 +01:00
Joachim Wiberg 2ddf9448fe board/common: enable NETCONF over SSH
The allows remote NETCONF access to the Clixon example (for now).  This
will be replaced later with the Clixon Infix system.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-08 14:53:03 +01:00
Joachim Wiberg e421e938ff board/common: ensure dhcpcd backgrounds immediately for quicker boot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-25 17:41:13 +01:00
Joachim Wiberg 8d9bd8ec09 Roll out final product branding
Change all inf/IX or Inf/IX to plain Infix after steering group meeting.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-05 21:09:05 +01:00
Joachim Wiberg 25205f0957 common: follow-up to 3cb7606, prevent host key regen on boot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-20 11:33:44 +01:00
Tobias Waldekranz 2bffa52be3 common/post-build: Use infix's version, not buildroot's, in os-release
This way we can more easily know exactly from which commit an image
was built.
2022-09-27 16:02:20 +02:00
Tobias Waldekranz 878e46c3f9 common/post-build: Make architecture independent
Until there's a real need to specify a variant, let's just not.
2022-09-27 16:02:20 +02:00
Joachim Wiberg 38b5c16dc1 board/common: generate /etc/os-release in new post-build.sh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-18 08:33:23 +02:00