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. |
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. |
All times are GMT -5. The time now is 01:05 AM. |