]> git.sur5r.net Git - u-boot/commit
cmd: Add command for calculating binary operations
authorMario Six <mario.six@gdsys.cc>
Wed, 28 Mar 2018 12:39:18 +0000 (14:39 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 7 Apr 2018 00:45:44 +0000 (20:45 -0400)
commit55b255611597bcbec7bda5d09544e29580d54509
tree8af75f25e77c65931f03f0304717258fde463b00
parent8354aa278120448e4fa54fb5982ac62994649bc2
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>
cmd/Kconfig
cmd/Makefile
cmd/binop.c [new file with mode: 0644]