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.

Bad magic Number

Hello All

I have been recieving this error when I try to boot the board in the SPI configuration.

I was getting this Bad Magic number so I searched the forums and found this post abt rewriting the uImage file again.

Now when I do the process of writing the uImage file and then enter the boot command it does boot and hangs where it tries to communicate with the NFS to mount the drive.

when I reboot the board I get the bad magic number again

I did the above process again and it still boots after the image has been written but  when the board is rebooted I get the bad magic number error

This is the output of the printenv command

DM6467 EVM # printenv
bootdelay=3
baudrate=115200
rootath /root/workdir/filesys
ip=off

bootcmd=bootm
bootargs=console=ttyS0,115200n8 noinitrd rw ip=off root=/dev/nfs nfsroot=192.168
.1.202:/root/workdir/filesys ,nolock mem=120M davincihd_capture.channel0_numbuff
ers=4
bootfile=uImage
nfshost=192.168.1.202
rootpath=/root/workdir/filesys
filesize=155468
fileaddr=80700000
ipaddr=192.168.1.201
serverip=192.168.1.202
stdin=serial
stdout=serial
stderr=serial
ethaddr=00:0e:99:02:b4:81

Environment size: 522/131068 bytes

I have no idea what to do next any help is appreciated. [:S]

p.s. I do seem to see some weird commands in the printenv I have underlined them in the print above.

Best regards

umair

  • the variable ip should not be set to 'off' when trying to load file system via NFS, please change your bootargs appropriately (see Getting Started Guide)

  • Thanks for the feeback

    my dhcp is not working correctly so I am trying to assign static ip to the evm and the host machine do I still need to set ip=dhcp

  • I have changed the ip= dhcp in bootargs command after that when i boots the board

     

    DM6467 EVM # boot
    TFTP from server 192.168.1.203; our IP address is 192.168.1.201
    Filename 'uImage'.
    Load address: 0x80700000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             ##############
    done
    Bytes transferred = 1397864 (155468 hex)
    ## Booting image at 80700000 ...
       Image Name:   Linux-2.6.10_mvl401-davinci_evm-
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1397800 Bytes =  1.3 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
    OK

    Starting kernel ...

    Uncompressing Linux............................................................................................... done, booting the kernel.

     

    it hangs over here...

    and when I was giving  IP=off in boorargs command, board was giving error "RPC: sendmsg returned error 101" for nfs port. how we can set nfs port on the board, as on the host machine i did exactly the same steps mentioned in getting started guide.

  • Can you post your updated bootargs?  When you reboot, does it still give you a bad magic number error..? 

  • The Updated Boot args are as follows

    DM6467 EVM #
    bootdelay=3
    baudrate=115200
    rootath /root/workdir/filesys
    ip=off
    nfshost=192.168.1.203
    rootpath=/home/asad/workdir/filesys
    dnsip=192.168.1.1
    filesize=155468
    fileaddr=80700000
    hostname=davincil
    ipaddr=192.168.1.201
    netmask=255.255.255.0
    gateway=192.168.1.1
    serverip=192.168.1.203
    dns1=192.168.1.1
    dns2=192.168.1.1
    bootargs=console=ttyS0,115200n8 noinitrd rw ip=192.168.1.201:192.168.1.203:192.1
    68.1.1:255.255.255.0:::off root=/dev/nfs nfsroot=192.168.1.203:/home/asad/workdi
    r/filesys,nolock mem=120M davincihd_capture.channel0_numbuffers=4
    bootfile="uImage"
    stdin=serial
    stdout=serial
    stderr=serial
    ethaddr=00:0e:99:02:b4:81
    bootcmd=tftpboot;bootm

    right now the output of the evm is this

    Booting PSP Boot Loader
    Starting NAND Copy
    Booting Application @ 0x81080000
    U-Boot 1.2.0 (Jul 17 2008 - 16:55:20)
    I2C:   ready
    DRAM:  256 MB
    unknown vendor=0 Flash:  0 kB
    NAND:  128 MiB
    In:    serial
    Out:   serial
    Err:   serial
    ARM Clock :- 297MHz
    DDR Clock :- 297MHz
    Hit any key to stop autoboot:  0
    TFTP from server 192.168.1.203; our IP address is 192.168.1.201
    Filename 'uImage'.
    Load address: 0x80700000
    Loading: T T T T T T T T T T T T T T T T T T T T
    Retry count exceeded; starting again
    TFTP from server 192.168.1.203; our IP address is 192.168.1.201
    Filename 'uImage'.
    Load address: 0x80700000
    Loading: T T T T T T T T T T T T T T

    so it  keeps on repeating this. I have also tried the above with  bootcmd=tftp;bootm the results are same

    hope this is useful

    I am still very concerned about the lines strikethrough above as they should not appear in the environment.

    regards

    umair

  • I do not like the lines you strikethoughed above either; you can get rid of u-boot environment variables by using 'setenv [variable name]'; for example typing 'setenv ip' and pressing return at u-bbot prompt should get rid of 'ip=off;  However, I would not worry about these.

    The key u-boot variables are bootcmd and bootargs (others such as serverip, ipaddr, and bootfile are also important).  From you log above, it seems like you are stuck when trying to TFTP linux kernel (uImage) from host.  Check the following

    1) name specified in 'bootfile' u-boot variable matches the name of the file in your host '/tftpboot' directory

    2) check to make sure you can ping your host from u-boot prompt (ensure hw connectivity)

    3) ensure firewall on your host is turned off (see Getting Started Guide for instructions)

  • I tried to ping the host machine from EVM it says 'host is alive'

    while on the host when I tried to ping the EVM it says 'Destination Host Unreachable'.

    I have the Redhat Enterprise Linux 4 Advance Server installed on the host can that be causing some conflict [^o)].

    best regards

    umair

  • I do not believe this is an issue; I seem to recall not being able to ping EVM from host either probrably because minimal software support is available at u-boot time; so long as you can ping your host from the EVM I think you are good to go.

    Have you checked that your firewall is disabled on your host and that you have a uImage file under your host's /tftp directory?

  • Hello Juan

    I have been able to solve the issue thanks a lot for your help. [:Y]

    I followed the article in the startup guide "Updating and Restoring the Bootloaders" and did the steps required in A.4.2 and A.4.3 on a hunch that I would be able to restore the uboot to its original settings. Doing so the environment variables restored to original state where I had started this process. I then proceeded with setting the static ip as explained in your app note, made sure the tftp was on, the nfs was working, the firewall was off and that I was able to ping from the board.

    The Linux has loaded now.[:D]

    Thanks a bunch I had been stumped and had been stuck on the issue for some days now.

    Best Regards

    Umair

     

  • Umair,

    This is great news!  I am glad to hear you are booting now.  BTW, I use teraterm scripts to automate u-boot configurations and avoid the likelyhood of getting something wrong; as you can imagine, it is easy to overlook something or make a typing mistake (at least for me :) ) when you have to type so many things manually...If you are interested, there are some sample teraterm scripts here http://wiki.davincidsp.com/index.php/Teraterm_Scripts

  • Those will a lot of help. I had to type so many things again as there is minimal editing enabled.

    I will look into them, thanks again.

    Best Regards

    Umair