New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom target files #225
Comments
I just looked at your target spec (https://github.com/InfRandomness/Arc/blob/7aec1745ffaf568156a46894d4e3c45a8b976b38/targets/x86_64-arc-uefi.json) and it won't be able to produce a working uefi executable AFAIK. It doesn't specify the efi_application subsystem, it doesn't specify efi_main as entrypoint and it misses |
Thanks for the quick reply. I will apply those changes.
Yeah, you're probably right, I'll think about this option as well, although I am keen on having my own spec. |
After a bit of researching, I found out that https://github.com/rust-osdev/bootloader/blob/main/build.rs#L25-L45 restricts the possibility to build the bootloader to those two targets only, is this because the bootloader itself has code that would not be compatible with custom specs (even x86_64 ones) ? |
The bootloader crate currently only supports The bootloader is a completly separate executable separate from the kernel. So there should be no need to adjust the target that it is compiled for. In fact, the implementation relies on that exact target to work because a specific linker script is required to get the correct layout. I'm currently working on a new v0.11 version of the bootloader that should make the build process more obvious. And it should also make it easier to port it to new architectures, even if this was not an explicit goal of the new design. |
Aww man, well, I will disable the aarch64 part in my kernel then. |
I see; |
How do you define a "regular" target? What calling convention should it use? And what binary format? |
Sorry I should've been more clear, in this context I meant a target like x86_64-unknown-none |
I have successfully made my kernel boot with the UEFI image produced by this crate. |
Hi, I have started working on trying to implement a way to feed the builder a path to a target JSON file..
This went about as well as I wanted it to, until I ran into this :
Here are the changes I brought to the builder binary :
I was wondering, if I were to dig more into the problem to implement this feature, would this work at all if the chose target is x86_64 UEFI or aarch64 UEFI ?
I don't know a whole lot about UEFI so I am assuming that the code from an x86_64 UEFI bootloader and an ARM64 UEFI bootloader is pretty much the same; Maybe I'm wrong.
The text was updated successfully, but these errors were encountered: