mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Fabian Pflug <f.pflug@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	 BAREBOX <barebox@lists.infradead.org>
Cc: Fabian Pflug <f.pflug@pengutronix.de>
Subject: [PATCH] arm: i.mx: fix error in field return configuration
Date: Mon, 27 Apr 2026 18:22:55 +0200	[thread overview]
Message-ID: <20260427-v2026-04-0-topic-csf_fixup-v1-1-a7178ecb1b6e@pengutronix.de> (raw)

In the previous version, the newly declared variable had the same name
as the HAB-env variable, resulting in precedence for the HAB-env
variable, resulting in included quotes, when substituting
CONFIG_HABV4_CSF_UNLOCK_UID with the value from defconfig.

The csf tool in turn can't handle the string and replaces it with a
single byte 0x60, which leads to non-bootable images.

Previous:
hab UID = "0x00, 0x11, 0x22, ..., 0xAA"

Now:
hab UID = 0x00, 0x11, 0x22, ..., 0xAA

The variables have to be different and removing the CONFIG_ at the
beginning fulfills this, even though it now looks a bit confusing.

Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
 include/mach/imx/habv4-imx6-gencsf-template.h | 2 +-
 include/mach/imx/habv4-imx8-gencsf.h          | 2 +-
 scripts/Makefile.lib                          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/mach/imx/habv4-imx6-gencsf-template.h b/include/mach/imx/habv4-imx6-gencsf-template.h
index a793496d49..c24bf84b85 100644
--- a/include/mach/imx/habv4-imx6-gencsf-template.h
+++ b/include/mach/imx/habv4-imx6-gencsf-template.h
@@ -43,7 +43,7 @@ hab Features = SETUP_HABV4_FEATURES
 hab [Unlock]
 hab Engine = OCOTP
 hab Features = FIELD RETURN
-hab UID = CONFIG_HABV4_CSF_UNLOCK_UID
+hab UID = HABV4_CSF_UNLOCK_UID
 #endif
 
 hab [Install Key]
diff --git a/include/mach/imx/habv4-imx8-gencsf.h b/include/mach/imx/habv4-imx8-gencsf.h
index d3fe3e34c6..480f88fa95 100644
--- a/include/mach/imx/habv4-imx8-gencsf.h
+++ b/include/mach/imx/habv4-imx8-gencsf.h
@@ -46,7 +46,7 @@ hab Features = SRK REVOKE
 hab [Unlock]
 hab Engine = OCOTP
 hab Features = FIELD RETURN
-hab UID = CONFIG_HABV4_CSF_UNLOCK_UID
+hab UID = HABV4_CSF_UNLOCK_UID
 #endif
 
 hab [Install Key]
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0dbaa071cf..6708802477 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -592,7 +592,7 @@ imxcfg_cpp_flags  = -Wp,-MD,$(depfile) -nostdinc -x assembler-with-cpp \
       $(call overwrite-hab-env,CONFIG_HABV3_IMG_CRT_DER) \
       $(call overwrite-hab-env,CONFIG_HABV4_TABLE_BIN) \
       $(call overwrite-hab-env,CONFIG_HABV4_CSF_CRT_PEM) \
-      -DCONFIG_HABV4_CSF_UNLOCK_UID=$(CONFIG_HABV4_CSF_UNLOCK_UID) \
+      -DHABV4_CSF_UNLOCK_UID=$(CONFIG_HABV4_CSF_UNLOCK_UID) \
       $(call overwrite-hab-env,CONFIG_HABV4_IMG_CRT_PEM) \
 
 dcd-tmp = $(subst $(comma),_,$(dot-target).dcd.tmp)

---
base-commit: c3e3a36f1511a7b4f34061b7be118085b80f7165
change-id: 20260427-v2026-04-0-topic-csf_fixup-b995b5636ed7

Best regards,
-- 
Fabian Pflug <f.pflug@pengutronix.de>




             reply	other threads:[~2026-04-27 16:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 16:22 Fabian Pflug [this message]
2026-04-27 16:35 ` Ahmad Fatoum

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=20260427-v2026-04-0-topic-csf_fixup-v1-1-a7178ecb1b6e@pengutronix.de \
    --to=f.pflug@pengutronix.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