Writing Images to the SD Card - 2022.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-05-25
Version
2022.1 English

You can use the Vitis unified software platform accelerated flow to target an embedded platform. This facilitates packaging and creating an SD image with RootFS as an EXT4 partition, because initramfs uses Double Data Rate SDRAM (DDR SDRAM) for file system storage. It 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:

  1. Prepare an SD card binary image file with FAT32 partition for boot and EXT4 partition for RootFS.
  2. Write SD card images to the SD card. You can use various tools to do this, such as Etcher on Windows or dd command on Linux.
    Note: Refer to Xilinx Answer Record 73711 for detailed information about these tools.

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, system.dtb, init.sh, and platform_desc.txt in the xrt/image directory

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.

Note: The v++ --package with Ext4 partition is not supported on Windows.
Note: init.sh sets up the environment variable XILINX_XRT and copies the platform_desc.txt file to /etc/xocl.txt. You must manually run this after Linux boots up before running any acceleration applications.