This guide walks you through the process of building a custom OS for the Kria KR260 FPGA Robotics Kit using PetaLinux and BSP (Board Support Package) files. The steps include downloading necessary files, setting up the environment, applying workarounds, and successfully generating a PetaLinux system image.
Refer to the AMD Official Guide for custom OS build instructions.
Download the PetaLinux installer and BSP files for the Kria KR260 Robotics Kit from the AMD website.
Ensure that the PetaLinux Tools and BSP files are of the same version to avoid compatibility issues (In my case its version 2024.2)
Some additional steps are required to ensure a smooth PetaLinux build process.
Ensure that your host machine meets all the installation requirements as specified in the official guide.
Before installing PetaLinux Tools, execute the following commands in your Linux terminal:
sudo dpkg --add-architecture i386ii. Switch from bash to dashsudo dpkg-reconfigure dashiii. Set Up a TFTP Serversudo apt install tftpd-hpa tftp
sudo nano /etc/default/tftpd-hpaModify the configuration as follows:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"Create the TFTP boot directory and set permissions:
sudo mkdir -p /var/lib/tftpboot
sudo chown -R tftp:tftp /var/lib/tftpboot
sudo chmod -R 777 /var/lib/tftpbootRestart and enable the service:
sudo systemctl restart tftpd-hpa
sudo systemctl enable tftpd-hpaiv. Add User to dialout Groupsudo adduser $USER dialout4. Install PetaLinuxUse the instruction Here to install the Petalinux tools.
If installation fails due to missing libraries, install the required packages using package installer for the host OS. The missing dependencies will be listed in the console error log during installation.
Follow the official documentation to configure your PetaLinux workspace.
Use the BSP files to initialize your project environment. Create Project.
Customize various components of the PetaLinux project, such as:
Root File SystemKernel ConfigurationFirmware Versions
Use the instruction Here to build the project.
Important Considerations:
Ensure a stable internet connection and sufficient disk space in the output directory.The build process may take over an hour, depending on system performance.If the build fails due to timeouts, retry multiple times to complete successfully.
Once the project build is complete, generate the SDK to obtain the sysroot for Vitis.
petalinux-build --sdk10. Generate the Boot ImageFollow the AMD documentation to generate a bootable image for deployment.
Transfer the generated image to an SD card and boot the Kria KR260 FPGA board with the PetaLinux OS.
By following these steps, you can successfully build and deploy a custom OS using PetaLinux for the Kria KR260 FPGA Robotics Kit. This setup allows for further customization and application development using Vitis acceleration tools.


Comments