Writing a module to a linux kernel

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
mech-eng
Messages
826
Reaction score
13
I was wondering about "writing a module to a linux kernel." This question haven't asked yet. Would you please explain why linuxers write such modules to a linux kernel? What is the reason?

Thank you.
 
on Phys.org
Simple answer: You have a new device originally designed for another OS, you need to have it work with Linux. You write a driver.
 
  • Like
Likes   Reactions: QuantumQuest and mech-eng
mech-eng said:
I was wondering about "writing a module to a linux kernel." This question haven't asked yet. Would you please explain why linuxers write such modules to a linux kernel? What is the reason?

Linux kernel is built in a barebones fashion. The extra functionality we need is added in a modular way i.e. writing modules "on top" of that. This is an easy way to extend the functionality of the kernel without having to rebuild / recompile the kernel each time.
 
  • Like
Likes   Reactions: mech-eng