Making BSD stuff under MacMiNT
Pages in Japanese
First of all, I found that I needed to make BSD stuff such as
"make"(bsd make), "cc"(actually gcc), "cpp", "cc1", "as",
"ld", or so.
Almost all sources I used are from NetBSD1.0, but the source of "config"
is from NetBSD-current.
- I started making "make" first. (Just for a try.) [Sep 95]
There was a Makefile for "gnu make" named Makefile.boot.
That made me easy for I was not accustomed to the Makefile in that time.
Because the include files of MacMiNT is differnt from those of BSD,
I made the directory named "bsdinc" in the source directory
and added "-Ibsdinc" to "CFLAGS"
in Makefile(renamed from Makefile.boot). And put the BSD's own include
files into that directory. The "make" was compiled successfully.
[Oct 95]
- Then I copied "sys.mk" and the other files from /usr/share/mk (in unix
file system). Somehow, the file "bsd.dep.mk" was not read.("Could
not find" error.) So, I copied "bsd.dep.mk" to "bse.dep.mk",
and change the name in the "bsd.*.mk". [Oct 95]
- Next, I tried to compile GNU stuff. ("cc", "cpp", "cc1", "as",
"ld") [Nov 95]
The problem with compiling these is that there are too much
"alloca" in sources. This will fail when I execute the program. I must
chage "alloca" to "malloc". (actually "xmalloc" which fail if the memory
is not enough.) It was a lot of task, in fact I did not change all "alloca",
some which do not require much memory were not changed. After that,
I could compile these stuff. [Jan 96]
- To build kernel, I need "config","mkdep","ranlib","tsort",
"lorder",too. The "config" tries to link a directory, so I
commented out that because MacMiNT does not support directory-liking(maybe),
and copied the directory instead of linking.
Other stuff were not so difficult to make.
I compiled all of those stuff. [Feb 96]
- I also made "config.new"(old name),"ar","nm",and "yacc"
which I do not need to compile the kernel.
Now, it is ready to build a kernel.
There is a more reliable document
here at puma.