cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stevers
Visitor
Visitor
1,461 Views
Registered: ‎01-27-2020

NFS Boot (Zynq Ultrascale+ MPSoC)

Jump to solution

I'm working with a Zynq Ultrascale+ MPSoC SOM + Carrier board Petalinux system. I am able to mount an NFS directory from my Host machine onto my Zynq Ultrascale+ Target.

I have not been successful in NFS booting from this directory.

NFS MOUNT (IS WORKING)

My Host machine is a Ubuntu 18.04 system and I have followed instructions at https://help.ubuntu.com/community/SettingUpNFSHowTo to configure the NFS server as follows :

// kernel server package

  • $ sudo apt-get update
  • $ sudo apt-get install nfs-kernel-server
  • $ mkdir <NFS_SHARE_ROOT>/NFSshare
  • // create export directories
  • $ sudo mkdir -p /export/users
  • $ sudo chmod -R 777 /export/users

// bind mount NFS share directory

  • $ sudo mount --bind  <NFS_SHARE_ROOT>/NFSshare /export/users

// also place in fstab

  • $ sudo gedit /etc/fstab

// add this line

  •  <NFS_SHARE_ROOT>/NFSshare    /export/users   none    bind  0  0

// export directories

  • $ sudo gedit /etc/export

/export                        *(rw,fsid=0,insecure,no_subtree_check,async)

/export/users             *(rw,sync,insecure,no_root_squash,no_subtree_check)

  • $ sudo exportfs -ra

 

On my target, I power the system into uboot, set my host machines IP address, and tftp load FIT image.ub and FPGA system.bit from my host.

 

// client side

// power on board into uboot

  • uboot> setenv serverip <SERVER_IP>

// tftp boot the image.ub and system.bit

  • uboot> boot

 

After the kernel boots, I set the Targets IP address and mount the Hosts NFS directory.

// mount NFS server directory

  • client# ifconfig eth0 <TARGET_IP>
  • client# mkdir -p /home/root/nfs_share
  • client# mount -t nfs  <SERVER_IP>:/users /home/root/nfs_share

At this point the target has read access (from /home/root/nfs_share) to the Hosts NFS mounted directory.

 

NFS BOOT (NOT WORKING)

I have not been able to get the boot from NFS working. Below are the steps I have taken to attempt the NFS boot.

// follow instructions in ug1144 building the target image for boot from NFS directory

  • $ petalinux-config

Image Packaging Configuration ---> Root filesystem type --->.

  Select NFS as the RootFS type.

  Select Location of NFS root directory and set it to <NFS_SHARE_ROOT>/NFSshare

  • $ petalinux-config -c kernel

Networking support -> IP: kernel level configuration

-IP:DHCP support

-IP:BOOTP support

-IP:RARP support

File systems -> Network file systems -> Root file systems on NFS

  • $ petalinux-build

// results in NFS_BOOT_IMAGE (image.ub)

 

// populate NFS directory with rootfs

  • $ cd <NFS_SHARE_ROOT>/NFSshare
  • $ sudo pax -r -c <PL_PROJECT_DIR>/images/linux/rootfs.cpio

// reboot to uboot

// tftp boot target using the NFS_BOOT_IMAGE built for NFS booting (above)

  • uboot> setevn severip  <SERVER_IP>
  • uboot> setenv bootargs 'console=ttyPS0,115200n8 ip=dhcp root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.58:/export/users,port=2049,tcp rw loglevel=8 nfsrootdebug'
  • uboot> boot

The kernel tftp loads and get hung at :

  9.417500] IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.51

[    9.425150] IP-Config: Complete:

[    9.428377]      device=eth0, hwaddr=00:01:02:03:04:05, ipaddr=192.168.1.51, mask=255.255.255.0, gw=192.168.1.1

[    9.438452]      host=192.168.1.51, domain=, nis-domain=(none)

[    9.444275]      bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=     nameserver0=192.168.1.1

[    9.453826] macb ff0e0000.ethernet: gem-ptp-timer ptp clock unregistered.

[    9.461478] ALSA device list:

[    9.464444]   #0: DisplayPort monitor

 

Q: Do any of the steps above for Host NFS boot server configuration, Petalinux kernel build, or Target uboot configuration look incorrect?

 

Thanks for any tips.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
watari
Teacher
Teacher
1,433 Views
Registered: ‎06-16-2013

Hi @stevers 

 

Would you change NFS protocol version to 3 ?

 

Best regards,

View solution in original post

4 Replies
watari
Teacher
Teacher
1,434 Views
Registered: ‎06-16-2013

Hi @stevers 

 

Would you change NFS protocol version to 3 ?

 

Best regards,

View solution in original post

stevers
Visitor
Visitor
1,369 Views
Registered: ‎01-27-2020

Thanks @watari ,

I added nfs version info to bootargs and was able to boot from nfs hosted rootfs,

setenv bootargs='console=ttyPS0,115200n8 ip=dhcp root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.58:/export/users,port=2049,nfsvers=3,tcp rw loglevel=8 nfsrootdebug'

 

0 Kudos
pmoschov
Visitor
Visitor
710 Views
Registered: ‎04-28-2020

Hello gentlemen,

is it understood why v4 is not supported? Where the limitation comes from?

Best,

Paris

0 Kudos
greande
Explorer
Explorer
377 Views
Registered: ‎02-19-2018

Bump. I'd also like to know why v4 is not supported. This is still an issue in PetaLinux 2020.2.

 

Also, is there a way in petalinux-config to automatically append ,nfsvers=3 to the kernel bootargs so that I don't have to manually modify it each time?

0 Kudos