LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-22-2014, 12:38 AM   #1
xmllmx
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 02:21 AM.
 
Old 05-22-2014, 10:37 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,554

Rep: Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862
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
/etc/X11/xinit
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.
 
  


Reply

Tags
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 06:41 AM
seemingly corrupt downloaded gzip'd tar files merlinblack Linux - Software 3 02-04-2010 12:35 AM
Need terminal command for safely deleting log files and other useless garbage in / ahurd Linux - Newbie 8 02-24-2009 07:50 AM
RHEL4 Kernel -devel/headers packages ...missing directories max_cherry Red Hat 4 01-15-2009 10:53 PM
removing residual (useless) config files cadj Linux - Software 0 02-22-2004 12:20 AM

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

All times are GMT -5. The time now is 03:25 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration