mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Maik Otto <m.otto@phytec.de>
To: barebox@lists.infradead.org
Cc: Maik Otto <m.otto@phytec.de>
Subject: [PATCH 2/2] arch: arm: mach-imx: Add habv4 config file for i.MX6ULL
Date: Tue, 8 Sep 2020 12:29:15 +0200	[thread overview]
Message-ID: <1599560955-311228-3-git-send-email-m.otto@phytec.de> (raw)
In-Reply-To: <1599560955-311228-1-git-send-email-m.otto@phytec.de>

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.

Signed-off-by: Maik Otto <m.otto@phytec.de>
---
 .../phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg    | 2 +-
 .../phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg    | 2 +-
 arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h                | 8 ++++++++
 arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h             | 4 ++++
 4 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h

diff --git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg
index b93e81f..e6871d8 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg
@@ -7,4 +7,4 @@
 	wm 32 0x021B0000 0x83180000
 
 #include "flash-header-phytec-pcl063.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/habv4-imx6ull-gencsf.h>
diff --git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg
index f629a8e..d2d7183 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg
+++ 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..ed692a8 100644
--- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
+++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
@@ -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,7 +32,11 @@ hab File = CONFIG_HABV4_CSF_CRT_PEM
 hab [Authenticate CSF]
 
 hab [Unlock]
+#ifndef SETUP_HABV4_ENGINE
 hab Engine = CAAM
+#else
+hab Engine = SETUP_HABV4_ENGINE
+#endif
 hab Features = RNG, MID
 
 hab [Install Key]
diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h b/arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h
new file mode 100644
index 0000000..54c4915
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h
@@ -0,0 +1,4 @@
+
+#define SETUP_HABV4_ENGINE SW
+
+#include <mach/habv4-imx6-gencsf.h>
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2020-09-08 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 10:29 [PATCH 0/2] i.MX6ULL: set engine software for Secure Boot on HABv4 Maik Otto
2020-09-08 10:29 ` [PATCH 1/2] arch: arm: boards phytec: Split flash header for pcl063 with i.MX6Ul and i.MX6ULL Maik Otto
2020-09-08 10:29 ` 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=1599560955-311228-3-git-send-email-m.otto@phytec.de \
    --to=m.otto@phytec.de \
    --cc=barebox@lists.infradead.org \
    /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