Changes between Version 9 and Version 10 of Internal/OpenFlow/QuantaSetup


Ignore:
Timestamp:
Jan 18, 2011, 9:15:48 PM (14 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/QuantaSetup

    v9 v10  
    7070
    7171=== 2.2.3. modifying boot parameters ===
     72''This section covers booting the switch using a manually loaded root filesystem from on-board flash. To use NFS, refer to the next section, 2.2.4.''
     73[[BR]][[BR]]
    7274In addition, you want to modify `flash_bootcmd` so that it tells the linux kernel to mount the root filesystem read-write:
    7375{{{
     
    8688[[BR]][[BR]]
    8789'''Note:''' The bootcmd parameter will be the proper value if the switch is restarted after u-boot is updated (a.k.a. after the 1st `copy` command). This, however, resets all of your networking variables, so you'd have to re-do the steps in 2.2.1. Basically, it is up to the tastes of whoever is re-imaging the switches to either manually set the bootcmd variable or reset all of the network parameters after reboot.
     90
     91=== 2.2.4. Using NFS with DHCP. ===
     92Reference article: http://www.openflow.org/wk/index.php/IndigoQuickStartLB4G#NFS
     93[[BR]][[BR]]
     94Here, we assume that the switch will be assigned an IP address via DHCP. It will use the assigned IP address for fetching necessary images from an NFS server, and once booted into Linux, the variable DEV_ADDR.
     95
     961. DHCP setup in u-boot: 
     97{{{
     98=> setenv ipaddr
     99=> setenv bootargs
     100=> setenv dhcp_boot dhcp
     101=> setenv autoload no
     102}}}
     103The fiirst two commands blank out any previously assigned IP addresses and boot arguments. The next two enable DHCP. You can test if DHCP works via the command `dhcp`:
     104{{{
     105=> dhcp
     106Speed: 1000, full duplex
     107BOOTP broadcast 1
     108Got error 4
     109DHCP client bound to address 10.50.250.6
     110}}}
     111
     1122. Set the startup script variable:
     113{{{
     114=> setenv dn_boot 'dhcp; setenv bootargs root=/dev/nfs ip=$ipaddr:$nfsip::$netmask:$hostname:$netdev \
     115console=$consoledev,$baudrate nfsroot=$nfsip:$rootpath rw DEV_ADDR=$ipaddr ETH0_IP=$ipaddr $extra_boot_args; \
     116bootm ffd00000'
     117}}}
     118`dhcp` invokes the DHCP client we configured earlier, which sets $ipaddr. Next, bootargs are set so that u-boot pulls the desired filesystem from a NFS . The next few parameters, `ip`,`console`,`$baudrate`, and `nfsroot` set the networking, standard I/O, and NFS parameters. 'rw' set mount parameters for the root FS. Both DEV_ADDR and ETH0_IP are variables used by Linux once the system boots into it; They are both set to the DHCP assigned IP address. $extra_boot_args can be set to additional variables using "`setenv extra_boot_args '<VARS>'`" (It's essentially a dummy variable). Finally, `bootm` is used to load the linux kernel stored on flash.   
     119
     1203. Set additional variables. Make sure all the variables required by the startup script are defined. You may also want the set the bootcmd to boot using the new script.
     121
     1224. Save your settings with `saveenv`.
    88123
    89124== 3. Configuration ==