Conversation
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the x86bootdisk helper tool and build scripts to split BIOS vs UEFI boot image generation using Cargo features, with the goal of making x86_64 QEMU boot reliably by avoiding incompatible bootloader build paths.
Changes:
- Introduces
bios/uefifeature flags inx86bootdiskand gates bootloader usage accordingly. - Updates x86_64 Makefile image targets to build
x86bootdiskwith--no-default-featuresand the appropriate boot feature. - Removes
multilingual = falsefrom the mdBook configuration.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| x86bootdisk/src/main.rs | Feature-gates BIOS/UEFI boot paths and adjusts CLI defaulting behavior based on enabled features. |
| x86bootdisk/Cargo.toml | Adds bios/uefi features and disables bootloader default features to control build paths. |
| mdbook/book.toml | Simplifies mdBook config by removing the explicit multilingual setting. |
| Makefile | Builds BIOS and UEFI images by selecting the corresponding x86bootdisk feature set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…abled Agent-Logs-Url: https://github.com/tier4/awkernel/sessions/ee6a4be0-5fde-4c35-98e0-5c7ccceb9941 Co-authored-by: nokosaaan <106376734+nokosaaan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tier4/awkernel/sessions/83f0e5e3-5d74-42d4-ac24-e1406de2f9d5 Co-authored-by: nokosaaan <106376734+nokosaaan@users.noreply.github.com>
…to bootloader-fix
Signed-off-by: nokosaaan <nishimura.r.019@ms.saitama-u.ac.jp>
kobayu858
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I fixed an issue where QEMU on x86_64 would not start properly.
This was resolved by clearly separating the BIOS and UEFI boot paths using the
featuresoption.With the current configuration, the build process generated numerous warnings and errors,
preventing the program from starting successfully.
Specifically, the error
error: unknown -Z flag specified: json-target-specwas being displayed.The
-Zflag is used to specify unstable, experimental features of the Rust compiler. It appears the issue arose because an outdated or incompatible version of Rust Nightly was used during the build of the Bootloader package, causing the flag to go unrecognized.Possible solutions include:
The nightly build is already the latest version, and the Bootloader is also kept up to date. Since we confirmed that it works without issues when using a compatible version, rolling back the version would be preferable; however, the cost of rework and the impact on existing code are significant, making this impractical.
Therefore, since the BIOS processing is not expected to run in the current implementation, I isolated it in
features. After confirming that it behaves the same as the compatible version, we decided to implement this fix.In addition, a
compile_error!guard was added tox86bootdisk/src/main.rsto produce a clear, actionable compiler error when the crate is built with--no-default-featuresand neither thebiosnoruefifeature is selected, preventing confusing missing-impl errors in misconfigured builds.Related links
https://github.com/rust-osdev/bootloader
How was this PR tested?
Please refer to attached files.
Compile logs are showed.
bootloader-fix.log
main.log
Notes for reviewers