LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-22-2019, 09:34 AM   #1
hukangha
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Rep: Reputation: Disabled
Question list and view built-in kernel drivers


Hi,

I'm looking for a way to list and view built-in kernel drivers to see if my target driver is working.

I'm using an arm64 ubuntu rootfs I found somewhere which is not official of my hardware (zynqMP). It runs with the kernel I built, not perfectly I think.

I found that a lot threads suggest to list kernel drivers with somefile in /lib/modules/:

https://www.thegeekstuff.com/2010/11...mand-examples/

https://superuser.com/questions/5773...-the-linux-ker

http://ask.xmodulo.com/find-informat...les-linux.html

But, this does not work for me, as I don't have the $(uname -r) folder inside /lib/modules/

Those threads says that /lib/modules is maintained by linux, but seems not my case.

I want to see the built-in drivers and find my targeted one, and see if it is loaded with the kernel successfully, How should I do that if the /lib/modules/ method not working ?

Thanks in advance!
 
Old 04-22-2019, 11:52 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
hm. I don't really understand what do you mean by built-in driver. Usually this means a driver which is built into the kernel, so you cannot (and need not) modprobe it.
What kind of OS is it? (arm64 ubuntu rootfs is not an OS - at least I don't know about it).
 
Old 04-22-2019, 04:50 PM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Built-in drivers are not in lib modules, they are built into the kernel image. You can list all options configured into the kernel with

Code:
grep '=y' /boot/config-$(uname -r)
 
Old 04-22-2019, 08:51 PM   #4
hukangha
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
hm. I don't really understand what do you mean by built-in driver. Usually this means a driver which is built into the kernel, so you cannot (and need not) modprobe it.
What kind of OS is it? (arm64 ubuntu rootfs is not an OS - at least I don't know about it).
Hi,

You are right, the kernel is built into the kernel, I cannot modprobe it. In fact the rootfs I use is an nvidia rootfs provided for their TX2, It's like an OS with out the linux kernel for embeded systems.

The link I get all suggest to look the built-in kernel in /lib/modules/$(uname -r)/modules.builtin.

But the $(uname -r) folder (which is typically named with the kernel version, for me it's 4.14.0-xilinx-v2018.3) does not exist for my case.

I also want to know where the folder come from, is it maintained by the kernel or the rootfs vendor ?

Last edited by hukangha; 04-22-2019 at 08:52 PM.
 
Old 04-22-2019, 08:55 PM   #5
hukangha
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
Built-in drivers are not in lib modules, they are built into the kernel image. You can list all options configured into the kernel with

Code:
grep '=y' /boot/config-$(uname -r)


Unfortunately, the file /boot/config-$(uname -r) does not exist for my case either. There is only one folder named fw in /boot/, I got nothing there.

Last edited by hukangha; 04-22-2019 at 09:01 PM.
 
Old 04-23-2019, 12:38 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
probably you still have *.ko files. can you check it?
 
Old 04-23-2019, 04:36 AM   #7
hukangha
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
probably you still have *.ko files. can you check it?
Hi,

Yes, I have also configured the driver as 'M', aka module as .ko file, in my previous builds. it remains stayed somewhere in the project.

I configured it to 'Y',aka statically built into kernel, in my current builds, which should decoupled the kernel from the .ko file.

I thinks the solution for my case might not be finding the .ko file. It seem involves how the rootfs and kernel work together.

I don't know much about it.

Last edited by hukangha; 04-23-2019 at 05:03 AM.
 
Old 04-24-2019, 12:19 PM   #8
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
See if you have a /sys/modules/<driver> directory for your driver. Many kernel drivers use the /sys filesystem to provide info to userspace.
 
Old 04-25-2019, 04:23 AM   #9
hukangha
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
See if you have a /sys/modules/<driver> directory for your driver. Many kernel drivers use the /sys filesystem to provide info to userspace.
Hi
I think, maybe the /lib/modules/$(uname -r) directory is just a normal directory maintained by the one who provides the root filesystem.

I can now get an official sample ubuntu rootfs from xilinx, seems it have that directory in the image even before boot up.

I think this means the directory /lib/modules/$(uname -r) is a predefined directory.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Built on Linux. Built on *nix. The OS X application model. drhart4000 Linux - General 2 06-10-2009 04:27 AM
Tryying to keep Konqueror in "Detailed List View", but it always reverts to Icon View jlinkels Linux - Software 3 05-16-2006 08:45 PM
built-to-order PC or ready-built PC from well-known companies? kpachopoulos General 6 11-03-2004 03:14 PM
if i get an nforce mobo with built-in VGA... will the built in vga work in linux? kublador Linux - Hardware 2 11-10-2003 08:26 PM
list of built in drivers hendrxi1969 Linux - Hardware 11 07-01-2003 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration