Attempted Port of Solo5 to OpenBSD


#1

Hi All

I am attempt to port Solo5 to OpenBSD, I am only looking at Virtio for now and will expand later.

I have things compiling and linking with OpenBSD base system, but can not boot the compiled kernel, it fails with a no multiboot header or a.out kludge found.

I wanted to rule out the bintutils version, so I created a cross compiler version of Binutils 2.17, the same base version as OpenBSD, targeting x86_64-elf, and have successfully booted the test_hello.virtio kernel (i did have to use mkimage on a linux vm) on OpenBSD’s vmm.

my repo is located here

Now the reason for my post.

I am not sure how to resolve the linking issues using binutils (ld) from base OpenBSD, if anyone has some tips on where to look, that would be greatly appreciated.

Cheers
Adam

Edit: I understand this is not much info to go on, but i am able to dump info from both virtio kernels or intermediate o files, but am i not sure what would help.


#2

Hi Adam,

I’d prefer to discuss this on the solo5 GitHub repository.

FWIW my experience when getting solo5 onto FreeBSD was that initially I needed a more up to date ld from ports (see e.g. https://github.com/Solo5/solo5/pull/123) - which at some point was no longer needed. Could you report the output of readelf with OpenBSD’s ld? Is it different then the one generated by the Linux ld? Can you try a newer ld on OpenBSD?

Regarding booting: how does VMM boot? (Or rather, how do you boot other images (linux/windows) on VMM?) On FreeBSD/bhyve in order to use virtio, grub2-bhyve is needed (whereas with the native ukvm port it is no longer).

Cheers,

hannes

EDIT: there was another intermediate solution (reverted in https://github.com/Solo5/solo5/pull/56) which adjusted the linker script.


#3

HI Hannes

Thank you for the reply, I have raised an issue on the solo5 GitHub repository. Issue #206.

I will look into the work arounds you pointed at today.

Cheers,

Adam