TFTP setting
Install tftp
sudo apt-get install tftp
Create the directory
mkdir /var/lib/tftpboot
Edit/Create the file vim /etc/xinetd.d/tftp
service tftp{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /var/lib/tftpboot -s
disable = no
}
Restart the service
sudo service xinetd restart
copy the required kernal Image to be booted in the tftpboot directory
sudo cp zImage /var/lib/tftpboot
NFS Setting
Install the Nfs package
sudo apt-get install nfs-kernel-server nfs-common portmap
Include the directory which is to be nfs mounted at the end of configuration file /etc/exports
/home/arun/develop/rootfs *(rw,sync,no_subtree_check,no_root_squash)
And then restart the service
sudo service nfs-kernel-server restart
UBOOT Setting
Set the IP address for the Host and target board
setenv ipaddr 192.168.1.11
setenv serverip 192.168.1.76
To check whether the connection is established with the host
ping 192.168.1.76
Set the bootargument in the uboot to boot from the nfs
setenv ip_full 192.168.1.11:192.168.1.76:192.168.1.1:255.255.255.0:arun:eth0:off
It corresponds to
ip=host-ip:server-ip:gw-ip:netmask:hostname:device:auto-configure
Next step is telling the kernel IP address of NFS server and what to mount for root file system
setenv rootpath 192.168.1.76:/home/arun/develop/rootfs
The final bootargs becomes
setenv bootargs console=ttyO0,115200n8 root=/dev/nfs rw nfsroot=${rootpath} ip=${ip_full}
Load the Kernel from the tftp server
tftp 80200000 zImage
where
80200000 → RAM Address to which image to be loaded
zImage → File name which will be loaded
Boot the image
bootz 80200000
Boot commands
bootm for uImage Kernel
bootz for zImage kernel
No comments:
Post a Comment