Running Linux From Nfs - Kontron SMARC-sAMX8 User Manual

Table of Contents

Advertisement

Change the directory defined as TFTP_DIRECTORY with the host system directory which contains kernel
and device tree blob file
TFTP_DIRECTORY="
Restart the TFTP service if required
=> service tftpd-hpa restart
Preparing the NFS Service
Install the required software package on Host PC
=> sudo apt-get install nfs-kernel-server
The NFS service starts automatically. To control and check the status of NFS services use the below
commands
=> service nfs-kernel-server restart
=> service nfs-kernel-server status
Setup the NFS Directories
Create the directory which will contain the root file system
=> mkdir -p /samx8-boot/kontron_smx8qm/nfs
Copy the rootfs in this directory
=> sudo tar -jxvf kci-image-qt5-validation-smx-kci_smx8qm.tar.bz2 -C /samx8-boot/kontron_smx8qm/nfs
The NFS server requires /etc/exports to be configured correctly to access NFS filesystem directory to
specific hosts
=> vi /etc/exports
Then edit below line into the opened file
<" NFS DIRECTORY"> < BOARD IP>(rw,sync,no_root_squash,no_subtree_check)
Example: /samx8-boot/kontron_smx8qm/nfs 10.16.82.170(rw,sync,no_root_squash,no_subtree_check)
Now restart the NFS service
=> service nfs-kernel-server restart
8.4.2.

Running Linux from NFS

Power on the board and hit a key to stop the U-Boot from continuing. To boot from NFS, set the following environment
variables at the U-Boot prompt the below commands
=> setenv ipaddr 10.16.82.170
=> setenv serverip 10.16.82.57
=> setenv nfsroot /samx8-boot/kontron_smx8qm/nfs
=> setenv image < zImage name >
=> setenv fdt_file<dtb file name on host>
=> setenv netargs 'setenv bootargs console=ttyLP0,115200 root=/dev/nfs ip=dhcp
nfsroot=${serverip}:${nfsroot},v3,tcp'
=> setenv bootcmd run netboot
=> saveenv
Example-
Board IP address is
Server IP address is
zImage name is
Image
dtb file name is
kontron-samx8-qm.dtb
Restart the board it should now boot from the network
www.kontron.com
/samx8-boot/kontron_smx8qm/tftp
10.16.82.170
10.16.82.57
Kontron SMARC-sAMX8 - Rev. 1.2
"
// 60

Advertisement

Table of Contents
loading

Table of Contents