Computing.Net > Forums > Linux > Compiling Linux Kernel On Windows

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Compiling Linux Kernel On Windows

Reply to Message Icon

Name: Faudzi
Date: March 21, 2001 at 10:56:26 Pacific
Comment:

How do you compile a the latest Linux Kernel 2.4.2 on Windows 9x? And then clean install the compiled binaries on my machine. What is the best site explain this?



Sponsored Link
Ads by Google

Response Number 1
Name: Mik
Date: March 22, 2001 at 02:03:42 Pacific
Reply:

I like the way people come up with creative ideas. :)
Although this might be possible I would not recommend you to do this. If you want to do it anyway I hope you know a bit about programming and how compilers work. First of all I suggest you do some research.
Read http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html
Also you would need a windows compiler which would produce linux binaries. I've never heard of such a compiler but then again I never looked for one.
You would most likely also have to modify the makefile since you are compiling on a totally different OS. So I suggest you study a manual on how makefiles are constructed.
If you are persistent enough to try and actually do manage to do it. Please post how you got it done so some other people with creative minds will be able to do the same.

If you just want the latest kernel but don't have a distribution that includes this. Just install the distribution and compile the kernel using that distribution and install it that way. This is a lot simpler but if you would like a (big) challenge then you would try to compile it in windows.

Good look on your quest.

Mik


0

Response Number 2
Name: Apple
Date: March 22, 2001 at 18:40:36 Pacific
Reply:

VC++ will attempt to use Windows libraries to compile. These require Windows to be useful. There is also an issue of object file formats. Linux uses ELF format (but that's as far as I know). If you remember back in the days of DOS, Turbo C++ and Microsoft C++ did not use compatible object files (or, for that matter, compatible libraries). The include files were in different spot and were actually named differently. Even porting code from Linux to Windows is difficult. The basic IO functions: open, write, read and close are named __open, __write, __read and __close in Windows. I spent over an hour one night trying to make the code compile and then decided it would be better to beat my head against the wall because I would have to do the same thing when I changed the original Linux code (I'm bad about that.)

A LOT of code/Makefiles are written to be portable. In recent memory, Mozilla code is completely compatible between Windows and Linux (and about 50 other OSs) through creative use of #defines. I wouldn't expect the kernel to be, though.

Good luck and as said above, "If you make it work, please post how you did it." That would be awesome!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Compiling Linux Kernel On Windows

Want to run Linux app on windows www.computing.net/answers/linux/want-to-run-linux-app-on-windows/20017.html

Linux runs on Windows www.computing.net/answers/linux/linux-runs-on-windows/16216.html

shared linux printer on windows XP www.computing.net/answers/linux/shared-linux-printer-on-windows-xp/24756.html