public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
To: "Kiszka, Jan" <jan.kiszka@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Koch, Stefan" <stefan-koch@siemens.com>
Subject: RE: [PATCH 1/3] module.inc: fix kbuild dependency
Date: Fri, 10 May 2024 04:44:42 +0000	[thread overview]
Message-ID: <AS4PR10MB53183612F4AC536B715314FDEDE72@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <3efadbf0-296e-4b60-be4c-ce615d828776@siemens.com>

Kiszka, Jan, Donnerstag, 9. Mai 2024 19:35:
> On 09.05.24 12:34, Adriaan Schmidt wrote:
> > This achieves two things:
> >
> > * Module builds explicitly depend on linux-kbuild-* as build dependency.
> >   Previously we only had an implicit RDEPENDS in linux-custom, which is
> >   not sufficient. For linux-distro, this means we need to PROVIDE linux-
> kbuild.
> > * Remove the unconditional building of native kbuild when it is
> >   not needed, i.e. when we're not actually cross-building a module
> >
> > Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> > ---
> >  meta/recipes-kernel/linux-module/module.inc | 5 ++++-
> >  meta/recipes-kernel/linux/linux-custom.inc  | 3 ---
> >  meta/recipes-kernel/linux/linux-distro.bb   | 1 +
> >  3 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-
> kernel/linux-module/module.inc
> > index eddbf177..7d65c96a 100644
> > --- a/meta/recipes-kernel/linux-module/module.inc
> > +++ b/meta/recipes-kernel/linux-module/module.inc
> > @@ -17,7 +17,10 @@ PN .= "-${KERNEL_NAME}"
> >
> >  KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}"
> >  KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}"
> > -DEPENDS += "${KERNEL_HEADERS_PKG}"
> > +KERNEL_KBUILD_PKG ??= "linux-kbuild-${KERNEL_NAME}"
> > +DEPENDS += " \
> > +    ${KERNEL_HEADERS_PKG} \
> > +    ${KERNEL_KBUILD_PKG}${@'-native' if
> bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')) else ''}"
> 
> Isn't -native always available, thus can't we simply depend on the
> native variant unconditionally?

Huh, you're right... I guess I missed that feature (that you added) :)
v2 coming up...

Adriaan

> Jan
> 
> >  DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}"
> >
> >  SIGNATURE_KEYFILE ??= ""
> > diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-
> kernel/linux/linux-custom.inc
> > index 0d222332..35c61187 100644
> > --- a/meta/recipes-kernel/linux/linux-custom.inc
> > +++ b/meta/recipes-kernel/linux/linux-custom.inc
> > @@ -148,9 +148,6 @@ PROVIDES += "${RECIPE_PROVIDES}"
> >  # Append build profiles
> >  DEB_BUILD_PROFILES += "${BUILD_PROFILES}"
> >
> > -# Add dependency to build -kbuildtarget and -native automatically
> > -RDEPENDS:append:cross-profile = " ${BPN}-native"
> > -
> >  def get_kernel_arch(d):
> >      distro_arch = d.getVar("DISTRO_ARCH")
> >      if distro_arch in ["amd64", "i386"]:
> > diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-
> kernel/linux/linux-distro.bb
> > index bc43528c..13b8dc7e 100644
> > --- a/meta/recipes-kernel/linux/linux-distro.bb
> > +++ b/meta/recipes-kernel/linux/linux-distro.bb
> > @@ -10,6 +10,7 @@ python() {
> >      for kernel in distro_kernels.split():
> >          d.appendVar('PROVIDES', ' linux-image-' + kernel)
> >          d.appendVar('PROVIDES', ' linux-headers-' + kernel)
> > +        d.appendVar('PROVIDES', ' linux-kbuild-' + kernel)
> >      if d.getVar('KERNEL_IMAGE_PKG'):
> >          d.appendVar('PROVIDES', ' ' + d.getVar('KERNEL_IMAGE_PKG'))
> >      if d.getVar('KERNEL_HEADERS_PKG'):
> 
> --
> Siemens AG, Technology
> Linux Expert Center


  reply	other threads:[~2024-05-10  4:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 10:34 [PATCH 0/3] Kbuild follow-up Adriaan Schmidt
2024-05-09 10:34 ` [PATCH 1/3] module.inc: fix kbuild dependency Adriaan Schmidt
2024-05-09 17:35   ` Jan Kiszka
2024-05-10  4:44     ` Schmidt, Adriaan [this message]
2024-05-09 10:34 ` [PATCH 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE Adriaan Schmidt
2024-05-09 10:34 ` [PATCH 3/3] kbuildtarget.bbclass: add missing license header Adriaan Schmidt
2024-05-09 17:35 ` [PATCH 0/3] Kbuild follow-up 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=AS4PR10MB53183612F4AC536B715314FDEDE72@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM \
    --to=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=stefan-koch@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