From 0e4c843ab4b8a3df31f7400c504e1b52fa585c9a Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 12 Aug 2016 19:47:20 +0000 Subject: [PATCH] Add defines needed to export SMBIOS serial numbers Some defines needed for exporting serial numbers from the SMBIOS were missed during integration of SMBIOS support in the EFI boot loader (r281138). This is needed for getting the hostid set from the system hardware UUID. PR: 206031 Submitted by: Thomas Eberhardt MFC after: 1 week --- sys/boot/efi/loader/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile index 6b1b4acb342..2f54032cd05 100644 --- a/sys/boot/efi/loader/Makefile +++ b/sys/boot/efi/loader/Makefile @@ -63,6 +63,18 @@ CFLAGS+= -DNO_PCI -DEFI LIBSTAND= ${.OBJDIR}/../../../../lib/libstand/libstand.a .endif +.if !defined(BOOT_HIDE_SERIAL_NUMBERS) +# Export serial numbers, UUID, and asset tag from loader. +CFLAGS+= -DSMBIOS_SERIAL_NUMBERS +.if defined(BOOT_LITTLE_ENDIAN_UUID) +# Use little-endian UUID format as defined in SMBIOS 2.6. +CFLAGS+= -DSMBIOS_LITTLE_ENDIAN_UUID +.elif defined(BOOT_NETWORK_ENDIAN_UUID) +# Use network-endian UUID format for backward compatibility. +CFLAGS+= -DSMBIOS_NETWORK_ENDIAN_UUID +.endif +.endif + .if ${MK_FORTH} != "no" BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH