initramfs
initramfs is a tiny-rootfs that can be either appended as a initramfs for linux kernel or used an initrd. It is based on a statically-linked busybox and few home-made scripts. Do not forget to provide your own cross-compiler. Prerequisites...
Clone the repository...
$ git clone git@github.com:gazoo74/initramfs.git && cd initramfs
... init and update recursively project submodules:
$ git submodule update --init --recursive
Optionally, to build a kernel image with its appended initramfs, you may fetch linux sources into the linux directory either by cloning one of the multiple git repository...
$ git clone git@github.com:torvalds/linux.git linux
... or by getting and unarchiving a kernel archive, pick up a version above 4.1:
$ wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.tar.xz && tar xJf linux-4.1.tar.xz && ln -sf linux-4.1 linux
...Ready to go!
Your are now ready to build an initramfs image...
$ make
... or a kernel with its appended initramfs...
$ make kernel
... or build an initrd image:
$ make initrd.cpio
$ make initrd.squashfs
Enjoy!
PS: Do no forget to run...
$ make help
... to check for what you can do with the Makefile!