Once you have the IP address of the target, you could SSH and communicate with the target.

ssh linaro@<target IP address> 

Connect through SSH and play around with some basic commands. Navigate around your home directory and check the contents.But we want to do more than this. We want to be able to load applications on the target, debug and execute them.

You can transfer the applications from host machine to target using a flash drive but it is not convenient. And it is not easy to debug the applications on target this way. We want to have a seamless way to share applications between host and target.To do this, we will setup a NFS (Network File System). We will create a space on the host machine and share it. On the target, we will mount this space. This will be a common shared space between host and target. Any files created either from the host or the target in this shared space will be visible to both host and target.

NFS between dragonboard and host machine

Host Machine:

  • Check for firewall settings - disable if any.

  • Note down host IP address and mask info (ifconfig should get this info)

  • Install NFS server application (more info in the link below)

sudo apt-get install nfs-kernel-server
  • Create a folder that will be shared with the target

    • For example: /home/<user>/Dragonboard/Projects

    • Make it read/write/executable:

chmod a+rwx /home/<user>/Dragonboard/Projects
  • Configure the server (this will make the folder visible to the network)

    • Edit the exports file in /etc folder (use sudo)

    • Either vim or gedit should work

    • Add the following line to the file (all in one line)

<path_of_the_folder_created_above> <base_of_network_of_host>/<mask> (rw,sync,no_subtree_check)

If your IP address is 192.168.1.64 then the base is 192.168.1.0

  • Restart/start the NFS server

  • Ensure that the folder is indeed exported using

showmount -e 

If you see the folder in the export list then your host is setup for NFS. 

Target:

Target needs some work and some new applications to install. All the below installations are to be done on target. You can use SSH or use a keyboard/mouse with monitor connected to dragonboard. I recommend SSH as you will get used to the command line and this will also ensure that SSH is working reliably. 

Install BusyBox on the target

  • Download the latest version from the busybox.net or its git

  • At the time this was being written, 1.24 was the stable version. Follow the instructions here to install busybox

On my setup, for some reason the busybox did not get copied to /usr/bin. I had to manually copy it from /install from busybox folder (download location)

  • Once you have the busybox installed, execute the following command to mount the host NFS onto the target (all this is in one line)

busybox mount -o tcp -t nfs -o nolock <server_ip_addr_here>:<absolute_path_of_shared_folder_on_server> <mount_location_on_target>

            For example: busybox mount -o tcp -t nfs -o nolock 192.168.1.64:/home/basu/Dragonboard/Projects /Projects

  • You can save the command into a script for easy execution

echo <busy_box_command_above> > mount_my_nfs
  • Make it executable

chmod +x mount_my_nfs
  • And run when needed

./mount_my_nfs

Instead of executing it every time you reboot the target, you can schedule a cron job. You can install cron on target and add @reboot job for the above script. There are other ways to do the same. Explore them and pick one, it will save you time.

If all goes well, you should have a NFS working between your host and target. Make some changes on your host folder (add a file/folder), it should show up on the target. Similarly, make changes from the target side and the change should reflect on the host location.

References/Links:

Add comment


Security code
Refresh