Bug 15424

Summary: Can use fragments with no defaults if previous build had defconfig
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: kernelAssignee: Bruce Ashfield <bruce.ashfield>
Status: ACCEPTED --- QA Contact:
Severity: normal    
Priority: Medium+ CC: anis.bougrine10, randy.macleod, richard.purdie, tim.orling
Version: 4.3   
Target Milestone: 6.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2024-03-07 10:42:17 UTC
If I build a kernel with a defconfig in SRC_URI and no KCONFIG_MODE set then merge_config.sh is passed -n so that it does a 'default=no' build on the assumption that the defconfig is absolutely complete.

If I then decide to use fragments but do not clean the kernel build, do_kernel_configme() will see the defconfig still remains in the work tree and pass -n to merge_config.sh still.

This <cough> can result in much confusion as to why many kernel options that should be enabled by default are not when writing new fragments.
Comment 1 Bruce Ashfield 2024-03-07 14:07:10 UTC
I can think of two ways to fix this off the top of my head:

a) make sure that the defconfig in workdir is listed as something that needs to be cleaned

b) if there's no in-tree defconfig specified and no defconfig in the SRC_URI that is found, ignore/delete on if located in WORKDIR.

Any preferences ?
Comment 2 Randy MacLeod 2025-04-24 18:54:46 UTC
Bulk move as requesting during YP BB meeting.
Comment 3 Bougrine Anis 2026-08-22 16:52:21 UTC
If I am not mistaken, this issue has been resolved thanks to this commit https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=86fec41b1e809d1a2fa2feadc26d29020df53d39
isn't it ?