Compiling the kernel
Pages in Japanese
Second, I tried to compile the kernel. (just compile, no execute.)
- I ftp'd the kernel source "sys.tar.gz" and the "config" source
from NetBSD-current at
ftp.iij.ad.jp. [Feb & Mar 96]
- I extracted the file into an appropriate directory(in my case,
/usr/src/), then executed,
cd /usr/src/sys/arch/mac68k/conf
config GENERIC
As I commented out the part of the linking , I executed,
cd /usr/src/sys/arch/mac68k/compile/GENERIC
cp -r /usr/src/sys/arch/mac68k/include .
mv include machine
cp -r /usr/src/sys/arch/m68k/include .
mv include m68k
- I made a little change in the Makefile.
(in the /usr/src/sys/arch/mac68/compile/GENERIC directory)
Because "genassym" must run under MacMiNT, I changed that part
like below.
genassym: genassym.o
env GNULIB=/r/DUO230/MiNTSys/usr/lib \
GCCEXEC=/r/DUO230/MiNTSys/usr/bin/gcc- \
gcc -o $@ genassym.o
genassym.o: ${MAC68K}/mac68k/genassym.c
env GCCEXEC=/r/DUO230/MiNTSys/usr/bin/gcc- \
gcc ${CPPFLAGS} ${PROF} ${PARAM} -c $<
And, I replaced "%p" to "0x%x" of printf in genassym.c.
Also, I commented out "SYSTEM_LD_TAIL" in the Makefile,
for I did not compile "size" nor "strip".
- Then, I ran "make depend". It took 2 or 3 hours.
the file ".depend" were generated.
- There were problem while making kern library.
Somehow, the ".PATH" in Makefile (in /usr/src/sys/lib/libkern) dose not work
correctly. I copied the sources into the working directory for solution.
Another problem occured when I try to execute "make" more than twice.
The command "mkdir" failed with "file not found" error. I must change
the Makefile.inc (in /usr/src/sys/lib/libkern) not to fail like below.
__always_make_kernlib: .NOTMAIN
@mkdir -p ${KERNDST} || true
These problems also happened while making compat library.
I just fixed it up in the same way.
- Finally, I ran "make". I must wait 3 or 4 hous
until it finished compiling.
After that, yes, there was the file "netbsd"! It was about 860K bytes. [Mar 96]
There is a document for re-compiling the NetBSD/mac68k kernel
here at puma.