Customize Root File System, Kernel, Device Tree and U-boot - 2024.1 English

Vitis Tutorials: Platform Creation (XD101)

Document ID
XD101
Release Date
2024-06-19
Version
2024.1 English
  1. Enable selected rootfs packages

    In order to add all Vitis acceleration flow required packages, we create a package group option. If this group option is selected, the following Vitis acceleration flow required package is automatically enabled.

Package Group Package Name Description
packagegroup-petalinux-vitis-acceleration-essential xrt xrt is required for Vitis acceleration flow. The dependency packages such as ZOCL driver module will be added automatically
packagegroup-petalinux-vitis-acceleration-essential dnf dnf is a package management tool
packagegroup-petalinux-vitis-acceleration-essential e2fsprogs-resize2fspartedresize-part This set of tool can be used for ext4 partition resize
packagegroup-petalinux-vitis-acceleration-essential opencl-headerspackagegroup-petalinux-opencvpackagegroup-petalinux-x11 These three packages are graph display related library
packagegroup-petalinux-vitis-acceleration-essential gdbvalgrind debug related tools

Follow the steps below to enable the package group for Vitis acceleration flow.

  • Run petalinux-config -c rootfs

  • Go to Petalinux Package Groups -> packagegroup-petalinux-vitis-acceleration-essential and enable packagegroup-petalinux-vitis-acceleration-essential. Also enable packagegroup-petalinux-vitis-acceleration-essential-dev that enables the sysroot support.

petalinux_rootfs.png

  1. Enable OpenSSH and disable dropbear (optional)

    Dropbear is the default SSH tool in Vitis Base Embedded Platform. If OpenSSH is used to replace Dropbear, the system could achieve four times faster data transmission speed over ssh (tested on 1Gbps Ethernet environment). Since Vitis-AI applications may use remote display feature to show machine learning results, using OpenSSH can improve the display experience.

    • In the RootFS configuration window, go to the root directory by selecting Exit once.

    • Go to Image Features.

    • Disable ssh-server-dropbear and enable ssh-server-openssh and click Exit.

    ssh_settings.png

    • Go to Filesystem Packages-> misc->packagegroup-core-ssh-dropbear and disable packagegroup-core-ssh-dropbear.

    • Go to Filesystem Packages level by clicking Exit twice.

    • Go to console -> network -> openssh and enable openssh, openssh-sftp-server, openssh-sshd, openssh-scp.

    • Go to root level by clicking on Exit four times.

  2. Enable Package Management

    Package management feature can allow the board to install and upgrade software packages on the fly.

    • In rootfs config, go to Image Features and enable package-management and debug_tweaks option.

    • Click on OK, Exit twice and select Yes to save the changes.

  3. Disable CPU IDLE in kernel config (recommended during debugging).

    CPU IDLE can cause processors get into IDLE state (WFI) when the processor is not in use. When JTAG is connected, the hardware server on the host machine talks to the processor regularly. If it talks to a processor in IDLE status, the system will hang because of incomplete AXI transactions. Hence, it is recommended to disable the CPU IDLE feature during project development phase. It can be re-enabled after the design is completed to save power in the final products.

    • Launch kernel config: petalinux-config -c kernel

    • Ensure the following items are TURNED OFF by entering ‘n’ in the [ ] menu selection:

      • CPU Power Management > CPU Idle > CPU idle PM support

      • CPU Power Management > CPU Frequency scaling > CPU Frequency scaling

    • Exit and Save.