cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
3,812 Views
Registered: ‎06-06-2018

Wrong Image Format for bootm command ERROR: can't get kernel image (ZCU102, Petalinux 2018.1 & SDK 2018.1)

Jump to solution

Hi all,

    I have a problem when I boot a ZCU102 board using qspi it hang on the u-boot and it showing like this messages


SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
device 0 offset 0x140000, size 0x1600000
SF: 23068672 bytes @ 0x140000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image

 

   And anybody help me to resolve this issue the log is mentioned below

 

 

 

U-Boot 2018.01 (Jul 09 2018 - 14:39:56 +0530) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  4 GiB
EL Level:       EL2
Chip ID:        zu9eg
MMC:   sdhci_send_command: MMC: 0 busy timeout increasing to: 200 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 400 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 800 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 1600 ms.
sdhci_send_command: MMC: 0 busy timeout increasing to: 3200 ms.
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
mmc_init: -70, time 7439
sdhci@ff170000 - probe failed: -70
sdhci_send_command: MMC: 0 busy timeout.
sdhci_send_command: MMC: 0 busy timeout.
mmc_init: -70, time 7413

SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
*** Warning - bad CRC, using default environment

In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
Bootmode: QSPI_MODE
Net:   ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
eth0: ethernet@ff0e0000
U-BOOT for mp-soc-QSPI

ethernet@ff0e0000 Waiting for PHY auto negotiation to complete......................................... TIMEOUT !
Hit any key to stop autoboot:  0
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
device 0 offset 0x140000, size 0x1600000
SF: 23068672 bytes @ 0x140000 Read: OK
Wrong Image Format for bootm command
++++++++++ERROR: can't get kernel image+++++++++++++++++++++++!
ZynqMP>
ZynqMP>
ZynqMP>
ZynqMP> pri
arch=arm
autoload=no
baudrate=115200
board=zynqmp
board_name=zynqmp
boot_img=BOOT.BIN
boot_targets=qspi0
bootcmd=run default_bootcmd
bootdelay=4
bootenv=uEnv.txt
bootenvsize=0x40000
bootenvstart=0x100000
bootsize=0x100000
bootstart=0x0
clobstart=0x10000000
console=console=ttyPS0,115200
cp_kernel2ram=sf probe 0 && sf read ${netstart} ${kernelstart} ${kernelsize}
cpu=armv8
default_bootcmd=run cp_kernel2ram && bootm ${netstart}
dfu_mmc_info=set dfu_alt_info ${kernel_image} fat 0 1\\;dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0
dfu_ram=run dfu_ram_info && dfu 0 ram 0
dfu_ram_info=setenv dfu_alt_info image.ub ram $netstart 0x1e00000
dtb_img=system.dtb
dtbnetstart=0x11800000
eraseenv=sf probe 0 && sf erase ${bootenvstart} ${bootenvsize}
ethact=ethernet@ff0e0000
ethaddr=00:0a:35:00:22:01
fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED
fdtcontroladdr=7fe7cfd0
importbootenv=echo "Importing environment from SD ..."; env import -t ${loadbootenv_addr} $filesize
install_boot=sf probe 0 && sf erase ${bootstart} ${bootsize} && sf write ${clobstart} ${bootstart} ${filesize}
install_jffs2=sf probe 0 && sf erase ${jffs2start} ${jffs2size} && sf write ${clobstart} ${jffs2start} ${filesize}
install_kernel=sf probe 0 && sf erase ${kernelstart} ${kernelsize} && sf write ${clobstart} ${kernelstart} ${filesize}
jffs2_img=rootfs.jffs2
kernel_img=image.ub
kernelsize=0x1600000
kernelstart=0x140000
load_boot=tftpboot ${clobstart} ${boot_img}
load_dtb=tftpboot ${clobstart} ${dtb_img}
load_jffs2=tftpboot ${clobstart} ${jffs2_img}
load_kernel=tftpboot ${clobstart} ${kernel_img}
loadaddr=0x10000000
loadbootenv=load mmc $sdbootdev:$partid ${loadbootenv_addr} ${bootenv}
loadbootenv_addr=0x00100000
modeboot=qspiboot
nc=setenv stdout nc;setenv stdin nc;
netboot=tftpboot ${netstart} ${kernel_img} && bootm
netstart=0x10000000
psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0
sd_uEnvtxt_existence_test=test -e mmc $sdbootdev:$partid /uEnv.txt
sd_update_boot=echo Updating boot from SD; mmcinfo && fatload mmc ${sdbootdev}:1 ${clobstart} ${boot_img} && run install_boot
sd_update_dtb=echo Updating dtb from SD; mmcinfo && fatload mmc ${sdbootdev}:1 ${clobstart} ${dtb_img} && run install_dtb
sd_update_jffs2=echo Updating jffs2 from SD; mmcinfo && fatload mmc ${sdbootdev}:1 ${clobstart} ${jffs2_img} && run install_jffs2
sd_update_kernel=echo Updating kernel from SD; mmcinfo && fatload mmc ${sdbootdev}:1 ${clobstart} ${kernel_img} && run install_kernel
sdbootdev=0
serial=setenv stdout serial;setenv stdin serial
serverip=192.168.1.36
setup=setenv partid auto
soc=zynqmp
stderr=serial@ff000000
stdin=serial@ff000000
stdout=serial@ff000000
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
thor_mmc=run dfu_mmc_info && thordown 0 mmc 0
thor_ram=run dfu_ram_info && thordown 0 ram 0
uenvboot=if run sd_uEnvtxt_existence_test; then run loadbootenv; echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
update_boot=setenv img boot; setenv psize ${bootsize}; setenv installcmd "install_boot"; run load_boot test_img; setenv img; setenv psize; setenv installcmd
update_dtb=setenv img dtb; setenv psize ${dtbsize}; setenv installcmd "install_dtb"; run load_dtb test_img; setenv img; setenv psize; setenv installcmd
update_jffs2=setenv img jffs2; setenv psize ${jffs2size}; setenv installcmd "install_jffs2"; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd
update_kernel=setenv img kernel; setenv psize ${kernelsize}; setenv installcmd "install_kernel"; run load_kernel test_crc; setenv img; setenv psize; setenv installcmd
vendor=xilinx

Environment size: 3986/262140 bytes

 

 

 

Regards

Winston Jacob

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
3,903 Views
Registered: ‎12-04-2016

Hi @winston

 

What is the image type. Did you convert the image format to uImage?

petalinux-package --image -c kernel --format uImage

 

 

Best Regards

Shabbir

View solution in original post

0 Kudos
6 Replies
Highlighted
Moderator
Moderator
3,904 Views
Registered: ‎12-04-2016

Hi @winston

 

What is the image type. Did you convert the image format to uImage?

petalinux-package --image -c kernel --format uImage

 

 

Best Regards

Shabbir

View solution in original post

0 Kudos
Highlighted
Observer
Observer
3,778 Views
Registered: ‎06-06-2018
Thanks for immediate reply Shabbir. I am using image.ub(Created by petalinux 2018.1). And I bind all the images to create Boot.bin,
and I am not used that command previously. I am going to try this command . After finishing I update you.

Regards
Winston
0 Kudos
Highlighted
Newbie
Newbie
3,476 Views
Registered: ‎08-17-2018

hi,bro!

             I have meet the same problem like you . Have you solved this problem?I create the uImage file but i don't know how to download it into qspi flash.Can you help me?

 

             Thank you so much!!

0 Kudos
Highlighted
Newbie
Newbie
3,473 Views
Registered: ‎08-17-2018


hi,bro!

I have meet the same problem . I create the uImage file but i don't know how to download it into qspi flash.Can you help me?



Thank you so much!!
0 Kudos
Highlighted
Observer
Observer
2,782 Views
Registered: ‎11-02-2018

Hi,

 

Could you please update your result?

I am also facing the same issue.

 

Thanks

0 Kudos
Highlighted
Explorer
Explorer
951 Views
Registered: ‎09-26-2014

Hello.

I heve same problem.

In petalinux-config i set partition sizes

I modife system-conf.dtsi

&qspi {
#address-cells = <1>;
#size-cells = <0>;
flash0: flash@0 {
compatible = "n25q512a","micron,m25p80","jedec,spi-nor";
spi-tx-bus-width=<1>;
spi-rx-bus-width=<4>;
reg = <0x0>;
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <108000000>;
partition@0x00000000 {
label = "boot";
reg = <0x00000000 0x01000000>;
};
partition@0x01000000 {
label = "bootenv";
reg = <0x01000000 0x00040000>;
};
partition@0x01040000 {
label = "kernel";
reg = <0x01040000 0x02000000>;
};
partition@0x03040000 {
label = "jffs2";
reg = <0x03040000 0x02000000>;
};
};
};

 

copy bootargs to platform-top.h

#define CONFIG_EXTRA_ENV_SETTINGS \
SERIAL_MULTI \
CONSOLE_ARG \
DFU_ALT_INFO_RAM \
PSSERIAL0 \
"nc=setenv stdout nc;setenv stdin nc;\0" \
"ethaddr=00:0a:35:00:22:01\0" \
"autoload=no\0" \
"sdbootdev=0\0" \
"clobstart=0x10000000\0" \
"netstart=0x10000000\0" \
"dtbnetstart=0x23fff000\0" \
"loadaddr=0x10000000\0" \
"bootsize=0x1000000\0" \
"bootstart=0x0\0" \
"boot_img=BOOT.BIN\0" \
"load_boot=tftpboot ${clobstart} ${boot_img}\0" \
"update_boot=setenv img boot; setenv psize ${bootsize}; setenv installcmd \"install_boot\"; run load_boot test_img; setenv img; setenv psize; setenv installcmd\0" \
"install_boot=sf probe 0 && sf erase ${bootstart} ${bootsize} && " \
"sf write ${clobstart} ${bootstart} ${filesize}\0" \
"bootenvsize=0x40000\0" \
"bootenvstart=0x1000000\0" \
"eraseenv=sf probe 0 && sf erase ${bootenvstart} ${bootenvsize}\0" \
"jffs2size=0x2000000\0" \
"jffs2start=0x3040000\0" \
"jffs2_img=rootfs.jffs2\0" \
"load_jffs2=tftpboot ${clobstart} ${jffs2_img}\0" \
"update_jffs2=setenv img jffs2; setenv psize ${jffs2size}; setenv installcmd \"install_jffs2\"; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd\0" \
"install_jffs2=sf probe 0 && sf erase ${jffs2start} ${jffs2size} && " \
"sf write ${clobstart} ${jffs2start} ${filesize}\0" \
"kernelsize=0x2000000\0" \
"kernelstart=0x1040000\0" \
"kernel_img=image.ub\0" \
"load_kernel=tftpboot ${clobstart} ${kernel_img}\0" \
"update_kernel=setenv img kernel; setenv psize ${kernelsize}; setenv installcmd \"install_kernel\"; run load_kernel test_crc; setenv img; setenv psize; setenv installcmd\0" \
"install_kernel=sf probe 0 && sf erase ${kernelstart} ${kernelsize} && " \
"sf write ${clobstart} ${kernelstart} ${filesize}\0" \
"cp_kernel2ram=sf probe 0 && sf read ${netstart} ${kernelstart} ${kernelsize}\0" \
"dtb_img=system.dtb\0" \
"load_dtb=tftpboot ${clobstart} ${dtb_img}\0" \
"update_dtb=setenv img dtb; setenv psize ${dtbsize}; setenv installcmd \"install_dtb\"; run load_dtb test_img; setenv img; setenv psize; setenv installcmd\0" \
"fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED\0" \
"test_crc=if imi ${clobstart}; then run test_img; else echo ${img} Bad CRC - ${img} is NOT UPDATED; fi\0" \
"test_img=setenv var \"if test ${filesize} -gt ${psize}\\; then run fault\\; else run ${installcmd}\\; fi\"; run var; setenv var\0" \
"netboot=tftpboot ${netstart} ${kernel_img} && bootm\0" \
"default_bootcmd=run cp_kernel2ram && bootm ${netstart}\0" \
""

after start autoboot i get error

SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
device 0 offset 0x140000, size 0x1600000
SF: 23068672 bytes @ 0x140000 Read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

i see that offset 0x140000 is not true. Real offset is 0x010400000.

Then i use bootm

ZynqMP> sf read 0x10000000 0x1040000 0x2000000
device 0 offset 0x1040000, size 0x2000000


SF: 33554432 bytes @ 0x1040000 Read: OK
ZynqMP> bootm 0x10000000
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Trying 'kernel@1' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x100000f8
Data Size: 18215424 Bytes = 17.4 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x00080000
Entry Point: 0x00080000
Hash algo: sha1
Hash value: 93adf352ee7eb42ed279d5d8fb0fea379369e41d
Verifying Hash Integrity ... sha1 error!
Bad hash value for 'hash@1' hash node in 'kernel@1' image node
Bad Data Hash
ERROR: can't get kernel image!

 

 

 

 

 

 

0 Kudos