Forums

Trying to load kernel via TFTP

  • Hi all.

    I'm running a Leopard 365. My host machine is Ubuntu 10.1 - 32-bit - desktop.

    I'm trying to load the kernel via TFTP and using NFS for the file system. Everything seems to be setup from everything I've followed (the docs are a little scattered about but I'm pretty sure I got it all).

    I did a clean checkout of the SDK via the repository. Did a make config and selected for DVI output, uncompressed kernel and nfs. The whole thing builds without any issues. My u-boot variables are setup like this:
    baudrate=115200
    ipaddr=192.168.222.69
    serverip=192.168.222.85
    captureargs=dm365_imp.oper_mode=0 davinci_capture.device_type=4
    autostart=yes
    nfshost=192.168.222.85
    rootpath=/home/phred/workspace/RidgeRun_SDK/fs/fs
    encodeargs=davinci_enc_mngr.ch0_output=DVI davinci_enc_mngr.ch0_mode=720P-60
    videoargs=video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K
    bootcmd=bootm
    bootfile=kernel.uImage
    bootdelay=3
    bootargs=mem=116M console=ttyS0,115200n8 noinitrd rw ip=192.168.222.69:::255.255.255.0::eth0 root=/dev/nfs nfsroot=192.168.222.85:/home/phred/workspace/RidgeRun_SDK/fs/fs,nolock video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K
    fileaddr=80700000
    kernelloadaddr=0x82000000
    kernelsaveaddr=0x420000
    kerneloffset=0x420000
    ksize=0x4390C0
    filesize=4390C0
    stdin=serial
    stdout=serial
    stderr=serial
    ethaddr=00:0C:0C:A0:02:b5
    ver=U-Boot 1.3.4-svn21 (Feb 24 2010 - 10:04:27)

     

    Basically what happens is that it kernel.uImage boots with this message:

    ## Booting kernel from Legacy Image at 80700000 ...
       Image Name:   "RR Linux Kernel"
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4427904 Bytes =  4.2 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    And then.... nothing.

    Any ideas!?

    Thanks!

     

  • The machine ID passed to the kernel by the bootloader doesn't match the machine ID expected by the kernel.  This is due to the bootloader that is preloaded on the leo365 board being built before the leo365 machine ID was assigned.

  • Ohhhh I had read that someplace else but didn't think it applied as the u-boot version is quite recent!

    How can the two be synchronized?

  • Ok Feb 24, 2010 isn't that recent... I swear that was a later date!

  • Todd would you be able to point me to any doc that describes how this is done?

    Thanks!

  • To verify my theory is correct, please power cycle your board and provide the UBL and uboot output.

    Todd

    P.S. I was on the Phive Upper Phreds software team years ago - its nice to meet another Phred

  • TI UBL Version: 1.50

    Booting Catalog Boot Loader

    BootMode = NAND

    Starting NAND Copy...

    Valid magicnum, 0xA1ACED66, found in block 0x00000019.

      DONE

    Jumping to entry point at 0x81080000.

    U-Boot 1.3.4-svn21 (Feb 24 2010 - 10:04:27)

    I2C:   ready

    DRAM:  128 MB

    NAND:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)

    Bad block table found at page 131008, version 0x01

    Bad block table found at page 130944, version 0x01

    256 MiB

    In:    serial

    Out:   serial

    Err:   serial

    Ethernet PHY: GENERIC @ 0x00

    Hit any key to stop autoboot:  0

    Leopard 365 :>

  • Hi

    I had the same problem. Try to load the kernel via the serial port. I think that your tftp does not work correctly. Sometimes installation of the kernel via tftp runs without errors, but the kernel doesn't start. First install the bootloader and then  kernel. I don't know why but when I install tftp on Ubuntu using the instructions from the RR it is not working.

  • It's only the newest kernel I compile with the RR SDK that I can't upload.  But uploading the older 2.6.18 kernel that comes with the IP camera demo loads fine which is where that particular version of U-Boot came from as well.

    Basically, I just need to know where to set this MACH number in the kernel so that u-boot and the loading Kernel get along!

  • OK this gets even weirder.

    I am able to build a custom kernel with Narcissus and I can upload it fine.  Yet I'll build a kernel with RidgeRun and it fails.

    Making me a little crazy this issue....

  • I also had problems starting kernel with NFS,

    which disappeared, when i completely deleted SDK (again), and install it again,

    then just copiled it with default (NFS) configuration and installed it (make configure + make + make installbootlaoder + make install).

    It works with NFS and jaffs.

  • You can find Machine IDs in :

    Linux :

    /kernel/linux-2.6.32./arch/arm/tools/mach-types

    /kernel/linux-2.6.32./arch/arm/mach-davinci/board-dm365-leopard.c (in MACHINE_START(DM365_LEOPARD, "DM365 Leopard") )

    uBoot:

    /bootloader/u-boot/src/include/asm-arm/mach-types.h

    /bootloader/u-boot/src/board/davinci/dm365_evm/dm365_board.c (board_init)

  • Thanks... it's all working now!

  • Hhm not working for me:

    After launching "make installbootloader" I am getting this error:

    Restarting u-boot

    ERROR: failed to detect u-boot restarting.

    Exit: -1

    make: *** [installbootloader] Error 255

    Then when rebooting I'm getting this:

    DM36x initialization passed!

    UBL customized by RidgeRun

    TI UBL Version: 1.50

    Booting Catalog Boot Loader

    BootMode = NAND

    Starting NAND Copy...

    No valid boot image found!

    NAND Boot failed.

    Aborting...

    I used the latest RR SDK and here is my UBL/U-boot output:

    DM36x initialization passed!

    TI UBL Version: 1.50

    Booting Catalog Boot Loader

    BootMode = NAND

    Starting NAND Copy...

    Valid magicnum, 0xA1ACED66, found in block 0x00000019.

      DONE

    Jumping to entry point at 0x81080000.

    U-Boot 1.3.4-svn3 (Feb 14 2010 - 00:32:43)

    I2C:   ready

    DRAM:  128 MB

    NAND:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)

    Bad block table not found for chip 0

    Bad block table not found for chip 0

    nand_bbt: Error while writing bad block table -5

    256 MiB

    *** Warning - bad CRC or NAND, using default environment

    In:    serial

    Out:   serial

    Err:   serial

    Ethernet PHY: GENERIC @ 0x00

    Hit any key to stop autoboot:  0

  • So, hit the key to stop autoboot.

    Then close minicom.

    and 'make install'.