Changes between Initial Version and Version 1 of Internal/OpenFlow/QuantaOpenflow


Ignore:
Timestamp:
Feb 15, 2011, 7:57:37 PM (13 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/QuantaOpenflow

    v1 v1  
     1== Switching between Xorp+ (Regular switching) and Open flow ==
     2
     3In order to switch between the two firmware modes, the switch must be rebooted. Once rebooted you have to intercept the boot loader
     4countdown (otherwise it will boot it's default). Once the countdown in interrupted you will be in the Uboot PreOs. From here you can modify the boot varibles to swtich between the diffrent firmwares. A few usefull Uboot commands:
     5 * printenv - List current environment varibles
     6 * setenv - sets the env variable. Syntax is: setenv VARNAME 'VARVALUE'
     7 * saveenv - saves modifications
     8 * boot - Once env varibles are set to desired varibles, continues the boot process
     9
     10''' Complete list at the bottom '''
     11
     12The output of printenv currently looks like this:
     13{{{
     14=> printenv
     15bootdelay=5
     16baudrate=115200
     17loads_echo=1
     18ethaddr=00:E0:0C:00:00:FD
     19eth1addr=00:E0:0C:00:01:FD
     20eth2addr=00:E0:0C:00:02:FD
     21rootpath=/nfsroot
     22hostname=LB9A_X
     23loadaddr=4000000
     24ethact=TSEC0
     25ipaddr=10.50.0.93
     26gatewayip=10.50.0.42
     27netmask=255.255.0.0
     28serverip=10.50.0.42
     29bootfile=LB9A.dtb
     30filesize=1860
     31fileaddr=2000000
     32flash_bootcmd=setenv bootargs root=/dev/ram console=ttyS0,$baudrate rw DEV_ADDR=172.16.20.253 ETH0_IP=172.16.20.253; bootm ffd00000 ff000000 ffee0000
     33cfcard_bootcmd=setenv bootargs root=/dev/ram console=ttyS0,$baudrate rw; ext2load ide 0:1 0x1000000 /uImage;ext2load ide 0:1 0x2000000 /uInitrd2m;ext2load ide 0:1 0x400000 /LB9A.dtb;bootm 1000000 2000000 400000
     34bootcmd=run cfcard_bootcmd
     35stdin=serial
     36stdout=serial
     37stderr=serial
     38
     39Environment size: 742/8188 bytes
     40}}}
     41
     42The major varibles we'll be concerned with are:
     43 * flash_bootcmd - Open flow boot commands
     44 * cfcard_bootcmd - Xorp+ boot commands
     45 * bootcmd - Uboot consults this varible to determine what to boot
     46
     47The bootcmd variable is the one that dictates what actually gets booted. It is currently configured (this should be the default) to run the cfcard_bootcmd varible. This variable will be substituted with it contents, which are the commands required to boot from the cfcard into the xorp environment. We will change this from 'run cfcard_bootcmd' to 'run flash_bootcmd'.
     48
     49{{{
     50setenv bootcmd 'run flash_bootcmd'
     51}}}
     52
     53From here we can simply boot if we don't want to change the default boot config. Or we could do a saveenv if we require that default booting behavior be changed.
     54
     55----
     56
     57==== The complete uboot command list as per the ? command ====
     58{{{
     59?       - alias for 'help'
     60autoscr - run script from memory
     61base    - print or set address offset
     62bdinfo  - print Board Info structure
     63boot    - boot default, i.e., run 'bootcmd'
     64bootd   - boot default, i.e., run 'bootcmd'
     65bootm   - boot application image from memory
     66bootp   - boot image via network using BootP/TFTP protocol
     67cmp     - memory compare
     68coninfo - print console devices and information
     69copy    - download image file from tftp server
     70cp      - memory copy
     71crc32   - checksum calculation
     72dhcp    - invoke DHCP client to obtain IP/boot params
     73diskboot- boot from IDE device
     74echo    - echo args to console
     75erase   - erase FLASH memory
     76exit    - exit script
     77ext2load- load binary file from a Ext2 filesystem
     78ext2ls  - list files in a directory (default /)
     79flinfo  - print FLASH memory information
     80go      - start application at address 'addr'
     81help    - print online help
     82icrc32  - checksum calculation
     83ide     - IDE sub-system
     84iloop   - infinite loop on address range
     85imd     - i2c memory display
     86iminfo  - print header information for application image
     87imls    - list all images found in flash
     88imm     - i2c memory modify (auto-incrementing)
     89imw     - memory write (fill)
     90inm     - memory modify (constant address)
     91iprobe  - probe to discover valid I2C chip addresses
     92itest   - return true/false on integer compare
     93loadb   - load binary file over serial line (kermit mode)
     94loads   - load S-Record file over serial line
     95loady   - load binary file over serial line (ymodem mode)
     96loop    - infinite loop on address range
     97md      - memory display
     98mii     - MII utility commands
     99mm      - memory modify (auto-incrementing)
     100mtest   - simple RAM test
     101mw      - memory write (fill)
     102nfs     - boot image via network using NFS protocol
     103nm      - memory modify (constant address)
     104pci     - list and access PCI Configuration Space
     105ping    - send ICMP ECHO_REQUEST to network host
     106printenv- print environment variables
     107protect - enable or disable FLASH write protection
     108rarpboot- boot image via network using RARP/TFTP protocol
     109reset   - Perform RESET of the CPU
     110run     - run commands in an environment variable
     111saveenv - save environment variables to persistent storage
     112setenv  - set environment variables
     113sleep   - delay execution for some time
     114test    - minimal test like /bin/sh
     115tftpboot- boot image via network using TFTP protocol
     116version - print monitor version
     117}}}