Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
proc generate_imgsel {} {
    set xsa [glob -nocomplain -directory [pwd] -type f *.xsa]
    puts "Using XSA: $xsa"
    setws vitis_workspace
    platform create -name [file tail [file rootname $xsa]]_platform_0 -hw $xsa
    domain create -name "app_domain" -os standalone -proc psu_cortexa53_0
    configbsp -bsp "app_domain" stdin psu_uart_1
    configbsp -bsp "app_domain" stdout psu_uart_1
    regenbsp -bsp "app_domain"
    platform generate
    app create -name imgsel -domain app_domain -template "Image Selector"
    configapp -app imgsel define-compiler-symbols XIS_UART_ENABLE
    app build -name imgsel
    elf2bin vitis_workspace/imgsel/Debug/imgsel.elf
}
 
proc elf2bin {elf} {
    set fileId [open bootgen.bif "w"]
    puts $fileId "the_ROM_image:"
    puts $fileId "\{"
    puts $fileId "\t\[fsbl_config\] a53_x64"
    puts $fileId "\t\[bootloader, destination_cpu=a53-0\] $elf"
    puts $fileId "\}"
    close $fileId
}

When building Image Selector manually, be sure to include at least the minimal hardware definition found below:

Minimum Processing System (PS) configuration:

https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/imgsel/src/psu_init.c#L1045

Minimum Board Support configuration:

https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/imgsel/src/xis_singleimage.c#L50