From: Maik Otto <m.otto@phytec.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 2/2] arch: arm: mach-imx: Add habv4 config file for i.MX6ULL
Date: Thu, 17 Sep 2020 11:35:00 +0200 [thread overview]
Message-ID: <e5bc0d7a-b1ab-823c-311a-da55af2867e2@phytec.de> (raw)
In-Reply-To: <20200914084456.GM4498@pengutronix.de>
Hi Sascha,
Am 14.09.2020 um 10:44 schrieb Sascha Hauer:
> Hi Maik,
>
> On Fri, Sep 11, 2020 at 09:37:37AM +0200, Maik Otto wrote:
>> The i.MX6ULL has no CAAM engine for Secure Boot on HABv4 (NXP AN4581).
>> For i.MX6ULL the engine Software (SW) must used for the image
>> validation.
>>
>> +++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg
>> @@ -1,3 +1,3 @@
>>
>> #include "flash-header-phytec-pcl063-512mb.h"
>> -#include <mach/habv4-imx6-gencsf.h>
>> +#include <mach/habv4-imx6ull-gencsf.h>
>> diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
>> index 17c4d79..ee21e0b 100644
>> --- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
>> +++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
> I would prefer to rename this file to habv4-imx6-gencsf-template.h and
> let it start with:
>
> #ifndef SETUP_HABV4_ENGINE
> #error "SETUP_HABV4_ENGINE undefined"
> #endif
>
> The habv4-imx6-gencsf.h would then only set the defines and include the
> template file like you already did for the i.MX6ULL.
>
> This makes it more clear what defines the file expects.
ok, is fine. I will change it
>> @@ -14,7 +14,11 @@ hab Hash Algorithm = sha256
>> hab Engine Configuration = 0
>> hab Certificate Format = X509
>> hab Signature Format = CMS
>> +#ifndef SETUP_HABV4_ENGINE
>> hab Engine = CAAM
>> +#else
>> +hab Engine = SETUP_HABV4_ENGINE
>> +#endif
>>
>> hab [Install SRK]
>> hab File = CONFIG_HABV4_TABLE_BIN
>> @@ -28,8 +32,12 @@ hab File = CONFIG_HABV4_CSF_CRT_PEM
>> hab [Authenticate CSF]
>>
>> hab [Unlock]
>> +#ifndef SETUP_HABV4_ENGINE
>> hab Engine = CAAM
>> hab Features = RNG, MID
>> +#else
>> +hab Engine = SETUP_HABV4_ENGINE
>> +#endif
> Do we need this #ifdef here? Can't we instead have a
> SETUP_HABV4_FEATURES macro and let the SoC specific files define it as
>
> #define SETUP_HABV4_FEATURES RNG,MID
yes we need it, because the cst tool in version 3.3.1 fails for hab
Engine = SW with hab Features =
The older versions of cst tool had no problem with it.
I rework it to
#ifdef SETUP_HABV4_FEATURES
hab FEATURES = SETUP_HABV4_FEATURES
#endif
>
> Sascha
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2020-09-17 9:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 7:37 [PATCH v2 0/2] i.MX6ULL: set engine software for Secure Boot on HABv4 Maik Otto
2020-09-11 7:37 ` [PATCH v2 1/2] arch: arm: boards phytec: Split flash header for pcl063 with i.MX6Ul and i.MX6ULL Maik Otto
2020-09-11 7:37 ` [PATCH v2 2/2] arch: arm: mach-imx: Add habv4 config file for i.MX6ULL Maik Otto
2020-09-14 8:44 ` Sascha Hauer
2020-09-17 9:35 ` Maik Otto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5bc0d7a-b1ab-823c-311a-da55af2867e2@phytec.de \
--to=m.otto@phytec.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox