* [PATCH] arm: i.mx: fix error in field return configuration
@ 2026-04-27 16:22 Fabian Pflug
2026-04-27 16:35 ` Ahmad Fatoum
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Pflug @ 2026-04-27 16:22 UTC (permalink / raw)
To: Sascha Hauer, BAREBOX; +Cc: Fabian Pflug
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>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] arm: i.mx: fix error in field return configuration
2026-04-27 16:22 [PATCH] arm: i.mx: fix error in field return configuration Fabian Pflug
@ 2026-04-27 16:35 ` Ahmad Fatoum
0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2026-04-27 16:35 UTC (permalink / raw)
To: Fabian Pflug, Sascha Hauer, BAREBOX
On 4/27/26 6:22 PM, Fabian Pflug wrote:
> 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>
Reviewed-by: Ahmad Fatoum <a.fatoum@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,
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-27 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-27 16:22 [PATCH] arm: i.mx: fix error in field return configuration Fabian Pflug
2026-04-27 16:35 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox