Config Option to Change RAM-based Filesystem - 2020.2 English

PetaLinux Tools Documentation Reference Guide (UG1144)

Document ID
UG1144
Release Date
2020-11-24
Version
2020.2 English

There is a menu config option to build the initial RAM-based root filesystem as highlighted in the following figure.

Figure 1. RAM-based Root File System

You can provide the name of the Yocto image recipe that is used to build an initial RAM filesystem in the menu “INITRAMFS/INITRD Image” (initramfs/initrd). By default, it is set to petalinux-image-minimal. You can change this to “petalinux-initramfs-image” which is a small file system. This allows the specified image to be bundled inside the kernel image. An “INITRAMFS/INITRD Image” provides a temporary root filesystem used for early system initialization, for example, loading modules needed to locate and mount the "real" root filesystem.

After configuration, you can find the following bootarg changes in <plnx-proj-root>/configs/config

ext4=/dev/mmcblk0p2:/rootfs:
check the /dev/mmcblk0p2 device after loading the initramfs image and mount it to the /rootfs and switch to the new rootfs.

init_fatal_sh=1:
Launch the initramfs prompt if the specified device not available.

You can see the two root file systems in <plnx-proj-root>/images/linux:

initramfs.cpio, initramfs.cpio.gz.u-boot etc..
rootfs.cpio, rootfs.cpio.gz.u-boot etc..