Skip to content
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

tools: cargo-style logging for x86 bootimager #336

Merged
merged 2 commits into from
Oct 2, 2024
Merged

tools: cargo-style logging for x86 bootimager #336

merged 2 commits into from
Oct 2, 2024

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Sep 30, 2024

This is super goofy but I thought it would be cool to have:

eliza@theseus ~/Code/mnemos $ just run-x86
cargo run --package mnemos-x86_64 --target=x86_64-unknown-none --features=bootloader_api --
   Compiling memchr v2.7.4
   Compiling itoa v1.0.11
   Compiling ryu v1.0.18
   Compiling cfg-if v1.0.0
   Compiling time v0.3.36
   Compiling aho-corasick v1.1.3
   Compiling serde_json v1.0.122
   Compiling cargo_metadata v0.18.1
   Compiling regex-automata v0.4.7
   Compiling regex v1.10.6
   Compiling vergen v8.3.2
   Compiling mnemos v0.1.0 (/home/eliza/Code/mnemos/source/kernel)
   Compiling mnemos-x86_64 v0.1.0 (/home/eliza/Code/mnemos/platforms/x86_64/core)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.30s
     Running `cargo run --package mnemos-x86_64-bootimager -- --kernel-bin target/x86_64-unknown-none/debug/bootloader`
   Compiling cfg-if v1.0.0
   Compiling ryu v1.0.18
   Compiling itoa v1.0.11
   Compiling memchr v2.7.4
   Compiling polling v3.7.3
   Compiling polling v2.8.0
   Compiling getrandom v0.2.15
   Compiling tempfile v3.12.0
   Compiling thread_local v1.1.8
   Compiling uuid v1.10.0
   Compiling async-io v1.13.0
   Compiling tracing-subscriber v0.3.18
   Compiling async-io v2.3.3
   Compiling gpt v3.1.0
   Compiling serde_json v1.0.122
   Compiling async-signal v0.2.9
   Compiling async-process v1.8.1
   Compiling bootloader v0.11.7
   Compiling mnemos-x86_64-bootimager v0.1.0 (/home/eliza/Code/mnemos/tools/x86_64-bootimager)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.93s
     Running `target/debug/mnemos-x86_64-bootimager --kernel-bin target/x86_64-unknown-none/debug/bootloader`
    Assuming direct control over the build!
    Building boot image, boot_mode: UEFI, kernel: target/x86_64-unknown-none/debug/bootloader
    Finished bootable disk image [UEFI] in 119.41ms (/home/eliza/Code/mnemos/target/x86_64-unknown-none/debug/mnemos-x86_64-uefi.img)
     Booting mnemOS VM, qemu: qemu-system-x86_64, args: ["-cpu", "qemu64", "-smp", "cores=4"]
^X^Cqemu: terminating on signal 2

(everything after "Assuming direct control over the build!" is from the MnemOS tools)

This is super goofy but I thought it would be cool to have:

```console
eliza@theseus ~/Code/mnemos $ just run-x86
cargo run --package mnemos-x86_64 --target=x86_64-unknown-none --features=bootloader_api --
   Compiling memchr v2.7.4
   Compiling itoa v1.0.11
   Compiling ryu v1.0.18
   Compiling cfg-if v1.0.0
   Compiling time v0.3.36
   Compiling aho-corasick v1.1.3
   Compiling serde_json v1.0.122
   Compiling cargo_metadata v0.18.1
   Compiling regex-automata v0.4.7
   Compiling regex v1.10.6
   Compiling vergen v8.3.2
   Compiling mnemos v0.1.0 (/home/eliza/Code/mnemos/source/kernel)
   Compiling mnemos-x86_64 v0.1.0 (/home/eliza/Code/mnemos/platforms/x86_64/core)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.30s
     Running `cargo run --package mnemos-x86_64-bootimager -- --kernel-bin target/x86_64-unknown-none/debug/bootloader`
   Compiling cfg-if v1.0.0
   Compiling ryu v1.0.18
   Compiling itoa v1.0.11
   Compiling memchr v2.7.4
   Compiling polling v3.7.3
   Compiling polling v2.8.0
   Compiling getrandom v0.2.15
   Compiling tempfile v3.12.0
   Compiling thread_local v1.1.8
   Compiling uuid v1.10.0
   Compiling async-io v1.13.0
   Compiling tracing-subscriber v0.3.18
   Compiling async-io v2.3.3
   Compiling gpt v3.1.0
   Compiling serde_json v1.0.122
   Compiling async-signal v0.2.9
   Compiling async-process v1.8.1
   Compiling bootloader v0.11.7
   Compiling mnemos-x86_64-bootimager v0.1.0 (/home/eliza/Code/mnemos/tools/x86_64-bootimager)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.93s
     Running `target/debug/mnemos-x86_64-bootimager --kernel-bin target/x86_64-unknown-none/debug/bootloader`
    Assuming direct control over the build!
    Building boot image, boot_mode: UEFI, kernel: target/x86_64-unknown-none/debug/bootloader
    Finished bootable disk image [UEFI] in 119.41ms (/home/eliza/Code/mnemos/target/x86_64-unknown-none/debug/mnemos-x86_64-uefi.img)
     Booting mnemOS VM, qemu: qemu-system-x86_64, args: ["-cpu", "qemu64", "-smp", "cores=4"]
^X^Cqemu: terminating on signal 2
```
(everything after "Assuming direct control over the build!" is from the
MnemOS tools)
@hawkw hawkw merged commit ff7610c into main Oct 2, 2024
12 checks passed
@hawkw hawkw deleted the eliza/cargolog branch October 2, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant