9
0
Fork 0
barebox/commands/Kconfig

1988 lines
41 KiB
Plaintext

config REGINFO
bool
config COMMAND_SUPPORT
bool
depends on !SHELL_NONE
default y
config HAS_POWEROFF
bool
default n
if COMMAND_SUPPORT
config COMPILE_DIGEST
tristate
select DIGEST
help
Turns on compilation of digest.c
config COMPILE_MEMORY
bool
help
Turns on compilation of mem.c
menu "Commands"
menu "Information"
config CMD_AT91CLK
bool "at91clk"
default y
depends on ARCH_AT91
help
List clock configuration.
config CMD_AT91MUX
bool "at91mux"
default y
depends on ARCH_AT91
help
List MUX configuration
Usage: at91mux [-pn]
Dump current MUX configuration. If a BANK or PIN has been
specified dump pin details.
Options:
-p PIN pin number
-b BANK bank number
config CMD_ARM_CPUINFO
bool "cpuinfo command"
default y
depends on ARM
help
Show info about ARM CPU
Example:
implementer: ARM
architecture: v7
core: Cortex-A9 r2p10
I-cache: 512 bytes (linelen = 64)
D-cache: 8192 bytes (linelen = 8)
Control register: M C W P D L I V RR DT IT U XP
config CMD_DEVINFO
tristate
default y
prompt "devinfo"
help
Show information about devices and drivers.
devinfo [DEVICE]
If called without arguments, devinfo shows a summary of the known
devices.
If called with a device path being the argument, devinfo shows more
default information about this device and its parameters.
config CMD_DRVINFO
tristate
default y
prompt "drvinfo"
help
List compiled-in device drivers and the devices they support.
config CMD_HELP
tristate
default y
prompt "help"
help
Without arguments, lists all all commands. With an argument, print help
about the specified command. If the argument is 'all', then output help
for all commands.
Options:
-a output help on all commands
-v verbose
config LONGHELP
bool
depends on !SHELL_NONE && CMD_HELP
prompt "Long help texts"
help
This make the "help" command of barebox spit out much more information,
but (obviously) also makes barebox bigger.
Example with CONFIG_LONGHELP:
-----------------------------
barebox:/ help ls
ls - list a file or directory
Usage: ls [-lCR] [FILEDIR...]
List information about the specified files or directories.
Options:
-l long format
-C column format (opposite of long format)
-R list subdirectories recursively
-----------------------------
And now without CONFIG_LONGHELP:
-----------------------------
barebox:/ help ls
ls - list a file or directory
Usage: ls [-lCR] [FILEDIR...]
-----------------------------
With my specific .config, the binary size increased from 461500 to 481980.
config CMD_IOMEM
tristate
prompt "iomem and ioport"
help
Show information about iomem/ioport usage. Pendant to
'cat /proc/iomem' and 'cat /proc/ioports' under Linux.
config CMD_MEMINFO
tristate
prompt "meminfo"
help
Print info about barebox' memory allocation. Example:
max system bytes = 282616
system bytes = 282616
in use bytes = 274752
config CMD_ARM_MMUINFO
bool "mmuinfo command"
depends on CPU_V7
help
Say yes here to get a mmuinfo command to show some
MMU and cache information using the cp15 registers.
Example:
PAR result for 0x00110000:
privileged read: 0x00110090
Physical Address [31:12]: 0x00110000
Reserved [11]: 0x0
Not Outer Shareable [10]: 0x0
Non-Secure [9]: 0x0
Impl. def. [8]: 0x0
Shareable [7]: 0x1
Inner mem. attr. [6:4]: 0x1 (0b001 Strongly-ordered)
Outer mem. attr. [3:2]: 0x0 (0b00 Non-cacheable)
SuperSection [1]: 0x0
Failure [0]: 0x0
privileged write: 0x00110090
Physical Address [31:12]: 0x00110000
Reserved [11]: 0x0
Not Outer Shareable [10]: 0x0
Non-Secure [9]: 0x0
Impl. def. [8]: 0x0
Shareable [7]: 0x1
Inner mem. attr. [6:4]: 0x1 (0b001 Strongly-ordered)
Outer mem. attr. [3:2]: 0x0 (0b00 Non-cacheable)
SuperSection [1]: 0x0
Failure [0]: 0x0
config CMD_REGINFO
depends on HAS_REGINFO
select REGINFO
tristate
prompt "reginfo"
help
Print register information.
config CMD_REGULATOR
bool
depends on REGULATOR
prompt "regulator command"
help
the regulator command lists the currently registered regulators and
their current state.
config CMD_LSPCI
bool
depends on PCI
prompt "lspci command"
default y
help
The lspci command allows to list all PCI devices.
config CMD_VERSION
tristate
default y
depends on BANNER
prompt "version"
help
Pring barebox version. Example:
barebox 2014.05.0-00142-gb289373 #177 Mon May 12 20:35:55 CEST 2014
# end Information commands
endmenu
menu "Boot"
# TODO: isn't a command
config FLEXIBLE_BOOTARGS
bool
prompt "flexible Linux bootargs generation"
depends on CMD_GLOBAL
help
Select this to get a more flexible bootargs generation. With this
option the bootargs are concatenated together from global variables
beginning with 'global.linux.bootargs.' and 'global.linux.mtdparts.'
This allows for more flexible scripting since with it it's possible
to replace parts of the bootargs string without reconstructing it
completely.
config CMD_AT91_BOOT_TEST
bool "at91_boot_test"
depends on ARCH_AT91
help
allow to upload a boot binary to SRAM and execute it.
Useful to test bootstrap or barebox lowlevel init.
Usage: at91_boot_test [-js] FILE
Options:
-j ADDR jump address
-s SRAM SRAM device (default /dev/sram0)
config CMD_BOOT_ORDER
tristate
depends on ARCH_OMAP4
prompt "boot_order"
help
Set warm boot order (the next boot device on a warm reset).
Usage: boot_order DEVICE...
Each device can be one of:
xip xipwait nand onenand mmc1 mmc2_1 mmc2_2 uart usb_1 usb_ulpi usb_2
config CMD_BOOT
tristate
select BOOTM
prompt "boot"
help
Select this for booting based on scripts. Unlike the bootm command which
can boot a single image this command offers the possibility to boot with
scripts (by default placed under /env/boot/). This command iterates over
multiple scripts until one succeeds.
Usage: boot [-vdlmt] [BOOTSRC...]
BOOTSRC can be:
- a filename under /env/boot/
- a full path to a boot script
- a device name
- a partition name under /dev/
- a full path to a directory which
-- contains boot scripts, or
-- contains a loader/entries/ directory containing bootspec entries
Multiple bootsources may be given which are probed in order until
one succeeds.
Options:
-c crc check uImage data
-d dryrun: check data, but do not run
-f load images even if type is undetectable
-r INITRD specify an initrd image
-L ADDR specify initrd load address
-a ADDR specify os load address
-e OFFS entry point to the image relative to start (0)
-o DTS specify open firmware device tree
-v verbose
config CMD_BOOTM
tristate
default y
select BOOTM
select CRC32
select UIMAGE
select UNCOMPRESS
select FILETYPE
select GLOBALVAR
prompt "bootm"
help
Boot an application image
Usage: bootm [-cdaeo] IMAGE
Options:
-c crc check uImage data
-d dryrun. Check data, but do not run
-a ADDR specify os load address
-e OFFS entry point to the image relative to start (0)
-o DTS specify device tree
config CMD_BOOTM_SHOW_TYPE
bool
depends on CMD_BOOTM
prompt "show image information"
help
Displays some tags from the uImage:
- OS type
- architecture,
- type
- compression method.
config CMD_BOOTM_VERBOSE
bool
prompt "verbose support"
depends on CMD_BOOTM
help
Adds the verbose (-v switch) command line option.
config CMD_BOOTM_INITRD
bool
prompt "initial RAM disk (initrd) support"
depends on CMD_BOOTM
help
Adds support for initial RAM disk and this two command line options:
-r INITRD specify an initrd image
-L ADDR specify initrd load address
config CMD_BOOTM_OFTREE
bool
depends on CMD_BOOTM
select OFTREE
prompt "device tree (oftree) support"
help
Add support to pass a device tree (a.k.a Open Firmware Tree, oftree). Adds
this command line option:
-o DTS specify device tre
config CMD_BOOTM_OFTREE_UIMAGE
bool
prompt "support passing device tree (oftree) uImages"
depends on CMD_BOOTM_OFTREE
help
Support using oftree uImages. Without this only raw oftree
blobs can be used.
config CMD_BOOTM_AIMAGE
bool
prompt "Android image support"
depends on CMD_BOOTM && ARM
help
Support using Android Images.
config CMD_BOOTU
tristate
default y
depends on ARM
prompt "bootu"
help
Boot into already loaded Linux kernel, which must be raw (uncompressed).
Usage: bootu ADDRESS
config CMD_BOOTZ
tristate
depends on ARM
prompt "bootz"
help
Boot Linux zImage
Usage: bootz FILE
config CMD_LINUX16
tristate
depends on X86
default y if X86
prompt "linux16"
help
Usage: linux16 [-v VESAMODE] FILE
Load kernel from FILE and boot on x86 in real-mode.
Only kernel images in bzImage format are supported by now.
For the video mode refer the Linux kernel documentation
'Documentation/fb/vesafb.txt' for correct VESA mode numbers. Use 'ask'
instead of a number to make Linux prompt for options.
Options:
-v VESAMODE set VESAMODE
config CMD_GO
tristate
prompt "go"
help
Start application at address or file
Usage: go ADDR [ARG...]
Start application at ADDR passing ARG as arguments.
If addr does not start with a digit it is interpreted as a filename
in which case the file is memmapped and executed
config CMD_LOADB
depends on !CONSOLE_NONE
select CRC16
tristate
prompt "loadb"
help
Load binary file over serial line (Kermit)
Usage: loadb FILE
Options:
-f FILE download to FILE (default image.bin)
-o OFFS destination file OFFSet (default 0)
-b BAUD baudrate for download (default: console baudrate
-c create file if not present
config CMD_LOADS
depends on !CONSOLE_NONE
tristate
prompt "loads"
help
Loads - load binary file over serial line (S-Records)
Usage: loads OFFS
Load S-Record file over serial line with offset OFFS.
config CMD_LOADY
select CRC16
select XYMODEM
depends on !CONSOLE_NONE
tristate
prompt "loady"
help
Adds the loadx and loady commands:
loadx - load binary file over serial line (X-Modem)
Usage: loadx [-fptbc]
Options:
-f FILE download to FILE (default image.bin)
-o OFFS destination file OFFSet (default 0)
-b BAUD baudrate for download (default: console baudrate
-t NAME console name to use (default: current)
-c create file if not present
loady - load binary file over serial line (Y-Modem)
Usage: loady [-gtb]
Options:
-g use Y-Modem/G (use on lossless tty such as USB)
-b BAUD baudrate for download (default: console baudrate
-t NAME console name to use (default: current)
config CMD_RESET
tristate
prompt "reset"
help
Perform RESET of the CPU
Usage: reset [-f]
Options:
-f force RESET, don't call shutdown
config CMD_SAVES
tristate
depends on CMD_LOADS
prompt "saves"
help
Save file over serial line (S-Records)
Usage: saves OFFS LEN
Save S-Record file to serial line with offset OFFS and length LEN.
config CMD_UIMAGE
select UIMAGE
tristate
prompt "uimage"
help
Show information about uImage and also extract and verify uImages.
Usage: uimage [-vien] FILE
Options:
-i show information about image
-v verify image
-e OUTFILE extract image to OUTFILE
-n NO use image number NO in multifile image
# end Boot commands
endmenu
menu "Partition"
config CMD_PARTITION
tristate
prompt "addpart and delpart"
help
addpart - add a partition description to a device
Usage: addpart [-n] DEVICE PART
The size and the offset can be given in decimal (without any prefix) and
in hex (prefixed with 0x). Both can have an optional suffix K, M or G.
The size of the last partition can be specified as '-' for the remaining
space on the device. This format is the same as used by the Linux
kernel or cmdline mtd partitions.
Options:
-n do not use the device name as prefix of the partition name
DEVICE device being worked on
PART SIZE1[@OFFSET1](NAME1)[RO],SIZE2[@OFFSET2](NAME2)[RO],...
delpart - delete partition(s)
Usage: delpart PART...
Delete partitions previously added to a device with addpart.
config CMD_AUTOMOUNT
tristate
select FS_AUTOMOUNT
prompt "automount"
help
Automount allows o automatically execute a script when a certain
directory is accessed for the first time. The script should then make
this directory available (discover USB devices, bring network interface
up and finally mount the filesystem).
Usage: automount [-ldr] PATH [COMMAND]
Options:
-l list registered automount-points
-d create the mount directory
-r remove an automountpoint
config CMD_MOUNT
tristate
default y
prompt "mount"
help
Mount a filesystem or list mounted filesystems
Usage: mount [[-atov] [DEVICE] [MOUNTPOINT]]
If no argument is given, list mounted filesystems.
If no FSTYPE is specified, try to detect it automatically.
With -a the mount command mounts all block devices whose filesystem
can be detected automatically to /mnt/PARTNAME
If mountpoint is not given, a standard mountpoint of /mnt/DEVICE
is used. This directoy is created automatically if necessary.
Options:
-a mount all blockdevices
-t FSTYPE specify filesystem type
-o OPTIONS set file system OPTIONS
-v verbose
config CMD_UBI
tristate
default y if MTD_UBI
depends on MTD_UBI
prompt "ubiattach, ubimkvol and ubirmvol"
help
ubiattach - attach mtd device to UBI
Usage: ubiattach [-O] MTDDEV
Options:
-O OFFS VID header offset
ubimkvol - create an UBI volume
Usage: ubimkvol UBIDEV NAME SIZE
Create an UBI volume on UBIDEV with NAME and SIZE.
If SIZE is 0 all available space is used for the volume.
ubirmvol - delete an UBI volume
Usage: ubirmvol UBIDEV NAME
Delete UBI volume NAME from UBIDEV
config CMD_UBIFORMAT
tristate
depends on MTD_UBI
select LIBMTD
select LIBSCAN
select LIBUBIGEN
prompt "ubiformat"
config CMD_UMOUNT
tristate
default y
prompt "umount"
help
Usage: umount MOUNTPOINT
Unmount a filesystem mounted on a specific MOINTPOINT
# end Partition commands
endmenu
menu "Environment"
config CMD_EXPORT
depends on ENVIRONMENT_VARIABLES
tristate
prompt "export"
help
Export environment variables
Usage: export VAR[=VALUE]
Export an environment variable to subsequently executed scripts.
config CMD_GLOBAL
select GLOBALVAR
tristate
prompt "global"
help
Create or set global variables
Usage: global [-r] VAR[=VALUE]
Add a new global variable named VAR, optionally set to VALUE.
Options:
-r set value of all global variables beginning with 'match'
config CMD_LOADENV
tristate
select ENV_HANDLING
prompt "loadenv"
help
Load environment from ENVFS
Usage: loadenv {-nsd] [ENVFS] [DIRECTORY]
Load environment from files in ENVFS (default /dev/env0) in
DIRECTORY (default /env
Options:
-n do not overwrite existing files
-s scrub old environment
-d load default environment
config CMD_PRINTENV
tristate
depends on ENVIRONMENT_VARIABLES
prompt "printenv"
help
Print value of environment variables
Usage: printenv [VARIABLE]
If an argument is given, printenv prints the content of an environment
variable to the terminal. If no argument is specified, all variables are
printed.
config CMD_MAGICVAR
tristate
prompt "magicvar"
help
Barebox has some shell variables with special meanings. This
command shows the available magic variables.
config CMD_MAGICVAR_HELP
bool
prompt "display description"
depends on CMD_MAGICVAR
help
Also display a description to the magic variables
config CMD_SAVEENV
tristate
select ENV_HANDLING
prompt "saveenv"
help
Save environment to persistent storage
Usage: saveenv [ENVFS] [DIRECTORY]
Save the files in DIRECTORY to the persistent storage device ENVFS.
ENVFS is usually a block in flash but can be any other file. If
omitted, DIRECTORY defaults to /env and ENVFS defaults to
/dev/env0. Note that envfs can only handle files, directories are being
skipped silently.
# end Environment commands
endmenu
menu "File"
config CMD_BASENAME
tristate
prompt "basename"
help
Usage: basename PATH VAR
Remove directory and suffix from the PATH and store result into variable VAR.
config CMD_CAT
tristate
default y
prompt "cat"
help
Concatenate file(s) to stdout
Usage: cat FILE...
Currently only printable characters and NL, TAB are printed.
config CMD_CD
tristate
default y
prompt "cd"
help
Change working directory
Usage: cd DIRECTORY
If called without an argument, change to the root directory '/'.
config CMD_CP
tristate
default y
prompt "cp"
help
Copy files
Usage: cp [-v] SRC DEST
Copy file from SRC to DEST.
Options:
-v verbose
config CMD_DIRNAME
tristate
prompt "dirname"
help
Strip last component of file name and store the result in a
environment variable
config CMD_FILETYPE
tristate
select FILETYPE
prompt "filetype"
help
Detect file type
Usage: filetype [-vsl] FILE
Detect type of a file and export result to a variable.
Options:
-v verbose
-s VAR set variable VAR to shortname
-l list known filetypes
Detected file types are registered at runtime, depending on
what you have compiled into barebox. Example of "filetype -l":
known filetypes:
arm-zimage : ARM Linux zImage
lzo : LZO compressed
lz4 : LZ4 compressed
arm-barebox : ARM barebox image
u-boot : U-Boot uImage
ubi : UBI image
jffs2 : JFFS2 image
gzip : GZIP compressed
bzip2 : BZIP2 compressed
dtb : open firmware Device Tree flattened Binary
android : android boot image
sh : bourne SHell
mips-barebox : MIPS barebox image
fat : FAT filesytem
mbr : MBR sector
bmp : BMP image
png : PNG image
ext : EXT filesystem
gpt : GUID Partition Table
bpk : Binary PacKage
bbenv : barebox environment file
config CMD_LN
tristate
prompt "ln"
help
Create symlink (make a new name for a file)
Usage: ln SRC DEST
config CMD_LS
tristate
default y
prompt "ls"
help
List a file or directory
Usage: ls [-lCR] [FILEDIR...]
List information about the specified files or directories.
Options:
-l long format
-C column format (opposite of long format)
-R list subdirectories recursively
config CMD_MD5SUM
tristate
select COMPILE_DIGEST
select MD5
prompt "md5sum"
help
Usage: md5sum FILE|AREA...
Calculate a MD5 digest over a FILE or a memory area.
config CMD_MKDIR
tristate
default y
prompt "mkdir"
help
Usage: mkdir [DIRECTORY ...]
Create new directories
Options:
-p make parent directories as needed
config CMD_PWD
tristate
default y
prompt "pwd"
help
Print working directory.
config CMD_READLINK
tristate
prompt "readlink"
help
Read value of a symbolic link
Usage: readlink [-f] FILE VARIABLE
Read value of a symbolic link and store it into VARIABLE.
Options:
-f canonicalize by following first symlink
config CMD_RM
tristate
default y
prompt "rm"
help
Remove files
Usage: rm [-r] FILES...
Options:
-r remove directories and their contents recursively
config CMD_RMDIR
tristate
default y
prompt "rmdir"
help
Remove empty directory(s)
Usage: rmdir DIRECTORY...
Remove directories. The directories have to be empty.
config CMD_SHA1SUM
tristate
select COMPILE_DIGEST
select SHA1
prompt "sha1sum"
help
Calculate SHA1 digest
Usage: sha1sum FILE|AREA
Calculate a SHA1 digest over a FILE or a memory area.
config CMD_SHA224SUM
tristate
select COMPILE_DIGEST
select SHA224
prompt "sha224sum"
help
Calculate SHA224 digest
Usage: sha224sum FILE|AREA
Calculate a SHA224 digest over a FILE or a memory area.
config CMD_SHA256SUM
tristate
select COMPILE_DIGEST
select SHA256
prompt "sha256sum"
help
sha256sum - calculate SHA256 digest
Usage: sha256sum FILE|AREA
Calculate a SHA256 digest over a FILE or a memory area.
config CMD_UNCOMPRESS
bool
select UNCOMPRESS
prompt "uncompress"
help
Uncompress handles lzo, gzip and bzip2 compressed files
depending on the compiled in compression libraries.
Usage: uncompress INFILE OUTFILE
# end File commands
endmenu
menu "Shell scripting"
config CMD_EXEC
depends on !SHELL_HUSH
tristate
prompt "exec"
config CMD_FALSE
tristate
default y
prompt "false"
help
Do nothing, unsuccessfully
config CMD_GETOPT
bool
depends on SHELL_HUSH
prompt "getopt"
help
Parse option arguments
Usage: getopt OPTSTRING VAR
OPTSTRING contains the option letters. Add a colon to an
options if this Option has a required argument or two colons
for an optional argument. The Current option is saved in
VAR, arguments are saved in $OPTARG. Any n-option arguments
can be accessed starting from $1.
config CMD_LET
tristate
prompt "let"
help
Evaluate arithmetic expressions
Usage: let EXPR [EXPR ...]
Supported operations are in order of decreasing precedence:
X++, X--
++X, --X
+X, -X
!X, ~X
X**Y
X*Y, X/Y, X%Y
X+Y, X-Y
X<<Y, X>>Y
X<Y, X<=Y, X>=Y, X>Y
X==Y, X!=Y
X&Y
X^Y
X|Y
X&&Y
X||Y
X?Y:Z
X*=Y, X/=Y, X%=Y
X=Y, X&=Y, X|=Y, X^=Y, X+=Y, X-=Y, X<<=Y, X>>=Y
config CMD_MSLEEP
tristate
prompt "msleep"
help
Delay execution for n milli-seconds
Usage: msleep MILLISECONDS
config CMD_READF
tristate
prompt "readf"
help
Read file into variable
Usage: readf FILE VAR
Read a single line from FILE into a VARiable. Leading and trailing
whitespaces are removed, nonvisible characters are stripped. Input is
limited to 1024 characters.
config CMD_SLEEP
tristate
prompt "sleep"
help
Delay execution for n seconds
Usage: sleep SECONDS
config CMD_TEST
tristate
depends on SHELL_HUSH
default y
prompt "test"
help
Minimal test command like in /bin/sh
Usage: test [EXPR]
Options:
!, =, !=, -eq, -ne, -ge, -gt, -le, -lt, -o, -a, -z, -n, -d, -e,
-f, -L; see 'man test' on your PC for more information.
config CMD_TRUE
tristate
default y
prompt "true"
help
Do nothing, successfully.
# end Scripting commands
endmenu
if NET
menu "Network"
config CMD_DHCP
bool
prompt "dhcp"
help
DHCP client to obtain IP or boot params
Usage: dhcp [-HvcuUr]
Options:
-H HOSTNAME hostname to send to the DHCP server
-v ID DHCP Vendor ID (code 60) submitted in DHCP requests
-c ID DHCP Client ID (code 61) submitted in DHCP requests
-u UUID DHCP Client UUID (code 97) submitted in DHCP requests
-U CLASS DHCP User class (code 77) submitted in DHCP requests
-r RETRY retry limit (default 20)#
config CMD_HOST
tristate
select NET_RESOLV
prompt "host"
help
Resolv a hostname.
Usage: host DESTINATION
config NET_CMD_IFUP
bool
prompt "ifup"
help
Bring up network interfaces based on config files.
Usage: ifup [-af] [INTF]
Each INTF must have a script /env/network/INTF that set the variables
ip (to 'static' or 'dynamic'), ipaddr, netmask, gateway, serverip
and/or ethaddr. A script /env/network/INTF-discover can contains for
discovering the ethernet device, e.g. 'usb'.
Options:
-a bring up all interfaces
-f Force. Configure even if ip already set
config CMD_MIITOOL
tristate
depends on PHYLIB
prompt "miitool"
help
The miitool command allows to view media-independent interface status.
The default short output reports the negotiated link speed and
link status for selected MII. The '-v' option displays more
detailed MII status information, such as MII capabilities,
current advertising mode, and link partner capabilities.
config CMD_PING
tristate
prompt "ping"
help
Send ICMP echo requests.
Usage: ping DESTINATION
config CMD_TFTP
depends on FS_TFTP
tristate
prompt "tftp"
help
Load (or save) a file using TFTP
Note that barebox can mount tftp as a filesystem. Therefore
this 'tftp' command is only needed to preserve backward
compatibility.
Usage: tftp [-p] SOURCE [DEST]
Load (or save) a file via TFTP.
Options:
-p push to TFTP server
# end Network commands
endmenu
# end if NET
endif
menu "Console and Framebuffer interaction"
config CMD_CLEAR
tristate
default y
prompt "clear"
help
Clear screen
Send ANSI ESC sequence to clear the screen.
config CMD_ECHO
tristate
default y
prompt "echo"
help
Echo args to console
Usage: echo [-neao] STRING
Display a line of TEXT on the console.
Options:
-n do not output the trailing newline
-a FILE append to FILE instead of using stdout
-o FILE overwrite FILE instead of using stdout
config CMD_ECHO_E
bool
depends on CMD_ECHO
select PROCESS_ESCAPE_SEQUENCE
prompt "support -e option to echo"
help
Adds this command line option:
-e recognize escape sequences
config CMD_EDIT
tristate
prompt "edit"
help
A small fill-screen editor.
Usage: edit FILE
Use cursor keys, Ctrl-C to exit and Ctrl-D to exit-with-save.
config CMD_LOGIN
tristate
select PASSWORD
prompt "login"
help
Ask for a password
Usage: login [-t TIMEOUT] COMMAND
Asks for a password from the console before script execution continues.
The password can be set with the 'passwd' command. Instead of specifying
a TIMEOUT the magic variable 'global.login.timeout' could be set.
Options:
-t TIMEOUT Execute COMMAND if no login withing TIMEOUT seconds
config CMD_MENU
tristate
depends on MENU
prompt "menu"
help
Create and display menus
Manage Menu:
-m menu
-l list
-s show
Show menu:
(-A auto select delay)
(-d auto select description)
menu -s -m MENU [-A delay] [-d auto_display]
List menu:
menu -l
Menu example:
menu -s -m boot
config CMD_MENU_MANAGEMENT
bool
depends on CMD_MENU
prompt "menu scripts management"
help
Adds this options:
-e menu entry
-a add
-r remove
-S select
Add a menu:
menu -a -m NAME -d DESC
Remove a menu:
menu -r -m NAME
Add an entry:
(-R for do no exit the menu after executing the command)
(-b for box style 1 for selected)
(and optional -c for the command to run when we change the state)
menu -e -a -m MENU -c COMMAND [-R] [-b 0|1] -d DESC
Add a submenu entry:
(-R is not needed)
(-b for box style 1 for selected)
(and -c is not needed)
menu -e -a -m MENU -u submenu -d [-b 0|1] DESC
Remove an entry:
menu -e -r -m NAME -n ENTRY
Select an entry:
menu -m <menu> -S -n ENTRY
List menu:
menu -e -l [menu]
Menu examples:
menu -a -m boot -d "Boot Menu"
menu -e -a -m boot -c boot -d "Boot"
menu -e -a -m boot -c reset -d "Reset"
config CMD_MENUTREE
bool
depends on MENU
select MENUTREE
prompt "menutree"
help
Create menu from directory structure
Usage: menutree [-m] DIR
Each menu entry is described by a subdirectory. Each subdirectory
can contain the following files which further describe the entry:
title A file containing the title of the entry as shown in the menu
box If present, the entry is a 'bool' entry. The file contains a
name from which the current state of the bool is taken from and saved
to.
action if present this file contains a shell script which is executed when
when the entry is selected.
If neither 'box' or 'action' are present, this entry is considered a submenu
containing more entries.
Options:
-m DIR directory where the menu starts (Default: /env/menu)
config CMD_PASSWD
tristate
select CMD_LOGIN
prompt "passwd"
help
Set password
'Interactively asks for a password. The digest of this password will be
stored in /env/etc//passwd. This is then used by the 'login' command.
Entering an empty string will disable the password function.
if CMD_LOGIN || CMD_PASSWD
choice
prompt "passwd mode"
config PASSWD_MODE_HIDE
bool "Hide"
config PASSWD_MODE_STAR
bool "Star"
config PASSWD_MODE_CLEAR
bool "Clear"
endchoice
endif
config CMD_SPLASH
bool
select IMAGE_RENDERER
prompt "splash"
help
Display a BMP image on a framebuffer device
Usage: splash [-fxyno] FILE
This command displays a graphics in the bitmap (.bmp) format on the
framebuffer. Currently images with 8 and 24 bit color depth are supported.
Options:
-f FB framebuffer device (default /dev/fb0)
-x XOFFS x offset (default center)
-y YOFFS y offset (default center)
-b COLOR background color in 0xttrrggbb
-o render offscreen
config CMD_READLINE
tristate
prompt "Readline"
help
rompt for user input
Usage: readline PROMPT VAR
First it displays the PROMPT, then it reads a line of user input into
variable VAR.
config CMD_TIMEOUT
tristate
prompt "timeout"
help
Usage: timeout [-acrs] SECONDS
Wait SECONDS for a timeout. Return 1 if the user intervented.
Options:
-a interrupt on any key
-c interrupt on Ctrl-C
-r interrupt on RETURN
-s silent mode
# end Console interaction commands
endmenu
menu "Memory"
config CMD_CRC
tristate
select CRC32
prompt "crc32"
help
Usage: crc32 [-fFvV] AREA
Calculate a CRC32 checksum of a memory area.
Options:
-f FILE Use file instead of memory.
-F FILE Use file to compare.
-v CRC Verify
config CMD_CRC_CMP
tristate
depends on CMD_CRC
prompt "compare 2 files using crc32"
help
Adds this option:
-V FILE Verify with CRC read from FILE
config CMD_MD
tristate
default y
select COMPILE_MEMORY
prompt "md"
help
Memory display
Usage: md [-bwlsx] REGION
Display (hex dump) a memory region.
Options:
-b byte access
-w word access (16 bit)
-l long access (32 bit)
-s FILE display file (default /dev/mem)
-x swap bytes at output
Memory regions can be specified in two different forms: START+SIZE
or START-END, If START is omitted it defaults to 0x100
Sizes can be specified as decimal, or if prefixed with 0x as hexadecimal.
An optional suffix of k, M or G is for kbytes, Megabytes or Gigabytes.
config CMD_MEMCMP
tristate
default y
select COMPILE_MEMORY
prompt "memcmp"
help
Memory compare
Usage: memcmp [-bwlsd] ADDR1 ADDR2 COUNT
Compare memory regions specified with ADDR and ADDR2
of size COUNT bytes. If source is a file COUNT can
be left unspecified, in which case the whole file is
compared.
Options:
-b byte access
-w word access (16 bit)
-l long access (32 bit)
-s FILE source file (default /dev/mem)
-d FILE destination file (default /dev/mem)
config CMD_MEMCPY
tristate
default y
select COMPILE_MEMORY
prompt "memcpy"
help
Memory copy
Usage: memcpy [-bwlsd] SRC DEST COUNT
Copy memory at SRC of COUNT bytes to DEST
Options:
-b byte access
-w word access (16 bit)
-l long access (32 bit)
-s FILE source file (default /dev/mem)
-d FILE write file (default /dev/mem)
config CMD_MEMSET
tristate
default y
select COMPILE_MEMORY
prompt "memset"
help
Memory fill
Usage: memset [-bwld] ADDR COUNT DATA
Fills the first COUNT bytes at offset ADDR with byte DATA,
Options:
-b byte access
-w word access (16 bit)
-l long access (32 bit)
-d FILE write file (default /dev/mem)
config CMD_MEMTEST
tristate
prompt "memtest"
help
The memtest command can test the registered barebox memory.
During this test barebox memory regions like heap, stack, ...
will be skipped. If the tested architecture has MMU with PTE
flags support, the memtest is running twice with cache enabled
and with cache disabled
Usage: memtest [-ib]
Options:
-i ITERATIONS perform number of iterations (default 1, 0 is endless)
-b perform only a test on bus lines
config CMD_MM
tristate
select COMPILE_MEMORY
prompt "memory modify (mm)"
help
Memory modify with mask
Usage: mm [-bwld] ADDR VAL MASK
Set/clear bits specified with MASK in ADDR to VALUE
Options:
-b byte access
-w word access (16 bit)
-l long access (32 bit)
-d FILE write file (default /dev/mem)
config CMD_MW
tristate
default y
select COMPILE_MEMORY
prompt "mw"
help
Memory write
Usage: mw [-bwld] REGION DATA...
Write DATA value(s) to the specified REGION.
Options:
-b byte access
-w word access (16 bit)
-l long access (32 bit)
-d FILE destination file (default /dev/mem)
#end Memory commands
endmenu
menu "Hardware manipulation"
config CMD_CLK
tristate
depends on COMMON_CLK
prompt "clk_dump, clk_set_parent, clk_set_rate"
help
clk_dump - show information about registered clocks
Usage: clk_dump [-v]
Options:
-v verbose
clk_set_parent - set parent of a clock
Usage: clk_set_parent CLK PARENT
clk_set_rate - set a clocks rate
Usage: clk_set_rate CLK HZ
Set clock CLK to RATE Hz.
config CMD_DETECT
tristate
prompt "detect"
help
Some devices take longer time to probe, like slow disks or
SD/MMC cards. These can defer the actual probe of the client
devices until they are needed. Use the 'detect' command on
the physical device to trigger probing.
Usage: detect [-lea] [devices]
Options:
-l list detectable devices
-e bail out if one device fails to detect
-a detect all devices
config CMD_FLASH
tristate
prompt "erase, protect and unprotect"
help
erase - erase flash memory
Usage: erase DEVICE [AREA]
Erase the flash memory handled by DEVICE. Which AREA will be erased
depends on the device: If the device represents the whole flash
memory, the whole memory will be erased. If the device represents a
partition on a main flash memory, only this partition part will be
erased.
Use 'addpart' and 'delpart' to manage partitions
protect - enable flash write protection
Usage: protect DEVICE [AREA]
Protect the flash memory behind the device. It depends on the device
given, what area will be protected. If the device represents the whole
flash memory, the whole memory will be protected. If the device
represents a partition on a main flash memory, only this partition part
will be protected.
Use 'addpart' and 'delpart' to manage partitions.
unprotect - disable flash write protection
Usage: unprotect DEVICE [AREA]
Unprotect the flash memory behind the device. It depends on the device
given, what area will be unprotected. If the device represents the whole
flash memory, the whole memory will be unprotected. If the device
represents a partition on a main flash memory, only this partition part
will be unprotected.
config CMD_GPIO
bool
depends on GENERIC_GPIO
prompt "gpio_direction_input, gpio_direction_output, gpio_get_value and gpio_set_value"
help
gpio_direction_input - set direction of a GPIO pin to input
Usage: gpio_direction_input GPIO
gpio_direction_output - set direction of a GPIO pin to output
Usage: gpio_direction_output GPIO
gpio_get_value - return value of a GPIO pin
Usage: gpio_get_value GPIO
gpio_set_value - set a GPIO's output value
Usage: gpio_set_value GPIO VALUE
config CMD_I2C
bool
depends on I2C
prompt "i2c_probe, i2c_read and i2c_write"
help
i2c_probe - probe for an i2c device
Usage: i2c_probe BUS START END
Probe the i2c bus BUS, address range from START to END for devices.
i2c_read - read from an i2c device
Usage: i2c_read [-bacrwv] DATA...
Options:
-b BUS i2c bus number (default 0)
-a ADDR i2c device address
-r START start register
-w use word (16 bit) wide access
-c COUNT byte count
-v verbose
i2c_write - write to an i2c device
Usage: i2c_write [-barwv] DATA...
Options:
-b BUS i2c bus number (default 0)
-a ADDR i2c device address
-r START start register
-w use word (16 bit) wide access
-v verbose
config CMD_LED
bool
depends on LED
prompt "led command"
help
Control LEDs
Usage: led LED VALUE
Control the value of a LED. The exact meaning of VALUE is unspecified,
it can be a brightness, or a color. Most often a value of '1' means on
and '0' means off.
Without arguments the available LEDs are listed.
config CMD_NAND
tristate
default y
depends on NAND
prompt "nand"
help
NAND flash handling
Usage: nand [-adb] NANDDEV
Options:
-a register a bad block aware device ontop of a normal NAND device
-d deregister a bad block aware device
-b OFFS mark block at OFFSet as bad
config CMD_NANDTEST
tristate
depends on NAND
depends on PARTITION
depends on NAND_ECC_HW || NAND_ECC_SOFT
prompt "nandtest"
help
NAND flash memory test
Usage: nandtest [-tmsiol] NANDDEVICE
Options:
-t Really do a nandtest on device
-m Mark blocks bad if they appear so
-s SEED supply random seed
-i ITERATIONS nNumber of iterations
-o OFFS start offset on flash
-l LEN length of flash to test
config CMD_POWEROFF
tristate
depends on HAS_POWEROFF
prompt "poweroff"
help
Turn the power off.
config CMD_SPI
bool
depends on SPI
prompt "spi command"
help
Write/read from SPI device
Usage: spi [-brcmfwv] DATA...
Options:
-b BUS SPI bus number (default 0)
-r COUNT bytes to read
-c chip select (default 0)
-m MODE SPI mode (default 0)
-f HZ max speed frequency, in Hz (default 1 MHz)
-w BIT bits per word (default 8)
-v verbose
config CMD_LED_TRIGGER
bool
depends on LED_TRIGGERS
prompt "trigger command"
help
Handle LED triggers
Usage: trigger [-td] TRIGGER [LED]
Control a LED trigger. Without options assigned triggers are shown.
Options:
-t set a trigger (needs LED argument)
-d disable a trigger
config CMD_USB
bool
depends on USB
prompt "usb command"
default y
help
(re-)detect USB devices
Usage: usb [-f]
Scan for USB devices.
Options:
-f force rescan
config CMD_WD
bool
depends on WATCHDOG
prompt "wd command"
help
Enable/disable/trigger the watchdog
Usage: wd [TIME]
Enable the watchdog to bark in TIME seconds.
When TIME is 0, the watchdog gets disabled,
Without a parameter the watchdog will be re-triggered.
config CMD_WD_DEFAULT_TIMOUT
int
default 0
depends on CMD_WD
prompt "default timeout"
help
Define the default timeout value in [seconds] if the first call of
'wd' is done without a timeout value (which means the watchdog gets
enabled and re-triggered with the default timeout value).
# end Hardware manipulation commands
endmenu
menu "Miscelleanous"
config CMD_2048
tristate
prompt "2048"
help
Console version of the game "2048" for GNU/Linux
config CMD_BAREBOX_UPDATE
tristate
select BAREBOX_UPDATE
prompt "barebox-update"
help
Update barebox to persistent media.
Usage: barebox_update [-ltdyf] [IMAGE]
Options:
-l list registered targets
-t TARGET specify data target handler name
-d DEVICE write image to DEVICE
-y autom. use 'yes' when asking confirmations
-f LEVEL set force level
config CMD_LINUX_EXEC
bool "linux exec"
depends on LINUX
help
Execute a command on the host
Usage: linux_exec COMMAND
config CMD_INSMOD
bool
depends on MODULES
default y
prompt "insmod"
help
Load a barebox module.
config CMD_LSMOD
bool
depends on MODULES
prompt "lsmod"
help
List loaded barebox modules.
config CMD_OF_DUMP
tristate
select OFTREE
prompt "of_dump"
default y if CMD_OFTREE
help
dump devicetree nodes to the console
Usage: of_dump [-f] [NODE]
Options:
-f <dtb> work on <dtb> instead of internal devicetree
config CMD_OF_NODE
tristate
select OFTREE
prompt "of_node"
help
Create/delete nodes in the device tree
Usage: of_node [-cd] NODE NAME
Options:
-c create a new node
-d delete a node
config CMD_OF_PROPERTY
tristate
select OFTREE
prompt "of_property"
help
Handle device tree properties
Usage: of_property [-sd] NODE [PROPERTY] [VALUES]
Options:
-s set property to value
-d delete property
Valid formats for values:
<0x00112233 4 05> - an array of cells. cells not beginning with a digit are
interpreted as node pathes and converted to phandles
[00 11 22 .. nn] - byte stream
If the value does not start with '<' or '[' it is interpreted as string
config CMD_OFTREE
tristate
select OFTREE
prompt "oftree"
help
oftree - handle device trees
Usage: oftree [-lpfdn] [DTB]
Options:
-l Load DTB to internal device tree
-p probe devices from stored device tree
-f free stored device tree
config CMD_TIME
bool "time"
help
time - measure execution duration of a command
Usage: time COMMAND
Note: This command depends on COMMAND being interruptible,
otherwise the timer may overrun resulting in incorrect results
# end Miscelleanous commands
endmenu
# end Commands
endmenu
endif