summaryrefslogtreecommitdiff
path: root/util/supermicro/Makefile.mk
diff options
context:
space:
mode:
Diffstat (limited to 'util/supermicro/Makefile.mk')
-rw-r--r--util/supermicro/Makefile.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/util/supermicro/Makefile.mk b/util/supermicro/Makefile.mk
new file mode 100644
index 0000000000..7d295a0205
--- /dev/null
+++ b/util/supermicro/Makefile.mk
@@ -0,0 +1,24 @@
+## SPDX-License-Identifier: GPL-2.0-only
+TOOLCPPFLAGS += -include $(top)/src/commonlib/bsd/include/commonlib/bsd/compiler.h
+
+SMCBIOSINFOTOOL:= $(objutil)/supermicro/smcbiosinfo
+
+$(SMCBIOSINFOTOOL): $(dir)/smcbiosinfo/smcbiosinfo.c
+ printf " HOSTCC Creating SMCBIOSINFO tool\n"
+ mkdir -p $(objutil)/supermicro
+ $(HOSTCC) $(TOOLCPPFLAGS) $< -o $@
+
+ifeq ($(CONFIG_VENDOR_SUPERMICRO),y)
+ifneq ($(call strip_quotes, $(CONFIG_SUPERMICRO_BOARDID)),)
+
+cbfs-files-y += smcbiosinfo.bin
+
+smcbiosinfo.bin-file := $(obj)/mainboard/$(MAINBOARDDIR)/smcbiosinfo.bin
+smcbiosinfo.bin-type := raw
+smcbiosinfo.bin-compression := none
+
+$(obj)/mainboard/$(MAINBOARDDIR)/smcbiosinfo.bin: $(SMCBIOSINFOTOOL) $(build_h)
+ printf " TOOL Creating SMC BIOSINFO metadata\n"
+ $(SMCBIOSINFOTOOL) -i $(build_h) -b $(CONFIG_SUPERMICRO_BOARDID) -o $@
+endif
+endif