On Sat, Nov 09, 2013 at 03:56:25PM +0000, Nishal Ranchhod wrote:
> >Synopsis:    OpenBSD 5.4 Stable kernel fails to compile
> >Category:    
> >Environment:
>       System      : OpenBSD 5.3
[...]
> While preparing to upgrade to OpenBSD-5.4-stable the kernel fails to
> compile.

You are not supposed to do that.

You are at      Goal    Binary upgrade to       then ...
Old -stable     -stable         Newest release  Fetch & build -stable
( http://www.openbsd.org/faq/faq5.html#BldBinary )

I understand you cannot do that on this particular machine, maybe you
have another macppc which will boot GENERIC and you can use that as a
build machine? Alternatively see below.

[...]

> $ config macg4-$(date "+Y%m%d")
> $ cd ../compile/macg4-$(date "+Y%m%d")
> $ make clean
> $ make
> [lots of output from compiler]
> cc1: warnings being treated as errors
> swapbsd.c:9: warning: excess elements in struct initializer
> swapbsd.c:9: warning: (near initialization for 'swdevt[0]')
> swapbsd.c:10: warning: excess elements in struct initializer
> swapbsd.c:10: warning: (near initialization for 'swdevt[1]')
> *** Error 1 in /usr/src/sys/arch/macppc/compile/macg4-20131109
> (Makefile:609
> 'swapbsd.o')

You need a newer config(8), see this old entry from current.html:

http://www.openbsd.org/cgi-bin/cvsweb/www/faq/current.html.diff?r1=1.378;r2=1.379

I'm optimistic that you can take the 5.4 sources of config(8), build
them on 5.3 and use the resulting binary to build your frankensteined
kernel. Or you can try to edit the generated swapbsd.c and remove the
last ", 0" in the swdevt lines (IIRC)

> 
> $ cat swapbsd.c
> #include <sys/param.h>
> #include <sys/conf.h>
> #include <sys/systm.h>
> 
> dev_t   rootdev = makedev(2, 0);        /* sd0a */
> dev_t   dumpdev = makedev(2, 1);        /* sd0b */
> 
> struct  swdevt swdevt[] = {
>         { makedev(2, 1),        0,      0 },    /* sd0b */
                                   ^^^^^^^^     here  
>         { NODEV, 0, 0 }
                    ^^^                         and here
> };
> 
> int (*mountroot)(void) = dk_mountroot;
> 

-- 
I'm not entirely sure you are real.

Reply via email to