Newsgroups: comp.os.minix
Subject: Re: from linux to minix
References: <914i4h$pvm$1@nnrp1.deja.com> <3A389497.EEFDFEFA@mail.utexas.edu> <91b2br$54n$1@nnrp1.deja.com>
Organization: Rochester Institute of Technology, Rochester, NY
From: aje9383@osfmail.isc.rit.edu (Andrew Erickson)
NNTP-Posting-Host: grace.isc.rit.edu
X-Original-NNTP-Posting-Host: grace.isc.rit.edu
Message-ID: <3a394c48@news.isc.rit.edu>
Date: 14 Dec 2000 17:40:08 -0500
X-Trace: 14 Dec 2000 17:40:08 -0500, grace.isc.rit.edu
Lines: 62
XPident: aje9383
X-Original-NNTP-Posting-Host: 129.21.4.100
XPident: Unknown
Path: news.adfa.edu.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!intgwpad.nntp.telstra.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.syr.edu!newsstand.cit.cornell.edu!news.acsu.buffalo.edu!bingnews.binghamton.edu!news-nysernet-16.sprintlink.net!news.sprintlink.net!news.isc.rit.edu!aje9383
Xref: news.adfa.edu.au comp.os.minix:36325

In article <91b2br$54n$1@nnrp1.deja.com>,  <eliason@my-deja.com> wrote:
>In article <3A389497.EEFDFEFA@mail.utexas.edu>,
>  Brent Cook <busterb@mail.utexas.edu> wrote:
>> bigbinc wrote:
>>
>> > Question for the gurus.  How would I would compile a version of
>minix
>> > on a linux or a unix machine and then store it locally on that
>machine
>> > (linux) and then copy the new version of minx from that machine to a
>> > machine with nothing on it.  I am basically rewriting the minix code
>> > (crazy I know) and porting it to a different machine.  Is there
>> > anything special I have to change in my makefile that is on my linux
>> > machine.  I am developing for a 386.
>> > Berlin Brown
>
>> Probably the easiest way to do it on a linux machine is to install
>dosemu
>> and then run the version of minix that runs in dos....
>> Brent
>
>additional comment:
>
>the reason to do this MINIX-in-a-DOS-box on LINUX is that it might
>not be easy to cross compile for MINIX on anything but MINIX.  the
>book talks about needing to make sure that special MINIX routines
>are given to the linker to pre-empt standard routines from the
>compiler libraries.  that requires some detailed knowledge.

Actually, it's not *that* difficult to get the right libraries.  You
just need to compile the library source and create some new library
(call it libminix.a for an example), put it in the (linux) system's
library directory--/usr/lib, I'd assume--and tack a -lminix onto the
various linking operations.

Compiling the library would require converting the assembly files from
the ACK syntax to gas syntax, which might be a bit of a hassle.

One other difficulty is getting an executable in the minix a.out format;
I don't think gcc (or most other compiler suites) are generally able to
produce it.  You might be able to write a post-converter from, say, coff
or the linux a.out format easily (not elf, which is quite a bit different),
but that's another hassle, at the least.

Needless to say, it would be important to tell gcc or whatever that you
are targeting a 386, so it doesn't put in any pentium-specific
instructions.  It's also necessary to ensure the files are statically
linked, since minix does not support shared libraries.

>so the MINIX-in-a-DOS-box solution is an easier way to get
>an appropriate MINIX compile to happen - on MINIX itself of
>course!

You can also install minix on the big box directly (assuming it's an
IBM-PC compatible machine).  However, I suspect perhaps part of the
motivation was to use better compiler tools, multiple windows to edit
things in, etc.

>-ade

-- 
Andrew Erickson
