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
[-- Attachment #1 --] 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 > > [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 5, 2023 at 3:51 AM Andriy Gapon <<a href="mailto:andriy.gapon@uabsd.com">andriy.gapon@uabsd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="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="https://cgit.FreeBSD.org/src/commit/?id=f7026fbbb2bd72176d73921dd2dd5e4b263d5103" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=f7026fbbb2bd72176d73921dd2dd5e4b263d5103</a><br> > <br> > commit f7026fbbb2bd72176d73921dd2dd5e4b263d5103<br> > Author: Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2022-10-29 14:34:16 +0000<br> > Commit: Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2022-10-29 16:17:40 +0000<br> > <br> > sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES and WITHOUT_MODULES<br> > <br> > MODULES_OVERRIDE has traditionally taken precedence over EXTRA_MODULES<br> > and WITHOUT_MODULES as the exact list of modules to build. Over time,<br> > things have been added that has broken this. Move the .endif that makes<br> > this the case to the right place. The so called 'ALL_MODULES' option is<br> > the only thing with higher precedence, but it's not quite all the<br> > options anymore (though it is much more of them, and doesn't quite<br> > work on !x86).<br> > <br> > Sponsored by: Netflix<br> <br> Warner,<br> <br> this change broke one use-case of mine. 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> include "std.rockchip"<br> <br> In turn, std.rockchip has this statement:<br> # DTBs<br> makeoptions MODULES_EXTRA+="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. Not sure what's the benefit of the <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. 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...</div><div><br></div><div>Warner<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> > ---<br> > sys/modules/Makefile | 4 ++--<br> > 1 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= opal_nvram<br> > _nvram+= powermac_nvram<br> > .endif<br> > <br> > -.endif<br> > -<br> > .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64"<br> > _bcm283x_clkman= bcm283x_clkman<br> > _bcm283x_pwm= bcm283x_pwm<br> > @@ -867,6 +865,8 @@ SUBDIR+=${MODULES_EXTRA}<br> > SUBDIR:= ${SUBDIR:N${reject}}<br> > .endfor<br> > <br> > +.endif # MODULES_OVERRIDE -- Keep last<br> > +<br> > # Calling kldxref(8) for each module is expensive.<br> > .if !defined(NO_XREF)<br> > .MAKEFLAGS+= -DNO_XREF<br> <br> -- <br> Andriy Gapon<br> <br> <a href="https://standforukraine.com" rel="noreferrer" target="_blank">https://standforukraine.com</a><br> <a href="https://razomforukraine.org" rel="noreferrer" target="_blank">https://razomforukraine.org</a><br> <br> </blockquote></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfo1djFv50BjzfUxRF1T1nAmRQnFYmdvMgE9Zx1gzaw6Mw>
