简体   繁体   English

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

[英]How to add changed dts-file in kernel in Yocto?

How to add changed dts file and add own configure kernel file (.conf)in Yocto project?如何在 Yocto 项目中添加更改的 dts 文件并添加自己的配置 kernel 文件(.conf)? What recipe should i change and how?我应该改变什么食谱以及如何改变?

For your purpose I would create my own layer then add kernel bbhappend:出于您的目的,我将创建自己的层,然后添加 kernel bbhappend:

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

for the recipe exact name you should specify your exact kernel recipe name instead of mine.对于配方的确切名称,您应该指定确切的 kernel 配方名称而不是我的。 To know the name you can do:要知道您可以执行的名称:

$ oe-pkgdata-util lookup-recipe kernel

Then create a sources/meta-ziegfried/recipes-kernel/linux/patchs/ directory and simply add your modification of dts within a patch:然后创建一个 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 \
       "

And voilà that will automatically add your dts in the kernel.瞧,它会自动将您的 dts 添加到 kernel 中。

For the kernel conf regarding the yocto version you are using you can use kernel fragment:对于您正在使用的 yocto 版本的 kernel conf,您可以使用 kernel 片段:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM