Difference between revisions of "IMX8/Nitrogen8M/Yocto/Advanced image loading"

From RidgeRun Developer Connection
< IMX8‎ | Nitrogen8M‎ | Yocto
Jump to: navigation, search
Line 59: Line 59:
 
This command should be run each time you restart the board to boot from network.
 
This command should be run each time you restart the board to boot from network.
  
Example log:
 
 
<pre>
 
<pre>
 
</pre>
 
</pre>
 
<noinclude>{{IMX8/Foot|Nitrogen8M/Yocto/Installing_an_Image|Nitrogen8M/Android}}</noinclude>
 
<noinclude>{{IMX8/Foot|Nitrogen8M/Yocto/Installing_an_Image|Nitrogen8M/Android}}</noinclude>

Revision as of 23:31, 18 November 2018


NXP Partner Program Registered Vertical.jpg NXP Partner Program Horizontal.jpg
  Index  





Network Boot

When you are developing or debugging on your kernel or a file system application, network boot can be handy to avoid multiple flashes and to load new application versions without having to reboot the board each time.

Network boot configuration will load the kernel and device tree from n TFTP server and the root file system will be shared from host PC over NFS.

Host Setup

You will need a TFTP server and a NFS server, you can use the following instruction to set them up if you don't have them already.

  1. Setup a TFTP server
  2. Setup a NFS server

TFTP and NFS Configuration

For the following steps you should have a complete Yocto build for the Nitrogen8M as described at Building Yocto

1. Copy the kernel image and the kernel device tree blob from your Yocto build into the TFTP directory.

cd $YOCTO_BUILD_DIR/build/tmp/deploy/images/nitrogen8m

2. Copy the file system directory to a location exported by the NFS server.

cp -r $YOCTO_BUILD_DIR/tmp/work/nitrogen8m/$IMAGE/1.0-r0/rootfs ~/$NFS_ROOTFS

Target Setup

Finally you need to configure the Nitrogen8M u-boot to boot from network, as follows:

1. Power ON the Nitrogen8M board, and stop the boot up process on u-boot, (press a key during the boot up count down)

2. While in u-boot set the following environment variables

# You need to set <server_ip_address> and nfs_server_path to match your host setup
setenv tftpserverip <server_ip_address>
setenv nfsroot <nfs_server_path>
saveenv

Example:

3. Boot the board from network (still in u-boot) with the following command

run netboot

This command should be run each time you restart the board to boot from network.


Previous: Nitrogen8M/Yocto/Installing_an_Image Index Next: Nitrogen8M/Android