Sdctl
From embeddedTS Manuals
Overview
The utility sdctl allows manipulation of the FPGA SD core. This allows to you read/write data, and present a network block device to the OS.
Usage
Help
General options:
-R, --read=N Read N blocks of SD to stdout
-W, --write=N Write N blocks to SD
-x, --writeset=BYTE Write BYTE as value (default 0)
-i, --writeimg=FILE Use FILE as file to write to SD
-t, --writetest Run write speed test
-r, --readtest Run read speed test
-n, --random=SEED Do random seeks for tests
-o, --noparking Disable write parking optimization
-z, --blocksize=SZ Use SZ bytes each sdread/sdwrite call
-E, --erasehint[=SZ] Use erase hint write optimization
-b, --sdboottoken=TOK Use TOK as the boot token (to quicken init)
-a, --address=ADD Use ADD address instead of 0x13000000
-k, --seek=SECTOR Seek to 512b sector number SECTOR
-l, --lun=N Use N as numbered card slot (default 0)
-S, --scanluns Scan all LUNs for cards
-m, --nodma Dont use DMA
-d, --nbdserver=NBDSPEC Run NBD userspace block driver server
-I, --bind=IPADDR Bind NBD server to IPADDR
-Q, --stats Print NBD server stats
-P, --printmbr Print MBR and partition table
-M, --setmbr Write MBR from environment variables
-f, --foreground Run NBD server in foreground
-N, --nomultiwrite Use only single block write SD commands
-h, --help This help
Security/SD lock options:
-p, --password=PASS Use PASS as password
-c, --clear Remove password lock
-s, --set Set password lock
-u, --unlock Unlock temporarily
-e, --erase Erase entire device (clears password)
-w, --wprot Enable permanent write protect
When running a NBD server, NBDSPEC is a comma separated list of
devices and partitions for the NBD servers starting at port 7500.
e.g. "lun0:part1,lun1:disc" corresponds to 2 NBD servers, one at port
7500 serving the first partition of SD lun 0, and the other at TCP
port 7501 serving the whole disc device of SD lun #1.