From: Jan Kiszka <jan.kiszka@siemens.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
<isar-users@googlegroups.com>
Subject: Re: [PATCH 1/1] add support to set KBUILD_BUILD_TIMESTAMP for custom kernels
Date: Mon, 21 Mar 2022 18:18:22 +0100 [thread overview]
Message-ID: <33854e3c-f3a6-b667-5e67-18c22b646619@siemens.com> (raw)
In-Reply-To: <20220321144017.3684886-1-felix.moessbauer@siemens.com>
On 21.03.22 15:40, Felix Moessbauer wrote:
> This patch adds the infrastructure to overwrite the
> KBUILD_BUILD_TIMESTAMP environment variable for custom kernel
> builds. By that, we improve the support for reproducible
> kernel builds.
>
Agreed.
> Setting this to a fixed string further helps to profit from
> ccache caching on repeated builds.
Hmm, but the practical impact of this variable should have been limited
/wrt ccache. I was seeing significant build-time reduction before the
commit already.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> meta/recipes-kernel/linux/files/debian/isar/build.tmpl | 1 +
> meta/recipes-kernel/linux/files/debian/isar/common.tmpl | 2 ++
> meta/recipes-kernel/linux/linux-custom.inc | 3 +++
> 3 files changed, 6 insertions(+)
>
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> index b7749cec..32d2eb23 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
> @@ -34,6 +34,7 @@ print_settings() {
> # ---------------
> # ARCH=${ARCH}
> # CROSS_COMPILE=${CROSS_COMPILE}
> +# KBUILD_BUILD_TIMESTAMP=${KBUILD_BUILD_TIMESTAMP}
> EOF
> }
>
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> index b7752fb6..ffe84745 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> @@ -7,6 +7,7 @@ ARCH=${KERNEL_ARCH}
> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
> KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
> +KBUILD_BUILD_TIMESTAMP="${KBUILD_BUILD_TIMESTAMP}"
>
> # Constants
> KCONF=.config
> @@ -36,6 +37,7 @@ main() {
>
> # variables to be exported
> export ARCH
> + export KBUILD_BUILD_TIMESTAMP
>
> # are we cross-compiling?
> BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index 8a5dbf82..f8e87453 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -33,6 +33,8 @@ KERNEL_HEADERS_DEBIAN_DEPENDS ?= "libc6, \
>
> KERNEL_LIBC_DEV_DEPLOY ?= "0"
>
> +KBUILD_BUILD_TIMESTAMP ??= "LANG=C $(date)"
Can't we use SOURCE_DATE_EPOCH like the rest?
> +
> # Settings that may be changed on a per distro, machine or layer basis
> # --------------------------------------------------------------------
>
> @@ -73,6 +75,7 @@ TEMPLATE_VARS += " \
> LINUX_VERSION_EXTENSION \
> KERNEL_NAME_PROVIDED \
> KERNEL_CONFIG_FRAGMENTS \
> + KBUILD_BUILD_TIMESTAMP \
> "
>
> inherit dpkg
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
next prev parent reply other threads:[~2022-03-21 17:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 14:40 Felix Moessbauer
2022-03-21 17:18 ` Jan Kiszka [this message]
2022-03-21 17:33 ` Moessbauer, Felix
2022-03-21 17:51 ` Jan Kiszka
2022-03-22 8:54 ` Moessbauer, Felix
2022-03-22 14:49 ` Jan Kiszka
2022-03-22 17:27 ` Moessbauer, Felix
2022-03-22 18:52 ` 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=33854e3c-f3a6-b667-5e67-18c22b646619@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=felix.moessbauer@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