[coreboot] New patch to review for coreboot: 677ef0a Make mainboard_ops and mainboard.c file optional
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Tue Nov 27 22:47:33 CET 2012
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1931
-gerrit
commit 677ef0af2f9eb072b6e9b461432b6bdbf5e8a3a2
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Thu Nov 15 07:05:43 2012 +0200
Make mainboard_ops and mainboard.c file optional
This provides weak empty declaration for mainboard_ops.
The struct chip_operations is not defined for __PRE_RAM__ so
the declaration is also moved upwards in the output.
Change-Id: I101f0b8b9f0a55fb51a7c6475d53cc588c84026d
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
src/arch/x86/Makefile.inc | 2 +-
util/sconfig/main.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 2555280..68e5dcd 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -228,7 +228,7 @@ endif
# Things that appear in every board
romstage-srcs += $(objgenerated)/crt0.s
-ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c
+ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
ifeq ($(CONFIG_GENERATE_MP_TABLE),y)
ifneq ($(wildcard src/mainboard/$(MAINBOARDDIR)/mptable.c),)
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mptable.c
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index f5e6ac1..8dfd50c 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -637,6 +637,7 @@ int main(int argc, char** argv) {
fprintf(autogen, "#include \"%s/chip.h\"\n", h->name);
}
fprintf(autogen, "\n#ifndef __PRE_RAM__\n");
+ fprintf(autogen, "__attribute__((weak)) struct chip_operations mainboard_ops = {};\n");
h = &headers;
while (h->next) {
h = h->next;
@@ -653,8 +654,6 @@ int main(int argc, char** argv) {
"ROMSTAGE_CONST struct device * ROMSTAGE_CONST last_dev = &%s;\n", lastdev->name);
#ifdef MAINBOARDS_HAVE_CHIP_H
fprintf(autogen, "static ROMSTAGE_CONST struct mainboard_config ROMSTAGE_CONST mainboard_info_0;\n");
-#else
- fprintf(autogen, "extern struct chip_operations mainboard_ops;\n");
#endif
walk_device_tree(autogen, &root, pass1, NULL);
More information about the coreboot
mailing list