Closed rob-baily closed 1 year ago
@noglitch I was wondering if you had a chance to review this? I would be happy to submit a pull request. I am thinking now that the second option I put forth to copy the KBUILD_DEFCONFIG defined file to .config would match up better with the kernel class recipe.
Hi @rob-baily, It was intentionally set that In case KBUILD_DEFCONFIG is set and defconfig file is present, the defconfig file takes priority and KBUILD_DEFCONFIG is ignored, because the defconfig file in meta-atmel may contain some necessary configs for the specified board that are not upstreamed yet.
If you want to use a custom defconfig you can simply include the line SRC_URI:append:sama5 = " file://defconfig" in your bbappend file by introducing a custom defconfig in your layer which would probably replace the defconfig from meta-atmel layer.
@gehariprasath your thoughts?
I've submitted https://github.com/linux4sam/meta-atmel/pull/229 which removes KBUILD_DEFCONFIG but keeps the same functionality. I'd love SoC vendors to stop rolling out their custom do_config...
Thanks for the PR @alexandrebelloni, It has been merged, hence closing this issue.
I have been trying to use a custom defconfig in the Linux kernel build for Yocto using KBUILD_DEFCONFIG in a bbappend file and have been struggling with it. I believe I finally got to the root of the issue. In the recipes-kernel linux.inc there is this code:
There are 2 issues that I had:
SRC_URI_append_sama5 += "file://defconfig"
so the first part of the if condition is always true because defconfig is included in SRC_URI so the KBUILD_DEFCONFIG value was not being used.I had to work around this issue by including the line
SRC_URI_remove_sama5 += "file://defconfig"
in my bbappend file to be able to to use KBUILD_DEFCONFIG but this was not obvious based on what I saw in the recipe and include file. I still think this does not address the second bullet where the file already exists.I am thinking that it would be best to remove the first check on whether the defconfig exists so that if KBUILD_DEFCONFIG it is always processed. Thoughts or questions? If it seems good I can submit a pull request. Another option might be to put a KBUILD_DEFCONFIG file straight to ,config because in the core poky meta kernel.bbclass there is a note in the kernel_do_configure function: