ARM® Linux Internet Platform - NFS boot up

Views
From ARM Linux Internet Platform
Jump to: navigation, search

Contents

[edit] Running the ARM Platform on target hardware with NFS root

This page describes the steps needed to boot the ARM Platform on the target hardware using NFS root.

One option is to use the build images to create the NFS root mount point. The second option is to use the Scratchbox target directly as the NFS root mount point. The second option enables easy and faster code development as the code with compiled Scratchbox can be immediately run on the device.

[edit] Basic NFS root setup

  • The host machine needs to have a nfsd installed
  • Use the release tar balls or create a new one with the Matrix tool.
  • Unpack the tar ball to a selected place with sudo rights to maintain the correct owner rights
  • Edit the /etc/exports to allow NFS mounting and restart the nfs service
  • The exports file might look like the following
    • Replace the 0.0.0.0 with the target IP address.
 <path to the rootfs> 0.0.0.0(sync,rw,no_root_squash,no_all_squash)

[edit] Preparing Scratchbox target for booting

The Scratchbox runs as a normal user and thus cannot make anything that needs root privileges. Therefore the target file system needs to be modified slightly as root user. The necessary script is provided by the generic config repository (which should already have been checked out under the project directory).

  • Make sure you have sudo access to chmod, chown, and mknod commands. Run the script to create some directories, set some file access rights and create the initial device nodes.
 generic/bin/prepare-nfsroot.sh /scratchbox/users/<username>/targets/Matrix_arm
  • NOTE! After this and especially after using the target as nfsroot, it will contain files owned by root. This can introduce some issues inside SB as everything is run as normal user there.
    • sb-menu's remove target wont work until the files has been chowned to normal user
    • Matrix' rootfs command can fail as it cannot read ssh keys etc.
  • Edit the /etc/exports file to allow mounting the scratchbox target and home directory

[edit] Setting up a separate directory for NFS booting

Since it may be a bit inconvenient to mess up the SB target you can also create the rootfs images normally, untar the rootstrap tar ball where-ever you like and run the prepare-nfsroot.sh script for that directory. Now it can be used as a NFS root filesystem but you loose the convenient way to just run "make install" inside the SB and have the files installed directly on the running hardware.

Development

Personal tools