From e773c92ef44be12108c61ce342b0d48ad6c6ddd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 15 Nov 2012 07:05:43 +0200 Subject: Make mainboard_ops and mainboard.c file optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://review.coreboot.org/1931 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/sconfig/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util/sconfig') diff --git a/util/sconfig/main.c b/util/sconfig/main.c index f5e6ac137fcd..8dfd50c47add 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); -- cgit v1.2.3