This reduces closure sizes by making the libraries not depend on the
binaries, which is good for dynamic builds, and (when statically
linked) making the binaries not depend on the libraries, which is good
for static builds.
When static building, we additionally have to disable loading LUKS
plugins from $lib to avoid a reference, which probably wouldn't have
worked anyway.
generate-config.pl's auto modules feature answers "m" to any Kconfig
question it thinks supports being a module. It detected this by
seeing if the help shown by make config (called "alts" by the script)
contained the string "/m", which it would in the case of e.g a
tristate option, where alts would be "N/m/y/?".
But then along came CONFIG_MODPROBE_PATH in Linux 5.13, with a default
value, shown in the make config help, of "/sbin/modprobe".
generate-config.pl would see the "/m" substring, and answer "m" to the
question, meaning (I think) that the built kernel would expect the
modprobe binary to be at /m. This broke the (non-NixOS) VM images I
build with Nix. NixOS was unaffected because it uses a different
mechanism to set the modprobe path.
With the current architecture, we can't 100% determine whether a
Kconfig option is a string or a tristate, but we can get a lot closer
by using a better regex. My new regex only accepts single word
characters, separated by slashes, with a "/?" at the end. This is
much less likely to ever end up as the default value of a string
option.
Tested by building linux_latest.configfile before and after my
changes, and checking the only difference is the correct default for
CONFIG_MODPROBE_PATH.
5bc5462213
attempts to fix the need to patch the redfish test ourselves.
But it is actually not sufficient since we install the installed tests
into a separate prefix, so we need to adjust the installed tests patch.
As reported in
https://github.com/NixOS/nixpkgs/pull/156096#pullrequestreview-900986176,
this fails to build on EFI enabled RISC-V because the requested EFI
linker (efi-ld=gold) is unsupported. According to Wikipedia gold only
supports x86, x86-64, ARM, PowerPC, TileGX.
Removing this option alltogether will cause meson to figure out the
default linker by itself.