From owner-freebsd-hackers Mon Jan 9 05:59:07 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id FAA25528 for hackers-outgoing; Mon, 9 Jan 1995 05:59:07 -0800 Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id FAA25520 for ; Mon, 9 Jan 1995 05:58:56 -0800 Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.8/8.6.6) id IAA02599; Mon, 9 Jan 1995 08:53:50 -0500 From: Wankle Rotary Engine Message-Id: <199501091353.IAA02599@skynet.ctr.columbia.edu> Subject: Re: Graphical installations and such... To: ywliu@beta.wsl.sinica.edu.tw (Yen-Wei Liu) Date: Mon, 9 Jan 1995 08:53:46 -0500 (EST) Cc: freebsd-hackers@FreeBSD.org In-Reply-To: <199501090716.CAA02188@skynet.ctr.columbia.edu> from "Yen-Wei Liu" at Jan 9, 95 03:16:21 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2974 Sender: hackers-owner@FreeBSD.org Precedence: bulk They say this Yen-Wei Liu person was kidding when he wrote: > > > I recently contributed some fixes that make swapgeneric.c work again. > > One of the things this does is allow you to choose what you want > > to mount as your root device, if you boot with the -a flag. (You need > > 'options GENERIC' and 'config kernel swap generic' for this to work. > > Check it out: it's cool.) This sort of brings us back to the days of the > > Sorry Bill, > > Maybe this is off-topic, but : is your fix merged into -current ? > If -a works, I can build a boot-disk, just as Linux does. > > -- > Yen-Wei Liu (ywliu@beta.wsl.sinica.edu.tw) > Yes, it is in -current. It's been there for a few days, in fact. I was hoping that it would be used for the standard GENERIC kernel configuration, but that's out of my hands. Since I'm here, I've got a question to put to everyone: The 'options GENERIC' thing is necessary because you need some way to make the call to setconf() vanish when 'config kernel swap generic' isn't used: if you specify the root, swap and dump devices explicitly, then config builds a seperate swapkernel.c file for you which doesn't have the setconf() function in it like swapgeneric.c does. (If you look in /sys/i386/i386/conf.c, you'll see the call to setconf() that I'm talking about.) What can happen without the 'options GENERIC' kludge is that you have a call to setconf() without having an actual setconf() function, so you get unresolved symbols at link time. While hiding the call to setconf() inside #ifdef GENERIC ... #endif does make the problem go away under most circumstances, you can still get into trouble unless you know what you're doing. The only real 'idiot-proof' way to avoid linking problems is to modify the config command so that it creates a swapkernel.c file with a dummy setconf() function in it. ( void setconf(void) { return }; or something equally benign.) This way, the #ifdef GENERIC in conf.c can be removed, and you have one less option to worry about. I held off on doing this though, because I wasn't sure it was a good idea to modify config just to cover up this small problem (which I was mostly responsible for creating anyway). But now I'm having second thoughts, so I ask you: should I leave it the way it is, or should I take out the #ifdef and add that one lousy printf() to config like I originally wanted to? Or is there an even better way that I haven't even thought of? -Bill -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Bill Paul System Manager wpaul@ctr.columbia.edu Center for Telecommunications Research (212) 854-6020 Columbia University, New York City ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Møøse Illuminati: ignore it and be confused, or join it and be confusing! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~