public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Stefan Koch <stefan-koch@siemens.com>, isar-users@googlegroups.com
Cc: christian.storm@siemens.com, michael.adler@siemens.com,
	simon.sudler@siemens.com, cedric.hombourger@siemens.com,
	adriaan.schmidt@siemens.com, felix.moessbauer@siemens.com,
	ubely@ilbers.de
Subject: Re: [PATCH v6 3/5] linux-custom: Provide target and host specific kernel kbuild packages
Date: Mon, 6 May 2024 08:22:27 +0200	[thread overview]
Message-ID: <45ce589f-90fe-4ded-a72f-81b75981ec2f@siemens.com> (raw)
In-Reply-To: <20240214101025.2123540-4-stefan-koch@siemens.com>

On 14.02.24 11:10, Stefan Koch wrote:
> When using a cross build this patch does introduce
> target and host specific kernel kbuild packages that
> ship the "scripts" and "tools" binaries.
> 
> The "-kbuildtarget" and "-native" multiarch bitbake targets are useable to run
> additional target or host specific builds for kbuild scripts and tools.
> 
> Using the "-kbuildtarget" bitbake target enables the build of
> a target specific kbuild package at cross builds.
> So using "linux-kbuild" provides the package for the target platform.
> 
> Using the "-native" bitbake target enables the build of
> a host specific kbuild package at cross builds.
> When cross building using "linux-kbuild-native"
> provides the package for the host platform.
> 
> Only the "host" specific package is built automatically at cross builds.
> 
> This solves this from doc/custom_kernel.inc:
> - The kernel headers package has not supported both native
>   and cross compilation of kernel modules when itself was cross built
> - Future roadmap: Generate kernel headers package for both host
>   and target when using a cross build
> 
> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> ---
>  .../linux/classes/kbuildtarget.bbclass        |  8 ++++
>  .../linux/files/debian/control.tmpl           |  6 ++-
>  .../linux/files/debian/isar/build.tmpl        | 13 ++++-
>  .../linux/files/debian/isar/common.tmpl       |  9 ++++
>  .../linux/files/debian/isar/install.tmpl      | 34 +++++++++-----
>  meta/recipes-kernel/linux/linux-custom.inc    | 47 ++++++++++++++++++-
>  6 files changed, 99 insertions(+), 18 deletions(-)
>  create mode 100644 meta/recipes-kernel/linux/classes/kbuildtarget.bbclass
> 
> diff --git a/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass b/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass
> new file mode 100644
> index 00000000..26369861
> --- /dev/null
> +++ b/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass
> @@ -0,0 +1,8 @@

Missing copyright header, please fix (on top).

> +python kbuildtarget_virtclass_handler() {
> +    pn = e.data.getVar('PN')
> +    if pn.endswith('-kbuildtarget'):
> +        e.data.setVar('BPN', pn[:-len('-kbuildtarget')])
> +        e.data.appendVar('OVERRIDES', ':class-kbuildtarget')
> +}
> +addhandler kbuildtarget_virtclass_handler
> +kbuildtarget_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"

Some newline separators would help with the readability - when at it,
please fix this as well.

Finally, I'm still trying to understand while the -native recipe is
built even in the absence of a kernel module which would need it. This
seems broken.

Jan

-- 
Siemens AG, Technology
Linux Expert Center


  parent reply	other threads:[~2024-05-06  6:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 10:10 [PATCH v6 0/5] linux-custom: Split up binaries from kernel headers to kbuild package Stefan Koch
2024-02-14 10:10 ` [PATCH v6 1/5] linux-custom: Set PROVIDES variable using bitbake overrides Stefan Koch
2024-02-14 10:10 ` [PATCH v6 2/5] linux-custom: Split up binaries from kernel headers to kbuild package Stefan Koch
2024-02-14 10:10 ` [PATCH v6 3/5] linux-custom: Provide target and host specific kernel kbuild packages Stefan Koch
2024-05-05 17:16   ` Jan Kiszka
2024-05-06 10:07     ` Koch, Stefan
2024-05-06 10:46       ` Jan Kiszka
2024-05-06  6:22   ` Jan Kiszka [this message]
2024-07-04  6:12   ` Anton Mikanovich
2024-07-04 12:44     ` 'Koch, Stefan' via isar-users
2024-07-04 13:02       ` 'cedric.hombourger@siemens.com' via isar-users
2024-07-04 13:19         ` 'Koch, Stefan' via isar-users
2024-02-14 10:10 ` [PATCH v6 4/5] linux-module: Support emulated module build with cross-compiled kernel Stefan Koch
2024-02-14 10:10 ` [PATCH v6 5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools Stefan Koch
2024-02-16  7:42 ` [PATCH v6 0/5] linux-custom: Split up binaries from kernel headers to kbuild package MOESSBAUER, Felix
2024-04-15 12:47 ` Uladzimir Bely
2024-04-17  9:29   ` Koch, Stefan
2024-04-23 19:22 ` Uladzimir Bely
2024-04-30 13:10   ` Koch, Stefan

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=45ce589f-90fe-4ded-a72f-81b75981ec2f@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=christian.storm@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=michael.adler@siemens.com \
    --cc=simon.sudler@siemens.com \
    --cc=stefan-koch@siemens.com \
    --cc=ubely@ilbers.de \
    /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