Difference between revisions of "DESK-XZ7-L/General/Booting from NFS"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "<section begin="History" /> {| style="border-collapse:collapse; " ! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History |- ! style="bo...")
 
Line 20: Line 20:
 
* runs a TFTP server.
 
* runs a TFTP server.
 
* has a proper subnet IP address
 
* has a proper subnet IP address
 
=== net_nfs configuration ===
 
  
 
[[DESK-XZ7-L]] Virtual Machine is properly configured for the TFTP and NFS debug.
 
[[DESK-XZ7-L]] Virtual Machine is properly configured for the TFTP and NFS debug.
Line 58: Line 56:
 
=== Boot via NFS with PXE protocol ===
 
=== Boot via NFS with PXE protocol ===
  
If you want boot your tareget via nfs with PXE protocol, you need to download from [https://mirror.dave.eu/desk-xz-l/desk-xz7-l-1.0.1/ mirror] or build with [[DESK-XZ7-L/Development/Creating_and_building_the_Petalinux_project | Petalinux]], the following artifact:
+
If you want saves a lot of time to update your kernel image or rootfs, you need to use boot via pxe protocol. In this case you need to download from [https://mirror.dave.eu/desk-xz-l/desk-xz7-l-1.0.1/ mirror] or build with [[DESK-XZ7-L/Development/Creating_and_building_the_Petalinux_project | Petalinux]], the following artifact:
  
 
* <code>zImage</code>, this file has to be installed in your host device directory for tftp server, configurated for <code>pxe</code>, for example <code>/tftpboot/bora/</code>
 
* <code>zImage</code>, this file has to be installed in your host device directory for tftp server, configurated for <code>pxe</code>, for example <code>/tftpboot/bora/</code>
Line 65: Line 63:
  
 
For more information about boot and configuration file see [[ DESK-XZ7-AN-0003:_using_PXE_protocol_for_boot | DESK-XZ7-AN-0003]]
 
For more information about boot and configuration file see [[ DESK-XZ7-AN-0003:_using_PXE_protocol_for_boot | DESK-XZ7-AN-0003]]
 +
 +
=== Boot via NFS with Petalinux ===
 +
 +
In case of NFS Boot, RootFS is mounted through the NFS but bootloader, while FSBL, bitstream, U-Boot and kernel can be downloaded using various methods, for example with JTAG, micro SD or tftp server.
 +
 +
In order to boot your target via NFS, you need to update your configuration file with the following command:
 +
 +
<pre>
 +
petalinux-config
 +
</pre>
 +
 +
Here below there are properties that you have to update:
 +
 +
* <code>CONFIG_SUBSYSTEM_ROOTFS_NFS</code>
 +
* <code>SUBSYSTEM_NFSROOT_DIR</code>
 +
* <code>CONFIG_SUBSYSTEM_NFSSERVER_IP</code>
 +
* <code>CONFIG_SUBSYSTEM_TFTPBOOT_DIR</code>
 +
 +
For more information about NFS Boot with Petalinux see [https://docs.xilinx.com/r/2021.2-English/ug1144-petalinux-tools-reference-guide/Configuring-NFS-Boot Petalinux guide].
  
 
<section end="Body" />
 
<section end="Body" />

Revision as of 14:24, 29 January 2024

History
Issue Date Notes
2024/01/25 DESK-XZ7-L 1.0.1 release



Booting from NFS[edit | edit source]

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

DESK-XZ7-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[edit | edit source]

The DESK-XZ7-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 describe in VirtualBox Network Configuration

Target configuration[edit | edit source]

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

u-boot=> setenv serverip 192.168.10.100
u-boot=> setenv ipaddr 192.168.10.56
u-boot=> setenv gatewayip 192.168.10.254
u-boot=> setenv netmask 255.255.255.0
u-boot=> setenv netdev eth0
  • serverip is the IP address of the host machine running the tftp/nfs server
  • ipaddr is the IP address of the target
  • gatewayip is the gateway address of the target
  • netmask is the netmask address of the target
  • netdev is the name of ethernet interface of the target

For using the DVDK Virtual Machine, a static IP address configuration has been selected, to the U-Boot variable ip_dyn has to be set to no:

u-boot=> setenv ip_dyn no

Boot via NFS with PXE protocol[edit | edit source]

If you want saves a lot of time to update your kernel image or rootfs, you need to use boot via pxe protocol. In this case you need to download from mirror or build with Petalinux, the following artifact:

  • zImage, this file has to be installed in your host device directory for tftp server, configurated for pxe, for example /tftpboot/bora/
  • system.dtb, this file has to be installed in your host device directory for tftp server, configurated for pxe, for example /tftpboot/bora/
  • rootfs.tar.gz, this file has to be decompress in your host device directory /home/dvdk/nfsroot

For more information about boot and configuration file see DESK-XZ7-AN-0003

Boot via NFS with Petalinux[edit | edit source]

In case of NFS Boot, RootFS is mounted through the NFS but bootloader, while FSBL, bitstream, U-Boot and kernel can be downloaded using various methods, for example with JTAG, micro SD or tftp server.

In order to boot your target via NFS, you need to update your configuration file with the following command:

petalinux-config

Here below there are properties that you have to update:

  • CONFIG_SUBSYSTEM_ROOTFS_NFS
  • SUBSYSTEM_NFSROOT_DIR
  • CONFIG_SUBSYSTEM_NFSSERVER_IP
  • CONFIG_SUBSYSTEM_TFTPBOOT_DIR

For more information about NFS Boot with Petalinux see Petalinux guide.