Looking for advice on EDK2 development
Posted: Fri Aug 30, 2019 9:02 pm
I've recently set myself the task of writing a UEFI bootloader for my hobby operating system. I've had a good run so far. My very simple bootloader an ELF executable and successfully transfers control to the kernel. I've used GNU-EFI up until this point, since it integrates perfectly with the rest of my GNU based build toolchain. The only thing I'm not happy with is having to use the included call wrappers to target the Microsoft calling convention. This is adequate, but I don't like that it forgoes any compile-time type safety and increases the complexity and amount of boilerplate code.
I've seen that some people ( such as the author of the 'uefi' page on the wiki ) have used a cross-compiler to target PE32+ directly. While this seems to work, it seems to me like using a hack to avoid using a hack. From the GNU-EFI documentation, their entire build system seems designed around the idea of creating an ELF executable which is compatible with being copied directly into a valid PE32+ binary. I like the increased code clarity this offers, but I don't like the increase in the build pipeline's complexity.
I was wondering if other people could share their experience and opinions on whether or not it's worth using EDK2 for building a bootloader for a hobby kernel. I've successfully set up EDK2, but I don't really like the build pipeline it requires.
Has anyone been able to integrate development using EDK2 easily into their build environment? I don't like the idea of having to use their source tree as my working directory. I know I can get around this with symlinks and other constructs, but that's just more of the complexity I'm trying to avoid.
Does anyone have any suggestions here on good ways to use EDK2 while minimising the complexity in the development environment and OS source tree?
Also, if anyone would be willing to offer me any help with some code review, I would really appreciate it! Thank you!
I've seen that some people ( such as the author of the 'uefi' page on the wiki ) have used a cross-compiler to target PE32+ directly. While this seems to work, it seems to me like using a hack to avoid using a hack. From the GNU-EFI documentation, their entire build system seems designed around the idea of creating an ELF executable which is compatible with being copied directly into a valid PE32+ binary. I like the increased code clarity this offers, but I don't like the increase in the build pipeline's complexity.
I was wondering if other people could share their experience and opinions on whether or not it's worth using EDK2 for building a bootloader for a hobby kernel. I've successfully set up EDK2, but I don't really like the build pipeline it requires.
Has anyone been able to integrate development using EDK2 easily into their build environment? I don't like the idea of having to use their source tree as my working directory. I know I can get around this with symlinks and other constructs, but that's just more of the complexity I'm trying to avoid.
Does anyone have any suggestions here on good ways to use EDK2 while minimising the complexity in the development environment and OS source tree?
Also, if anyone would be willing to offer me any help with some code review, I would really appreciate it! Thank you!