Allow supplying of prebuilt bootloader to avoid nested Cargo builds
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- build-system
研究方向
Start with build.rs at the linked lines, where the UEFI bootloader is built, and trace how its output is copied; check the corresponding BIOS stages for the same pattern. Compare the two approaches raised in the issue: accepting a prebuilt EFI path or using Cargo artifact dependencies. Done means the build can use a separately built bootloader without a nested Cargo build, with equivalent support for relevant BIOS stages.
由索引模型根據 Issue 內容生成。
描述
Hi there,
Thanks for the wonderful crate.
I've been trying to build my Rust kernel using Nix (it makes building my userspace and ramdisk a lot easier).
Nix runs builds in a sandbox without any network access unless the output of the build is guaranteed to match a hash (which it provides utilities for doing from a Cargo lock file). Basically this works best if Nix is what invokes Cargo and it has access to the lock file.
Basically, bootloader's invocation of Cargo from its build script causes problems here, since it builds the bootloader-x86_64-uefi crate (I use UEFI only but I believe something similar happens for BIOS builds), and though it runs --locked, there isn't really a good way to get Nix to "reach" that lock file.
What I would like is a way to supply a prebuilt .efi file, made by a Cargo build running separately, to the build script (by say an environment variable holding a path to the built EFI).
So instead of building the EFI in the build script, it could be done outside and copied into that output directory. If this sounds sensible, I would be willing to open a PR to do this. I would believe similar options would need to be made for each of the BIOS stages for consistency.
Alternatively, since this crate requires a nightly compiler anyway, if this crate used artifact binary dependencies to build each of the bootloader stages and used those built versions in the compiler since that means the same lockfile is used for those builds. This would solve the problem completely, I have tested that Nix can build Rust packages with artifact dependencies just fine with no extra configurations. If this is feasible it would likely be preferable.
- 主要語言
- Rust
- 星號
- 1.7k
- 分支
- 241
- 平均合併
- 2 天 19 小時
- 30 天內合併 PR
- 2
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rust-osdev/bootloader 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
rust-osdev/bootloader#587 · 2 則留言 ·
-
help wanted
難度 3/5 1-2 天 新手友好度 67/100
rust-osdev/bootloader#581 · 2 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
rust-osdev/bootloader#573 · 5 則留言 ·
-
難度 5/5 一週以上 新手友好度 20/100
rust-osdev/bootloader#555 · 2 則留言 ·
-
難度 5/5 一週以上 新手友好度 30/100
rust-osdev/bootloader#534 · 3 則留言 ·
查看 rust-osdev/bootloader 的全部 Issue
相似的 Issue
-
claim
難度 2/5 1-3 小時 新手友好度 88/100
Nixitov/Riptide-Native#946 ·
維護者通常 1 天內回覆
-
area: ai-assistants documentation help wanted
難度 2/5 1-3 小時 新手友好度 78/100
BetaBots-LLC/latticegate#17 ·
-
難度 1/5 1 小時以內 新手友好度 94/100
storytold/craft-libs#5594 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
LingyunStudio/RustMusic#16 ·