2
0

579 Commits

Author SHA1 Message Date
dan 6c63e02ef6 update dropbear patch for 26.05 2026-06-04 22:03:24 +01:00
Peter Collingbourne 01ded6eb25 Patch s6-linux-init to fix running from non-root filesystem
With #26 the s6 binaries will run from a non-root filesystem. This
exposed a bug in s6-linux-init which is now fixed upstream. Apply the fix.
2026-05-24 03:54:50 -07:00
Peter Collingbourne b2a7ae4bc4 openwrt: v25.12.1 -> v25.12.3 2026-05-08 02:40:44 -07:00
dan 93125bb09b fix fennel errors in test 2026-05-05 20:50:53 +01:00
dan 43fd9112af Merge remote-tracking branch 'pcc/fix1' 2026-05-05 14:25:43 +01:00
dan 482b60eb91 Merge remote-tracking branch 'pcc/fix5' 2026-05-05 14:18:20 +01:00
dan cf490e8c26 Merge remote-tracking branch 'pcc/fix9' 2026-05-05 14:15:33 +01:00
Peter Collingbourne b061e6903b anoia: Fix crash if a watched output directory does not exist 2026-05-03 20:18:29 -07:00
dan ce56c9e1f4 Merge remote-tracking branch 'pcc/fix10' 2026-05-03 13:35:23 +01:00
dan 639e924ce2 Merge remote-tracking branch 'pcc/fix11' 2026-05-03 13:31:59 +01:00
dan 65847bec4b Merge remote-tracking branch 'pcc/fix13' 2026-05-03 13:26:27 +01:00
Peter Collingbourne 17d8576cc4 Make Liminix usable as an input to a flake
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
2026-05-03 04:02:31 -07:00
Peter Collingbourne 15a886cf9a ifwait: Fix flapping on bridged interfaces
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.
2026-05-03 04:02:31 -07:00
Peter Collingbourne 33f2a93489 ifwait: React to interface up by bringing up the service tree
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.
2026-05-03 04:02:31 -07:00
Peter Collingbourne 3dee66b3d5 openwrt: Add a patch to fix the MT7915 build in 25.12
These changes are part of the patch that went upstream [1], but for some
reason they're missing from OpenWrt's backport [2].

[1] https://github.com/torvalds/linux/commit/96326447d466ca62b713f660cfc73ef7879151a0
[2] https://github.com/openwrt/openwrt/blob/a0c7d5ecff4eb4d8760207d9fd71fbf154469bf5/target/linux/generic/backport-6.12/731-v6.18-net-mediatek-wed-Introduce-MT7992-WED-support-to-MT7.patch
2026-05-03 04:02:31 -07:00
Peter Collingbourne 0d5922c811 kmodloader: Filter out builtin lines from modprobe output
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".
2026-05-03 04:02:31 -07:00
Peter Collingbourne 57f6656d87 tufted: Roll over the tid on overflow
The specific rollover value is unspecified, but we assume that the other
side is U-Boot which rolls over to 0.
https://github.com/u-boot/u-boot/blob/bb0f3eebb3c196d9b6efbbd1e5aa9b16abbb9ad6/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.
2026-05-03 04:02:31 -07:00
dan 4299293cc5 backport OF "compatible" changes for ath79 2026-03-28 21:17:55 +00:00
dan 5af28615f1 gl-ar750: update to newer kernel + openwrt
this device is not (yet?) in mainline, but openwrt 25.12 has
the right patches to make it work with linux 6.12
2026-03-28 21:15:51 +00:00
dan 29d51396f5 s6-rc-up-tree doesn't need runtime fennel 2026-03-18 21:09:55 +00:00
dan 5f92529f4f odhcp6c: upgrade to newer (but not new) upstream
* 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
2026-03-18 21:07:49 +00:00
dan 7f23c5dc0f update dropbear, simplify authorized_keys patch 2026-03-11 18:22:39 +00:00
dan 4b40e51a1d run-liminix-vm tell qemu not to reboot when guest terminates 2026-03-11 07:30:00 +00:00
dan cab0d7a805 update ppp package 2026-03-09 11:12:40 +00:00
dan 41375681dd hash for firmwre-utils 2026-03-09 11:12:27 +00:00
dan dd3629ae8e update firmware-utils for compatibility with newer cmake 2026-03-08 01:08:50 +00:00
dan f15ffaeac2 kludge: force gcc 13 for kernel builds
we can get rid of this when we upgrade devices from kernel 5.x to 6.x
(which clearly we also need to do)
2026-03-07 22:27:12 +00:00
dan 9f3c8f7cbd treewide: nixfmt and deadnix 2025-11-11 21:49:45 +00:00
dan d538e8f6cf add options for setting sysctl parameters at boot time 2025-11-11 21:44:37 +00:00
dan 46dcf71e16 fix swconfig build
missing ctype.h
2025-11-04 18:53:38 +00:00
dan ead6cb918a log backfill: synthesize timestamps when in 1970s
if the log message timestamp is in 1970, treat it as if
the epoch were the system boot time
2025-10-28 23:29:20 +00:00
dan f4b87430ea tai64: write timestamp 2025-10-28 23:28:33 +00:00
dan c3d6ad7ad4 unix time to TAI conversion 2025-10-28 21:05:55 +00:00
dan 8049714cdb rename anoia.tai64.to-utc as to-unix
it's a far more accurate name for somethingthat return non-leap
seconds since 1-1-1970
2025-10-28 20:17:35 +00:00
dan 0f90f3f46d lualinux.open needs three args 2025-10-27 21:18:52 +00:00
dan 481715f906 remove debug output 2025-10-27 21:16:49 +00:00
dan 26e1608fa7 align log shipping start/stop messages between producer and consumer
also there's no need to make it configurable, so get rid of that
2025-10-26 20:41:19 +00:00
dan ad9bba4f93 logtap: add WIP backfill command 2025-10-26 20:34:52 +00:00
dan 6f559e3700 add fennelc, a script to do what writeFennel does
it's a bit simpler because no need to do quite as much string surgery
to compute package.{c,}path

also it can be used in Makefiles
2025-10-26 20:32:52 +00:00
dan 6478c56ed1 log.shipping.command is now a command not a string 2025-10-25 17:34:50 +01:00
dan 1b14161a0e modern openssl needs rsa key >= 2048
per
https://docs.openssl.org/3.3/man3/SSL_CTX_set_security_level/#default-callback-behaviour
the default "security level" in openssl 3.3 is 2
2025-10-20 23:45:53 +01:00
dan 72acb2e711 Merge remote-tracking branch 'newedge/fix-gl-ar750' 2025-10-19 14:22:49 +01:00
dan 87c45dec67 switch certifix-client to luahttp 2025-10-19 14:11:51 +01:00
dan d1cd13d5dc CSR version should be 1 not 3 2025-10-19 14:11:51 +01:00
dan 33fdf0d86d add missing prototype to fetch-freebsd lua glue to make it build 2025-10-19 14:10:13 +01:00
kurogeek 3f1f7c08d4 Missing repo https://github.com/dfskoll/rp-pppoe is fixed 2025-10-14 14:17:11 +07:00
dan 77c6552e18 victorialogsend: cope with blank mesage field 2025-10-10 22:43:50 +01:00
dan a6442c872f change log shipper interface
* it's now a command not a service
* shipper is expected to open() the fifo passed as $LOG_FIFO instead of
  getting logs on stdin

logtap determines that remote logs are getting sent when there's a
reader on the fifo it's writing, but opening the fifo as stdin of
s6-tcpclient is too early as it hasn't even connected to the remote
log server at that time
2025-10-09 21:38:49 +01:00
dan b49beb2c86 make logtap notice sooner when the shipper dies
fifo(7) says

       Under Linux, opening a FIFO for read and write will succeed both
       in blocking and nonblocking mode.  POSIX leaves this behavior
       undefined.  This can be used to open a FIFO for writing while
       there are no readers available.

       When a process tries to write to a FIFO that is not opened for
       read on the other side, the process is sent a SIGPIPE signal.

but ... that doesn't match what I saw, which was that it carried on
writing until the buffer filled and then it blocked or returned -1
(depending on O_NONBLOCK)

Switch to opening O_WRONLY | O_NONBLOCK and retrying periodically
if it fails
2025-10-09 21:16:54 +01:00
dan 29fbb5461d send log timestamp parse errors to victorialogs 2025-10-08 20:10:11 +01:00