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

zfs: fix kernel module cross-compile #65490

Merged
merged 2 commits into from Aug 14, 2019
Merged

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

Allows the ZFS kernel module to be cross-compiled. This enables the use of cross compiled kernels on systems using ZFS.

Things done

Some dependencies were removed from the kernel module build (they were only needed by the userspace tools) to avoid having to fix more cross issues than necessary. In the process of working on this PR I fixed the cross-build of nfs-utils, so I included it as well.

I also cleaned up some of the patching commands in preConfigure, because many were outdated.

At some point in the past, kernel module compression was enabled, which prevents Nix from picking up dependencies of the kernel modules. To fix this, I manually created a file to reference the missing dependencies.

I have been successfully running this on an aarch64 machine for several months.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh FRidh added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jul 28, 2019
@matthewbauer matthewbauer merged commit d9eeb35 into NixOS:master Aug 14, 2019
@lopsided98 lopsided98 deleted the zfs-cross branch August 14, 2019 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 1-10 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants