From: Uladzimir Bely <ubely@ilbers.de>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH v2] linux: Allow extra make arguments
Date: Thu, 30 May 2024 08:52:21 +0300 [thread overview]
Message-ID: <62a9add3248d6de73beb7c7675dc5d358a08ed2b.camel@ilbers.de> (raw)
In-Reply-To: <20240522143014.862964-1-amikan@ilbers.de>
On Wed, 2024-05-22 at 17:30 +0300, Anton Mikanovich wrote:
> Add a new variable into TEMPLATE_VARS and the command line -
> KERNEL_EXTRA_BUILDARGS which allows to pass additional arguments for
> kernel building (e.g., LOADADDR=0xC2000040 for stm32mp15x).
>
> Signed-off-by: Ilia Skochilov <iskochilov@ilbers.de>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> Changes since v1:
> - Added usecase in commit message
>
> meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 4 ++--
> meta/recipes-kernel/linux/linux-custom.inc | 4 ++++
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> index 81a6ba8a..bafc5ca4 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> @@ -22,9 +22,9 @@ do_build() {
> sed -i "s/@KR@/${KR}/g" ${S}/debian/control ${S}/debian/linux-
> image-${KERNEL_NAME_PROVIDED}.*
>
> if echo "${DEB_BUILD_PROFILES}" | grep -q "kernel"; then # Build
> kernel scripts and tools
> - ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE}
> KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}"
> + ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE}
> ${KERNEL_EXTRA_BUILDARGS} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}"
> elif echo "${DEB_BUILD_PROFILES}" | grep -q "kbuild"; then #
> Build kernel scripts and tools
> - ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE}
> KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}" scripts
> + ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE}
> ${KERNEL_EXTRA_BUILDARGS} KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}"
> scripts
> if grep -q -E
> "CONFIG_STACK_VALIDATION=y|CONFIG_HAVE_OBJTOOL=y"
> ${KERNEL_BUILD_DIR}/.config && [ -d "tools/objtool" ]; then
> ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE}
> KCFLAGS="${KCFLAGS}" KAFLAGS="${KAFLAGS}" tools/objtool || true
> fi
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc
> index 0d222332..48efad03 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -82,6 +82,7 @@ TEMPLATE_VARS += " \
> KCFLAGS \
> KAFLAGS \
> DISTRIBUTOR \
> + KERNEL_EXTRA_BUILDARGS \
> "
>
> inherit dpkg
> @@ -92,6 +93,9 @@ inherit kbuildtarget
> KCFLAGS ?= "-fdebug-prefix-map=${CURDIR}=."
> KAFLAGS ?= "-fdebug-prefix-map=${CURDIR}=."
>
> +# Add extra arguments to the kernel build
> +KERNEL_EXTRA_BUILDARGS ??= ""
> +
> # Derive name of the kernel packages from the name of this recipe
> KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-
> ')[2]}"
>
> --
> 2.34.1
>
Applied to next.
--
Best regards,
Uladzimir.
prev parent reply other threads:[~2024-05-30 5:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 14:30 Anton Mikanovich
2024-05-30 5:52 ` Uladzimir Bely [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=62a9add3248d6de73beb7c7675dc5d358a08ed2b.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=amikan@ilbers.de \
--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