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

Add "magic" command to install only the kernel modules #504

Merged
merged 1 commit into from
May 12, 2024

Conversation

marc-hb
Copy link
Contributor

@marc-hb marc-hb commented Apr 18, 2024

While this is faster in every use case, it's especially useful when "cross-"compiling the kernel on one (fast) system and copying only the two .ko files to another, slower one where all the ZFS tools are already installed. It avoids "polluting" the build system with cutting-edge ZFS tools which may not even be needed there.

It's also more secure because it does not require "sudo" on build system where the "pseudo" install is run.

It's supported because modules/ is defined as a SUBDIRS: https://www.gnu.org/software/automake/manual/html_node/Subdirectories.html

For SUBDIRS, automake generates the following comment in Makefile.am:

 # This directory's subdirectories are mostly independent; you can cd
 # into them and run 'make' without going through this Makefile.
 # ...
 $(am__recursive_targets):

While this is faster in every use case, it's especially useful when
"cross-"compiling the kernel on one (fast) system and copying only the
two .ko files to another, slower one where all the ZFS tools are already
installed. It avoids "polluting" the build system with cutting-edge ZFS
tools which may not even be needed there.

It's also more secure because it does not require "sudo" on
build system where the "pseudo" install is run.

It's supported because `modules/` is defined as a SUBDIRS:
https://www.gnu.org/software/automake/manual/html_node/Subdirectories.html

For SUBDIRS, automake generates the following comment in Makefile.am:

 # This directory's subdirectories are mostly independent; you can cd
 # into them and run 'make' without going through this Makefile.
 # ...
 $(am__recursive_targets):

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb marc-hb marked this pull request as ready for review April 18, 2024 01:40
Copy link
Member

@gmelikov gmelikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@gmelikov gmelikov merged commit 7f73965 into openzfs:master May 12, 2024
1 check passed
@marc-hb marc-hb deleted the install-modules branch May 13, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants