VAR-SOM-MX6 Yocto Utilizing: Difference between revisions

From Variscite Wiki
(Created page with "{{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} =Utilizing the System = __toc__ = Running Yocto rootfs on Variscite board using tftp & nfs = == Host == Make sure yo...")
 
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{PageHeader|Setup TFTP/NFS Yocto system}}
{{DocImage|category1=VAR-SOM-MX6|category2=Yocto}}
{{DocImage|category1=VAR-SOM-MX6|category2=Yocto}}
=Utilizing the System =
__toc__
__toc__
= Running Yocto rootfs on Variscite board using tftp & nfs =
= Running Yocto rootfs on Variscite board using TFTP & NFS =


== Host  ==
== Host  ==


Make sure you installed NFS server:  
Make sure you installed NFS server:  
<pre>$ sudo apt-get install nfs-kernel-server
<pre>
$ cd ~/var-som-mx6-dora-v3
$ sudo apt-get install nfs-kernel-server
$ sudo mkdir rootfs
$ cd ~
$ mkdir rootfs
$ cd rootfs
$ cd rootfs
$ sudo tar xvf ../build_mx6q/tmp/deploy/images/vafsl-image-gui-varsommx6q.tar.bz2 </pre><pre>$ sudo gedit /etc/exports </pre>  
$ sudo tar xvf ~/var-imx-yocto-krogoth/build_x11/tmp/deploy/images/var-som-mx6/fsl-image-gui-var-som-mx6.tar.bz2
add:  
</pre>
<pre>
$ sudo gedit /etc/exports
</pre>  
Add the following line (change <uname> to the name of user):  


/home/&lt;uname&gt;/var-som-mx6-dora-v3/rootfs *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)  
/home/&lt;uname&gt;/rootfs   *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)  


exit &amp; save  
exit &amp; save  
<pre>$ sudo /etc/init.d/nfs-kernel-server restart</pre>  
<pre>
$ sudo /etc/init.d/nfs-kernel-server restart
</pre>  
Make sure you installed TFTP server:  
Make sure you installed TFTP server:  
<pre>$ sudo apt-get install xinetd tftpd tftp
<pre>
$ sudo apt-get install xinetd tftpd tftp
Verify:
Verify:
$ ls /usr/sbin/in.tftpd
$ ls /usr/sbin/in.tftpd
Line 37: Line 45:
$ sudo chmod -R 777 /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo /etc/init.d/xinetd restart
$ sudo /etc/init.d/xinetd restart
$ cp ~/var-som-mx6-dora/buildmx6q/tmp/deploy/images/varsommx6q/uImage /tftpboot</pre>  
</pre>
<pre>
$ 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-*
</pre>
 
== Target  ==
== Target  ==


make sure you have a serial connection to the target.  
Make sure you have a serial connection to the target.  


reset and hold the space bar. This will brink you to u-boot prompt
Reset and hold the space bar. This will bring you to U-Boot command line.
<pre>$ setenv serverip 192.168.1.188
<pre>
$ setenv ethaddr a8:cc:3d:d9:b8:f5
$ setenv serverip 192.168.1.188
$ setenv kernel uImage
$ setenv nfsroot /home/&lt;uname&gt;/rootfs
$ setenv nfsroot /home/&lt;uname&gt;/fsl-community-bsp/rootfs
(change <uname> to the name of user)
$ setenv bootcmd run bootcmd_net
$ setenv bootcmd run netboot
$ saveenv </pre>  
$ saveenv </pre>  
You are all set. Pushing reset on the VAR-SOM-MX6 board will run your Yocto result file system.<br>  
You are all set. Pushing reset on the VAR-SOM-MX6 board will run your Yocto result file system.<br>  
<br>
<br>

Latest revision as of 14:39, 12 June 2017

Setup TFTP/NFS Yocto system

Running Yocto rootfs on Variscite board using TFTP & NFS

Host

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
Verify:
$ 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-*

Target

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 192.168.1.188
$ 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.