创建petalinux工程

Create a new project from a reference BSP file.

用于从官方下载的BSP中抽取数据产生工程。

petalinux-create -t project -s <FULLPATH-TO-BSP>

Create a new project based on the MicroBlaze template.

用于让petalinux工具包,从系统中抽取模板,产生工程。

$ petalinux-create -t project -n <PRJ_NAME> --template microblaze

Initialize a PetaLinux project within the project directory with an external HDF.

用于指定一个位于工程目录之外的包含HDF的文件夹用于搜索。

petalinux-config --get-hw-description=<PATH-TO-HDF-DIRECTORY>

Initialize a PetaLinux project from within the directory containing an HDF.

用于指定一个petalinux工程目录。在工程目录的子目录中,搜索存放HDF文件。

petalinux-config --get-hw-description -p <%PATH-TO-PETALINUX-PROJECT%>

Initialize a PetaLinux project from a neutral location

用于指定一个petalinux工程目录。并指定一个单独的HDF文件。

petalinux-config --get-hw-description <%PATH-TO-HDF%> -p <%PATH-TO-PETALINUX-PROJECT%>

配置

Start the menuconfig for the system-level configuration:

开始 系统级别的 menuconfig:

$ petalinux-config

Parse the configuration onto Kconfig without opening the GUI(--oldconfig), for the root filesystem(-c rootfs):

无GUI配置组件。

# 以根文件系统为例
petalinux-config -c rootfs --oldconfig

Load the Linux kernel configuration with a specific default configuration:

以指定的配置文件对组件进行配置:

注意,这样的配置文件需要存在于kernel或者uboot的源码树中,不能额外指定外部文件。

否则会报错:ERROR: linux-xlnx-4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0 do_kernel_metadata: A KBUILD_DEFCONFIG 'xxx' was specified, but not present in the source tree

# 以内核为例
petalinux-config -c kernel --defconfig xilinx_zynq_base_trd_defconfig # 以 uboot 为例
petalinux-config -c u-boot --defconfig xilinx_zynqmp_zcu102_defconfig

Generate the source code for fsbl/fs-boot:

生成源码(以fsbl/fs-boot为例)。

petalinux-config -c bootloader

构建

Build the entire PetaLinux project

构建整个PetaLinux工程

petalinux-build

Build the kernel forcefully

强制构建内核

petalinux-build -c kernel -f

Compile a kernel forcefully

强制编译内核

petalinux-build -c kernel -x compile -f

Clean all build collaterals from the U-Boot component of the PetaLinux project.

清理构建中间组件

$ petalinux-build -c u-boot -x cleansstate

Create an updated FIT image from the current contents of the deploy area.

从部署域的当前内容创建更新的FIT映像。

petalinux-build -x package

清理

Clean all build collaterals. It removes build/, ${TMPDIR} and images. This will bring the

project to its initial state

## 慎用
petalinux-build -x mrproper

Clear the build area of the PetaLinux project for archiving as a BSP or for revision

control. This example retains the images directory of the project

petalinux-build -x distclean

烧录

Download and boot a pre-built bitstream (and FSBL for Zynq-7000 or Zynq UltraScale+

MPSoC) via JTAG to a physical board.

petalinux-boot --jtag --prebuilt 1

Download and boot a pre-built U-Boot elf via JTAG to a physical board.

$ petalinux-boot --jtag --prebuilt 2

For Zynq-7000, it downloads:

  • bitstream pre-built/linux/implementation/download.bit
  • fsbl pre-built/linux/images/zynq_fsbl.elf
  • u-boot pre-built/linux/images/u-boot.elf

For Zynq UltraScale+ MPSoC, it downloads:

  • bitstream pre-built/linux/implementation/download.bit
  • fsbl pre-built/linux/images/zynqmp_fsbl.elf
  • ATF pre-built/linux/images/bl31.elf
  • u-boot pre-built/linux/images/u-boot.elf
  • pmufw pre-built/linux/images/pmufw.elf

Download and boot a pre-built kernel image via JTAG to a physical board

petalinux-boot --jtag --prebuilt 3

For Zynq-7000, it downloads:

  • bitstream pre-built/linux/implementation/download.bit
  • fsbl pre-built/linux/images/zynq_fsbl.elf
  • DTB pre-built/linux/images/system.dtb
  • kernel pre-built/linux/images/zImage

For Zynq UltraScale+ MPSoC, it downloads:

- bitstream pre-built/linux/implementation/download.bit
- fsbl pre-built/linux/images/zynqmp_fsbl.elf
- kernel pre-built/linux/images/Image
- DTB pre-built/linux/images/system.dtb
- ATF pre-built/linux/images/bl31.elf
- pmufw pre-built/linux/images/pmufw.elf)

Download and boot a built U-Boot image via JTAG to a physical board

petalinux-boot --jtag --u-boot

For Zynq-7000, it downloads:

  • fsbl images/linux/zynq_fsbl.elf
  • U-Boot images/linux/u-boot.elf.

For Zynq UltraScale+ MPSoC, it downloads:

  • fsbl images/linux/zynqmp_fsbl.elf
  • U-Boot images/linux/u-boot.elf
  • ATF images/linux/bl31.elf
  • pmufw images/linux/pmufw.elf

Download and boot a built kernel image via JTAG to a physical board.

petalinux-boot --jtag --kernel

(For Zynq-7000, it boots:

  • fsbl images/linux/zynq_fsbl.elf
  • DTB images/linux/system.dtb
  • kernel images/linux/zImage

For Zynq UltraScale+ MPSoC, it boots:

  • fsbl images/linux/zynqmp_fsbl.elf
  • kernel images/linux/Image
  • DTB images/linux/system.dtb
  • ATF images/linux/bl31.elf
  • pmufw images/linux/pmufw.elf

启动

Load and boot a pre-built U-Boot elf via QEMU.

$ petalinux-boot --qemu --prebuilt 2

Load and boot a pre-built U-Boot elf via QEMU in root mode.

$ petalinux-boot --qemu --root --prebuilt 2

打包

Create a BOOT.BIN file for a Zynq family device (including Zynq-7000 and Zynq UltraScale+ MPSoC).

petalinux-package --boot --format BIN --fsbl <%PATH-TO-FSBL%> --u-boot -o  <%PATH-TO-OUTPUT-WITH-FILE-NAME%>

Create a BOOT.BIN file for a Zynq family device that includes a PL bitstream and FIT image.

petalinux-package --boot --format BIN --fsbl <%PATH-TO-FSBL%>  --u-boot --fpga <%PATH-TO-BITSTREAM%> --kernel -o  <%PATH-TO-OUTPUT%>

Create a BOOT.BIN file for a Zynq UltraScale+ MPSoC device that includes a PMU firmware.

petalinux-package --boot --u-boot --kernel --pmufw <%PATH_TO_PMUFW%>

Clean the project and then generate the BSP installation image (.BSP file)

petalinux-package --bsp --clean -o <%PATH-TO-BSP%> -p <%PATH-TO-PROJECT%>

Generate the BSP installation image that includes a reference hardware definition

petalinux-package --bsp --hwsource <%PATH-TO-HW-EXPORT%> -o <%PATH-TO-BSP%> -p <%PATH-TO-PROJECT%>

Generate the BSP installation image from a neutral location

$ petalinux-package --bsp -p <%PATH-TO-PROJECT%> -o <%PATH-TO-BSP%>

Generate uImage

petalinux-package --image -c kernel --format uImage
(The uImage is in <%plnx-proj-root%>/images/linux directory)

Include a specific bitstream in the pre-built area.

petalinux-package --prebuilt --fpga <%BITSTREAM%>

Include a specific data file in the pre-built area.

petalinux-package --prebuilt -a <%APP%>:images/<%APP%>

其他

Launch the GNU GDB debugger

petalinux-util --gdb

Launch a specific Linux kernel image.

petalinux-util --jtag-logbuf -i <%PATH-TO-IMAGE%>

Launch the JTAG logger from a neutral location. This workflow is for Zynq-7000 devices only

petalinux-util --jtag-logbuf -i <%PATH-TO-IMAGE%> -p <%PATH-TO-PROJECT%>

To find the default bitstream of a project:

petalinux-util --find-hdf-bitstream

To find the bitstream of a hdf:

petalinux-util --find-hdf-bitstream --hdf-file <%path to hdf file%>

Toggle the WebTalk feature off.

petalinux-util --webtalk off

PetaLinux常用命令汇总的更多相关文章

  1. 20145222《信息安全系统设计基础》Linux常用命令汇总

    学习Linux时常用命令汇总 通过Ctrl+f键可在该网页搜索到你想要的命令. Linux中命令格式为:command [options] [arguments] //中括号代表是可选的,即有些命令不 ...

  2. Oozie命令行常用命令汇总[转]

    Oozie命令行常用命令汇总 有时候脚本跑多了就不愿意在OozieWeb端去看脚本的运行情况了.还好Oozie提供了很多命令行命令.能通过命令行直接检索自己想看到的脚本信息.在这里简单进行一下总结.一 ...

  3. vim常用命令汇总

    vim常用命令汇总: http://www.cnblogs.com/softwaretesting/archive/2011/07/12/2104435.html 定位 本行第一个字符 ctrl+$ ...

  4. 【Linux】Linux 常用命令汇总

    查看软件xxx安装内容:dpkg -L xxx 查找软件库中的软件:apt-cache search 正则表达式 查找软件库中的软件:aptitude search 软件包 查找文件属于哪个包:dpk ...

  5. Docker笔记:常用命令汇总

    Docker常用命令汇总 启动服务 [root@localhost ~]# service docker start Redirecting to /bin/systemctl start docke ...

  6. [svc][op]vim常用命令汇总

    vim常用命令汇总: 定位 本行第一个字符 ctrl+$ 本行最后一个字符 0gg 文章首行 ctrl+G 文章行尾 u 撤销(Undo) 删除 D 从当前位置删除到行尾 ("d$" ...

  7. Linux&Android相关常用命令汇总记录

    Linux&Android相关常用命令汇总记录 0@Linux&Android系统命令行下如何查看命令的帮助信息: command --help 1@在Linux系统中,设备分为三类, ...

  8. 【Ubuntu】常用命令汇总,整理ing

    Ubuntu 常用命令(在此页面中Ctrl+F即可快速查找) 在Ubuntu系统使用过程中,会不断地接触到命令行操作,下面对一些常用的命令进行汇总,方便查找. 1.文件操作 1.1 文件复制拷贝 cp ...

  9. Linux常用命令汇总及使用方法(二)之文本编辑器VI

    VI可能是在Linux中使用比较频繁的文本编辑器,如果不能熟练使用VI,在一定程度上会影响工作效率,所以在这里记录一下VI的常用命令及操作方式 在[root@test ~]# vi carrie.tx ...

  10. linux系统中日常运维常用命令汇总一

    一.查看日志和机器相关信息常用命令 1.cat cat 命令连接文件并打印到标准输出设备上,cat经常用来显示文件的内容,类似于下的type命令注意:当文件较大时,文本在屏幕上迅速闪过(滚屏),用户往 ...

随机推荐

  1. Winform程序使用app.minifest清单禁止高DPI无法失效问题

    问题:Winform程序使用app.minifest清单禁止高DPI无法失效问题 摘要:因为笔记本基本都会有DPI放大,所以目前程序需要嵌入清单,并将其高DPI支持给禁止掉. 环境搭建:Winform ...

  2. THUWC2024&NOIWC2024游记

    以 NOIWC 考试日为 Day 1 好了. Day -6 到重庆了.去报到,然后直接不去试机走了,这波主打一个自信. Day -5 THUWC Day1,四道传统题. 开 T1,一眼有一个 \(O( ...

  3. 茴香豆 RAG 平台实操-书生浦语大模型实战营第二期第3节作业

    书生浦语大模型实战营第二期第3节作业 本页面包括实战营第二期第三节作业的全部操作步骤.如果需要知道RAG相关知识请访问学习笔记. 作业要求 基础作业 在茴香豆 Web 版中创建自己领域的知识问答助手 ...

  4. git安装和git命令:全局设置用户名邮箱配置

    在网上下载并安装git:https://git-scm.com/downloads在开始菜单里面找到 "Git --> Git Bash",如下 运行Git Bash: 如果 ...

  5. 助力抗疫 Splashtop 远程控制软件限时免费

    近期国内疫情又有抬头趋势,给我们的工作.生活带来诸多不便.面对疫情,居家办公是一个兼顾安全健康和保持生产力的好办法.据了解,很多广州的企业现在已经在关注或开始部署远程办公方案. 为了帮助疫情中高风险地 ...

  6. 密码学—凯撒密码Python程序

    文章目录 凯撒密码来源 加密算法 解密算法 凯撒密码来源 古典密码,且属于单表加密 凯撒密码又称恺撒变换.变换加密,凯撒是当时罗马共和时期恺撒的名字命名的,当年恺撒曾用此方法与其将军们进行联系.(当然 ...

  7. 2020版IDEA配置Tomcat 10出现卡主问题

    问题描述 配置了2020版的IDE和Tomcat,但是产生了,日志打印中途,卡住了的问题,如图: 18-Aug-2021 00:46:09.763 信息 [main] org.apache.catal ...

  8. MyBatis-Plus 实现多租户管理的实践

    本文主要讲解使用Mybatis-Plus结合dynamic-datasource来实现多租户管理 在现代企业应用中,多租户(Multi-Tenant)架构已经成为一个非常重要的设计模式.多租户架构允许 ...

  9. WPF新建viewModel实例化成员的注意事项

    不要用表达式体去初始化一个用做数据源(比如ItemSource)的引用类型成员.比如这种 public List<MainWindowItem> Items => new List& ...

  10. IceRPC之多路复用传输>快乐的RPC

    作者引言 很高兴啊,我们来到了IceRPC之多路复用传输>快乐的RPC,基础引导,打好基础,才能让自已不在迷茫,快乐的畅游世界. icerpc 和多路复用传输 了解 icerpc 协议和多路复用 ...