Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2023 20:21:53 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Andriy Gapon <andriy.gapon@uabsd.com>
Cc:        Warner Losh <imp@freebsd.org>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: f7026fbbb2bd - main - sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES and WITHOUT_MODULES
Message-ID:  <CANCZdfo1djFv50BjzfUxRF1T1nAmRQnFYmdvMgE9Zx1gzaw6Mw@mail.gmail.com>
In-Reply-To: <9dc638fb-8cb9-ec8c-a57b-ce748f1a89f4@uabsd.com>
References:  <202210291633.29TGXwma076672@gitrepo.freebsd.org> <9dc638fb-8cb9-ec8c-a57b-ce748f1a89f4@uabsd.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000c095ee05f1a409f2
Content-Type: text/plain; charset="UTF-8"

On Thu, Jan 5, 2023 at 3:51 AM Andriy Gapon <andriy.gapon@uabsd.com> wrote:

> On 2022-10-29 19:33, Warner Losh wrote:
> > The branch main has been updated by imp:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=f7026fbbb2bd72176d73921dd2dd5e4b263d5103
> >
> > commit f7026fbbb2bd72176d73921dd2dd5e4b263d5103
> > Author:     Warner Losh <imp@FreeBSD.org>
> > AuthorDate: 2022-10-29 14:34:16 +0000
> > Commit:     Warner Losh <imp@FreeBSD.org>
> > CommitDate: 2022-10-29 16:17:40 +0000
> >
> >      sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES
> and WITHOUT_MODULES
> >
> >      MODULES_OVERRIDE has traditionally taken precedence over
> EXTRA_MODULES
> >      and WITHOUT_MODULES as the exact list of modules to build. Over
> time,
> >      things have been added that has broken this. Move the .endif that
> makes
> >      this the case to the right place. The so called 'ALL_MODULES'
> option is
> >      the only thing with higher precedence, but it's not quite all the
> >      options anymore (though it is much more of them, and doesn't quite
> >      work on !x86).
> >
> >      Sponsored by:           Netflix
>
> Warner,
>
> this change broke one use-case of mine.  The use-case does not seem to
> be exotic, so others may be affected as well.
>
> I am building a custom arm64 kernel and a set of modules for a specific
> SoC (rockchip).
> The kernel configuration, similarly to GENERIC, has this statement:
>         include         "std.rockchip"
>
> In turn, std.rockchip has this statement:
>         # DTBs
>         makeoptions     MODULES_EXTRA+="dtb/rockchip"
>
> Additionally, in my make.conf I have MODULES_OVERRIDE set to a short
> list of modules.
>
> Previously this worked without issues, completely transparently.
> Now, MODULES_OVERRIDE apparently cancels MODULES_EXTRA.
> I can easily add dtb/rockchip to my MODULES_OVERRIDE, of course, but I
> get a feeling that the previous behavior was more useful because it
> allowed to specify mandatory "internal" modules in addition to a
> user-specified list of modules.  Not sure what's the benefit of the
> traditional behavior that you restored, it's not spelled out.
>
> TLDR: dtb-s and dtbo-s are not getting build for anyone with
> MODULES_OVERRIDE in make.conf (on relevant platforms).
>

I'm swamped after the holidays. I've put this in my queue to consider, but
it may be a week or three before I get to it. Please hassle me in a couple
weeks if I somehow drop this on the floor. It seems like there's an issue
here, but I need to look through the details and I won't have the time for
a few days...

Warner


> > ---
> >   sys/modules/Makefile | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/sys/modules/Makefile b/sys/modules/Makefile
> > index 00afbffb1baf..3a009f071cab 100644
> > --- a/sys/modules/Makefile
> > +++ b/sys/modules/Makefile
> > @@ -848,8 +848,6 @@ _nvram=           opal_nvram
> >   _nvram+=    powermac_nvram
> >   .endif
> >
> > -.endif
> > -
> >   .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64"
> >   _bcm283x_clkman=  bcm283x_clkman
> >   _bcm283x_pwm=  bcm283x_pwm
> > @@ -867,6 +865,8 @@ SUBDIR+=${MODULES_EXTRA}
> >   SUBDIR:= ${SUBDIR:N${reject}}
> >   .endfor
> >
> > +.endif # MODULES_OVERRIDE -- Keep last
> > +
> >   # Calling kldxref(8) for each module is expensive.
> >   .if !defined(NO_XREF)
> >   .MAKEFLAGS+=        -DNO_XREF
>
> --
> Andriy Gapon
>
> https://standforukraine.com
> https://razomforukraine.org
>
>

--000000000000c095ee05f1a409f2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jan 5, 2023 at 3:51 AM Andriy=
 Gapon &lt;<a href=3D"mailto:andriy.gapon@uabsd.com">andriy.gapon@uabsd.com=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
On 2022-10-29 19:33, Warner Losh wrote:<br>
&gt; The branch main has been updated by imp:<br>
&gt; <br>
&gt; URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Df7026fbbb2bd=
72176d73921dd2dd5e4b263d5103" rel=3D"noreferrer" target=3D"_blank">https://=
cgit.FreeBSD.org/src/commit/?id=3Df7026fbbb2bd72176d73921dd2dd5e4b263d5103<=
/a><br>
&gt; <br>
&gt; commit f7026fbbb2bd72176d73921dd2dd5e4b263d5103<br>
&gt; Author:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org&gt;<br>
&gt; AuthorDate: 2022-10-29 14:34:16 +0000<br>
&gt; Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org&gt;<br>
&gt; CommitDate: 2022-10-29 16:17:40 +0000<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 sys/modules: MODULES_OVERRIDE takes precedence ove=
r EXTRA_MODULES and WITHOUT_MODULES<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 MODULES_OVERRIDE has traditionally taken precedenc=
e over EXTRA_MODULES<br>
&gt;=C2=A0 =C2=A0 =C2=A0 and WITHOUT_MODULES as the exact list of modules t=
o build. Over time,<br>
&gt;=C2=A0 =C2=A0 =C2=A0 things have been added that has broken this. Move =
the .endif that makes<br>
&gt;=C2=A0 =C2=A0 =C2=A0 this the case to the right place. The so called &#=
39;ALL_MODULES&#39; option is<br>
&gt;=C2=A0 =C2=A0 =C2=A0 the only thing with higher precedence, but it&#39;=
s not quite all the<br>
&gt;=C2=A0 =C2=A0 =C2=A0 options anymore (though it is much more of them, a=
nd doesn&#39;t quite<br>
&gt;=C2=A0 =C2=A0 =C2=A0 work on !x86).<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0Netflix<br>
<br>
Warner,<br>
<br>
this change broke one use-case of mine.=C2=A0 The use-case does not seem to=
 <br>
be exotic, so others may be affected as well.<br>
<br>
I am building a custom arm64 kernel and a set of modules for a specific <br=
>
SoC (rockchip).<br>
The kernel configuration, similarly to GENERIC, has this statement:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 include=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;=
std.rockchip&quot;<br>
<br>
In turn, std.rockchip has this statement:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # DTBs<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 makeoptions=C2=A0 =C2=A0 =C2=A0MODULES_EXTRA+=
=3D&quot;dtb/rockchip&quot;<br>
<br>
Additionally, in my make.conf I have MODULES_OVERRIDE set to a short <br>
list of modules.<br>
<br>
Previously this worked without issues, completely transparently.<br>
Now, MODULES_OVERRIDE apparently cancels MODULES_EXTRA.<br>
I can easily add dtb/rockchip to my MODULES_OVERRIDE, of course, but I <br>
get a feeling that the previous behavior was more useful because it <br>
allowed to specify mandatory &quot;internal&quot; modules in addition to a =
<br>
user-specified list of modules.=C2=A0 Not sure what&#39;s the benefit of th=
e <br>
traditional behavior that you restored, it&#39;s not spelled out.<br>
<br>
TLDR: dtb-s and dtbo-s are not getting build for anyone with <br>
MODULES_OVERRIDE in make.conf (on relevant platforms).<br></blockquote><div=
><br></div><div>I&#39;m swamped after the holidays. I&#39;ve put this in my=
 queue to consider, but it may be a week or three before I get to it. Pleas=
e hassle me in a couple weeks if I somehow drop this on the floor. It seems=
 like there&#39;s an issue here, but I need to look through the details and=
 I won&#39;t have the time for a few days...</div><div><br></div><div>Warne=
r<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x">
&gt; ---<br>
&gt;=C2=A0 =C2=A0sys/modules/Makefile | 4 ++--<br>
&gt;=C2=A0 =C2=A01 file changed, 2 insertions(+), 2 deletions(-)<br>
&gt; <br>
&gt; diff --git a/sys/modules/Makefile b/sys/modules/Makefile<br>
&gt; index 00afbffb1baf..3a009f071cab 100644<br>
&gt; --- a/sys/modules/Makefile<br>
&gt; +++ b/sys/modules/Makefile<br>
&gt; @@ -848,8 +848,6 @@ _nvram=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
opal_nvram<br>
&gt;=C2=A0 =C2=A0_nvram+=3D=C2=A0 =C2=A0 powermac_nvram<br>
&gt;=C2=A0 =C2=A0.endif<br>
&gt;=C2=A0 =C2=A0<br>
&gt; -.endif<br>
&gt; -<br>
&gt;=C2=A0 =C2=A0.if ${MACHINE_CPUARCH} =3D=3D &quot;arm&quot; || ${MACHINE=
_CPUARCH} =3D=3D &quot;aarch64&quot;<br>
&gt;=C2=A0 =C2=A0_bcm283x_clkman=3D=C2=A0 bcm283x_clkman<br>
&gt;=C2=A0 =C2=A0_bcm283x_pwm=3D=C2=A0 bcm283x_pwm<br>
&gt; @@ -867,6 +865,8 @@ SUBDIR+=3D${MODULES_EXTRA}<br>
&gt;=C2=A0 =C2=A0SUBDIR:=3D ${SUBDIR:N${reject}}<br>
&gt;=C2=A0 =C2=A0.endfor<br>
&gt;=C2=A0 =C2=A0<br>
&gt; +.endif # MODULES_OVERRIDE -- Keep last<br>
&gt; +<br>
&gt;=C2=A0 =C2=A0# Calling kldxref(8) for each module is expensive.<br>
&gt;=C2=A0 =C2=A0.if !defined(NO_XREF)<br>
&gt;=C2=A0 =C2=A0.MAKEFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 -DNO_XREF<br>
<br>
-- <br>
Andriy Gapon<br>
<br>
<a href=3D"https://standforukraine.com" rel=3D"noreferrer" target=3D"_blank=
">https://standforukraine.com</a><br>;
<a href=3D"https://razomforukraine.org" rel=3D"noreferrer" target=3D"_blank=
">https://razomforukraine.org</a><br>;
<br>
</blockquote></div></div>

--000000000000c095ee05f1a409f2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfo1djFv50BjzfUxRF1T1nAmRQnFYmdvMgE9Zx1gzaw6Mw>