I am attempting to get initramfs working on an embedded linux device using buildroot and uboot. I have been following the guides have have initramfs set up in the buildroot and kernel config. However as far as I can tell it is not being built into the kernel, although a CPIO or the root FS is being included in the output.
My questions is twofold. First, from a high level standpoint, is my understanding of the boot process correct?
- Stage 1 bootloader (Atmel/ARM specific) starts and hands off
- Stage 2 bootloader (uboot) initializes a few things, loads the kernel into memory and runs it
- The kernel places the CPIO archive into memory, makes that root and runs init in that enviornment
This means the image I flash onto the chip is an IMG with a boot and system partition, the system partition is ext4 and contains the CPIO archive within. I am not sure how to make item 3 actually happen from here.
Second, in terms of actual configurations, the Buildroot menuconfig has a number of options for filesystems
- ext2/3/4 root filesystem (on by default)
- cpio the root filesystem (for use as an initial RAM filesystem)
- initial RAM filesystem linked into linux kernel
Then in the kernel config
- General -> Initial RAM filesystem and RAM disk (initramfs/initrd) support
- General -> Initramfs source files (set to the generated cpio file)
What is buildroot generating here? From my end it looks like I am getting duplicate images (CPIO and ext4) and the CPIO is being ignored.