简体   繁体   English

yocto 自定义映像将 defconfig 更改应用到 kernel 构建

[英]yocto custom image apply defconfig changes to kernel build

I'm trying to apply some changes to the kernel configuration to my kernel image and to the device tree.我正在尝试将 kernel 配置的一些更改应用于我的 kernel 映像和设备树。 In my custom layer my tree looks like this在我的自定义图层中,我的树看起来像这样

meta-custom/
├── COPYING.MIT
├── README
├── classes
│   └── postprocess_image.bbclass
├── conf
│   └── layer.conf
├── recipes-core
│   └── images
│       └── custom-image.bb
├── recipes-example
│   └── example
│       └── example_0.1.bb
└── recipes-kernel
    └── linux
        ├── linux-qoriq
        │   └── ls1046ardb
        │       ├── 0001-usb0-devicetree-dtsi.patch
        │       └── fragment.cfg
        └── linux-qoriq_5.15.bbappend

and thats the content of my linux-qoriq_.bbappend file:这就是我的 linux-qoriq_.bbappend 文件的内容:

SRC_URI += "file://fragment.cfg"
SRC_URI += "file://0001-usb0-devicetree-dtsi.patch"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGE_ARCH = "${MACHINE_ARCH}"

When I'm running bitbake custom-image during the build process.patch file and the.cfg file are copied to the folder where the linux kernel sources reside ( build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq ) the devicetree patch get's applied correctly to the.dtsi file ( build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/5.15.32+gitAUTOINC+fa6c316859-r0/git/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi ) and everything works as expected.当我在构建过程中运行bitbake custom-image时,将.patch 文件和 .cfg 文件复制到 linux kernel 源所在的文件夹( build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq ) devicetree 补丁正确应用于.dtsi 文件( build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/5.15.32+gitAUTOINC+fa6c316859-r0/git/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi ),一切都按预期工作。 But.cfg file changes are not applied to the build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/defconfig file and also not to the build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/build/.conf file which is used during to kernel build. But.cfg 文件更改不适用于build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/defconfig文件,也不适用于build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/build/.conf文件,在 kernel 构建期间使用。 I also tried to add the modified defconfig file directly to the linux-qoriq_5.15.bbappend file like this:我还尝试将修改后的 defconfig 文件直接添加到 linux-qoriq_5.15.bbappend 文件中,如下所示:

SRC_URI += "file://defconfig"
SRC_URI += "file://0001-usb0-devicetree-dtsi.patch"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGE_ARCH = "${MACHINE_ARCH}"

But using this approach my defconfig file is not getting copied to build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/defconfig respectively overwrites the defconfig file that resides in the build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/ folder.但是使用这种方法,我的 defconfig 文件没有被复制到build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/defconfig分别覆盖驻留在build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/中的 defconfig 文件build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/linux-qoriq/文件夹。 What am I doing wrong here?我在这里做错了什么?

As described in this post https://community.nxp.com/t5/P-Series/qoriq-Linux-append-the-changes-in-kernel-configuration-not/mp.. .如本文所述https://community.nxp.com/t5/P-Series/qoriq-Linux-append-the-changes-in-kernel-configuration-not/mp.. I appended DELTA_KERNEL_DEFCONFIG += "fragment.cfg" to my linux-qoriq_5.15.bbappend file and it looks like this now:我将 DELTA_KERNEL_DEFCONFIG += "fragment.cfg" 附加到我的 linux-qoriq_5.15.bbappend 文件中,现在看起来像这样:

SRC_URI += "file://fragment.cfg"
SRC_URI += "file://0001-usb0-devicetree-dtsi.patch"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:
DELTA_KERNEL_DEFCONFIG += "fragment.cfg"
PACKAGE_ARCH = "${MACHINE_ARCH}"

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

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