Changes

Jump to: navigation, search

DESK-MX6UL-L/General/Booting from NFS

7,335 bytes added, 07:58, 21 April 2021
Created page with "{{subst:Booting from nfs | nome-som=AXEL ULite | kit-code=MX6UL | kit = mx6ul | kit-repo = desk-mx-l}}"
<section begin=History/>
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|X.Y.Z
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Month Year
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBD
|-
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|[TBD_link X.Y.Z]
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Month Year
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBD
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|...
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|...
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|...
|-
|}
<section end=History/>
<section begin=Body/>

==Booting from NFS==
This configuration is very helpful during the software development (both for kernel and applications). The kernel image is downloaded via TFTP while the root file system is remotely mounted via NFS from the host. It is assumed that the development host:
* is connected with the target host board through an Ethernet LAN
* exports the directory containing the root file system for the target through the NFS server
* runs a TFTP server.
* has a proper subnet IP address

=== net_nfs configuration ===

[[DESK-MX6UL-L]] Virtual Machine is properly configured for the TFTP and NFS debug.

In any case, some variables has to be configured on the target and the VM itself has to be configured for respect to the network environment.

== Host (Virtual Machine) configuration ==

The [[DESK-MX6UL-L]] Virtual Machine has the '''tftp''' and '''nfs''' services already running. Optionally, their configuration has to be changed according to the network configuration where the target is connected to.

Check and properly configure the items the following chapters: network adapter, nfs server

==== network adapter ====
The network adpater should be configured in '''bridge mode''' in order to allow the target to get the files from the VM


[[File:Network-bridge.png|500px]]


[[File:XELK VM Network.png|500px]]


then check or re-configure the Host IP address

<pre>
dvdk@vagrant:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:ed:54:80
inet addr:192.168.0.121 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feed:5480/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:342143 errors:0 dropped:0 overruns:0 frame:0
TX packets:267700 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:160784829 (160.7 MB) TX bytes:214001179 (214.0 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:201 errors:0 dropped:0 overruns:0 frame:0
TX packets:201 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:21929 (21.9 KB) TX bytes:21929 (21.9 KB)

dvdk@vagrant:~$
</pre>

==== nfs server ====
The NFS server should exports the correct file system directory (in our example)

<pre>
dvdk@vagrant:~$ cat /etc/exports
/home 0.0.0.0/0.0.0.0(rw,async,no_root_squash,no_subtree_check,crossmnt)
dvdk@vagrant:~$
</pre>

otherwise, change its configuration and then restart the nfs server:

<pre>
dvdk@vagrant:~$ sudo /etc/init.d/nfs-kernel-server restart
[sudo] password for dvdk:
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... [ OK ]
* Starting NFS kernel daemon [ OK ]
dvdk@vagrant:~$
</pre>

=== Target configuration ===

The IP address for server and target should be configured: an example (for a network subnet <code>192.168.0.x</code>)

<pre>
=> setenv serverip 192.168.0.120
=> setenv ipaddr 192.168.0.121
</pre>

* <code>serverip</code> is the IP address of the host machine running the tftp/nfs server
* <code>ipaddr</code> is the IP address of the target

The ''kernel'' and ''device tree'' files has to be selected

<pre>
=> setenv bootfile /tftpboot/{{{kit-repo}}}/''<uImage>''
=> setenv fdtfile /tftpboot/{{{kit-repo}}}/''>carrier.dtb>''
</pre>

finally, the ''root file system'' directory on the Virtual Machine should be configured for let the kernel to find the '''INIT'''

<pre>=> setenv rootpath /home/dvdk/{{{kit-repo}}}/rfs/</pre>

To run this configuration just issue the '''net_nfs''' command which firstly download the kernel and device tree using the tftp protocol

''<TBD: sostituire il dump con il boot da nfs del kit>''

<pre class="mw-collapsible mw-collapsed workstation-terminal">
=> run net_nfs
</pre>

----

[[Category:AXEL ULite]]
8,226
edits

Navigation menu