Haiku PowerPC compatibility

Useful for running on BeOS itself… since that is where the dumping would have to happen as that machine can’t even run Haiku anyway. I guess the Haiku toolchain would build a compatible binary at least.

Not sure what you mean Mac G5s were discontinued 12 years ago… so they aren’t still being sold new.

2 Likes

I think you’re mixing things up here, it’s BeOS which supported PPC machines before G3. Haiku does not support much for now as it won’t compiler anyway. But once we fix it it shouldn’t be a problem for G4 & G5, since we now have enough documentation with Linux & *BSD ports anyway.

2 Likes

A GCC 2.95 PPC toolchain should be able to compile working binaries for PPC BeOS though right even though the kernel itself and userland from Haiku won’t run on them yet?

Supporting old machines is fine… but they just get more and more rare over time, and the Macs from that era especially the more integrated ones break and you can’t fix them.

No, for at least one reason, the current linker doesn’t properly support PEF. It says it does but it just outputs garbage. I started fixing it as I need a PEF file for the loader on the BeBox.
Maybe tweaking Retro68 would do, but for now I don’t plan to do much PPC BeOS dev anyway.

Ok that makes sense I remember you mentioning this now but I was thinking PEF was just the kernel.

Did you ever look at this?

1 Like

BeOS PowerPC never used GCC. I don’t think GCC has ever properly supported the PEF… Mwcc was a big pain in the rear.

That looks a lot like elf2aout (used to make elfs bootable by openfirmware)… wonder how well it works.

It apparently was how they got the BeBox to boot BSD… I guess it only needs to work as well as that? I think what they did was as I suggested earlier in heer (or another thread related to this)… they made a small Big-Endian bfs volume, put this in place of the kernel, and bootstrapped the rest of the boot from that entry point.

One of the big issues with the way the legacy PowerPC appkit stuff work is that it is written in C++ and uses the MWCC libraries and name mangling. I messed around a lot with getting the legacy GCC that used to exist to work with more modern code. I wanted to get an assembler, but MW never had one on BeOS. In the end I started to implement one using VASM and the docs for MWCC Object format - because that was documented and easier than trying to get any info on PEF. But it’s a dead end for Haiku. I revisited the project a while back and got a lot of the code to dump the object format working in C# (I started again from scratch - I don’t have the original work I did as I think the hard drive died IIRC.) I have not touched the code in a while, but it is here: mwobdec

3 Likes

Oh I didn’t look at the NetBSD stuff, but yeah, I suppose I could use that instead of trying to fix ld. It was more of an exercise. I managed to generate a valid file although it wouldn’t load because it’s missing some stuff still.

Is there worked (semi-worked) files of Haiku PPC?

Anything that exists is in git or in the review queue… I don’t think PPC has seen much active work as of late. I think PPC and Sparc64 which Pulkomandy is working on a bit are roughly at similar stages neither boots to desktop yet.

Actually I do have some local branches here but only small attempts so not much.

1 Like

Still enough to make me technically wrong :wink:

1 Like

I really enjoy alternative architectures. I had a realization with PowerPC though that the hardware is pretty limited to:

  • Old Apple devices which aren’t wearing well (find me G5 iMac or iBook, and it’ll likely need its GPU reflowed/reballed to fix the video and the capacitors replaced)
  • Non-Apple PowerPC devices are pretty specialized and hard to locate.

The reasons above are why i transitioned to playing with arm,arm64 (greatly available) and riscv64 (cool factor). I see more value in @PulkoMandy 's SPARC64 work over PowerPC since SPARC hardware, (while old) is still holding its functionality well. (find me a SparcStation which doesn’t still grind away happily)

I make the occasional commit to PowerPC to try and keep our port building, but honestly unless someone picks up work on it, death is likely.

4 Likes

Yeah however pulkomandys port may not work on any sparcstation since those are all 32bit and not his particular interest…granted it should not be terribly hard to rectify that LOL. I bet Haiku would run quite reasonably on a quad 142Mhz hypersparc with 1GB ram (hyperstation 30 board). Or a sun4d…8x85Mhz 2GB.

Power hardware isnt that hard to get ahold of… like the Talos board etc…and its modern. There is also that open source PPC laptop being worked on…

If Be had focused on x86 instead of AT&T and PPC from the start they might still be around. A dual Pentium Pro BeBox would have been possible near the R3 release. Hindsight is 20/20 but Be miscalculated thinking CHRP would take off and that they could get around competing with Microsoft.

If Haiku were to focus on an architecture other than x86_64 it should be ARM, not PPC. I have a feeling the industry entire will be moving to ARM sooner than later leaving x86_64 behind and we will probably all be worse off for it because the x86_64 has been the closest thing we’ve ever had to an open hardware platform.

3 Likes

Well yes PPC isn’t as widespread as it used to be. The target is more of a sentimental value these days, but it’s also an incentive to optimize because those old machines have a low max-RAM point :sweat_smile:

2 Likes

Apple PowerMac G4 and G5 are plentiful.There are supporters for customized boards for FOSS development as well.

1 Like