32 | | * The image on the flash underlies a diagnostics test interface |
33 | | * The image on the cf card underlies !XorPlus, a switching firmware that allows the Quanta to be configured as a regular switch |
34 | | * The image on th cf card also allows access to a older version of the !OpenFlow interface, along with the system shell |
35 | | |
36 | | What follows next is a overview of the two images and u-boot. Note, usage of u-boot is covered in greater detail in [#III section 3]. |
37 | | |
38 | | === 2.1 The cf card image === |
| 32 | * The image on flash contains a diagnostics test interface |
| 33 | * The image on the cf card lets you access 3 main things: |
| 34 | 1. !XorPlus, a switching firmware that allows the Quanta to be configured as a regular switch |
| 35 | 1. an older version of the !OpenFlow interface, and |
| 36 | 1. a system shell |
| 37 | |
| 38 | What follows next is a quick primer for u-boot and an overview of the two images. Note, usage of u-boot is covered in greater detail in [#III section 3]. |
| 39 | |
| 40 | === 2.1 u-boot === #uboot |
| 41 | u-boot is the second-stage boot loader for the switch firmware. It has enough smarts to allow you to flash the switch and inspect/configure various boot options, and in the case of !OpenFlow, set parameters that the switch will use to connect to the controller. |
| 42 | |
| 43 | To enter the u-boot prompt, you have to interrupt the boot process when you see the u-boot banner.The easiest way to do this is to have a serial connection to the switch so you can see it boot. This can be set up using a RJ-45 to RS-232 cable. A Cisco cable will also work for this. Connect the RJ-45 end to the port labeled "Con" on a switch, and the other end to the PC. Next, start a session from a shell with kermit as root: |
| 44 | |
| 45 | {{{ |
| 46 | kermit -l /dev/ttyS0 |
| 47 | set carrier-watch off |
| 48 | set baud 115200 |
| 49 | connect |
| 50 | }}} |
| 51 | |
| 52 | Then power on/reboot the switch. If you see the U-Boot banner, you can stop the boot process by hitting any key. This should lead you to the '=>' u-boot prompt: |
| 53 | |
| 54 | {{{ |
| 55 | U-Boot 1.3.0 (Sep 9 2010 - 16:00:13) |
| 56 | |
| 57 | CPU: 8541, Version: 1.1, (0x80720011) |
| 58 | Core: E500, Version: 2.0, (0x80200020) |
| 59 | Clock Configuration: |
| 60 | CPU: 825 MHz, CCB: 330 MHz, |
| 61 | |
| 62 | ... |
| 63 | |
| 64 | Net: TSEC0, TSEC1 |
| 65 | IDE: Bus 0: OK |
| 66 | Device 0: Model: CF Card Firm: Ver2.35 Ser#: 14EF0707040600187736 |
| 67 | Type: Hard Disk |
| 68 | Capacity: 1923.9 MB = 1.8 GB (3940272 x 512) |
| 69 | Hit any key to stop autoboot: 0 |
| 70 | => |
| 71 | }}} |
| 72 | |
| 73 | u-boot is configured by creating and modifying environment variables. These can be anything from a single variable to a multi-line script of many variables, parameters, and flags. Several commands that are good to know for working with u-boot are: |
| 74 | |
| 75 | * `?` - list available commands |
| 76 | * `help` - get more information about a command |
| 77 | * `printenv` - list current environment variables |
| 78 | * `setenv` - make changes to / create new environment variables |
| 79 | * `saveenv` - save changes to environment variables |
| 80 | * `copy` - use tftp to copy files to flash |
| 81 | * `imls` - list images in flash |
| 82 | * `flinfo` - print flash memory contents |
| 83 | |
| 84 | [#III Section 3] will go into more detail. |
| 85 | |
| 86 | The next two sections quickly describe the two images found on a fresh switch. |
| 87 | |
| 88 | === 2.2 The cf card image === |
54 | | The last choice, "System shell", lets you access the base system using the ash shell. This last mode is useful if you need to access the cf card to test out a new image, or to check configuration scripts for !XorPlus or !OpenFlow. |
55 | | |
56 | | === 2.2 The flash image === |
57 | | This image can be loaded form the u-boot prompt with the command `run flash_bootcmd`. As far as I can tell, the sole purpose of this image is to provide a diagnostics test facility. The following prompt shows up after the standard boot-up procedures: |
| 104 | The last choice, "System shell", lets you access the base system using the `ash` shell, and is regular Linux as far as anyone cares. This last mode is useful if you need to access the cf card to test out a new image, or to check configuration scripts for !XorPlus or !OpenFlow. |
| 105 | |
| 106 | Any of these options can be chosen by entering a number and hitting <Enter> when the above list pops up. |
| 107 | |
| 108 | === 2.3 The flash image === |
| 109 | This image can be loaded form the u-boot prompt with the command `run flash_bootcmd`. As far as I can tell, the sole purpose of this image is to provide a diagnostics. The following prompt shows up after the standard boot-up procedures: |
75 | | |
76 | | === 2.3 u-boot === #uboot |
77 | | u-boot is the second-stage boot loader that comes with the switch. It has enough smarts to allow you to flash the switch and inspect/configure various boot options, and in the case of !OpenFlow, set parameters that the switch will use to connect to the controller. |
78 | | |
79 | | To enter the u-boot prompt, you have to interrupt the boot process when you see the u-boot banner.The easiest way to do this is to have a serial connection to the switch so you can see it boot. This can be set up using a RJ-45 to RS-232 cable. A Cisco cable will also work for this. Connect the RJ-45 end to the port labeled "Con" on a switch, and the other end to the PC. Next, start a session from a shell with kermit as root: |
80 | | |
81 | | {{{ |
82 | | kermit -l /dev/ttyS0 |
83 | | set carrier-watch off |
84 | | set baud 115200 |
85 | | connect |
86 | | }}} |
87 | | |
88 | | Then power on/reboot the switch. If you see the U-Boot banner, you can stop the boot process by hitting any key. This should lead you to the '=>' u-boot prompt: |
89 | | |
90 | | {{{ |
91 | | U-Boot 1.3.0 (Sep 9 2010 - 16:00:13) |
92 | | |
93 | | CPU: 8541, Version: 1.1, (0x80720011) |
94 | | Core: E500, Version: 2.0, (0x80200020) |
95 | | Clock Configuration: |
96 | | CPU: 825 MHz, CCB: 330 MHz, |
97 | | |
98 | | ... |
99 | | |
100 | | Net: TSEC0, TSEC1 |
101 | | IDE: Bus 0: OK |
102 | | Device 0: Model: CF Card Firm: Ver2.35 Ser#: 14EF0707040600187736 |
103 | | Type: Hard Disk |
104 | | Capacity: 1923.9 MB = 1.8 GB (3940272 x 512) |
105 | | Hit any key to stop autoboot: 0 |
106 | | => |
107 | | }}} |
108 | | |
109 | | u-boot is configured by creating and modifying environment variables. These can be anything from a single variable to a multi-line script of many variables, parameters, and flags. Several commands that are good to know for working with u-boot are: |
110 | | |
111 | | * `?` - list available commands |
112 | | * `help` - get more information about a command |
113 | | * `printenv` - list current environment variables |
114 | | * `setenv` - make changes to / create new environment variables |
115 | | * `saveenv` - save changes to environment variables |
116 | | * `copy` - use tftp to copy files to flash |
117 | | * `imls` - list images in flash |
118 | | * `flinfo` - print flash memory contents |
119 | | |
120 | | This list is by no means exhaustive, even with respect to the commands that we mention throughout this page. Which brings us to the next section, the u-boot primer. |