2
0

1709 Commits

Author SHA1 Message Date
dan 6c63e02ef6 update dropbear patch for 26.05 2026-06-04 22:03:24 +01:00
dan c212824209 Merge remote-tracking branch 'pcc/s6' 2026-05-27 13:14:33 +01:00
dan f6978f9770 Merge remote-tracking branch 'pcc/mitig' 2026-05-27 13:10:19 +01:00
dan f85d4a66ca Merge remote-tracking branch 'pcc/hrt' 2026-05-27 13:07:47 +01:00
Peter Collingbourne 0cb8383b90 Adjust kernel exploit mitigation settings on arm64
CONFIG_RANDOMIZE_BASE enables KASLR. It doesn't increase the size of the
kernel image for OpenWrt One (technically it increases .text size by 256
bytes, but that was cancelled out by alignment padding). Set this to y on
arm64. The other architectures are not modified (arm doesn't support it,
and mips only supports it for some targets).

CONFIG_ARM64_PTR_AUTH is enabled by default by the kernel and enables
pointer authentication instructions at entry and exit of most kernel
functions. However, none of our targets support pointer authentication,
so these instructions are just taking up space for no purpose. Set this
one to n, which reduces OpenWrt One kernel image size by 24KB.
2026-05-24 03:56:29 -07: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 3ed4e32525 Enable CONFIG_HIGH_RES_TIMERS in the default kernel config
At least on OpenWrt One, the kernel default of
CONFIG_HIGH_RES_TIMERS=n causes slow SPI NAND access speeds. See:
https://lore.kernel.org/all/CAPQLkRit9bRH2gnSpvt60evu31T=1YNFdTFH2emS6RSsY=eDJQ@mail.gmail.com/

Since this doesn't seem to be an inherently device-specific issue,
and leaving it disabled may cause other performance problems that are
difficult to debug, enable it in the default config.
2026-05-23 19:21:28 -07:00
dan 430ed12902 think 2026-05-11 12:23:32 +01:00
dan 8e36690ae2 Merge remote-tracking branch 'pcc/upg' 2026-05-11 12:19:17 +01:00
dan 6a390fa716 add luad (unused yet) 2026-05-11 12:19:09 +01:00
Peter Collingbourne b2a7ae4bc4 openwrt: v25.12.1 -> v25.12.3 2026-05-08 02:40:44 -07:00
dan 7e5d1ccf67 fix tests thst need overlay.nix 2026-05-05 20:51:40 +01: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 875a4ae512 Merge remote-tracking branch 'pcc/fix7' 2026-05-05 14:17:32 +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 be882c62a6 Merge remote-tracking branch 'pcc/fix3' 2026-05-03 13:30:59 +01:00
dan ab93e0075c Merge remote-tracking branch 'pcc/fix2' 2026-05-03 13:30:27 +01:00
dan aead19df04 Merge remote-tracking branch 'pcc/fix12' 2026-05-03 13:27:02 +01:00
dan 65847bec4b Merge remote-tracking branch 'pcc/fix13' 2026-05-03 13:26:27 +01:00
dan f2ec49f9f2 Merge remote-tracking branch 'pcc/fix14' 2026-05-03 13:26:09 +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 86e55ff3cf dnsmasq: Pass --bind-interfaces
This allows users to run another DNS server, such as unbound, and have
dnsmasq use it as the upstream.
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 83e7c6f2dc Move extraRules to the end of the recursiveUpdate
extraRules is the user-specified ruleset so this allows the
user configuration to override the builtin rules.
2026-05-03 04:02:31 -07:00
Peter Collingbourne e994e25d6e Avoid dependency on specific PCI addresses in qemu config
These addresses will vary depending on the target architecture,
so let's name them via /bus instead.
2026-05-03 04:02:31 -07:00
Peter Collingbourne b832496802 openwrt-one: Upgrade to kernel 6.12
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.
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 5a224c8980 openwrt-one: Move the load address again
U-Boot declares a reserved-memory region at address 0x4fc00000 which makes
0x48000000 problematic for very large images. Move it again to 0x50000000.
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 d0376d4101 add configuration for gateway test
it can't share the rotuer example as rotuer's secrets aren't
checked into git
2026-04-29 13:23:18 +01:00
dan 5f2abc0d2b test that rotuer example builds
there is no test in CI that builds the firewall or any of those
modules, so this is temporary-ish to increase coverage
2026-04-26 18:10:56 +01:00
Peter Collingbourne c03d50235a Move openwrt-one TFTP load address after reserved-memory regions
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).

https://github.com/torvalds/linux/blob/897d54018cc9aa97fd1529ca08a53b429d05a566/arch/arm64/boot/dts/mediatek/mt7981b.dtsi#L72
2026-04-26 12:57:53 +01:00
dan f1277b0564 make elfutils build 2026-04-26 12:33:32 +01:00
Peter Collingbourne 16fb3f5343 Remove iptables modules
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.
2026-04-26 11:58:17 +01:00
dan 9c62e8333d think 2026-04-26 11:57:06 +01:00
dan dc62a8b75f disaable util-linux lastlog support as it depends on PAM 2026-03-30 14:03:02 +01:00
dan 7f6b05ef96 switch from mainline ag71xx driver to openwrt version 2026-03-30 13:35:19 +01:00
dan 4299293cc5 backport OF "compatible" changes for ath79 2026-03-28 21:17:55 +00:00
dan b6b420bc5b gl-ar750 upgrade ath10k firmware 2026-03-28 21:17:08 +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 e8a60d2860 bordervm switch usb passthru from ehci to xhci
this was to fix a bug that turned out to be something else,
but the qemu docs say it's better anyway
2026-03-22 15:23:50 +00:00
dan 82164d3968 think 2026-03-22 15:23:19 +00:00
dan 0b179a6e04 force create ca-certificate symlink 2026-03-22 15:22:56 +00:00