Subject: Re: Compile NetBSD 1.0 kernel on NetBSD 1.5 machine
To: None <haryadi@cs.wisc.edu>
From: None <cgd@broadcom.com>
List: netbsd-help
Date: 07/30/2003 09:35:19
At Wed, 30 Jul 2003 16:23:35 +0000 (UTC), "Haryadi Gunawi" wrote:
> Currently I have NetBSD 1.5. I want to compile and run NetBSD 1.0
> kernel.

Heh.  I've had the desire a couple of times to do a historical study,
involving things like that.  Alas, never had the time.

May I ask what you're up to?  8-)


> It seems to be not straighforward.

Indeed; until recently, doing this type "build NetBSD on grossly
different system" build wasn't at all easy.


> Here is what I did:
> 1. Obtaion NetBSD 1.0 kernel source (src/sys-1.0) from CVS.
> 2. Under sys-1.0/arch/i386/conf/, why there is no GENERIC configuration?
> There are only "ALL, GENERICAHA, GENERICBT, etc ...".

Because, back then, there wasn't a single GENERIC kernel that could
boot on all supported hardware configurations.

E.g., as a I recall, if you had SCSI, you had to choose between
GENERICAHA and GENERICBT, since they weren't so happy together.


> 3. I tried to running 'config' on "ALL" so I did:
> 	% config ALL
>    and I get error message: ../../../../conf/files:3: syntax error

err, you mean, you tried using 1.5's "config" to configure a 1.0
kernel?  That won't work at all.

You need to build the 1.0 config.  I don't even recall if 1.0 had
switched to 'new config' yet, but even if it had there have been a
*lot* of changes in the new config language over time.


> 4. I tried to use "GENERIC" from NetBSD 1.5, I also get the same error.

That just won't work.


> Question ---> Is there any guidelines on compiling and
>               running old NetBSD kernel (in my case: NetBSD 1.0)
>               on current (NetBSD 1.5) platform?

yes.  Start by building all of the tools that you need to build the
old kernel:

* config,

* old version of netbsd make.

* possibly, compiler (could be Difficult!)

then use those to build your kernel.


Note that there's no guarantee that a new compiler will even compile
and old kernel and produce a working result:

(1) GCC has made some warnings/errors more strict over time, AFAIK,

(2) there have been coding errors or places where the specifications
    have changed (e.g. aliasing issues, broken asm statements) which
    may prevent the result from working.

To be sure that things will work, you may need to use the old
compiler.


Personally, If I were doing it at this point, I think i'd first try
installing complete old versions of NetBSD as guest OSes under
VMware...  8-)


chris
-- 
Chris Demetriou                                            Broadcom Corporation
                Principal Design Engineer, Broadband Processors
  Any opinions expressed in this message are mine, not necessarily Broadcom's.