This change allows Liminix to be used as a non-flake input to a flake
by making <nixpkgs> into a default argument.
An example flake that makes use of this is here:
https://github.com/pcc/liminix-flake-demo
We use ifwait to monitor a bridged interface so we can add or remove it
to the bridge by bringing the associated service up or down. However,
bridge related netlink events can cause ifwait to incorrectly consider
the interface to have gone down. For example, nlmsg_type=RTM_DELLINK
with ifi_family=AF_BRIDGE, which is triggered by removing an interface
from a bridge, and does not indicate that the interface itself was
removed. Because a later RTM_NEWLINK will indicate that the link is still
up, ifwait will bring the service down and then up again, triggering
more netlink messages that keep ifwait in an infinite loop.
Fix it by checking specifically for RTM_NEWLINK and RTM_DELLINK messages
with ifi_family=AF_UNSPEC, which indicates an event related to the
interface itself.
This allows a system to be configured to dynamically bring up services
associated with an interface. For example, attaching a USB ethernet
adapter could trigger starting a DHCP client and an additional default
route for failover to an additional upstream.
The config changes here are a combination of:
- Converting the output of (in the OpenWrt repo):
```
git diff v24.10.6:./target/linux/mediatek/filogic/config-6.6 v25.12.2:./target/linux/mediatek/filogic/config-6.12
```
into Nix.
- Removing some overspecification of the kernel configuration, not
only for the 6.12 upgrade but also to support some changes that I made
to my personal configuration.
modprobe will print "builtin" lines for modules that are statically
linked into the kernel, which confuses this shell pipeline. Fix it by
adding a grep for "^insmod".
The specific rollover value is unspecified, but we assume that the other
side is U-Boot which rolls over to 0.
bb0f3eebb3/net/tftp.c (L275)
This allows for very large images to be transferred, which is sometimes
necessary for running debugging or profiling tools designed for normal
Linux distributions such as perf.
I was seeing random filesystem corruption when booting larger images
over TFTP, and it turned out to be caused by the image being loaded
on top of some reserved-memory regions (see link below).
897d54018c/arch/arm64/boot/dts/mediatek/mt7981b.dtsi (L72)
With Linux 6.12, some of the iptables modules are no longer directly
selectable, leading to a failure to build the module loader. We don't
need them anyway as we use nftables, so remove them.
* we need new enough for cmake 3
* but not so new it depends on libubox
This is a "get it working again" patch, not a long-term solution.
Either we should add libubox to liminix or we should find another
dhcp6 client
*something* tries to patch src/openssl.c again in the install phase
(I haven't figured out what) and dies because it can't make
src/openssl.c.orig if it exists already.