-
Notifications
You must be signed in to change notification settings - Fork 214
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
error: This crate currently does not support 32-bit protected mode
when compiling kernel with x86_64-unknown-none target
#90
Comments
I tried to reproduce the error, but a test project compiles successfully with bootloader 0.8.3 and your target file. The error you're seeing is emitted here: Lines 3 to 7 in 90f5b89
Are you sure that you have the |
I think @0x00AE6150 is using a 32bit system. A build script always gets build for the native architecture, not the target architecture. |
Good catch! Moving these checks to the lib.rs/main.rs should solve the problem, right? |
Yes |
I am not sure why but my windows machine has 32 bit rust toolchain installed on 64 bit system... However, during rust installation i get prompted that x86_64 tools are installed. I will try to look more into it later. |
@0x00AE6150 It could also be that you have e.g. an ARM CPU instead of a |
@0x00AE6150 I just released the fix in #91 as version 0.8.4. Could you try whether it fixes your issue? |
@phil-opp I am so sorry for the delay. I will verify the fix today. |
@phil-opp works like a charm. Thank you very much <3 |
@0x00AE6150 Great! Thanks a lot for verifying! |
After updating
bootloader
to 0.8.3 I started gettingerror: This crate currently does not support 32-bit protected mode
error but I am pretty sure that I cross-compile x86_64 arch binary.This issue is not reproducible with bootloader version 0.7.1 or lower. Here is the content of my target x86_64-unknown-none.json:
{
"llvm-target": "x86_64-unknown-none",
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
"arch": "x86_64",
"target-endian": "little",
"target-pointer-width": "64",
"target-c-int-width": "32",
"os": "none",
"executables": true,
"linker-flavor": "ld.lld",
"linker": "rust-lld",
"panic-strategy": "abort",
"disable-redzone": true,
"features": "-mmx,-sse,+soft-float"
}
I am compiling with this command:
cargo bootimage --target x86_64-unknown-none.json
Best regards!
The text was updated successfully, but these errors were encountered: