ShihaoLiu
ShihaoLiu

Reputation: 101

How to mount the NFS file on the target board

I'm developing an embedded linux program. Now, I have an target board which has a embedded linux kernel running on it, and I want to mount a NFS file via the minicom. But when I excute the mount -t nfs IP:/path/to/nfs /tmp, it happens an error like

mount: wrong fs type, bad option, bad superblock on 192.168.1.221:/home/shihaoliu/nfs, missing codepage or helper program, or other error(for several filesystems(e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try dmesg | tail or so

Ok, I try another method to transfer file from host machine to target board.
I run the minicom on my host machine, and use the zmodem to transfer the file, but I got the error like this:

0000000000-bash: 0000000000: command not found.

Upvotes: 0

Views: 2729

Answers (1)

ShihaoLiu
ShihaoLiu

Reputation: 101

Ok, I think I found the solution to using the minicom to transfer file.

  1. Firstly, you need install the minicom and lrzsz on your host machine. You can use the command:
    >> apt-get install minicom
    >> apt-get install lrzsz

  2. Secondly, you need install the lrzsz on your target board. You can get the lrzsz source code at the http://www.filewatcher.com/m/lrzsz-0.12.20.tar.gz.280938.0.0.html

    Now, you need to cross-compile the lrzsz source code. At the root directory of the lrzsz, you'll find the INSTALL file which describes the procedure. Now, execute the command configure.
    >> ./configure

  3. After configure, you'll get the Makefile. Now you have to change the Makefile at the root, /lib, /src directories. Like following:
    CC = arm-lnone-linux-gnueabi-gcc
    CPP = arm-lnone-linux-gnueabi-gcc -E

  4. And you also need to change the Makefile at the /intl directory. Like following:
    AR = arm-none-linux-gnueabi-ar
    CC = arm-none-linux-gnueabi-gcc
    RANLIB = arm-none-linux-gnueabi-ranlib

  5. At this time, you can make the program use command make and after that you'll get lsz, lrz files. Copy these two files to you target board and place both them at the /bin dirctory. After all, you have install the minicom successfully. Now, you can turn into the /tmp directory and enter the command:
    >> lrz

  6. Type the keyboard Ctrl+A S and select the zmodem, now you can transfer a file to the target board from the host machine.

  7. When the transmission is completed, you can find the file at /tmp directory.

Ok, that's all I knew. Hope that's helpful for someone.

Upvotes: 2

Related Questions