如何在buildroot中正确使用自定义设备树源?

发布于 2025-01-09 15:46:35 字数 661 浏览 0 评论 0原文

我从 /board/arch/arm/boot/dts/imx28-evk.dts 制作了 dts 的副本,以便与我的自定义板一起使用。我的自定义设备树名为 imx28-custom.dts,并在 树外自定义 DTS 菜单项 (BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) 中指向构建根配置。

然而,u-boot 配置为使用现有的 MX28 板配置。构建内核后,我在 /output/images 文件夹中有 imx28-custom.dtbzImage

当系统启动时,u-boot 提示找不到 imx28-evk.dtb。为什么构建了 imx28-custom.dtb 但 u-boot 找不到?为什么 u-boot 找不到自己的设备树 (imx28-evk.dtb) 和我的内核自定义设备树?我假设 BR2_LINUX_KERNEL_CUSTOM_DTS_PATH 仅与内核相关。如果 u-boot 尝试使用自己的 imx28-evk.dtb 来实现此目的,我的自定义设备树如何传递到内核?

I made a copy of the dts from <linux>/board/arch/arm/boot/dts/imx28-evk.dts for using with my custom board. My custom device-tree is named imx28-custom.dts and is pointed in the Out of tree custom DTS menu entry (BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) in the Buildroot config.

However u-boot is configured to use the existing MX28 board config. After building a kernel I have imx28-custom.dtb and zImage in the <buildroot>/output/images folder.

When the system boots, u-boot tells that imx28-evk.dtb is not found. Why was imx28-custom.dtb built but is not found by u-boot? Why u-boot doesn't find its own device-tree (imx28-evk.dtb) for itself and my custom device-tree for the kernel? I assumed that BR2_LINUX_KERNEL_CUSTOM_DTS_PATH relates only to the kernel. How can my custom device-tree be passed to the kernel if u-boot tries to use its own imx28-evk.dtb for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

分开我的手 2025-01-16 15:46:36

U-Boot 抱怨找不到设备树与 Linux 内核有关:启动时,U-Boot 将设备树和内核映像从存储加载到内存中的指定地址,然后将控制权传递给内核。 i.MX28-EVK 板的默认配置是传递 imx28-evk.dtb 文件。

BR2_LINUX_KERNEL_CUSTOM_DTS_PATH 仅用于在要构建和安装的文件中包含自定义设备树,但配置 U-Boot 来使用它。

U-Boot 传递给内核的设备树由 U-Boot 的 CONFIG_DEFAULT_FDT_FILE 选项定义(您可以通过键入 make uboot-menuconfig 来编辑它(请参阅我在end),然后在启动下设置默认 fdt 文件)。此选项应设置为类似 imx28-custom.dtb 的内容。

此处描述了如何从 Buildroot 配置 U-Boot 和此处使它们永久化


对于 i.MX28-EVK,Buildroot 使用 Legacy 构建系统(将使用到 u-boot 2015.04,但配置使用 2020.04),该系统不允许使用make uboot-menuconfig 命令。您应该能够安全地改变这一点。您需要将构建系统设置为Kconfig,并将Board defconfig设置为mx28evk

U-Boot complaining about not finding the device-tree is related to the Linux kernel: when booting, U-Boot loads the device-tree and kernel image from the storage to specified addresses in the memory, and then passes control to the kernel. The default configuration for the i.MX28-EVK board is to pass the imx28-evk.dtb file.

The BR2_LINUX_KERNEL_CUSTOM_DTS_PATH only serves to include the custom device-tree in the files to build and install but does not configure U-Boot to use it.

Which device-tree U-Boot passes to the kernel is defined by U-Boot's CONFIG_DEFAULT_FDT_FILE option (you can edit this by typing make uboot-menuconfig (see my note at the end) then going under Boot to set the Default fdt file). This option should be set to something like imx28-custom.dtb.

How to configure U-Boot from Buildroot is described here and here to make them permanent.


In the case of the i.MX28-EVK, Buildroot uses the Legacy build system (which is to be used up to u-boot 2015.04, but the config uses 2020.04) which does not allow the use of the make uboot-menuconfig command. You should safely be able to change that. You need to set the Build system to Kconfig and set the Board defconfig to mx28evk.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文