Steps for Root File System Type Configuration - 2024.2 English - UG1144

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2024-11-13
Version
2024.2 English
  1. Change into the root directory of your PetaLinux project.
    cd <plnx-proj-root>
  2. Launch the top-level system configuration menu.
    petalinux-config
  3. Select Image Packaging Configuration > Root File System Type.
  4. Select INITRAMFS or INITRD or UBI/UBIFS or NFS or EXT4 (SD/eMMC/SATA/USB) as per the requirement.
    Note: EXT4 boot functionality expects the root file system to be mounted on ext4 partition and the BOOT.BIN, system.dtb, and kernel images in FAT32 partition.
    Note: Set Image Package Configuration > Root File System Type as "INITRAMFS/INITRD configuration" with petalinux-initramfs-image. Then, the full rootfs should be mounted in ext4 partition to use the switch_root.
  5. Save Configuration settings.
    Note: Switch_root in petalinux-config: The switch_root is a utility used to switch from one root file system to another file system as the root of the mount tree. It is primarily used for initramfs/initrd cases.
  6. In PetaLinux Zynq UltraScale+ MPSoC and AMD Versalâ„¢ BSPs, the default menuconfig option for petalinux-config > Image Package Configuration > INITRAMFS/INITRD image name is set to petalinux-initramfs-image which is treated as switch_root enabled. The respective config image is packaged in the image.ub file and copied into the images/linux folder with ramdisk prefixed to the file name (for example, ramdisk.cpio.gz.u-boot), if the image specified in the config option name contains the initramfs. The default generated ramdisk.cpio.gz.u-boot is a tiny-based search of the root file system for the EXT partition in SD/eMMC that is used as a real time rootfs file system irrespective of boot mode. If the init script in the tiny rootfs system does not find any rootfs in real time, it lands in to the tiny-based rootfs with the '/#' prompt. See Migration, for more information.