rust-osdev / rust-osdev/bootimage

`bin` file does not exist

Open
#109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
906
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the path printed in the build stdout with the path requested by ls, then review .cargo/config.toml, Cargo.toml, and x86_64-cernel.json for the target and binary configuration. Reproduce the build with the shown nightly toolchain and determine whether the expected bootimage-cernel.bin is created at the reported location; document the cause and a verified path or configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.