[klibc] initramfs scripts and other stuff
Russell King
rmk@arm.linux.org.uk
Tue, 22 Oct 2002 01:24:04 +0100
Hi,
The attached patch is an update to the latest klibc (I just checked a
few bits into CVS) which adds support for initramfs. Since it contains
bits that aren't available yet on the main site, I've also put a tarball
up which contains only what's in the latest CVS.
The initramfs stuff is what I use here to boot one of my machines; it
works for me, but probably won't work without modification for you.
What functionality does this give you:
- mount local filesystems
- identify and ungzip/copy a "ramdisk image" like we used to with initrd
- setup networking via DHCP
It would be nice to be able to mount NFS images; there is code around
for doing this (I believe Al Viro ripped some code from the kernel.)
There are a couple of extra targets:
make initramfs - lays out the initramfs in $(KLIBC)/initramfs
make initramfs.cpio - creates a CPIO archive of the above
My test environment currently creates an ext2fs image from the initramfs
layout, and passes this to the kernel as an initrd. It should work as
a proper initramfs (as long as your kernel has the initramfs patches
applied.)
You can find the tarball + patch (you need both) at:
http://ftp.linux.org.uk/pub/linux/rmk/klibc/
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html