2004-06-07 06:14:10

by ckkashyap

[permalink] [raw]
Subject: building MINIX on LINUX using gcc

Hi everybody,

I would like to build the MINIX kerenel on a LINUX machine using gcc + nasm!

Is there MINIX source that is buildable on LINUX platform available?

thanks,
Kashyap




---- Msg sent via Spymac Mail - http://www.spymac.com


2004-06-07 08:00:34

by James Buchanan

[permalink] [raw]
Subject: Re: building MINIX on LINUX using gcc

Hi!

> I would like to build the MINIX kerenel on a LINUX machine using gcc + nasm!
>
> Is there MINIX source that is buildable on LINUX platform available?

comp.os.minix is the place to be!

See you there.

James

PS. Get the official MINIX sources, and use a XX-to-YY translator or
write your own that converts the assembler sources to NASM. It
shouldn't be that difficult., or do it by hand, since there's not much
of it. The C code is ANSI and GCC should handle it. Then you can
rewrite the Makefiles and possibly add linker scripts for LD, and you'll
have MINIX built on Linux in no time.


2004-06-07 08:36:50

by ckkashyap

[permalink] [raw]
Subject: Re: Re: building MINIX on LINUX using gcc


>comp.os.minix is the place to be!
Thanks...I just signed up!

>PS. Get the official MINIX sources, and use a XX-to-YY translator or
Where do I get the official sources from?

>write your own that converts the assembler sources to NASM. It
>shouldn't be that difficult., or do it by hand, since there's not much
>of it. The C code is ANSI and GCC should handle it. Then you can
>rewrite the Makefiles and possibly add linker scripts for LD, and you'll
>have MINIX built on Linux in no time.

What can I do to make it loadable by GRUB or so. I understand that /minix is a concatination of the various a.outs. Can I write a tiny executable
that will get loaded by GRUB that loaded /minix beyond 1M. Are there many initializations that need to be done before this?

regards,
Kashyap



---- Msg sent via Spymac Mail - http://www.spymac.com

2004-06-07 09:01:15

by James Buchanan

[permalink] [raw]
Subject: Re: Re: building MINIX on LINUX using gcc


> >PS. Get the official MINIX sources, and use a XX-to-YY translator or
> Where do I get the official sources from?

http://www.cs.vu.nl/pub/minix/

> What can I do to make it loadable by GRUB or so. I understand that /minix is a concatination of the various a.outs. Can I write a tiny executable
> that will get loaded by GRUB that loaded /minix beyond 1M. Are there many initializations that need to be done before this?

You have to modify the startup code to accept the multiboot structure
and do something with it. You can compile it into an ELF image if you
want to, nothing wrong with that. Then compile the MM and FS tasks as
a.out executables and specify them as modules on the GRUB command line,
and load them from the kernel to the place you want them (much easier
than the nasty way it's done so far). You'd need to make extensive
modifications.

I suggest using GRUB to chainload instead. You put the Minix bootsector
and boot program into the Minix partition and GRUB can chainload from
there. No modification of sources needed for that.

Minix expects certain areas of its compiled binary to be patched by
boot, so don't make it a multiboot compliant kernel and load the servers
separately without knowing what you're doing. So chainloading with GRUB
is by far the easiest way to go.

Have fun :)

James


2004-06-07 09:12:46

by ckkashyap

[permalink] [raw]
Subject: Re:Re: Re: building MINIX on LINUX using gcc

> I suggest using GRUB to chainload instead. You put the Minix bootsector
> and boot program into the Minix partition and GRUB can chainload from
> there. No modification of sources needed for that.
Thanks James...this sounds great!


regards,
Kashyap




---- Msg sent via Spymac Mail - http://www.spymac.com

2004-06-08 12:27:49

by Horst H. von Brand

[permalink] [raw]
Subject: Re: building MINIX on LINUX using gcc

<[email protected]> said:
> I would like to build the MINIX kerenel on a LINUX machine using gcc +
> nasm!

Minix is 8086 (64KiB maximum segment size, etc). You might try to run Minix
under dosemu, though...

> Is there MINIX source that is buildable on LINUX platform available?

I doubt it. It would need a _lot_ of tweaking to build, or you'd have to
build your own tools targeting 8086.