From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 24 05:48:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 094B4106567A for ; Mon, 24 Nov 2008 05:48:26 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id A4CC58FC1C for ; Mon, 24 Nov 2008 05:48:25 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 505 invoked by uid 1001); 24 Nov 2008 00:21:35 -0500 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda (tmda-ofmipd) with ESMTP; Mon, 24 Nov 2008 00:21:34 -0500 Date: Mon, 24 Nov 2008 00:21:33 -0500 To: Braulio =?UTF-8?B?Sm9zw6k=?= Solano Rojas Message-ID: <20081124002133.500eec9e@bhuda.mired.org> In-Reply-To: <44979.201.198.34.106.1227489354.squirrel@webmail7.pair.com> References: <4927E659.3010602@kukulies.org> <44979.201.198.34.106.1227489354.squirrel@webmail7.pair.com> Organization: Meyer Consulting X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: mounting Mac OS .dmg files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 05:48:26 -0000 On Sun, 23 Nov 2008 19:15:54 -0600 (CST) Braulio Jos=C3=A9 Solano Rojas wrote: > I have an innocent question. I have read on the handbook and the thesis > about the Linux ABI technical explanations that lead me to think that it > could be possible to run Mac OS binaries on FreeBSD. I think that if the > correct loader was implemented in execve and the Mac OS system calls were > also implemented it would be possible to run Mac OS binaries. Am I right? > (I am not asking anyone to support this feature, I just would like an > hypothetic answer in order to improve my knowledge.) Of course, I suppose > there would be technical challenges to solve as there are still for Linux. > In fact, I would like to ask further: could this be possible for any > operating system (without thinking about if it would worth it)? In theory, you can provide an ABI for any OS that you care to emulate the necessary calls for. In essence, that's what the WINE project is: emulation of all the Windows API's required to run Windows applications on a Unix/X11 platform. The thing is, an OS these days is more than just a set of system calls - it's a collection of shared libraries providing a complete user interface. That's why you have to install large chunks of a Linux system to run Linux binaries on FreeBSD - getting all the libraries down to the system call level needed by those binaries (and in some cases, you want GNU/Linux executable also, because the binaries expect to invoke executables from Linux, not BSD, and they are different enough to matter). Even then, the reason it works reasonably well for GNU/Linux with X is because the X server/client API use IPC mechanisms so you can get away with running a FreeBSD X11 server, letting the Linux applications use Linux client-side libraries, and just make sure the IPC calls are simulated properly (module hi-end graphics tools and other late additions). Other OSs don't have as clean a division between applications and the graphics subsystem, so you have to provide all the services the OS provides for talking to the graphics device as well. Linux gets another win here in that all the relevant libraries are open source; for proprietary systems, even if you could find a clean layer to switch platforms, you'd have to rewrite all those libraries above that layer from scratch anyway. Which is why WINE has to simulate all the Windows GUI calls using X11 code. So while a Darwin (the OS underneath OSX) ABI would be possible - though it's not clear how painful because it's not clear how visible the MACH APIs are - it's not clear how useful it would be by itself. You could run OSX applications that used X11 for the GUI after building the appropriate libraries (just like Linux), but those apps are probably available native anyway. You couldn't run applications that use the various and sundry Mac-specific graphics (among other things) frameworks, not without providing code to simulate all the calls provided by those frameworks - which are proprietary, and not part of Darwin. Which means this project now resembles WINE more than the Linux ABI layer. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org