Specifications
sections about the respective U-Boot commands.
7.5. Networked Operation with Root Filesystem
over NFS
This section will show how to boot the target into Linux with no more than U-Boot residing on it. For this we
will use the tftp command of U-Boot to transfer a Linux kernel and boot it with the NFS rootfilesystem
provided by the ELDK.
For this to work, we rely on some U-Boot environment variables to be set up correctly, i.e. the network
parameters, the names of files to transfer via tftp and last but not least some scripts easing the assembly of the
Linux command line. The whole process is packaged up into one script shown before we actually execute it.
Note that the Linux kernel will also output the command line used, so you can easily check if everything
worked like expected. The command line in this example passes at least the following information to the:
root=/dev/nfs rw: the root filesystem will be mounted using NFS, and it will be writable.•
nfsroot=192.168.1.1:/opt/eldk-5.2/armv5te/rootfs: the NFS server has the IP
address 192.168.1.1, and exports the directory /opt/eldk-5.2/armv5te/rootfs for our system to use as
root filesystem.
•
ip=192.168.20.38:192.168.1.1:192.168.1.1:255.255.0.0:m28::off: the target
has the IP address 192.168.20.38; the NFS server is 192.168.1.1; there is a gateway at IP
address 192.168.1.1; the netmask is 255.255.0.0 and our hostname is m28. The first ethernet
interface (eth0) willbe used, and the Linux kernel will immediately use this network configuration
and not try to re-negotiate it (IP autoconfiguration is off).
•
See Documentation/nfsroot.txt in you Linux kernel source directory for more information about these
parameters and other options.
7.5.1. Bootlog of tftp'd Linux kernel with Root Filesystem
over NFS
=> setenv bootfile /tftpboot/duts/m28/uImage
=> setenv rootpath /opt/eldk-5.2.1/armv5te/rootfs-lsb-sdk/
=> printenv net_nfs
net_nfs=run fdt_netload kernel_netload nfsargs addip addcons addmtd addmisc;bootm ${kernel_addr_r} - ${fdt_addr_r}
=> run net_nfs
Using FEC0 device
TFTP from server 192.168.1.1; our IP address is 192.168.20.33
Filename 'duts/m28/imx28-m28evk.dtb'.
Load address: 0x41000000
Loading: ##
done
Bytes transferred = 16547 (40a3 hex)
Using FEC0 device
TFTP from server 192.168.1.1; our IP address is 192.168.20.33
Filename '/tftpboot/duts/m28/uImage'.
Load address: 0x42000000
Loading: #################################################################
#################################################################
####################
done
Bytes transferred = 2191008 (216ea0 hex)
## Booting kernel from Legacy Image at 42000000 ...
7.5. Networked Operation with Root Filesystem over NFS 90