Getting started with TI Jacinto 7 Edge AI/Introduction/NFS bootup

From RidgeRun Developer Wiki

NFS bootup

Requirements

  • TI Jacinto 7 board connected via USB and Ethernet to the PC
  • DHCP configured to share network on the Ethernet interface
  • Connected SD card with a Jacinto 7 image (or at least the boot partition with the Bootloader)

Dependencies to meet

$ sudo apt install nfs-kernel-server
$ sudo apt install xinetd

Setups

Find the USB port device

The USB device can be found this way:

# Plug in and plug out the USB cable
$ watch ls /dev/tty* 
/dev/ttyUSB0
Find the the server IP (the IP of your computer)

The computer IP could be find out with this command, at the first IP:

$ hostname -I
Set the TFTP server directory
$ vi /etc/default/tftpd-hpa
# [Update this variable]
# TFTP_DIRECTORY="/tftpboot"
Configure the Ethernet interface

Make sure it is sharing Internet. It will allow the DHCP to assign and IP the FTP server to establish the files transfers.

$ nm-connection-editor

The script execution

$ sudo ./setup.sh

Proceed with the SDK setup script and reach out to the point the script stands for the Minicom (serial communication application) setup for SDK development.

The script execution would look like the following:

# Which serial port do you want to use with minicom?
$ [ /dev/ttyS0 ] /dev/ttyUSB0
--------------------------------------------------------------------------------
This step will set up the u-boot variables for booting the EVM.
--------------------------------------------------------------------------------
Autodetected the following ip address of your host, correct it if necessary
[ 192.168.1.55
172.17.0.1 ] 192.168.1.55 

Select Linux kernel location:
 1: TFTP
 2: SD card

[ 1 ] 1

Select root file system location:
 1: NFS
 2: SD card

[ 1 ] 1

Available kernel images in /tftproot:
    Image-j7-evm.bin
    k3-j721e-common-proc-board-infotainment.dtbo
    k3-j721e-common-proc-board-jailhouse.dtbo
    k3-j721e-common-proc-board.dtb
    k3-j721e-edgeai-apps.dtbo
    k3-j721e-pcie-backplane.dtbo
    k3-j721e-proc-board-tps65917.dtb
    k3-j721e-vision-apps.dtbo
    ti-fs-firmware-j721e-gp.bin
    ti-fs-firmware-j721e-hs-cert.bin
    ti-fs-firmware-j721e-hs-enc.bin

Which kernel image do you want to boot from TFTP?
[ Image-j7-evm.bin ] 
--------------------------------------------------------------------------------
Would you like to create a minicom script with the above parameters (y/n)?
[ y ] y

--------------------------------------------------------------------------------
Would you like to run the setup script now (y/n)?

Please connect the ethernet cable as described in the Quick Start Guide.
Once answering 'y' on the prompt below, you will have 300 seconds to connect
the board and power cycle it before the setup times out

After successfully executing this script, your EVM will be set up. You will be 
able to connect to it by executing 'minicom -w' or if you prefer a windows host
you can set up Tera Term as explained in the Software Developer's Guide.
If you connect minicom or Tera Term and power cycle the board Linux will boot.

[ y ] y

Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 16:47:36

# [At this very point restart the board with the power switch.]

The result it's a Minicom script with the Bootloader sequence and configuration to boot the TI J7 via the NFS/TFTP.

Test the NFS boot

You can reconnect to the board using the created Minicom script, and it would be this way:

# Connect to the board
$ sudo minicom -S bin/setupBoard.minicom

# [Restart the board with the power switch]

At the SDK root path, touch a file on the NFS'd filesystem:

$ touch targetNFS/home/1234567

At the J7 NFS session, the file will be found:

$ ls /home/
1234567 root