From owner-freebsd-hackers@freebsd.org Mon Dec 25 21:45:03 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BBE7EA820B for ; Mon, 25 Dec 2017 21:45:03 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E1AB174DD0 for ; Mon, 25 Dec 2017 21:45:02 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: by mailman.ysv.freebsd.org (Postfix) id DD869EA820A; Mon, 25 Dec 2017 21:45:02 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB730EA8209 for ; Mon, 25 Dec 2017 21:45:02 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 52FC974DCF for ; Mon, 25 Dec 2017 21:45:01 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id dfed1bbb; Mon, 25 Dec 2017 22:44:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=YUzH4BDEohLZGJ0SoIoQHQu8Z48=; b=UE11gHlrAMNP9Kiu82weawQbSF9u MPFUTbJio9OY1FIKaXTq97hAAJSNmuG/og+gEuvxU0sEZfKi7jH46dOURWPJbVeR 7jx6De/VDeWKO3pxZI0YSFGoz3QxfGH13tIs9E0h2l1KAWSTNYnpeI0MgCb2jGcR o7bWtGjuMwGc2RQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=K90d8bQJn5WC78bhp0wTqjBhq6VYjMcKZMxVwAB3co4xf5in3JoRlQuH au1v1C3n5dv8WurxWdVx8v1caNzIVV1PCuIrMLo++ZKGUg6xWETfHd801D0bNvj6 tRLFJA4J9Tjd63XMuSYRumll29c3vinWclNbGFuxSY1+5h9/YjI= Received: from arcadia (j1a01-1-78-205-69-41.fbx.proxad.net [78.205.69.41]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 6498c3c5 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 25 Dec 2017 22:44:59 +0100 (CET) Date: Mon, 25 Dec 2017 22:44:58 +0100 From: Emmanuel Vadot To: Warner Losh Cc: "freebsd-hackers@freebsd.org" Subject: Re: devmatch(8) committed .... Message-Id: <20171225224458.e925f49181221a2315a1974f@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 21:45:03 -0000 Hello Warner, On Mon, 25 Dec 2017 11:57:10 -0700 Warner Losh wrote: > I've committed devmatch(8) to the tree in r327176. It's a building block > for automating the loading of modules. While we can load modules today by > adding FOO_load=YES to loader.conf, there's no easy way to load only the > modules you need based on the hardware you have in the system. devmatch(8) > provides the base framework to allow one to do that. It does this my > looking at the PNP tables recorded in /boot/kernel/linker.hints. > > The version I've committed doesn't have the devd nor the rc.d integration. > I've committed it for people to play with and give me feedback while those > parts are finalized (and while other bugs are fixed). I don't intend to > commit them until the kinks are worked out. > > Some notes: > > (1) You'll need a newly built kernel. Older kernels have minor bugs that > allowed the terminating sentinel to be included in linker hints. All known > oens, at least for amd64, have been fixed. > (2) Lots and lots of drivers need to have their plug and play tables > decorated. This is where I need people's help. I'll be writing up something > for those that want to help. ISAPNP, PC Card and USB drivers already have > this data. A few PCI drivers have it, and almost no ACPI drivers. The data > is generally there, just not properly decorated for devmatch(8) and > kldxref(8) to do their thing. > (3) There's an issue with the USB pnp data. It's too long for the current > devinfo(3) interfaces. I have fixes in the works to correct this. I could > just bump the limits, but I want to do something more general and long term. > (4) The end game for this is a GENERIC with most of the drivers removed > that loads drivers automatically. Bootable storage drivers will have to > remain for now until the loader can make use of this code.This is why the > warning about hinted ISA devices went into the tree this week. > (5) modules will print more than once. also the if_em/if_igb driver is a > hard link so both of those will always print. > > Please send me your feedback. Happy Holidays! > > Warner This is all excellent news I can't wait to try. I've not currently started to look at the code but have you thought of fdt based system ? I would love a minimal GENERIC arm/arm64 kernel with everything else in modules. I know we still have to do a lot of work in the arm world to make almost everything usable in module form. -- Emmanuel Vadot