[klibc] Reason for gen_init_cpio instead of just cpio?

H. Peter Anvin hpa@zytor.com
Tue, 18 Mar 2003 15:16:31 -0800

Kevin P. Fleming wrote:
> I've googled to try and find discussion of this topic but didn't see any
> results particularly interesting... Is there any particular reason the
> kernel has gen_init_cpio instead of just using cpio itself? I'm working
> on some changes that would involve just cpio-ing the entire usr/root
> subtree as the initramfs image (instead of gen_init_cpio having to know
> ahead of time what files to include), and am wondering why it wouldn't
> be just easier to use cpio itself.
> If there's a good reason, I can certainly extend gen_init_cpio to do the
> tree-walk and build the initramfs that way.

I think the reason is that it's desirable to be able to build a cpio
archive including device nodes (e.g. /dev/console) without having to be