*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When Apple switched from PowerPC to x86, the MacOS uptil then was obviously powerpc. How the HELL did it suddenly one day boot up and do same thing on x86???!!!
When Apple switched from PowerPC to x86, the MacOS uptil then was obviously powerpc. How the HELL did it suddenly one day boot up and do same thing on x86???!!!
Well, I would guess that --before the Intel Macs were announced-- they spent some time porting the SW to the x86 architecture.
I'm trying to remember if MacOS became Unix-based at the same time.
In principle, with modern tools, most SW is platform-independent. For something like an OS, there are header files that take car of the machine-specific details.
simplistically, "porting" means re-compiling the SW for the new environment (and perhaps a bit of de-bugging....)
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
The Apple file system has multiple resource forks, so a particular file can actually exist for two different CPU architectures simultaneously. Their file system and toolchain had the hooks built in for a long time to be able to be built for x86, so it was just a matter of actually compiling the software for the extra architecture and then installing it on the new hardware.
Remember that existing hardware didn't suddenly switch architectures, so all the existing PPC machines are still PPC and run the PPC version of all the Apple apps. Only the new Intel-based machines actually run the x86 version.
To assist in the transition from software that was written only for the PPC architecture, Apple created a VM layer called Rosetta that would translate PPC instructions into x86 so that any time you start an app built for PPC, it would automatically execute through the VM and so it would work transparently without having to wait for a new version of the software.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Quote:
Originally Posted by pixellany
I'm trying to remember if MacOS became Unix-based at the same time.
It became BSD-based after they merged with NeXT. OS9 was the last in the family of the original MacOS. With OS X they went to a BSD/Mach hybrid. Notice that since then they haven't changed the major revision number (10), but instead bumped the minor number (0, 1, 2, 3, 4, 5, and now 6 with Snow Leopard). Essentially "OS X" became the brand name of the OS (like "Windows").
I can't remember how long they've had the x86 hooks in the toolchain, but certainly the file system was designed for just that sort of thing from the outset.
I seem to recall an interview with Apple (Jobs, probably) where they said that they had built an Intel version of every release of OS X (.0, .1, .2, etc).
As PPC interrupt handling is different (as in, different from useful, if you are trying to do real-time stuff), there was probably a fair amount of 'ifdef-ing' in the hardware-specific code and the interrupt handlers, but that's such a small percentage of the code base, although a tricky one.
But once the very hardware-specific stuff is out of the way, its all C, right?
Distribution: Arch, Debian, Ubuntu, OpenBSD, HP-UX, Solaris
Posts: 1
Rep:
NextSTEP/OpenSTEP (where OS X came from) originally ran on Intels, 68k, sparc and parisc so they actually ported it to powerpc to use with OS X, they obviously dropped the other platforms besides i386 though.
Steve Jobs was a good boy and asked Santa for a miracle for Christmas - he sure saved a lot of money because he didn't need to hire programmers to do the job.
In the alternate universe, someone typed 'make BUILD=gnu-ppc-osx HOST=gnu-i686-osx'. Then they spent the next week building all the other stuff.
Look in the /arch subdirectory of any Linux source and you'll see about 25 different architectures represented there. The same Linux can run on any of them.
"Most of Linux" is architecture-independent. The parts that aren't, are right here. These files will include, for example, asm sections for this-or-that CPU.
Also notice that the same compiler is used.
Modern language systems, like gcc, are also built to be "architecture-independent," and they have the ability to generate code for a CPU of a different type than the one they are running on ... a feat called "cross-compiling."
Although this has been technically-possible for many, many years, Apple was one of the first to "boldly and confidently do it, and succeed." That's one of the first times when Wall Street really sat up and started taking notice of AAPL...
Well, I would guess that --before the Intel Macs were announced-- they spent some time porting the SW to the x86 architecture.
I'm trying to remember if MacOS became Unix-based at the same time.
Mac OS X has been Unix-based since development started in 1998 or 1999, except that Leopard is the only version to be UNIX certified. Mac OS X is a BSD operating system borrowing the userland from FreeBSD 5 and using the Mach kernel as the base.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.