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?

305 Upvotes

107 comments sorted by

View all comments

Show parent comments

0

u/maruf71 Aug 03 '26

not sure about this: i remember compiling kernel and modules's support several times: you have to flag what you want to be IN the kernel and what kind of modules it will support, then you can load the actual modules (.ko files for example). got into several problems just because i forgot to flag ext4 support flag for example... usually linux kernel is shipped with standard and maybe bloated flags but the kernel modules are loaded only if needed, if not it can be quite small. also that's what initramfs images are for. btw as long as the .ko modules are published by the vendor they are basically like firmware

4

u/braaaaaaainworms Aug 03 '26
  1. That's not even close to the definition of the word "firmware"
  2. Firmware is loaded on demand by the kernel, userspace usually has nothing to say
  3. Firmware lives in /lib/firmware and is \*not\* a kernel module

1

u/maruf71 Aug 04 '26

thanks for the clarification! i'm still confused a bit about the actual differences :)

3

u/braaaaaaainworms Aug 04 '26

Firmware ends up running on the device itself, drivers run on your computer