Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Linux + Win32
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 12:23 am    Post subject: Linux + Win32 Reply with quote

Don't say it, I can hear everyone here already drawing a breath for the *gasp* at the topic. :D 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!

Tim Crockford

--
Wake up Neo...
The Penguin has you.
Back to top
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Wed Feb 26, 2003 12:54 am    Post subject: Reply with quote

I'm pretty sure Cygwin is the app like this.
_________________
a.k.a port001
Found a bug? Please report it: Gentoo Bugzilla
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 1:00 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
scott_ell
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2002
Posts: 83
Location: Tallahassee, Florida, USA

PostPosted: Wed Feb 26, 2003 1:17 am    Post subject: Reply with quote

I have not found cygwin to be slow at all. I mess around with OpenGL programming through cygwin and have found it runs comparable to when run directly through windows.

I think there are some commercial unix emulators out there (i.e. not free). I think even Microsoft sells software that emulates Unix.

Another idea is VMWare. This won't help you with drivers, but it will save you a reboot.

Scott
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 1:49 am    Post subject: Reply with quote

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? :D 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.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Wed Feb 26, 2003 9:06 am    Post subject: Reply with quote

Compiling gcc is no problem under cygwin. Just use gcc >= 3

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.
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 9:56 am    Post subject: Reply with quote

Okay, so glibc under Cygwin isn't a good idea :D 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.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Wed Feb 26, 2003 1:08 pm    Post subject: Reply with quote

You will need to create equivalent facilities for:

Linux style /dev
Linux style /proc
Linux style /proc/bus/usb
POSIX style hard links (this goes into libc)
POSIX style soft links (this also goes into libc)

You won't be able to actually boot Linux, that would require a port of the kernel itself.
Back to top
View user's profile Send private message
zarcher
n00b
n00b


Joined: 23 Feb 2003
Posts: 8
Location: Hillsboro, OR, USA

PostPosted: Wed Feb 26, 2003 4:51 pm    Post subject: theoritically, layer linux kernel over NT kernel Reply with quote

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 ;-).
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 10:00 pm    Post subject: Reply with quote

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 :D) 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.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1692
Location: out of it

PostPosted: Wed Feb 26, 2003 10:42 pm    Post subject: Reply with quote

Well, you could have a look here for starters.
http://gnuwin32.sourceforge.net/

I'm pretty sure that's not 100% what you're looking for. It's educationial though.
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 10:54 pm    Post subject: Reply with quote

Hmm, I actually stumbled across that last night too :D 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.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1692
Location: out of it

PostPosted: Wed Feb 26, 2003 11:10 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Wed Feb 26, 2003 11:15 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
zarcher
n00b
n00b


Joined: 23 Feb 2003
Posts: 8
Location: Hillsboro, OR, USA

PostPosted: Thu Feb 27, 2003 12:01 am    Post subject: Reply with quote

Scratch theoritical for the environment subsystem...

http://www.microsoft.com/windows/sfu/

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.

http://www.interix.com/tools/

Provides a list of open source tools that have been ported to Interix.
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Thu Feb 27, 2003 12:20 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
zarcher
n00b
n00b


Joined: 23 Feb 2003
Posts: 8
Location: Hillsboro, OR, USA

PostPosted: Thu Feb 27, 2003 4:45 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ravenq
Apprentice
Apprentice


Joined: 19 Feb 2003
Posts: 161

PostPosted: Thu Feb 27, 2003 9:45 pm    Post subject: Reply with quote

I'm running XP on a laptop, but I think the speed issues may be partly related to the Crusoe processor in this thing.
_________________
--
The Game is Nothing,
the Playing of it Everything.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum