All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Martinovic <alan.martinovic@senic.com>
To: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Yocto-mailing-list <yocto@yoctoproject.org>
Subject: Re: KBUILD_DEFCONFIG_KMACHINE not used anywhere
Date: Thu, 9 Nov 2017 14:11:32 +0100	[thread overview]
Message-ID: <CAOT_U5bj9S+LTPSVjoa0xgHnXfBdgPAbWC8K9rOt3uyv2Re_YQ@mail.gmail.com> (raw)
In-Reply-To: <db7a5271-522c-ea83-ae33-4d1ac3f51c7d@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 4833 bytes --]

>
> What is your kernel recipe ? Something you wrote, or something
> from a vendor ?


Something I inherited.
It does seem to have been based on linux-yocto-custom.bb.


SECTION = "kernel"
DESCRIPTION = "Mainline Linux kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"

COMPATIBLE_MACHINE = "(senic-hub-beta|senic-hub)"

inherit kernel
require recipes-kernel/linux/linux-yocto.inc

KBRANCH = "senic/4.13"
SRCREV = "e469b218af6fe7cb8c50c4395ae9f3204f8033ae"

PV = "4.13+git${SRCPV}"
S = "${WORKDIR}/git"

KBUILD_DEFCONFIG_senic-hub-beta="senic_defconfig"

SRC_URI = "git://
github.com/TheMeaningfulEngineer/senic-os-linux.git;nobranch=1;protocol=git;branch=${KBRANCH}
\
          "


Running it with:

bitbake -v linux-senic


It fails with:

ERROR: linux-senic-4.13+gitAUTOINC+e469b218af-r0 do_kernel_configme: Could
not configure senic-hub-beta-standard
ERROR: linux-senic-4.13+gitAUTOINC+e469b218af-r0 do_kernel_configme:
Function failed: do_kernel_configme (log file is located at
/home/alan/senic-o
s/build/tmp-glibc/work/senic_hub_beta-senic-linux-gnueabi/linux-senic/4.13+gitAUTOINC+e469b218af-r0/temp/log.do_kernel_configme.5641)

ERROR: Logfile of failure stored in:
/home/alan/senic-os/build/tmp-glibc/work/senic_hub_beta-senic-linux-gnueabi/linux-senic/4.13+gitAUTOINC+e469b2
18af-r0/temp/log.do_kernel_configme.5641


Not sure when "-standard" got appended...?
A more exact error seems to be:

linux-senic-4.13+gitAUTOINC+e469b218af-r0 do_kernel_configme: +
configs=[ERROR]: no configuration queue found in outdir (.kernel-meta)


Could it be expecting a "linux-yocto style" with the meta branches?




On Tue, Nov 7, 2017 at 6:47 PM, Bruce Ashfield <bruce.ashfield@windriver.com
> wrote:

> On 11/07/2017 08:46 AM, Alan Martinovic wrote:
>
>> 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.
>>
>
> What is your kernel recipe ? Something you wrote, or something
> from a vendor ?
>
>
>
>> 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)?
>>
> That is a feature of kernel-yocto, so if your recipe is inheriting
> kernel-yocto you can use what you are looking for.
>
> But note, in the documentation you are referencing you have to replace
> KMACHINE with your actual machine .. not use the string KMACHINE.
>
> i.e. in your recipe (or bbappend)
>
> # for cases where the KMACHINE (KERNEL MACHINE) and bitbake
> # machine match, just do this:
> KMACHINE=$MACHINE
>
> KBUILD_DEFCONFIG_${KMACHINE}="your defconfig"
>
> i.e. it is just a standard bitbake variable with a machine OVERRIDE
> to make it specific to the machine you are building.
>
> Bruce
>
>
>
>> Be Well,
>> Alan
>>
>> Ref.
>> https://www.yoctoproject.org/docs/2.2/kernel-dev/kernel-dev.
>> html#using-an-in-tree-defconfig-file
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 7523 bytes --]

  reply	other threads:[~2017-11-09 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOT_U5bj9S+LTPSVjoa0xgHnXfBdgPAbWC8K9rOt3uyv2Re_YQ@mail.gmail.com \
    --to=alan.martinovic@senic.com \
    --cc=bruce.ashfield@windriver.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.