Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
  • Groups
    • Research Collaboration and Enablement
    • DesignStart
    • Education Hub
    • Innovation
    • Open Source Software and Platforms
  • Forums
    • AI and ML forum
    • Architectures and Processors forum
    • Arm Development Platforms forum
    • Arm Development Studio forum
    • Arm Virtual Hardware forum
    • Automotive forum
    • Compilers and Libraries forum
    • Graphics, Gaming, and VR forum
    • High Performance Computing (HPC) forum
    • Infrastructure Solutions forum
    • Internet of Things (IoT) forum
    • Keil forum
    • Morello Forum
    • Operating Systems forum
    • SoC Design and Simulation forum
    • 中文社区论区
  • Blogs
    • AI and ML blog
    • Announcements
    • Architectures and Processors blog
    • Automotive blog
    • Graphics, Gaming, and VR blog
    • High Performance Computing (HPC) blog
    • Infrastructure Solutions blog
    • Innovation blog
    • Internet of Things (IoT) blog
    • Operating Systems blog
    • Research Articles
    • SoC Design and Simulation blog
    • Tools, Software and IDEs blog
    • 中文社区博客
  • Support
    • Arm Support Services
    • Documentation
    • Downloads
    • Training
    • Arm Approved program
    • Arm Design Reviews
  • Community Help
  • More
  • Cancel
Open Source Software and Platforms
Open Source Software and Platforms
Wiki NFS (remote/network userspace) using U-Boot
  • Help
  • Jump...
  • Cancel
  • About this wiki
  • Supported platforms
  • Obtaining support
  • +Arm Reference Platforms deliverables
  • +A-class platforms
  • +M-class platforms
  • +R-class platforms
  • +FPGA prototyping boards
  • -Open source software
    • +Linux/Android
    • +Trusted Firmware-A
    • Trusted Firmware-M
    • +EDK II UEFI
    • OP-TEE
    • -U-Boot
      • TFTP (remote/network kernel) using U-Boot
      • NFS (remote/network userspace) using U-Boot
    • Robotics
    • Mbed OS
    • +SCP

NFS (remote/network userspace) using U-Boot

Prerequisites

This tutorial assumes your host PC is running Ubuntu 14.04.1 LTS or later and is on the same local network as your development platform; for simplicity's sake we assume a DHCP server is available on the network, too.

If using Juno, ensure you are using the front ethernet port.

See this page for instructions on how to TFTP boot the Linux kernel using U-Boot.

Setting up an NFS server

Install the following packages on your host PC:

$ sudo apt-get update && sudo apt-get install nfs-kernel-server rpcbind

Switch to root user:

$ sudo -i

Create a root `/export/' directory that we will use to host the filesystem:

# mkdir /export/

Set the permissions of the hosted filesystem but adding the following line to file `/etc/exports':

/export/ *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

To avoid potential file permission problems we will avoid using NFSv4. Set the default to NFSv3 by editing `/etc/default/nfs-kernel-server' as shown:

# Number of servers to start up
# To disable nfsv4 on the server, specify `--no-nfs-version 4' here
#RPCNFSDCOUNT=8
RPCNFSDCOUNT="--no-nfs-version 4"

Then restart the `nfs-kernel-server' service:

# service nfs-kernel-server restart

Now check that `portmapper', `nfs', and `mountd' are all running on both `tcp' and `udp':

# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp     111  portmapper
    100000    3   tcp     111  portmapper
    100000    2   tcp     111  portmapper
    100000    4   udp     111  portmapper
    100000    3   udp     111  portmapper
    100000    2   udp     111  portmapper
    100024    1   udp   43672  status
    100024    1   tcp   56293  status
    100003    2   tcp    2049  nfs
    100003    3   tcp    2049  nfs
    100003    4   tcp    2049  nfs
    100227    2   tcp    2049
    100227    3   tcp    2049
    100003    2   udp    2049  nfs
    100003    3   udp    2049  nfs
    100003    4   udp    2049  nfs
    100227    2   udp    2049
    100227    3   udp    2049
    100021    1   udp   53079  nlockmgr
    100021    3   udp   53079  nlockmgr
    100021    4   udp   53079  nlockmgr
    100021    1   tcp   50750  nlockmgr
    100021    3   tcp   50750  nlockmgr
    100021    4   tcp   50750  nlockmgr
    100005    1   udp   50127  mountd
    100005    1   tcp   48215  mountd
    100005    2   udp   49557  mountd
    100005    2   tcp   46457  mountd
    100005    3   udp   36349  mountd
    100005    3   tcp   54121  mountd

Next extract your desired root filesystem into the `/export/' directory, optionally placing it in a subdirectory. In this example we extracted the root filesystem to `/export/juno/fs/'.

U-Boot NFS

Power up the Juno board and interrupt U-Boot's default boot selection:

The default boot selection will start in   3 seconds

Save your host PC's IP address to the `serverip' environment variable:

VExpress64# set serverip <host_pc_ip_address>
VExpress64# saveenv

Next modify U-Boot's boot args to find the root filesystem using NFS:

VExpress64# set origbootargs "$bootargs"
VExpress64# set bootargs "console=ttyAMA0,115200n8 root=/dev/nfs ip=dhcp nfsroot=${serverip}:/export/juno/fs rw rootwait earlyprintk=pl011,0x7ff80000 debug"
VExpress64# saveenv

Then reboot the Juno; it should find the root filesystem using NFS.

This is a persistent change. To revert back to the default boot behaviour:

VExpress64# set bootargs "$origbootargs"
  • Linaro
  • U-Boot
  • Share
  • History
  • More
  • Cancel
Related
Recommended