Bug 5785 - Make it possible to sync a defconfig from WORKDIR back to the metadata
Summary: Make it possible to sync a defconfig from WORKDIR back to the metadata
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-02-04 11:35 UTC by Laszlo Papp
Modified: 2023-06-22 15:18 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Papp 2014-02-04 11:35:54 UTC
It would be nice if it was possible to do the following with just configuration, and perhaps a path/variable set where to sync up to.

When I am trying to configure the Linux kernel, busybox, or u-boot, I am issuing something like this:

    bitbake -c menuconfig busybox
    find ./tmp/work -name busybox-A.B.C\*
    cp ./tmp/work/armv5te-foo-linux-gnueabi/busybox/1.20.2-r7/busybox-1.20.2/.config ../meta-foo/recipes-core/busybox/busybox-1.20.2/defconfig

As you can see, this is a bit tiresome, and more importantly: error prone!

I have had several occasions now where I forgot the third setup (or even the second) to sync up explicitly which caused us some debugging for hours by the time we realized the real issue is the omitted sync up.
Comment 1 Darren Hart 2014-02-06 15:51:04 UTC
There is a similar (not identical) bug for creating a makecfgfrag (Bug 3862). A similar thing could be created for makedefconfig. However, I don't think we want bitbake tasks to write content to the layer meta-data themselves. It could dump it in tmp/work/..deploy for easier extraction.

Alternatively, it could just copy the command to the console to make finding the fragment/.config easier.
Comment 2 Laszlo Papp 2014-02-06 17:42:23 UTC
That would still be an additional task that I would need to remember to do. In an ideal world, I do not forget it, but it would still be more error-prone than ideal.

If it is not done by bitbake, then it is fine to get it done by some other util, but I would like to solve it centrally and automatically.
Comment 3 Paul Eggleton 2017-06-22 15:42:03 UTC
devtool provides a framework for this kind of workflow and has basic support for saving the kernel config back to the recipe. devtool still needs additional enhancement for working on the kernel though (see bugs 10417, 11188) and I'm not sure it covers the entirety of what's described here either.
Comment 4 Richard Purdie 2019-06-13 15:14:28 UTC
Just to summarise this bug is about making it easier to take the final defconfig in WORKDIR and add it back to the metadata.
Comment 5 Randy MacLeod 2023-06-22 15:18:43 UTC
We should open specific bugs as per Paul in comment 3 for where devtool needs to be improved.