i.MX setup TFTP and NFS
Using TFTP(Trivial File Transfer Protocol) and NFS(Network File System) to load kernel and rootfs can help to reduce operations of flash write efficiently, which can make you EVK board live longer…
This summary is based on Alexey‘s version, with some modifications according to my experiment.
TFTP
Install necessary tools
1 | sudo apt-get install xinetd tftpd tftp |
Setup TFTP
1 | mkdir -p /etc/xinetd.d/ |
create folder to store tftp files:
1 | sudo mkdir /srv/tftp |
restart tftpd by xinetd:
1 | sudo /etc/init.d/xinetd restart |
copy device trees/kernel image to tftp folder:
1 | cp Image /srv/tftp |
NFS
Install necessary tools
1 | sudo apt-get install nfs-kernel-server nfs-common portmap |
Setup NFS
Add below line at end of /etc/exports
1 | /home/ *(rw,insecure,no_root_squash,no_subtree_check) |
restart nfs server:
1 | sudo /etc/init.d/nfs-kernel-server restart |
create copy of your rootfs:
1 | cd ~ |
Notice: Seems long path of rootfs will cause rootfs mounting error, suggest copy your rootfs to a short path
Target
Interrupt board booting up then type into u-boot terminal:
1 | setenv nfsroot <path-to-your-rootfs> |
i.e.:
1 | setenv nfsroot /home/alex/imx8-evk-dummy/rootfs |