Spiflashctl

From embeddedTS Manuals
Revision as of 15:10, 10 August 2011 by Mark (talk | contribs)

Overview

The userspace utility spiflashctl is the software layer that presents an NBD device to the NOR flash.


Usage

Help

Usage: spiflashctl [OPTION] ...                                                                                                                                                                                                                                                
Technologic Systems SPI flash manipulation.                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                               
General options:                                                                                                                                                                                                                                                               
  -R, --read=N            Read N blocks of flash to stdout                                                                                                                                                                                                                     
  -W, --write=N           Write N blocks to flash                                                                                                                                                                                                                              
  -x, --writeset=BYTE     Write BYTE as value (default 0)                                                                                                                                                                                                                      
  -i, --writeimg=FILE     Use FILE as file to write to flash                                                                                                                                                                                                                   
  -t, --writetest         Run write speed test                                                                                                                                                                                                                                 
  -r, --readtest          Run read speed test                                                                                                                                                                                                                                  
  -n, --random=SEED       Do random seeks for tests                                                                                                                                                                                                                            
  -z, --blocksize=SZ      Use SZ bytes each sdread/sdwrite call                                                                                                                                                                                                                
  -k, --seek=SECTOR       Seek to 512b sector number SECTOR                                                                                                                                                                                                                    
  -V, --verify            Verify reads and writes                                                                                                                                                                                                                              
  -e, --erase             Erase entire device                                                                                                                                                                                                                                  
  -d, --nbdserver=NBDSPEC Run NBD userspace block driver server                                                                                                                                                                                                                
  -Q, --stats             Print NBD server stats                                                                                                                                                                                                                               
  -I, --bind=IPADDR       Bind NBD server to IPADDR                                                                                                                                                                                                                            
  -l, --lun=N             Use chip number N                                                                                                                                                                                                                                    
  -P, --printmbr          Print MBR and partition table                                                                                                                                                                                                                        
  -M, --setmbr            Write MBR from environment variables                                                                                                                                                                                                                 
  -h, --help              This help                                                                                                                                                                                                                                            
                          
When running a NBD server, NBDSPEC is a comma separated list of                                                                                                                                                                                                                
devices and partitions for the NBD servers starting at port 7525.                                                                                                                                                                                                              
e.g. "lun0:part1,lun1:disc" corresponds to 2 NBD servers, one at port                                                                                                                                                                                                          
7525 serving the first partition of chip #0, and the other at TCP                                                                                                                                                                                                              
port 7526 serving the whole disc device of chip #1.