From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v2] linux-custom: fall back to using "make defconfig" when no config given
Date: Fri, 26 Oct 2018 15:57:22 +0300 [thread overview]
Message-ID: <fb083ac1-c208-bbf8-75f6-8aab264497c8@ilbers.de> (raw)
In-Reply-To: <d1829ab2-6d90-09bd-9ba7-e18596d34770@siemens.com>
On 10/17/18 9:48 PM, Jan Kiszka wrote:
> From: Henning Schild <henning.schild@siemens.com>
>
> This allows us to write kernel recipes that do not have to bring what
> they consider their defconfig. If KERNEL_DEFCONFIG is empty, do not
> attempt to copy a file into the tree and call "make defconfig" instead
> of "make olddefconfig".
Applied to the 'next'.
Thanks,
Maxim.
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> [Jan: avoid negation in test]
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> As I started to use that patch, I'm sending already v2 on behalf of
> Henning.
>
> meta/recipes-kernel/linux/files/build-kernel.sh | 6 +++++-
> meta/recipes-kernel/linux/linux-custom.inc | 6 ++++--
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
> index 3f39d43..32d62bf 100644
> --- a/meta/recipes-kernel/linux/files/build-kernel.sh
> +++ b/meta/recipes-kernel/linux/files/build-kernel.sh
> @@ -34,7 +34,11 @@ REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>
> cd $1
> -make olddefconfig
> +if [ -e .config ]; then
> + make olddefconfig
> +else
> + make defconfig
> +fi
>
> 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 8c89637..e9a68fd 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -10,7 +10,7 @@ FILESPATH =. "${LAYERDIR_core}/recipes-kernel/linux/files:"
> DESCRIPTION ?= "Custom kernel"
>
> KERNEL_NAME_PROVIDED ?= "${@ d.getVar('PN', True).partition('linux-')[2]}"
> -KERNEL_DEFCONFIG ?= "defconfig"
> +KERNEL_DEFCONFIG ?= ""
>
> python() {
> kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
> @@ -43,7 +43,9 @@ dpkg_runbuild() {
> # Install package builder script
> sudo install -m 755 ${WORKDIR}/build-kernel.sh ${BUILDCHROOT_DIR}
>
> - sudo cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
> + if [ -n "${KERNEL_DEFCONFIG}" ]; then
> + sudo cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
> + fi
>
> E="${@ bb.utils.export_proxies(d)}"
>
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
prev parent reply other threads:[~2018-10-26 12:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 18:48 Jan Kiszka
2018-10-26 12:57 ` Maxim Yu. Osipov [this message]
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=fb083ac1-c208-bbf8-75f6-8aab264497c8@ilbers.de \
--to=mosipov@ilbers.de \
--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