Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 05-21-2014, 11:38 PM   #1
LQ Newbie
Registered: May 2014
Posts: 5

Rep: Reputation: Disabled
Why does kernel-devel contain so many seemingly useless directories and files?

I have been a Windows kernel developer for many years. Now I start to develop Linux kernel modules.

To begin with, I install kernel-devel under /usr/src/kernels/`uname -r`. However, after checking the installation folder, I am confused because there seem a lot of seemingly useless folders and files inside the directory. Many folders are empty except for two files: Kconfig and Makefile.

Under Windows, to develop kernel device drivers, I just need an include folder containing all necessary header files, and an lib folder containing necessary libraries to link.

Under Linux, I can't understand why there are so many seemingly useless folders.

Any explanations?

Thanks in advance.

Last edited by xmllmx; 05-22-2014 at 01:21 AM.
Old 05-22-2014, 09:37 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,244

Rep: Reputation: 968Reputation: 968Reputation: 968Reputation: 968Reputation: 968Reputation: 968Reputation: 968Reputation: 968
It does seem irritating. The one that got me going used to be xinitrc, which resided in
/usr/X11R6/lib/X11/xinit, if not in
/etc/X11/ or
and it is far from the worst example, as I am sure others will point out. Red Hat seems to be the worst offender in spam directories.

To answer your question, the modular nature of linux kernel development has a lot to do with it, as does history, convention, and project organization. You can address them all down the tree with scripts, as in

for files in i do;

but of course you know that. You can search them with find and grep -r, so we have tools to deal with them. Right from the get go, unix had /home, /, /usr, and /usr/local each with it's own sub tree of includes, libs, etc.


build, module

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
completely remove of useless files and configurations ld_k Debian 6 06-26-2012 05:41 AM
seemingly corrupt downloaded gzip'd tar files merlinblack Linux - Software 3 02-03-2010 11:35 PM
Need terminal command for safely deleting log files and other useless garbage in / ahurd Linux - Newbie 8 02-24-2009 06:50 AM
RHEL4 Kernel -devel/headers packages ...missing directories max_cherry Red Hat 4 01-15-2009 09:53 PM
removing residual (useless) config files cadj Linux - Software 0 02-21-2004 11:20 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

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