diff options
| author | Michael Brown | 2014-06-19 01:35:04 +0200 |
|---|---|---|
| committer | Michael Brown | 2014-06-24 16:32:35 +0200 |
| commit | 8290a955130e0a6d6112ad8f269d8f617103e070 (patch) | |
| tree | 9a3b124dacb036cbf6359fb4ef27fbce3f898fd6 /src/interface | |
| parent | [debug] Allow debug message colours to be customised via DBGCOL=... (diff) | |
| download | ipxe-8290a955130e0a6d6112ad8f269d8f617103e070.tar.gz ipxe-8290a955130e0a6d6112ad8f269d8f617103e070.tar.xz ipxe-8290a955130e0a6d6112ad8f269d8f617103e070.zip | |
[build] Expose build timestamp, build name, and product names
Expose the build timestamp (measured in seconds since the Epoch) and
the build name (e.g. "rtl8139.rom" or "ipxe.efi"), and provide the
product name and product short name in a single centralised location.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/efi/efi_driver.c | 4 | ||||
| -rw-r--r-- | src/interface/efi/efi_snp.c | 8 | ||||
| -rw-r--r-- | src/interface/efi/efi_snp_hii.c | 13 |
3 files changed, 12 insertions, 13 deletions
diff --git a/src/interface/efi/efi_driver.c b/src/interface/efi/efi_driver.c index 1bc28e7c3..6d49eca52 100644 --- a/src/interface/efi/efi_driver.c +++ b/src/interface/efi/efi_driver.c @@ -23,12 +23,12 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <stdio.h> #include <string.h> #include <errno.h> +#include <ipxe/version.h> #include <ipxe/efi/efi.h> #include <ipxe/efi/Protocol/DriverBinding.h> #include <ipxe/efi/Protocol/ComponentName2.h> #include <ipxe/efi/efi_strings.h> #include <ipxe/efi/efi_driver.h> -#include <config/general.h> /** @file * @@ -207,7 +207,7 @@ int efi_driver_install ( struct efi_driver *efidrv ) { efi_snprintf ( efidrv->wname, ( sizeof ( efidrv->wname ) / sizeof ( efidrv->wname[0] ) ), - PRODUCT_SHORT_NAME "%s%s", + "%s%s%s", product_short_name, ( efidrv->name ? " - " : "" ), ( efidrv->name ? efidrv->name : "" ) ); diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c index 9c541552b..e9dd21326 100644 --- a/src/interface/efi/efi_snp.c +++ b/src/interface/efi/efi_snp.c @@ -28,12 +28,12 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/iobuf.h> #include <ipxe/in.h> #include <ipxe/pci.h> +#include <ipxe/version.h> #include <ipxe/efi/efi.h> #include <ipxe/efi/efi_pci.h> #include <ipxe/efi/efi_driver.h> #include <ipxe/efi/efi_strings.h> #include <ipxe/efi/efi_snp.h> -#include <config/general.h> #include <usr/autoboot.h> /** EFI simple network protocol GUID */ @@ -988,12 +988,12 @@ static int efi_snp_probe ( struct net_device *netdev ) { efi_snprintf ( snpdev->driver_name, ( sizeof ( snpdev->driver_name ) / sizeof ( snpdev->driver_name[0] ) ), - PRODUCT_SHORT_NAME " %s", netdev->dev->driver_name ); + "%s %s", product_short_name, netdev->dev->driver_name ); efi_snprintf ( snpdev->controller_name, ( sizeof ( snpdev->controller_name ) / sizeof ( snpdev->controller_name[0] ) ), - PRODUCT_SHORT_NAME " %s (%s)", - netdev->name, netdev_addr ( netdev ) ); + "%s %s (%s)", product_short_name, netdev->name, + netdev_addr ( netdev ) ); snpdev->name2.GetDriverName = efi_snp_get_driver_name; snpdev->name2.GetControllerName = efi_snp_get_controller_name; snpdev->name2.SupportedLanguages = "en"; diff --git a/src/interface/efi/efi_snp_hii.c b/src/interface/efi/efi_snp_hii.c index 797a6d836..51634a092 100644 --- a/src/interface/efi/efi_snp_hii.c +++ b/src/interface/efi/efi_snp_hii.c @@ -59,7 +59,6 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/efi/efi_hii.h> #include <ipxe/efi/efi_snp.h> #include <ipxe/efi/efi_strings.h> -#include <config/general.h> /** EFI configuration access protocol GUID */ static EFI_GUID efi_hii_config_access_protocol_guid @@ -162,7 +161,7 @@ efi_snp_hii_package_list ( struct efi_snp_device *snpdev ) { struct device *dev = netdev->dev; struct efi_ifr_builder ifr; EFI_HII_PACKAGE_LIST_HEADER *package; - const char *product_name; + const char *name; EFI_GUID package_guid; EFI_GUID formset_guid; EFI_GUID varstore_guid; @@ -173,7 +172,7 @@ efi_snp_hii_package_list ( struct efi_snp_device *snpdev ) { efi_ifr_init ( &ifr ); /* Determine product name */ - product_name = ( PRODUCT_NAME[0] ? PRODUCT_NAME : PRODUCT_SHORT_NAME ); + name = ( product_name[0] ? product_name : product_short_name ); /* Generate GUIDs */ efi_snp_hii_random_guid ( &package_guid ); @@ -181,13 +180,13 @@ efi_snp_hii_package_list ( struct efi_snp_device *snpdev ) { efi_snp_hii_random_guid ( &varstore_guid ); /* Generate title string (used more than once) */ - title_id = efi_ifr_string ( &ifr, "%s (%s)", product_name, + title_id = efi_ifr_string ( &ifr, "%s (%s)", name, netdev_addr ( netdev ) ); /* Generate opcodes */ efi_ifr_form_set_op ( &ifr, &formset_guid, title_id, - efi_ifr_string ( &ifr, - "Configure " PRODUCT_SHORT_NAME), + efi_ifr_string ( &ifr, "Configure %s", + product_short_name ), &efi_hii_platform_setup_formset_guid, &efi_hii_ibm_ucm_compliant_formset_guid, NULL ); efi_ifr_guid_class_op ( &ifr, EFI_NETWORK_DEVICE_CLASS ); @@ -197,7 +196,7 @@ efi_snp_hii_package_list ( struct efi_snp_device *snpdev ) { efi_ifr_text_op ( &ifr, efi_ifr_string ( &ifr, "Name" ), efi_ifr_string ( &ifr, "Firmware product name" ), - efi_ifr_string ( &ifr, "%s", product_name ) ); + efi_ifr_string ( &ifr, "%s", name ) ); efi_ifr_text_op ( &ifr, efi_ifr_string ( &ifr, "Version" ), efi_ifr_string ( &ifr, "Firmware version" ), |
