From nobody Thu Jan 05 10:51:09 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nnjv85Kv4z2p9Lt; Thu, 5 Jan 2023 10:51:16 +0000 (UTC) (envelope-from andriy.gapon@uabsd.com) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nnjv71rrfz3Nmn; Thu, 5 Jan 2023 10:51:15 +0000 (UTC) (envelope-from andriy.gapon@uabsd.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of andriy.gapon@uabsd.com designates 217.70.183.197 as permitted sender) smtp.mailfrom=andriy.gapon@uabsd.com; dmarc=none Received: (Authenticated sender: andriy.gapon@uabsd.com) by mail.gandi.net (Postfix) with ESMTPSA id 998C21C000C; Thu, 5 Jan 2023 10:51:11 +0000 (UTC) Message-ID: <9dc638fb-8cb9-ec8c-a57b-ce748f1a89f4@uabsd.com> Date: Thu, 5 Jan 2023 12:51:09 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.6.1 Subject: Re: git: f7026fbbb2bd - main - sys/modules: MODULES_OVERRIDE takes precedence over EXTRA_MODULES and WITHOUT_MODULES Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202210291633.29TGXwma076672@gitrepo.freebsd.org> From: Andriy Gapon In-Reply-To: <202210291633.29TGXwma076672@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.39 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.989]; R_SPF_ALLOW(-0.20)[+ip4:217.70.183.192/28]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[217.70.183.197:from]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[uabsd.com]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4Nnjv71rrfz3Nmn X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N 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 > AuthorDate: 2022-10-29 14:34:16 +0000 > Commit: Warner Losh > 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). > --- > 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