By default, the QNX BSP for the TS-7970 will use DHCP to acquire an IP
address for the ethernet interface (fec0).

The ifconfig utility is included, so that the IP address may be set manually.

The above is sufficient to reach hosts on the same subnet as the TS-7970.

If your DHCP server provides "option routers <IP addresses of router(s)>", 
then hosts on the internet may be reached from the TS-7970.

If your DHCP server doesn't provide that option, or if you would prefer to
manually set a default router (gateway), then you may need to add the "route"
utility to your build (if it's not there already).  Do this by adding a 
line containing just the word "route" to the file:

   .../src/hardware/startup/boards/imx6x/ts7970/build
   
The line should be added to the section labeled "General commands".  Save
the file, then rebuild the binary.  The route command may then be used
on the board like so:

   route add default <IP address of default router>
     

All of the above assumes that the IP addresses of the hosts on the internet 
that you wish to reach are already known.  If you need name-service (aka DNS), 
then you need to do the following:

Create a file in:

   ../prebuilt/etc/resolv.conf
   
This file needs to contain, at a minimum, the IP address of one or more
nameservers.  For example:

   nameserver 192.168.1.88
   
Edit the build file as before, and look for the line:

   dhcp.client &

...and change it to:

   dhcp.client -n &
   
This will prevent your /etc/resolv.conf file being overwritten.

Also add (if necessary) the following to the build file:

   /etc/resolv.conf=../install/etc/resolv.conf
   
Save the file, and rebuild the binary.

When the board boots, verify that "/etc/resolv.conf" exists, and contains
the nameserver information that you added.

Verify that you can ping hosts from the command-line, specifying 
hosts by name.  For example:

   ping www.embeddedarm.com

If your DHCP server provides "option domain-name-servers <IP addresses of domain-name servers>",
then you don't need to create your own resolv.conf file as described above.
Instead, add the following to the build file:

   [ type=link] /etc/resolv.conf=/base/etc/resolv.conf
   
Also, on the SD card that will be used on the TS-7970, create a directory at
the root level of the filesystem, named "etc".  These two steps are 
necessary because the IFS is mounted read-only, and so we need to link
to a file on the writeable SD card (or eMMC, if that's what you are using).

Finally, don't add the "-n" switch to the invocation of dhcp.client, as
was mentioned earlier.  Doing so will allow dhcp.client to create the
resolv.conf file, containing the information sent by the DHCP server.

If you want to use the nslookup command, then you will need to add it in
the same way that the "route" command was added above.  In addition, you will 
need to add libcrypto.so.2 to the build. 
   

