cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,565 Views
Registered: ‎06-13-2018

Wrong image format for bootm command ERROR: can't get kernel image (qemu, petalinux2017.3, vc709)

I'm using microblaze, petalinux 2017.3, vc709 board

When i'm running prebuilt command i am getting following error

petalinux-boot --qemu --prebuilt 2
U-Boot 2017.01 (Jun 25 2018 - 11:11:00 +0530)

DRAM:  2 GiB
Flash: 128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
U-BOOT for prj_peta5

Hit any key to stop autoboot:  0
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot>

U-boot Environment variables are

autoload=no
baudrate=115200
boot_img=u-boot-s.bin
bootcmd=run default_bootcmd
bootdelay=4
bootenvsize=0x4f0000
bootenvstart=0x62070000
bootsize=0x4f0000
bootstart=0x61b80000
clobstart=0x81000000
console=console=ttyUL0,115200
cp_kernel2ram=cp.b ${kernelstart} ${netstart} ${kernelsize}
default_bootcmd=run cp_kernel2ram && bootm ${netstart}
dtbnetstart=0x82800000
eraseenv=protect off ${bootenvstart} +${bootenvsize} && erase ${bootenvstart} +${bootenvsize}
fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED
fdtcontroladdr=fffe9270
fpga_img=system.bit.bin
fpgasize=0x1b80000
fpgastart=0x60000000
install_boot=protect off ${bootstart} +${bootsize} && erase ${bootstart} +${bootsize} && cp.b ${clobstart} ${bootstart} ${filesize}
install_fpga=protect off ${fpgastart} +${fpgasize} && erase ${fpgastart} +${fpgasize} && cp.b ${clobstart} ${fpgastart} ${filesize}
install_kernel=protect off ${kernelstart} +${kernelsize} && erase ${kernelstart} +${kernelsize} && cp.b ${clobstart} ${kernelstart} ${filesize}
kernel_img=image.ub
kernelsize=0x9f0000
kernelstart=0x62560000
loadaddr=0x81000000
netstart=0x81000000
serial=setenv stdout serial;setenv stdin serial
stdin=ttyUL0
stdout=ttyUL0
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
ttyUL0=setenv stdout ttyUL0;setenv stdin ttyUL0

Environment size: 1565/5177340 bytes

When i do 'md' to different addresses ('0x81000000', '0x80000000', '0x60000000', '0x62560000'), it shows all zeros.

What is wrong here? Can somebody help?

 

- Chinmay

 

 

 

0 Kudos
2 Replies
Highlighted
Moderator
Moderator
1,524 Views
Registered: ‎04-24-2017

Re: Wrong image format for bootm command ERROR: can't get kernel image (qemu, petalinux2017.3, vc709)

Hi @chinmayb,

 

Yes prebuilt 2 loads only u-boot you need to use prebuilt 3 which loads the kernel image.

 

Refer https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_3/ug1157-petalinux-tools-command-line-guide.pdf page 16

 

By default u-boot default_bootcmd tries to load kernel image so you see this bootm error message when kernel image is not loaded to DDR.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Highlighted
Visitor
Visitor
1,505 Views
Registered: ‎06-13-2018

Re: Wrong image format for bootm command ERROR: can't get kernel image (qemu, petalinux2017.3, vc709)

Hi Sandeep,

Thanks for the reply!

Yes i agree with you. In fact i tried "prebuilt 3" before trying "prebuilt 2", but it didn't go well.

Command -

petalinux-boot --qemu --prebuilt 3

Message excerpt -

Boot image with QEMU:

Usage:
  petalinux-qemu-boot -i|--image <IMAGE> --dtb <DTB> --sysconf <SYSTEM_CONFIG> [options]

Required:
  -i, --image <IMAGE>          image to boot
  --dtb <DTB>                  device tree file.
  --sysconf <SYSTEM_CONFIG>    system config file

Options:
  --data <DATA_FILE>           data file
  --boot-addr <BOOT_ADDR>      boot address
  --load-addr <LOAD_ADDR>      load address
  --dhcpd enable|disable       enable or disable dhcpd. This option applies
                               for ROOT MODE ONLY.
                               default is to enable dhcpd.
  --iptables-allowed           whether to allow to implement iptables commands.
                               This option applies for ROOT MODE ONLY
                               Default is not allowed.
  --net-intf NET_INTERFACE     network interface on the host to bridge with
                               the QEMU subnet. This option applies for ROOT
                               MODE ONLY. Default is eth0.
  --subnet SUBNET              subnet_gateway_ip/num_bits_of_subnet_mask
                               subnet gateway IP and the number of valid bits
                               of network mask. This option applies for ROOT
                               MODE ONLY. Default is 192.168.10.1/24
  --smp NUM_OF_CPUs            number of CPUs in SMP mode.
                               If this option is not specified, it runs SMP with
                               default number of CPUs, 2 for arm, 4 for aarch64.
                               0 or 1 to run in non-SMP mode.
  --root                       QEMU as root (ROOT MODE).
  --tftp                       Path to the tftp directory
  --qemu-args "QEMU_ARGUMENTS" extra arguments to QEMU command
  -h, --help                   show usage

ERROR: Bootable Image is missing.

I understand, it is definitely some address or path mismatch, but i cann't find it.

I can boot kernel in qemu using --kernel option, which indicates that the image is fine.

 

I think u-boot should transfer kernel image from secondary memory(flash, address 0x62560000 in my case) to main memory(ddr, address 0x80100000), so it is not necessary to load kernel image manually to main memory. And here flash address has no data, so it gives error. Please correct me if i'm wrong and help me with some pointers.

 

- Chinmay

0 Kudos