[klibc] Early-userspace development

Kevin P. Fleming kpfleming@cox.net
Wed, 12 Mar 2003 22:07:10 -0700


H. Peter Anvin wrote:
> Most of the tools you're listed are heavily bloated in order to work as
> user tools.  This was never a desig goal of klibc/early userspace;
> although you may be able to compile them against klibc (although hardly
> busybox... it uses library functions like crazy) it is better to see if
> we can perhaps share code or create more minimal implementations.

I hadn't thought that all the way through until now, but I understand 
what you are saying. Even if the code itself is not terribly bloated, 
it'll have help information, diagnostic/debug modes, etc. that are 
nearly useless in the initramfs environment. Very likely it will have to 
be code sharing at best, and new versions for a lot of things.

>>In spite of that, is there any reason not to proceed with working on
>>things like /sbin/hotplug-based partition discovery (my first goal at
>>this point)?
> 
> 
> Not at all, go for it.  You may want to structure code so that it can be
> compiled small with klibc (note you probably need to do O_LARGEFILE and
> llseek() explicitly in klibc) or compiled against glibc for the full
> userspace environment.


As it stands, the only two tools that _should_ be necessary to 
accomplish this are diethotplug (which is already very small) and partx 
from util-linux (which is also very small). This will be a good starting 
point, I think.