0

I am trying to load uImage and filesystem using tftpboot/nfs. However, I am having the following issue.

In my uboot I have following settings:

bootargs=mem=128M 
ip=dhcp noinitrd console=ttyS0,115200n8 root=/dev/nfs rw
nfsroot=192.168.x.x:/tftpboot,nolock,rsize=1024,wsize=1024

serverip, gatewayip and ipaddr are setup. I can ping target device from the host and vice versa.

I am loading uImage with the following:

setenv bootnfs 'tftp  0x80000000 uImage; bootm'
run bootnfs

$ cat /etc/exports
/tftpboot *(rw,sync,no_subtree_check,fsid=0,no_root_squash)

In my host under /tftpboot I have unzipped the file system (nfs.tar.gz)

$ ls /tftpboot
bin  boot  dev  etc  home  lib  linuxrc  media  mnt  nfs.tar.gz  proc
sbin  srv  sys  tmp  uImage  usr  var

Notice I also have uImage under /tftpboot.

I am not sure where to put uImage.

thomaswsdyer
  • 346
  • 1
  • 10
Frank Coool
  • 91
  • 1
  • 6
  • Your post is confusing, as if you don't know how to use TFTP and NFS. *"I am trying to load uImage and filesystem using tftpboot/nfs"* -- A slash is usually read as "or", so what you wrote is *"... using tftpboot or nfs"*, and reads as if you don't know the difference between those two protocols. IMO a root filesystem that will be mounted by NFS does not belong under `/tftpboot`. *"I am not sure where to put uImage."* -- The correct location to store uImage depends on how the TFTP server was setup. If the TFTP server is configured to use `/tftpboot`, then that is the answer. – sawdust Jan 23 '15 at 07:47
  • No, you are not correct. `/etc/exports` is for NFS, and has nothing to do with TFTP. The directory for the TFTP server is specified in its config file or the inetd config file. A TFTP directory should not even be in the `/etc/exports` file. Likewise, an NFS rootfs does not belong in the TFTP directory. And more questions do not belong in an answer, but should be appended to your original post by editing it. – sawdust Jan 23 '15 at 22:36

1 Answers1

1

sawdust, Thanks for the reply. You are right the source of the problem is my confusion with tftp and nfs. I have not tested it yet but from what I understood from your reply:

uImage goes in /tftpboot since tftp server is set up to point to /tftpboot path (indicated by /etc/exports)

$ cat /etc/exports
/tftpboot *(rw,sync,no_subtree_check,fsid=0,no_root_squash)

filesystem (nfs.tar.gz) will be unzipped and go in /tftpboot/fs but I have to modify bootargs little bit ( to point to /tftpboot/fs)

bootargs=mem=128M ip=dhcp noinitrd console=ttyS0,115200n8 root=/dev/nfs 

rw nfsroot=192.168.x.x:/tftpboot/fs,nolock,rsize=1024,wsize=1024

Am I correct?

One more question on OMAP35x Mistral board, do I need to change any hardware jumper setting if booting from nfs? correctly it boots fine from NAND I am trying to change it to nfs so that I can do some development work from host system (Linux Ubuntu14.4)?

frank
  • 11
  • 1
  • for loading uImage i've used tftpboot..But for loading rootfs which steps you taken?Can you pls mention it? – RDX Feb 17 '15 at 10:21