- Change into the root directory of your PetaLinux
project.
cd <plnx-proj-root>
- Launch the top-level system configuration
menu.
petalinux-config
- Select .
- 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 as "INITRAMFS/INITRD configuration" with
petalinux-initramfs-image
. Then, the full rootfs should be mounted in ext4 partition to use theswitch_root
. - Save Configuration settings.Note:
Switch_root
in petalinux-config: Theswitch_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. - In PetaLinux Zynq UltraScale+ MPSoC and AMD Versalâ„¢
BSPs, the default menuconfig option for
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.