• 安装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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27

    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/
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    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/
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31

    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/
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47

    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/
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65

    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/
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28

    petalinux-build

  • 相关阅读:
    【濡白的C语言】部分string.h库函数的实现
    HTML base标签
    数据结构之单链表代码总结
    PCB板中符号的意义
    精通Linux,不清楚Telnet和SSH?
    淘宝API接入说明(商品详情数据示例)
    C++ Reference: Standard C++ Library reference: C Library: cwchar: swscanf
    JAVA多线程
    案例分析-金融业网络安全攻防
    期权翻倍行情一个月会出现几次?
  • 原文地址:https://blog.csdn.net/my_id_kt/article/details/126384194