Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unused module errors #269

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions kernel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ buildLinux (args // {

defconfig = "tegra_defconfig";

# https://github.com/NixOS/nixpkgs/pull/366004
# introduced a breaking change that if a module is declared but it is not being used it will fail
# if you try to suppress each of he errors e.g.
# REISERFS_FS_SECURITY = lib.mkForce unset; within structuredExtraConfig
# that list runs to a long 100+ modules so we go back to the previous default and ignore them
ignoreConfigErrors = true;

# disabling the dependency on the common-config would seem appropriate as we define our own defconfig
# however, it seems that some of the settings for e.g. fw loading are only made available there.
# TODO: a future task could be to set this, disable ignoreConfigErrors and add the needed modules to the
# structuredExtraConfig below.
#enableCommonConfig = false;

# Using applyPatches here since it's not obvious how to append an extra
# postPatch. This is not very efficient.
src = applyPatches {
Expand Down Expand Up @@ -102,6 +115,10 @@ buildLinux (args // {

### So nat.service and firewall work ###
NF_TABLES = module; # This one should probably be in common-config.nix
# this NFT_NAT is not actually being set. when build with enableCommonConfig = false;
# and not ignoreConfigErrors = true; it will fail with error about unused option
# unused means that it wanted to set it as a module, but make oldconfig didn't ask it about that option,
# so it didn't get a chance to set it.
NFT_NAT = module;
NFT_MASQ = module;
NFT_REJECT = module;
Expand Down