| 25 | === 2.2 updating u-boot === |
| 26 | This step is comprised of two steps: |
| 27 | 1. change network settings of switch |
| 28 | 2. update u-boot via tftp |
| 29 | |
| 30 | The network settings are hard-wired into the switch via environment variables. The default settings statically set the switch's IP to a 192.168.X.X address block, which you might want to change depending on your network setup. This can be done using command `setenv`. While all environment variables can be viewed with `printenv`, the four variables of our interest are: |
| 31 | |
| 32 | * ipaddr (switch's static ip, default 192.168.1.2) |
| 33 | * gatewayip (what the switch sees as default gw on its route table) |
| 34 | * serverip (who to talk to for services e.g. tftp) |
| 35 | * netmask (self-explanatory) |
| 36 | |
| 37 | These variables should correspond to those for the network you're attaching the switch to. In our case, we set the switch's Ip to 10.50.0.40, and cut out the hassle of setting the gateway IP by just directly pointing the switch to think the tftp server is the gateway: |
| 38 | |
| 39 | {{{ |
| 40 | => setenv gatewayip 10.50.0.42 |
| 41 | => setenv ipaddr 10.50.0.40 |
| 42 | => setenv netmask 255.255.0.0 |
| 43 | => setenv serverip 10.50.0.42 |
| 44 | => save |
| 45 | }}} |
| 46 | |
| 47 | once the variables are set, you can start copying the necessary files to the switch using `copy`: |
| 48 | {{{ |
| 49 | => copy -b tftp://10.50.0.42/u-boot.bin |
| 50 | => copy -r tftp://10.50.0.42/uInitrd2m |
| 51 | => copy -d tftp://10.50.0.42/LB9A.dtb |
| 52 | }}} |
| 53 | and reboot the switch. if all goes well, you should be at the Linux shell prompt once the thing starts up. |