Xilinx 开发环境
交叉编译环境
在 NAS 文件服务器下载 Xilinx SDK 包,有两种安装方式:
直接解压 sdk.tar.bz2 到任意目录(如 /opt)
执行 sdk.sh 脚本安装
执行示例:
$ ./sdk.sh
PetaLinux SDK installer version 2021.2
======================================
Enter target directory for SDK (default: /opt/petalinux/2021.2):
You are about to install the SDK to "/opt/petalinux/2021.2". Proceed [Y/n]?
[sudo] rudy 的密码:
Extracting SDK....................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /opt/petalinux/2021.2/environment-setup-cortexa72-cortexa53-xilinx-linux
使用前需要先执行 source 命令,配置开发环境
$ source /opt/petalinux/2021.2/environment-setup-cortexa72-cortexa53-xilinx-linux
检查是否配置成功
$ aarch64-xilinx-linux-gcc --version
aarch64-xilinx-linux-gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
关闭自动休眠
root@bionic-arm64:~# sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Created symlink /etc/systemd/system/sleep.target �→ /dev/null.
Created symlink /etc/systemd/system/suspend.target �→ /dev/null.
Created symlink /etc/systemd/system/hibernate.target �→ /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target �→ /dev/null.