Skip to content

Commit b4b6ed5

Browse files
committed
Remove PXE feature, build PXE code with UEFI
1 parent f2c8bbe commit b4b6ed5

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

Diff for: Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ bootloader-x86_64-bios-common = { version = "0.11.0", path = "bios/common" }
4040

4141

4242
[features]
43-
default = ["bios", "uefi", "pxe"]
43+
default = ["bios", "uefi"]
4444
bios = ["mbrman"]
4545
uefi = ["gpt"]
46-
pxe = ["uefi"]
4746

4847
[dependencies]
4948
anyhow = "1.0.32"

Diff for: build.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ use std::{
66
const BOOTLOADER_VERSION: &str = env!("CARGO_PKG_VERSION");
77

88
fn main() {
9-
#[cfg(any(feature = "uefi", feature = "pxe"))]
9+
#[cfg(feature = "uefi")]
1010
uefi_main();
1111
#[cfg(feature = "bios")]
1212
bios_main();
1313
}
1414

15-
#[cfg(all(any(feature = "uefi", feature = "pxe"), not(docsrs_dummy_build)))]
15+
#[cfg(all(feature = "uefi", not(docsrs_dummy_build)))]
1616
fn uefi_main() {
1717
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
1818
let uefi_path = build_uefi_bootloader(&out_dir);
@@ -49,7 +49,7 @@ fn bios_main() {
4949
);
5050
}
5151

52-
#[cfg(all(any(feature = "uefi", feature = "pxe"), not(docsrs_dummy_build)))]
52+
#[cfg(all(feature = "uefi", not(docsrs_dummy_build)))]
5353
fn build_uefi_bootloader(out_dir: &Path) -> PathBuf {
5454
let cargo = std::env::var("CARGO").unwrap_or_else(|_| "cargo".into());
5555
let mut cmd = Command::new(cargo);
@@ -277,9 +277,7 @@ fn convert_elf_to_bin(elf_path: PathBuf) -> PathBuf {
277277
// dummy implementations because docsrs builds have no network access
278278

279279
#[cfg(all(feature = "uefi", docsrs_dummy_build))]
280-
fn uefi_main() {
281-
// stub
282-
}
280+
fn uefi_main() {}
283281

284282
#[cfg(all(feature = "bios", docsrs_dummy_build))]
285283
fn bios_main() {}

Diff for: src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<'a> DiskImageBuilder<'a> {
136136
Ok(())
137137
}
138138

139-
#[cfg(all(feature = "uefi", feature = "pxe"))]
139+
#[cfg(feature = "uefi")]
140140
/// Create a folder containing the needed files for UEFI TFTP/PXE booting.
141141
pub fn create_uefi_tftp_folder(&self, tftp_path: &Path) -> anyhow::Result<()> {
142142
const UEFI_TFTP_BOOT_FILENAME: &str = "bootloader";

Diff for: tests/runner/src/lib.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
use std::{
2-
io::Write,
3-
path::{Path, PathBuf},
4-
process::Command,
5-
};
1+
use std::{io::Write, path::Path, process::Command};
62

73
const QEMU_ARGS: &[&str] = &[
84
"-device",

0 commit comments

Comments
 (0)