diff options
Diffstat (limited to 'meta-oe/recipes-support/libspdm/libspdm_3.8.2.bb')
| -rw-r--r-- | meta-oe/recipes-support/libspdm/libspdm_3.8.2.bb | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.8.2.bb b/meta-oe/recipes-support/libspdm/libspdm_3.8.2.bb new file mode 100644 index 0000000000..75c51b92d9 --- /dev/null +++ b/meta-oe/recipes-support/libspdm/libspdm_3.8.2.bb | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | SUMMARY = "DMTF's Reference Implementation of SPDM" | ||
| 2 | DESCRIPTION = "libspdm is a reference implementation of the DMTF’s Security Protocols and \ | ||
| 3 | Data Models (SPDM). This is used to enable authentication, attestation and key exchange to \ | ||
| 4 | assist in providing infrastructure security enablement" | ||
| 5 | HOMEPAGE = "https://github.com/DMTF/libspdm" | ||
| 6 | BUGTRACKER = "https://github.com/DMTF/libspdm/issues" | ||
| 7 | LICENSE = "BSD-3-Clause" | ||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7" | ||
| 9 | |||
| 10 | DEPENDS = "openssl" | ||
| 11 | |||
| 12 | SRC_URI = "git://github.com/DMTF/libspdm.git;branch=release-3.8;protocol=https;tag=${PV}" | ||
| 13 | SRCREV = "5cf0acb87b2f36f8d70a89e5da8476d85db59f46" | ||
| 14 | |||
| 15 | inherit cmake | ||
| 16 | |||
| 17 | LIBSPDM_CFLAGS = "\ | ||
| 18 | ${OECMAKE_C_FLAGS} \ | ||
| 19 | -DLIBSPDM_ENABLE_CAPABILITY_EVENT_CAP=0 \ | ||
| 20 | -DLIBSPDM_ENABLE_CAPABILITY_MEL_CAP=0 \ | ||
| 21 | -DLIBSPDM_ENABLE_CAPABILITY_GET_KEY_PAIR_INFO_CAP=0 \ | ||
| 22 | -DLIBSPDM_ENABLE_CAPABILITY_SET_KEY_PAIR_INFO_CAP=0 \ | ||
| 23 | -DLIBSPDM_HAL_PASS_SPDM_CONTEXT=1 \ | ||
| 24 | -DLIBSPDM_ENABLE_CAPABILITY_ENDPOINT_INFO_CAP=0 \ | ||
| 25 | " | ||
| 26 | |||
| 27 | LIBSPDM_CFLAGS:append:toolchain-gcc = " -fPIE" | ||
| 28 | |||
| 29 | def get_spdm_multiarch(bb, d): | ||
| 30 | target_arch = d.getVar('TARGET_ARCH') | ||
| 31 | multiarch_options = { | ||
| 32 | "x86_64": "x64", | ||
| 33 | "i586": "ia32", | ||
| 34 | "i686": "ia32", | ||
| 35 | "arm": "arm", | ||
| 36 | "aarch64": "aarch64", | ||
| 37 | "riscv32": "riscv32", | ||
| 38 | "riscv64": "riscv64", | ||
| 39 | "ppc64le": "ppc64le", | ||
| 40 | } | ||
| 41 | |||
| 42 | if target_arch in multiarch_options : | ||
| 43 | return multiarch_options[target_arch] | ||
| 44 | |||
| 45 | bb.error("unsupported architecture '%s'" % target_arch) | ||
| 46 | |||
| 47 | EXTRA_OECMAKE += "\ | ||
| 48 | -DARCH=${@get_spdm_multiarch(bb, d)} \ | ||
| 49 | -DTOOLCHAIN=NONE \ | ||
| 50 | -DTARGET=Release \ | ||
| 51 | -DCRYPTO=openssl \ | ||
| 52 | -DENABLE_BINARY_BUILD=1 \ | ||
| 53 | -DCOMPILED_LIBCRYPTO_PATH=${libdir} \ | ||
| 54 | -DCOMPILED_LIBSSL_PATH=${libdir} \ | ||
| 55 | -DDISABLE_TESTS=1 \ | ||
| 56 | -DDISABLE_EDDSA=1 \ | ||
| 57 | -DCMAKE_C_FLAGS='${LIBSPDM_CFLAGS}' \ | ||
| 58 | " | ||
| 59 | |||
| 60 | do_install () { | ||
| 61 | install -d ${D}/${libdir} | ||
| 62 | install -m 0644 lib/* ${D}/${libdir}/ | ||
| 63 | |||
| 64 | install -d ${D}/${includedir}/${BPN}/ | ||
| 65 | cp -rf ${S}/include/* ${D}/${includedir}/${BPN}/ | ||
| 66 | |||
| 67 | install -d ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib | ||
| 68 | cp -rf ${S}/os_stub/spdm_crypt_ext_lib/*.h ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/ | ||
| 69 | } | ||
| 70 | |||
| 71 | FILES:${PN} += "${libdir}/*.a" | ||
| 72 | FILES:${PN} += "${includedir}/${BPN}/*.h" | ||
| 73 | FILES:${PN} += "${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/*.h" | ||
| 74 | |||
| 75 | COMPATIBLE_HOST:powerpc = "null" | ||
| 76 | COMPATIBLE_HOST:powerpc64 = "null" | ||
| 77 | COMPATIBLE_HOST:mipsarchn32 = "null" | ||
| 78 | COMPATIBLE_HOST:mipsarcho32 = "null" | ||
| 79 | COMPATIBLE_HOST:mipsarchn64 = "null" | ||
| 80 | |||
| 81 | BBCLASSEXTEND = "native nativesdk" | ||
