vmlemon / Orion

Next-generation, L4Ka::Pistachio-based operating system
7 stars 0 forks source link

Can't build with PowerPC 64-bit toolchain (LE), on POWER9 #2

Open vmlemon opened 5 years ago

vmlemon commented 5 years ago

There are several issues, preventing the kernel from building (Assembler problems, undefined variables, pulled in from various headers, ), as well as the userland.

For the userland, we have issues with tracebuffer.h: image

And, most of the libraries, and components bail with MSB header issues.

vmlemon commented 5 years ago

We can build everything in lib/io, now, after doing a "make clean", at least... image

vmlemon commented 5 years ago

PiggyBacker has some issues: image

vmlemon commented 5 years ago

We could probably try with https://ftp.gnu.org/gnu/gcc/gcc-4.8.3/ (first version to support 64-bit, little-endian PowerPC; and, we used to use 4.8.1, in Enryo, according to my old bug reports)

vmlemon commented 5 years ago

The progress, so far is that I managed to track down a copy of Debian Jessie, for Big-Endian PowerPC (https://cdimage.debian.org/cdimage/archive/8.10.0/powerpc/iso-cd/), which can install under QEMU, but is extremely-slow, and there seems to be issues with installing packages, from the repositories.

It would give us a Linux, of the same vintage as the compiler, which could be a handy starting point, for trying to build the repository, and conveniently, someone has posted DEBs of the Cell SDK (for Jessie!), to https://github.com/aethyx/ps3linux/tree/master/Cell%20SDK%203.1%20for%20Debian%20Jessie/devel.

We should really mirror this stuff, somewhere...

vmlemon commented 5 years ago

I also registered for an account on MiniCloud (http://openpower.ic.unicamp.br/minicloud/) on 29th August 2019, but sadly, I haven't heard anything back, from the administrators (this would get us free access to a POWER9 virtual machine, for building), yet.

vmlemon commented 5 years ago

To pull along the big-endian build project, I also picked up a Nintendo Wii (which contains a 32-bit, 729MHz, PowerPC ISA 1.10 CPU, that roughly-corresponds with PPC G3/750-series designs, and a whopping 88MB of RAM, which probably wouldn't win awards for performance, but could probably still be faster than emulating BE-PPC, on a Celeron!), as well as a HDMI/VGA adaptor (doesn't seem to work directly, with the PS3, thanks to HDCP; so, I've got Amazon to ship me an "iSolem" 1 input:2 output splitter, after seeing people report success, as well as a VGA/HDMI/PS3/Wii video hydra cable. hopefully, Real Soon Now(TM)).

The Wii could be interesting, as both a build machine, and a target platform (we seem to have G3 support, in the codebase, already, but I don't know if Nintendo implements even vestigial Open Firmware support).

Ideally, I would buy a G3/G4/G5-series Mac Mini, or PowerBook, one of the PPC Amigas, or a Talos II, but my personal budget can't stretch to it, right now. (All of this is funded from my own pocket, on a low income). :(

vmlemon commented 5 years ago

As for the PlayStation 3, I'm still trying to get PetitBoot to actually work with a USB keyboard, so that I can boot the FreeBSD installation media, to try installing it. (It currently hangs, after displaying a menu, and stops accepting input, but the keyboard itself works, for navigating the CellOS's XMB interface, at least).

Not sure if I'd need to use a USB hub, or if there's a bug in PB, the USB controller, or a fault with the keyboard that I'm using.

I would look into downgrading the firmware, from Rebug 4.81.2, but there's a risk of permanently-bricking the machine, and Sony have also recently updated the official firmware (I haven't tried to install it, on my unit), which means that I now have to be careful with connecting it to my LAN.

As an target architecture, and build architecture, PS3 is still a major focus, though - even with a hypervisor, USB 2.0, and 256MB of RAM, having a native, big-endian PPC machine would be a massive performance boost, compared to QEMU, on x86-64.

vmlemon commented 5 years ago

As of the 3rd of September 2019, I now have access to MiniCloud, which lets me create big-endian Debian Jessie VMs, little-endian Ubuntu ones, and big/little-endian Fedora ones, with various versions, on both POWER8/9 QEMU/KVM machines, via a Web-based OpenStack interface.

The authentication procedure is weird, since it involves generating RSA SSH keys, and then importing them, via the Web UI, in order to do passwordless SSH, so it took me a few attempts to make a working VM, that lets me log in.

Currently, I've got a dual-core POWER8 instance, with 2GB of RAM, and 40GB of storage, which should be more than sufficient, for now.

The only downsides with the configuration are that the default editor is VI, instead of VIM, and packages are a pain to install, since Debian have discontinued Jessie repositories, although packages are still available from http://ftp.psu.ru/linux/debian-security/pool/updates/main/g/git/, and http://82.68.201.107/html/debian-security/, for now.

vmlemon commented 5 years ago

Also added a Fedora 28 instance (P8/dual-core)

vmlemon commented 5 years ago

Not sure if anyone's around, upstream to accept the patch (or if anyone cares enough about the /l4ka/pistachio repository, anymore), but at least for the RedHat GCC suffix problem (Fedora uses a non-standard GCC tool suffix, for its toolchain), I submitted a pull-request to https://github.com/l4ka/pistachio/pull/15.

vmlemon commented 5 years ago

I also registered for an account on MiniCloud (http://openpower.ic.unicamp.br/minicloud/) on 29th August 2019, but sadly, I haven't heard anything back, from the administrators (this would get us free access to a POWER9 virtual machine, for building), yet.

We now have the MiniCloud account, and it's already generating results, with the 64-bit big-endian codebase, using a Fedora 28 VM, but I haven't looked into little-endian support, for a while.

vmlemon commented 5 years ago

Haven't gotten around to looking back into little-endian support, but everything to do with building on big-endian has been upstreamed into the master branch, as part of the NICTA technology integration project (https://github.com/vmlemon/Orion/issues/9).