From owner-freebsd-current@freebsd.org Thu Sep 28 17:10:15 2017 Return-Path: Delivered-To: freebsd-current@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 83F12E041D9 for ; Thu, 28 Sep 2017 17:10:15 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from crab.apple.relay.mailchannels.net (crab.apple.relay.mailchannels.net [23.83.208.42]) (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 D62E166694 for ; Thu, 28 Sep 2017 17:10:14 +0000 (UTC) (envelope-from ian@freebsd.org) X-Sender-Id: _forwarded-from|73.78.92.27 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id EB6FA2091F3 for ; Thu, 28 Sep 2017 15:53:34 +0000 (UTC) Received: from outbound1a.eu.mailhop.org (unknown [100.96.147.85]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id 6C57E20893D for ; Thu, 28 Sep 2017 15:53:34 +0000 (UTC) X-Sender-Id: _forwarded-from|73.78.92.27 Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [172.20.110.49]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.9.14); Thu, 28 Sep 2017 15:53:34 +0000 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|73.78.92.27 X-MailChannels-Auth-Id: duocircle X-Coil-Battle: 67397e4c3598f8bf_1506614014842_290604630 X-MC-Loop-Signature: 1506614014841:482120150 X-MC-Ingress-Time: 1506614014841 X-MHO-User: 2c091121-a465-11e7-a893-25625093991c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 2c091121-a465-11e7-a893-25625093991c; Thu, 28 Sep 2017 15:53:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v8SFrR9L001425; Thu, 28 Sep 2017 09:53:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1506614007.31939.19.camel@freebsd.org> Subject: Re: How do GEOM_PART_* options configure geom_part_* modules?? From: Ian Lepore To: Nick Hibma , FreeBSD Current Mailing List Date: Thu, 28 Sep 2017 09:53:27 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2017 17:10:15 -0000 On Thu, 2017-09-28 at 17:31 +0200, Nick Hibma wrote: > I created a new kernel config file from scratch, wondered what the > GEOM_PART_MBR option and friends were doing, search for them, didn't > find them in the tree, and deleted them from my config. But... de > resulting disk image didn't boot, because of the fact that it didn't > recognise the MBR partitions (it only had a single diskid entry on > the mount-root prompt). >=20 > Can anyone explain to me how these kernel options work, as in: they > are defined in kernel configs and as a consequence in opt_geom.h, but > how are they actually used to select which geom_part_* modules/kernel > parts to build? I thought these options were translated to stuff that > cpp would use, but there are not uses of for example GEOM_PART_MBR > anywhere for example! >=20 > The only thing I was able to come up with, but could not figure out, > was FEATURE() doing some magic. >=20 > Thanks in advance for any pointers! >=20 > Nick Hibma > nick@van-laarhoven.org >=20 > -- Open Source: We stand on the shoulders of giants. >=20 >=20 > % grep -r GEOM_PART_ /usr/src/sys/ | grep -Ev '/conf/.*options' > /usr/src/sys/geom/part/g_part_mbr.c:=A0=A0=A0=A0"GEOM_PART_MBR Master B= oot > Record"); > /usr/src/sys/geom/part/g_part_ldm.c:=A0=A0=A0=A0"GEOM_PART_LDM Logical = Disk > Manager"); > /usr/src/sys/geom/part/g_part_ldm.c: =A0* XXX: We use some > knowledge about GEOM_PART_GPT internal > /usr/src/sys/geom/part/g_part_ebr.c:#if defined(GEOM_PART_EBR_COMPAT) > /usr/src/sys/geom/part/g_part_ebr.c:#ifndef GEOM_PART_EBR_COMPAT > /usr/src/sys/geom/part/g_part_ebr.c:#if defined(GEOM_PART_EBR_COMPAT) > /usr/src/sys/geom/part/g_part_ebr.c:#if defined(GEOM_PART_EBR_COMPAT) > /usr/src/sys/geom/part/g_part_ebr.c:#if defined(GEOM_PART_EBR_COMPAT) > /usr/src/sys/geom/part/g_part_ebr.c:#if defined(GEOM_PART_EBR_COMPAT) > /usr/src/sys/geom/part/g_part_ebr.c:#ifndef GEOM_PART_EBR_COMPAT > /usr/src/sys/geom/part/g_part_ebr.c:#ifndef GEOM_PART_EBR_COMPAT > /usr/src/sys/geom/part/g_part_ebr.c:#ifndef GEOM_PART_EBR_COMPAT > /usr/src/sys/geom/part/g_part_ebr.c:#ifndef GEOM_PART_EBR_COMPAT > /usr/src/sys/geom/part/g_part.h:#ifndef _GEOM_PART_H_ > /usr/src/sys/geom/part/g_part.h:#define _GEOM_PART_H_ > /usr/src/sys/geom/part/g_part.h:#endif /* !_GEOM_PART_H_ */ If you had added '-i' to your grep command you would have found the missing piece in sys/conf/files. =A0config(8) turns uppercase OPTION_NAME into lowercase option_name for purposes of configuring which files to compile. -- Ian