Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 14433  / 3 Years ago, sat, august 7, 2021, 7:24:06

I recently installed a vendor supplied embedded linux onto a hardware device. When I ran lsmod on the device command line the response was empty. I was lead to believe that this means that the drivers for the hardware running on the device had been built into the kernel rather than as .ko files. My question is this: how does this process happen?



Is support for popular hardware gradually integrated into the kernel in subsequent versions thus replacing the .ko files? Is the .ko file simply used to support new hardware that doesn't have kernel integrated driver support at the time of release? In my limited knowledge I thought that all hardware drivers were of the form of .ko files but clearly this is wrong.



I am slightly confused by the whole process and would be grateful for clarification as I have a feeling that I may be looking at the situation the wrong way.


More From » drivers

 Answers
5

Core drivers that are considered critical to the loading of the kernel are usually built into the kernel, while other hardware drivers, etc. are built as modules or .ko files.



The .ko modules are usually stored under the /lib directory on your root partition. To use any of these, the kernel must first be able to detect and access the underlying storage device and then access its filesystem. So it's safe to assume that a kernel without SATA/SCSI and ext2/3/4 support built-into it won't really boot ;)



You can choose to switch most built-in kernel drivers into module form. The Ubuntu kernel team decides whether to modify the Linux kernel team's default configuration and include/exclude additional built-in drivers for the stock kernel images you download.



If you build your own kernel, you can do the same:



enter image description here




  • In the above screenshot, the * indicates a built-in driver, while M indicates a module.

  • Loopback device support, which is often essential to booting a system, is built-in by default.

  • The low-speed USB driver (USB 1.0) is also built-in by default to allow you to boot off a USB stick, but here I have changed it into a module.


[#36875] Sunday, August 8, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
diket

Total Points: 167
Total Questions: 124
Total Answers: 109

Location: Somalia
Member since Wed, Mar 15, 2023
1 Year ago
diket questions
Fri, Dec 24, 21, 22:31, 2 Years ago
Fri, Mar 31, 23, 02:30, 1 Year ago
Mon, Jan 23, 23, 05:58, 1 Year ago
Tue, Nov 1, 22, 02:02, 2 Years ago
;