diff mbox series

imx-cst: Add recipe

Message ID 20240906184711.3654693-1-festevam@gmail.com
State New
Headers show
Series imx-cst: Add recipe | expand

Commit Message

Fabio Estevam Sept. 6, 2024, 6:47 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

Add a recipe for the i.MX CST (Code Signing Tool) version 3.4.0.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 .../recipes-support/imx-cst/imx-cst_3.4.0.bb  | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb

Comments

Otavio Salvador Sept. 7, 2024, 4:40 p.m. UTC | #1
Em sex., 6 de set. de 2024 às 15:47, Fabio Estevam <festevam@gmail.com>
escreveu:

> From: Fabio Estevam <festevam@denx.de>
>
> Add a recipe for the i.MX CST (Code Signing Tool) version 3.4.0.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
>

Thanks for sending the recipe. Once this patch is applied, please send a
pull request to remove that from our layer.
Khem Raj Sept. 7, 2024, 8:48 p.m. UTC | #2
On Fri, Sep 6, 2024 at 11:47 AM Fabio Estevam via
lists.openembedded.org <festevam=gmail.com@lists.openembedded.org>
wrote:
>
> From: Fabio Estevam <festevam@denx.de>
>
> Add a recipe for the i.MX CST (Code Signing Tool) version 3.4.0.
>

what's the rationale for proposing this to include in meta-oe ? is it
used for non-imx platforms ?

> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  .../recipes-support/imx-cst/imx-cst_3.4.0.bb  | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb
>
> diff --git a/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb
> new file mode 100644
> index 000000000..b558ce619
> --- /dev/null
> +++ b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb
> @@ -0,0 +1,39 @@
> +SUMMARY = "i.MX code signing tool"
> +DESCRIPTION = "Code signing support that integrates the HABv4 and AHAB library for i.MX processors"
> +LICENSE = "BSD-3-Clause & Apache-2.0"
> +
> +LIC_FILES_CHKSUM = "\
> +    file://LICENSE.bsd3;md5=14aba05f9fa6c25527297c8aac95fcf6 \
> +    file://LICENSE.hidapi;md5=e0ea014f523f64f0adb13409055ee59e \
> +    file://LICENSE.openssl;md5=3441526b1df5cc01d812c7dfc218cea6 \
> +"
> +
> +DEPENDS = "byacc-native flex-native openssl"
> +
> +# debian: 3.4.0+dfsg-2
> +DEBIAN_PGK_NAME = "imx-code-signing-tool"
> +DEBIAN_PGK_VERSION = "${PV}+dfsg"
> +
> +SRC_URI = "\
> +    ${DEBIAN_MIRROR}/main/i/${DEBIAN_PGK_NAME}/${DEBIAN_PGK_NAME}_${DEBIAN_PGK_VERSION}.orig.tar.xz \
> +"
> +
> +SRC_URI[sha256sum] = "52ee3cee3bc500a42095f73c4584e223b4b9d2dfc1cd3e5df965c5952eba8c8d"
> +
> +S = "${WORKDIR}/${DEBIAN_PGK_NAME}-${DEBIAN_PGK_VERSION}"
> +
> +EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}" AR="${AR}" OBJCOPY="${OBJCOPY}"'
> +
> +do_compile() {
> +    oe_runmake -C code/obj.linux64 OSTYPE=linux64 ENCRYPTION=yes COPTIONS="${CFLAGS} ${CPPFLAGS}" LDOPTIONS="${LDFLAGS}"
> +    oe_runmake -C add-ons/hab_csf_parser COPTS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
> +}
> +
> +do_install () {
> +    install -d ${D}${bindir}
> +    install -m 755 ${S}/code/obj.linux64/cst ${D}${bindir}/
> +    install -m 755 ${S}/code/obj.linux64/srktool ${D}${bindir}
> +    install -m 755 ${S}/add-ons/hab_csf_parser/csf_parser ${D}${bindir}
> +}
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#112110): https://lists.openembedded.org/g/openembedded-devel/message/112110
> Mute This Topic: https://lists.openembedded.org/mt/108310763/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Fabio Estevam Sept. 7, 2024, 10:02 p.m. UTC | #3
Hi Khem,

On Sat, Sep 7, 2024 at 5:48 PM Khem Raj <raj.khem@gmail.com> wrote:

> what's the rationale for proposing this to include in meta-oe ? is it
> used for non-imx platforms ?

I should have explained the rationale in the commit log, sorry.

Multiple layers include the imx-cst package and offer their version of
the recipes:

- meta-freescale
- meta-secure-imx
- meta-phytec

and probably others.

The idea of having imx-cst in meta-oe is to centralize and maintain
the efforts in a single location.

The imx-cst package is i.MX specific.

I can improve the commit log and submit a v2, if you agree.
Khem Raj Sept. 7, 2024, 11:58 p.m. UTC | #4
Hi Fabio

On Sat, Sep 7, 2024 at 3:02 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Khem,
>
> On Sat, Sep 7, 2024 at 5:48 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> > what's the rationale for proposing this to include in meta-oe ? is it
> > used for non-imx platforms ?
>
> I should have explained the rationale in the commit log, sorry.
>
> Multiple layers include the imx-cst package and offer their version of
> the recipes:
>
> - meta-freescale
> - meta-secure-imx
> - meta-phytec
>
> and probably others.
>
> The idea of having imx-cst in meta-oe is to centralize and maintain
> the efforts in a single location.
>
> The imx-cst package is i.MX specific.
>
> I can improve the commit log and submit a v2, if you agree.

Thanks for explaining and yes add it to commit msg in v2 would be good.
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb
new file mode 100644
index 000000000..b558ce619
--- /dev/null
+++ b/meta-oe/recipes-support/imx-cst/imx-cst_3.4.0.bb
@@ -0,0 +1,39 @@ 
+SUMMARY = "i.MX code signing tool"
+DESCRIPTION = "Code signing support that integrates the HABv4 and AHAB library for i.MX processors"
+LICENSE = "BSD-3-Clause & Apache-2.0"
+
+LIC_FILES_CHKSUM = "\
+    file://LICENSE.bsd3;md5=14aba05f9fa6c25527297c8aac95fcf6 \
+    file://LICENSE.hidapi;md5=e0ea014f523f64f0adb13409055ee59e \
+    file://LICENSE.openssl;md5=3441526b1df5cc01d812c7dfc218cea6 \
+"
+
+DEPENDS = "byacc-native flex-native openssl"
+
+# debian: 3.4.0+dfsg-2
+DEBIAN_PGK_NAME = "imx-code-signing-tool"
+DEBIAN_PGK_VERSION = "${PV}+dfsg"
+
+SRC_URI = "\
+    ${DEBIAN_MIRROR}/main/i/${DEBIAN_PGK_NAME}/${DEBIAN_PGK_NAME}_${DEBIAN_PGK_VERSION}.orig.tar.xz \
+"
+
+SRC_URI[sha256sum] = "52ee3cee3bc500a42095f73c4584e223b4b9d2dfc1cd3e5df965c5952eba8c8d"
+
+S = "${WORKDIR}/${DEBIAN_PGK_NAME}-${DEBIAN_PGK_VERSION}"
+
+EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}" AR="${AR}" OBJCOPY="${OBJCOPY}"'
+
+do_compile() {
+    oe_runmake -C code/obj.linux64 OSTYPE=linux64 ENCRYPTION=yes COPTIONS="${CFLAGS} ${CPPFLAGS}" LDOPTIONS="${LDFLAGS}"
+    oe_runmake -C add-ons/hab_csf_parser COPTS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -m 755 ${S}/code/obj.linux64/cst ${D}${bindir}/
+    install -m 755 ${S}/code/obj.linux64/srktool ${D}${bindir}
+    install -m 755 ${S}/add-ons/hab_csf_parser/csf_parser ${D}${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"