Skip to content

bin file does not exist #109

@erayerdin

Description

@erayerdin

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:

# Cargo.toml
[package]
name = "cernel"
version = "0.1.0"
edition = "2024"

[dependencies]
bootloader = "0.9"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

[[bin]]
name = "cernel"
test = false
bench = false
# .cargo/config.toml

[unstable]
json-target-spec = true
build-std = ["core", "compiler_builtins"]
build-std-features = ["compiler-builtins-mem"]

[build]
target = "x86_64-cernel.json"
// x86_64-cernel.json
{
  "llvm-target": "x86_64-unknown-none",
  "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
  "arch": "x86_64",
  "target-endian": "little",
  "target-pointer-width": 64,
  "target-c-int-width": 32,
  "os": "none",
  "executables": true,
  "linker-flavor": "ld.lld",
  "linker": "rust-lld",
  "panic-strategy": "abort",
  "disable-redzone": true,
  "features": "-mmx,-sse,+soft-float",
  "rustc-abi": "x86-softfloat"
}
# rust-toolchain.toml
[toolchain]
channel = "nightly"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions