On Wed, 12 Nov 2008, Manuel Bouyer wrote:
Whereas in my head, I constructed: /netbsd/kernel /netbsd/modules/... /onetbsd/kernel /onetbsd/modules/... boot /netbsd boot /onetbsdIf the bootloader finds a file, it boots the file. If it finds a directory, it boots the file named 'kernel' in the directory.
That's about what I had in mind.
but there is a senario where this doesn't work: if the kernel is loaded from a path which is not accessible from the kernel itself (this is not so uncommon, I think several of our port don't have a bootloader at this time), then the kernel doesn't have an accessible path (or eventually no path at all, depending on how the kernel is loaded) from where to find the modules. Maybe is this case a sysctl'able path would do the trick ...
I guess you're thinking about Xen, where a DomU kernel gets loaded from Dom0, and where that kernel then needs to get its modules from. The situation there is about the same: you need to place the modules somewhere, and /netbsd/modules/* could still be used - the usual Xen dance on how to get the kernel from Dom0 in the first place is the real problem, but that's not the question here - I guess passing this as kernel parameter could be done. Or try to fiddle it from the booted kernel name, somehow, e.g. use /`sysctl machdep.booted_kernel`/modules/*.
Out of curiosity, what is the machdep.booted_kernel sysctl set to on a Xen Dom0 system? (Assuming that's the scenario you have in mind)
- Hubert