tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MI boot args revamp?



On May 22,  9:38am, Jean-Yves Migeon wrote:
} Le 29/12/12 22:23, Jeff Rizzo a écrit :
} > On 12/29/12 1:12 PM, Greg Troxel wrote:
} >>    I would like to have a way to pass a string composed of the same flags
} >>    (we can continue to use our existing "-a", "-s" and other flags) in a
} >>    consistent manner from one platform to another, to be able to adjust
} >>    driver options, kernel options, whatever, and to be able to expect it
} >>    to be similar whether I'm on amd64, macppc, evbppc, evbarm, or
} >>    whatever.
} >>
} >> Are you talking about the UI of how the strings are written and what
} >> they mean or how the bootloader stage that interacts with the user/prom
} >> communicates this to the kernel?  For platforms with existing
} >> conventions, I don't see how we can interact with native bootloaders
} >> without meeting their interface.
} >
} > There are always going to be exceptions;  certain platforms (especially
} > older ones) are not flexible enough to do everything we want the way we
} > want it.  What I _would_ like to get to is "this is the recommended goal
} > to shoot for".
} 
} That really depends on the capabilities of the MD component. I have a 
} good example with Xen though.
} 
} Xen port parses a command line for which the syntax is very close to the 
} one used by Linux (key=value) syntax [1]. Having a command line close to 
} this syntax has a potential for code reuse, or even turn it into an 
} MI/MD interface.

     Xen uses multiboot.  Yet another thing on my todo list is to
handle boot time module loading in the multiboot case.

} As we have a decent module framework too, I would look at what module(7) 
} offers when we pass arguments to them. I would expect modules and kernel 
} share the same code when parsing args, this makes sense somehow. Typical 
} example is (again) Xen with a DOM0 kernel, where the kernel is loaded as 
} a module.

     module(7) arguments are passed as a plist.  Take a look at
sys/modules/example/example.c.  That is the simplest module.

}-- End of excerpt from Jean-Yves Migeon


Home | Main Index | Thread Index | Old Index