ajxs / uefi-elf-bootloader

UEFI ELF Bootloader example
GNU General Public License v3.0
91 stars 12 forks source link

Easiest way to test with another pre-built kernel? #2

Closed lonnietc closed 1 year ago

lonnietc commented 2 years ago

Hello,

I am a bit new to bootloaders and have just come across your elf bootloader and wanted to know if there is an easy way to test it with an existing x86_64 elf kernel that I have without having to re-work a number of things in your make files?

Any help would be greatly appreciated.

ajxs commented 2 years ago

Hello! Sorry it took me so long to respond. By default, the bootloader loads a file named kernel.elf in the root directory of the boot media. An easy way to test the bootloader with your own kernel might be to create your own boot media with this bootloader, and simply load your kernel to the media with the kernel.elf filename. If you look in src/makefile, you can see the recipe for how the boot media is created under the ${DISK_IMG} dependency. You could easily turn this into a shell script which copies this bootloader, and your own kernel. Let me know if this doesn't help, and I can try to provide further assistance!