All of lore.kernel.org
 help / color / mirror / Atom feed
* KBUILD_DEFCONFIG_KMACHINE not used anywhere
@ 2017-11-07 13:46 Alan Martinovic
  2017-11-07 17:47 ` Bruce Ashfield
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Martinovic @ 2017-11-07 13:46 UTC (permalink / raw)
  To: Yocto-mailing-list

Hi,
I'm trying to get yocto to build the kernel with an in-tree defconfig.
For that I found references to the variable KBUILD_DEFCONFIG_KMACHINE.

However, I've been experiencing that the kernel is being built with
some default defconfig, and not the in-tree one that came with the
kernel and I defined with the KBUILD_DEFCONFIG_KMACHINE.

I've looked through all yocto sources for where the
KBUILD_DEFCONFIG_KMACHINE is actually used, and found it only in my
kernel recipe. So I decided to dissect my recipe.

There is a:

inherit kernel

in my recipe for which, besides others, defines how the kernel config
will be selected.
Looking at the sources of oe/meta/classes/kernel.bbclass exposes how
the kernel configuration happens:

kernel_do_configure() {
        # fixes extra + in /lib/modules/2.6.37+
        # $ scripts/setlocalversion . => +
        # $ make kernelversion => 2.6.37
        # $ make kernelrelease => 2.6.37+
        touch ${B}/.scmversion ${S}/.scmversion

        if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f
"${B}/.config" ]; then
                mv "${S}/.config" "${B}/.config"
        fi

        # Copy defconfig to .config if .config does not exist. This allows
        # recipes to manage the .config themselves in do_configure_prepend().
        if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
                cp "${WORKDIR}/defconfig" "${B}/.config"
        fi

        ${KERNEL_CONFIG_COMMAND}
}


I'm planning a workaround by overriding the do_configure in my recipe
to select the correct defconfig from the kernel. It does seem however
like the KBUILD_DEFCONFIG_KMACHINE is exactly here to not have to do
the workarounds.

Anyone has experiences with successfully using KBUILD_DEFCONFIG_KMACHINE?
Is it a specific poky feature (I'm not using poky but specific open
embedded layers and bitbake)?

Be Well,
Alan

Ref.
https://www.yoctoproject.org/docs/2.2/kernel-dev/kernel-dev.html#using-an-in-tree-defconfig-file


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-09 16:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 13:46 KBUILD_DEFCONFIG_KMACHINE not used anywhere Alan Martinovic
2017-11-07 17:47 ` Bruce Ashfield
2017-11-09 13:11   ` Alan Martinovic
2017-11-09 14:13     ` Bruce Ashfield
2017-11-09 15:53       ` Alan Martinovic
2017-11-09 15:59         ` Bruce Ashfield
2017-11-09 16:31           ` Alan Martinovic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.