Network Boot and NFS Root Filesystem Configuration for iMX6ULL Development Boards
Configure U-Boot to load the operating system kernel and device tree binary over the network using TFTP. Begin by establishing the network stack parameters for the target hardware:
setenv host_ip 192.168.2.100
setenv target_ip 192.168.2.55
setenv gateway 192.168.2.1
setenv subnet_mask 255.255.255.0
setenv mac_addr 00:11:22:33:44:55
saveenv
Define the boot sequence to retrieve the kernel image and flattened device tree from the TFTP server, then transfer control to the kernel:
setenv fetch_kernel 'tftpboot 0x82000000 linux.zImage'
setenv fetch_fdt 'tftpboot 0x83000000 imx6ull-custom.dtb'
setenv start_system 'bootz 0x82000000 - 0x83000000'
setenv bootcmd 'run fetch_kernel && run fetch_fdt && run start_system'
setenv bootargs 'console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw'
saveenv
For diskless operation, configure the bootloader to mount the root filesystem via NFS. This requires seting the kernel command line to specify the NFS server endpoint and network configuration:
setenv nfs_root 'root=/dev/nfs nfsroot=192.168.2.100:/var/nfs/rootfs,tcp rw'
setenv ip_config 'ip=192.168.2.55:192.168.2.100:192.168.2.1:255.255.255.0::eth0:off'
setenv bootargs 'console=ttymxc0,115200 ${nfs_root} ${ip_config}'
setenv bootcmd 'tftpboot 0x82000000 linux.zImage; tftpboot 0x83000000 imx6ull-custom.dtb; bootz 0x82000000 - 0x83000000'
saveenv
The ip parameter format decomposes as follows:
ip=<client-address>:<server-address>:<gateway>:<netmask>:<hostname>:<interface>:<autoconf>:<dns0>:<dns1>
- client-address: Static IP assigned to the target board (e.g., 192.168.2.55)
- server-address: IP address of the host exporting the NFS share
- gateway: Default gateway for the subnet
- netmask: Network mask defining the local subnet
- hostname: Optionla system identifier (leave empty if not required)
- interface: Network device name (typically eth0 for the primary controller)
- autoconf: Automatic configuration method; use 'off' for static addressing
- dns0/dns1: Optional primary and secondary DNS server addresses
Prior to booting, verify that the host system exports the filesystem path in /etc/exports, ensure the NFS server daemon is active, and confirm network connectivity between the developmnet host and target board.