如何在 Yocto 的内核中添加更改的 dts 文件?

How to add changed dts-file in kernel in Yocto?

如何在Yocto项目中添加更改的dts文件和添加自己的配置内核文件(.conf)?我应该更改什么食谱以及如何更改?

为了您的目的,我将创建自己的层然后添加内核 bbhappend :

sources/meta-ziegfried/recipes-kernel/linux/linux-tn-imx_%.bbappend

对于配方的确切名称,您应该指定确切的内核配方名称,而不是我的。要知道你可以做的名字:

$ oe-pkgdata-util lookup-recipe kernel

然后创建一个 sources/meta-ziegfried/recipes-kernel/linux/patchs/ 目录并简单地在补丁中添加您对 dts 的修改:

$ cat sources/meta-ziegfried/recipes-kernel/linux/linux-tn-imx_%.bbappend

FILESEXTRAPATHS_prepend := "${THISDIR}/patchs:"

SRC_URI += " file://0001-add-ziegfried-modified-dts.patch \
       "

瞧瞧,它会自动将您的 dts 添加到内核中。

关于您使用的 yocto 版本的内核配置,您可以使用内核片段:

https://www.yoctoproject.org/docs/2.5/kernel-dev/kernel-dev.html#creating-config-fragments