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.

Can't get NFS working on my DM816x, C6A816x and AM389x Evaluation Board.

I am trying to setup my environment so I can load some development code on to my AM389x Eval Board w/Daughter Board via my Ubuntu host. I have executed this same code on an AM37x Evaluation Board by simply loading it into my targetNFS directory and then execute it via my 'minicom' window. Although I have gone through the setup process correctly (I think) and I end up with a 'targetfs' directory on my host, I can not load a file into my host directory (/home/rte/targetfs/home/root) and see it on my target Eval board using minicom. If I power cycle my AM389x target board, login after the boot process and do a 'pwd' it returns /home/root which seems to align with my host's /home/rte/targetfs/home/root directory structure. However, if I add a file to either the host or my target board it does not show up in the other system.

Should I be able to boot from my SD card and still expect NFS to function the same way it did on the AM37x Eval Board or do I need to create a special u-boot function?

 

  • Steven,

        It sounds like to me that you are booting from SD card and not from NFS.

      Different steps needs to be followed to access both NFS and SD card.

      Could you please share the bootargs to understand the issue better

      you can get boot args through any of the below way

      1. on u-boot printenv

      2. after linux booted cat /proc/cmdline

     

     

    Best regards

    Velan

     

     

  • Velan,

    Thank you for the quick response. 

    If I do the  cat /proc/cmdline command it returns the following:

    "console=tty02, 115200n8 rootwait root=/dev/mmcblk0p2 rw mem=256M earlyprink vram=50M ti816xfb.vram=0:16M,1:16M,2:6M ip=off noinitrd"

     

    If I do printenv at the u-boot prompt I get the following screen full of data:

    TI8168_EVM#printenv
    bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else echo In case ENV on MMC/SD is required; echo Pli
    bootdelay=3
    baudrate=115200
    autoload=no
    verify=yes
    bootfile=uImage
    ramdisk_file=ramdisk.gz
    loadaddr=0x81000000
    script_addr=0x80900000
    loadbootscript=fatload mmc 1 ${script_addr} boot.scr
    bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}
    stdin=serial
    stdout=serial
    stderr=serial
    ethaddr=90:d7:eb:36:55:c8
    ethact=DaVinci EMAC
    ver=U-Boot 2010.06 (Jun 01 2011 - 12:30:57)

    Environment size: 779/8188 bytes

    Thanks again,

    Steve

  • Steve

      It shows that the booting is happening over SD card (not NFS)

    when you install the SDK as mentioned in "Setting up the EZ SDK" section of Software developers guide, you will get the u-boot environment variable for NFS boot

    use those setting to boot your EVM with NFS.

      Later after boot-up you can mount SD card via /dev file system and access it.

     The other way boot over SD card and run "mount -t nfs ....." also should work. I recommend to use the first step as the first one takes care of restarting NFS in HOST machine after updating the /etc/exports file with correct directory for export.

    Best regards,

    Velan

  • Velan,

    Sorry, but I must be missing something. I have executed the ${EZSDK}/setup.sh several times now using all the default settings but still get the dame setup that I sent you.

    However, after I complete the execution of the setup script it tells me to do the following thing which I may have messed up:

    1. Boot the Linux kernel from your development host using TFTP. On your development host the Linux
    kernel is fetched from /tftpboot by default.

    Question #1: The script did create a /tftpboot directory containing uImage-dm316x-evm.bin

                        I'm not sure what they are asking for in this 1st statement. How does one boot the linux kernel from the development host using TFTP?

    2. Boot the Linux file system from your development host using NFS. On your development host the
    Linux target file system is located at ${HOME}/targetfs

    Question #2: Again, what am I supposed to do here?  How does one boot the linux file system from the development host using NFS?

                            The script did create the ${home}/targetfs directory with all its sub-directories.

    Question #3: Per the Note below, I can find nothing in the u-boot pdf doc that talks about switch setting for NFS boot? I only find settings for NAND, NOR SPI and SD boot.

    Note! To boot the board from NFS, you may need to change the boot switch settings on your EVM. Please

    refer the UBoot user guide in the board-support/docs folder for more information on the switch settings.

     

    I'm hoping that you can enlighten me on this confusing process...

    Thanks,

    Steve

     

  • Steve,

       While executing the ./setup.sh please closely watch the user interface  questions.

      One of the question is NFS or SD card, select NFS.

      Refer to document Software Developers Guide.pdf before going to u-boot user guide.

      Send the entire trace for ./setup.sh if still issue present. also switch setting details.

    Best Regards

    Velan

  • Velan,

    I have attached a print out of my screen showing setup.sh output as it executes. As you can see I'm setting it to NFS, and it appears that my target environment variables are getting setup correctly they never seem to make it down to the target board. For some reason it appears that the minicom script (minicom -S setup_uimage-tftp_fs-nfs.minicom) does not always stop the auto boot process even if I power cycle the target board way before the 300 second timeout. However after some playing and repeated tries I did get it to stop the auto boot (I think) and I have appended it to the bottom of my attachment. 

    I did notice that the script is complaining about mounting the root fs via NFS:

    VFS: Unable to mount root fs via NFS, trying floppy.
    VFS: Cannot open root device "nfs" or unknown-block(2,0)
    Please append a correct "root=" boot option; here are the available partitions:
    1f00              64 mtdblock0  (driver?)
    1f02              64 mtdblock2  (driver?)
    1f04            2432 mtdblock4  (driver?)
    1f05             128 mtdblock5  (driver?)
    1f06            4352 mtdblock6  (driver?)
    1f07          204928 mtdblock7  (driver?)
    1f08           50304 mtdblock8  (driver?)
    b300         7761920 mmcblk0  driver: mmcblk
      b301           40131 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
      b302          883575 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
      b303         6835657 mmcblk0p3 00000000-0000-0000-0000-000000000mmcblk0p3
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
    Backtrace:

    Also to get to this point I had to enable the NAND switch, I believe. Unfortunately this point still doesn't fix my issue.

    Hopefully this will give you the key to my problem so you can tell me what I'm doing wrong.

    Thanks,

    Steve2273.output-of-setup-script.txt

     

  • Steve,

             In the trace i see kernel command line is different from what is printed during EZSDK setup (./setup.sh)

    Linux boot shows

       Kernel command line: console=ttyO2,115200n8 rootwait rw mem=256M earlyprintk vram=50M ti816xfb.vram=0:16M,1:16M,2:6M root=/dp
    Expected

    console=ttyO2,115200n8 rootwait rw mem=256M earlyprintk vram=50M ti816xfb.vram=0:16M,1:16M,2:6M root=/dev/nfs nfsroot=192.168.1.197:/home/rte/targetfs ip=dhcp
    setenv bootcmd '

    Could you please set these environment variable in u-boot instead of creating minicom script. During u-boot boot abort the boot and run sequence of setenv as given out by setup

    Best regards,
    Velan
  • Velan,

    Thanks for the input, I feel like I made (you made) some progress. Still not all the way there...

    I followed the below listed instructions, for the Environment Settings for NFS Filesystem, from the u-boot guide so please note

    that I left out some stuff that was in the original minicom script (setup_uimage-tftp_fs-nfs.minicon), which I've listed below.

    My results were a little different which I have attached and included my environment variables. Is there any way to capture the

    environment variable for bootargs, as it is to long and does not line wrap so it gets messed up at the end of the line? I'm not

    sure why the ip=197.168.205 (which is the target's ip address) is doing at the end of the bootargs  because I don't think I

    included that when I 'setenv bootargs' variables ......see yellow high lighted line below.

     

    This time  it got to "Uncompressing Linux... done, booting the kernel." and hung (refer to attachment)???

    Environment Settings for NFS Filesystem
    In case you want to have the kernel use the same ip as that assigned to U-Boot
    TI8168_EVM# print ethaddr <-- Check if MAC address is assigned and is unique
    TI8168_EVM# setenv ethaddr <unique-MAC-address> <-- Set only if not present already, format uv:yy:zz:aa:bb:cc
    TI8168_EVM# setenv bootcmd 'dhcp;run addip; tftp 81000000 uImage-dm816x-evm.bin;bootm'
    TI8168_EVM# setenv hostname <unique-hostname>
    TI8168_EVM# setenv addip 'setenv bootargs ${bootargs}
    ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}:${hostname}:eth0:off'
    TI8168_EVM# setenv autoload no
    TI8168_EVM# setenv nfsserver <NFS server-ip> <-- Make
    sure the same NFS server IP is used below
    TI8168_EVM# setenv bootargs 'console=ttyO2,115200n8 root=/dev/nfs
    nfsroot=<NFS server-ip>:<NFS share>,nolock rw mem=128M'
    TI8168_EVM# setenv serverip <tftp-server-ip>

    Note: left out of setenv: earlyprintk vram=50M ti816xfb.vram=0:16M,1:16M,2:6M ip=dhcp

    3808.manualSetupOutput.txt

     


  • Steve,

      I still do not see your printenv shows the correct values. You need to ensure that you are using the same values given out by ./setup.sh

     

      you could use saveenv in the end to avoid setenv for every boot

    Best Regards

    Velan

  • Steve,

    Use these steps for knowing further details on why it is staying at "Uncompressing Linux... done, booting the kernel."

    TI8168_EVM# set addip 'setenv bootargs ${bootargs} ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}:${hostname}:eth0:off'

    TI8168_EVM# setenv bootargs 'console=ttyO2,115200n8 noinitrd rw root=/dev/nfs nfsroot=192.168.1.197:/home/rte/targetfs,nolock mem=128M earlyprintk rootdelay=3'

    TI8168_EVM# setenv 'dhcp;run addip; tftp 81000000 uImage-dm816x-evm.bin;bootm'

    TI8168_EVM# saveenv

    TI8168_EVM# boot

    Make sure that your static ip (192.168.1.205) is working and your NFS is running properly on 192.168.1.197.

    If you still seeing issues then provide bootargs and kernel boot log.

    Regards

    Anilkumar

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

  • Anilkumar,

    I have attached the results of entering in the environment variables per your response note. The first section is a screen shot of entering the variables and the second is a screen shot of the boot attempt, which failed.

    I'm not sure if this would cause the problem I'm having but I did notice that my host name ("rtetiboard") shows up as both "LapTop" and "rtetiboard", which I've high-lighted. "LapTop" was entered in error yesterday and then, shortly after, corrected to "rtetiboard". Why is it still showing up as "LapTop"? If I 'print hostname' it responds with "hostname=rtetiboard".

    Unfortunately, when I enter in the setenv for bootargs it does not line wrap so you can't see my variables and likewise when I 'printenv' bootargs does not line wrap. Is there any way to see these variables that are at the end of the line?

    TI8168_EVM#printenv
    verify=yes
    ramdisk_file=ramdisk.gz
    loadaddr=0x81000000
    script_addr=0x80900000
    loadbootscript=fatload mmc 1 ${script_addr} boot.scr
    bootscript= echo Running bootscript from MMC/SD to set the ENV...; source ${script_addr}
    ethaddr=90:d7:eb:36:55:c8
    ethact=DaVinci EMAC
    bootdelay=4
    baudrate=115200
    oldbootfile=uImage
    setenv=hostname LapTop
    autoload=no
    nfsserver=192.168.1.197
    bootfile=uImage-dm816x-evm.bin
    gatewayip=192.168.1.3
    netmask=255.255.255.0
    ipaddr=192.168.1.205
    serverip=192.168.1.197
    dnsip=192.168.1.23
    dnsip2=192.168.1.22
    bootcmd=dhcp;run addip; tftp 81000000 uImage-dm816x-evm.bin;bootm
    hostname=rtetiboard
    addip=setenv bootargs ${bootargs} ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}:${hostname}:eth0:off
    bootargs=console=ttyO2,115200n8 noinitrd rw root=/dev/nfs nfsroot=192.168.1.197:/homr/rte/targetfs,nolock mem=128M earlyprin3
    stdin=serial
    stdout=serial
    stderr=serial
    ver=U-Boot 2010.06 (Jun 01 2011 - 12:30:57)

    Environment size: 945/8188 bytes
    TI8168_EVM#print hostname
    hostname=rtetiboard

    1526.Boot-Results.txt

    Thank You,

    Steve

  • Thank you all for your help!!!

    Still not sure why the setup.sh script wouldn't setup my Eval board but after removing a typo (home vs. homr) and entering the exact variables that are in the setup.sh script, IT WORKS!

    Thank again!

     

  • Thanks for the info here. I also got problems NFS booting. Follow the settings here, I can boot up now. The EZ Software Developers Guide doesn't provide sufficient information for booting up the device. I guess the minicom config script is only for networks with DHCP.