4
12
Fork
You've already forked LensorOS
4

Support VirtualBox #2

Merged
LensPlaysGames merged 39 commits from VirtualBox into master 2022年03月03日 07:05:43 +01:00
LensPlaysGames commented 2022年03月03日 06:59:58 +01:00 (Migrated from github.com)
Copy link

About a month into development, I decided to test LensorOS on VirtualBox. It didn't work at all, with a #GP fault happening early in the kernel initialization. I spent a few hours trying to get it to work, but left frustrated and drained of motivation. I decided it wasn't important and as long as it ran in QEMU I should just keep going. I'm glad I did this, as I made a lot of progress since then, however I am also unhappy that LensorOS didn't work on VirtualBox, a platform that should have no problem booting UEFI OSes.

Today, I'm proud to say LensorOS can now be booted from a virtual machine in VirtualBox!!

To mend this fence between QEMU and VBOX, I first figured out a way to more easily build and test LensorOS for VirtualBox; VBOX doesn't support raw format storage devices, so further processing to the image file was needed. The helper script mkiso.sh runs the old mkimg.sh, then creates a bootable ISO-9660 filesystem within LensorOS.iso, which can then be attached to a VBOX virtual machine quite easily. This all utilizes the GNU xorriso tool.

Once it was easy to test LensorOS on VBOX, I was off to the races. I disabled every single line of executing code in the kernel, and slowly re-introduced the code until problems arose within VirtualBox (or QEMU). As the problems cropped up, I did my best to fix them, testing on both QEMU and VBOX.

At this point, all of the code has been re-enabled (un-commented), and the functionality matches that of the master branch very closely, except for the changes that have been made to accommodate running in VirtualBox.

About a month into development, I decided to test LensorOS on VirtualBox. It didn't work at all, with a #GP fault happening early in the kernel initialization. I spent a few hours trying to get it to work, but left frustrated and drained of motivation. I decided it wasn't important and as long as it ran in QEMU I should just keep going. I'm glad I did this, as I made a lot of progress since then, however I am also unhappy that LensorOS didn't work on VirtualBox, a platform that should have no problem booting UEFI OSes. Today, I'm proud to say LensorOS can now be booted from a virtual machine in VirtualBox!! To mend this fence between QEMU and VBOX, I first figured out a way to more easily build and test LensorOS for VirtualBox; VBOX doesn't support raw format storage devices, so further processing to the image file was needed. The helper script `mkiso.sh` runs the old `mkimg.sh`, then creates a bootable ISO-9660 filesystem within `LensorOS.iso`, which can then be attached to a VBOX virtual machine quite easily. This all utilizes the GNU `xorriso` tool. Once it was easy to test LensorOS on VBOX, I was off to the races. I disabled every single line of executing code in the kernel, and slowly re-introduced the code until problems arose within VirtualBox (or QEMU). As the problems cropped up, I did my best to fix them, testing on both QEMU and VBOX. At this point, all of the code has been re-enabled (un-commented), and the functionality matches that of the master branch very closely, except for the changes that have been made to accommodate running in VirtualBox.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LensPlaysGames/LensorOS!2
Reference in a new issue
LensPlaysGames/LensorOS
No description provided.
Delete branch "VirtualBox"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?