v86 icon indicating copy to clipboard operation
v86 copied to clipboard

ability to run .elf kernel

Open Ponali opened this issue 1 year ago • 1 comments

hi, when i managed to compile an assembly kernel from someone else into its own .elf file (build.kernel.elf), i wanted to try using it with v86, but it says to use "bzimage". i was trying to find a way to convert the .elf to a bzimage format, but to no avail, and directly importing the .elf file simply throws an error without any GUI notification. here is what DevTools gathered: image image

it would be nice to add support for kernels with raw format (.elf). if there is no way to do so, it would be nice to link a tutorial on converting to a bzimage format - i'm kinda new to the subject of virtualization '._.

Ponali avatar May 08 '24 09:05 Ponali

According to kernel sources, it's a multiboot image. Did you try to load image with multiboot option? (~~now not available on v86 demo~~ sorry, I got it wrong, available on debug mode: https://copy.sh/v86/debug.html) https://github.com/copy/v86/commit/df0d136208af7db8ebc2259c3cf51775d58c52a6

SuperMaxusa avatar May 08 '24 10:05 SuperMaxusa

The bzimage format is somewhat documented here (you can probably learn more by reading v86 or kernel sources): https://www.kernel.org/doc/Documentation/x86/boot.txt

As already mentioned, multiboot is another format that should work in v86, but feel free to reopen if it doesn't.

copy avatar May 26 '24 06:05 copy