Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 1995 08:53:46 -0500 (EST)
From:      Wankle Rotary Engine <wpaul@skynet.ctr.columbia.edu>
To:        ywliu@beta.wsl.sinica.edu.tw (Yen-Wei Liu)
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: Graphical installations and such...
Message-ID:  <199501091353.IAA02599@skynet.ctr.columbia.edu>
In-Reply-To: <199501090716.CAA02188@skynet.ctr.columbia.edu> from "Yen-Wei Liu" at Jan 9, 95 03:16:21 pm

next in thread | previous in thread | raw e-mail | index | archive | help
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!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501091353.IAA02599>