Skip to content

12101111/bootuefi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BootUEFI

This is a tool for running and testing Rust UEFI project.

BootUEFI is modified from bootimage

Install

cargo install bootuefi

Usage

First you should install cargo-xbuild.

Then set bootuefi as a custom runner in .cargo/config:

[build]
target = "x86_64-unknown-uefi"

[target.x86_64-unknown-uefi]
runner = "bootuefi"

You can run your rust UEFI application through cargo xrun or test it throught cargo xtest.

Configuration

Configuration is done through a through a [package.metadata.bootuefi] table in the Cargo.toml of your project. The following options are available:

[package.metadata.bootuefi]

# The command to run qemu.
# Set this to an absolute path if your qemu is not in your PATH
qemu = "qemu-system-x86_64"

# The Path to UEFI firmware
bios = "OVMF.fd"

# Additional arguments passed to qemu for non-test executables
run-args = []

# Additional arguments passed to qemu for test executables
test-args = []

# Don't use default arguments for qemu
default-args = true

# An exit code that should be considered as success for test executables
test-success-exit-code = 0

# The timeout for running a test
test-timeout = 300

Default arguments for qemu:

// Disable default devices. QEMU by defaults enables a ton of devices which slow down boot.
    "-nodefaults",
// Use a modern machine, with acceleration if possible.
    "-machine", "q35,accel=kvm:tcg",
// A standard VGA card with Bochs VBE extensions.
    "-vga", "std",

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages