summaryrefslogtreecommitdiff
path: root/src/lib/Makefile.inc
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2016-05-09 10:58:03 -0700
committerDuncan Laurie <dlaurie@google.com>2016-05-21 05:58:51 +0200
commitb9552841bf9d1f59e173d9eb082b6e31423e8496 (patch)
tree9c425294629507cbeea1526c622ccacc2fc8d981 /src/lib/Makefile.inc
parent9891b4a28b929b82d4121e2d31652af4bdd118ea (diff)
hexstrtobin: Add a library function to decode ASCII hex into binary
This function will turn a string of ASCII hex characters into an array of bytes. It will ignore any non-ASCII-hex characters in the input string and decode up to len bytes of data from it. This can be used for turning MAC addresses or UUID strings into binary for storage or further processing. Sample usage: uint8_t buf[6]; hexstrtobin("00:0e:c6:81:72:01", buf, sizeof(buf)); acpigen_emit_stream(buf, sizeof(buf)); Change-Id: I2de9bd28ae8c42cdca09eec11a3bba497a52988c Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://review.coreboot.org/14837 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/lib/Makefile.inc')
-rw-r--r--src/lib/Makefile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 734b517b01..b446e10a35 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -114,6 +114,7 @@ ramstage-y += cbfs.c
ramstage-$(CONFIG_COMMON_CBFS_SPI_WRAPPER) += cbfs_spi.c
ramstage-y += lzma.c lzmadecode.c
ramstage-y += stack.c
+ramstage-y += hexstrtobin.c
ramstage-y += wrdd.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c