增加CDO配置到PDI-watchdog举例

1.创建CDO配置文件

$ cat watchdong.cdo

version 2.0

em_set_action 0x2810c000 0x2 0x2

2.使用bif文件增加CDO命令到PDI(vpl_gen_fixed.pdi在project-spec/hw-description/,可以查看petalinux-pakcage时的log)

$ cat cdo.bif

cdo_bif:

{

            image

            {

                        { type = bootimage, file = vpl_gen_fixed.pdi }

                        { type = cdo, file = watchdong.cdo}

            }

}

3.生成新的PDI

$bootgen -arch versal -image cdo.bif -w -o final.pdi

4.修改原来的bootgen.bif,在使用过petalinux-package --boot --u-boot --force后会在images/linux/下生成

$ cat images/linux/bootgen.bif

the_ROM_image:

{

image {

{ type=bootimage, file=/home/albert/work/versal/VCK190/xilinx-vck190-2023.2/final.pdi }

{ type=bootloader, file=/home/albert/work/versal/VCK190/xilinx-vck190-2023.2/images/linux/plm.elf }

{ core=psm, file=/home/albert/work/versal/VCK190/xilinx-vck190-2023.2/images/linux/psmfw.elf }

}

image {

id = 0x1c000000, name=apu_subsystem

{ type=raw, load=0x00001000, file=/home/albert/work/versal/VCK190/xilinx-vck190-2023.2/images/linux/system-default.dtb }

{ core=a72-0, exception_level=el-3, trustzone, file=/home/albert/work/versal/VCK190/xilinx-vck190-2023.2/images/linux/bl31.elf }

{ core=a72-0, exception_level=el-2, file=/home/albert/work/versal/VCK190/xilinx-vck190-2023.2/images/linux/u-boot.elf }

}

}

5.petalinux-package打包BOOT.BIN

$petalinux-package --boot --bif images/linux/bootgen.bif --force

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容