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 <<a href=3D"mailto:andriy.gapon@uabsd.com">andriy.gapon@uabsd.com= </a>> 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> > The branch main has been updated by imp:<br> > <br> > 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> > <br> > commit f7026fbbb2bd72176d73921dd2dd5e4b263d5103<br> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2022-10-29 14:34:16 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2022-10-29 16:17:40 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0 sys/modules: MODULES_OVERRIDE takes precedence ove= r EXTRA_MODULES and WITHOUT_MODULES<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 MODULES_OVERRIDE has traditionally taken precedenc= e over EXTRA_MODULES<br> >=C2=A0 =C2=A0 =C2=A0 and WITHOUT_MODULES as the exact list of modules t= o build. Over time,<br> >=C2=A0 =C2=A0 =C2=A0 things have been added that has broken this. Move = the .endif that makes<br> >=C2=A0 =C2=A0 =C2=A0 this the case to the right place. The so called &#= 39;ALL_MODULES' option is<br> >=C2=A0 =C2=A0 =C2=A0 the only thing with higher precedence, but it'= s not quite all the<br> >=C2=A0 =C2=A0 =C2=A0 options anymore (though it is much more of them, a= nd doesn't quite<br> >=C2=A0 =C2=A0 =C2=A0 work on !x86).<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=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"= std.rockchip"<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"dtb/rockchip"<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 "internal" modules in addition to a = <br> user-specified list of modules.=C2=A0 Not sure what's the benefit of th= e <br> traditional behavior that you restored, it'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'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. Pleas= e 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...</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"> > ---<br> >=C2=A0 =C2=A0sys/modules/Makefile | 4 ++--<br> >=C2=A0 =C2=A01 file changed, 2 insertions(+), 2 deletions(-)<br> > <br> > diff --git a/sys/modules/Makefile b/sys/modules/Makefile<br> > index 00afbffb1baf..3a009f071cab 100644<br> > --- a/sys/modules/Makefile<br> > +++ b/sys/modules/Makefile<br> > @@ -848,8 +848,6 @@ _nvram=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= opal_nvram<br> >=C2=A0 =C2=A0_nvram+=3D=C2=A0 =C2=A0 powermac_nvram<br> >=C2=A0 =C2=A0.endif<br> >=C2=A0 =C2=A0<br> > -.endif<br> > -<br> >=C2=A0 =C2=A0.if ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE= _CPUARCH} =3D=3D "aarch64"<br> >=C2=A0 =C2=A0_bcm283x_clkman=3D=C2=A0 bcm283x_clkman<br> >=C2=A0 =C2=A0_bcm283x_pwm=3D=C2=A0 bcm283x_pwm<br> > @@ -867,6 +865,8 @@ SUBDIR+=3D${MODULES_EXTRA}<br> >=C2=A0 =C2=A0SUBDIR:=3D ${SUBDIR:N${reject}}<br> >=C2=A0 =C2=A0.endfor<br> >=C2=A0 =C2=A0<br> > +.endif # MODULES_OVERRIDE -- Keep last<br> > +<br> >=C2=A0 =C2=A0# Calling kldxref(8) for each module is expensive.<br> >=C2=A0 =C2=A0.if !defined(NO_XREF)<br> >=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>