Subject: Problems building/booting custom kernel
To: None <port-cobalt@NetBSD.org>
From: David <david@inducedreality.net>
List: port-cobalt
Date: 02/08/2004 21:54:35
I've been having a lot of problems getting a custom kernel to boot and was
hoping someone here could help.

I'm running on a Qube 2 with a 4 gig hard drive and 80 Mb RAM.

First, I tried following the various instructions on the NetBSD site and
though I could get a kernel to compile, I couldn't boot off of it.  Either
the qube keeps cycling in boot (displays diagnostics, goes to load kernel,
goes back to diagnostics, etc) or loads the kernel and halts.

All I had really done to the GENERIC kernel in src/sys/arch/cobalt/conf
was to add IPSec and IPFilter, and remove all the scsi stuff.

Figuring I must be doing something wrong, I decided to just build the
GENERIC kernel and try that, which also failed.

Finally, I decided to double check on the kernel that was installed.  I
used the 'strings netbsd | sed -n 's/^_CFG_//p' | unvis' command found in
man config to dump out a kernel from the config there.  I noticed it was
VERY different from the GENERIC that came with the system sources, so I
tried to build it.

However, when I try that, I get this error during the build:

/usr/src/sys/arch/cobalt/conf/GIR2:108: lcd0: unknown device `lcd'
/usr/src/sys/arch/cobalt/conf/GIR2:144: A wd cannot attach to a pciide
*** Stop.

ERROR: nbconfig failed for GIR2

I check dmesg and it definitely shows the wd attaching to the pciide:

pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <QUANTUM FIREBALLlct08 04>

I am using the following command to build in /usr/src:

./build.sh -m cobalt tools kernel=GIR2

(GIR2 is the dump from the strings above).

Anyone have any ideas what I am doing wrong?  I have tried looking at all
the documentation I can find on the NetBSD site but am coming up empty.

Oh, and I can only use the build.sh script as trying to run config on
anything in sys/arch/cobalt/conf gives me errors as well:

../../../../opencrypto/files.opencrypto:10: syntax error
../../../../opencrypto/files.opencrypto:25: undefined attribute
`opencrypto'
../../../../netinet6/files.ipsec:3: syntax error
../../../../netinet6/files.ipsec:4: syntax error
../../../../conf/majors:12: syntax error
../../../../conf/files:201: syntax error
../../../../conf/files:260: syntax error
../../../../conf/files:464: undefined attribute `wlan'
../../../../conf/files:470: undefined attribute `wlan'
../../../../conf/files:475: undefined attribute `wlan'
../../../../conf/files:482: undefined attribute `wlan'
*** Stop.


Thanks ahead of time to anyone who can point me in the right direction on
this.

David