Commit Graph
137 Commits
Author SHA1 Message Date
Joachim Wiberg f5a95b3a91 package/finit: bump to latest snapshot (pre -rc1)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-25 17:41:13 +01:00
Joachim Wiberg 1fd929a68e buildroot: bump to latest master for upcoming 2023 LTS
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-25 17:41:13 +01:00
Joachim Wiberg 1ee3ab604d package/skeleton-init-finit: enable Avahi if selected in Buildroot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-25 17:41:13 +01:00
Joachim Wiberg d6e578e060 package/ifupdown-ng: change to KernelKit integration branch
- Disable IPv6 on bridge links when adding to a bridge

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-25 12:41:14 +01:00
Joachim Wiberg 7a9af5d244 package/skeleton-init-finit: let /var/lock be a symlink to /run/lock
The whole of /var may be read-only, while /run is a newstyle ramdisk.
The /run/lock directory is created by the Finit bootmisc.so plugin at
boot.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-24 14:45:52 +01:00
Joachim Wiberg 51f24b7765 board/common: initial /etc/mdev.conf from mdev-like-a-boss
- Support modprobe for hotplugged devices
 - Allow writable /dev/{null,zero,...} by all users
 - Correct TTY and console permissions
 - Adapt groups to Buildroot standard (Debian)

https://github.com/slashbeast/mdev-like-a-boss

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-24 08:06:07 +01:00
Joachim Wiberg fef42eb45b configs: switch from ifupdown2 to ifupdown-ng
- Replace ISC dhclient with dhcpcd => IPv4 link-local address
 - Enable openresolv to handle /etc/resolv.conf for us
 - iproute2 was a dependency of ifupdown2, but now we need to
   enable it explicitly
 - Ensure we have the same default system interface in infix
 - Reenable BusyBox applets disabled when enabling ifupdown2, for
   infix derivatives that may prefer a smaller base image.

Note: ifupdown-ng prefers dhcpcd over udhcpc, so no risk for conflict by
      reenabling udhcpc.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-19 18:09:26 +01:00
Joachim Wiberg 9fd0015873 package/ifupdown-ng: new package
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-19 16:13:15 +01:00
Joachim Wiberg 9018024ca9 Add support for generating GNS3 appliance file for amd64 builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-16 19:15:40 +01:00
Joachim Wiberg 2a89445570 board/common: default to show group 'iface' in show iface command
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-16 19:15:40 +01:00
Joachim Wiberg 59a2abb203 board/common: include a default (empty) rc.local as example
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-16 19:15:40 +01:00
Joachim Wiberg 9cda32b4f5 board/common: bridge template for ifupdown2
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-16 19:15:40 +01:00
Joachim Wiberg e514cf419d board/common: use swup to ensure port and iface groups exist
Used by the 'show' script for grouping and filtering Linux interfaces.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-16 19:15:40 +01:00
Joachim Wiberg 3283090401 .github: always replace artifacts in the latest release
With two parallel builds (amd64, aarch64) we have contention of who last
uploads their artifact, meaning aarch currently removes the amd64 build.
This change should fix that.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-12 15:21:56 +01:00
Joachim Wiberg 3160162f9c .github: debug workflow, try *.tar.gz instead of *.tgz
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-11 22:43:59 +01:00
Joachim Wiberg ebc776bbfc .github: add workflow to build and upload tarballs to latest tag
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-11 18:35:32 +01:00
Joachim Wiberg b05f51f673 Guidelines for how to contribute to the project
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-11 18:07:12 +01:00
Joachim Wiberg d625a4915d Import a general CoC for project
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-11 17:58:35 +01:00
Joachim Wiberg bc21f93ec2 Add support for returning a device to factory defaults
This change adds a `factory` tool, and login shell, that schedules a
reset of all writable (overlay) filesystems.  The tool is set up with
the suid gid flag to allow all members of the wheel group to perform
the reset.

The login method only allows reset from /dev/console, to prevent any
malicious reset over SSH.  This should be further constrained later
when PAM is introduced.

To initiate factory reset from the login prompt, use login/pass:

    factory/reset

To initiate factory reset from the shell, call

    factory

Both methods are interactive by default, but two command line options
can be used to modify the behavior:

  -r  Skip reboot, and "reboot now?" question
  -y  Assume yes to all questions, for non-interactive use

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-04 15:24:36 +01:00
Joachim Wiberg ec177085d9 Reminders for later
@wkz look here, something for your ~/.emacs:

(use-package magit-org-todos
  :after magit
  :config
  (magit-org-todos-autoinsert)
  (setq magit-org-todos-filename "TODO.org"))

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-03 20:41:15 +01:00
Joachim Wiberg c748128137 configs: enable jq regexp support with Oniguruma
Needed by, e.g., new swup script, but also everything else we might want
to do with jq in any sane way.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-03 20:37:22 +01:00
Joachim Wiberg ccba72b083 Add factory default, all switch ports in group VLAN 1 on br0
This change checks¹ if the system does not have a br0 interface, creates
a default one consisting of all switch ports in VLAN 1 of br0.

On top of br0 a vlan1 management interface is created with DHCP address.

For emulation and test purposes, a way to supply tap interfaces from
Qemu, and pass off as if they were regular switch ports, is added.
____
¹ obviously a better way to detect a factory-reset device is needed,
  not all systems running infix will need or want a br0 interface.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-03 18:25:18 +01:00
Joachim Wiberg ec3c6e245a show: drop auto-port classification
This should now be handled by the swup script at bootstrap instead.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-03 18:14:43 +01:00
Joachim Wiberg 7e56dec874 board/common: new ifduown2 dhcp policy
Do not wait for dhclient to acquire first release, this will cause
unnecessary delays when booting, and not provide any real value in our
system.  Because we will never have any service that depends on a
network address being set when starting up, this is a feature that
Finit can provide for us as a condition when starting such services.

Also, never set global "README" in multiple policy files, this will
cause ifupdown2 to crash in horrific ways.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-03 17:11:02 +01:00
Joachim Wiberg ef86cd23f4 configs: enable rngd to improve entropy with /dev/hwrng
Also, enable virtio-rng-pci in Qemu for testing.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-21 10:35:37 +01:00
Joachim Wiberg 1c5730d193 configs: enable jq for all targets
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-21 10:35:00 +01:00
Joachim Wiberg 50493740e4 board/common: new script swup
Probe for switch ports, classify, rename interfaces according to mactab

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-20 16:32:21 +01:00
Joachim Wiberg c3cf4a4d60 board/common: set local mgmt interface prefix policy for ifupdown2
The default policy for management interface prefix in ifupdown2 is
"eth", which currently clashes with Infix default switch port names.
Changing our naming policy of switch ports to "swpN", mimicing the
naming using in Cumulus Linux, would also help.  To be discussed.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-16 11:29:32 +01:00
Joachim Wiberg d9841fbf3e board/common: override ifupdown2 addons.conf
We will not use features like batman, vxrd, or openvswitch.  Also, the
clagd and vxrd addons are not in ifupdown2, so likely proprietary ext.
by Cumulus.  Dropping them makes "unknown addon" warnings go away.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-16 11:27:22 +01:00
Joachim Wiberg 26e127d495 configs: enable mdnsd for all platforms
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 23:06:16 +01:00
Joachim Wiberg e3c772e25a package/ifupdown2: bump to latest git hash
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 23:05:07 +01:00
Joachim Wiberg ab6c156c89 board/common: add compat symlinks to ip command
Various scripts and tools search for the ip command in different
places.  Most distros install it to /bin/ip and symlink to /sbin
and /usr dito, but Buildroot only installs to /sbin/ip

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg 6a5ce15fc0 package/ifupdown2: use older version of python-mako for now
This is a workaround for the following code in ifupdown/template.py:37
that throw the exception with python-mako >= 1.2.0:

    try:
        self.logger.debug('setting template lookuppath to %s'
                template_lookuppath)
        lc = utils.importName('mako.lookup', 'TemplateLookup')
        self.tclassargs['lookup'] = lc(
                    directories=template_lookuppath.split(':'))
    except Exception as e:
        self.logger.warning('unable to set template lookup path'
                            ' %s (%s): are you sure \'python3-mako\''
                            'is installed?'
                            % (template_lookuppath, str(e)))

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg af6907a380 package/python-templating: port of old python-mako
The ifupdown2 package is incompatible with python-mako >= v1.2.0.  So as
a workaround we add the old one as a local override.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg 245c298f0d configs: drop old ifupdown-scripts, not needed anymore
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg 6829e0b72d Follow-up to e7d3a42: add noauto to cfgfs, optional feature atm
Unlike debugfs, cfgfs is currently an optional feature in Infix, so
let's set it to noauto for now.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg bf37f8bbf8 package/mdnsd: new package
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg dc42c70f4e configs: enable IGMP querier daemon in default builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg cfb8a8aa88 package/querierd: new package
The Westermo querierd is an IGMP querier daemon for use on top of a
standard Linux VLAN-aware bridge.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg 1653980b19 configs/aarch64_defconfig: enable mdio-tools
Latest Buildroot now has mdio-tools in mainline.  This is useful when
debugging devices attaced over MDIO interfaces, eg. switches.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg 08fba1ea05 buildroot: bump to latest master, preparing for 2023.02 LTS
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim Wiberg 3c02e4b675 board/common: silence runtime warnings from ifupdown2
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-14 22:21:16 +01:00
Joachim WibergandGitHub 698420b90d Mention ifupdown2, another load bearing component 2022-12-13 17:36:15 +01:00
Joachim Wiberg 63b0849ca7 qemu: prefer squashfs as initrd if enabled in .config
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-13 17:34:19 +01:00
Joachim Wiberg 66f605681d configs: enable socat, for testing and scripting
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-13 17:34:19 +01:00
Joachim Wiberg 989a81fdc9 Enable ifupdown2 for all platforms, replacing BusyBox ifup/ifdown
This change replaces the BusyBox ifup/ifdown applets with the full-blown
ifupdown2 package.  To get it fully working we also need to enable a few
missing kernel features: ipv4 + ipv6, multiple routing tables, and some
netfilter features.  We take the opportunity to sync kernel features in
between the two archs as well.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-13 17:34:19 +01:00
Joachim Wiberg cd5282c636 package/ifupdown2: new package
This is the next generation ifupdown from Cumulus Networks (now NVIDIA).
The idea is to use this to set up everything port/lag/vlan/interface
related in the system.

This first import uses the kkit branch from the KernelKit fork, becuase
of, amongst other things, integration problems with upstream packages.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-13 17:34:19 +01:00
Tobias Waldekranz e7d3a42eec common: Mount configfs, if available 2022-12-12 16:07:25 +01:00
Tobias Waldekranz d56937f9dc qemu: Support passing custom options to setup user mode networking
This can be used to specify things like port forwards, TFTP server,
etc.
2022-12-12 16:07:25 +01:00
Joachim Wiberg c2c45026d0 show: add support for port classification and "show port NAME"
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-08 11:29:58 +01:00