Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: genec on May 14, 2011, 01:03:26 PM
-
Has anyone considered doing something like this? I'm entertaining the idea of modifying /etc/init.d/tc-config to do exactly this. At the moment, I'm running purely from multiple initrd-loaded CPIO.GZ archives with the fresh .dep files from the repo. I'd like to rebuild those deps based on the running kernel before tce-setup does its dep check. The advantage of this is that I can have one set of CPIO.GZ files and just swap out the kernel/root/kernel modules at boot time from 32-bit x86 to 64-bit x86-64 (aka x64).
I'd figure there may be a desire to also do something else so I'd consider doing it just after the parsing of /proc/cmdline.
-
Such a bootcode wouldn't be very useful, because where it needs to be called would vary by the use-case.
For your case, how about editing /init to do what you need? It's called before tc-config.
-
That's a part of what was running through my mind of how early is the right time.
/init (a script) is the first one called by the kernel which then turns around and starts the real init after adjusting inittab if needed. That would certainly work. I was just trying to think of a way to minimize the differences from the official root archives.
Next up is looking at what tce-audit does and how it can affect timing versus just doing it myself.