-
Notifications
You must be signed in to change notification settings - Fork 1
Teeny Tiny patch #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8ad2aed
add rust toolchain for a persistant dev environment
Nipfswd 9bf912b
Fix build a bit to work over many computers
Nipfswd dbbf194
__cpuid called without unsafe, core::arch::x86_64::__cpuid is an unsa…
Nipfswd 7fd9fdb
Revert changes to cpu.rs
Nipfswd 8f7339c
Update .gitignore to include 'null' and remove 'nul'
ReaQwQ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,3 +15,6 @@ | |
|
|
||
| # Files | ||
| GEMINI.md | ||
| nul | ||
| null | ||
| esp/NvVars | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,49 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| echo "[build] Compiling kernel..." | ||
| cargo build --target x86_64-unknown-uefi | ||
| KERNEL_TARGET="x86_64-unknown-uefi" | ||
| USERLAND_TARGET="x86_64-unknown-none" | ||
| TARGETS=( | ||
| "$KERNEL_TARGET" | ||
| "$USERLAND_TARGET" | ||
| ) | ||
| EFI_NAME="mana_os.efi" | ||
|
|
||
| echo "[build] Setting up ESP..." | ||
| if ! command -v rustup >/dev/null 2>&1; then | ||
| echo "[ERROR] rustup is required for reproducible target setup!!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| for TARGET in "${TARGETS[@]}"; do | ||
| if ! rustup target list --installed | grep -qx "$TARGET"; then | ||
| echo "[SETUP] Installing RUST target: $TARGET" | ||
| rustup target add "$TARGET" | ||
| fi | ||
| done | ||
|
|
||
| echo "[BUILD] Compiling the KERNEL..." | ||
| cargo build --target "$KERNEL_TARGET" | ||
|
|
||
| echo "[BUILD] Setting up ESP..." | ||
| mkdir -p esp/EFI/BOOT | ||
| cp target/x86_64-unknown-uefi/debug/mana_os.efi esp/EFI/BOOT/BOOTX64.EFI | ||
| cp "target/$KERNEL_TARGET/debug/$EFI_NAME" esp/EFI/BOOT/BOOTX64.EFI | ||
|
|
||
| if [ ! -f disk.img ]; then | ||
| echo "[build] Creating disk.img..." | ||
| echo "[BUILD] Creating disk.img..." | ||
| dd if=/dev/zero of=disk.img bs=1M count=64 | ||
| fi | ||
|
|
||
| echo "[run] Starting QEMU..." | ||
| if [ ! -f OVMF.fd ]; then | ||
| echo "[ERROR] Missing OVMF.fd. Install/copy OVMF firmware into the repo root." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "[RUN] Starting QEMU..." | ||
| qemu-system-x86_64 \ | ||
| -display gtk,zoom-to-fit=on \ | ||
| -drive if=pflash,format=raw,readonly=on,file=OVMF.fd \ | ||
| -drive format=raw,file=fat:rw:esp \ | ||
| -drive file=disk.img,if=none,id=drive0,format=raw \ | ||
| -device ahci,id=ahci0 \ | ||
| -device ide-hd,drive=drive0,bus=ahci0.0 \ | ||
| -serial stdio | ||
| -serial stdio |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [toolchain] | ||
| channel = "nightly" | ||
| targets = [ | ||
| "x86_64-unknown-uefi", | ||
| "x86_64-unknown-none", | ||
| ] | ||
| components = ["rust-src"] | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question/nit: since
channel = "nightly"isn't date-pinned, this toolchain couldsilently shift over time — today's
unused_unsafesituation with__cpuidisactually a good example of how a nightly-only safety-contract change can flip a
build from passing to failing between two people's local runs (or between CI runs
on different days).
Would it make sense to pin this to a dated nightly (e.g.
nightly-2026-06-15) forreproducibility? Not blocking this PR, just flagging for discussion.