bootloader: Can't compile the bootloader

Hi!

The error is:

error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-lowos` target may not support the standard library
  = note: `std` is required by `ovmf_prebuilt` because it does not declare `#![no_std]`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

The kernel is pretty much blog_os which you are probably already familiar with.

/Cargo.toml:

[package]
name = "lowos-wrapper"
version = "0.1.0"

[build-dependencies]
bootloader = "0.11"
lowos = { path = "lowos", artifact = "bin", target = "./lowos/x86_64-lowos.json" }

[dependencies]
ovmf-prebuilt = "0.1.0-alpha.1"

[workspace]
members = ["lowos"]

/.cargo/config.toml

[unstable]
# enable the unstable artifact-dependencies feature, see
# https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#artifact-dependencies
bindeps = true
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "compiler_builtins"]

[build]
target = "lowos/x86_64-lowos.json"

[target.'cfg(target_os = "none")']
runner = "bootimage runner"

/lowos/.cargo/config.toml

[unstable]
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "compiler_builtins"]

[build]
target = "x86_64-lowos.json"

[target.'cfg(target_os = "none")']
runner = "bootimage runner"

Other files are just like in the template.

System: Ubuntu 23.10

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (11 by maintainers)

Most upvoted comments

It seems to be working! As far as I could tell, I need to re-implement printing to the screen, but for now I think I can close the issue. Thank you so much!