diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-09-08 13:34:43 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-09-22 21:21:34 +0000 |
commit | dc9f5cd54661e5ba3fffee7af0ba17dde9367b95 (patch) | |
tree | 43b5eca98ba0b09390ff9a6d1174c2e0cce94e1b /util/cbmem | |
parent | 4b93a4f47a7457162d1be20eeffe57f81d5cd6af (diff) |
coreboot: introduce commonlib
Instead of reaching into src/include and re-writing code
allow for cleaner code sharing within coreboot and its
utilities. The additional thing needed at this point is
for the utilities to provide a printk() declaration within
a <console/console.h> file. That way code which uses printk()
can than be mapped properly to verbosity of utility parameters.
Change-Id: I9e46a279569733336bc0a018aed96bc924c07cdd
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11592
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'util/cbmem')
-rw-r--r-- | util/cbmem/Makefile | 2 | ||||
-rw-r--r-- | util/cbmem/cbmem.c | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile index 1e75345c68..91bb0456fb 100644 --- a/util/cbmem/Makefile +++ b/util/cbmem/Makefile @@ -22,7 +22,7 @@ ROOT = ../../src CC ?= $(CROSS_COMPILE)gcc CFLAGS ?= -O2 CFLAGS += -Wall -Werror -CPPFLAGS += -iquote $(ROOT)/include -iquote $(ROOT)/src/arch/x86 +CPPFLAGS += -I $(ROOT)/commonlib/include OBJS = $(PROGRAM).o diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index afb83f5d0f..74cb52d935 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -34,6 +34,9 @@ #include <sys/mman.h> #include <libgen.h> #include <assert.h> +#include <commonlib/cbmem_id.h> +#include <commonlib/timestamp_serialized.h> +#include <commonlib/coreboot_tables.h> #ifdef __OpenBSD__ #include <sys/param.h> @@ -42,18 +45,12 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define MAP_BYTES (1024*1024) -#define IS_ENABLED(x) (defined (x) && (x)) - -#include "boot/coreboot_tables.h" typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; -#include "cbmem_id.h" -#include "timestamp.h" - #define CBMEM_VERSION "1.1" /* verbose output? */ |