I was thinking about this last night and figured I would have to ask as someone out there must already have done this just for curiosity's sake.
"What would be the down-side to building a kernel with virtually everything turned on (included or at least modularized)?"
I know the kernel would grow in size if we included everything - that is a given.
There are also likely areas where one mod would clash with another - this would have to be sorted out.
BUT... let's just (for sake of theory) take a three-point-something kernel as the example and configure it to build "everything" and then take a vacation while it compiles. Even if everything is set to MODULE, which in my opinion would be the best scenario taking into account TC's methodology, would there be any foreseen caveats in doing so? In my mind, I could launch a machine to compile tonight and come back when ever it finishes and voila'... a couple hundred modules are sitting there waiting for something to do... package them up and life is grand with a large portion of hardware and software options that haven't been implemented yet because it's so time consuming that nobody wants to spend
that kind of time. Any problems anyone can think of with this theory?
The second piece of this inquiry revolves around hardware detection. My scenario is based on a Cisco CE server I have here which utilizes a network controller which is a module in 3.0.21 thus it's obviously not included with the core image for 4.x and when starting, it hangs for a bit complaining about the missing Tigon (sp?) module before being allowed to continue booting.
Let's say we boot a "master" kernel such as the one listed above... where everything is tagged as a module save for the defaults needed to keep TC "as is." Each driver/module has to be detected by the kernel using some means of a central database (actually, more than one I imagine) thus a vendor and hardware ID has to be available when the kernel goes to look for the associated software. Wouldn't it be possible to revamp the kernel a little and instead of complaining about a missing module and hanging while trying to initialize it, save the IDs in memory or to a log file and quietly (and quickly?) move onto the next device in the list? In my mind, this would allow us to use that list to update the system in an automated fashion after the kernel and core have both loaded. Granted, dependencies might be a bit more complicated as we'd likely have to install the missing module(s), re-trigger the hardware layer, wait for any more missing modules to be detected, etc. but in my mind, that's part of the installation/boot process depending on what type of media we're working on.
Example: Let's say we're booting from CD or USB. Both media types have a known storage capacity and based on the media type, we know where to look for mounts. When using USB, I tend to use SD cards which allow me to lock writing, so for argument's sake let's assume the media type is r/o.
I do not know how large a complete compilation of modules would be - but let's pretend for a moment that both TC and ALL of the compiled modules fit onto a CDR.
The media boots... we trigger the hardware daemon for the first time and move on... during the remainder of our boot process the daemon is running in the background digging up addresses and IDs for different hardware and/or support software needed for a given task.
By the time we reach the end of our rcS script and right before we launch bootsync, if the boot code of
wait4dev or similar is listed, we sit back for a minute and wait for the hardware detection to finish its first full run. Once done and the detection cache is clean, we look at the log file and see if there are any devices we didn't have support built in for. If found:
1) IF /mnt/boot_device contains the directory ./kernel (or similar) look within to see if firmware_VENDORid_HARDWAREid.tcz exists - if so, load it up and probe accordingly.
2) IF ./kernel does NOT exist, jump online (if available) to see if firmware_VENDORid_HARDWAREid.tcz exists - if so, load it up and probe accordingly.
3) Empty the log file, Rinse, Lather, Repeat until the log file is empty after going through the trigger/detect loop.
4) If not found as a boot code, a command-line version should be available to do so manually.
IN MY MIND, this would alleviate so much time and research done manually for hardware devices (and in many cases, software devices) as not everyone knows exactly what they have
within a given machine, let alone within the motherboard such as onboard graphics chips, busses, networking, etc. (I had no clue the Pro-1000 chips were listed as "A" vendor under Windows and "B" under Linux and without Google and some poor sap already going through this previously, I wouldn't have known what to do at all - and that's just one machine type.)
Q: How does this help the general TC population?
A: If a CD or USB device could be packed with modules in this fashion, the media itself would be truly as "universal" as it gets. It doesn't cost any more in memory/resources as the modules would be dormant unless they're needed. This would also take a good 90% of the hunting and research out of the picture for chips which already have kernel support and odds are this new conglomeration of modules could be sorted by age and/or technology to where we wouldn't need "them all" depending on what types of systems we're expecting to work with. (ie: There's no sense having ISA modules on a boot device if we don't work with anything that has any kind of ISA components.)
Q: How do we handle module dependencies?
A: I am
guessing we'd have to create tcz.dep files based on firing up this new "master" kernel and just using the details found in lsmod in reverse. lsmod tells us
module_name and
depended BY so we'd likely have to just reverse the process, but it looks as though it can be automated - I didn't dig deep enough to know whether or not there are deps listed within modconfig or similar locations. I also imagine that testing things in this fashion we'll find out the hard way as to which mods dislike which others!
Q: We're trying to keep this distro small - this defeats this concept!
A: True and False. Let's say I take TC and drop it onto a CD-R... the CD holds up to 640MB to 800MB depending on the type/format. If TC and a few extensions took up 50MB... that's a LOT of waste, and the distro still doesn't fit every possible need on a hardware and/or software basis behind the scenes. I don't think I've heard (in the forum) of anyone exceeding a few hundred megs (desktop+office+etc) so at best we're still not using 1/2 of a standard CDR, so why not put the remaining white-space to work? The same goes for flash drives... my local distributor doesn't even CARRY 1GB SD/Flash cards anymore... 4GB is the smallest. If you dedicated just 1GB to TC and a couple hundred modules... that's still 3GB remaining for persistence... more than the average TC'er will likely use.
Q: What about frugal (HDD) installs?
A:
In my opinion this would be a blessing. We still have to boot from some kind of media to install frugal, which is where these modules would come to play. Once complete, I'd recommend an option (radio button) on tc-install to inquire as to whether or not to copy over USB and similar drivers for future use and disregard copying PCM/PCI/etc. as the odds of someone plugging in new PCI/e cards is more unlikely than someone connecting a new USB device after install. With the "log file" methodology, this could also be a blessing as the shell could prompt "New hardware detected. Please insert your CD/USB/etc. and press ENTER" when the module(s) in question are not available on the local boot drive... copy the needed pieces over and viola'. (Or use the internet accordingly.)
Q: What about hardware which isn't kernel supported?
A: I've been giving this some thought as well (specifically thinking of Adaptec and Silicon Image) and there's going to be someone out there who needs a hand making a given piece of hardware work under Linux and at very least, on a driver level, this is where the forum could easily add to the power of TC. I have an adaptec xxxx-xx SCSI adapter which isn't directly supported under 'nix... SOMEWHERE out there is a good chance someone has already crossed this path for a different flavor of Linux and odds are pretty good that if a solution was found, it can be implemented into our "Master Kernel" with little or no effort. "By adding this distinct item to our collective, we achieve perfection."
Mind you, that's if the given vendor has no problem allowing us to maintain such - and in some cases they may already have kernel specific drivers which can be adapted and added to the masses. This would allow us to grow in strength and compatibility while still maintaining our figure! (Or at least, in theory!)
I personally use TC4... not because it's the latest and greatest, but because it's the most complete (IMO) when comparing extensions and support, thus I have my own 4x mirror, kernel, core images, etc. to speed things along and to ensure I'm not hammering TC mirrors a couple dozen machines at a time. There are two main flaws which I've been considering doing something about (the above being one) thus I figure it's best to throw this out there and see what kind of responses come in and if enough positive comes back, it would be worthwhile moving in those directions.
The second "flaw" (so to speak) is going to be the limitation of the repo itself. The mainstream repos (take RH for example) have tens of thousands of software apps, utilities, etc. at their disposal... I've been working on a way to take advantage of these resources for the betterment of TC.
For example, take IceWM from TC 4.x... it's old and antiquated. The authors aren't exactly running to our door with new releases and the TC crew is going to be limited in numbers and man-hours since we're not exactly on a payroll, but my "update" system for IceWM was virtually painless so now I have an extension for icewm_1.2.30 which works as smooth as glass under TC4. The same "update" system has also been built for firefox, chrome, java (JRE), flash player and quite a few others, which led me to ask myself "...what about on a global scale?" The update system grabs the latest releases, but has no way to test the releases so there's a good amount of assumption involved when it comes to functionality. I haven't implemented version control yet, so it's "latest or nothing." I still have some further research to do with the mainstream distros but if things continue on this path, TC could technically compete with the big boys in many areas, with the exception of obesity.
Feedback is key. This post is long-winded, this I know, but I need some serious thinking by the community in order to know which direction to take from here, not just for my own projects... but for all of the TC users in general.