Closed trholding closed 2 years ago
Android isn't planned because it's a closed Linux platform, and Linux is already supported.
I'm surprised ReactOS wouldn't be able to run a Windows binary. Are you running it on ARM?
I haven't heard of the other operating systems. Thank you for your report.
One thing that does potentially interest me is SerenityOS. Although if we targeted it, we would probably do it by contributing native APE x86-64-linux-gnu executable loading support to Andreas' kernel.
Apologies, wasn't able to come back regularly as planned. I was & am busy with hardware development.
Android isn't planned because it's a closed Linux platform, and Linux is already supported.
Agreed
I'm surprised ReactOS wouldn't be able to run a Windows binary. Are you running it on ARM?
I ran it on x86_64
I haven't heard of the other operating systems. Thank you for your report.
Out of those Haiku and Illumos have a following. Illumos is like Solaris. I sort of know someone who has worked on Aros & Icaros Desktop. I'll try to reach out to all of them and ask them if they would be interested to support/contribute code to cosmopolitan to make it work on respective OSes.
One thing that does potentially interest me is SerenityOS. Although if we targeted it, we would probably do it by contributing native APE x86-64-linux-gnu executable loading support to Andreas' kernel.
That would be awesome! I went ahead and made a cheesy feature request: https://github.com/SerenityOS/serenity/issues/14024
One more experiment I did was to get https://github.com/nasa/cFS to build with cosmo. Goal was to emulate satellites / flight software on x86_64 on Win/Mac/Lin/BSD. I was able to fix most stuff with definitions and the build worked mostly except for the OSAL os abstraction which really requires the missing functions in libc - my skills are not enough for that.
Vulcan
It'd be really cool to get NASA software building. Do you work for them? What functions do you need?
What were you doing to not get plan9 installed?
Hoping you were using the actively developed 9front!
Also plan9 is not windows and certainly not POSIX, though it does have an "emulation", ape.
Kencc is not clang nor is it GCC. But at least you can read kencc's sourcecode in a day and understand it.
What were you doing to not get plan9 installed?
I don't remember, it was a some time ago.
I'll probably try 9front out sometime in the future. But if you do already have plan9 / 9front running, could you try any of the demo executables from cosmo such as helloworld.com or redbean and report in this thread what the result was / dump log? Thx
Sure, I can do that. Where do I find this hello world binary? I've had a brief look about but I can't find it.
Sure, I can do that. Where do I find this hello world binary? I've had a brief look about but I can't find it.
Thanks, okay please ignore the helloworld.com as you have to compile it yourself with cosmocc, instead try running any cosmo binary.
Try any from: https://redbean.dev/
Such as:
https://redbean.dev/redbean-2.2.com https://redbean.dev/zip.com
Or any bin from https://cosmo.zip/pub/cosmos/bin/ that does not exist on plan9 / 9front.
So, I decided to pick 'tree' as it'll probably fail in interesting ways :-)
# cpu% is the default prompt of Plan9's shell, rc
# start up webfs, so I can fetch a url
cpu% webfs
# get the file from cosmo using something similar to wget/curl
cpu% hget -o tree https://cosmo.zip/pub/cosmos/bin/tree
# let's see what plan9 thinks it is...
cpu% file tree
tree: bootable disk image
# okay, let's make it executable
cpu% chmod +x tree
cpu% ./tree
/fd/0:9: ./tree: exec header invalid
# okay, that's likely because the Plan9 loader only wishes to load a.out files
# so let's try running it like a shell script.
# Plan9 has an 'ape' too, for running posix-like programs
cpu% ape/sh
# so now we're in a posix-ish shell
$ ./tree
ape/sh: ./tree: /bin/sh: No such file or directory
# partial success!
# behind the scenes we'll write a script to call /bin/ape/sh when /bin/sh is used (for maximum posix)
$ ./tree
usage: gzip [-vcnD] [-1-9] [file ...]
# because Plan9 gzip doesn't have the same GNUish options.
Hope that helps!
I've tried installing various alt OSes based on characteristics of (UNIXness, POSIXy, bash/sh, elf, GCC, x86, win) :
I had problems with installing SmartOS. Plan9's Rio was a bit too weird to use and the install failed too.
On the remaining OSes, I tried to run the helloworld.com example, all redbean.com, and .dbg binaries.
Combinations I tried: (after chmod * equivalent)
Android 9
Haiku
I did imperfect screen captures, most actions couldn't be screenshotted as I found out later and in between that pointer focus was in VM, so couldn't recall stuff completely.
I think it's worth exploring support for Android x86_64 as it already runs static.dbg as expected and Haiku. (Low-hanging fruits?)
Not an expert hacker here, very ordinary. But where would I hack/look if I wanted to support Android and Haiku? I find extreme joy and future use case for cosmo.
TODO: Notify all the above OS projects (except android) about the existence of Cosmo. Maybe evangelize how beneficial cosmo could be if they would accept this Zen path.
TODO: Try bare-metal. Next exploration: redbean/cosmo + rump kernel / rumprun. Why? for a possible great bare-metal experience with network, very alt to docker. (Maybe rumprun could be hacked to make baking compatible with .ape - much wow).