> How can I build minix from scratch?
Install it, compile it from there, be happy.
> Let's say I have all the source code and a pc running windows. I want
> to compile all the files individually and then make boot image so that
> minix can be installed on pc.
If you succeed in compiling on not-minix, you get an image containing the
kernel, mm, fs, init and all the other things which were introduced in Minix
3. But you still cannot -install- it from this point on. What you want to do
is to create a floppy (or whatever) which contains all the files, libraries,
etc. and then copy it to your hard disk.
Even if you can it to work, it is a long, rocky way. There is another topic
here which asks about getting Minix to compile on gcc...
> Can anyone help??
Make life easy:
Install the precompiled binaries and compile (if you still wish so) it from
there. Then you have a definitely working environment with compilers and
more. It will, I think, be easier with some unixoid OS instead of Windows,
though.
If you don't want to install Minix onto your PC directly, you can still use
some emulator/simulator like Qemu or Bochs.
Regards,
Sebastian
I think one possible way to do it is to use the Amsterdam Compiler Kit
instead of gcc which has now been modified to run under Linux. Minix
itself uses ACK to compile itself. Note that ACK cannot produce
binaries that run under Linux but it can produce minix binaries when
you run it under Linux.
Thanks.
> I tried minix 2, which is fine.
> I do not want to install pre compiled files.
> I have a laptop running fedora 6. If you can help.. how do I start..
I don't have any experiences with Minix 3, but my start would be to read the
Makefile which resides at /usr/src/tools/Makefile on Minix 2. I don't know
if this structure applies to Minix 3, though.
Then you will see the files and their depencies on each other, the headers
and libraries needed and so on. You'll also find the compiler options needed
for the ACK.
Thereafter you have to compile each file on its own, get them into the
proper a.out format (gcc should be able to create this) and build an image
(containing kernel, mm, fs, init, ...). But I don't think gcc will compile
every file "out of the box", but the ACK is available for Linux, too, as
stated in the other posting here.
> Shall I start compiling all the files like a normal user program.
> Obviously I have to compile all the files containing main(). Am i
> right?
You have to compile every needed file.
> I have downloaded complete code from minix3.org. Is it really
> complete??
It should, yes.
> Is there any use of MakeFile when you compile from scratch from
> another OS?
Yes, too see which files have to be compiled how and linked together. You
can, of course, create a Makefile of your work which allows to build Minix
on Linux...
Regards,
Sebastian
There might be a problem even after this. I couldn't get Linux to
read the newer Minix 3 filesystem, so depositing the compiled binaries
may be a problem even if the binaries are correct. Perhaps better
Linux distributions than mine understand Minix 3, or perhaps Minix 3
is happy living on the old Minix filesystem.
In my opinion, the latter variant is better - or you port at least mkfs to
Linux; then you can create an image and boot an emulator from there.
Regards,
Sebastian
> may be a problem even if the binaries are correct. Perhaps better
> Linux distributions than mine understand Minix 3, or perhaps Minix 3
> is happy living on the old Minix filesystem.
>
Neither one is correct. There where patches for 2.4.x and 2.6.x linux
kernels posted om the NG. But while they work for reading I had
filesystem corruptions when writing.
Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 < http://giovanni.homelinux.net/ >
Assuming that you have installed ACK on linux, change your 'cc' link
which points to 'gcc' so that it points to 'ack' in the bin
subdirectory of the ACK distribution.
Modify your path variable so that the bin directory of the ACK
distribution is the first component of the PATH string. This is
necessary because the ACK archiver program is named 'arch' which
conflicts with the Linux 'arch' program.
Go to the base directory of Minix source where the top level Makefile
resides and type 'make'.
Thanks.
"waqar" <waqa...@gmail.com> writes:
> I have not myself cross compiled Minix but to get started do the
> following:
>
> Assuming that you have installed ACK on linux, change your 'cc' link
> which points to 'gcc' so that it points to 'ack' in the bin
> subdirectory of the ACK distribution.
How terrible is that? Mutilating the host system ...
> Modify your path variable so that the bin directory of the ACK
> distribution is the first component of the PATH string. This is
> necessary because the ACK archiver program is named 'arch' which
> conflicts with the Linux 'arch' program.
Changing the path properly should be quite enough. Put that in a shell
script you will source when you want the cross compilation environment.
Regards -- Markus