From nobody Tue Mar 3 04:50:50 2026 X-Original-To: dev-commits-src-all@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 4fQ3K632L1z6Tkhf for ; Tue, 03 Mar 2026 04:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fQ3K60kj7z49gd for ; Tue, 03 Mar 2026 04:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772513450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFCDrgGfm+0HqFfiECW5Spw7cpp1nQbog1eBfd3EF2M=; b=ZlJ4LKHW8A9IKGuIxP9Tg1EONbyrFFhlm8jLOFrz6d8B9AfgzaWEmpbt5iQZsdOtLrVGq9 ogkiCPIorgRreFgqn2P+xcE4Ifn9lFK0gUwKOhQdcXCbNNJwo1dq/2qKx3gPfchXW8WrAO mc4zys6klgTQREcQmh6BDa5f1wVZ1bo8DH8qx15/JmlWRUSRg6lSFqfDKeak7jhxe/qWYW cP4TDMxGKogZNOWP4U6n7v896OfEkTkIDiC3PC+43CPsIvJmR1ExRVxBUqJbQHDagFwYOS wCADw+qaqteHfThV6EQJ+7lMN5kMmGfJe2iQJMawdheFNlKDi3Qrcu9CGuU4mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772513450; a=rsa-sha256; cv=none; b=uxWTDxqvHBkM32honROESH5tct6GtfF6WjmdvQlGMsTFRx7/Vt4CvGjL4gg4B3FZ5ltp17 Cls+tljS4+Q+cUi2F94we/THyT2Q0y8pOWQUwiuKiEDCYxLTlIidXrki5pMGAND6vM6yqF 2ZMKMLm1ZpOuMaUfJO3wSAREeMczCtjlZhGuVg1tJ7zLDQVyZYuif4nfBdp6qyHuKXo7OK uefe+1tHFFtWchFcHaFW1UUCjCGA7eAYoYlfaLpnvYjJvkm3FuvcykcZ7GpjGoHL3Sv4wD HKsXKR1WdFRsqEiwVu0pHSh8d78/vPaKEpAKpovpZHuEG/e6Fj6qvLjFCKyMPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772513450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tFCDrgGfm+0HqFfiECW5Spw7cpp1nQbog1eBfd3EF2M=; b=cQb+x6Q9MP/Jqg6qlQarSPdkCbq/pdHvb0swS83GtIYWH5x60/w4CDSYwgA9RB0yYQciQu NySg6KTKSPIRsiIRTnXxOATPIjgXaHZFRcgRQ8BBpl3bE+I1L04BJzVLv613mdIn0489NU BZQlmPUiDoUxybY6HN4RMEVPimOG5wgH8DtET3vnE7bBZuAZwUzY6yok0OcxsEGbu8qNfz e8hgWPPmNywqptsFNm/DPpTaeRWpJ5blLQibQh+LblFjNYc/IQ6NU0LvQSfDT/lKdFWoWw SLMYLEVQMicm8y2FTQXu2tEm8dnLNXX/sl3SvCZqudDNFCjLLlDbVUBEnIrk1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fQ3K604Pyz15qB for ; Tue, 03 Mar 2026 04:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3785e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 03 Mar 2026 04:50:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: c47cefba8312 - main - Only build USB-related modules if MK_USB != no List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c47cefba831240a1b3de375f18134b93cf998f5c Auto-Submitted: auto-generated Date: Tue, 03 Mar 2026 04:50:50 +0000 Message-Id: <69a668aa.3785e.4a16f236@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c47cefba831240a1b3de375f18134b93cf998f5c commit c47cefba831240a1b3de375f18134b93cf998f5c Author: Enji Cooper AuthorDate: 2026-03-03 04:49:54 +0000 Commit: Enji Cooper CommitDate: 2026-03-03 04:50:03 +0000 Only build USB-related modules if MK_USB != no This change moves the thunderbolt module and other USB modules under a MK_USB != no conditional to ensure that users not desiring USB support can easily build systems without USB-specific drivers using this knob. MFC after: 1 week Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D55576 --- sys/conf/kern.opts.mk | 5 +++++ sys/conf/kmod.mk | 8 ++++++-- sys/modules/Makefile | 16 ++++++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 81b117492916..f26a44eb61f5 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -47,6 +47,7 @@ __DEFAULT_YES_OPTIONS = \ SOURCELESS_UCODE \ SPLIT_KERNEL_DEBUG \ TESTS \ + USB \ USB_GADGET_EXAMPLES \ ZFS @@ -207,6 +208,10 @@ MK_KERNEL_SYMBOLS:= no MK_DTRACE:= no .endif +.if ${MK_USB} == "no" +MK_USB_GADGET_EXAMPLES:= no +.endif + # Some modules only compile successfully if option FDT is set, due to #ifdef FDT # wrapped around declarations. Module makefiles can optionally compile such # things using .if !empty(OPT_FDT) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 17358428a023..4f1509592483 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -103,10 +103,14 @@ LINUXKPI_GENSRCS+= \ pci_iov_if.h \ pcib_if.h \ vnode_if.h \ - usb_if.h \ - opt_usb.h \ opt_stack.h +.if ${MK_USB} != "no" +LINUXKPI_GENSRCS+= \ + usb_if.h \ + opt_usb.h +.endif + LINUXKPI_INCLUDES+= \ -I${SYSDIR}/compat/linuxkpi/common/include \ -I${SYSDIR}/compat/linuxkpi/dummy/include \ diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 49a15588e9a5..a4100c31ef26 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -356,7 +356,7 @@ SUBDIR= \ ${_rtw89} \ rtwn \ rtwn_pci \ - rtwn_usb \ + ${_rtwn_usb} \ ${_rtwnfw} \ ${_s3} \ ${_safe} \ @@ -411,7 +411,7 @@ SUBDIR= \ ${_ufshci} \ uinput \ unionfs \ - usb \ + ${_usb} \ ${_vesa} \ ${_vf_i2c} \ virtio \ @@ -710,6 +710,14 @@ SUBDIR+= ktest SUBDIR+= tests .endif +.if ${MK_USB} != "no" || defined(ALL_MODULES) +_rtwn_usb= rtwn_usb +_usb= usb +. if ${MACHINE_CPUARCH} == "amd64" +_thunderbolt= thunderbolt +. endif +.endif + .if ${MK_ZFS} != "no" || defined(ALL_MODULES) SUBDIR+= zfs .endif @@ -938,10 +946,6 @@ _bcm283x_pwm= bcm283x_pwm _neta= neta .endif -.if ${MACHINE_CPUARCH} == "amd64" -_thunderbolt= thunderbolt -.endif - .if !(${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 110000) # LLVM 10 crashes when building if_malo_pci.c, fixed in LLVM11: # https://bugs.llvm.org/show_bug.cgi?id=44351