* [Buildroot] [PATCH v2 0/2] Support for i.MX Code Signing Tools
@ 2025-03-07 9:59 Luc BEAUFILS
2025-03-07 9:59 ` [Buildroot] [PATCH v2 1/2] package/byacc: add new package Luc BEAUFILS
2025-03-07 9:59 ` [Buildroot] [PATCH v2 2/2] package/imx-cst: " Luc BEAUFILS
0 siblings, 2 replies; 7+ messages in thread
From: Luc BEAUFILS @ 2025-03-07 9:59 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Luc BEAUFILS, Thomas Perrot
The imx-cst package provides a set of tools to sign and authenticate
code for i.MX processors. The byacc binary is required as a dependency.
The initial series of patches has been written by Thomas Perrot [1] but
does not seem to have been submitted upstream. This series backports
his work and updates the imx-cst version to 3.4.0+dfsg version.
[1]: https://patchwork.ozlabs.org/project/buildroot/cover/20220419092151.91638-1-thomas.perrot@bootlin.com/
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
Thomas Perrot (2):
package/byacc: add new package
package/imx-cst: add new package
package/Config.in.host | 1 +
package/byacc/byacc.hash | 3 ++
package/byacc/byacc.mk | 16 +++++++++++
package/imx-cst/Config.in.host | 9 ++++++
package/imx-cst/imx-cst.hash | 3 ++
package/imx-cst/imx-cst.mk | 50 ++++++++++++++++++++++++++++++++++
6 files changed, 82 insertions(+)
create mode 100644 package/byacc/byacc.hash
create mode 100644 package/byacc/byacc.mk
create mode 100644 package/imx-cst/Config.in.host
create mode 100644 package/imx-cst/imx-cst.hash
create mode 100644 package/imx-cst/imx-cst.mk
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 1/2] package/byacc: add new package
2025-03-07 9:59 [Buildroot] [PATCH v2 0/2] Support for i.MX Code Signing Tools Luc BEAUFILS
@ 2025-03-07 9:59 ` Luc BEAUFILS
2025-03-07 9:59 ` [Buildroot] [PATCH v2 2/2] package/imx-cst: " Luc BEAUFILS
1 sibling, 0 replies; 7+ messages in thread
From: Luc BEAUFILS @ 2025-03-07 9:59 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Thomas Perrot, Luc BEAUFILS
From: Thomas Perrot <thomas.perrot@bootlin.com>
This package provides a Berkeley LALR Yacc parser generator that is
required by the i.MX Code Signing tool.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
---
package/byacc/byacc.hash | 3 +++
package/byacc/byacc.mk | 16 ++++++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 package/byacc/byacc.hash
create mode 100644 package/byacc/byacc.mk
diff --git a/package/byacc/byacc.hash b/package/byacc/byacc.hash
new file mode 100644
index 0000000000..d2ad441df3
--- /dev/null
+++ b/package/byacc/byacc.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 42c1805cc529314e6a76326fe1b33e80c70862a44b01474da362e2f7db2d749c byacc-20220128.tgz
+sha256 654a231fe9cd4d36e580214962fa777a1df0771d6889cfc74d19a3d414f14711 LICENSE
diff --git a/package/byacc/byacc.mk b/package/byacc/byacc.mk
new file mode 100644
index 0000000000..7ca620b425
--- /dev/null
+++ b/package/byacc/byacc.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# byacc
+#
+################################################################################
+
+BYACC_SITE = https://invisible-mirror.net/archives/byacc
+BYACC_VERSION = 20220128
+BYACC_SOURCE = byacc-$(BYACC_VERSION).tgz
+BYACC_LICENSE = Public Domain
+BYACC_LICENSE_FILES = LICENSE
+
+# To rename the binary byacc instead of yacc.
+HOST_BYACC_CONF_OPTS = --program-transform-name='s,^,b,'
+
+$(eval $(host-autotools-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/imx-cst: add new package
2025-03-07 9:59 [Buildroot] [PATCH v2 0/2] Support for i.MX Code Signing Tools Luc BEAUFILS
2025-03-07 9:59 ` [Buildroot] [PATCH v2 1/2] package/byacc: add new package Luc BEAUFILS
@ 2025-03-07 9:59 ` Luc BEAUFILS
2025-03-07 11:49 ` Baruch Siach via buildroot
1 sibling, 1 reply; 7+ messages in thread
From: Luc BEAUFILS @ 2025-03-07 9:59 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni, Thomas Perrot, Luc BEAUFILS
From: Thomas Perrot <thomas.perrot@bootlin.com>
This package provides i.MX Code Signing Tools uses to sign i.MX
bootloader to enable secure boot (HABv4 and AHAB).
The initial work was done by Thomas Perrot for the 3.3.1+dfsg-2
version. It has been updated to the 3.4.0+dfsg version.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
---
package/Config.in.host | 1 +
package/imx-cst/Config.in.host | 9 ++++++
package/imx-cst/imx-cst.hash | 3 ++
package/imx-cst/imx-cst.mk | 50 ++++++++++++++++++++++++++++++++++
4 files changed, 63 insertions(+)
create mode 100644 package/imx-cst/Config.in.host
create mode 100644 package/imx-cst/imx-cst.hash
create mode 100644 package/imx-cst/imx-cst.mk
diff --git a/package/Config.in.host b/package/Config.in.host
index bf04f5fa97..f4271d0be8 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -52,6 +52,7 @@ menu "Host utilities"
source "package/google-breakpad/Config.in.host"
source "package/gptfdisk/Config.in.host"
source "package/imagemagick/Config.in.host"
+ source "package/imx-cst/Config.in.host"
source "package/imx-mkimage/Config.in.host"
source "package/imx-usb-loader/Config.in.host"
source "package/jh71xx-tools/Config.in.host"
diff --git a/package/imx-cst/Config.in.host b/package/imx-cst/Config.in.host
new file mode 100644
index 0000000000..b5318aa941
--- /dev/null
+++ b/package/imx-cst/Config.in.host
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_HOST_IMX_CST
+ bool "host imx-cst"
+ depends on BR2_arm || BR2_aarch64 # Only relevant for i.MX targets
+ help
+ I.MX code signing tool provides software code signing
+ support designed that integrate the HABv4 and AHAB
+ library.
+
+ https://www.nxp.com/webapp/sps/download/license.jsp?colCode=IMX_CST_TOOL
diff --git a/package/imx-cst/imx-cst.hash b/package/imx-cst/imx-cst.hash
new file mode 100644
index 0000000000..c5c3ced2ac
--- /dev/null
+++ b/package/imx-cst/imx-cst.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 52ee3cee3bc500a42095f73c4584e223b4b9d2dfc1cd3e5df965c5952eba8c8d imx-code-signing-tool_3.4.0+dfsg.orig.tar.xz
+sha256 c52ee1b0736fa8140742949f310fb084333140b11e8208257ec5446fb10ac776 LICENSE.bsd3
diff --git a/package/imx-cst/imx-cst.mk b/package/imx-cst/imx-cst.mk
new file mode 100644
index 0000000000..a3f1cdf6a4
--- /dev/null
+++ b/package/imx-cst/imx-cst.mk
@@ -0,0 +1,50 @@
+################################################################################
+#
+# imx-cst
+#
+################################################################################
+
+# debian/3.4.0-dfsg
+IMX_CST_VERSION = 3.4.0+dfsg
+IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
+IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
+IMX_CST_LICENSE = BSD-3-Clause
+IMX_CST_LICENSE_FILES = LICENSE.bsd3
+
+HOST_IMX_CST_DEPENDENCIES = host-byacc host-flex host-openssl
+
+ifneq ($(filter %64,$(HOSTARCH)),)
+HOST_IMX_CST_OSTYPE = linux64
+else
+HOST_IMX_CST_OSTYPE = linux32
+endif
+
+HOST_CFLAGS += -Wno-error=unused-result
+
+# We don't use HOST_CONFIGURE_OPTS when building cst, because we need
+# to preserve the CFLAGS/LDFLAGS used by their Makefile.
+define HOST_IMX_CST_BUILD_CMDS
+ $(HOST_MAKE_ENV) $(MAKE) \
+ OSTYPE=$(HOST_IMX_CST_OSTYPE) \
+ OPENSSL_PATH=$(HOST_DIR)/include/openssl \
+ ENCRYPTION=yes \
+ AR="$(HOSTAR)" \
+ CC="$(HOSTCC)" \
+ LD="$(HOSTCC)" \
+ OBJCOPY="$(HOSTOBJCOPY)" \
+ RANLIB="$(HOSTRANLIB)" \
+ EXTRACFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
+ EXTRALDFLAGS="$(HOST_LDFLAGS)" \
+ -C $(@D)
+ $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
+ COPTS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" \
+ -C $(@D)/add-ons/hab_csf_parser
+endef
+
+define HOST_IMX_CST_INSTALL_CMDS
+ $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/cst $(HOST_DIR)/bin/cst
+ $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/srktool $(HOST_DIR)/bin/srktool
+ $(INSTALL) -D -m 755 $(@D)/add-ons/hab_csf_parser/csf_parser $(HOST_DIR)/bin/csf_parser
+endef
+
+$(eval $(host-generic-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/imx-cst: add new package
2025-03-07 9:59 ` [Buildroot] [PATCH v2 2/2] package/imx-cst: " Luc BEAUFILS
@ 2025-03-07 11:49 ` Baruch Siach via buildroot
2025-03-07 14:09 ` Luc Beaufils
0 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach via buildroot @ 2025-03-07 11:49 UTC (permalink / raw)
To: Luc BEAUFILS; +Cc: buildroot, Thomas Petazzoni, Thomas Perrot
Hi Luc,
On Fri, Mar 07 2025, Luc BEAUFILS wrote:
> diff --git a/package/imx-cst/imx-cst.mk b/package/imx-cst/imx-cst.mk
> new file mode 100644
> index 0000000000..a3f1cdf6a4
> --- /dev/null
> +++ b/package/imx-cst/imx-cst.mk
> @@ -0,0 +1,50 @@
> +################################################################################
> +#
> +# imx-cst
> +#
> +################################################################################
> +
> +# debian/3.4.0-dfsg
> +IMX_CST_VERSION = 3.4.0+dfsg
> +IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
> +IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
Debian source packages are removed from main once the release they
belong to are retired. Buildroot usually uses the Debian snapshot
archive. See example in alsamixergui, cdrkit, cvs, and a few more
packages.
baruch
> +IMX_CST_LICENSE = BSD-3-Clause
> +IMX_CST_LICENSE_FILES = LICENSE.bsd3
> +
> +HOST_IMX_CST_DEPENDENCIES = host-byacc host-flex host-openssl
> +
> +ifneq ($(filter %64,$(HOSTARCH)),)
> +HOST_IMX_CST_OSTYPE = linux64
> +else
> +HOST_IMX_CST_OSTYPE = linux32
> +endif
> +
> +HOST_CFLAGS += -Wno-error=unused-result
> +
> +# We don't use HOST_CONFIGURE_OPTS when building cst, because we need
> +# to preserve the CFLAGS/LDFLAGS used by their Makefile.
> +define HOST_IMX_CST_BUILD_CMDS
> + $(HOST_MAKE_ENV) $(MAKE) \
> + OSTYPE=$(HOST_IMX_CST_OSTYPE) \
> + OPENSSL_PATH=$(HOST_DIR)/include/openssl \
> + ENCRYPTION=yes \
> + AR="$(HOSTAR)" \
> + CC="$(HOSTCC)" \
> + LD="$(HOSTCC)" \
> + OBJCOPY="$(HOSTOBJCOPY)" \
> + RANLIB="$(HOSTRANLIB)" \
> + EXTRACFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
> + EXTRALDFLAGS="$(HOST_LDFLAGS)" \
> + -C $(@D)
> + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
> + COPTS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" \
> + -C $(@D)/add-ons/hab_csf_parser
> +endef
> +
> +define HOST_IMX_CST_INSTALL_CMDS
> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/cst $(HOST_DIR)/bin/cst
> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/srktool $(HOST_DIR)/bin/srktool
> + $(INSTALL) -D -m 755 $(@D)/add-ons/hab_csf_parser/csf_parser $(HOST_DIR)/bin/csf_parser
> +endef
> +
> +$(eval $(host-generic-package))
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/imx-cst: add new package
2025-03-07 11:49 ` Baruch Siach via buildroot
@ 2025-03-07 14:09 ` Luc Beaufils
2025-03-07 14:19 ` Baruch Siach via buildroot
0 siblings, 1 reply; 7+ messages in thread
From: Luc Beaufils @ 2025-03-07 14:09 UTC (permalink / raw)
To: Baruch Siach; +Cc: buildroot, Thomas Petazzoni, Thomas Perrot
----- Le 7 Mar 25, à 12:49, Baruch Siach baruch@tkos.co.il a écrit :
> Hi Luc,
>
> On Fri, Mar 07 2025, Luc BEAUFILS wrote:
>> diff --git a/package/imx-cst/imx-cst.mk b/package/imx-cst/imx-cst.mk
>> new file mode 100644
>> index 0000000000..a3f1cdf6a4
>> --- /dev/null
>> +++ b/package/imx-cst/imx-cst.mk
>> @@ -0,0 +1,50 @@
>> +################################################################################
>> +#
>> +# imx-cst
>> +#
>> +################################################################################
>> +
>> +# debian/3.4.0-dfsg
>> +IMX_CST_VERSION = 3.4.0+dfsg
>> +IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
>> +IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
>
> Debian source packages are removed from main once the release they
> belong to are retired. Buildroot usually uses the Debian snapshot
> archive. See example in alsamixergui, cdrkit, cvs, and a few more
> packages.
>
> baruch
>
Hi,
Thank you for your reply.
Unfortunately, I haven't been able to find the sources of this package in the Debian snapshot.
As an alternative, I propose using the Apertis GitLab repository:
-IMX_CST_VERSION = 3.4.0+dfsg
-IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
-IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
+IMX_CST_VERSION = debian/3.4.0+dfsg-2
+IMX_CST_SITE = https://gitlab.apertis.org/pkg/imx-code-signing-tool
+IMX_CST_SITE_METHOD = git
Does this solution work for you?
Luc
>> +IMX_CST_LICENSE = BSD-3-Clause
>> +IMX_CST_LICENSE_FILES = LICENSE.bsd3
>> +
>> +HOST_IMX_CST_DEPENDENCIES = host-byacc host-flex host-openssl
>> +
>> +ifneq ($(filter %64,$(HOSTARCH)),)
>> +HOST_IMX_CST_OSTYPE = linux64
>> +else
>> +HOST_IMX_CST_OSTYPE = linux32
>> +endif
>> +
>> +HOST_CFLAGS += -Wno-error=unused-result
>> +
>> +# We don't use HOST_CONFIGURE_OPTS when building cst, because we need
>> +# to preserve the CFLAGS/LDFLAGS used by their Makefile.
>> +define HOST_IMX_CST_BUILD_CMDS
>> + $(HOST_MAKE_ENV) $(MAKE) \
>> + OSTYPE=$(HOST_IMX_CST_OSTYPE) \
>> + OPENSSL_PATH=$(HOST_DIR)/include/openssl \
>> + ENCRYPTION=yes \
>> + AR="$(HOSTAR)" \
>> + CC="$(HOSTCC)" \
>> + LD="$(HOSTCC)" \
>> + OBJCOPY="$(HOSTOBJCOPY)" \
>> + RANLIB="$(HOSTRANLIB)" \
>> + EXTRACFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
>> + EXTRALDFLAGS="$(HOST_LDFLAGS)" \
>> + -C $(@D)
>> + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
>> + COPTS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" \
>> + -C $(@D)/add-ons/hab_csf_parser
>> +endef
>> +
>> +define HOST_IMX_CST_INSTALL_CMDS
>> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/cst
>> $(HOST_DIR)/bin/cst
>> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/srktool
>> $(HOST_DIR)/bin/srktool
>> + $(INSTALL) -D -m 755 $(@D)/add-ons/hab_csf_parser/csf_parser
>> $(HOST_DIR)/bin/csf_parser
>> +endef
>> +
>> +$(eval $(host-generic-package))
>
> --
> ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/imx-cst: add new package
2025-03-07 14:09 ` Luc Beaufils
@ 2025-03-07 14:19 ` Baruch Siach via buildroot
2025-03-07 15:32 ` Luc Beaufils
0 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach via buildroot @ 2025-03-07 14:19 UTC (permalink / raw)
To: Luc Beaufils; +Cc: buildroot, Thomas Petazzoni, Thomas Perrot
Hi Luc,
On Fri, Mar 07 2025, Luc Beaufils wrote:
> ----- Le 7 Mar 25, à 12:49, Baruch Siach baruch@tkos.co.il a écrit :
>> On Fri, Mar 07 2025, Luc BEAUFILS wrote:
>>> diff --git a/package/imx-cst/imx-cst.mk b/package/imx-cst/imx-cst.mk
>>> new file mode 100644
>>> index 0000000000..a3f1cdf6a4
>>> --- /dev/null
>>> +++ b/package/imx-cst/imx-cst.mk
>>> @@ -0,0 +1,50 @@
>>> +################################################################################
>>> +#
>>> +# imx-cst
>>> +#
>>> +################################################################################
>>> +
>>> +# debian/3.4.0-dfsg
>>> +IMX_CST_VERSION = 3.4.0+dfsg
>>> +IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
>>> +IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
>>
>> Debian source packages are removed from main once the release they
>> belong to are retired. Buildroot usually uses the Debian snapshot
>> archive. See example in alsamixergui, cdrkit, cvs, and a few more
>> packages.
>
> Thank you for your reply.
>
> Unfortunately, I haven't been able to find the sources of this package in the Debian snapshot.
See here:
http://snapshot.debian.org/archive/debian/20250307T084701Z/pool/main/i/imx-code-signing-tool/imx-code-signing-tool_3.4.0%2Bdfsg.orig.tar.xz
> As an alternative, I propose using the Apertis GitLab repository:
>
> -IMX_CST_VERSION = 3.4.0+dfsg
> -IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
> -IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
> +IMX_CST_VERSION = debian/3.4.0+dfsg-2
> +IMX_CST_SITE = https://gitlab.apertis.org/pkg/imx-code-signing-tool
> +IMX_CST_SITE_METHOD = git
>
> Does this solution work for you?
Looks like an older CST version. I guess the Debian snapshot is
preferred.
baruch
>>> +IMX_CST_LICENSE = BSD-3-Clause
>>> +IMX_CST_LICENSE_FILES = LICENSE.bsd3
>>> +
>>> +HOST_IMX_CST_DEPENDENCIES = host-byacc host-flex host-openssl
>>> +
>>> +ifneq ($(filter %64,$(HOSTARCH)),)
>>> +HOST_IMX_CST_OSTYPE = linux64
>>> +else
>>> +HOST_IMX_CST_OSTYPE = linux32
>>> +endif
>>> +
>>> +HOST_CFLAGS += -Wno-error=unused-result
>>> +
>>> +# We don't use HOST_CONFIGURE_OPTS when building cst, because we need
>>> +# to preserve the CFLAGS/LDFLAGS used by their Makefile.
>>> +define HOST_IMX_CST_BUILD_CMDS
>>> + $(HOST_MAKE_ENV) $(MAKE) \
>>> + OSTYPE=$(HOST_IMX_CST_OSTYPE) \
>>> + OPENSSL_PATH=$(HOST_DIR)/include/openssl \
>>> + ENCRYPTION=yes \
>>> + AR="$(HOSTAR)" \
>>> + CC="$(HOSTCC)" \
>>> + LD="$(HOSTCC)" \
>>> + OBJCOPY="$(HOSTOBJCOPY)" \
>>> + RANLIB="$(HOSTRANLIB)" \
>>> + EXTRACFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
>>> + EXTRALDFLAGS="$(HOST_LDFLAGS)" \
>>> + -C $(@D)
>>> + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
>>> + COPTS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" \
>>> + -C $(@D)/add-ons/hab_csf_parser
>>> +endef
>>> +
>>> +define HOST_IMX_CST_INSTALL_CMDS
>>> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/cst
>>> $(HOST_DIR)/bin/cst
>>> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/srktool
>>> $(HOST_DIR)/bin/srktool
>>> + $(INSTALL) -D -m 755 $(@D)/add-ons/hab_csf_parser/csf_parser
>>> $(HOST_DIR)/bin/csf_parser
>>> +endef
>>> +
>>> +$(eval $(host-generic-package))
>>
>> --
>> ~. .~ Tk Open Systems
>> =}------------------------------------------------ooO--U--Ooo------------{=
>> - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/imx-cst: add new package
2025-03-07 14:19 ` Baruch Siach via buildroot
@ 2025-03-07 15:32 ` Luc Beaufils
0 siblings, 0 replies; 7+ messages in thread
From: Luc Beaufils @ 2025-03-07 15:32 UTC (permalink / raw)
To: Baruch Siach; +Cc: buildroot, Thomas Petazzoni, Thomas Perrot
----- Le 7 Mar 25, à 15:19, Baruch Siach baruch@tkos.co.il a écrit :
> Hi Luc,
>
> On Fri, Mar 07 2025, Luc Beaufils wrote:
>> ----- Le 7 Mar 25, à 12:49, Baruch Siach baruch@tkos.co.il a écrit :
>>> On Fri, Mar 07 2025, Luc BEAUFILS wrote:
>>>> diff --git a/package/imx-cst/imx-cst.mk b/package/imx-cst/imx-cst.mk
>>>> new file mode 100644
>>>> index 0000000000..a3f1cdf6a4
>>>> --- /dev/null
>>>> +++ b/package/imx-cst/imx-cst.mk
>>>> @@ -0,0 +1,50 @@
>>>> +################################################################################
>>>> +#
>>>> +# imx-cst
>>>> +#
>>>> +################################################################################
>>>> +
>>>> +# debian/3.4.0-dfsg
>>>> +IMX_CST_VERSION = 3.4.0+dfsg
>>>> +IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
>>>> +IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
>>>
>>> Debian source packages are removed from main once the release they
>>> belong to are retired. Buildroot usually uses the Debian snapshot
>>> archive. See example in alsamixergui, cdrkit, cvs, and a few more
>>> packages.
>>
>> Thank you for your reply.
>>
>> Unfortunately, I haven't been able to find the sources of this package in the
>> Debian snapshot.
>
> See here:
>
> http://snapshot.debian.org/archive/debian/20250307T084701Z/pool/main/i/imx-code-signing-tool/imx-code-signing-tool_3.4.0%2Bdfsg.orig.tar.xz
My bad, I was searching at imx-cst package name.
>
>> As an alternative, I propose using the Apertis GitLab repository:
>>
>> -IMX_CST_VERSION = 3.4.0+dfsg
>> -IMX_CST_SOURCE = imx-code-signing-tool_$(IMX_CST_VERSION).orig.tar.xz
>> -IMX_CST_SITE = https://deb.debian.org/debian/pool/main/i/imx-code-signing-tool
>> +IMX_CST_VERSION = debian/3.4.0+dfsg-2
>> +IMX_CST_SITE = https://gitlab.apertis.org/pkg/imx-code-signing-tool
>> +IMX_CST_SITE_METHOD = git
>>
>> Does this solution work for you?
>
> Looks like an older CST version. I guess the Debian snapshot is
> preferred.
>
> baruch
Yes, I will send a v3 patch with the debian snapshot package,
thanks
Luc
>
>>>> +IMX_CST_LICENSE = BSD-3-Clause
>>>> +IMX_CST_LICENSE_FILES = LICENSE.bsd3
>>>> +
>>>> +HOST_IMX_CST_DEPENDENCIES = host-byacc host-flex host-openssl
>>>> +
>>>> +ifneq ($(filter %64,$(HOSTARCH)),)
>>>> +HOST_IMX_CST_OSTYPE = linux64
>>>> +else
>>>> +HOST_IMX_CST_OSTYPE = linux32
>>>> +endif
>>>> +
>>>> +HOST_CFLAGS += -Wno-error=unused-result
>>>> +
>>>> +# We don't use HOST_CONFIGURE_OPTS when building cst, because we need
>>>> +# to preserve the CFLAGS/LDFLAGS used by their Makefile.
>>>> +define HOST_IMX_CST_BUILD_CMDS
>>>> + $(HOST_MAKE_ENV) $(MAKE) \
>>>> + OSTYPE=$(HOST_IMX_CST_OSTYPE) \
>>>> + OPENSSL_PATH=$(HOST_DIR)/include/openssl \
>>>> + ENCRYPTION=yes \
>>>> + AR="$(HOSTAR)" \
>>>> + CC="$(HOSTCC)" \
>>>> + LD="$(HOSTCC)" \
>>>> + OBJCOPY="$(HOSTOBJCOPY)" \
>>>> + RANLIB="$(HOSTRANLIB)" \
>>>> + EXTRACFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
>>>> + EXTRALDFLAGS="$(HOST_LDFLAGS)" \
>>>> + -C $(@D)
>>>> + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
>>>> + COPTS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) $(HOST_LDFLAGS)" \
>>>> + -C $(@D)/add-ons/hab_csf_parser
>>>> +endef
>>>> +
>>>> +define HOST_IMX_CST_INSTALL_CMDS
>>>> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/cst
>>>> $(HOST_DIR)/bin/cst
>>>> + $(INSTALL) -D -m 755 $(@D)/code/obj.$(HOST_IMX_CST_OSTYPE)/srktool
>>>> $(HOST_DIR)/bin/srktool
>>>> + $(INSTALL) -D -m 755 $(@D)/add-ons/hab_csf_parser/csf_parser
>>>> $(HOST_DIR)/bin/csf_parser
>>>> +endef
>>>> +
>>>> +$(eval $(host-generic-package))
>>>
>>> --
>>> ~. .~ Tk Open Systems
>>> =}------------------------------------------------ooO--U--Ooo------------{=
>>> - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
>
> --
> ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-07 15:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 9:59 [Buildroot] [PATCH v2 0/2] Support for i.MX Code Signing Tools Luc BEAUFILS
2025-03-07 9:59 ` [Buildroot] [PATCH v2 1/2] package/byacc: add new package Luc BEAUFILS
2025-03-07 9:59 ` [Buildroot] [PATCH v2 2/2] package/imx-cst: " Luc BEAUFILS
2025-03-07 11:49 ` Baruch Siach via buildroot
2025-03-07 14:09 ` Luc Beaufils
2025-03-07 14:19 ` Baruch Siach via buildroot
2025-03-07 15:32 ` Luc Beaufils
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox