Don't say it, I can hear everyone here already drawing a breath for the *gasp* at the topic. However, I have a serious question regarding Linux and Windows.

I've got a Sony Picturebook that isn't fully supported in terms of hardware under Linux (or not supported to the level that it is in Windows), and hence have found that I have to keep Windows on the machine.

I do have Gentoo installed on the machine, and for the parts that work, it works perfectly. However, as polls on this site have shown, things like games, directx, etc still require M$.

This got me thinking the other night. I was trying Cygwin to see if it would be useful to me to still use Linux under Windows, however it's too slow to be any real use.

Is it theoretically possible (theoretically, not necessarily if someone has it working) to set up a Linux environment under Win32 that would be able to take advantage of the Windows drivers for things such as OpenGL and the like so the only drivers needed on the Linux side would be bridging drivers as such? The idea came up because I wouldn't then have to worry about rebooting every time I switched between Linux <-> Windows, driver support would be better, etc.

I guess this is a kind of emulator, but ideally I want to create something native to Win32 but still compatible with Linux, mainly for speed reasons. Cygwin does this in a way however it's way too slow for my tastes.

Any suggestions or experience on this topic will be greatly appreciated!

True, Cygwin does this, but it's quite slow, and has to use a compatibility API for everything to work.

I'm not 100% sure, but is what I'm asking for basically all of the GNU/Linux tools to be ported to Win32? I'm re-reading my post, and it sounds like that._________________--
The Game is Nothing,
the Playing of it Everything.

Hmm, I've got VMWare at the moment, but that's even slower than Cygwin is. The other problem I've got with Cygwin is compiling software, it crashes during the make stage half the time.

Why am I getting the idea that what I'm after is simply either Linux with full Windows compatability or Windows with full Linux compatability? I don't see it happening, unless anyone has some suggestions (eg, how to compile glibc and gcc under win32. I have access to MSVC++ 6 and soon MSVC++ .Net if that will help me.)_________________--
The Game is Nothing,
the Playing of it Everything.

Compiling glibc is another matter... You'll have to port a lot of functionality/map alot of functionality into the existing Windows API. glibc on top of cygwin is absurd. A libc on top of another libc? That's plain crazy.

Okay, so glibc under Cygwin isn't a good idea Unfortunately I still rank fairly high in the 'n00b' category in terms of porting software.

Zhenlin, you mentioned in my other post about creating a POSIX environment under windows. This itself isn't too bad I guess, but you reckon that porting glibc is rather difficult? Bugger.

Hmm, well, assume for a second that I managed to port glibc to windows and have it working in this POSIX environment, what else would you need to create the Cygwin style environment? (Sounds like reinventing the wheel, I know, but ideally I want to be able to get this working as a native port rather than a compatibility layer.)_________________--
The Game is Nothing,
the Playing of it Everything.

I'm neither an NT or Linux kernel expert by any stretch, but one could probably implement a Linux subsystem for the NT kernel. NT kernels have WIN32 and POSIX subsystems already. These subsystems run in user space on top of the kernel. WIN32 in particular provides the environment most people are used to seeing on Windows.

With this subsystem, you could probably implement an entire GNU/Linux distribution on Windows. This would be a difficult project though. Microsoft documents common access points in the kernel, but I'd bet it's nowhere near enough to completely implement a new subsystem. It would also probably take quite a bit of hackage on the Linux kernel to essentially virtualize all the services, though maybe user-mode Linux would be a good starting point.

It's been a while (6+ years) since I've had to work with the NT kernel at this level and this is all from memory. Anyway, you asked for the theoritical, not the plausible .

Alright, well to be perfectly honest, I'm finding this idea appealing (although I still don't exactly know how I would go about it ) Is anyone currently working on something like this that I could join? Or would I be going solo on it?

Also, if anyone knows of any resources (preferably on the web) that would relate to this, please post them so I can do some more research on this._________________--
The Game is Nothing,
the Playing of it Everything.

Hmm, I actually stumbled across that last night too I think that that is something along the lines of what I'm after though.

I think the idea here is to be able to create an environment where you can take the source for a package, compile it in Windows and it works Hmm, perhaps I could look into it as a research project for university *lol*_________________--
The Game is Nothing,
the Playing of it Everything.

Just wondering. Have you tried any win32 ports of linux programs to get a feel for the speed? The most complex gui one that I know of is the gimp. AFIK none of them perform as well as they do on linux. It seems to me that one of those would perform better than an app an any sort of compatibility environment. I just wondering how slow you think is too slow. I've never thought cygwin was all that slow, but I've never done much with it either. It seems to me that the compatibility layer of cygwin is actually about as minimal as you can get and still have it work. Just my $.02. I really don't know all that much about this stuff but I find it interesting.

You've got a point PowerFactor, however I think I've gotten over the speed issues in Cygwin, based on some of the responses I've got, I seemed to have developed the ridiculous idea of somehow porting glibc to windows natively *lol* It's that bad an idea really, if it's possible to do.

Yes, I know there are native ports of a lot of the major programs, however it's more the environment I'm after rather than specific programs.

Also - just as an aside - specifically the speed issues I have in Cygwin are compiling and using the xfree86 port. This is what started it, I was after a native win32 X or a native win32 gcc _________________--
The Game is Nothing,
the Playing of it Everything.

Available by download for 120 day trial and $99 for a license. This provides the Interix (formerly OpenNT) POSIX.2 environment subsystem (a significant improvement over the unusable POSIX.1 environmnet subsystem included with NT). This recently won an award at LinuxWorld.

That's something along the lines of what I've been looking for, thanx zarcher. However, if you're using the SFU Interix environment, will the software you compile be compatible with Windows without the SFU environment?_________________--
The Game is Nothing,
the Playing of it Everything.

No, software compiled for SFU wouldn't work on another Windows system unless it had SFU. It's the same as compiling an application for cygwin, it wouldn't work on another Windows box unless cygwin was also installed. The GnuWin32 ports, since they are built with MinGW, will work on any Windows box since they are native Win32 applications.

Looking back at your original post, I'm wondering why Cygwin is slow for you. I use it every day for console work without any noticeable slowness. Granted Cygwin-Xfree drags a bit, but no more so than most Windows applications. I don't have any X apps that I need to use for work, so I don't use it often.

Are you running 9x or NT based Windows? I wouldn't expect Cygwin to run well on 9x and certainly it won't perform well. On NT, as long as you have enough memory, it shouldn't be a problem either.