ILD

petalinux build zynq firmware
作者:Yuan Jianpeng 邮箱:yuanjp89@163.com
发布时间:2023-11-7 站点:Inside Linux Development

petalinux本身是yocto,xilinx的部分位于:components/yocto/layers/meta-xilinx


$ ls -1 components/yocto/layers/meta-xilinx

meta-microblaze

meta-xilinx-bsp

meta-xilinx-contrib

meta-xilinx-core

meta-xilinx-standalone

meta-xilinx-vendor


meta-xilinx的github仓库为:https://github.com/Xilinx/meta-xilinx


其中 fsbl 和 pmufw位于:meta-xilinx-standalone/recipes-bsp/embeddedsw/

$ ls -1 meta-xilinx-standalone/recipes-bsp/embeddedsw/

embeddedsw

fsbl.bbappend

fsbl-firmware_2023.1.bb

fsbl-firmware_2023.2.bb

fsbl-firmware_git.bb

fsbl-firmware.inc

fsbl-fw-cfg.inc

plm-firmware_2023.1.bb

plm-firmware_2023.2.bb

plm-firmware_git.bb

plm-firmware.inc

plmfw.bbappend

pmu-firmware_2023.1.bb

pmu-firmware_2023.2.bb

pmu-firmware_git.bb

pmu-firmware.inc

pmufw.bbappend

psm-firmware_2023.1.bb

psm-firmware_2023.2.bb

psm-firmware_git.bb

psm-firmware.inc

psmfw.bbappend

versal-fw-cfg.inc

zynqmp-pmufw-cfg.inc


上面是yocto层的描述代码。具体的源码是:embddedsw仓库,地址:https://github.com/Xilinx/embeddedsw.git


查找编译产物:

$ find . -name fsbl*.elf

./build/tmp/deploy/images/zynqmp-generic-xczu2cg/fsbl-zynqmp-generic-xczu2cg--2023.2+gitAUTOINC+c9a0ee31b2-r0-zynqmp-generic-xczu2cg-20231106154503.elf

./build/tmp/deploy/images/zynqmp-generic-xczu2cg/fsbl-zynqmp-generic-xczu2cg.elf

./build/tmp/work/zynqmp_generic_xczu2cg-xilinx-linux/linux-xlnx/6.1.30-xilinx-v2023.2+git999-r0/recipe-sysroot/boot/fsbl.elf

./build/tmp/sysroots-components/zynqmp_generic_xczu2cg/fsbl/boot/fsbl.elf


可以看到一个类似git commid id c9a0ee31b2,在embeddedsw的git克隆目录,可以看到这个commit

$ git log c9a0ee31b2

commit c9a0ee31b2a14cbcfcb56ca369037319b4ad4847 (tag: xilinx_v2023.2)

Author: Nicole Baze <nicole.baze@xilinx.com>

Date:   Wed Oct 11 16:28:10 2023 -1200


    xilpm: versal: server: Remove XRAM axi-lite clock selection

    

    Currently tools doesn't support enabling XRAM AXILITE interface so remove

    XRAM_APB_CLK configuration which selects AXILITE PL source.

    

    Signed-off-by: Nicole Baze <nicole.baze@xilinx.com>

    Acked-by: Arun Kannan <arunbala@amd.com>


因此基本可以确定,编译是这么来的。但是具体怎么对应上配置xczu2cg的,就不是很清楚,需要研究下yocto。



类似的bl31.elf,也就是arm-trusted-firmware位于:

components/yocto/layers/meta-xilinx/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/


对应的源码github仓库:git://github.com/Xilinx/arm-trusted-firmware.git


Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.