From: Auric__ on
On Thu, 01 Apr 2010 00:03:21 GMT, David Given wrote:

> Yes, finally you both get to know why I've been asking all those weird
> questions over the past couple of months!
>
> LBW is a Linux binary loader that runs on Windows (currently only 32-bit
> Windows XP). It translates Linux system calls into Windows ones, using
> Interix to do the heavy lifting. It supports both static and dynamic
> binaries.
>
> While it's very much a work in progress it's good enough to run a Debian
> chroot, downloading and installing packages with apt and dpkg, compiling
> and running programs with gcc, connecting to remote servers with ssh,
> and even running some basic X applications. Performance isn't brilliant,
> but I have ideas why and how to fix it.
>
> The web page, where you can get an installer package and the source
> code, is here:
>
> http://lbw.sourceforge.net/
>
> I'd like to say thanks to the help I got from c.o.m-w.p.win32 and c.u.p;
> it helped considerably!

Have you looked at LINE?
http://sourceforge.net/projects/line/

Not updated in almost 9 years, but pretty much the same thing. Might be able
to reuse some code from there.

--
He's wearing his underwear outside his pants.
I'm pretty sure his resume isn't exactly up to date.
From: Ersek, Laszlo on
On Thu, 1 Apr 2010, David Given wrote:

> Yes, finally you both get to know why I've been asking all those weird
> questions over the past couple of months!
>
> LBW is a Linux binary loader that runs on Windows (currently only 32-bit
> Windows XP). It translates Linux system calls into Windows ones, using
> Interix to do the heavy lifting.

Honest question: what was your motivation to start the project? Running
Linux binaries, ie. programs without recompilation, and also without
installing a VM? If so, are there specific binaries you can mention? Why
can't they be recompiled for Windows? Source unavailable or very much tied
to Linux? You mention "WINE in reverse" on the opening page, but I suggest
adding a "Why?" section too.

The direct link to SFU is very useful, thanks.

.... Just some random thoughts.

Thanks,
lacos
From: David Given on
On 01/04/10 01:41, Auric__ wrote:
[...]
> Have you looked at LINE?
> http://sourceforge.net/projects/line/

I did, actually; it works differently --- using a device driver to hook
the interrupt rather than catching page faults --- and it's nothing like
as complete. It uses Cygwin for the backend, so I expect that it would
run into real trouble once it got as far as trying to implement fork().
Plus I don't think it could handle %gs.

But yeah, LINE and LOW:

http://netevil.org/blog/2004/jan/linux-on-windows/comments

....were the inspirations.

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────

│ "In the beginning was the word.
│ And the word was: Content-type: text/plain" --- Unknown sage
From: David Given on
On 01/04/10 12:49, Ersek, Laszlo wrote:
[...]
> Honest question: what was your motivation to start the project? Running
> Linux binaries, ie. programs without recompilation, and also without
> installing a VM? If so, are there specific binaries you can mention? Why
> can't they be recompiled for Windows? Source unavailable or very much
> tied to Linux?

I work in the embedded phone world. This means I have to deal with
crappy mobile phone toolchains on a regular basis. These invariably run
on Windows only (despite normally being elderly versions of gcc). So I
have to have Windows installed.

But I also need to do stuff that only works on Linux, such as Android
builds; plus Linux is my preferred development environment. So I have to
have Linux installed.

Usually I can avoid having to run both at once, but recently we had a
particularly clueless customer who provided us with mobile phone
prototypes that only had Windows drivers. That is, we could only *build*
the app on Linux, but we could only get the app onto the device using
Windows. Aaargh!

I have tried virtualisation, but virtualisation is a lousy solution to
the problem: you end up running two operating systems, meaning you turn
one fast machine into two slow ones. Plus you double the maintenance
load as you now have two machines to administer, making data on one
machine visible on the other is an exercise in frustration, getting
networking working sanely is irritatingly hard, etc.

LBW isn't anywhere near doing Android builds yet --- I haven't even
*attempted* to run Java due to threading issues, and the performance
isn't up to scratch. But that's the fundamental class of problem I want
to solve.

I could use Cygwin, and indeed we do, but Cygwin is a hollow mockery of
a Unix environment --- you basically cannot do Unix on top of Win32
(fork(). unlink() on open files. Files called 'foo.aux'). Interix is
loads better, but Interix is too archaic for most modern stuff to build
cleanly; projects like debian-interix help but debian-interix just isn't
stable enough for everyday use, and I've never made any of the Ports
versions that claim to run on Interix work. Plus neither Cygwin nor
Interix solve the binary compatibility problem; some of the stuff we
need to use is binary-only.

Running a real Linux distro (or at least the user-space part thereof)
directly on top of Windows gives instant access to a vast array of
software that behaves identically to a real Linux system.
Interoperability issues vanish as they both share the same file system,
networking stack, etc.

It's nothing like running real Linux, of course, but if were *able* to
run real Linux I *would* be.


(PS. Did you mean to snip newsgroups?)

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────

│ "In the beginning was the word.
│ And the word was: Content-type: text/plain" --- Unknown sage
From: Ian Collins on
On 04/ 2/10 07:07 AM, David Given wrote:
>
> I have tried virtualisation, but virtualisation is a lousy solution to
> the problem: you end up running two operating systems, meaning you turn
> one fast machine into two slow ones. Plus you double the maintenance
> load as you now have two machines to administer, making data on one
> machine visible on the other is an exercise in frustration, getting
> networking working sanely is irritatingly hard, etc.

I find that hard to swallow. A windows VM running under VirtualBox on a
Linux or OpenSolaris host has minimal impact on the host. Sure it
pinches some RAM, but that's inexpensive these days and it will use some
CPU (but not a lot when idle) VirtualBox shared folders work well for
sharing data, but you can also run Samba/CIFS on the host. Bridged
networking it trivially easy to configure.

I run all my windows only application in a VM, which include USB printer
and scanner monitors. Administration mainly comes down to looking after
applications, so where they are installed isn't an issue.

--
Ian Collins