Matt DeVillier has submitted this change. ( https://review.coreboot.org/c/coreboot/+/80366?usp=email )
Change subject: mb/qemu/fw_cfg: Fix build when not generating SMBIOS tables ......................................................................
mb/qemu/fw_cfg: Fix build when not generating SMBIOS tables
Parts of the QEMU firmware configuration device driver refers to SMBIOS related kconfig values. These depend on GENERATE_SMBIOS_TABLES and are undefined if it isn't enabled, causing a build error.
Cover the SMBIOS-related region in this driver with an #if directive checking the necessary config option. This is mostly to help port the driver to non-x86 architectures where support for generating SMBIOS tables isn't there yet.
Change-Id: I3ff388d4574eb52686a5dda3dcbc3d64a7ce6f7b Signed-off-by: Alper Nebi Yasak alpernebiyasak@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/80366 Reviewed-by: Martin L Roth gaumless@gmail.com Reviewed-by: Nico Huber nico.h@gmx.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/emulation/qemu-i440fx/fw_cfg.c 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Nico Huber: Looks good to me, but someone else must approve build bot (Jenkins): Verified Martin L Roth: Looks good to me, approved
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 5c23988..0f217cc 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -341,6 +341,7 @@ /* ---------------------------------------------------------------------- */ /* pick up smbios information from fw_cfg */
+#if CONFIG(GENERATE_SMBIOS_TABLES) static const char *type1_manufacturer; static const char *type1_product_name; static const char *type1_version; @@ -504,6 +505,7 @@ fw_cfg_smbios_init(); memcpy(uuid, type1_uuid, 16); } +#endif /* CONFIG(GENERATE_SMBIOS_TABLES) */
/* * Configure DMA setup