Friday, October 17, 2008

Windows as a host for Linux development?

Here's something I'm trying to decide as I work through the ultimate development environment for a Linux based "OpenConsole" (and to be clear, I'm talking about set top box class consoles, not mobile). As I mentioned in previous blog entries, I've figured out how to extend qemu to do OpenGL calls on the host and present a PCI interface to the guest to make those calls. All I need is a Linux driver and user space library to use that interface and present the OpenGL (or OpenGL ES) interface to applications that can do games, or what have you.

I figure Linux is a natural host development environment for the device driver. You need to reuse the kernel build system to build it and from what I understand, that build system doesn't work on Windows, not even with Cygwin. So that's a lock, and I can use the Linux version of CDT to build it.

But when it comes to applications, I am wondering how many developers would prefer to use Windows as their development host. From what I understand (again, and I keep guessing here), most game development is done on Windows, even when targeting the "closed" consoles. Actually, XBOX development is obviously done on Windows. But I believe the others have Windows hosted SDKs and tools as well.

However, as with device drivers, Linux should be an obvious choice for application development targeting Linux. This is especially true when targeting PC-type platforms since the host tool chain can actually be used to target the console, and even more true when you're actually using the same run-time lineup.

I get the feeling that there's more to life than writing your Linux targeted application. If, as the developer, you're still relying on a lot of Windows tools or you just plain prefer Windows as a work environment, you would probably want to write your application on Windows as well.

It's funny how we sometimes forget history and the fact that we abandoned our Unix environments for Windows because it had much better tools. And as I (and many others) have discussed, Linux hasn't caught up yet to make us want to go back. So I firmly believe that Windows is an expected host development environment for Linux development, especially embedded. And with the help of gcc's cross compilation abililty and the gcc support in the CDT, it's shouldn't be that hard to put together.

12 comments:

  1. Hello Doug, I think that you are making a very good job with CDT (and specially with Wascana) in order to allow developers write multiplatform applications because they can use gcc and related tools.

    I'm waiting for 1.0 release of Wascana, ¿Do you know when it can be released?

    Thanks

    ReplyDelete
  2. Work has been real busy lately. Hopefully later in November I'll get some free time to get Wascana 1.0 out. Luckily for me, MinGW refuses to put out an official 4.x version of gcc which I really want to make a part of 1.0. But I want to get this thing going soon anyway.

    ReplyDelete
  3. Actually, the kernel build system does work with Cygwin - although depending on the kernel version you may need a couple of patches. They're floating around on the net; I've done it as recently as two weeks ago.

    You're correct that a large amount of Linux-targeted development is done from Windows. It's a little tricky to put the environment together, mostly because of filesystem issues, but I'm sure you're up to the challenge! :-)

    ReplyDelete
  4. Thanks, Daniel, very cool! I had read somewhere that it didn't but that was a year ago or so.

    Getting the files to the target definitely is a challenge. I don't imagine you can mount a Samba root file system ;) or can you...

    ReplyDelete
  5. Hi Doug,

    I think you write some good and interesting posts, but I got a fairly different background to be frank.

    I come mainly from the Linux/Unix environment, and have been forced into living in Windows 2k/XP environment for several years in a row now due to different project related issues. I still can't stand it, and I feel like I have my hands tied behind my back. I love eclipse functionality, even though I feel like I'm still fairly new to it.

    Reading your "wanting the tools available in windows" perspective just makes me so perplexed. The only tool that I can think of "only" available in Windows that I'd really like to have in Linux is PC-Lint by Gimpel, and it can be partially replaced at least. The list of tools I'd be happy to get rid of however (including OS philosophy, filesystem, et cetera) is long and complex however :-).

    I'd love to hear which tools you would miss that much?

    ReplyDelete
  6. Outlook. For one. Web browsers that work everywhere. A VPN solution that's easy to get going. Netmeeting. FL Studio (well that one's more for hobby time).

    Mind you I'm a technical manager that lives half in Outlook and half in Eclipse and the other half in conference calls so I may have a different perspective. Your mileage may vary, and apparently it does and that's fair.

    ReplyDelete
  7. Ok, I know what you're meaning, some of those are normally very hard to substitute. Not so often because they are good imho, but rather because they are a defacto standard in most company cultures, hence it's not "it's my computer, i switched the program myself" but more of a "getting everyone to switch at the same time" problem.

    A few ideas though, I hope you don't mind my giving them (even though they where not asked for :-)).

    Outlook - Replace with Evolution, not sure how well it can be integrated with Exchange if that's what you are using, but from the looks of it, it could be a slightly rough ride, but should work fairly well.

    Web browsers - Definitely on different sides of the fence there, my point of view, a page that doesnt display nicely in Firefox, or at least tries to nicely degrade isn't worth the time. This alone is an issue better suited for holy wars or possibly W3C foam bat wars :-).

    VPN Solution - OpenVPN, follow the guides and it should be set up in 20 minutes (including having the server up and running, I've used that solution several of times).

    Netmeeting and FL Studio - no experience at all there i'm afraid. http://www.faqs.org/docs/Linux-HOWTO/NetMeeting-HOWTO.html seems to be documentation on how to get netmeeting functionality in Linux. Looks very hacky :-(. FL Studio I don't even know what it is?

    Anyways, I hope that the response is of some minor interest at least.

    ReplyDelete
  8. Definitely. Thank you!

    I've heard good things about Evolution. It might be a worthy counter to Outlook.

    There are some I have no choice over though. Our corporate standard is Cisco VPN which has very bad Linux support. And we do a lot of Netmeetings and as you mention, it barely works on Linux (if at all). And there are still some corporate tools on websites that don't work on Firefox that I need to use, but at least they are working on it. But then I've switched to Google Chrome which still doesn't have a Linux port, yet.

    No, I'd be happy to switch to Linux as soon as I'm confident I can keep using the tools I need. As an Eclipse developer, Eclipse runs great both on Linux and Windows, so that isn't really a driver for me.

    ReplyDelete
  9. To Oskar: We run PC-Lint on linux using wine.

    ReplyDelete
  10. I'm doing my linux development in a VMWare instance of Red Hat running on Windows right now. It's helpful because the code half of our repository is supposed to be linux code, and the documentation half is all .doc files and other stuff (e.g. Vizio files) that opens in Windows applications.

    I don't know if you'd count that as "Linux development on Windows", but it's working for me.

    Also: gah, KDevelop. I've never been as proud of Workbench as I am right now.

    ReplyDelete
  11. I wasn't considering using a VM as a solution, but at the end of the day, that's what I've ended up doing so that I don't have to fuss with getting the cross compiler working. In fact, I'm using the same Debian version for both the target and host to make it even easier...

    ReplyDelete
  12. I tried Evolution for a month or so after my company switched to Exchange for the entire organisation. It did not work out too well. Maybe because it's using the web interface of the Exchange server. Most of the time Evolution were hogging the CPU, quite often (a few times a day) it locked up.

    So I ended up going back to using KMail through IMAP for mail, Outlook on VMWare for calendar and sometimes the web interface. A mess, I know.

    As for Linux development on Windows; We just removed support for it from our Eclipse based IDE. One important reason was that it's much less hassle on Linux and performance is also magnitudes better. Also I get the impression that the kernel/driver developers don't really mind, they prefer a power OS in any case ;-)

    ReplyDelete