XPostFacto on Pegasos
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    That got you reading, didn't it!

    Actually I want to start an intelligent discussion on how on earth people think they will get this running on Pegasos.

    Someone said they had talked to a developer who was going to "port" it..? Who was that? Who was the developer?

    Let me iterate through a few things from the XPostFacto FAQ;

    http://eshop.macsales.com/OSXCenter/XPostFacto/Framework.cfm?page=XPostFacto.html

    You need to have at least Mac OS 9.0 installed

    You need a disk that was formatted with Apple's Drive Setup or Intech's Hard Disk SpeedTools

    .. apart from the fact that MacOS X won't boot on anything but a Mac anyway (the reason XPostFacto works is because it adds in the stuff from newer Macs to older ones.. by munging certain return values and adding drivers)

    .. it doesn't do any wholesale modification to the OS, and relies on certain hardware features to be present.

    How do people propose that it is ported?
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »08.09.04 - 14:10
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    "What is needed in order to make Mac OS X work on additional machines?

    Basically, here are the things that need to be done to support a new model.

    1. Figure out how to write to its NVRAM.
    2. Figure out what patches are needed to its Open Firmware drivers.
    3. Figure out how to write to the partition table of its drives.
    4. Figure out whether it has any devices that need drivers in Mac OS X (and write the drivers--well, preferably port them from somewhere). "

    see? It can be done. MacOS 9 is only used to have the right partition table and copy the stuff inside. On Pegasos you could have another HD with the Mac partition table format. Or you may change the Darwin kernel so it recognizes correctly our dear RDB.

    The first thing we would need is Darwin running on Pegasos. I don't know if OpenBSD shares any similarities with Darwin in the driver department, but it may help a lot to have it faster.
  • »08.09.04 - 14:46
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Bladerunner
    Posts: 418 from 2004/2/19
    Well Neko, no offense here, but everytime I read a posting from you, you sound very very harsh. A bit more friendlyness doesn`t harm ;-)

    But back on topic, I had a small mail exchange some years ago with that XPost facto guy, it was some time before the Peg was officially released.
    And he told me that it shouldn`t be a Problem, even if there is no Mac OS installed. There are some hardware requirments, true, but the Peg should fullfill them. And even if a Mac OS is necessary, well who prevents a usere to make a modified boot cd? You can use a original Mac for create it and then boot the Peg into OS X.
    A bit more work, true but not impossible.
  • »08.09.04 - 17:36
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    I think that XPostFacto author should have a Peggy (bbrv: hint, hint)

    Many, many users would like to run OS X natively!
  • »08.09.04 - 17:48
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Posts: 979 from 2003/6/28
    I prefer efficient over friendly...

    I think that use an OS from Apple on non-apple hardware is illegal...

    When apple see that our platform is having an important part of the market, they will fuck Genesi because promoting using apple OSes on their hardware...

    MacOnLinux is opensource software and not from Genesi, so no problem, can be mentioned but not promote illegal acts... His use for use an Apple-OS on non-Apple hardware may be illegal... Advertise of possible illegalities on do it...


    Open your eyes, for use MacOS better buy some Mac. Pegasos is for linux and MorphOS, and possibily in the future other unixes and other OS...

    Genesi is a company, not an non-profit organization...



    [ Edited by timofonic on 2004/9/8 19:19 ]
  • »08.09.04 - 18:18
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Heh, no wonder author was not replying then. I thought XPostFacto was something like ShapeShifter :-P
    1 + 1 = 3 with very large values of 1
  • »08.09.04 - 20:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    "Additional machines" in the quotes above refers to additional Mac models.

    The Pegasos does not store Apple MacOS data in the NVRAM like a Mac does. It doesn't have a special area for it. You're not really supposed to write to it either (I wouldn't want MacOS to corrupt my nvram and leave me with only an IKARUS serial console).

    You could figure some way of storing NVRAM on the disk (and saving it on shut-down) which could be loaded via a simple Forth script however. Good luck on unplanned reboots.

    Patches to OpenFirmware drivers; also for Mac models.

    Write the partition table of it's drives; also for Mac models. You can write any partition table you like, but the MacOS will assume it's got an Apple partitioning scheme. You won't be able to dual-boot MorphOS or Linux without a second disk unless MorphOS or Linux could explicitly read Apple partitions (Linux can, MorphOS (Ambient Format..) can DETECT them, but not boot from them?)

    Device drivers for MacOS X for Pegasos will be the hard part; you need a driver for the Firewire (fairly simple, Firewire has a standard HCI just like USB.. but good luck doing that), USB (Apples use OHCI, Pegasos is UHCI) and audio (also Via AC97). Then there is the IDE etc.

    Darwin IS the first step, and I'm sure we have a Darwin developer somewhere who is getting a Pegasos. But MacOS X is quite definitely NOT just Aqua on Darwin. It has it's own special driver model which is fairly protected, and OpenSourced only partially via the Apple APL.

    Crumb; you can't just "port" XPostFacto to Pegasos, it simply does the wrong things for a start. It requires you have a Mac, with Mac extensions to OpenFirmware, and you can't get a MacOS 9 boot disc and distribute it (EVEN MORE ILLEGAL THAN INSTALLING OS X ON A NON-MAC!)

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »08.09.04 - 21:14
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    "You could figure some way of storing NVRAM on the disk (and saving it on shut-down) which could be loaded via a simple Forth script however. Good luck on unplanned reboots."

    You may create the NVRAM in RAM each time you boot if you want (Mac emus on AmigaOS work without problems if you delete it... these emulators simply create the file again next time you boot...)

    "Write the partition table of it's drives; also for Mac models. You can write any partition table you like, but the MacOS will assume it's got an Apple partitioning scheme. You won't be able to dual-boot MorphOS or Linux without a second disk unless MorphOS or Linux could explicitly read Apple partitions (Linux can, MorphOS (Ambient Format..) can DETECT them, but not boot from them?)"

    I guess it's possible to modify Darwin kernel to support RDB... another solution is make a virtual hard disk on a partition like Amithlon does on pc. And the easiest one is use a 2nd hard drive

    "It requires you have a Mac, with Mac extensions to OpenFirmware,"

    AFAIK These OpenFirmware extensions are simply patches to make OS X find OpenFirmware functions it assumes to find on modern Macs.

    The rest of extensions required by OS X may be done:
    a) patching existing components
    b) creating new drivers (looking the MOL drivers may help a little, if documentation does not give many examples)

    " and you can't get a MacOS 9 boot disc and distribute it (EVEN MORE ILLEGAL THAN INSTALLING OS X ON A NON-MAC!)"

    You don't need OS9 for anything. It's only used to partition your hard drive. If linux came with all macs and was easier to use they would suggest you to use Linux.

    AFAIK MacOS9 and X don't share much low level code so it wouldn't be much useful.
  • »09.09.04 - 11:37
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    "Open your eyes,"

    My eyes are quite open, haven't you seen my Avatar? ;-P

    "Genesi is a company, not an non-profit organization..."

    Genesi would (at least) double the sales of Pegasos if OS X ran natively.

    [ Edited by Crumb on 2004/9/9 12:52 ]
  • »09.09.04 - 11:47
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 2307 from 2003/2/24
    Quote:


    Crumb wrote:

    Genesi would (at least) double the sales of Pegasos if OS X ran natively.




    /me looks at prices/specs for the new iMac......


    FAT CHANCE !
  • »09.09.04 - 12:11
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    MacOS X on Pegasos would be "cool". Genesi could not endorse it, of course.

    But the point is, no amount of XPostFacto is going to boot MacOS X on Pegasos.
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »09.09.04 - 13:30
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    If the author of XPostFacto thinks it's possible to port it, I guess he's right.
  • »09.09.04 - 14:35
    Profile Visit Website
  • Moderator
    Golem
    Posts: 766 from 2003/2/28
    From: Denmark
    But which part(s) of XPostFacto would actually be useful for running OS X natively on the Pegasos? Are we talking about porting XPostFacto or OS X? (ie. writing new drivers to support the Pegasos hw and possibly modifying the installer)
  • »09.09.04 - 17:37
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Acill
    Posts: 1923 from 2003/10/19
    From: Port Hueneme, Ca.
    Heck if people can install OS X to x86 using PearPC and to Linux under
    MOL then I dont see why it couldnt be done under MOS with some
    software in the same way.
    Powermac Dual 2.0 GHZ G5 PCI-X (Registration #1894)
    Powerbook 1.67GHZ
    Powermac Dual 2.0 GHZ G5 PCIE (Registration #6130)
    A4000T CSPPC, Mediator
    Need Repairs, upgrades or a recap in the USA? Visit my website at http://www.acill.com
  • »10.09.04 - 02:19
    Profile Visit Website
  • Just looking around
    Jigen
    Posts: 3 from 2004/9/10
    From: Pennsylvania
    Hello everyone,

    I've been lurking for awhile, but this thread motivated me to register. I don't have a Pegasos, but I do have an IBM RS/6000 7025-F50. It is a CHRP machine with dual 332MHz 604e and I have been investigating the possibility of getting Darwin/OS X running on it. I also have plenty of old and new world Macs and I’m well versed on Darwin and OS X’s boot process.

    XPostFacto itself is just an application that installs OS X kernel extensions to support old world hardware and patches the “broken” open firmware on those systems. The idea of directly porting it to a Pegasos or any non Mac PowerPC system would be useless. But it does show that it should be possible to create a similar utility to accomplish the task of booting OS X on totally unsupported, non Mac systems. I’ve given some thought to how this might work but before the specifics there is a major problem that I have run into with my RS/6000 and I am not sure if it would affect a Pegasos system.

    The Darwin/OS X boot loader is called BootX. This application is in the xcoff format. My F50 seems to only be able to load ELF, PE, Forth, or machine language binaries. There is no xcoff-loader package in the open firmware. Can a Pegasos load xcoffs? I have not been able to find a good listing of the output from a Pegasos’s open firmware including any children of the packages node to determine the capabilities of the Pegasos’s open firmware implementation. If someone would, it would be helpful to see if a Pegasos system could load NetBSD’s xcoff boot loader
    ofwboot.xcf.

    If, like my machine, a Pegasos cannot load xcoffs, then BootX would have to be compiled as another type of binary, probably ELF, or another boot loader would have to be written from scratch that could accomplish the tasks of BootX, i.e. loading the kernel extensions and finding and loading the mach kernel.
    Also, if you are interested, here’s the output of my open firmware with the dev / ls command and dump-device-tree command.
    RS/6000 F50 Device Tree

    I have asked for some help over at Open Darwin’s hackers mailing list, but most people there are x86 users trying to get Darwin running on the multitude of PC hardware. There are really no PowerPC people there because virtually all Macs can already run OS X. Maybe amongst you Pegasos users there is a smart developer to help me in this worthy cause! :-)

    [ Edited by Jigen on 2004/9/9 21:47 ]
  • »10.09.04 - 02:46
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Wow, Jigen, that's insightful! Neko was right... Why not more applications for MorphOS, instead of attempting to convert our beloved computer into some other one?
  • »10.09.04 - 07:55
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    @Jigen:

    Thank you for your explanation, it's pretty interesting :-)

    "it would be helpful to see if a Pegasos system could load NetBSD’s xcoff boot loader
    ofwboot.xcf."

    I don't think Pegasos' OpenFirmWare can load xcoff binaries, however if xcoff binary format is not too strange I guess a binary converter may be created or parts of OpenBSD boot may be useful.

    The most clean solution would be a resident program that you could store in the flashrom to load xcoff binaries .

    @jcmarcos:
    That a developer creates some patches for SmartFirmWare and MacOS X to boot it doesn't force all MOS devs to stop releasing software
    ;-)

    Think about it as running another Linux distro, BSD or any other unix clone...


    I agree that MOS apps are of vital importance, but many people is interested in the Peggy due to its hability of running MOL too. It's not as if they bought Pegasos to run MacOS, it's just that it's good to run additional OSes, just like it's good to run OpenBSD, Linux, etc...

    If you can't find an app in MOS at least you can search that app in the Linux/MacOS environments and use Pegasos as your ONLY machine.

    That you could launch Photoshop on Shapeshifter years ago didn't stop developers to continue improving ImageFX, ArtEffect, Photogenics...

    Being able to use OS X natively is good because many Amiga users don't like to use Linux (and many of them have problems installing MOL)



    I have investigated a little and it seems that old macs can't load ELF binaries and only can load xcoff files... Check out this document about BootX

    [ Edited by Crumb on 2004/9/10 10:32 ]
  • »10.09.04 - 09:14
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    jcmarcos, Of course I was right! :D

    Thanks jigen, for such nice explanations. I was hoping I could go the slow, painful route and bring around a gradual realisation through argument.

    Of course just blinding them with science is just as good :)

    Here is the big big post that explains everything;

    The initial task to get MacOS X working on Pegasos is to implement the Mac prom_#? firmware functionality and expected stuff in the OpenFirmware - XPostFacto does this to SOME extent but it expects that there is at least a sane (as sane as Apple OF gets) foundation to work from.

    SmartFirmware contains NO Apple proprietary functions, therefore has NO base to work from. Someone would have to add this. I suspect it would be possible from a Forth boot script or loader (perhaps a yaboot-style thing).

    The code from CodeGen supports ELF and COFF, I am not entirely sure of the differences between COFF and XCOFF. I also don't know if the support is compiled in. NetBSD has an XCOFF loader because NetBSD's loader for OpenFirmware is generally meant to run on Apple Macs, which most certainly DO have XCOFF support. I am also not entirely sure that Pegasos OF can boot from HFS+ filesystems or recognise Mac partitioning. You cannot boot MacOS if OF doesn't see the disk layout, read the filesystem or understand the loader.

    As for NVRAM, it would need to be stored permanently somewhere; Apple Macs rely on it for certain things, and act strangely (not keeping time etc.) when it is blank (take a real Mac, and do COMMAND-OPTION-P-R and it will nuke the nvram.. anything below OS X will FREAK, OS X just ignores it but makes things up as it goes along - not ideal :)

    It might be possible to "portion" out 8k of nvram especially for MacOS usage. I do not recall the size of the nvram on the Pegasos II at this time.

    Drivers for Pegasos for Darwin or IOKit would have to be written. Porting Darwin is the very first step - initialise the northbridge, and so on, to do the things that Darwin and MacOS want to do.

    I wonder how many people want to spend the time reimplementing drivers for 11 discrete and unsupported hardware components;

    * OS X has *NO* support for legacy PS/2, serial ports or parallel ports. Pegasos firmware currently doesn't support USB keyboards, so you could get around this by using BOTH. If you relegated serial port support to simply Darwin kernel debugging (no MacOS access), then this would be easy.

    * not to mention the essential Via IDE (otherwise speed will be practically zero)

    * Via Firewire

    * Via (UHCI) USB controller. I am not sure if the USB controller is supported on a PCI card in MacOS or not. It's certainly possible to plug in PCI USB cards and have them "just work" on MacOS. One in the southbridge (with southbridge registers..) however may be different.

    * the Via AC97 functionality *and* the specific Sigmatel codec functionality

    * and definitely not the Via Rhine or Marvell ethernet.

    Then there is hoping MacOS has support for your non-OpenFirmware Radeon (HAHA good luck!) or flashing it with an OpenFirmware BIOS and hoping it still runs under MorphOS and Linux and everything else (should.. but.. the world is full of surprises).

    MacOS might boot without specific support for those chipsets bar USB (since MacOS requires it) and the requisite changes to Darwin and the OpenFirmware initial stuff. After that new drivers would need to be installed and SOMETHING like XPostFacto would be useful as long as it didn't require booting MacOS first (maybe a custom Darwin install CD could be made..)

    Darwin developers (real PowerPC ones!!) should be getting Pegasos systems from the Freescale deal, so at least we will have Darwin sorted with a little help. It's quite disappointing for me as it stands that Darwin has gone from a very successful PowerPC kernel to yet-another-x86-project. It's depressing to see alternative platforms thrown over the side just so they can get every variant of the PC working - I wonder where the "cool" factor of getting Darwin to boot on every PowerPC machine ever created could have gone, as jigen said, plenty of IBM systems around - thin clients and terminals all the way up to servers.. and then there are more than just Apple machines. There is an RS/6000 (CHRP!!) laptop series somewhere in the world and occasionally on eBay - doesn't it sound cool to have that kind of weird and wacky support, doesn't NetBSD thrive on that kind of "it runs on everything" rather than the more Windowsy model of "it runs on everything that executes IA-32 instructions"?

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »10.09.04 - 15:28
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    I should note that XCOFF and the original COFF are part of IBM's AIX (and one of the elements of the CHRP specification if I remember rightly.. which is why OpenFirmware supports it).

    NetBSD works great on big AIX-bent computers as far as I know.

    Either way, XCOFF isn't a mystery. It's just debatable if it's turned on in OF or not.

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »10.09.04 - 15:34
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Whoa! Neko, you are a monster of knowledge! What t thread!

    Yum...
  • »10.09.04 - 15:41
    Profile
  • Just looking around
    Jigen
    Posts: 3 from 2004/9/10
    From: Pennsylvania
    My RS/6000 has the same capabilities as old world Macs to scan HFS disks partitions and find partitions labeled as bootable. Like old world systems, though, it cannot actually read and list the directory contents. Only new world Macs can do that. I’m certain Pegasos systems cannot read HFS.

    This should not be too much of a problem though, because BootX itself can understand HFS, HFS+, UFS, and ext partitions. BootX would need to be located in a place that the Pegasos firmware can read, and once it is loaded, it would do the job of looking inside the Mac partitions to find the kernel.

    As for the PC type components such as the PS/2 etc., support for these exists in Darwin for the PC, so hopefully it would not be that difficult to get these drivers working on PowerPC. The same goes for the IDE.

    According the CHRP binding Rev. 1.8, the required binary formats that must be implemented are ELF and PE (Portable Executable – Windows NT). Other formats may be supported, but are not required. From what I understand, older RS/6000 could load xcoffs, and from some of the documentation, it seems like mine should be able to as well. But I get the message “Unrecognized client program” if I try to load either BootX or ofwboot.xcf. If I’m not mistaken, the Pegasos is based on the newer POP specification, so its binary support might be different from CHRP.

    If you want to take a look, you can find the CHRP Binding specifications at Sun’s site.
    CHRP Binding Rev. 1.8
    The file is a postscript, but you can convert it to a PDF at
    ps2pdf.com
  • »10.09.04 - 20:42
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Neko
    Posts: 301 from 2003/2/24
    From: Genesi
    @jigen

    Pegasos is a CHRP motherboard. CHRP is mostly defined by it's OpenFirmware support, and the fact that it has a PowerPC in it :D

    POP was really not a great deal different, apart from it lacked the requirement of an OpenFirmware BIOS to make the format "more popular", and the "free" schematics had AGP on them. The rest of the differences are too small to even go into.

    Your RS/6000 will have XCOFF support because it needs to boot AIX. XCOFF is the default binary format for AIX. COFF is from System V, but it sucked because it didn't allow for dynamic linking or things that C++ required. The reason it complains could be because there may be a magic number somewhere in the loader that is "wrong" for standard XCOFFs. There is a magic number which is set for 32 or 64-bit XCOFF binaries which Apple may have changed in theirs..

    http://www16.boulder.ibm.com/pseries/en_US/files/aixfiles/XCOFF.htm

    By the way, Windows NT (and 2000, XP, 2003 and Longhorn..) all run XCOFF binaries just fine if you can manage to generate them these days. I have a feeling that OS/2 (Hooray for IBM :) used them, hence the support.

    It would be easier for MacOS support if the Pegasos firmware just supported HFS+ though. Partitioning your disk just to put a boot loader on there to boot some OTHER partition on the disk is pretty darn lame. Plus for ease of porting existing Mac-bound operating systems and tools, possibly for peeking around your MacOnLinux partition without booting Linux.. :)

    As for PS/2 and so on, Darwin may support them, but that's to provide it for a GNU-style environment with X servers and the like.

    MacOS would need a proper IOKit driver and to interface somehow with the Human Interface system - the MacOS input subsystem that does NOT understand anything but USB (it doesn't even go as far as Apple's own ADB bus!). I'm sure the IDE drivers and so on while being fine in the kernel, will need proper IOKit equivalents for actually inside MacOS X.

    BTW I have *all* the CHRP and OpenFirmware documentation, thanks :)

    Neko
    Matt Sealey, Genesi USA, Inc.
    Developer Relations
    Product Development Analyst
  • »11.09.04 - 02:38
    Profile Visit Website
  • News Moderator
    News Moderator
    Darth_X
    Posts: 571 from 2003/2/10
    From: Vancouver Isla...
    RS/6000 model 850 laptop:
    rs6000_laptop_850.jpg

    RS/6000 model n40 laptop:
    rs6000_n40_notebook.jpg
    When you have eliminated all which is impossible,
    then whatever remains, however improbable, must be the truth!!! - Sherlock Holmes
  • »11.09.04 - 03:18
    Profile
  • Just looking around
    Jigen
    Posts: 3 from 2004/9/10
    From: Pennsylvania
    Neko

    Thanks for the information. Leave it to Apple to have to make everything proprietary!

    In any case, it would be great if we could get more PowerPC users interested in this. It just does not seem right that my Athlon can run Darwin but not my RS/6000 or your Pegasos. :-)
  • »11.09.04 - 04:01
    Profile