@@ -2697,6 +2697,7 @@ comment "Utilities"
source "package/screenfetch/Config.in"
source "package/sexpect/Config.in"
source "package/sudo/Config.in"
+ source "package/spdm-utils/Config.in"
source "package/terminology/Config.in"
source "package/time/Config.in"
source "package/tini/Config.in"
new file mode 100644
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_SPDM_UTILS
+ bool "spdm-utils"
+ depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+ depends on BR2_USE_WCHAR # eudev
+ depends on !BR2_STATIC_LIBS
+ depends on BR2_USE_MMU # eudev
+ select BR2_PACKAGE_HOST_RUSTC
+ select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_PCIUTILS
+ select BR2_PACKAGE_EUDEV
+ select BR2_PACKAGE_PYTHON3
+ select BR2_PACKAGE_LIBSPDM
+ help
+ SPDM-Utils is a Linux application designed to support,
+ test and develop SPDM requesters and responders.
+ SPDM-Utils uses libspdm as the backend to perform SPDM
+ communication. SPDM-Utils currently supports the
+ PCIe Data Object Exchange (DOE) Capability.
+
+ https://github.com/westerndigitalcorporation/spdm-utils
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 4bb5ac80ccac3928a6b6d15266e260bbc103d07c543b054664aac42a5472b7a6 spdm-utils-0.1.1.tar.gz
new file mode 100644
@@ -0,0 +1,34 @@
+################################################################################
+#
+# spdm-utils
+#
+################################################################################
+
+SPDM_UTILS_VERSION = 0.1.1
+SPDM_UTILS_SITE = $(call github,westerndigitalcorporation,spdm-utils,v$(SPDM_UTILS_VERSION))
+SPDM_UTILS_LICENSE = Apache-2.0 or MIT
+SPDM_UTILS_POST_INSTALL_TARGET_HOOKS += SPDM_UTILS_INSTALL_CERTS
+SPDM_UTILS_DEPENDENCIES += pciutils libspdm openssl
+
+# Force PyO3 to configure as a cross-compilation
+export PYO3_CROSS=1
+
+define SPDM_UTILS_INSTALL_CERTS
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/root/certs
+ cp -r $(@D)/certs/generate_certs.sh $(TARGET_DIR)/root/certs/
+ cp -r $(@D)/certs/openssl-alias.cnf $(TARGET_DIR)/root/certs/
+ cp -r $(@D)/certs/openssl.cnf $(TARGET_DIR)/root/certs/
+ cp -r $(@D)/certs/setup_certs.sh $(TARGET_DIR)/root/certs/
+
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/root/certs/slot0
+ cp $(@D)/certs/slot0/immutable.der $(TARGET_DIR)/root/certs/slot0
+ cp $(@D)/certs/slot0/device.cert.der $(TARGET_DIR)/root/certs/slot0
+ cp $(@D)/certs/slot0/device.der $(TARGET_DIR)/root/certs/slot0
+ cp $(@D)/certs/slot0/device.key $(TARGET_DIR)/root/certs/slot0
+ cp $(@D)/certs/slot0/param.pem $(TARGET_DIR)/root/certs/slot0
+
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/root/manifest
+ cp $(@D)/manifest/manifest.out.cbor $(TARGET_DIR)/root/manifest
+endef
+
+$(eval $(cargo-package))