32bit Haiku on 64bit Haiku

Now that we have accelerated virtualisation, can we do some integrated haiku32-on-haiku64?

3 Likes

That usecase never needed virtualization in the first place :slight_smile:

Can you explain how to run 32 bit binaries on 64 bit haiku, afaik this is not possible ootb

Indeed, it is not possible ootb currently. What is required is basically that the kernel switch the CPU to 32bit mode before executing a 32bit application, and that we may need to adjust some system paths slightly so they can coexist (or maybe it just lives in some system32/ compat folder)

It’s quite possible, the support just stalled. In any case this would all work natively because your processor already supports 32bit, we would not need a virtualization layer for this.

I know int is possible in theory, after all Linux and even Windows do it this way, but a virtualization based approach might actually be easier, now that we have the virtualization;), especially since it probably is a niche use case for using old BeOS binaries

1 Like

I would definitely like being able to run original BeOS binaries on 64-bit Haiku.

2 Likes

Moved these since this is becoming a bit longer :slight_smile:

1 Like

I’d like to see it, too. I no longer have the source code to my BeOS MAME front end so I’d like to see if it’ll still run on Haiku. Which is probably doesn’t. And I need better documentation to figure out how to re-write it.

I sorta wanna see this happening because i would like to be able to use a hotline client i saw for haiku a while back ago floating around. But it was only for thirty two bit then, again, I think i’m better off just sticking to using beshare

You need a hypervisor, and then you can config several Haiku instances on machines that has anough resorces to serve them.

Another approach would containers - within containers you could have several different Haiku installed.

Actually as Haiku filesystem hierarchy has on a drive and after in a running Haiku instance, would need a completely another filesystem hierarchy that contains 64 and 32 bit binaries as well, meanwhile on 32 bit Haiku the directories and mount points are the same.

The kernel should be modified heavily to be able to handle 32 bit and 64 bit callings, or would need another software, that identify which kernel should get that calling if possible at all to run parallel 2 different Haiku kernel without a hypervisor …

Also 32 bit Haiku has some part kept compatible with BeOS on API/ABI level, 64 bit none -

So actually more easier, and lesser complicated,
if you have a 32 bit Haiku in a VM on a 64 bit Haiku instance ..
.. I think

:cowboy_hat_face:

QEMU → config an x86 or ppc machine → install BeOS version you want to install → install any BeOS program in it

If you select ‘x86’ then you van use -accel nvmm, so HW acceleration using NVMM.

Where did you get this information from? The kernel change is mostly done already. Using a hypervisor just makes this whole setup super complicated…

1 Like

I did know that it can be done with a VM, though I haven’t actually tried it. :slight_smile:

I was just saying it’d be neat to be able to just double-click one and have it run like any other application.

MrEntropy You know what? At today’s Haiku x64 I would like use new native and fast port based on current source not very old port for old BeOS based on very old source.
Do us all a favor and port the latest version of MAME and create a new native frontend for it. Don’t get hung up on a frontend from a quarter of a century ago.
And here’s a request from me: if anyone has the skills and a little time, I’d love to get my hands on a modern MAME port. And propably I won’t be the only one who’s will be grateful.

According to HaikuDepot, we do have the latest version of MAME.

And, no, I’m not going to create a new native front end because, as I said, the documentation for Haiku just isn’t understandable enough for me.

I’m not going to get hung up on my old one because, as I mentioned, I no longer have the source code for it. If I did, though, and I could understand what I wrote, it would be extremely handy now in re-writing it.

But I’d still like to run the old version, just to see if it would run. I’m not sure why that’s so difficult to understand.

fwiw you can currently co-install the 32bit Haiku version next to the 64bit Haiku on a seperate partition (even with EFI), so that may allow you to see if it runs :slight_smile:

My mistake, we have so many old ports that I thought MAME was out of date as well.

Well, now will be play ;D

Have these David Karoly’s changes been merged to allow 64-bit EFI boot loader to boot 32-bit Haiku?

I’m not sure. I assume the 32bit efi loader works for this? I guess it’s possible that 64bit efi cannot load a 32bit efi PE executable
(also github often blocks WebPositive for no reason, so not checking there…)