[coreboot-gerrit] New patch to review for coreboot: 949e6bc Dynamic cbmem: don't compile src/lib/cbmem.c when dynamic cbmem is selected.
Denis Carikli (GNUtoo@no-log.org)
gerrit at coreboot.org
Thu Jun 20 16:59:36 CEST 2013
Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3503
-gerrit
commit 949e6bc29b14e530088c4848ff3d85609da2f7f7
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date: Thu Jun 20 16:24:14 2013 +0200
Dynamic cbmem: don't compile src/lib/cbmem.c when dynamic cbmem is selected.
src/lib/cbmem.c is for the static cbmem.
Thanks to adurbin for the Makefile.inc pointer and code on #coreboot IRC channel on freenode:
<adurbin> no. if you have CONFIG_DYNAMIC_CBMEM then cbmem.c shouldn't be compiled
[...]
<adurbin> +ifeq ($(CONFIG_EARLY_CBMEM_INIT),y)
<adurbin> +ifneq ($(CONFIG_DYNAMIC_CBMEM),y) romstage-$(CONFIG_EARLY_CBMEM_INIT) += cbmem.c
<adurbin> +endif
<adurbin> +endif
Without that fix we have:
src/lib/cbmem.c:58:43: error: no previous prototype for 'get_cbmem_toc' [-Werror=missing-prototypes]
src/lib/cbmem.c:76:6: error: no previous prototype for 'cbmem_init' [-Werror=missing-prototypes]
src/lib/cbmem.c:107:5: error: no previous prototype for 'cbmem_reinit' [-Werror=missing-prototypes]
This commit was tested on qemu-i440fx with the following commit:
qemu-i440fx: Make it compile with CONFIG_DYNAMIC_CBMEM.
Change-Id: I98636aad4bb4b954f3ed3957df67c77f3615964a
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
src/lib/Makefile.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 2600aa5..fd2e351 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -50,7 +50,13 @@ romstage-$(CONFIG_USBDEBUG) += usbdebug.c
romstage-$(CONFIG_SPKMODEM) += spkmodem.c
romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
+
+ifeq ($(CONFIG_EARLY_CBMEM_INIT),y)
+ifneq ($(CONFIG_DYNAMIC_CBMEM),y)
romstage-$(CONFIG_EARLY_CBMEM_INIT) += cbmem.c
+endif
+endif
+
romstage-y += compute_ip_checksum.c
romstage-y += memmove.c
romstage-$(CONFIG_ARCH_X86) += gcc.c
More information about the coreboot-gerrit
mailing list