This section provides guidance for managing SD Card files and images.
Writing Images to the SD Card
You can use the Vitis Unified
Software Platform accelerated flow to target an embedded platform. initramfs uses Double Data Rate SDRAM (DDR SDRAM) for
file system storage; targeting an embedded platform facilitates packaging and
creates an SD image with RootFS as an EXT4 partition. The process limits the real
usable DDR memory for Linux kernel and applications when the file system size
increases; it cannot retain RootFS changes after reboot.
To write EXT4 RootFS to an SD Card:
- Prepare an SD card binary image file with FAT32 partition for boot and EXT4 partition for RootFS.
- Write SD card images to the SD card via a tool such as Etcher on Windows or the
ddcommand on Linux.
There are various ways to prepare an SD card image. You can use the v++ package tool to generate it, or use an open source tool. The v++ package tool generated sd_card.img has two partitions:
- FAT32 Partition
- 1 GB size, initialized with the kernel image provided by common Linux components.
- EXT4 Partition
- 2 GB size, initialized with RootFS provided by common Linux components.
To make the pre-built SD card image boot, you must copy the following boot components to the FAT32 partition:
- pre-built/BOOT.BIN
- boot.scr from the <VITIS_INSTALL_DIR>/base_platform/<PLATFORM_NAME>/sw/xrt/image directory
- bl31.elf, u-boot.elf, and system.dtb from the <VITIS_INSTALL_DIR>/base_platform/<PLATFORM_NAME>/sw/boot directory
- A platform_desc.txt file containing the name of the platform must also be added to the FAT32 partition.
The pre-built SD card image can be used for evaluation usage and by Windows users. It does not require Vitis or PetaLinux to be installed.
v++ --package with Ext4 partition is not supported on
Windows.For hands on examples, review the packaging step in the tutorial available on GitHub: https://github.com/Xilinx/Vitis-Tutorials/tree/HEAD/Vitis_System_Design/Design_Tutorials/02-Versal_Vitis_Subsystem_Flow.
Using FAT32 Formatted SD Card
For Windows OS, there is no native support for EXT4 formats, so
Windows can only access SD Card with FAT32 partitions. In this case, you can format
a single primary partition to FAT32 and copy the files from the generated output to
the sd_card folder.