Jump to content

IMX8/Nitrogen8M/Yocto/Advanced image loading: Difference between revisions

no edit summary
No edit summary
Line 40: Line 40:
Finally you need to configure the Nitrogen8M u-boot to boot from network, as follows:
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
<syntaxhighlight lang=bash>
# 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
</syntaxhighlight>
Example:
<syntaxhighlight lang=bash>
# Nitrogen8m rootfs is at NFS_ROOTFS=/srv/nfs/nitrogen8m
setenv tftpserverip 192.168.1.60
setenv nfsroot /srv/nfs/nitrogen8m
saveenv
</syntaxhighlight>


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


<syntaxhighlight lang=bash>
run netboot
</syntaxhighlight>


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


<pre>
<pre>
Line 86: Line 63:
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
Line 204: Line 182:
</syntaxhighlight>
</syntaxhighlight>


== NFS Setup ==
On your host PC, copy the file system directory to a location exported by the NFS server.
<syntaxhighlight lang=bash>
NFS_ROOTFS=/srv/nfs/nitrogen8m
cp -r $YOCTO_BUILD_DIR/tmp/work/nitrogen8m/$IMAGE/1.0-r0/rootfs ~/$NFS_ROOTFS
</syntaxhighlight>
On your target board, follow the next steps:
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
<syntaxhighlight lang=bash>
# 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>
setenv fstype nfs
saveenv
</syntaxhighlight>
Example:
<syntaxhighlight lang=bash>
# Nitrogen8m rootfs is at NFS_ROOTFS=/srv/nfs/nitrogen8m
setenv tftpserverip 192.168.1.60
setenv nfsroot /srv/nfs/nitrogen8m
setenv fstype nfs
saveenv
</syntaxhighlight>
3. Boot the board from network (still in u-boot) with the following command
<syntaxhighlight lang=bash>
boot
</syntaxhighlight>
'''NOTE''':
<syntaxhighlight lang=bash>
# If you want to get back to your regular boot method you need to unset the fstype variable
setenv fstype
</syntaxhighlight>


<noinclude>{{IMX8/Foot|Nitrogen8M/Yocto/Installing_an_Image|Nitrogen8M/Android}}</noinclude>
<noinclude>{{IMX8/Foot|Nitrogen8M/Yocto/Installing_an_Image|Nitrogen8M/Android}}</noinclude>
866

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.