tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: building 9.1 kernel with /usr/src elsewhere?

You should build the kernel using, with the tools and all from there.

./ kernel=foobar

Don't try to make things complicated by doing all that stuff by hand. :-)


On 2023-03-08 00:32, Mouse wrote:
Okay, I'm trying to help someone with a NetBSD 9.1 machine at work.
Today's issue is one I had trying to build a kernel.  We needed to do
this because that project has a few customziations in the system needed
to build the application layer, and more needed to run it.

He installed stock 9.1, but did not install any source; /usr/src and
/usr/xsrc did not exist.  We then set up the customized source trees in
his homedir, which I will here call /home/abcxyz, under a directory
9.1.  Thus, the path to kernel source, for example, was

Then I copied in a kernel config (GEN91) into my ~/kconf/GEN91, from
back when I was working on that project.  I then ran

% config -b ~/kbuild/GEN91 -s /home/abcxyz/netbsd-9.1/usr/src/sys ~/kconf/GEN91

This completed apparently normally, reporting the build directory and
telling me to remember to make depend.  I then went to ~/kbuild/GEN91
and ran make depend && make.  It failed fast - no more than a second or
two - with

make[1]: don't know how to make absvdi2.c. Stop

(full log below).  I then moved /home/abcxyz/netbsd-9.1/usr/{src,xsrc}
to /usr/{src,xsrc}, chowned them -R to 0, destroyed ~/kbuild/GEN91, and
repeated, only this time I passed /usr/src/sys to config's -s flag.

This time the kernel built fine (at least apparently - we haven't tried
booting it yet, but I've built enough kernels to be confident there are
no obvious red flags in the log; it certainly did not fail a second or
two in with a cryptic message about absvdi2.c).  Note in particular
that the source tree content was identical; only the path and ownership

Is this a bug?  Or am I doing something wrong?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
  X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

The logfile includes one line that's over 3300 characters long,
guaranteeing that it'd get mangled by email (soft limit 78 characters,
hard limit 998).  So, I ran the logfile through bzip2 and then
base64-encoded the output.  Here's the result:


Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email:             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol

Home | Main Index | Thread Index | Old Index