From: Denys Dmytriyenko <denis@denix.org>
To: Paul Barker <pbarker@toganlabs.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] kernel-module-split: rrecommend kernel-image instead of rdepend
Date: Fri, 8 Sep 2017 16:37:26 -0400 [thread overview]
Message-ID: <20170908203726.GG26405@denix.org> (raw)
In-Reply-To: <CAPyrkgyuQegVc-d694EQgXMuEdBZY4LbjQ4aObCUV1yh=jznjg@mail.gmail.com>
On Fri, Sep 08, 2017 at 09:06:17PM +0100, Paul Barker wrote:
> On Mon, Aug 21, 2017 at 10:21 AM, Martin Hundebøll <mnhu@prevas.dk> wrote:
> > Hard depending on the kernel makes it impossible to install kernel
> > modules without getting the kernel image installed too. This is
> > inconvenient in e.g. initramdisks, where the kernel is loaded from
> > outside the initramdisk.
> >
> > Making the kernel modules rrecommend kernel-image-<version> instead of
> > rdepending on it, makes it possible to install kernel modules without
> > the kernel image by setting "kernel-image" in BAD_RECOMMENDATIONS.
> >
> > Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
> > ---
> > meta/classes/kernel-module-split.bbclass | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
> > index 1035525dac..78843c5474 100644
> > --- a/meta/classes/kernel-module-split.bbclass
> > +++ b/meta/classes/kernel-module-split.bbclass
> > @@ -120,6 +120,11 @@ python split_kernel_module_packages () {
> > rdepends[dep] = []
> > d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
> >
> > + # let kernel modules runtime recommend kernel image
> > + rrecommends = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
> > + rrecommends['kernel-image'] = []
> > + d.setVar('RRECOMMENDS_' + pkg, bb.utils.join_deps(rrecommends, commasep=False))
> > +
> > # Avoid automatic -dev recommendations for modules ending with -dev.
> > d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
> >
> > @@ -138,7 +143,7 @@ python split_kernel_module_packages () {
> > postinst = d.getVar('pkg_postinst_modules')
> > postrm = d.getVar('pkg_postrm_modules')
> >
> > - modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
> > + modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='')
> > if modules:
> > metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
> > d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
> > --
> > 2.14.1
> >
>
> This breaks the method described in the kernel dev FAQ to omit the
> kernel image from the rootfs which is to set the following in a conf
> file:
>
> RDEPENDS_kernel-base = ""
>
> See http://www.yoctoproject.org/docs/2.3.1/kernel-dev/kernel-dev.html#idm45690538384880.
>
> By recommending kernel-image directly instead of recommending the
> top-level kernel-<version> package which was actually removed from
> extra_depends, we skip the inclusion of the kernel-base package. I'm
> not familiar enough with the details of kernel module loading to know
> if the 2 files in kernel-base (modules.builtin and modules.order) are
> strictly needed but I think they should at least be included in via
> recommendation.
>
> As we already have a documented way to omit the kernel image, can we
> revert this?
>
> As an alternative I can send in a patch which changes the recommend to
> the top-level kernel-<version> package instead of kernel-image.
FWIW, this was discussed at #yocto on IRC today. When I first saw the change
several days ago, I was puzzled as well...
The existing method has been in use by many of us for a very long time and
seems to be well documented - I also vote for reverting the change.
--
Denys
next prev parent reply other threads:[~2017-09-08 20:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 8:39 [PATCH] kernel-module-split: rrecommend kernel-image instead of rdepend Martin Hundebøll
2017-08-21 9:04 ` ✗ patchtest: failure for " Patchwork
2017-08-21 9:21 ` [PATCH v2] " Martin Hundebøll
2017-09-08 20:06 ` Paul Barker
2017-09-08 20:20 ` Andre McCurdy
2017-09-08 20:37 ` Denys Dmytriyenko [this message]
[not found] ` <75F5325D-9BEC-49A6-AEF8-75448B46BCF7@prevas.dk>
2017-09-08 21:29 ` Paul Barker
2017-09-11 7:02 ` Martin Hundebøll
2017-09-11 9:26 ` Richard Purdie
2017-09-11 12:19 ` Martin Hundebøll
2017-09-11 12:50 ` Richard Purdie
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=20170908203726.GG26405@denix.org \
--to=denis@denix.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=pbarker@toganlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.