Bug 15424 - Can use fragments with no defaults if previous build had defconfig
Summary: Can use fragments with no defaults if previous build had defconfig
Status: ACCEPTED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: 4.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.1 M3
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-03-07 10:42 UTC by Ross Burton
Modified: 2026-08-22 16:52 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ?