From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH v6 1/5] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
Date: Wed, 18 Dec 2019 20:11:00 +0100 [thread overview]
Message-ID: <dc37bb71db167c8e530610f49af1c61f91f279de.1576696264.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1576696264.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1576696264.git.jan.kiszka@siemens.com>
From: 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). To support this change, a
KERNEL_CONFIG_TARGET variable is passed to the build-kernel.sh script
via the environment.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
meta/recipes-kernel/linux/linux-custom.inc | 9 ++++++++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index b46cefa5..386e58b5 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_CONFIG_TARGET} || exit ${?}
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 17f8464d..712f52bd 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
+ KERNEL_CONFIG_TARGET="${KERNEL_DEFCONFIG}"
if [ -n "${KERNEL_DEFCONFIG}" ]; then
- cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
+ if [ -e "${WORKDIR}/${KERNEL_DEFCONFIG}" ]; then
+ cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
+ KERNEL_CONFIG_TARGET="olddefconfig"
+ fi
+ else
+ KERNEL_CONFIG_TARGET="defconfig"
fi
E="${@ isar_export_proxies(d)}"
@@ -71,6 +77,7 @@ dpkg_runbuild() {
export KERNEL_NAME=${KERNEL_NAME_PROVIDED}
export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
+ export KERNEL_CONFIG_TARGET
export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
export KERNEL_FILE="${KERNEL_FILE}"
export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
--
2.16.4
next prev parent reply other threads:[~2019-12-18 19:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 19:10 [PATCH v6 0/5] linux-custom recipe rework Jan Kiszka
2019-12-18 19:11 ` Jan Kiszka [this message]
2019-12-18 19:11 ` [PATCH v6 2/5] linux-mainline: fix stripping of .0 from the kernel version Jan Kiszka
2019-12-18 19:11 ` [PATCH v6 3/5] linux-mainline: update from 4.19.0 to 4.19.88 Jan Kiszka
2019-12-18 19:11 ` [PATCH v6 4/5] linux-custom: rewrite to no longer depend on the kernel's builddeb Jan Kiszka
2019-12-18 19:11 ` [PATCH v6 5/5] linux-mainline: Test config fragments and LINUX_VERSION_EXTENSION Jan Kiszka
2019-12-26 15:51 ` [PATCH v6 0/5] linux-custom recipe rework Baurzhan Ismagulov
2020-01-31 8:57 ` Henning Schild
2020-01-31 9:04 ` Jan Kiszka
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=dc37bb71db167c8e530610f49af1c61f91f279de.1576696264.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.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