安装petalinux

安装petalinux

参考手册:UG1144
https://docs.xilinx.com/r/en-US/ug1144-petalinux-tools-reference-guide/Setting-Up-Your-Environment

博客参考:https://blog.csdn.net/u013793399/article/details/53054734

注意,安装版本要和vivado版本和sdk版本都要对应起来,我用的是2019.1

安装可能会提示缺少环境,sudo apt install 对应环境就可以了
可能会有一个python环境怎么都不行,原因是安装程序会通过dpkg检测python安装状态,就算我们安装了,dpkg里status也没有,我们就要手动伪造,文件在/var/lib/dpkg/status,参考https://stackoverflow.com/questions/62980416/python-error-when-installing-xilinx-petalinux-on-ubuntu-20-04



安装依赖

#!/usr/bin/env
apt install libncurses5 -y
apt install -dev -y
apt install tftpd  -y
apt install zlib1g:i386 -y
apt install libssl -y
apt install -dev -y
apt install flex -y
apt install bison -y
apt install libselinux1 -y
apt install gnupg -y
apt install wget -y
apt install diffstat -y
apt install chrpath -y
apt install socat -y
apt install xterm -y
apt install autoconf -y
apt install libtool -y
apt install tar:1.24 -y
apt install unzip -y
apt install texinfo -y
apt install zlib1g-dev -y
apt install gcc-multilib -y
apt install build-essential -y
apt install screen -y
apt install pax -y
apt install gzip -y

petalinux-create -t project --template zynqMP -n project_1

INFO: Create project: prject_1
INFO: New project successfully created in /root/Documents/petalinux_project/prject_1

plnx@gxt-kt:/root/Documents/petalinux_project/project_1$ ll
total 24
drwxr-xr-x 4 plnx plnx 4096 Aug 21 07:40 ./
drwxr-xr-x 4 plnx root 4096 Aug 21 07:40 ../
-rw-r--r-- 1 plnx plnx  248 Aug 21 07:40 config.project
-rw-r--r-- 1 plnx plnx  186 Aug 21 07:40 .gitignore
drwxr-xr-x 2 plnx plnx 4096 Aug 21 07:40 .petalinux/
drwxr-xr-x 5 plnx plnx 4096 Aug 21 07:40 project-spec/

petalinux-config --get-hw-description ./systolic_conv_ip.sdk

INFO: Getting hardware description...
INFO: Rename bd_systolic_conv_ip_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /root/Documents/petalinux_project/project_1/project-spec/configs/config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time ! 
[INFO] generating u-boot configuration files
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
[INFO] silentconfig rootfs
[INFO] generating petalinux-user-image.bb

drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:44 ./
drwxr-xr-x  4 plnx root 4096 Aug 21 07:40 ../
drwxr-xr-x  7 plnx plnx 4096 Aug 21 07:44 build/
drwxr-xr-x  3 plnx plnx 4096 Aug 21 07:42 components/
-rw-r--r--  1 plnx plnx  248 Aug 21 07:40 config.project
-rw-r--r--  1 plnx plnx  186 Aug 21 07:40 .gitignore
drwxr-xr-x  2 plnx plnx 4096 Aug 21 07:45 .petalinux/
drwxr-xr-x  6 plnx plnx 4096 Aug 21 07:43 project-spec/
drwxrwxrwx 10 plnx plnx 4096 Aug 12 05:41 systolic_conv_ip.sdk/
drwxr-xr-x  3 plnx plnx 4096 Aug 21 07:44 .Xil/

petalinux-config -c u-boot

[INFO] generating Kconfig for project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] configuring: u-boot
[INFO] generating u-boot configuration files
[INFO] bitbake virtual/bootloader -c menuconfig
Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00
Loaded 3810 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2766 cached, 11 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#####################################################################################################################################################| Time: 0:00:02
Checking sstate mirror object availability: 100% |#############################################################################################################################| Time: 0:00:01
Sstate summary: Wanted 62 Found 56 Missed 12 Current 0 (90% match, 0% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 484 tasks of which 452 didn't need to be rerun and all succeeded.
bitbake -c diffconfig virtual/bootloader
Loading cache...done.
Loaded 3811 entries from dependency cache.
Parsing recipes...done.
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks...done.
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 1 (/opt/petalinux/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_2019.1.bb:do_diffconfig)
NOTE: recipe u-boot-xlnx-v2019.01-xilinx-v2019.1+gitAUTOINC+d895ac5e94-r0: task do_diffconfig: Started
NOTE: recipe u-boot-xlnx-v2019.01-xilinx-v2019.1+gitAUTOINC+d895ac5e94-r0: task do_diffconfig: Succeeded
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded.

[INFO] successfully configured u-boot


drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:48 ./
drwxr-xr-x  4 plnx root 4096 Aug 21 07:40 ../
drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:49 build/
drwxr-xr-x  3 plnx plnx 4096 Aug 21 07:42 components/
-rw-r--r--  1 plnx plnx  248 Aug 21 07:40 config.project
-rw-r--r--  1 plnx plnx  186 Aug 21 07:40 .gitignore
drwxr-xr-x  2 plnx plnx 4096 Aug 21 07:49 .petalinux/
drwxr-xr-x  6 plnx plnx 4096 Aug 21 07:43 project-spec/
drwxrwxrwx 10 plnx plnx 4096 Aug 12 05:41 systolic_conv_ip.sdk/
drwxr-xr-x  4 plnx plnx 4096 Aug 21 07:48 .Xil/

petalinux-config -c kernel

[INFO] generating Kconfig for project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] configuring: kernel
[INFO] generating kernel configuration files
[INFO] bitbake virtual/kernel -c menuconfig
Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:04
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#####################################################################################################################################################| Time: 0:00:02
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#####################################################################################################################################################| Time: 0:00:02
Checking sstate mirror object availability: 100% |#############################################################################################################################| Time: 0:00:01
Sstate summary: Wanted 12 Found 8 Missed 8 Current 37 (66% match, 91% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 376 tasks of which 366 didn't need to be rerun and all succeeded.
bitbake -c diffconfig virtual/kernel
Loading cache...done.
Loaded 3811 entries from dependency cache.
Parsing recipes...done.
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks...done.
Checking sstate mirror object availability...done.
Sstate summary: Wanted 12 Found 8 Missed 8 Current 26 (66% match, 89% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 286 of 286 (/opt/petalinux/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.1.bb:do_diffconfig)
NOTE: recipe linux-xlnx-4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0: task do_diffconfig: Started
NOTE: recipe linux-xlnx-4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0: task do_diffconfig: Succeeded
NOTE: Tasks Summary: Attempted 286 tasks of which 285 didn't need to be rerun and all succeeded.

Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#####################################################################################################################################################| Time: 0:00:02
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
[INFO] successfully configured kernel

drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:48 ./
drwxr-xr-x  4 plnx root 4096 Aug 21 07:40 ../
drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:52 build/
drwxr-xr-x  3 plnx plnx 4096 Aug 21 07:42 components/
-rw-r--r--  1 plnx plnx  248 Aug 21 07:40 config.project
-rw-r--r--  1 plnx plnx  186 Aug 21 07:40 .gitignore
drwxr-xr-x  2 plnx plnx 4096 Aug 21 07:52 .petalinux/
drwxr-xr-x  6 plnx plnx 4096 Aug 21 07:43 project-spec/
drwxrwxrwx 10 plnx plnx 4096 Aug 12 05:41 systolic_conv_ip.sdk/
drwxr-xr-x  4 plnx plnx 4096 Aug 21 07:48 .Xil/

petalinux-config -c rootfs

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] configuring: rootfs
[INFO] generating kconfig for Rootfs
[INFO] menuconfig rootfs


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] generating petalinux-user-image.bb
[INFO] successfully configured rootfs

drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:48 ./
drwxr-xr-x  4 plnx root 4096 Aug 21 07:40 ../
drwxr-xr-x  8 plnx plnx 4096 Aug 21 07:53 build/
drwxr-xr-x  3 plnx plnx 4096 Aug 21 07:42 components/
-rw-r--r--  1 plnx plnx  248 Aug 21 07:40 config.project
-rw-r--r--  1 plnx plnx  186 Aug 21 07:40 .gitignore
drwxr-xr-x  2 plnx plnx 4096 Aug 21 07:53 .petalinux/
drwxr-xr-x  6 plnx plnx 4096 Aug 21 07:43 project-spec/
drwxrwxrwx 10 plnx plnx 4096 Aug 12 05:41 systolic_conv_ip.sdk/
drwxr-xr-x  4 plnx plnx 4096 Aug 21 07:48 .Xil/


petalinux-build

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值