Chapter 5: bootloader functionalities, Configuring/save the environment variables, Reading the mii register – Lanner MR-320 User Manual
Page 17: Chapter 5, Bootloader functionalities

14
Bootloader Functionalities
Chapter 5
Network Application Platforms
Query the CompactFlash Card information (IDE
configuration information):
Reading the MII Register:
Reading/Writing the multichip mode switch
through the SMI interface
smi w smiaddr (: smi address, in this case of our board it is:
0x10) devaddr (in this case our PHY address is 0x0~0x3 and
the designated port address is 0x10~0x15) regaddr
or
smi r smiaddr (:smi address, in this case of our board it is:
0x10) devaddr (in this case our PHY address is 0x0~0x3
and the designated port address is 0x10~0x15regaddr
Chapter 5:
Bootloader Functionalities
The bootloader has several functionalities including
initializing the SDRAM and FLASH, downloading and
upgrading Bootloader, as well as loading and executing
the Operating System.
Here are some useful commands that can be used in the
Bootloader environment:
Configuring/Save the environment
variables:
Then, ping the Ethernet port of the system to check its
connectivity:
Query the Hard Disk information (IDE configura-
tion information):
We are setting the MR-320’s IP address as an example:
MR320# setenv serverip 192.168.0.72
MR320# setenv ipaddr 192.168.0.2
MR320# saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
MR320# ping 192.168.0.72
Interface 0 has 3 ports (RGMII)
Using octeth0 device
octeth0: Up 1000 Mbps Full duplex (port 0)
host 192.168.0.72 is alive
Use the following command to obtain the information of
the hard disk which is the CompactFlash card in our case:
MR320# ide info
IDE device 0: Model: SanDisk SDCFJ-512 Firm: HDX 4.03
Ser#: 012004E0208S4048
Type: Removable Hard Disk
Capacity: 488.7 MB = 0.4 GB (1000944 x 512)
MR320# fatls ide 0
15779752 vmlinux.64
485741 hw-speed-usb
10308320 vmlinux-adk15p.64
13031504 vmlinux_cn3005_ipsec.64
9956160 vmlinux-ipfwd.64
26 smm.conf
26 smm.default
67 firebase.default
67 firebase.conf
29910520 vmlinux_3010se.64
36108 cavmodexp.ko
11 file(s), 0 dir(s)
MR320# fatload ide 0 b000000 vmlinux.64
reading vmlinux.64
20368280 bytes read
MR320# smi r 0x10 0x0 0x0
MR320# smi w 0x10 0x0 0x0 0x0