Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2022 17:23:48 -0300
From:      Mitchell Horne <mhorne@freebsd.org>
To:        John Baldwin <jhb@FreeBSD.org>, Andrew Turner <andrew@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 701ab6dba4a2 - main - Stop building FDT-only modules in an ACPI only kernel
Message-ID:  <b7bd480b-d9e7-b140-30b1-fce8292435b7@freebsd.org>
In-Reply-To: <a342ae9c-c688-5536-0feb-534d8a6975c3@FreeBSD.org>
References:  <202210271759.29RHxoXe019330@gitrepo.freebsd.org> <a342ae9c-c688-5536-0feb-534d8a6975c3@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 10/28/22 12:59, John Baldwin wrote:
> On 10/27/22 10:59 AM, Andrew Turner wrote:
>> The branch main has been updated by andrew:
>>
>> URL: 
>> https://cgit.FreeBSD.org/src/commit/?id=701ab6dba4a2232751cd91f79bfc1d8e96bf5316
>>
>> commit 701ab6dba4a2232751cd91f79bfc1d8e96bf5316
>> Author:     Andrew Turner <andrew@FreeBSD.org>
>> AuthorDate: 2022-10-27 17:01:44 +0000
>> Commit:     Andrew Turner <andrew@FreeBSD.org>
>> CommitDate: 2022-10-27 17:59:33 +0000
>>
>>      Stop building FDT-only modules in an ACPI only kernel
>>      When building a kernel without FDT these modules don't build. As 
>> they
>>      depend on FDT and don't work with ACPI disable them.
>>      Reviewed by:    imp, kevans
>>      Sponsored by:   The FreeBSD Foundation
>>      Differential Revision: https://reviews.freebsd.org/D37178
> 
> Hmm, the OPT_FDT handling seems a bit atypical.  Other optional 
> components are
> tested for by ${KERN_OPTS:M<foo>} rather than empty(OPT_<foo>) under 
> sys/modules.
> 

Some time ago I experimented with trying to build a NOFDT kernel like 
this. I found that this type of construct worked well:

SUBDIR.${MK_FDT}= ${_allwinner} \
                   ${_if_cgem} \
                   ${_sdhci_fdt} \
                   ...

That is, use the existing SUBDIR.yes logic to conditionally exclude 
these already conditional subdirectories. It avoids multiple identical 
checks, whether you use ${KERN_OPTS:MFDT} or empty(OPT_FDT) forms. 
Something to consider.

Mitchell



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b7bd480b-d9e7-b140-30b1-fce8292435b7>