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 build.sh, with the tools and all from there.

./build.sh kernel=foobar

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

  Johnny

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
/home/abcxyz/netbsd-9.1/usr/src/sys.

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
differed.

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

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
  X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ 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:

QlpoOTF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GG9JKlu+DVtUdYidGAibhE
4iJ/4u5IpwoSH5lojCA=

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


Home | Main Index | Thread Index | Old Index