48 | | As seen in the above "screenshot", XorPlus will be automatically loaded after 10 seconds, giving you the standard switch CLI. !XorPlus is a full-fledged switch configuration interface; Documentation for using XorPlus can be downloaded from the [http://www.pica8.org/documents/user-guide Pica8 website]. |
49 | | |
50 | | The second choice, "!OpenFlow", gives you an outdated version of the Indigo interface, the "pure OpenFlow" switch firmware. The interface is essentially a standard Linux shell, plus !OpenFlow facilities such as `of-bcm-cli`. |
51 | | |
52 | | 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 contents (e.g. to try different versions of firmware without erasing stuff/dealing with flashing the switch). |
53 | | |
| 50 | As seen in the above "screenshot", !XorPlus will be automatically loaded after 10 seconds, giving you the standard switch CLI. !XorPlus is a full-fledged switch configuration interface; Documentation for using !XorPlus can be downloaded from the [http://www.pica8.org/documents/user-guide Pica8 website]. |
| 51 | |
| 52 | The second choice, "!OpenFlow", gives you an outdated version of the Indigo interface, the "pure !OpenFlow" switch firmware. The interface is essentially a standard Linux shell, plus !OpenFlow facilities such as `of-bcm-cli`. |
| 53 | |
| 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. |
162 | | * `console=ttyS0` - set console |
163 | | * `$baudrate` - use the parameters specified in the variable "baudrate" |
164 | | The parameters that follow the semicolon after `$baudrate` differ a bit for the two variables. For the cfcard entry the `ext2load` cammands specifies where to fetch the kernel, ramdisk, and device tree files from, and finally issues the command `bootm` to load the image. |
165 | | |
| 170 | * `console=ttyS0` - set output to /dev/ttyS0 |
| 171 | * `$baudrate` - use the parameters specified in the variable "baudrate," which we can see above is set to 115200 (baud) |
| 172 | |
| 173 | The parameters that follow the semicolon after `$baudrate` differ a bit for the two variables. For the cfcard_bootcmd entry the `ext2load` commands specifies where to fetch the kernel, ramdisk, and device tree files from, respectively. The specific syntax for each `ext2load` command is: |
| 174 | |
| 175 | `ext2load [interface] [memory address]` |
| 176 | |
| 177 | What is really important here are the memory location values. For the cf card, the values should be: |
| 178 | * 0x1000000 for kernel image |
| 179 | * 0x2000000 for filesystem |
| 180 | * 0x400000 for the device tree |
| 181 | |
| 182 | The same follows for the flash image, with ffd00000, ff00000, and ffee0000 being the address locations where the kernel, ramdisk, and device tree files always begin, respectively. The current version of u-boot has some tools for inspecting flash memory. These will be discussed in the [#ts troubleshooting section]. |
| 183 | |
| 184 | Both script variables end with the `bootm` command, which loads the program files from the memory locations given by `ext2load` in the cf card or implied in the flash. |
| 185 | |
| 186 | === 3.2 modifying the environment variables list === |
| 187 | `setenv` allows you to modify and create environment variables. In general: |
| 188 | |
| 189 | * `setenv [name]`, where [name] is new, creates a new variable with that name. |
| 190 | * `setenv [name]`, where [name] already exists, wipes out its previous parameters. |
| 191 | * `setenv [name] [parameters]` sets parameters for the variable [name]. |
| 192 | |
| 193 | ''Long parameters.'' For variables with whitespaces in its parameters (e.g. "script variables" like flash_bootcmd), the parameters have to be surrounded by single quotes to let u-boot know that everything is part of a single script. For example, to create and configure the variable dn_boot, we'd type this at the command line: |
| 194 | |
| 195 | {{{ |
| 196 | setenv dn_boot 'dhcp; nfs ff000000 $nfsip:$rootpath/uInitrd2m; setenv bootargs root=/dev/ram console=ttyS0,$baudrate DEV_ADDR=$ipaddr ETH0_IP=$ipaddr $extra_boot_args rw; bootm ffd00000 ff000000 ffee0000' |
| 197 | }}} |
| 198 | |
| 199 | Note the single quotes before `dhcp` and after `ffee0000`. Another important thing about long parameters is that they cannot contain newlines; The whole command must be typed in a single line. |
| 200 | |
| 201 | === 3.3 Some important variables === |
| 202 | |
| 203 | === 3.4 troubleshooting === #ts |