How to setup boot from network (NFS)?

Moderators: Oren.R, fradensky

Posts: 21
Joined: Wed Dec 31, 2014 12:26 pm

How to setup boot from network (NFS)?

Postby Shuki.Z » Thu Jan 01, 2015 8:17 am

In order to boot from network, please follow the instructions below:

On the Host (Tested on Ubuntu 12.04 LTS Host):
1) Build the kernel image (zImage) and the DTB (var-som-am33.dtb).
$ cp -a arch/arm/boot/dtb/var-som-am33.dtb /tftpboot/
$ cp -a arch/arm/boot/zImage /tftpboot/zImage-VAR-SOM-AM33-TESTING

2) Build the YOCTO rootfs filesystem and extract it to any directory to be mounted via NFS by the target VAR-SOM-AM33, for example:
$ sudo mkdir /ws/rootfs-yocto-daisy-am33
$ sudo tar xvf ./arago-tmp-external-linaro-toolchain/deploy/images/varsomam33/tisdk-rootfs-image-varsomam33.tar.bz2 -C /ws/rootfs-yocto-daisy-am33

3) Add to NFS exports:
$ sudo gedit /etc/exports
Add the following line to configure the NFS server to export the rootfs file-system to the network:
/ws/rootfs-yocto-daisy-am33 *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

4) Restart NFS daemon on the Host:
sudo /etc/init.d/nfs-kernel-server restart

On the target:
1) U-boot should be burned to the target NAND or on the SD-Card.
2) Connect eth0 port (100Mbit) to the network.
2) Boot the system and press a key to enter U-boot menu.
3) Configure the following parameters in U-boot and saveenv (no need to saveenv if it's just for testing a single boot):
$ set bootargs 'console=ttyO0,115200n8 root=/dev/nfs nfsroot=,nolock rw ip=dhcp vram=5M'
$ set bootcmd 'run netboot'
$ set bootfile zImage-VAR-SOM-AM33-TESTING
$ set fdtfile 'var-som-am33.dtb'
$ set netargs 'setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp vram=50M'
$ set rootpath '/ws/rootfs-yocto-daisy-am33
$ set serverip ''
$ saveenv

4) execute the following command in U-boot menu:
$ boot


Posts: 1
Joined: Tue Sep 22, 2015 12:03 am

Re: How to setup boot from network (NFS)?

Postby pavel_g » Thu Nov 19, 2015 5:21 pm

Hello Shuki,

We discovered that TI's AM335x-EVM Started Kit board has the ability to work as the Linux RNDIS device giving us the opportunity to flash it (using Uniflash) without actually network-boot from U-Boot.
Can VAR-AM33CustomBoard's USB OTG be used in the same manner - to act as the RNDIS?
Are we missing something?

That could help us working with the VAR-SOM-AM33 module we are using in production.
Thank you!


Return to “Yocto”

Who is online

Users browsing this forum: No registered users and 1 guest