cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
smbrown
Observer
Observer
506 Views
Registered: ‎07-08-2019

PetaLinux 2020.1 KCU015 BSP MCS boot failure

Hi,

I'm interested in using the PetaLinux 2020.1 KCU105 BSP as a baseline design. Booting the pre-builts via JTAG works just fine:

 

$ petalinux-boot --jtag --prebuilt 3

 

I wanted to boot the pre-builts from the QSPI flash memory, so, following the process outlined in UG908, I moved over to Vivado Hardware Manager, added the configuration memory device (mt25qu256-spi-x1_x2_x4) and programed the memory with the MCS file found in xilinx-kcu105-axi-full-2020.1/pre-built/linux/images/system.mcs. With the configuration mode pins set to boot from Master SPI (SW15-6 (FPGA_M2) is in the OFF position, see XTP391), I power cycled the board, but nothing happened -- the FGPA 'DONE' LED does not turn on.

I then selected 'Boot from Configuration Memory Device' in Vivado Hardware Manager and the boot process started, but then halted with the following error:

 

Wrong Image Format for bootm command                                            
ERROR: can't get kernel image!                                                  
U-Boot>

 

I then packaged my own MCS file using the pre-builts. From within the xilinx-kcu105-axi-full-2020.1/pre-built/linux/images/ directory:

 

$ petalinux-package --boot --force --format MCS --fpga ../implementation/system.bit --mmi ../implementation/system.mmi  --fsbl fs-boot.elf --u-boot u-boot-s.bin  --kernel image.ub --flash-size 32 --flash-intf SPIx1 --output kcu105_bsp_prebuilts.mcs

 

I reprogrammed the flash with the newly built kcu105_bsp_prebuilts.mcs and power cycled the board. Again, nothing happens - 'DONE' LED remains off.

I noticed that after power cycling the board, the configuration memory device no longer shows up under the target device. However, if I re-add the memory device, I can select to boot from it without needing to reprogram it (I did this after programing the flash with kcu105_bsp_prebuilts.mcs file). I'm sure it was flashed correctly, because when I boot in this manner, I get to the same U-boot error mentioned above using the system.mcs file.

As a sanity check, I used a previously built MCS file based on the PetaLinux 2018.3 KCU105 BSP, reprogrammed the flash, and everything booted as expected.

I think there have been some significant updates from PetaLinux 2018.3 to 2020.1. Can anyone confirm that the PetaLinux 2020.1 KCU105 BSP prebuilt MCS is bootable from flash memory? If not, what changes need to occur? 

Thanks!

Tags (3)
0 Kudos
3 Replies
greande
Explorer
Explorer
348 Views
Registered: ‎02-19-2018

I am having the same issue. I program the flash memory from Vivado hardware manager but when I reboot the device nothing happens. If I manually select the "Boot from configuration device" option, the device boots as expected.

0 Kudos
sandeepg
Moderator
Moderator
305 Views
Registered: ‎04-24-2017

Hi @smbrown ,

Can you post "printenv" command output from u-boot prompt.

Also can you try booting manually using below command.

# Syntax is sf probe 0 && sf read <image_load_address_in_ddr> <flash_partition_address> <fitimage_size> && bootm <image_load_address_in_ddr>

U-Boot> sf probe 0; sf read 0x82000000 0xAA0000 0xC00000; bootm 0x82000000

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
smbrown
Observer
Observer
293 Views
Registered: ‎07-08-2019

I programed the flash device with the xilinx-kcu105-axi-full-2020.1/pre-built/linux/images/system.mcs file. I have to use 'Boot from Configuration Memory Device' in Vivado Hardware Manager to get to U-Boot; the board does not load the bitstream and start the boot process on power up. To verify, the boot mode on the board (SW15) is set to Master SPI. From XAPP1280 :

image004.jpg

From within U-Boot:

U-Boot>printenv 
arch=microblaze
autoload=no
baudrate=115200
board=microblaze-generic
board_name=microblaze-generic
boot_img=u-boot-s.bin
bootcmd=bootm 0x80000000 0x82e00000 0x81e00000
bootdelay=4
bootenvsize=0x40000
bootenvstart=0x1080000
bootsize=0x80000
bootstart=0x1000000
clobstart=0x80000000
console=console=ttyS0,115200
cp_kernel2ram=sf probe 0 && sf read ${netstart} ${kernelstart} ${kernelsize}
default_bootcmd=bootcmd
dtbnetstart=0x81e00000
eraseenv=sf probe 0 && sf erase ${bootenvstart} ${bootenvsize}
eserial0=setenv stdout eserial0;setenv stdin eserial0
ethact=ethernet@40c00000
ethaddr=00:0a:35:00:22:01
fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED
fdt_high=b0000000
fdtcontroladdr=fffe2d40
fpga_img=system.bit.bin
fpgasize=0x1000000
fpgastart=0x0
initrd_high=b0000000
install_boot=sf probe 0 && sf erase ${bootstart} ${bootsize} && sf write ${clobstart} ${bootstart} ${filesize}
install_fpga=sf probe 0 && sf erase ${fpgastart} ${fpgasize} && sf write ${clobstart} ${fpgastart} ${filesize}
install_kernel=sf probe 0 && sf erase ${kernelstart} ${kernelsize} && sf write ${clobstart} ${kernelstart} ${filesize}
kernel_img=image.ub
kernelsize=0xc00000
kernelstart=0x10c0000
load_boot=tftpboot ${clobstart} ${boot_img}
load_fpga=tftpboot ${clobstart} ${fpga_img}
load_kernel=tftpboot ${clobstart} ${kernel_img}
loadaddr=0x80000000
nc=setenv stdout nc;setenv stdin nc;
netboot=tftpboot ${netstart} ${kernel_img} && bootm
netstart=0x80000000
sdbootdev=0
serial=setenv stdout serial;setenv stdin serial
serverip=172.25.128.4
test_crc=if imi ${clobstart}; then run test_img; else echo ${img} Bad CRC - ${img} is NOT UPDATED; fi
test_img=setenv var "if test ${filesize} -gt ${psize}; then run fault; else run ${installcmd}; fi"; run var; setenv var
update_boot=setenv img boot; setenv psize ${bootsize}; setenv installcmd "install_boot"; run load_boot test_img; setenv img; setenv psize; setenv instd
update_fpga=setenv img fpga; setenv psize ${fpgasize}; setenv installcmd "install_fpga"; run load_fpga test_img; setenv img; setenv psize; setenv instd
update_kernel=setenv img kernel; setenv psize ${kernelsize}; setenv installcmd "install_kernel"; run load_kernel test_crc; setenv img; setenv psize; sd
vendor=xilinx

Environment size: 2285/262140 bytes
U-Boot>sf probe 0; sf read 0x82000000 0xAA0000 0xC00000; bootm 0x82000000
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
device 0 offset 0xaa0000, size 0xc00000
SF: 12582912 bytes @ 0xaa0000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

 

0 Kudos