diff mbox series

[meta-oe] meta-oe: libspdm: Initial support for libspdm

Message ID 20250129033605.1635908-1-alistair.francis@wdc.com
State Under Review
Headers show
Series [meta-oe] meta-oe: libspdm: Initial support for libspdm | expand

Commit Message

Alistair Francis Jan. 29, 2025, 3:36 a.m. UTC
libspdm is DMTF's Reference Implementation of SPDM, it's a library that
can be used to implement a SPDM requester or responder in userspace.

This patch adds support for building libspdm, which can then be used to
build applications depending on libspdm.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 .../recipes-support/libspdm/libspdm_3.6.0.bb  | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb

Comments

Khem Raj Jan. 29, 2025, 9:07 a.m. UTC | #1
fails to build

https://autobuilder.yoctoproject.org/valkyrie/#/builders/81/builds/330/steps/14/logs/stdio

On Tue, Jan 28, 2025 at 7:36 PM Alistair Francis via
lists.openembedded.org <alistair23=gmail.com@lists.openembedded.org>
wrote:
>
> libspdm is DMTF's Reference Implementation of SPDM, it's a library that
> can be used to implement a SPDM requester or responder in userspace.
>
> This patch adds support for building libspdm, which can then be used to
> build applications depending on libspdm.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  .../recipes-support/libspdm/libspdm_3.6.0.bb  | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
>
> diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> new file mode 100644
> index 0000000000..316cccebfc
> --- /dev/null
> +++ b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> @@ -0,0 +1,63 @@
> +SUMMARY = "DMTF's Reference Implementation of SPDM"
> +DESCRIPTION = "libspdm is a reference implementation of the DMTF’s Security Protocols and \
> +Data Models (SPDM). This is used to enable authentication, attestation and key exchange to \
> +assist in providing infrastructure security enablement"
> +HOMEPAGE = "https://github.com/DMTF/libspdm"
> +BUGTRACKER = "https://github.com/DMTF/libspdm/issues"
> +LICENSE = "BSD-3-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7"
> +
> +DEPENDS = "openssl"
> +
> +SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https"
> +SRCREV = "5ebe5e3946b9439928fa3a7548268c29cccc1b16"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit cmake
> +
> +LIBSPDM_CFLAGS = "\
> +       ${TARGET_CFLAGS} \
> +       -DLIBSPDM_ENABLE_CAPABILITY_EVENT_CAP=0 \
> +       -DLIBSPDM_ENABLE_CAPABILITY_MEL_CAP=0 \
> +       -DLIBSPDM_ENABLE_CAPABILITY_GET_KEY_PAIR_INFO_CAP=0 \
> +       -DLIBSPDM_ENABLE_CAPABILITY_SET_KEY_PAIR_INFO_CAP=0 \
> +       -DLIBSPDM_HAL_PASS_SPDM_CONTEXT=1 \
> +       "
> +
> +EXTRA_OECMAKE = "\
> +    -DARCH=${TARGET_ARCH} \
> +       -DTOOLCHAIN=NONE \
> +       -DTARGET=Release \
> +       -DCRYPTO=openssl \
> +       -DENABLE_BINARY_BUILD=1 \
> +       -DCOMPILED_LIBCRYPTO_PATH=${libdir} \
> +       -DCOMPILED_LIBSSL_PATH=${libdir} \
> +       -DDISABLE_TESTS=1 \
> +       -DDISABLE_EDDSA=1 \
> +       -DLINK_FLAGS=${STAGING_DIR} \
> +       -DCMAKE_C_FLAGS='${LIBSPDM_CFLAGS}' \
> +       "
> +
> +# PACKAGECONFIG ??= ""
> +# PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
> +# PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
> +# PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
> +# PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
> +
> +do_install () {
> +    install -d ${D}/${libdir}
> +    install -m 0644 lib/* ${D}/${libdir}/
> +
> +    install -d ${D}/${includedir}/${BPN}/
> +    cp -rf ${S}/include/* ${D}/${includedir}/${BPN}/
> +
> +    install -d ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib
> +    cp -rf ${S}/os_stub/spdm_crypt_ext_lib/*.h ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/
> +}
> +
> +FILES:${PN} += "${libdir}/*.a"
> +FILES:${PN} += "${includedir}/${BPN}/*.h"
> +FILES:${PN} += "${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/*.h"
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.47.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#115126): https://lists.openembedded.org/g/openembedded-devel/message/115126
> Mute This Topic: https://lists.openembedded.org/mt/110872806/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alistair Francis Jan. 29, 2025, 11:59 p.m. UTC | #2
On Wed, Jan 29, 2025 at 7:07 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> fails to build
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/81/builds/330/steps/14/logs/stdio

Is it possible to get the error logs? This builds fine for me locally

Alistair

>
> On Tue, Jan 28, 2025 at 7:36 PM Alistair Francis via
> lists.openembedded.org <alistair23=gmail.com@lists.openembedded.org>
> wrote:
> >
> > libspdm is DMTF's Reference Implementation of SPDM, it's a library that
> > can be used to implement a SPDM requester or responder in userspace.
> >
> > This patch adds support for building libspdm, which can then be used to
> > build applications depending on libspdm.
> >
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >  .../recipes-support/libspdm/libspdm_3.6.0.bb  | 63 +++++++++++++++++++
> >  1 file changed, 63 insertions(+)
> >  create mode 100644 meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> >
> > diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > new file mode 100644
> > index 0000000000..316cccebfc
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > @@ -0,0 +1,63 @@
> > +SUMMARY = "DMTF's Reference Implementation of SPDM"
> > +DESCRIPTION = "libspdm is a reference implementation of the DMTF’s Security Protocols and \
> > +Data Models (SPDM). This is used to enable authentication, attestation and key exchange to \
> > +assist in providing infrastructure security enablement"
> > +HOMEPAGE = "https://github.com/DMTF/libspdm"
> > +BUGTRACKER = "https://github.com/DMTF/libspdm/issues"
> > +LICENSE = "BSD-3-Clause"
> > +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7"
> > +
> > +DEPENDS = "openssl"
> > +
> > +SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https"
> > +SRCREV = "5ebe5e3946b9439928fa3a7548268c29cccc1b16"
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +inherit cmake
> > +
> > +LIBSPDM_CFLAGS = "\
> > +       ${TARGET_CFLAGS} \
> > +       -DLIBSPDM_ENABLE_CAPABILITY_EVENT_CAP=0 \
> > +       -DLIBSPDM_ENABLE_CAPABILITY_MEL_CAP=0 \
> > +       -DLIBSPDM_ENABLE_CAPABILITY_GET_KEY_PAIR_INFO_CAP=0 \
> > +       -DLIBSPDM_ENABLE_CAPABILITY_SET_KEY_PAIR_INFO_CAP=0 \
> > +       -DLIBSPDM_HAL_PASS_SPDM_CONTEXT=1 \
> > +       "
> > +
> > +EXTRA_OECMAKE = "\
> > +    -DARCH=${TARGET_ARCH} \
> > +       -DTOOLCHAIN=NONE \
> > +       -DTARGET=Release \
> > +       -DCRYPTO=openssl \
> > +       -DENABLE_BINARY_BUILD=1 \
> > +       -DCOMPILED_LIBCRYPTO_PATH=${libdir} \
> > +       -DCOMPILED_LIBSSL_PATH=${libdir} \
> > +       -DDISABLE_TESTS=1 \
> > +       -DDISABLE_EDDSA=1 \
> > +       -DLINK_FLAGS=${STAGING_DIR} \
> > +       -DCMAKE_C_FLAGS='${LIBSPDM_CFLAGS}' \
> > +       "
> > +
> > +# PACKAGECONFIG ??= ""
> > +# PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
> > +# PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
> > +# PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
> > +# PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
> > +
> > +do_install () {
> > +    install -d ${D}/${libdir}
> > +    install -m 0644 lib/* ${D}/${libdir}/
> > +
> > +    install -d ${D}/${includedir}/${BPN}/
> > +    cp -rf ${S}/include/* ${D}/${includedir}/${BPN}/
> > +
> > +    install -d ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib
> > +    cp -rf ${S}/os_stub/spdm_crypt_ext_lib/*.h ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/
> > +}
> > +
> > +FILES:${PN} += "${libdir}/*.a"
> > +FILES:${PN} += "${includedir}/${BPN}/*.h"
> > +FILES:${PN} += "${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/*.h"
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > --
> > 2.47.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#115126): https://lists.openembedded.org/g/openembedded-devel/message/115126
> > Mute This Topic: https://lists.openembedded.org/mt/110872806/1997914
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Khem Raj Jan. 30, 2025, 12:14 a.m. UTC | #3
On Wed, Jan 29, 2025 at 4:00 PM Alistair Francis <alistair23@gmail.com> wrote:
>
> On Wed, Jan 29, 2025 at 7:07 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > fails to build
> >
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/81/builds/330/steps/14/logs/stdio
>
> Is it possible to get the error logs? This builds fine for me locally
>

here is one for qemuarm + clang

https://errors.yoctoproject.org/Errors/Details/841733/

> Alistair
>
> >
> > On Tue, Jan 28, 2025 at 7:36 PM Alistair Francis via
> > lists.openembedded.org <alistair23=gmail.com@lists.openembedded.org>
> > wrote:
> > >
> > > libspdm is DMTF's Reference Implementation of SPDM, it's a library that
> > > can be used to implement a SPDM requester or responder in userspace.
> > >
> > > This patch adds support for building libspdm, which can then be used to
> > > build applications depending on libspdm.
> > >
> > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > > ---
> > >  .../recipes-support/libspdm/libspdm_3.6.0.bb  | 63 +++++++++++++++++++
> > >  1 file changed, 63 insertions(+)
> > >  create mode 100644 meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > >
> > > diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > > new file mode 100644
> > > index 0000000000..316cccebfc
> > > --- /dev/null
> > > +++ b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > > @@ -0,0 +1,63 @@
> > > +SUMMARY = "DMTF's Reference Implementation of SPDM"
> > > +DESCRIPTION = "libspdm is a reference implementation of the DMTF’s Security Protocols and \
> > > +Data Models (SPDM). This is used to enable authentication, attestation and key exchange to \
> > > +assist in providing infrastructure security enablement"
> > > +HOMEPAGE = "https://github.com/DMTF/libspdm"
> > > +BUGTRACKER = "https://github.com/DMTF/libspdm/issues"
> > > +LICENSE = "BSD-3-Clause"
> > > +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7"
> > > +
> > > +DEPENDS = "openssl"
> > > +
> > > +SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https"
> > > +SRCREV = "5ebe5e3946b9439928fa3a7548268c29cccc1b16"
> > > +
> > > +S = "${WORKDIR}/git"
> > > +
> > > +inherit cmake
> > > +
> > > +LIBSPDM_CFLAGS = "\
> > > +       ${TARGET_CFLAGS} \
> > > +       -DLIBSPDM_ENABLE_CAPABILITY_EVENT_CAP=0 \
> > > +       -DLIBSPDM_ENABLE_CAPABILITY_MEL_CAP=0 \
> > > +       -DLIBSPDM_ENABLE_CAPABILITY_GET_KEY_PAIR_INFO_CAP=0 \
> > > +       -DLIBSPDM_ENABLE_CAPABILITY_SET_KEY_PAIR_INFO_CAP=0 \
> > > +       -DLIBSPDM_HAL_PASS_SPDM_CONTEXT=1 \
> > > +       "
> > > +
> > > +EXTRA_OECMAKE = "\
> > > +    -DARCH=${TARGET_ARCH} \
> > > +       -DTOOLCHAIN=NONE \
> > > +       -DTARGET=Release \
> > > +       -DCRYPTO=openssl \
> > > +       -DENABLE_BINARY_BUILD=1 \
> > > +       -DCOMPILED_LIBCRYPTO_PATH=${libdir} \
> > > +       -DCOMPILED_LIBSSL_PATH=${libdir} \
> > > +       -DDISABLE_TESTS=1 \
> > > +       -DDISABLE_EDDSA=1 \
> > > +       -DLINK_FLAGS=${STAGING_DIR} \
> > > +       -DCMAKE_C_FLAGS='${LIBSPDM_CFLAGS}' \
> > > +       "
> > > +
> > > +# PACKAGECONFIG ??= ""
> > > +# PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
> > > +# PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
> > > +# PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
> > > +# PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
> > > +
> > > +do_install () {
> > > +    install -d ${D}/${libdir}
> > > +    install -m 0644 lib/* ${D}/${libdir}/
> > > +
> > > +    install -d ${D}/${includedir}/${BPN}/
> > > +    cp -rf ${S}/include/* ${D}/${includedir}/${BPN}/
> > > +
> > > +    install -d ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib
> > > +    cp -rf ${S}/os_stub/spdm_crypt_ext_lib/*.h ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/
> > > +}
> > > +
> > > +FILES:${PN} += "${libdir}/*.a"
> > > +FILES:${PN} += "${includedir}/${BPN}/*.h"
> > > +FILES:${PN} += "${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/*.h"
> > > +
> > > +BBCLASSEXTEND = "native nativesdk"
> > > --
> > > 2.47.1
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#115126): https://lists.openembedded.org/g/openembedded-devel/message/115126
> > > Mute This Topic: https://lists.openembedded.org/mt/110872806/1997914
> > > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
Khem Raj Jan. 30, 2025, 12:17 a.m. UTC | #4
On Wed, Jan 29, 2025 at 4:14 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Wed, Jan 29, 2025 at 4:00 PM Alistair Francis <alistair23@gmail.com> wrote:
> >
> > On Wed, Jan 29, 2025 at 7:07 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > fails to build
> > >
> > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/81/builds/330/steps/14/logs/stdio
> >
> > Is it possible to get the error logs? This builds fine for me locally
> >
>
> here is one for qemuarm + clang
>
> https://errors.yoctoproject.org/Errors/Details/841733/
>

x86 + clang
https://errors.yoctoproject.org/Errors/Details/841741/

> > Alistair
> >
> > >
> > > On Tue, Jan 28, 2025 at 7:36 PM Alistair Francis via
> > > lists.openembedded.org <alistair23=gmail.com@lists.openembedded.org>
> > > wrote:
> > > >
> > > > libspdm is DMTF's Reference Implementation of SPDM, it's a library that
> > > > can be used to implement a SPDM requester or responder in userspace.
> > > >
> > > > This patch adds support for building libspdm, which can then be used to
> > > > build applications depending on libspdm.
> > > >
> > > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > > > ---
> > > >  .../recipes-support/libspdm/libspdm_3.6.0.bb  | 63 +++++++++++++++++++
> > > >  1 file changed, 63 insertions(+)
> > > >  create mode 100644 meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > > >
> > > > diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > > > new file mode 100644
> > > > index 0000000000..316cccebfc
> > > > --- /dev/null
> > > > +++ b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
> > > > @@ -0,0 +1,63 @@
> > > > +SUMMARY = "DMTF's Reference Implementation of SPDM"
> > > > +DESCRIPTION = "libspdm is a reference implementation of the DMTF’s Security Protocols and \
> > > > +Data Models (SPDM). This is used to enable authentication, attestation and key exchange to \
> > > > +assist in providing infrastructure security enablement"
> > > > +HOMEPAGE = "https://github.com/DMTF/libspdm"
> > > > +BUGTRACKER = "https://github.com/DMTF/libspdm/issues"
> > > > +LICENSE = "BSD-3-Clause"
> > > > +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7"
> > > > +
> > > > +DEPENDS = "openssl"
> > > > +
> > > > +SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https"
> > > > +SRCREV = "5ebe5e3946b9439928fa3a7548268c29cccc1b16"
> > > > +
> > > > +S = "${WORKDIR}/git"
> > > > +
> > > > +inherit cmake
> > > > +
> > > > +LIBSPDM_CFLAGS = "\
> > > > +       ${TARGET_CFLAGS} \
> > > > +       -DLIBSPDM_ENABLE_CAPABILITY_EVENT_CAP=0 \
> > > > +       -DLIBSPDM_ENABLE_CAPABILITY_MEL_CAP=0 \
> > > > +       -DLIBSPDM_ENABLE_CAPABILITY_GET_KEY_PAIR_INFO_CAP=0 \
> > > > +       -DLIBSPDM_ENABLE_CAPABILITY_SET_KEY_PAIR_INFO_CAP=0 \
> > > > +       -DLIBSPDM_HAL_PASS_SPDM_CONTEXT=1 \
> > > > +       "
> > > > +
> > > > +EXTRA_OECMAKE = "\
> > > > +    -DARCH=${TARGET_ARCH} \
> > > > +       -DTOOLCHAIN=NONE \
> > > > +       -DTARGET=Release \
> > > > +       -DCRYPTO=openssl \
> > > > +       -DENABLE_BINARY_BUILD=1 \
> > > > +       -DCOMPILED_LIBCRYPTO_PATH=${libdir} \
> > > > +       -DCOMPILED_LIBSSL_PATH=${libdir} \
> > > > +       -DDISABLE_TESTS=1 \
> > > > +       -DDISABLE_EDDSA=1 \
> > > > +       -DLINK_FLAGS=${STAGING_DIR} \
> > > > +       -DCMAKE_C_FLAGS='${LIBSPDM_CFLAGS}' \
> > > > +       "
> > > > +
> > > > +# PACKAGECONFIG ??= ""
> > > > +# PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
> > > > +# PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
> > > > +# PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
> > > > +# PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
> > > > +
> > > > +do_install () {
> > > > +    install -d ${D}/${libdir}
> > > > +    install -m 0644 lib/* ${D}/${libdir}/
> > > > +
> > > > +    install -d ${D}/${includedir}/${BPN}/
> > > > +    cp -rf ${S}/include/* ${D}/${includedir}/${BPN}/
> > > > +
> > > > +    install -d ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib
> > > > +    cp -rf ${S}/os_stub/spdm_crypt_ext_lib/*.h ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/
> > > > +}
> > > > +
> > > > +FILES:${PN} += "${libdir}/*.a"
> > > > +FILES:${PN} += "${includedir}/${BPN}/*.h"
> > > > +FILES:${PN} += "${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/*.h"
> > > > +
> > > > +BBCLASSEXTEND = "native nativesdk"
> > > > --
> > > > 2.47.1
> > > >
> > > >
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > > Links: You receive all messages sent to this group.
> > > > View/Reply Online (#115126): https://lists.openembedded.org/g/openembedded-devel/message/115126
> > > > Mute This Topic: https://lists.openembedded.org/mt/110872806/1997914
> > > > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > >
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
new file mode 100644
index 0000000000..316cccebfc
--- /dev/null
+++ b/meta-oe/recipes-support/libspdm/libspdm_3.6.0.bb
@@ -0,0 +1,63 @@ 
+SUMMARY = "DMTF's Reference Implementation of SPDM"
+DESCRIPTION = "libspdm is a reference implementation of the DMTF’s Security Protocols and \
+Data Models (SPDM). This is used to enable authentication, attestation and key exchange to \
+assist in providing infrastructure security enablement"
+HOMEPAGE = "https://github.com/DMTF/libspdm"
+BUGTRACKER = "https://github.com/DMTF/libspdm/issues"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8f9b59a81a88da8e812af43728b72dd7"
+
+DEPENDS = "openssl"
+
+SRC_URI = "git://github.com/DMTF/libspdm.git;branch=main;protocol=https"
+SRCREV = "5ebe5e3946b9439928fa3a7548268c29cccc1b16"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+LIBSPDM_CFLAGS = "\
+	${TARGET_CFLAGS} \
+	-DLIBSPDM_ENABLE_CAPABILITY_EVENT_CAP=0 \
+	-DLIBSPDM_ENABLE_CAPABILITY_MEL_CAP=0 \
+	-DLIBSPDM_ENABLE_CAPABILITY_GET_KEY_PAIR_INFO_CAP=0 \
+	-DLIBSPDM_ENABLE_CAPABILITY_SET_KEY_PAIR_INFO_CAP=0 \
+	-DLIBSPDM_HAL_PASS_SPDM_CONTEXT=1 \
+	"
+
+EXTRA_OECMAKE = "\
+    -DARCH=${TARGET_ARCH} \
+	-DTOOLCHAIN=NONE \
+	-DTARGET=Release \
+	-DCRYPTO=openssl \
+	-DENABLE_BINARY_BUILD=1 \
+	-DCOMPILED_LIBCRYPTO_PATH=${libdir} \
+	-DCOMPILED_LIBSSL_PATH=${libdir} \
+	-DDISABLE_TESTS=1 \
+	-DDISABLE_EDDSA=1 \
+	-DLINK_FLAGS=${STAGING_DIR} \
+	-DCMAKE_C_FLAGS='${LIBSPDM_CFLAGS}' \
+	"
+
+# PACKAGECONFIG ??= ""
+# PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
+# PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
+# PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
+# PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
+
+do_install () {
+    install -d ${D}/${libdir}
+    install -m 0644 lib/* ${D}/${libdir}/
+
+    install -d ${D}/${includedir}/${BPN}/
+    cp -rf ${S}/include/* ${D}/${includedir}/${BPN}/
+
+    install -d ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib
+    cp -rf ${S}/os_stub/spdm_crypt_ext_lib/*.h ${D}/${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/
+}
+
+FILES:${PN} += "${libdir}/*.a"
+FILES:${PN} += "${includedir}/${BPN}/*.h"
+FILES:${PN} += "${includedir}/${BPN}/os_stub/spdm_crypt_ext_lib/*.h"
+
+BBCLASSEXTEND = "native nativesdk"