[Buildroot] [PATCH 2/2] package/imx-cst: add new package

Thomas Perrot thomas.perrot at bootlin.com
Wed Apr 20 08:39:16 UTC 2022


Hello Thomas,

On Tue, 2022-04-19 at 14:26 +0200, Thomas Petazzoni via buildroot
wrote:
> Hello Thomas,
> 
> On Tue, 19 Apr 2022 11:21:51 +0200
> Thomas Perrot <thomas.perrot at bootlin.com> wrote:
> 
> >  N:     Thomas Perrot <thomas.perrot at bootlin.com>
> >  F:     package/byacc
> > +F:     package/imx-cst
> 
> Trailing slash needed.
> 
> > diff --git a/package/imx-cst/Config.in.host b/package/imx-
> > cst/Config.in.host
> > new file mode 100644
> > index 000000000000..84cb825e59cf
> > --- /dev/null
> > +++ b/package/imx-cst/Config.in.host
> > @@ -0,0 +1,8 @@
> > +config BR2_PACKAGE_HOST_IMX_CST
> > +       bool "host imx-cst"
> > +       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
> 
> When I go to this page, I need to agree to a "SOFTWARE LICENSE
> AGREEMENT i.MX CODE SIGNING TOOL", but then your .mk is pointing to a
> non-NXP Git repository, and you state the license is BSD-3-Clause.
> 
> > +# debian/3.3.1+dfsg-2
> > +IMX_CST_SITE =
> > https://gitlab.apertis.org/pkg/imx-code-signing-tool.git
> 
> What is this location? Just someone who put the NXP code online? Or a
> separate implementation?

NXP code has been put by Debian maintainers.

> 
> > +IMX_CST_SITE_METHOD = git
> > +IMX_CST_VERSION = e2c687a856e6670e753147aacef42d0a3c07891a
> > +IMX_CST_LICENSE = BSD-3-Clause
> > +IMX_CST_LICENSE_FILES = LICENSE.bsd3
> 
> There are two other license files in this Git repo, the hidapi
> license
> and the OpenSSL license. You are confident they are not relevant?
> Would
> be worth explaining that.

I think it is correct because from source the file
"Software_Content_Register_CST.txt" indicates that the outgoing license
is BSD-3-Clause, and Debian also use this BSD license.

Kind regards,
Thomas Perrot

> 
> > +HOST_IMX_CST_DEPENDENCIES = host-byacc host-flex host-openssl
> > +
> > +define HOST_IMX_CST_BUILD_CMDS
> > +       $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \
> > +               OSTYPE=linux64 \
> 
> Would be useful to explain why linux64 is fine even on 32-bit host
> platforms. Actually, when I look at
> https://gitlab.apertis.org/pkg/imx-code-signing-tool/-/blob/apertis/v2023dev2/code/cst/code/obj.linux64/Makefile
> I believe that using OSTYPE=linux64 on 32-bit host machines will not
> work, as it adds -m64 to the compiler flags.
> 
> > +               ENCRYPTION=yes \
> > +               COPTIONS="$(HOST_CFLAGS) $(HOST_CPPFLAGS)" \
> > +               LDFLAGS="$(HOST_LDFLAGS) -lcrypto" \
> > +               PWD=$(@D)/code/cst \
> > +               CC="$(CC) -I../../code/common/hdr \
> > +                       -I../../code/back_end/hdr \
> > +                       -I../../code/srktool/hdr \
> > +                       -I../../code/front_end/hdr \
> > +                       -I../../code/convlb/hdr" \
> 
> This looks strange. Flags are normally passed using CFLAGS, and $(CC)
> in Buildroot doesn't exist, it's $(HOSTCC) that should be used.
> 
> Also, I think the list of header paths is properly set with:
> 
> CINCLUDES := $(SUBSYS:%=-I$(CST_CODE_PATH)/%/hdr)
> 
> but it gets overridden by the fact that you override CFLAGS.
> 
> I believe there's a better way, let me have a look.
> 
> > +               LD=$(CC) \
> 
> $(CC) doesn't exist, it should be $(HOSTCC).
> 
> > +               -C $(@D)/code/cst \
> > +               build
> 
> Best regards,
> 
> Thomas

-- 
Thomas Perrot, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20220420/bb2fffac/attachment-0001.asc>


More information about the buildroot mailing list