From a9dd3c3fae07b8740c9da30c691a738e8d5e5fa4 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Thu, 15 Dec 2022 22:12:10 +0200 Subject: lib/version: Move board identification strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These strings are now only expanded in lib/identity.c. This improves ccache hit rates slightly, as one built object file lib/version.o is used for all variants of a board. Also one built object file lib/identity.o can become a ccache hit for successive builds of a variant, while the commit hash changes. Change-Id: Ia7d5454d95c8698ab1c1744e63ea4c04d615bb3b Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74449 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/include/device/device.h | 2 -- src/include/identity.h | 11 +++++++++++ src/include/version.h | 4 ---- 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 src/include/identity.h (limited to 'src/include') diff --git a/src/include/device/device.h b/src/include/device/device.h index 0b67d3dc02..d044ae2b8f 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -174,8 +174,6 @@ extern DEVTREE_CONST struct device * DEVTREE_CONST all_devices; extern struct resource *free_resources; extern struct bus *free_links; -extern const char mainboard_name[]; - /* Generic device interface functions */ struct device *alloc_dev(struct bus *parent, struct device_path *path); void dev_initialize_chips(void); diff --git a/src/include/identity.h b/src/include/identity.h new file mode 100644 index 0000000000..d939291647 --- /dev/null +++ b/src/include/identity.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef IDENTITY_H +#define IDENTITY_H + +/* Motherboard Information */ +extern const char mainboard_name[]; +extern const char mainboard_vendor[]; +extern const char mainboard_part_number[]; + +#endif /* IDENTITY_H */ diff --git a/src/include/version.h b/src/include/version.h index 84bb34a7b5..926756a534 100644 --- a/src/include/version.h +++ b/src/include/version.h @@ -3,10 +3,6 @@ #ifndef VERSION_H #define VERSION_H -/* Motherboard Information */ -extern const char mainboard_vendor[]; -extern const char mainboard_part_number[]; - /* coreboot Version */ extern const char coreboot_version[]; extern const char coreboot_extra_version[]; -- cgit v1.2.3