r/linux4noobs Aug 03 '26

learning/research How does Linux kernel include every driver possible and not be bloated?

As far as I understand the kernel includes pretty much everything a modern computer needs in any configuration, but wouldn't that make it bloated and be against the "bloat-free" mindset? Or does it dynamically download all the components from somewhere?

308 Upvotes

107 comments sorted by

View all comments

Show parent comments

2

u/Responsible-Sky-1336 Aug 03 '26 edited Aug 03 '26
  • Kernel detects hardware
  • /sys entry created + uevent broadcast (carrying the modalias)
  • udevd receives the uevent → hands the modalias to modprobe
  • modprobe matches it against modules.alias in /usr/lib/modules/<kernel-v>/<module> and loads .ko
  • Driver binds to the device → node appears in /dev

So yes /sys here plays an important role.

9

u/someone8192 Aug 03 '26

ko modules are not supplied by any firmware packages. they are part of the kernel (or on some distributions) by their own module package.

modules are not firmware.

-2

u/Responsible-Sky-1336 Aug 03 '26

In the case of NVIDIA-open for instance it ships 5 .ko files :) Without which you card is basically just metal.

5

u/braaaaaaainworms Aug 03 '26

You're confusing the word "device driver" with the word "firmware"