Skip to contentSkip to conversation

arm: fix imx_* defconfig

PATCH In review Denis Benato 3 participants 7 messages May 10, 2025 – May 12, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm: fix imx_* defconfig

Compiling the kernel using affected imx defconfigs lead to a hard CPU crash that reaches a state where each register, including PC ends up in 0xDEADBEEF.

That is because the SoC support depending on CONFIG_ARCH_MXC gets disabled since CONFIG_ARCH_NXP is not defined while said feature depends on it.

The default arm defconfig is unaffected as it defines CONFIG_ARCH_NXP=y correctly as excepted.

These patches solve the crash causing my confusion:
https://lore.kernel.org/all/[email protected]

Denis Benato (3):
ARM: imx_v4_v5_defconfig: define CONFIG_ARCH_NXP
ARM: imx_v6_v7_defconfig: define CONFIG_ARCH_NXP
ARM: imxrt_defconfig: define CONFIG_ARCH_NXP

 arch/arm/configs/imx_v4_v5_defconfig | 1 +
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 arch/arm/configs/imxrt_defconfig     | 1 +
 3 files changed, 3 insertions(+)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/3 ARM: imx_v4_v5_defconfig: define CONFIG_ARCH_NXP

Define CONFIG_ARCH_NXP so that CONFIG_ARCH_MXC won't be disabled as it depends on CONFIG_ARCH_NXP.

---
 arch/arm/configs/imx_v4_v5_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/imx_v4_v5_defconfig +1 -0
index 875c8cdbada7..19e26b4a9fb7 100644
@@ -11,6 +11,7 @@ CONFIG_PROFILING=y
 CONFIG_ARCH_MULTI_V4T=y
 CONFIG_ARCH_MULTI_V5=y
 # CONFIG_ARCH_MULTI_V7 is not set
+CONFIG_ARCH_NXP=y
 CONFIG_ARCH_MXC=y
 CONFIG_SOC_IMX1=y
 CONFIG_SOC_IMX25=y
Signature · 1 line
2.49.0
reviewer
#2 lore raw

Re: [PATCH 1/3] ARM: imx_v4_v5_defconfig: define CONFIG_ARCH_NXP

Quoted 3 lines · Denis Benato

Define CONFIG_ARCH_NXP so that CONFIG_ARCH_MXC won't be disabled as it depends on CONFIG_ARCH_NXP.

This is not correct.

$ make imx_v4_v5_defconfig
#
# configuration written to .config
#
$ cat .config | grep CONFIG_ARCH_MXC
CONFIG_ARCH_MXC=y

CONFIG_ARCH_NXP is an arm64 option.

#3 lore raw

PATCH 2/3 ARM: imx_v6_v7_defconfig: define CONFIG_ARCH_NXP

In reply to Denis Benato

Define CONFIG_ARCH_NXP so that CONFIG_ARCH_MXC won't be disabled as it depends on CONFIG_ARCH_NXP.

---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/imx_v6_v7_defconfig +1 -0
index 062c1eb8dd60..22edc6d17520 100644
@@ -13,6 +13,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_EXPERT=y
 CONFIG_PERF_EVENTS=y
 CONFIG_ARCH_MULTI_V6=y
+CONFIG_ARCH_NXP=y
 CONFIG_ARCH_MXC=y
 CONFIG_SOC_IMX31=y
 CONFIG_SOC_IMX35=y
Signature · 1 line
2.49.0
#4 lore raw

PATCH 3/3 ARM: imxrt_defconfig: define CONFIG_ARCH_NXP

In reply to Denis Benato

Define CONFIG_ARCH_NXP so that CONFIG_ARCH_MXC won't be disabled as it depends on CONFIG_ARCH_NXP.

---
 arch/arm/configs/imxrt_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/imxrt_defconfig +1 -0
index 52dba3762996..7cc1555c0231 100644
@@ -2,6 +2,7 @@
 CONFIG_BPF_SYSCALL=y
 CONFIG_SCHED_AUTOGROUP=y
 # CONFIG_MMU is not set
+CONFIG_ARCH_NXP=y
 CONFIG_ARCH_MXC=y
 CONFIG_SOC_IMXRT=y
 CONFIG_SET_MEM_PARAM=y
Signature · 1 line
2.49.0
maintainer
#5 lore raw
In reply to Denis Benato

Hi Denis,

Quoted 8 lines · Denis Benato

Compiling the kernel using affected imx defconfigs lead to a hard CPU crash that reaches a state where each register, including PC ends up in 0xDEADBEEF.

That is because the SoC support depending on CONFIG_ARCH_MXC gets disabled since CONFIG_ARCH_NXP is not defined while said feature depends on it.

Quoted 5 lines

The default arm defconfig is unaffected as it defines CONFIG_ARCH_NXP=y correctly as excepted.

These patches solve the crash causing my confusion:
https://lore.kernel.org/all/[email protected]

In this mail you say you want to start a ARMv8 i.MX8MM board. The configs you are changing are for old 32bit ARMv4-7 SoCs. arch/arm64/configs/defconfig is for you.

Sascha

Quoted 15 lines

Denis Benato (3):
ARM: imx_v4_v5_defconfig: define CONFIG_ARCH_NXP
ARM: imx_v6_v7_defconfig: define CONFIG_ARCH_NXP
ARM: imxrt_defconfig: define CONFIG_ARCH_NXP

 arch/arm/configs/imx_v4_v5_defconfig | 1 +
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 arch/arm/configs/imxrt_defconfig     | 1 +
 3 files changed, 3 insertions(+)
Signature · 1 line
2.49.0
Signature · 4 lines
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 |
#6 lore raw
Quoted 11 lines · Sascha Hauer

Hi Denis,

Quoted 8 lines · Denis Benato

Compiling the kernel using affected imx defconfigs lead to a hard CPU crash that reaches a state where each register, including PC ends up in 0xDEADBEEF.

That is because the SoC support depending on CONFIG_ARCH_MXC gets disabled since CONFIG_ARCH_NXP is not defined while said feature depends on it.

Quoted 8 lines
Quoted 5 lines

The default arm defconfig is unaffected as it defines CONFIG_ARCH_NXP=y correctly as excepted.

These patches solve the crash causing my confusion:
https://lore.kernel.org/all/[email protected]

In this mail you say you want to start a ARMv8 i.MX8MM board. The configs you are changing are for old 32bit ARMv4-7 SoCs. arch/arm64/configs/defconfig is for you.

Hello and thanks for both of your answers.

Yes, I have made the mistake of using that defconfig for arm while building an arm64 kernel.

I am sorry and thank you both for correcting me.

Please, ignore these patches.

Denis B.

Quoted 16 lines

Sascha

Quoted 14 lines

Denis Benato (3):
ARM: imx_v4_v5_defconfig: define CONFIG_ARCH_NXP
ARM: imx_v6_v7_defconfig: define CONFIG_ARCH_NXP
ARM: imxrt_defconfig: define CONFIG_ARCH_NXP

 arch/arm/configs/imx_v4_v5_defconfig | 1 +
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 arch/arm/configs/imxrt_defconfig     | 1 +
 3 files changed, 3 insertions(+)
Signature · 1 line
2.49.0