VAR-SOM-MX6 Yocto Utilizing

From Variscite Wiki
Revision as of 14:39, 12 June 2017 by Eran (talk | contribs) (→‎Host)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Setup TFTP/NFS Yocto system

Running Yocto rootfs on Variscite board using TFTP & NFS


Make sure you installed NFS server:

$ sudo apt-get install nfs-kernel-server
$ cd ~
$ mkdir rootfs
$ cd rootfs
$ sudo tar xvf  ~/var-imx-yocto-krogoth/build_x11/tmp/deploy/images/var-som-mx6/fsl-image-gui-var-som-mx6.tar.bz2
$ sudo gedit /etc/exports

Add the following line (change <uname> to the name of user):

/home/<uname>/rootfs    *(rw,sync,no_root_squash,no_all_squash,no_subtree_check) 

exit & save

$ sudo /etc/init.d/nfs-kernel-server restart

Make sure you installed TFTP server:

$ sudo apt-get install xinetd tftpd tftp
$ ls /usr/sbin/in.tftpd
$ sudo gedit /etc/xinetd.d/tftp
service tftp
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo /etc/init.d/xinetd restart
$ sudo cp ~/var-imx-yocto-krogoth/build_x11/tmp/deploy/images/var-som-mx6/uImage /tftpboot
$ sudo cp ~/var-imx-yocto-krogoth/build_x11/tmp/deploy/images/var-som-mx6/uImage-imx*.dtb /tftpboot/
$ sudo rename 's/uImage-//' /tftpboot/uImage-*


Make sure you have a serial connection to the target.

Reset and hold the space bar. This will bring you to U-Boot command line.

$ setenv serverip
$ setenv nfsroot /home/<uname>/rootfs
(change <uname> to the name of user)
$ setenv bootcmd run netboot
$ saveenv 

You are all set. Pushing reset on the VAR-SOM-MX6 board will run your Yocto result file system.