Re: Kernel INCLUDE_CONFIG_FILE workaround?
On Mon, Mar 13, 2006 at 09:32:24AM -0600, Alan Amesbury wrote: > Jorge Aldana wrote: > > >I'm on 6.1PreRelease and this works: > > > >strings -n 3 /boot/kernel/kernel | grep -v | sed -n 's/^___//p' > > > >There was a minor tweek in this line back in 5.X transition form 4.X but > >my script works fine for 6.X since then. > > Note that the problem isn't in the line you provided above that extracts > the built-in configuration file. It's in the build procedure that's > supposed to put the config file into the kernel in the first place. In > other words, "options INCLUDE_CONFIG_FILE" doesn't include *all* the > configuration data, because it doesn't include included configuration > files. It's only including the very first level of nested configuration > files, which is not an accurate representation of what's in the kernel. > > In my example, the configuration file for GENERIC should've been in > there somewhere, as well as anything included by GENERIC (such as the > stuff in DEFAULTS). > > Again, this used to work great, but appears to have been broken in favor > of... usability? > I posted a patch to config(8) some time ago that did what you want, but it wasn't widely accepted so I abandoned it. Cheers, -- Ruslan Ermilov [EMAIL PROTECTED] FreeBSD committer pgpJAB7lRLsgr.pgp Description: PGP signature
Re: Kernel INCLUDE_CONFIG_FILE workaround?
Jorge Aldana wrote: I'm on 6.1PreRelease and this works: strings -n 3 /boot/kernel/kernel | grep -v | sed -n 's/^___//p' There was a minor tweek in this line back in 5.X transition form 4.X but my script works fine for 6.X since then. Note that the problem isn't in the line you provided above that extracts the built-in configuration file. It's in the build procedure that's supposed to put the config file into the kernel in the first place. In other words, "options INCLUDE_CONFIG_FILE" doesn't include *all* the configuration data, because it doesn't include included configuration files. It's only including the very first level of nested configuration files, which is not an accurate representation of what's in the kernel. In my example, the configuration file for GENERIC should've been in there somewhere, as well as anything included by GENERIC (such as the stuff in DEFAULTS). Again, this used to work great, but appears to have been broken in favor of... usability? -- Alan Amesbury University of Minnesota ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Kernel INCLUDE_CONFIG_FILE workaround?
I'm on 6.1PreRelease and this works: strings -n 3 /boot/kernel/kernel | grep -v | sed -n 's/^___//p' There was a minor tweek in this line back in 5.X transition form 4.X but my script works fine for 6.X since then. Jorge On Tue, 7 Mar 2006, Alan Amesbury wrote: In the past "options INCLUDE_CONFIG_FILE" worked great. Unfortunately, following recent changes in how kernel configuration files are parsed (namely the changes that use the "DEFAULTS" to include the 'isa' and 'npx' devices), this feature appears to be broken. For example, here's what appears in an almost-stock SMP kernel (on a 6.0-RELEASE-px box): # echo "options INCLUDE_CONFIG_FILE" >>! /sys/i386/conf/SMP # cd /usr/src # make KERNCONF=SMP buildkernel . [build magic happens] . # strings /usr/obj/usr/src/sys/SMP/kernel | egrep "^___" ___# ___# SMP -- Generic kernel configuration file for FreeBSD/i386 SMP ___# Use this for multi-processor machines ___# ___# $FreeBSD: src/sys/i386/conf/SMP,v 1.5.6.1 2005/09/18 03:37:58 scottl Exp $ ___include GENERIC ___identSMP-GENERIC ___# To make an SMP kernel, the next line is needed ___options SMP # Symmetric MultiProcessor Kernel ___options INCLUDE_CONFIG_FILE Obviously that's not complete. There should be, at minimum, an 'npx' and 'isa' device. ;-) I'm not interested in rehashing earlier threads on the merits of dumbing down or improving (depending on which side of the issue you were on) kernel configuration through silent inclusion of devices via mechanisms like DEFAULTS. I *am* interested seeing restored to functionality a feature that used to work great, but is now broken. Does anyone know if this is due to be fixed, or if there's a workaround? (I've searched for PR's relating to "INCLUDE_CONFIG_FILE" but see none.) One possible workaround (the one that seems to make the most sense) is to delete DEFAULTS from /sys/`uname -m`/conf and use kernel configs that don't use "include {otherconfig}". However, besides the fact that DEFAULTS would come back every time /usr/src is sync'ed, I'm unsure what the long-term ramifications are. -- Alan Amesbury University of Minnesota ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Kernel INCLUDE_CONFIG_FILE workaround?
In the past "options INCLUDE_CONFIG_FILE" worked great. Unfortunately, following recent changes in how kernel configuration files are parsed (namely the changes that use the "DEFAULTS" to include the 'isa' and 'npx' devices), this feature appears to be broken. For example, here's what appears in an almost-stock SMP kernel (on a 6.0-RELEASE-px box): # echo "options INCLUDE_CONFIG_FILE" >>! /sys/i386/conf/SMP # cd /usr/src # make KERNCONF=SMP buildkernel . [build magic happens] . # strings /usr/obj/usr/src/sys/SMP/kernel | egrep "^___" ___# ___# SMP -- Generic kernel configuration file for FreeBSD/i386 SMP ___# Use this for multi-processor machines ___# ___# $FreeBSD: src/sys/i386/conf/SMP,v 1.5.6.1 2005/09/18 03:37:58 scottl Exp $ ___include GENERIC ___identSMP-GENERIC ___# To make an SMP kernel, the next line is needed ___options SMP # Symmetric MultiProcessor Kernel ___options INCLUDE_CONFIG_FILE Obviously that's not complete. There should be, at minimum, an 'npx' and 'isa' device. ;-) I'm not interested in rehashing earlier threads on the merits of dumbing down or improving (depending on which side of the issue you were on) kernel configuration through silent inclusion of devices via mechanisms like DEFAULTS. I *am* interested seeing restored to functionality a feature that used to work great, but is now broken. Does anyone know if this is due to be fixed, or if there's a workaround? (I've searched for PR's relating to "INCLUDE_CONFIG_FILE" but see none.) One possible workaround (the one that seems to make the most sense) is to delete DEFAULTS from /sys/`uname -m`/conf and use kernel configs that don't use "include {otherconfig}". However, besides the fact that DEFAULTS would come back every time /usr/src is sync'ed, I'm unsure what the long-term ramifications are. -- Alan Amesbury University of Minnesota ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"