Dan Aloni
2000-12-07 15:20:13 UTC
Yesterday was a first attempt to port UML to Micro$oft Windows.
cygnus-win32 is the UNIX compatible environment that I tried to compile
Linux on. (http://www.cygwin.com)
This is what I came across in this attempt:
* Incomplete cygwin - Cygwin is incomplete to provide a fully UNIX
compatible layer, that means the important functions, like mmap(),
fork(), clone(), signal handling functions, are only partially
supported, which makes it quite difficult to port.
* binutils - 'as' creates COFF objects files on cygwin, I don't think
creating ELF objects is possible there. Why is this a problem? Well, we
COFF doesn't have all the features like ELF does, so linking will be
more difficult.
* a buggy ld - ld turns completely insane when trying to link relocatable
object files. The solution is to link all regular object files in the
kernel in one strike to create the Microsoft-intimidating LINUX.EXE
file ;)
* The Win32 API and design - One of the most nasty APIs out there, with
a quite limited support for POSIX standards.
* mkdep.c (what makes 'make dep' possible in the kernel), needed patching
because mmap() didn't work there.
* gcc, for some reason, decided to complaine about stray '\'s in
some places where multi-lined macros where defined.
So what did we get from this? I've patched around some Makefiles, removed
some ELF dependancies from asm code, and the kernel marvelously started
compiling on my cygwin system...
All the code besides the arch specific (fs/*, net/*, mm/*, kernel/*,
etc) compiles nicely to object files. The only compiliation problem now is
the arch specific code that resides in arch/um/*.
This is very preliminary, so no public patches at the moment. If anyone
can help, jump in.
cygnus-win32 is the UNIX compatible environment that I tried to compile
Linux on. (http://www.cygwin.com)
This is what I came across in this attempt:
* Incomplete cygwin - Cygwin is incomplete to provide a fully UNIX
compatible layer, that means the important functions, like mmap(),
fork(), clone(), signal handling functions, are only partially
supported, which makes it quite difficult to port.
* binutils - 'as' creates COFF objects files on cygwin, I don't think
creating ELF objects is possible there. Why is this a problem? Well, we
COFF doesn't have all the features like ELF does, so linking will be
more difficult.
* a buggy ld - ld turns completely insane when trying to link relocatable
object files. The solution is to link all regular object files in the
kernel in one strike to create the Microsoft-intimidating LINUX.EXE
file ;)
* The Win32 API and design - One of the most nasty APIs out there, with
a quite limited support for POSIX standards.
* mkdep.c (what makes 'make dep' possible in the kernel), needed patching
because mmap() didn't work there.
* gcc, for some reason, decided to complaine about stray '\'s in
some places where multi-lined macros where defined.
So what did we get from this? I've patched around some Makefiles, removed
some ELF dependancies from asm code, and the kernel marvelously started
compiling on my cygwin system...
All the code besides the arch specific (fs/*, net/*, mm/*, kernel/*,
etc) compiles nicely to object files. The only compiliation problem now is
the arch specific code that resides in arch/um/*.
This is very preliminary, so no public patches at the moment. If anyone
can help, jump in.
--
Dan Aloni
***@karrde.org
Dan Aloni
***@karrde.org