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

what's the best small shell for initrd?



How can we make the smallest image for initrd?

Currently /bin/sleep drags in libpthread, libm, and librt.

Also insmod, modprobe, raidstart, and echo are all linked with libc6.

How difficult is the ash shell to hack on?

Would anyone be interested in a version of ash that's statically linked and 
which incorporates the functionality of insmod, modprobe, raidstart, and 
sleep (without dragging in libpthread etc)?

I want to fit an initrd and the kernel image on a floppy disk, currently my 
kernel is 600K and my initrd is 1M, I think I should be able to get the 
initrd well under 400K...

As an aside, why does sleep link with so many things?  It seems strange for 
such a small program to take 1500K of memory (500K RSS) and link with 4 
shared libraries when essentially all it does is parse argv and make a single 
system call...

-- 
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page



Reply to: