Post Go back to editing

Wrong Image Format for bootm command

Category: Software
Software Version: CCES-2.10.0,Ubuntu-20.04

I followed the steps for uboot in the ADSP-SC573 using the following start guide


https://wiki.analog.com/resources/tools-software/linuxdsp/docs/quickstartguide/quickstart_sc573


When utilizing the image file (fitImage) that is utilized in the start guide, it functions effectively.

consequently, I used zImage, which is found in the source folder itself, in place of that image.


This error was triggered,


Wrong Image format for bootm command

Error: can't get kernel image


I am very curious how to proceed on that....

Parents
  • Hi Sushindren,

    bootm command is for Uimage

    As you were using zimage, you need to use bootz command.

    replace the bootm command from your bootargs to bootz and give it a try.

    Thanks,

    Prasanth R

  • Hi Prasanth,

    I can't get you properly, Are you told to boot with sdcard boot option.

    When i am using printenv in the uboot, it shown some arguments,

    addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmaf
    autoload=no                                                                     
    baudrate=115200                                                                 
    bootcmd=run ramboot                                                             
    bootdelay=2                                                                     
    dtbaddr=0x84000000                                                              
    dtbfile=sc573-ezkit.dtb                                                         
    ethact=dwmac.3100c000                                                           
    ethaddr=02:80:ad:20:31:e8                                                       
    fdtcontroladdr=8ffcca20                                                         
    gatewayip=192.168.0.1                                                           
    hostname=sc57x                                                                  
    imagefile=zImage                                                             
    initramaddr=0x85000000                                                          
    initramfile=ramdisk.cpio.xz.u-boot                                              
    ipaddr=192.168.0.15                                                             
    loadaddr=0x82000000                                                             
    loads_echo=1                                                                    
    nc=setenv ncip ${serverip};setenv stdin nc;setenv stdout nc;setenv stderr nc    
    netmask=255.255.255.0                                                           
    nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nf
    nfsboot=tftp ${loadaddr} ${nfsfile};run nfsargs;run addip;bootm ${loadaddr};    
    nfsfile=zImage                                                               
    norboot=tftp ${loadaddr} ${ramfile};run ramargs;run addip;bootm ${loadaddr};    
    ramargs=setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 earlyprintk=ser
    ramboot=tftp ${loadaddr} ${ramfile};tftp ${initramaddr} ${initramfile};run rama;
    ramboot_emmc=mmc rescan;mmc dev 0 0;ext2load mmc 0:1 ${loadaddr} /boot/${ramfil;
    ramfile=zImage                                                               
    rootpath=/romfs                                                                 
    sdcardargs=setenv bootargs root=/dev/mmcblk0p1 rw earlyprintk=serial,uart0,1152
    sdcardboot=mmc rescan;mmc dev 0 0;ext2load mmc 0:1 ${loadaddr} /boot/${ramfile};
    serverip=192.168.0.2                                                            
    stderr=serial@0x31003000                                                        
    stdin=serial@0x31003000                                                         
    stdout=serial@0x31003000                                                        
    ubootfile=u-boot-sc573-ezkit.ldr                                                
    update=tftp ${loadaddr} ${ubootfile};sf probe 2:1;sf erase 0 0x80000;sf write $}

    Here as you can see i loaded the zImage in the imagefile when run sdcardboot i shown same error, i dont know where i am missing,

    If i can't get your point kindly tell elaborately,

    Thankyou,

    Sushindren

  • Hi Sushindren,

    Could you share the exact complete error along with the command you were passing to the u-boot?

    Do you zImage copied under /boot/Zimage directory of the SD card? 

    could you print the output of # ext2ls mmc 0:1 /boot

    Thanks,

    Prasanth R

  • Hi Prasanth,

    Apologize for the late reply,

    As you mentioned i executed the command,

    => ext2ls mmc 0:1 /boot                                                         
    <DIR>       4096 .                                                              
    <DIR>       4096 ..                                                             
             4255384 zImage-4.19.0-yocto-standard                                   
    <SYM>         28 zImage                                                         
               18488 sc573-ezkit.dtb                                                
    =>

    when i run sdcard boot its showing wrong image format, i followed the same procedure which was in the link

    here i used zImage for this.

    => run sdcardboot                                                               
    switch to partitions #0, OK                                                     
    mmc0 is current device                                                          
    4255384 bytes read in 719 ms (5.6 MiB/s)                                        
    Wrong Image Format for bootm command                                            
    ERROR: can't get kernel image!

    Waiting for the replay

    Thanks,

    Sushindren

  • Hi Sushindrean,

    It seems your u-boot environment variable was modified,

    ```

    #setenv sdcardboot 'mmc rescan; mmc dev 0 0; ext2load mmc 0:1 ${loadaddr} /boot/${ramfile}; ext2load mmc 0:1 ${dtbaddr} /boot/${dtbfile}; run sdcardargs; bootz ${loadaddr} - ${dtbaddr}'

    #run sdcardboot

    ```

    Thanks,

    Prasanth R

Reply Children