Boot From Network - Tftp And Nfs; Preparing Tftp And Nfs Setup - Kontron SMARC-sAMX8 User Manual

Table of Contents

Advertisement

Commands to set the load address of FDT (Flattened Device Tree) file and Kernel Image from MMC
partition mmcblk0p1 is as below
=> setenv mmcdev 0
=> setenv mmcpart 1
=> setenv loadfdt 'fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}'
=> setenv loadkernel 'fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} Image'
Command to set and save the Boot Command environment variable for Booting kernel and DTB from
and
is as given below
fdt_addr
=> setenv bootcmd 'mmc dev ${mmcdev}; run loadkernel; run mmcargs; run loadfdt; booti ${loadaddr} -
${fdt_addr};'
=> saveenv
=> boot
8.4. Boot from Network – TFTP and NFS
Network Boot is supported on the sAMX8 board from kernel images onwards. The Kernel image, dtb and other
firmware files can be transferred via TFTP to the board in Uboot environment and once the kernel starts it can
mount the root filesystem over NFS
Note: In this mode Boot Firmware and Uboot shall be loaded from boot media like SD card, eMMC or SPI and
thus the bootloader image needs to be flashed in one of these sources. Once Uboot starts stop at Uboot prompt
to setup the TFTP environment and proceed with TFTP boot
8.4.1.

Preparing TFTP and NFS setup

This section describes the steps to configure the Trivial File Transfer Protocol (TFTP) server and Network File
System (NFS) server on the host system. U-Boot shall download the Linux kernel image, HDMI firmware binaries
and dtb file using TFTP and then the kernel will mount the root file system from the host system NFS Root path
Preparing the TFTP Service
Install the required software in Host PC to setup TFTP.
=> sudo apt-get install tftpd-hpa
Start the tftpd-hpa service automatically by adding a command to /etc/rc.local file
=> vi /etc/rc.local
Before the exit 0 line edit below command then Save and Exit
=> service tftpd-hpa start
To control and check the status of the TFTP service from the command line use the below commands:
=> service tftpd-hpa restart
=> service tftpd-hpa status
Setup the TFTP Directories
Create the directory which will contain the kernel image and the device tree file.
Example:
=> mkdir -p /samx8-boot/kontron_smx8qm/tftp
Copy the kernel image, HDMI firmware binaries and the device tree blob file in this directory
=> cp Image /samx8-boot/kontron_smx8qm/tftp
=> cp kontron-samx8-qm.dtb /samx8-boot/kontron_smx8qm/tftp
=> cp hdmirxfw.bin /samx8-boot/kontron_smx8qm/tftp
=> cp hdmitxfw.bin /samx8-boot/kontron_smx8qm/tftp
Edit default tftp directory
=> vi /etc/default/tftpd-hpa
www.kontron.com
Kontron SMARC-sAMX8 - Rev. 1.2
loadaddr
// 59

Advertisement

Table of Contents
loading

Table of Contents