A P P E N D I X  D

uBoot Software

This appendix describes the uBoot software on the Sun Netra CP3140 switch board and includes the following topics:


uBoot Overview

The uBoot software is the boot loader for the switch. Much like a BIOS, it brings the system to a usable state for the operating system to boot. It also performs a power-on self-test (POST) of the CPU subsystem. It can be used as a recovery console if the firmware image is corrupt or a firmware update fails. Several important environment variables are stored in uBoot, only some of which should ever be changed, namely noekey and baudrate.

uBoot Console

To get to a uBoot console, you must prevent the switch from booting into Linux. Shown here is the start of the switch boot sequence.


CPU:   400 MHz
DRAM:  128 MB
FLASH: 32 MB
Booting ...

You must press any key before Booting ... appears. There is only a one-second delay to press this key. Multiple key presses do not hurt.

You are presented with the uBoot prompt:


=>

TABLE D-1 shows the commands that you can execute at this point.


TABLE D-1 uBoot Commands

Command

Description

print

Shows the current environment variables.

set

When followed by an environment variable, changes that environment variable.

save

Writes the variables to flash.




Note - You must save if you want changes to persist through a reset.


E-Keying Control in uBoot

E-Keying is implemented as a Linux driver on the switch. The CPUs for both Base and Fabric interfaces have a direct connection to the IPMI controller that is used to communicate E-Keying messages. The CPU is interrupted when an E-Keying event occurs. The driver handles these interrupts and disables ports based on the information it receives. It disables them by doing the equivalent of a shutdown command at the CLI. This disables the port at the PHY level.

To disable E-Keying, the noekey environment variable is used. Simply list the ports to be disabled separated only by commas, or use the word all to disable E-Keying completely. For example:


set noekey 1,2,3,4
set noekey all

To re-enable E-Keying, enter the following command to clear the variable.


set noekey

After changing the environment variables, you must always save if you would like your change to persist though a reset.

Serial Baud Rate Control in uBoot

The serial baud rate can be changed from within FASTPATH, on the boot menu, or in uBoot. Only changes made in uBoot will persist through a reset. To change the baud rate in uBoot, the baudrate variable must be changed. Only standard baud rates are accepted.

To change the baud rate in uBoot, enter:


set baudrate 115200

After changing the environment variables, you must always save if you would like your change to persist though a reset.

Boot Sequence

Following is an example of the switch boot sequence.


CPU:   400 MHz
DRAM:  128 MB
FLASH: 32 MB
 
Booting ...
 
Boot Menu v1.0
 
Select startup mode.  If no selection is made within 5 seconds,
the Switch-Router Application will start automatically...
 
Switch-Router Startup -- Main Menu
 
1 - Start Switch-Router Application
2 - Display Utility Menu
Select (1, 2):
 
Copying Application to RAM...done.
 
Starting Application...
1 File: bootos.c Line: 243 Task: 111ca6f4 EC: 2863311530 (0xaaaaaaaa)
(0 d 0 hrs 0 min 17 sec)
Switch-Router Starting...
|PCI device BCM5695_B0 attached as unit 0.
\PCI device BCM5695_B0 attached as unit 1.
Switch-Router Started!
 
(Unit 1)>
User:

The switch should take approximately 20 seconds to boot to a console and be fully functional.


Boot Utility Menu

There is a utility menu that can be used before FASTPATH boots. As seen in the preceding section, during boot, a two-option menu is displayed for five seconds. This menu enables you to access to the utility menu if you press 2 and Return.

The following screen is displayed once you enter the boot utility menu.


Boot Menu v1.0
 
Switch-Router Startup -- Utility Menu
 
1  - Start Switch-Router Application
2  - Load Code Update Package using TFTP
3  - Display Vital Product Data
4  - Select Serial Speed
5  - Retrieve Error Log using TFTP
6  - Erase Current Configuration
7  - Erase Permanent Storage
8  - Select Boot Method
9  - BCM Debug Shell
10 - Reboot
 
Select option (1-10): 

Most of the options are self-explanatory based on their names, but some deserve further discussion.

TFTP Code Update From Utility Menu

FASTPATH can be updated from within FASTPATH itself, but you can also update it from this menu. The update image must be on a TFTP server. Supply the IP address of the TFTP server, the desired IP address of the board being updated, the gateway (if needed) and the file name. To obtain an IP address for the switch during this update, enter dhcp as the IP address. This begins the update and provides status information as it is updating.

Erase Current Configuration

The Erase Current Configuration option is the same as clear config from within FASTPATH. This option can be used if the switch is in an unknown state and you want to restore the default settings.

Erase Permanent Storage



caution icon Caution - You should never use this command.


The Erase Permanent Storage command completely erases FASTPATH, any log files, and any configurations. It does not erase uBoot or Linux. Updates can safely be installed without running this option, and configurations and log files are preserved.

Boot Method

The switch supports three boot methods:

The default option is booting from the Compact Flash card. See Network Booting for more information on network booting.

BCM Debug Shell



Note - This environment is provided as is, with no support.


The BCM Debug Shell option boots the Broadcom diag shell, currently SDK version 5.2.1. Several commands provided in this shell are not supported on the switch and do not work. This shell is provided mainly for debug, testing, and diagnostics purposes. This shell has many low-level tests and low-level register access. It can be used to check the integrity of particular boards. Help is provided in the shell with ?? and commands followed by a single question mark. Some commands of interest are SystemSnake, dsanity, TestList, and TestRun.

Note that ports are not numbered in the same order here as in FASTPATH. In the BCM diag shell, the ports are the actual port numbers of the chips. In FASTPATH, the port numbers have been abstracted to represent the ATCA channel numbers. TABLE D-2 maps the BCM diag shell numbers to the FASTPATH numbers.


TABLE D-2 BCM Diag Shell to FASTPATH Mapping

Port # in BCM Debug Shell

Base Port

Fabric Port

Chip 0 port 0

13

1

Chip 0 port 1

14

2

Chip 0 port 2

15

3

Chip 0 port 3

16

4

Chip 0 port 4

12

5

Chip 0 port 5

11

6

Chip 0 port 6

10

7

Chip 0 port 7

9

8

Chip 0 port 8

8

9

Chip 0 port 9

7

10

Chip 0 port 10

6

11

Chip 0 port 11

5

12

Chip 1 port 0

4

13

Chip 1 port 1

3

14

Chip 1 port 2

2

15

Chip 1 port 3

1

16

Chip 1 port 4

17

21

Chip 1 port 5

21

22

Chip 1 port 6

22

23

Chip 1 port 7

23

24

Chip 1 port 8

24

17

Chip 1 port 9

18

18

Chip 1 port 10

19

19

Chip 1 port 11

20

20



Network Booting

Booting from the network can be a very useful feature. It can make firmware updates as simple and quick as rebooting the boards, and it can be used to test new firmware without losing the old firmware. As described in Boot Method, network boot can be enabled or disabled from the boot utility menu. To perform a network boot, you must have a TFTP server with the firmware image and you must use the out-of-band management port.

The network boot supports DHCP to obtain an IP address. Simply use dhcp as the IP address when configuring network boot. The network boot uses the out-of-band management port to download the firmware image, and then frees it to be used as normal once FASTPATH boots. This enables an NMSto control the firmware revision on the switch as well as manage and control the switch functions.