[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MI boot args revamp?
On May 22, 6:25pm, Jean-Yves Migeon wrote:
} Le 30/12/12 22:40, John Nemeth a écrit :
} > On May 22, 9:38am, Jean-Yves Migeon wrote:
} > } 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.
} Interesting -- what kind of runtime requirements are there when plist
} are used? I suppose that building up a plist from low level code is not
} quite practical (bootloaders and/or early kernel boot).
You need to link with libprop. I already have plans to link
libprop to the x86 /boot for various reasons, although I haven't
finalised how I'm going to do everything.
} modload(8) has a custom implementation to internalize passed arguments
} (-b, -i ,...) into a plist, however the binary can rely on a rich
} runtime when executed, which is not necessarily the case when parsing
} cmdline strings.
Either the keyword can be used to imply the argument type, or you
would have to analyze the value to figure out what it is. Since you've
looked at the source for modload, you will have seen that there are
different proplib functions to add different types of objects, so you
will need to figure out the type of object.
}-- End of excerpt from Jean-Yves Migeon
Main Index |
Thread Index |