From: Uladzimir Bely <ubely@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
Cedric Hombourger <cedric.hombourger@siemens.com>,
isar-users@googlegroups.com
Subject: Re: [PATCH] linux-custom: support vendor directories via HEADERS_INSTALL_EXTRA
Date: Tue, 27 Aug 2024 19:49:19 +0300 [thread overview]
Message-ID: <83897bff2e447acb0da6d2d5e8e986b9c101e5d9.camel@ilbers.de> (raw)
In-Reply-To: <e464c354-5030-47f2-91f0-65e4dfc27e36@siemens.com>
On Tue, 2024-08-27 at 18:12 +0200, Jan Kiszka wrote:
> On 27.08.24 17:48, Uladzimir Bely wrote:
> > On Sat, 2024-08-10 at 23:58 +0200, 'Cedric Hombourger' via isar-
> > users
> > wrote:
> > > Some vendor kernels come with additional directories to be
> > > included
> > > in the
> > > linux-headers package in order to support building of their out-
> > > of-
> > > tree
> > > drivers. HEADERS_INSTALL_EXTRA may be set to a list of
> > > directories
> > > relative
> > > to ${S} in any kernel recipes that includes linux-custom.inc
> > >
> > > Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
> > > ---
> > > RECIPE-API-CHANGELOG.md | 12
> > > ++++++++++++
> > > .../linux/files/debian/isar/install.tmpl | 6 ++++++
> > > meta/recipes-kernel/linux/linux-custom.inc | 12
> > > ++++++++++++
> > > 3 files changed, 30 insertions(+)
> > >
> > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> > > index 65cd98b3..21c558d2 100644
> > > --- a/RECIPE-API-CHANGELOG.md
> > > +++ b/RECIPE-API-CHANGELOG.md
> > > @@ -634,3 +634,15 @@ into kernel kbuild package.
> > >
> > > When downloading from debian snapshot mirrors, rate limits might
> > > apply.
> > > To limit the amount of parallel fetching to n kB / s, you can
> > > set
> > > `ISAR_APT_DL_LIMIT="<n>`.
> > > +
> > > +### Custom directories in vendor kernels
> > > +
> > > +Some vendor kernels come with additional directories to be
> > > included
> > > in the
> > > +linux-headers package in order to support building of their out-
> > > of-
> > > tree
> > > +drivers. `HEADERS_INSTALL_EXTRA` may be set to a list of
> > > directories
> > > relative
> > > +to ${S} in any kernel recipes that includes `linux-custom.inc`.
> > > A
> > > l4t kernel
> > > +recipe would use the following setting:
> > > +
> > > +```
> > > +HEADERS_INSTALL_EXTRA += "nvidia"
> > > +```
> > > diff --git a/meta/recipes-
> > > kernel/linux/files/debian/isar/install.tmpl
> > > b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > > index 00011517..0a7bdd66 100644
> > > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > > @@ -193,6 +193,12 @@ kernel_headers() {
> > > (cd ${S}; find arch/${ARCH} -name module.lds -o -name
> > > Kbuild.platforms -o -name Platform) >>${src_hdr_files}
> > > (cd ${S}; find $(find arch/${ARCH} -name include -o -name
> > > scripts -type d) -type f) >>${src_hdr_files}
> > >
> > > + if [ -n "${HEADERS_INSTALL_EXTRA}" ]; then
> > > + for d in ${HEADERS_INSTALL_EXTRA}; do
> > > + (cd ${S}; find ${d} -type f) >>${src_hdr_files}
> > > + done
> > > + fi
> > > +
> > > if [ -n "${CONFIG_MODULES}" ]; then
> > > echo Module.symvers >> ${obj_hdr_files}
> > > fi
> > > diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> > > b/meta/recipes-kernel/linux/linux-custom.inc
> > > index 6aa70fd3..7e312b75 100644
> > > --- a/meta/recipes-kernel/linux/linux-custom.inc
> > > +++ b/meta/recipes-kernel/linux/linux-custom.inc
> > > @@ -48,6 +48,8 @@ LINUX_VERSION_EXTENSION ?= ""
> > >
> > > KERNEL_DEFCONFIG ??= ""
> > >
> > > +HEADERS_INSTALL_EXTRA ??= ""
> > > +
> > > # Add our template meta-data to the sources
> > > FILESPATH:append := ":${FILE_DIRNAME}/files"
> > > SRC_URI += "file://debian"
> > > @@ -84,6 +86,7 @@ TEMPLATE_VARS += " \
> > > KAFLAGS \
> > > DISTRIBUTOR \
> > > KERNEL_EXTRA_BUILDARGS \
> > > + HEADERS_INSTALL_EXTRA \
> > > "
> > >
> > > inherit dpkg
> > > @@ -224,6 +227,15 @@ do_prepare_build:prepend() {
> > >
> > > # produce a changelog for our kernel build
> > > deb_add_changelog
> > > +
> > > + # make sure user-specified directories do exist in ${S}
> > > + if [ -n "${HEADERS_INSTALL_EXTRA}" ]; then
> > > + for d in ${HEADERS_INSTALL_EXTRA}; do
> > > + [ -d ${S}/${d} ] || {
> > > + bbfatal "HEADERS_INSTALL_EXTRA:
> > > '${d}' not found in \${S}!"
> > > + }
> > > + done
> > > + fi
> > > }
> > >
> > > # build directory for our "full" kernel build
> > > --
> > > 2.39.2
> > >
> >
> > Hello all.
> >
> > The patch is checked in CI and it passes OK, but it's still not
> > clear
> > from a discussion if it's worth applying. Or should this new
> > feature
> > leave on a downstrem side?
> >
>
> I said in my reply that "we apparently need this", now that we have
> two
> downstream kernels with this pain.
>
> We then had some unfinished (IIRC) follow-up discussion around
> ccache,
> but that should not delay this change.
>
> Jan
>
OK, got you. Thanks for the answer.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/83897bff2e447acb0da6d2d5e8e986b9c101e5d9.camel%40ilbers.de.
next prev parent reply other threads:[~2024-08-27 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 21:58 'Cedric Hombourger' via isar-users
2024-08-11 8:10 ` 'Jan Kiszka' via isar-users
2024-08-11 8:35 ` 'cedric.hombourger@siemens.com' via isar-users
2024-08-11 9:04 ` 'Jan Kiszka' via isar-users
2024-08-12 11:41 ` 'MOESSBAUER, Felix' via isar-users
2024-08-12 11:57 ` 'cedric.hombourger@siemens.com' via isar-users
2024-08-12 12:14 ` 'Jan Kiszka' via isar-users
2024-08-27 15:48 ` Uladzimir Bely
2024-08-27 16:12 ` 'Jan Kiszka' via isar-users
2024-08-27 16:49 ` Uladzimir Bely [this message]
2024-08-27 16:58 ` Uladzimir Bely
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=83897bff2e447acb0da6d2d5e8e986b9c101e5d9.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=cedric.hombourger@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@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