liminix/modules
Daniel Barlow b9c0d93670 build modules at same time as main kernel vmlinux
This changes the practice for building kernel modules: now we expect
that the appropriate Kconfig symbols are set to =m in
config.kernel.config, and then use pkgs.kmodloader to create
a service that loads and unloads all the modules depended on by
a particular requirement.

Note that modules won't be installed on the target device just by
virue of having been built: only the modules that are referenced by a
kmodloader package will be in the closure.

An example may make this clearer: see modules/firewall/default.nix
in this commit.

Why?

If you have a compiled Linux kernel source tree and you change some
symbol from "is not set" to m and then run make modules, you cannot in
general expect that newly compiled module to work. This is because
there are places in the build of the main kernel where it looks to see
which modules _may_ be defined and uses that information to
accommodate them.

For example in an in-kernel build of

  https://github.com/torvalds/linux/blob/master/net/netfilter/core.c#L689

some symbols are defined only if CONFIG_NF_CONNTRACK is set, meaning
this code won't work if we have it unset initially then try later to
enable it and build modules only. Or see

  https://github.com/torvalds/linux/blob/master/include/linux/netdevice.h#L160
2024-02-11 23:47:11 +00:00
..
arch build kernel only once for multiple outputs 2024-01-02 19:40:57 +00:00
bridge extneder: use bridge module 2023-08-31 18:29:45 +01:00
dhcp6c this is the dhcp6c service we want 2023-09-26 16:43:03 +01:00
dnsmasq dnsmasq static hosts defaults to empty attrset 2023-09-04 23:02:17 +01:00
firewall build modules at same time as main kernel vmlinux 2024-02-11 23:47:11 +00:00
hostapd remove interface.device 2023-08-28 22:02:28 +01:00
kernel build modules at same time as main kernel vmlinux 2024-02-11 23:47:11 +00:00
mount add placeholders for missing module docs 2023-09-04 22:19:22 +01:00
network support setting network device names 2023-11-26 23:15:28 +00:00
ntp add o+x permission on service-state directories 2023-08-28 22:02:28 +01:00
outputs Merge pull request 'Add support for TP-Link Archer AX23' (#6) from raboof/liminix:add-archer-ax23-v1-bak into main 2024-02-08 17:47:46 +00:00
ppp remove interface.device 2023-08-28 22:02:28 +01:00
s6 mount tmpfs on /tmp 2024-01-04 23:22:02 +00:00
schnapps add turris "schnapps" tool 2024-01-05 00:07:01 +00:00
ssh ssh ensure we create /run/dropbear 2023-09-17 17:00:26 +01:00
vlan add outputs for vlan service 2023-09-17 17:00:31 +01:00
watchdog add placeholders for missing module docs 2023-09-04 22:19:22 +01:00
all-modules.nix rename flashimage to mtdimage 2023-12-11 19:09:18 +00:00
base.nix move kernel module to its own subdir 2024-02-11 18:15:55 +00:00
busybox.nix improve descriptions for base and busybox 2023-08-16 22:26:31 +01:00
hardware.nix specify type for rootDevice module option 2024-02-02 19:50:13 +00:00
hostname.nix describe hostname option 2023-08-16 22:26:40 +01:00
outputs.nix Add tplink module for creating 'safeloader' images 2024-02-06 17:59:38 +01:00
ramdisk.nix improve grammar of mkEnableOption descriptions 2023-08-04 20:19:27 +01:00
squashfs.nix move squashfs kernel options into module 2023-08-30 22:59:28 +01:00
usb.nix add usb storage for turris omnia 2024-01-26 22:46:36 +00:00
users.nix improve doc 2023-08-16 22:52:16 +01:00
wlan.nix configurable busybox 2023-03-10 18:40:45 +00:00