You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've been following A Minimal Rust Kernel tutorial. I am on Creating a Bootimage section. The problem is, even though build finishes successfully, .bin file does not exist. Here's build stdout:
WARNING: `CARGO_MANIFEST_DIR` env variable not set
Building kernel
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
Building bootloader
Finished `release` profile [optimized + debuginfo] target(s) in 0.07s
Created bootimage for `cernel` at `/var/home/erayerdin/Projects/cernel/target/x86_64-cernel/debug/bootimage-cernel.bin`
I do ls target/x86-64_cernel/debug/, which does not show any bin file at all.
Just in case if it is needed, here are some configurations:
I used your files and the following src/main.rs file:
// src/main.rs#![no_std]// don't link the Rust standard library#![no_main]// disable all Rust-level entry pointsuse core::panic::PanicInfo;/// This function is called on panic.#[panic_handler]fnpanic(_info:&PanicInfo) -> ! {loop{}}#[unsafe(no_mangle)]// don't mangle the name of this functionpubextern"C"fn_start() -> ! {// this function is the entry point, since the linker looks for a function// named `_start` by defaultloop{}}
Log:
[nix-shell:~/code/cernel]$ cargo bootimage
WARNING: `CARGO_MANIFEST_DIR` env variable not set
Building kernel
Compiling compiler_builtins v0.1.160 (/home/freax13/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/compiler-builtins/compiler-builtins)
Compiling bootloader v0.9.34
Compiling core v0.0.0 (/home/freax13/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
Compiling cernel v0.1.0 (/home/freax13/code/cernel)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.60s
Building bootloader
Compiling compiler_builtins v0.1.160 (/home/freax13/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/compiler-builtins/compiler-builtins)
Compiling core v0.0.0 (/home/freax13/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
Compiling serde v1.0.116
Compiling bitflags v1.2.1
Compiling llvm-tools v0.1.1
Compiling x86_64 v0.14.7
Compiling toml v0.5.6
Compiling bootloader v0.9.34 (/home/freax13/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bootloader-0.9.34)
Compiling bit_field v0.10.1
Compiling volatile v0.4.4
Compiling zero v0.1.2
Compiling fixedvec v0.2.4
Compiling rlibc v1.0.0
Compiling usize_conversions v0.2.0
Compiling xmas-elf v0.6.2
Finished `release` profile [optimized + debuginfo] target(s) in 10.79s
Created bootimage for `cernel` at `/home/freax13/code/cernel/target/x86_64-cernel/debug/bootimage-cernel.bin`
[nix-shell:~/code/cernel]$ ls target/x86_64-cernel/debug/
bootimage-cernel.bin build cernel cernel.d deps examples incremental
Activity
Freax13 commentedon Mar 17, 2026
I cannot reproduce this.
I used your files and the following
src/main.rsfile:Log: