Curtis Wald

i.MX6 NFS booting with Ubuntu 12.04.02 Precise

Discussion created by Curtis Wald Employee on Aug 2, 2013
Latest reply on Oct 11, 2013 by Curtis Wald

One of the booting methods supported by the MX6Q-SDB is to read U-Boot from a SDCARD, load the Linux kernel (uImage) from a TFTP server and NFS mount a root file system from a host. Please refer to Setting_Up_LTIB_Host.pdf in the Linux Bundle for i.MX 6Quad/Dual for host configuration steps.

 

U-Boot environment variables are used to provide the details of the boot mode. Here are definitions of variables to consider changing from the default values for your environment. NOTE for the definitive guide please see http://denx.de.

 

To set an environment variable use the setenv command. The syntax is setenv variableName value. ‘=‘ character is not valid for setenv. 

Thus setenv variableName=value will be rejected.

 

To show variables use the printenv command.

U-Boot Variable

Description

bootdelay

Count down in seconds before U-Boot begins boot process. To halt, strike any key and the U-Boot prompt is presented

bootcmd

U-Boot executes this definition after the bootdelay

serverip

IP address of the host. This provides the TFTP server and exports directory for NFS mounting.

ipaddr

IP address of the target (MX6Q-SDB)

bootcmd_net

Configuration used for network booting: setup bootargs, tftp read uImage Linux kernel from TFTP server host and store in DDR memory, jump to loaded Kernel and begin executing.

bootargs_base

Clear the bootargs environment string and setup the console string:  console=ttymxc0,115200

nfsroot

The NFS exported directory of the host specified by serverip.

bootargs_nfs

This builds upon bootargs, adding to the console setup the NFS specifics:

root=/dev/nfs

ip=dhcp nfsroot=${serverip}:${nfsroot},v2,tcp

 

NOTE: the default setting has v3 which specifies NFS protocol version. Ubuntu 12.04.02 Precise was rejecting this setting, changing to v2 was successful. Please refer to the man page on nfs for additional details.

bootargs

This variable is passed to the kernel.

 

This discussion was based on Freescale BSP Linux release L3.0.35-4.0.0 for the MX6Q-SDB platform.

The working U-Boot environment for NFS Boot :

 

MX6Q SABRESD U-Boot > printenv

bootdelay=3

baudrate=115200

netmask=255.255.255.0

loadaddr=0x10800000

rd_loadaddr=(0x1300000)

netdev=eth0

ethprime=FEC0

uboot=u-boot.bin

kernel=uImage

bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm

bootcmd=run bootcmd_net

ethact=FEC0

ipaddr=192.168.1.20

bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v2,tcp

video=video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 ldb=sin1

serverip=192.168.1.100

nfsroot=/var/fs/mx6q/caam/rootfs

extra=caam

bootargs_base=setenv bootargs console=ttymxc0,115200 ${video} ${extra}

stdin=serial

stdout=serial

stderr=serial

 

Environment size: 792/8188 bytes


Outcomes