- Kernel without File system.
- Sending Filesystem to Kernel [Pointer from Bootloader - though kernel root=].
- Defintion of Minimal rootfilesystem.
- Content of Rootfilesystem.
sudo
Permisions.- User space first process.
- Programs and Utilities.
- Libraries.
- Merging
sysroot
withrootfilesystem
usingrsync
- Virtual File systems [proc and sysfs].
proc & sys creation/mounting process.
- Packaging rootfilesystem to target [initramfs - Disk Image - NFS].
- Creating Uncompressed filesystem.
- Compressing
initramfs
system using [mkinitfs - CPIO]. - Booting Kernel with initramfs.
- Init program [Process of reading configuration from /etc/inittab].
qemu-system-aarch64 -M virt -cpu cortex-a53 -m 1G -kernel Image -append "console=ttyAMA0" -nographic
man hier
- Create directories Manual.
- Filling content of directory with a. Init process. b. shell. c. commands. d. Applications. e. Libraries.
By changing to to root ownership.
a. init.d -----> read configuration /etc/inittab. b. systemd.
- Download Busybox.
git clone git://busybox.net/busybox.git
cd busybox
- Build busybox.
make distclean
make ARCH=arm64 CROSS_COMPILE=<prefix_toolchain> menuconfig ---> for PREFIX install.
make ARCH=arm64 CROSS_COMPILE=<prefix_toolchain>
- Install busybox to
Minimal rootfilesystem
.
make ARCH=arm64 CROSS_COMPILE=<prefix_toolchain> install
rsync -avh /path/source /path/to/destination/
find . -print0 | cpio --null -ov --format=newc > initramfs.cpio
find . -print0 | cpio --null -ov --format=newc > initramfs.cpio
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello From Kernel" << endl;
}
readelf
qemu-system-aarch64 -M virt -cpu cortex-a53 -m 1G -kernel Image -append "console=ttyAMA0 rdinit=/bin/sh" -initrd <initramfs> -nographic