Denis Carikli (GNUtoo@no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5863
-gerrit
commit 712030a827486f66f3d0f398bc5b09b1bbb697a3 Author: Denis 'GNUtoo' Carikli GNUtoo@no-log.org Date: Sun Oct 27 19:07:55 2013 +0100
Lenovo X60: Native VGA init: Fix compilation.
Without that fix, we have: build/lib/ramstage.o: In function `vbe_mode_info_valid': [...]/src/lib/edid.c:1451: multiple definition of `vbe_mode_info_valid' build/mainboard/lenovo/x60/ramstage.o:[...]/src/mainboard/lenovo/x60/i915.c:200: first defined here build/lib/ramstage.o: In function `fill_lb_framebuffer': [...]/src/lib/edid.c:1454: multiple definition of `fill_lb_framebuffer' build/mainboard/lenovo/x60/ramstage.o:[...]/src/mainboard/lenovo/x60/i915.c:204: first defined here When we compile with CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y
Change-Id: I5a8f31a9f1b7cb7993c9684aef98c155e0bd9540 Signed-off-by: Denis 'GNUtoo' Carikli GNUtoo@no-log.org --- src/device/Kconfig | 5 +++++ src/lib/edid.c | 2 ++ src/mainboard/lenovo/x60/Kconfig | 1 + src/northbridge/intel/i945/gma.c | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/device/Kconfig b/src/device/Kconfig index 4087f6f..f3b5155 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -25,6 +25,11 @@ config MAINBOARD_HAS_NATIVE_VGA_INIT bool default n
+# Only set this in the mainboard +config MAINBOARD_DO_EDID + bool + default n + config MAINBOARD_DO_NATIVE_VGA_INIT bool "Use native graphics initialization" depends on MAINBOARD_HAS_NATIVE_VGA_INIT diff --git a/src/lib/edid.c b/src/lib/edid.c index d0e8b98..a106b92 100644 --- a/src/lib/edid.c +++ b/src/lib/edid.c @@ -1445,6 +1445,7 @@ void set_vbe_mode_info_valid(struct edid *edid, uintptr_t fb_addr) vbe_valid = 1; }
+#if !CONFIG_MAINBOARD_DO_EDID int vbe_mode_info_valid(void) { return vbe_valid; @@ -1454,3 +1455,4 @@ void fill_lb_framebuffer(struct lb_framebuffer *framebuffer) { *framebuffer = edid_fb; } +#endif diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig index 90d472c..9441e7b 100644 --- a/src/mainboard/lenovo/x60/Kconfig +++ b/src/mainboard/lenovo/x60/Kconfig @@ -24,6 +24,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select HAVE_ACPI_RESUME select USE_OPTION_TABLE select MAINBOARD_HAS_NATIVE_VGA_INIT + select MAINBOARD_DO_EDID select EARLY_CBMEM_INIT
config MAINBOARD_DIR diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index 5955190..ea51427 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -52,7 +52,7 @@ static void gma_func0_init(struct device *dev) #if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT /* This should probably run before post VBIOS init. */ printk(BIOS_SPEW, "Initializing VGA without OPROM.\n"); - u32 iobase, mmiobase, physbase, graphics_base; + u32 iobase, mmiobase, graphics_base;
iobase = dev->resource_list[1].base; mmiobase = dev->resource_list[0].base;