You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

STM32MP平台linux-5.15-stm32mp-r2.2适配U-Boot版本及编译问题咨询

STM32MP内核升级后U-Boot适配问题

问题背景

原项目使用Linux内核v5.15-stm32mp-r2与U-Bootv2021.10-stm32mp-r2,升级内核至linux-5.15-stm32mp-r2.2后,尝试使用U-Bootv2022.10-stm32mp-r2编译报错:

Error: arch/arm/dts/.stm32mp157c-ccb-mx.dtb.pre.tmp:1478.1-6 Label or path sram not found
FATAL ERROR: Syntax error parsing input tree
Check /home/vivekb/workspace/source/NGACEM-269/SSB-buildroot/output/build/uboot-custom/arch/arm/dts/.stm32mp157c-ccb-mx.dtb.pre.tmp for errors
make[4]: *** [scripts/Makefile.lib:336: arch/arm/dts/stm32mp157c-ccb-mx.dtb] Error 1
make[3]: *** [dts/Makefile:44: arch-dtbs] Error 2
make[2]: *** [Makefile:1173: dts/dt.dtb] Error 2
make[1]: *** [package/pkg-generic.mk:293: /home/vivekb/workspace/source/NGACEM-269/SSB-buildroot/output/build/uboot-custom/.stamp_built] Error 2
make: *** [Makefile:84: _all] Error 2

将DTS中的&sram改为&sram4后,又出现新错误:

DTC     arch/arm/dts/stm32mp157c-ccb-mx.dtb
arch/arm/dts/stm32mp157c-ccb-mx.dtb: ERROR (phandle_references): /ahb/m4@10000000/m4_system_resources/can@4400e000: Reference to non-existent node or label "scmi_clk"

arch/arm/dts/stm32mp157c-ccb-mx.dtb: ERROR (phandle_references): /ahb/m4@10000000/m4_system_resources/can@4400f000: Reference to non-existent node or label "scmi_clk"

ERROR: Input tree has errors, aborting (use -f to force output)

版本兼容性结论

linux-5.15-stm32mp-r2.2与U-Bootv2022.10-stm32mp-r2不兼容。STM32MP官方采用内核与U-Boot版本同步维护策略,5.15内核分支对应的U-Boot版本应为v2021.10-stm32mp-r2.2,二者属于同一系列维护分支,设备树定义、硬件适配逻辑完全对齐。

错误解决与版本选择

1. 推荐方案:切换至配套U-Boot版本

直接使用U-Boot v2021.10-stm32mp-r2.2,无需修改设备树即可正常编译,且能保证与linux-5.15-stm32mp-r2.2的完全兼容性,避免后续出现更多适配问题。

2. 备选方案:适配U-Boot v2022.10-stm32mp-r2(不推荐)

若必须使用该版本,需针对设备树差异逐一修正:

  • 已完成的sram→sram4修改正确,需保留。
  • 针对scmi_clk未找到的错误:
    检查U-Boot源码中stm32mp157c.dtsi等基础设备树文件,找到CAN控制器对应的正确时钟节点标签,替换原DTS中的scmi_clk;或在设备树中补充scmi_clk节点的定义,确保与U-Boot v2022.10的SCMI框架适配。

内容的提问来源于stack exchange,提问作者thecdoctor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 23:49:56