rust-osdev / bootloader

An experimental pure-Rust x86 bootloader
Apache License 2.0
1.37k stars 206 forks source link

No `package.metadata.bootloader.target` key found in Cargo.toml of bootloader #195

Closed jamesmarva closed 2 years ago

jamesmarva commented 3 years ago

I add the code below in Cargo.toml

[package.metadata.bootloader]
target="fledgeos.json"

but it still happen the error

Caused by:
    The `bootloader` dependency has not the right format: No `package.metadata.bootloader.target` key found in Cargo.toml of
bootloader
jamesmarva commented 3 years ago

I use bootloader 0.10.6

[package]
name = "fledgeos-1"
version = "0.1.0"
edition = "2018"

[dependencies]
bootloader = "0.10.6"
x86_64 = "0.14.3"

[package.metadata.bootimage]
run-command = ["qemu-system-x86_64.exe", "-drive", "format=raw,file=F:/Rust-In-Action/ch11/fledgeos-1/target/fledge/debug/bootimage-fledgeos-1.bin"]

[package.metadata.bootloader]
target="fledgeos.json"
bjorn3 commented 3 years ago

Are you following https://os.phil-opp.com? If so you need to use bootloader 0.9 and not 0.10.

Nicceboy commented 2 years ago

It seems that bootimage is requiring this entry, and it was removed in https://github.com/rust-osdev/bootloader/commit/610255e60b373d826a031a0a2cbb6e07ee52dc67. It works with lower version, but was this change intentional? It was originally added to maintain compatibility based on this commit https://github.com/rust-osdev/bootloader/commit/33b8ce6059e90485c56883b23d4834d06ddfd517. What if I want to use later version of bootloader with bootimage?

vikigenius commented 2 years ago

Yeah, this is problematic I wanted to use 0.10 version to remove the deprecation warnings for llvm_asm! but it doesn't work due to this issue. Any clarification so as to why the entry was removed would be welcome

bjorn3 commented 2 years ago

Bootloader 0.10 works in a fundamentally different way to add support for uefi. It for example it doesn't use bootimage at all. Doesn't the latest release in the 0.9 series work without llvm_asm? Does cargo update work?

vikigenius commented 2 years ago

@bjorn3 Nope, even with Cargo update the warning is still there. And it is using the latest version in the 0.9 series: 0.9.19, I checked.

calebschoepp commented 2 years ago

@vikigenius Did you ever manage to get rid of the llvm_asm! warnings?

vikigenius commented 2 years ago

Nope, but I did manage to get the latest version of bootloader working following instructions in the crate documentation.

phil-opp commented 2 years ago

With https://github.com/rust-osdev/bootloader/pull/204, I think we can now close this.