| be29df6a | 23-Mar-2013 |
Wolfgang Denk <wd@denx.de> |
"env grep" - add support for regular expression matches
When CONFIG_REGEX is enabled, the new option "-e" becomes available which causes regular expression matches to be used. This allows for examp
"env grep" - add support for regular expression matches
When CONFIG_REGEX is enabled, the new option "-e" becomes available which causes regular expression matches to be used. This allows for example things like these:
- print all MAC addresses:
=> env grep -e eth.*addr eth1addr=00:10:ec:80:c5:15 ethaddr=00:10:ec:00:c5:15
- print all variables that have at least 2 colons in their value:
=> env grep -v -e :.*: addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 eth1addr=00:10:ec:80:c5:15 ethaddr=00:10:ec:00:c5:15 ver=U-Boot 2013.04-rc1-00289-g497746b-dirty (Mar 22 2013 - 12:50:25)
etc.
Signed-off-by: Wolfgang Denk <wd@denx.de>
show more ...
|
| a5ecbe62 | 23-Mar-2013 |
Wolfgang Denk <wd@denx.de> |
Add SLRE - Super Light Regular Expression library
Downloaded from http://slre.sourceforge.net/ and adapted for U-Boot environment.
Used to implement regex operations on environment variables. Code
Add SLRE - Super Light Regular Expression library
Downloaded from http://slre.sourceforge.net/ and adapted for U-Boot environment.
Used to implement regex operations on environment variables. Code size is ~ 3.5 KiB on PPC.
To enable this code, define the CONFIG_REGEX option in your board config file.
Note: There are more recent versions of the SLRE library available at http://slre.googlecode.com ; unfortunately, the new code has a heavily reorked API which makes it less usable for our purposes: - the return code is strings, which are more difficult to process - we don't get any information any more which sub-string of the data was matched by the given regex - it is much more cumbersome to work with arbitrary expressions, where for example the number of substrings for capturing are not known at compile time Also, there does not seem to be any real changes or improvements of the functionality.
Because of this, we deliberately stick with the older code.
Note 2: the test code (built when SLRE_TEST is defined) was modified to allow for more extensive testing; now we can test the regexp matching on all lines on a text file (instead of the whole data in the file as a single block).
Signed-off-by: Wolfgang Denk <wd@denx.de>
show more ...
|
| 8732b070 | 28-Feb-2013 |
Che-liang Chiou <clchiou@chromium.org> |
tpm: Add TPM command library
TPM command library implements a subset of TPM commands defined in TCG Main Specification 1.2 that are useful for implementing secure boot. More TPM commands could be ad
tpm: Add TPM command library
TPM command library implements a subset of TPM commands defined in TCG Main Specification 1.2 that are useful for implementing secure boot. More TPM commands could be added out of necessity.
You may exercise these commands through the 'tpm' command. However, the raw TPM commands are too primitive for writing secure boot in command interpreter scripts; so the 'tpm' command also provides helper functions to make scripting easier.
For example, to define a counter in TPM non-volatile storage and initialize it to zero:
$ tpm init $ tpm startup TPM_ST_CLEAR $ tpm nv_define d 0x1001 0x1 $ tpm nv_write d 0x1001 0
And then increment the counter by one:
$ tpm nv_read d 0x1001 i $ setexpr.l i $i + 1 $ tpm nv_write d 0x1001 $i
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
show more ...
|
| 4397a2a8 | 19-Mar-2013 |
Simon Glass <sjg@chromium.org> |
fdt: Add fdtdec_get_addr_size() to read reg properties
It is common to have a "reg = <address size>" property in the FDT. Add a function to handle this, similar to the existing fdtdec_get_addr();
S
fdt: Add fdtdec_get_addr_size() to read reg properties
It is common to have a "reg = <address size>" property in the FDT. Add a function to handle this, similar to the existing fdtdec_get_addr();
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|