From: Cedric Hombourger <cedric_hombourger@mentor.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
"[ext] Henning Schild" <henning.schild@siemens.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
Date: Wed, 6 Nov 2019 17:17:12 +0100 [thread overview]
Message-ID: <2c6cbb85-1bd9-e86f-1c5d-1de9978a86b6@mentor.com> (raw)
In-Reply-To: <030b523c-6e87-34e0-c4dc-2d27a719cbed@siemens.com>
On 11/6/2019 5:03 PM, Jan Kiszka wrote:
> On 24.10.19 20:02, [ext] Henning Schild wrote:
>> Not sure i like that. We are mixing "make target" and .config-filename
>> into one variable. I would rather invent another one.
>>
> Would be in line with Yocto/OE at least.
>
>> KERNEL_CONFIG_FILE ?= "foo"
>> KERNEL_CONFIG_TARGET ?= "olddefconfig"
> Downside: you have to fiddle with both variables when switching from
> defconfig to provide config + olddefconfig.
>
> I think the unified semantic is not that bad. A user still has control
> over file vs. built-in config by not providing that file in the first place.
and I now understand what Henning was suggesting in the first place
the linux-custom patch series I sent yesterday only has KERNEL_DEFCONFIG
as user-visible API. I would agree with Jan that we probably want to
keep it simple for the end-user. I would vote for keeping
KERNEL_DEFCONFIG as the only API but I am happy to discuss what we do
with respect to in-tree / out-of-tree defconfigs. This patch will have
Isar automagically determine where to get the defconfig from. We could
alternatively require the defconfig to be always be part of the tree but
that may make some people unhappy since they may be relying on the
current behavior. Requiring people to copy the in-tree defconfig to
their layer so that Isar can find it does not sound great either. Hence
the current proposal - some sort of middle-ground - well I hope !
Cedric
> Jan
>
>> Henning
>>
>>
>> Am Thu, 24 Oct 2019 11:02:18 +0200
>> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>>
>>> The recipe expected the specified KERNEL_DEFCONFIG to be provided as a
>>> SRC_URI while the kernel already provides many useful defconfigs. The
>>> recipe will now check if the specified configuration can be found in
>>> WORKDIR. If it is found, it will then be used via "make olddefconfig"
>>> as before. It will otherwise assume that it is an in-tree defconfig
>>> and attempt a "make foobar_defconfig" (where foobar_defconfig is the
>>> user-provided KERNEL_DEFCONFIG setting).
>>>
>>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>>> ---
>>> meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
>>> meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++--
>>> 2 files changed, 10 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>>> dcb46f7..cb310f7 100644 ---
>>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,11 +36,7 @@
>>> REPACK_DIR="$1/../repack"
>>> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
>>> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>>> -if [ -e .config ]; then
>>> - make olddefconfig
>>> -else
>>> - make defconfig
>>> -fi
>>> +make ${KERNEL_DEFCONFIG}
>>>
>>> KV=$( make -s kernelrelease )
>>> if [ "${KV}" != "${PV}" ]; then
>>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>>> b/meta/recipes-kernel/linux/linux-custom.inc index 5a34dd1..c53cd90
>>> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
>>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>>> @@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps
>>>
>>> dpkg_runbuild() {
>>> chmod +x ${WORKDIR}/build-kernel.sh
>>> - if [ -n "${KERNEL_DEFCONFIG}" ]; then
>>> - cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
>>> + defconfig="${KERNEL_DEFCONFIG}"
>>> + if [ -n "${defconfig}" ]; then
>>> + if [ -e "${WORKDIR}/${defconfig}" ]; then
>>> + cp ${WORKDIR}/${defconfig} ${S}/.config
>>> + defconfig="olddefconfig"
>>> + fi
>>> + else
>>> + defconfig="defconfig"
>>> fi
>>>
>>> E="${@ bb.utils.export_proxies(d)}"
>>> @@ -72,6 +78,7 @@ dpkg_runbuild() {
>>>
>>> export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
>>> export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
>>> + export KERNEL_DEFCONFIG="${defconfig}"
>>> export KERNEL_FILE="${KERNEL_FILE}"
>>> export
>>> KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
next prev parent reply other threads:[~2019-11-06 16:18 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
2019-10-24 9:02 ` [PATCH 01/10] ci_build.sh: delay "set -x" for a clean --help output Cedric Hombourger
2019-10-24 9:02 ` [PATCH 02/10] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
2019-10-24 17:57 ` Henning Schild
2019-10-24 9:02 ` [PATCH 03/10] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
2019-10-24 9:02 ` [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
2019-10-24 18:02 ` Henning Schild
2019-11-06 16:03 ` Jan Kiszka
2019-11-06 16:17 ` Cedric Hombourger [this message]
2019-10-24 9:02 ` [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
2019-11-06 16:04 ` Jan Kiszka
2019-10-24 9:02 ` [PATCH 06/10] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
2019-10-24 9:02 ` [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use Cedric Hombourger
2019-10-24 18:09 ` Henning Schild
2019-11-06 16:08 ` Jan Kiszka
2019-11-06 16:11 ` Cedric Hombourger
2019-11-06 16:16 ` Jan Kiszka
2019-11-06 16:19 ` Cedric Hombourger
2019-11-06 16:32 ` Jan Kiszka
2019-10-24 9:02 ` [PATCH 08/10] linux-custom: add support for kernel config fragments Cedric Hombourger
2019-10-24 18:21 ` Henning Schild
2019-10-24 18:25 ` Cedric Hombourger
2019-10-24 18:29 ` Henning Schild
2019-10-25 9:45 ` Cedric Hombourger
2019-10-24 9:02 ` [PATCH 09/10] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
2019-10-24 9:02 ` [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel) Cedric Hombourger
2019-10-24 18:13 ` Henning Schild
2019-10-24 18:26 ` Henning Schild
2019-11-06 16:11 ` Jan Kiszka
2019-10-24 18:15 ` [PATCH 00/10] add ci40 machine support + new Isar features Henning Schild
2019-10-24 18:17 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 1/7] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 2/7] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 3/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 4/7] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 5/7] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 6/7] linux-custom: add support for kernel config fragments Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
2019-11-05 20:25 ` chombourger
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=2c6cbb85-1bd9-e86f-1c5d-1de9978a86b6@mentor.com \
--to=cedric_hombourger@mentor.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox