Allow supplying of prebuilt bootloader to avoid nested Cargo builds
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 1.7k
- Forks
- 241
- Ø Merge
- 2 T. 19 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rust-osdev/bootloader
-
FAT32 UEFI compatibilityOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
rust-osdev/bootloader#587 · 2 Kommentare ·
-
help wanted
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 67/100
rust-osdev/bootloader#581 · 2 Kommentare ·
-
No boot on real hardwareOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
rust-osdev/bootloader#573 · 5 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
rust-osdev/bootloader#555 · 2 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
rust-osdev/bootloader#534 · 3 Kommentare ·
Alle Issues in rust-osdev/bootloader
Ähnliche Issues
-
claim
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Nixitov/Riptide-Native#946 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ai-assistants documentation help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
BetaBots-LLC/latticegate#17 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 94/100
storytold/craft-libs#5594 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
听歌识曲历史跳转后对应音源界面无法返回Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
LingyunStudio/RustMusic#16 ·