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