DESK-XZ7-L/General/Booting from NFS

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2024/01/29 DESK-XZ7-L 1.0.1 release



Booting from NFS[edit | edit source]

This configuration is very helpful during 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 have to be configured on the target and the VM itself has to be configured with 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 to which the target is connected.

Check and properly configure the items describe in VirtualBox Network Configuration

Target configuration[edit | edit source]

The IP address for the server and target should be configured: as 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 the ethernet interface of the target

For using the DVDK Virtual Machine, a static IP address configuration has been selected, so 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]

Booting via pxe protocol is a very simple and efficient way to save a lot of time to update. In this case, the following artifacts will be downloaded from our mirror server or built with Petalinux:

  • 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 decompressed in your host device directory /home/dvdk/nfsroot

For more information about boot and configuration files see DESK-XZ7-L-AN-0003: using PXE protocol for boot

Boot via NFS with Petalinux[edit | edit source]

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

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.