Hi,
I am trying to use TFTP & NFS boot with Colibri iMX6ULL Evaluation Board. However, I am facing issues with configuration on the uBoot side, as it is not able to boot via TFTP.
We are able to successfully build & run the Linux built with Yocto, by downloading the images to eMMC via Toradex Easy Installer, however, the TFTP/NFS boot doesn’t seem to be working.
I have followed the details shared on the link - Boot from a TFTP/NFS Server | Toradex Developer Center
Please check the below configuration and let me know if anything is missing/incorrect.
The environment variables on uBoot::
Colibri iMX6ULL # printenv
arch=arm
baudrate=115200
board=colibri-imx6ull
board_name=colibri-imx6ull
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${i
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr
boot_scripts=boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc0 usb0 dhcp
bootcmd=run ubiboot || run distro_bootcmd;
bootcmd_dhcp=setenv devtype dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if te;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_usb0=devnum=0; run usb_boot
bootcount=1
bootdelay=1
bootfile=uImage
bootm_size=0x10000000
bootubipart=ubi
console=ttymxc0
cpu=armv7
defargs=user_debug=30
devtype=dhcp
dfu_alt_info=imx6ull-bcb part 0,1;u-boot1 part 0,2;u-boot2 part 0,3;u-boot-env part 0,4;ubi partubi 0,5
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=00:14:2d:7b:00:03
ethact=ethernet@20b4000
ethaddr=00:14:2d:6b:00:03
fdt_addr_r=0x82100000
fdt_board=eval-v3
fdt_fixup=;
fdtcontroladdr=8df2d950
fdtfile=imx6ull-colibri-eval-v3.dtb
ip_dyn=yes
ipaddr=192.168.10.2
kernel_addr_r=0x81000000
kernel_file=zImage
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x82000000
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
mtdparts=mtdparts=gpmi-nand:512k(mx6ull-bcb),1536k(u-boot1)ro,1536k(u-boot2)ro,512k(u-boot-env),-(ubi)
netmask=255.255.255.0
preboot=test -n ${fdtfile} || setenv fdtfile imx6ull-colibri${variant}-${fdt_board}.dtb
pxefile_addr_r=0x87100000
ramdisk_addr_r=0x82200000
rootpath=/srv/nfs
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; don;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${t
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efie
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlii
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${e
scriptaddr=0x87000000
serial#=07012355
serverip=192.168.10.1
setethupdate=if env exists ethaddr; then; else setenv ethaddr 00:14:2d:00:00:00; fi; tftpboot ${loadaddr} ${board}/flash_eth.img && source ${loadaddr}
setsdupdate=mmc rescan && setenv interface mmc && fatload ${interface} 0:1 ${loadaddr} ${board}/flash_blk.img && source ${loadaddr}
setup=setenv setupargs consoleblank=0 no_console_suspend=1 vt.global_cursor_default=0 console=${console},${baudrate}n8
setupdate=run setsdupdate || run setusbupdate || run setethupdate
setusbupdate=usb start && setenv interface usb && fatload ${interface} 0:1 ${loadaddr} ${board}/flash_blk.img && source ${loadaddr}
soc=mx6
splashimage=0x82000000
splashpos=m,m
ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs ubi.fm_autoconvert=1
ubiboot=run setup; setenv bootargs ${defargs} ${ubiargs} ${setupargs} ${vidargs} ${tdxargs}; echo Booting from NAND...; ubi part ubi &&ubi read ${kernel_addr_r} kernel}
ubifs_boot=env exists bootubipart || env set bootubipart UBI; env exists bootubivol || env set bootubivol boot; if ubi part ${bootubipart} && ubifsmount ubi${devnum}:$i
update_uboot=nand erase.part u-boot1 && nand write ${loadaddr} u-boot1 ${filesize} && nand erase.part u-boot2 && nand write ${loadaddr} u-boot2 ${filesize}
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=toradex
ver=U-Boot 2020.07-5.7.1-devel+git.1cbeecee44a8 (Jun 27 2022 - 13:27:02 +0000)
vidargs=video='mxsfb:1280x800M-18@60'
videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0
Environment size: 5909/131068 bytes
Colibri iMX6ULL #
Host IP address details:
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.11.138 netmask 255.255.255.0 broadcast 192.168.11.255
inet6 fe80::e7e6:659d:cf63:1491 prefixlen 64 scopeid 0x20<link>
ether e0:be:03:69:ae:56 txqueuelen 1000 (Ethernet)
RX packets 30805150 bytes 3920040160 (3.9 GB)
RX errors 0 dropped 8796 overruns 0 frame 0
TX packets 3201387 bytes 1365695647 (1.3 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 memory 0x4f800000-4f820000
When we run the command “bootcmd_dhcp”, I get the below response. Although the boot files are placed in the designated location, it is unable to find them.
Colibri iMX6ULL # run bootcmd_dhcp
BOOTP broadcast 1
DHCP client bound to address 192.168.11.196 (32 ms)
Using ethernet@20b4000 device
TFTP from server 192.168.10.1; our IP address is 192.168.11.196; sending through gateway 192.168.11.1
Filename 'boot.scr'.
Load address: 0x87000000
Loading: T T T T
The files are placed at the below location:
owner @owner -ThinkCentre-neo-50t-Gen-3:/$ ls -hl /srv/tftp/
total 6.9M
-rw-r--r-- 1 owner owner 5.7K Apr 28 17:49 boot.scr
-rw-r--r-- 1 owner owner 53K Apr 28 17:49 imx6ull-colibri-aster.dtb
-rw-r--r-- 1 owner owner 56K Apr 28 17:49 imx6ull-colibri-eval-v3.dtb
-rw-r--r-- 1 owner owner 53K Apr 28 17:49 imx6ull-colibri-iris.dtb
-rw-r--r-- 1 owner owner 53K Apr 28 17:49 imx6ull-colibri-iris-v2.dtb
-rw-r--r-- 1 owner owner 53K Apr 28 17:49 imx6ull-colibri-wifi-aster.dtb
-rw-r--r-- 1 owner owner 56K Apr 28 17:49 imx6ull-colibri-wifi-eval-v3.dtb
-rw-r--r-- 1 owner owner 53K Apr 28 17:49 imx6ull-colibri-wifi-iris.dtb
-rw-r--r-- 1 owner owner 53K Apr 28 17:49 imx6ull-colibri-wifi-iris-v2.dtb
drwxr-xr-x 2 owner owner 4.0K Apr 28 17:49 overlays
-rw-r--r-- 1 owner owner 14 Apr 28 17:49 overlays.txt
-rw-r--r-- 1 owner owner 6.5M Apr 28 17:49 zImage
TFTP configuration:
GNU nano 4.8 /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
DHCP Configuration: /etc/dhcp/dhcpd.conf
subnet 192.168.10.0 netmask 255.255.255.0 {
default-lease-time 86400;
max-lease-time 86400;
option broadcast-address 192.168.10.255;
option domain-name "colibri.net";
option domain-name-servers ns1.example.org;
option ip-forwarding off;
option routers 192.168.10.1;
option subnet-mask 255.255.255.0;
interface eno1;
range 192.168.10.32 192.168.10.254;
}
host eval {
filename "uImage";
fixed-address 192.168.10.2;
hardware ethernet 00:14:2d:6b:00:03;
next-server 192.168.10.1;
option host-name "colibri";
option root-path "192.168.10.1:/srv/nfs/rootfs,wsize=1024,rsize=1024,v3";
}
The NFS configuration:
GNU nano 4.8 /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
/srv/nfs 192.168.10.1/24(no_root_squash,no_subtree_check,rw,fsid=root)
Regards,
GNB