Configuring INITRAMFS Boot - 2024.2 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2024-11-13
Version
2024.2 English
  1. Set the RootFS type to INITRAMFS. For more information, see Configuring Root File System Type.
  2. Set INITRAMFS/INITRD Image name. The default image name is set to petalinux-initramfs-image to enable the switch_root. The build system generates two types of root file systems: ramdisk images and rootfs images. The ramdisk image is generated as specified in the INITRAMFS/INITRD Image name. It is packed into Fit image (image.ub) and Kernel image.
    Note: Setting petalinux-initramfs-image enables the switch_root and searches for the rootfs in ext2/3/4 of SD partitions. If switch_root is disabled load the final rootfs from RAM.
  3. Build the system image. For more information, see Building a System Image.
  4. Use one of the following methods to boot the system image.
    1. Boot a PetaLinux Image on QEMU, see Booting PetaLinux Image on QEMU.
    2. Boot a PetaLinux Image on Hardware with SD Card, see Booting PetaLinux Image on Hardware with an SD Card.
    3. Boot a PetaLinux Image on Hardware with JTAG, see Booting PetaLinux Image on Hardware with JTAG.
Important: The default mode in the PetaLinux BSP is the INITRD mode.

In INITRAMFS mode, RootFS is included in the kernel image.

  • Image → Image (kernel) + ramdisk.cpio/rootfs.cpio (for Zynq UltraScale+ MPSoC and Versal adaptive SoC)
  • uImage → uImage (kernel) + ramdisk.cpio/rootfs.cpio (for Zynq 7000 devices)
  • linux.bin.ubsimpleImage.mb (kernel) + ramdisk.cpio/rootfs.cpio (for MicroBlaze processors)

As you select the RootFS components, its size increases proportionally.