diff options
author | Mario Six <mario.six@gdsys.cc> | 2018-03-28 14:39:18 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-04-06 20:45:44 -0400 |
commit | 55b255611597bcbec7bda5d09544e29580d54509 (patch) | |
tree | 8af75f25e77c65931f03f0304717258fde463b00 /cmd/Kconfig | |
parent | 8354aa278120448e4fa54fb5982ac62994649bc2 (diff) | |
download | u-boot-55b255611597bcbec7bda5d09544e29580d54509.tar.gz |
cmd: Add command for calculating binary operations
This patch adds a command that enables the calculation of bit operations
(AND, OR, XOR) on binary data from the command line. Memory locations as
well as the contents of environment variables are eligible as sources
and destination of the binary data used in the operations.
The possible applications are manifold: Setting specific bits in
registers using the regular read-OR-write pattern, masking out bits in
bit values, implementation of simple OTP encryption using the XOR
operation, etc.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Diffstat (limited to 'cmd/Kconfig')
-rw-r--r-- | cmd/Kconfig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 27086df09b..cb21dab7bd 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -423,6 +423,12 @@ endmenu menu "Memory commands" +config CMD_BINOP + bool "binop" + help + Compute binary operations (xor, or, and) of byte arrays of arbitrary + size from memory and store the result in memory or the environment. + config CMD_CRC32 bool "crc32" select HASH |