"Linux Kernel Architecture" by Wolfgang Mauerer is a great book. It does require some familiarity with C programming, and will be a waste of time without that (but you do not have to be an expert).
If you do not do any programming, I think it will be tough to find sources that explain the kernel in general terms. IMO that's not impossible, I've just never heard of anyone making the effort.
Probably a good place to start, since "modules" is an unknown concept, is to research what linux kernel modules are. "Modules"/modularity is a fundamental programming/software design concept which means pretty much what it says:
http://en.wikipedia.org/wiki/Modularity
A software module is something that is not a stand-alone program, but is designed to be plugged into one, providing some optional functionality. Distro kernels use modules for hardware drivers. This allows the distro to install a basic kernel, and a slew of different modules for all of the possible hardware the kernel can run. Obviously, plugging all those modules in will take up a huge amount of memory, probably slow the kernel down, and definitely create conflicts between modules that do the same thing, just with different hardware. So what happens is the system detects what hardware is actually there, and makes a good guess about what module to use. You can also remove and install modules while the system is running (see man rmmod and man modprobe).
All kernel module code can be built directly into the kernel, meaning their function is no longer provided by a pluggable module. For example, you could build a kernel specifically for your computer, with the video, sound, etc. drivers built into it, so that no modules are required.
Building kernels is actually a good way to learn about them. Unfortunately, this has been discouraged in recent years, and the LDP "Kernel How-to" is no longer maintained (and I think gone from the LDP), which I learned a lot from way back when. But look around and don't be afraid to try it anyway, you can't actually hurt anything.
Just make sure you understand your bootloader so that if you build an f-uped kernel you can load your old one by rebooting.
WRT booting, that is not done by the kernel. It's done by the bootloader, which loads the kernel. After that the kernel is in charge of everything.
Quote:
Originally Posted by MTK358
I also feel like I don't really understand how something works and it doesn't "click" until I know it (and everything it relies on) deeply, but at the same time I cannot learn it deeply without starting somewhere. It
's like a destructive recursive cycle.
|
I have the same problem, LOL. Eventually you find yourself reading about the transistors that make up the CPU...
To be honest, I would focus on LFS more than the kernel. But: don't treat LFS as anything more than a learning experience. Maintaining a modern linux system built entirely from scratch for regular use is going to be a ridiculous (or near impossible) task on your own. You might, however, combine it with building small bootable systems on cds or usbs. I did this (way back when) on compressed floppy disks (an entire working OS in 3-5 mbs!). For that, you would probably build a kernel using your distro sources (or just use the distro kernel), create a filesystem, and populate from your distro. When you get that to work out, you can try to do one from scratch.