petalinux-config:系统级别的 menuconfig。后续不断完善petalinux系统的命令

一,uboot

1,以fsbl/fs-boot为例生成源码

    petalinux-config -c bootloader

2,

# 以内核为例
petalinux-config -c kernel --defconfig xilinx_zynq_base_trd_defconfig

# 以 uboot 为例
petalinux-config -c u-boot --defconfig xilinx_zynqmp_zcu102_defconfig

二,内核

1,Parse the configuration onto Kconfig 没有opening the GUI配置组件(--oldconfig), for the root filesystem(-c rootfs):

     petalinux-config -c rootfs --oldconfig

     这样的配置文件需要存在于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
2,强制构建内核:

      petalinux-build -c kernel -f

3,强制编译内核

      petalinux-build -c u-boot -x cleansstate

三,设备树

四,根文件

五,petalinux-build

1,清理/删除build目录,保留images目录

petalinux-build -x distclean

## 慎用
petalinux-build -x mrproper

2,build整个工程

petalinux-build -c all

3,创建一个更新的FIT image,package-产生image.ub

petalinux-build -x package

4,清除所有U-Boot组件相关的

petalinux-build -c u-boot -x clean

六,打包:

petalinux-package --boot --fsbl ./images/linux/zynq_fsbl.elf --fpga --u-boot --force 

七,烧录:

1,下载并生成比特流(以及适用于Zynq-7000或Zynq UltraScale的FSBL+MPSoC)通过JTAG下载:

     petalinux-boot --jtag --prebuilt 1

2,通过JTAG下载并SDK生成建的U-boot elf到板子:petalinux-boot --jtag --prebuilt 2

ZYNQ petalinux编译启动文件命令详解

3,通过JTAG下载并引导预构建的内核图像到板子:petalinux-boot --jtag --prebuilt 3

对于Zynq-7000,下载:
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
对于Zynq UltraScale+ MPSoC下载:
 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)

4,通过JTAG下载U-boot映像到板子:petalinux-boot --jtag --u-boot

对于Zynq-7000,下载:
fsbl images/linux/zynq_fsbl.elf
U-Boot images/linux/u-boot.elf.
对于Zynq UltraScale+ MPSoC下载:
fsbl images/linux/zynqmp_fsbl.elf
U-Boot images/linux/u-boot.elf
ATF images/linux/bl31.elf
pmufw images/linux/pmufw.elf

5,通过JTAG下载内核到板子: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



 

相关文章:

  • 2021-07-12
  • 2021-06-15
  • 2021-11-29
  • 2022-12-23
  • 2023-03-23
  • 2021-08-17
  • 2022-02-27
猜你喜欢
  • 2021-04-28
  • 2021-11-17
  • 2021-08-18
  • 2021-06-01
  • 2021-08-23
  • 2022-01-19
  • 2022-12-23
相关资源
相似解决方案