Automate retrieval of Linux defconfig #116
Comments
Do you want me split the linux-yocto-efi-test_4.10.bb into 2 parts and add linux-yocto-efi-test_4.10.bbappend and move few functions over bbappend ? or Should I just go ahead just modify with the above functionality as you have suggested and remove alldefconfig |
I don't think we need a linux-yocto-efi-test_4.10.bbappend. the do_unpack_append can be written in the current linux-yocto-efi-test_4.10.bb. It would do something like this do_unpack_append() { Also, do_unpack is written in python. Hence, the append, needs to either be written in python or have it written as a sh function and called from do_unpack_append with bb.build.exec_func('sh_function', d). |
Thanks Ricardo, I looked into the meta/classes/kernel-yocto.bbclass the function do_kernel_configme() If we are not using "allnoconfig", "alldefconfig" than the 3rd condition will be keep a copy of defconfig (a copy of x86_64-defconfig or i386_defconfig or defconfig from arm64) in ${WORKDIR} if [ -f ${WORKDIR}/defconfig ]; then i.e nothing but the implementation something like Retrieve the defconfig from respective architecture of kernel source and keep it as defconfig inside kernel source directory.do_unpack_append() { Let me know your thoughts on above implementation. |
Hi Naresh, Yes, that is exactly what I had in mind. Perhaps I would explicitly use some bitbake variables for the copy. For instance: Also, I am not sure where exactly the defconfig is put. I think it is unde ${WORKDIR}/qemu${TARGET_ARCH} As a stretch, the arch/${arch}/configs/${configarch}_defconfig patter is repeated for the three supported archs. It would be great if the copy could be done in a single line by simply using variables. Unfortunately the tree lines have subtle differences. For instance, for x86 i386 and x86_64 are under the same directory; arm64 does not have a prefix in the defconfig filename. Thus, it is not trivial. If you find a way of making it nice it would be great. If not, I am happy with the three separate copy lines. Ah, also it would be good to make the two last ifs as elifs and maybe a final else that returns an error. |
I think the simple way to implement this feature is to use of 2 variables And create a SCC file e.g. using patches http://www.yoctoproject.org/docs/1.6.1/kernel-dev/kernel-dev.html#scc-reference And apply the SCC file using below variable. KERNEL_FEATURES_append_aarch64 += " features/qemuaarch64.scc" I have't tried it yet, I am going to try this method. Let me know if you have any suggestions. |
Yes this sounds good to me. I am not if we need the KERNEL_FEATURES_append_parts. Wouldn't it be sufficient to have the .scc files in the SRC_URI? I really don't know. Also, this would need to rename our current .cfg fragments. Would KERNEL_FEATURES work with .cfg file? Something to ponder. |
I could able to solve the automatic retrieval of defconfig and merge the config fragment as .cfg files in a very simple way. STEP 1. We have to remove the defconfig from STEP 2. This is how automatic defconfig is retrieved I have verified and confirmed the defconfig as follows, $ bitbake -c devshell linux-yocto-efi-test You will get a devshell for kernel and verified the defconfig and other patches diff, root@nareshbhat: STEP 3. The third step is merging. With the switch case "-m -r" for merge_config.sh in file meta/classes/kernel-yocto.bbclass and under function do_kernel_configme generates the .config file which is being used by the function do_configure If this solution looks feasible. I will cleanup and issue patches on ML. |
Patches are posted on ML - https://lists.01.org/pipermail/luv/2017-May/001766.html |
v1 version of patches posted on ML - https://lists.01.org/pipermail/luv/2017-May/001800.html |
Hi Naresh
I took a look at your patches. I'll post my comments tomorrow.
Thanks and BR,
Ricardo
…On May 16, 2017 1:11 PM, "Naresh Bhat" ***@***.***> wrote:
v1 version of patches posted on ML - https://lists.01.org/
pipermail/luv/2017-May/001800.html
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAldaN4gxWIhJLh5UA95XRFlVlFOPUQPks5r6gMKgaJpZM4MbtSM>
.
|
v2 version set of patches got merged - https://lists.01.org/pipermail/luv/2017-June/001834.html I think we can close the issue. |
Thanks for the patches! |
The Yocto Project kconfig scripts expects a defconfig when building Linux. We add configuration fragments on top of the ARCH_defconfig for all the CPU architectures we support.
Instead of using patches to update our defconfig, it could be possible to pull it directly from the Linux source tree.
In the past we tried to get rid of the defconfig by passing
--alldefconfig to the Yocto kconfig script. Looking at the script's
comments, --alldefconfig does the following:
alldefconfig: Fills in any missing symbols with Kconfig default
Which I don't think is what we want.
Perhaps this could be implemented with an unpack_append task that copies
${TARGET_ARCH}/configs/{TARGET_ARCH}_defconfig into ${S}/defconfig.
The text was updated successfully, but these errors were encountered: