/ src / lib / version.c
version.c
 1  /* SPDX-License-Identifier: GPL-2.0-only */
 2  
 3  #include <version.h>
 4  #include <build.h>
 5  
 6  #ifndef COREBOOT_VERSION
 7  #error COREBOOT_VERSION not defined
 8  #endif
 9  #ifndef COREBOOT_BUILD
10  #error COREBOOT_BUILD not defined
11  #endif
12  
13  #ifndef COREBOOT_COMPILE_TIME
14  #error COREBOOT_COMPILE_TIME not defined
15  #endif
16  
17  #ifndef COREBOOT_EXTRA_VERSION
18  #define COREBOOT_EXTRA_VERSION ""
19  #endif
20  
21  const char coreboot_version[] = COREBOOT_VERSION;
22  const char coreboot_extra_version[] = COREBOOT_EXTRA_VERSION;
23  const char coreboot_build[] = COREBOOT_BUILD;
24  const unsigned int coreboot_version_timestamp = COREBOOT_VERSION_TIMESTAMP;
25  const unsigned int coreboot_major_revision = COREBOOT_MAJOR_VERSION;
26  const unsigned int coreboot_minor_revision = COREBOOT_MINOR_VERSION;
27  
28  const char coreboot_compile_time[] = COREBOOT_COMPILE_TIME;
29  const char coreboot_dmi_date[] = COREBOOT_DMI_DATE;
30  
31  const struct bcd_date coreboot_build_date = {
32  	.century = 0x20,
33  	.year = COREBOOT_BUILD_YEAR_BCD,
34  	.month = COREBOOT_BUILD_MONTH_BCD,
35  	.day = COREBOOT_BUILD_DAY_BCD,
36  	.weekday = COREBOOT_BUILD_WEEKDAY_BCD,
37  };
38  
39  const unsigned int asl_revision = ASL_VERSION;