This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: TFTP boot hangs

Part Number: AM5728


Tool/software: Linux

Hi,

I am trying to boot am57x eval board from tftp. I set this feature using setup.sh script(tftp boot, sd card nfs).

When u-boot starts, it loads the image from /tftpboot directory (  zImage-am57xx-evm.bin). But after loading, it hangs,

giving the following error:

zImage-am57xx-evm.bin

Load address: 0x82000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####################################################
         4.1 MiB/s
done
Bytes transferred = 3597872 (36e630 hex)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** File not found /boot/zImage-am57xx-evm.bin **
failed to set signal voltage
switch to partitions #0, OK
mmc1(part 0) is current device
failed to set signal voltage
SD/MMC found on device 1
reading /boot/zImage-am57xx-evm.bin
** Unable to read file /boot/zImage-am57xx-evm.bin **

Can you please kindly suggest a solution?

Thanks

  • Hi Napyonsen,

    The error message "Wrong Image Format for bootm command" is probably due to absence of a 64 bytes header containing information about target architecture, operating system, image type, compression method, entry points, time stamp, checksums, etc. described at:
    linux.die.net/.../mkimage
    Also you can skip this check (and the error message will not appears) if you build the u-boot with CONFIG_DISABLE_IMAGE_LEGACY option set which skips this check. (See u-boot REAME file):
    github.com/.../README

    BR
    Tsvetolin Shulev
  • Hi Shulev,
    CONFIG_DISABLE_IMAGE_LEGACY seems already disabled in config_fallbacks.h
  • Napyonsen,

    The CONFIG_DISABLE_IMAGE_LEGACY option should be enable. This option undefines CONFIG_IMAGE_FORMAT_LEGACY option which causing some additional checks and error message "Wrong Image Format for bootm command". See following files:
    /include/config_fallbacks.h Search for CONFIG_DISABLE_IMAGE_LEGACY
    /common/bootm.c Search for "Wrong Image Format"

    BR
    Tsvetolin Shulev
  • Sorry, I mis-written, it is not defined anywhere.. Belove are the only lines its name exists:

    #ifdef CONFIG_DISABLE_IMAGE_LEGACY
    #undef CONFIG_IMAGE_FORMAT_LEGACY
    #endif

    should I define and set it to zero ? ( which I dont think so because there is nowhere it is used)

  • By the way I am able to boot my .
    newly created kernel( under arch/arm/boot directory), thus I am not stuck with above problem. However,
    I have one more related question:

    I want to debug the kernel using CCS over jtag. Thus I want to load the kernel with
    debugging options. When I rebuild the kernel, there appears vmlinux image in the top kernel directory which has debug symbols I think, because its size is larger.(13,7 mb)

    The problem is I dont know how to load this image via uboot. When I load it like it is ordinary binary file, it loads of course, but I run it,
    it gives Bad Linux Arm zImage magic error. So which image to load and how to load it in order to be able to debug the kernel?

    Thanks very much
    napyonsen
  • Napyonsen,

    Yes, you can define CONFIG_DISABLE_IMAGE_LEGACY with random value but it is good practice to set Y or ENABLED.

    BR
    Tsvetolin Shulev