User Guide

Emcraft Systems
5. M2S-FG484 SOM Board Linux Software Set-up
5.1. U-Boot Environment
When the M2S-FG484 SOM board is reset, the Linux bootstrap will proceed to boot the U-
Boot firmware from the on-chip eNVM . Unless interrupted, U-Boot proceeds to load the
Linux bootable image from the SPI Flash into the LPDDR and passes control to the Linux
kernel entry point in LPDDR. Linux bootstraps the kernel, mounts a root filesystem in RAM
and enters the interactive shell command interface printing the following output to the serial
console:
U-Boot 2010.03-linux-cortexm-1.12.0 (Dec 06 2013 - 19:43:46)
CPU : SmartFusion2 SoC (Cortex-M3 Hard IP)
Freqs: CORTEX-M3=166MHz,PCLK0=83MHz,PCLK1=83MHz
Board: M2S-FG484-SOM Rev 1A, www.emcraft.com
DRAM: 64 MB
In: serial
Out: serial
Err: serial
Net: M2S_MAC
Hit any key to stop autoboot: 0
M2S-FG484-SOM>
U-boot makes use of the so-called environment variables to define various aspects of the
system functionality. Parameters defined by the U-boot environment variables include:
target IP address, target MAC address, address in RAM where a Linux bootable images will
be loaded, and many more. To examine the current settings of the environment variables,
run printenv from the U-Boot command interface.
U-Boot provides a command called saveenv that stores the up-to-date run-time environment
to the persistent storage, which will be the external Flash for the U-Boot configuration used
on the M2S-FG484 SOM board. You need to call saveenv any time when you want to copy
current settings of the environment variables to the persistent storage in Flash. This is how
you can write the current U-Boot environment to the external Flash:
M2S-FG484-SOM> saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
M2S-FG484-SOM>
5.2. Ethernet MAC Address
In Linux SmartFusion2, the MAC address of the Ethernet interface is defined by the ethaddr
U-Boot environment variable. The value of the MAC address can be examined from the U-
Boot command line monitor as follows:
M2S-FG484-SOM> printenv ethaddr
ethaddr=C0:B1:3C:88:88:88
M2S-FG484-SOM>
The M2S-FG484 SOM board comes with ethaddr set to a MAC address uniquely allocated for
the specific board. Given that each M2S-FG484 SOM board has a unique MAC address
allocated to it, there is no need to update the ethaddr variable (although it is possible to do
so).
The MAC address can be changed by modifying the ethaddr variable as follows:
M2S-FG484-SOM> setenv ethaddr C0:B1:3C:88:88:89
Don't forget to store your update in the persistent storage using saveenv so it is
remembered across resets and power cycles.
Linux SmartFusion2 8/11 Release 1.12.0
Emcraft Systems M2S-FG484 SOM Starter Kit Guide