1
0
forked from dan/liminix
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
dhcp6c
dnsmasq
firewall build modules at same time as main kernel vmlinux 2024-02-11 23:47:11 +00:00
hostapd
kernel build modules at same time as main kernel vmlinux 2024-02-11 23:47:11 +00:00
mount
network
ntp
outputs Merge pull request 'Add support for TP-Link Archer AX23' () from raboof/liminix:add-archer-ax23-v1-bak into main 2024-02-08 17:47:46 +00:00
ppp
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
vlan
watchdog
all-modules.nix
base.nix move kernel module to its own subdir 2024-02-11 18:15:55 +00:00
busybox.nix
hardware.nix specify type for rootDevice module option 2024-02-02 19:50:13 +00:00
hostname.nix
outputs.nix Add tplink module for creating 'safeloader' images 2024-02-06 17:59:38 +01:00
ramdisk.nix
squashfs.nix
usb.nix add usb storage for turris omnia 2024-01-26 22:46:36 +00:00
users.nix
wlan.nix