ops icon indicating copy to clipboard operation
ops copied to clipboard

alt UNIX support

Open mcandre opened this issue 5 years ago • 6 comments

Awesome that ops supports Linux and macOS! Could we get some ports going for ops to FreeBSD, NetBSD, OpenBSD, HardenedBSD, DragonflyBSD, Illumos, MINIX, and hopefully Haiku as well?

Note that a similar competing product, CloudABI, supports many of these BSD environments.

mcandre avatar Apr 02 '19 18:04 mcandre

the bsd's should be relatively straight-forward to do yes, would just need to keep in mind the binary format - ops inherently uses elf's (for instance there is no support for mach-o on osx nor is there any planned) - however that's not as limiting as you might think since the vast majority of people will being using interpreters, vm runtimes or otherwise already-packaged software in the form of packages

I think a step-forward in this direction would be to simply compile it, see where it breaks and once you get a hello world working we can add/edit the release script for it - I'd also be in favor of adding pre-built packages for various os's

eyberg avatar Apr 02 '19 20:04 eyberg

Hello, i try to build ops on FreeBSD 13.0 64 Bit, but don`t know how to fix this.

root@freebsd:~/go/src/ops # make build
go build -o ops -v
github.com/nanovms/ops/lepton
# github.com/nanovms/ops/lepton
lepton/image.go:343:15: undefined: getSharedLibs
lepton/ldd.go:9:16: undefined: isELF
github.com/nanovms/ops/qemu
# github.com/nanovms/ops/qemu
qemu/qemu_components.go:47:6: undefined: isx86
*** Error code 2

Stop.
make: stopped in /root/go/src/ops

How can I help with add support of FreeBSD OS to this project? In the future I like to have ability run nanos unikernel in bhyve hypervisor on FreeBSD with running linux ELFs binaries inside, of course.

asyslinux avatar Nov 11 '21 17:11 asyslinux

two things:

  1. we only run ELFs and don't have plans for other file formats

  2. we currently don't have bhyve support but could look at adding that

I don't know offhand if qemu would work on fbsd right now or not, you could build a unikernel on a diff machine and test manually - if that works we could roll in some qemu support for at least running but bhyve is prob what should be used there instead

eyberg avatar Nov 11 '21 17:11 eyberg

Yes, I understand about ELF format. In freebsd good hypervisor is bhyve, there is no point in running unikernel in qemu on freebsd. I will be grateful if You will add bhyve support. Thanks.

With qemu, simple unikernel "hello world" app on freebsd:

[root@freebsd ~]# qemu-system-x86_64 -drive format=raw,file=hello.img -nographic

SeaBIOS (version rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org)

iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+07F908D0+07EF08D0 CA00

Booting from Hard Disk..NET: no network interface found
Hello World!
[root@freebsd ~]#

asyslinux avatar Nov 11 '21 18:11 asyslinux

adding some initial bhyve notes here: https://docs.ops.city/ops/bhyve

eyberg avatar Jan 02 '22 21:01 eyberg

https://github.com/nanovms/ops/pull/1223

eyberg avatar Jan 05 '22 17:01 eyberg