Setup NFS boot

From SolidRun CuBox Wiki
Jump to: navigation, search

Contents

Setup NFS Boot

References:

Configuring a NFS Server http://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.8.
u-Boot NFS - http://www.denx.de/wiki/view/DULG/LinuxNfsRoot
Environment vars for NFS -http://www.denx.de/wiki/view/DULG/UBootEnvVariables

Environment variables to use with NFS

  • ipaddr IP address used for the CuBox
  • serverip IP address of the NFS server
  • netmask subnet mask
  • gatewayip IP address of the Gateway (Router) to use
  • rootpath Pathname of the root filesystem on the NFS server
  • bootaddr the memory address to load the uImage

boot settings

Default CuBox settings:
setenv cubox_bootargs 'console=ttyS0,115200n8 vmalloc=384M video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0'

Required Kernel parameters:
setenv nfs_bootargs 'root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:dpnfs:eth0:off'

Optional Kernel parameters:
nfsrootdebug

Setup the bootargs
setenv nfs_setup 'setenv bootargs ${cubox_bootargs} ${nfs_bootargs}'
run nfs_setup


Loading the kernel with NFS
mw ${bootaddr} 0 1000;nfs ${bootaddr} ${serverip}:${rootpath}/boot/uImage

Booting the kernel with NFS
bootm ${bootaddr}

altogether

set ipaddr 192.168.0.222
set serverip 192.168.0.22
set netmask 255.255.255.0
set gatewayip 192.168.0.1
set rootpath /srv/cubox
set bootaddr 0x200000
setenv cubox_bootargs 'console=ttyS0,115200n8 vmalloc=384M video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0'
setenv nfs_bootargs 'root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:dpnfs:eth0:off nfsrootdebug'
setenv nfs_setup 'setenv bootargs ${cubox_bootargs} ${nfs_bootargs}'
run nfs_setup
mw ${bootaddr} 0 1000;nfs ${bootaddr} ${serverip}:${rootpath}/boot/uImage
bootm ${bootaddr}
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox