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.
I'm afraid I don't have this option, sadly.
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)
Thank you Florian, that was spot on! The new "config" binary produces
a valid swapbsd.c
If I had followed "-current" rather than "-stable" I assume I would
have an updated "config" binary to start with and would not have run
into this issue. I will consider that option going forward.
For the sake of helping others, here's the steps taken to resolve:
I built a new config userland binary from the 5.4 tree.
$ mv /usr/sbin/config /usr/sbin/config.old
$ cd /usr/src/usr.sbin/config
$ make
$ make install
Then ran it against my kernel config:
$ cd /usr/src/sys/arch/macppc/conf
$ config macg4-20131109
swapbsd.c has the correct number of elements now:
$ cd ../compile/macg4-20131109
$ 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 }, /* sd0b */
{ NODEV, 0 }
};
int (*mountroot)(void) = dk_mountroot;
The kernel builds:
text data bss dec hex
5951529 90128 469616 6511273 635aa9
Nishal