Interest in Reviving PowerPC Support – Testing on iBook G3 and PowerMac G5

I tried a quick PowerPC boostrap during my lunchbreak and did not get to the mentioned texinfo bootstrap error.

Instead I got an error in Haiku sources:

../haiku/src/system/kernel/arch/ppc/paging/classic/PPCVMTranslationMapClassic.cpp: In member function 'virtual bool PPCVMTranslationMapClassic::ClearAccessedAndModified(VMArea*, addr_t, bool, bool&)':
../haiku/src/system/kernel/arch/ppc/paging/classic/PPCVMTranslationMapClassic.cpp:1124:18: error: no matching function for call to 'PPCVMTranslationMapClassic::UnmapPage(VMArea*&, addr_t&, bool)'
 1124 |         UnmapPage(area, address, false);
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../haiku/src/system/kernel/arch/ppc/paging/classic/PPCVMTranslationMapClassic.cpp:648:1: note: candidate: 'virtual status_t PPCVMTranslationMapClassic::UnmapPage(VMArea*, addr_t, bool, bool, uint32*)'
  648 | PPCVMTranslationMapClassic::UnmapPage(VMArea* area, addr_t address,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
../haiku/src/system/kernel/arch/ppc/paging/classic/PPCVMTranslationMapClassic.cpp:648:1: note:   candidate expects 5 arguments, 3 provided

I suspect there was some regression at some point? Or is there some fix I’m missing for this?

Sony is the only console manufacturer who made it officially possible to install Linux on their consoles (both the PS2 and the PS3). That was removed later as someone tried to use it to bypass the copy protection for games. But it is easy to replace the firmware on a PS3 with a “jailbroken” one and restore that functionality.

Anyway, the PowerPC port will only get old or irrelevant hardware (gaming consoles, servers, …). So it is a “just for fun” project and going more and more into the retrocomputing aspects. Don’t expect to make it your daily driver machine :slight_smile:

2 Likes

That depends if you want PowerPC or if POWER is enough ; )
There are for example Power9 systems from raptor computing, but those are insanely expensive.

I don’t think many people are actually using this as their daily workstation, right?

I think one Haiku User has such a device, but I don’t remember who… : )

I fixed that up already but forgot to submit the patch. The patch is now on gerrit.

I also noticed that Get the Haiku Source Code / Pushing Patches to Haiku 101 | Haiku Project does not mention change-ID for amending patches, I might do a pull request to the website later

1 Like

It does mention it : )

"#### Preparing your first patch

Before making a commit, install a Git hook that will automatically generate Change-Id’sfor you:"

apparently I’m bad at reading instructions, sorry

No need to apologize, I also manage to do this sometimes.

1 Like

I can do some tests on a Pegasos 2/G3 if needed.

2 Likes

Wasn’t the ability to install Linux an official feature?

Until people started abusing it. Japanese companies do be like that usually.

Doesn’t matter. They advertised that feature, making the removal a case of false advertising.

They got suid for this aswell, Sony agrees to pay millions for abandoning Linux on PS3 | The Verge

Great to see so much renewed interest around the PowerPC port!

I believe this is a good moment to join forces and give the project some momentum — especially now that there are multiple testers and devs active again. I’m happy to contribute with tests on G3 and G5, and I’ll keep an eye on the repo for updates.

Maybe we could coordinate efforts a bit more — even just a shared doc or thread to collect builds, patches, and test results would be a good starting point.

Thanks everyone for keeping the flame alive :wrench::fire:

2 Likes

I for now got around the problem by just commenting texinfo out of the haikuports.cross repository file. Though I guess that texinfo is kind of important for bootstrapping, I’ll have a look at it a bit later.

Also, I kind of got network booting running (downloading boot_loader_openfirmware to the local hard disk and then using a RemoteDisk). However, openfirmware only seems to use dhcp when necessary, so /chosen dhcp-response is empty and /options default-client-ip is unset by default. For testing, I hardcoded a client IP and I’ll try to get a small dhcp client working.

I let the bootstrap run on my work machine tonight and I hit another problem: the recipe for file uses an FTP link. Apparently my employer’s firewall blocks FTP?

==> PASV ... impossible d’établir la connexion à 38.117.134.18 sur le port 65463 : Connexion terminée par expiration du délai d'attente
Abandon.
Warning: Unable to fetch source from ftp://ftp.astron.com/pub/file/file-5.43.tar.gz (error: Command '['wget', '-c', '--tries=1', '--timeout=10', '--progress=dot:mega', '-O', '/mnt/storage/opensource/generated.ppc/../haikuports/sys-apps/file/download/file-5.43.tar.gz', 'ftp://ftp.astron.com/pub/file/file-5.43.tar.gz']' returned non-zero exit status 4.), trying next location.

So I’ll have a look at fixing that and switching to HTTP.

I switched to HTTP and I got no problems with texinfo here. The bootstrap image built just fine.

I am not set up to try booting a PowerPC image, however, so I guess I need to figure that out next. Is there a ready-made qemu command line and setup that I can use?

1 Like

When playing with PPC port last autumn, me and @Yn0ga used command line like this:

$> qemu-system-ppc -L pc-bios -boot d -s -S -cpu G4 -m 1G -display sdl -drive file=haiku-boot-cd.iso,format=raw,media=cdrom -drive file=haiku-minimum.image,format=raw,media=disk -prom-env "auto-boot?=true" -device ati-vga,guest_hwcursor=true -serial mon:stdio

(which will block qemu waiting for gdb to continue)

and in another term : 

$> powerpc-linux-gdb (note : gdb 14.2 recompiled for powerpc + python3 bindings + expat) 

gef> gef-remote --qemu-user --qemu-binary /home/rj/src/haiku/generated.ppc/objects/haiku/ppc/debug_1/system/boot/openfirmware/boot_loader_openfirmware localhost 1234
2 Likes

I want to do a bootstrap build aswell.

One question I have is why this requires to be run on Linux or potentially FreeBSD, which parts require this? can this be changed?

I’d rather work on my amd64 Haiku machine if possible

2 Likes

The HaikuPorter cross-compilation setup doesn’t support Haiku hosts; it tries to use the HPKG chroot environment which fails because the compiler and other sysroot items aren’t copied into it, IIRC. It’s probably fixable, nobody’s worked on it yet though.

2 Likes

There is no unsolvable problem here, it’s just that the bootstrap process is too dependant on the host environment, and that should be fixed. But there are not much bug reports or discussion about it, so it’s more a “try it and see what breaks” thing.

Maybe it would be a good idea to fix the path that is supposed to work (from Linux) before trying new ones. As discussed above, texinfo seems to fail on some Linux configurations and it’s not clear why.

1 Like