A while ago I noticed the striking similarity between Haiku binaries and Linux ones: Both are ELF and uses the SysV ABI. I therefore had an idea of trying to apply minimal patches to existing Haiku binaries and run them on Linux, and started the HyClone project.
After nine months of development, HyClone now supports more than half of all Haiku system calls and is able to run many CLI apps and a few GUI apps:
Architecture
HyClone consists of three parts:
-
haiku_loader
, a Linux executable that loadsruntime_loader
. - Modified
libroot.so
andruntime_loader
:libroot.so
andruntime_loader
contains some raw Haiku system calls, which are unavailable on Linux. HyClone removes all occurrences of these rawsyscall
instructions and replace them with emulated implementations. -
hyclone_server
, a Linux daemon process that stores various shared process states. This is how many Haiku APIs such as ports, semaphores and areas are implemented.
Features
- Run various build tools like
g++
andmake
, making HyClone a good compilation environment. (haikuporter
support is on the way). - Seamlessly share files between Linux and Haiku. HyClone can be a good test environment for cross-compiled binaries without having to copy them to and from a VM.
- Run some GUI apps and Haiku-specific tools (
strace
,pkgman
,listattr
,…)
The source code and detailed installation instructions can be found here:
trungnt2910/hyclone: A runtime environment for Haiku applications. (github.com)
If you have any feedback, bug reports, or feature requests, please let me know!