From 8dbfc17af2bc0cdae984635359aeab10b13e9107 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 31 Jul 2023 21:50:59 +0200 Subject: [PATCH] add feature rtl8139 This feature is required for hermitcore/libhermit-rs#810. Without this feature, the CI isn't able to test the RTL8139 interface. --- benches/netbench/Cargo.toml | 1 + examples/httpd/Cargo.toml | 1 + hermit-sys/Cargo.toml | 3 +++ hermit-sys/build.rs | 1 + 4 files changed, 6 insertions(+) diff --git a/benches/netbench/Cargo.toml b/benches/netbench/Cargo.toml index bfaa86bd6..710bed9eb 100644 --- a/benches/netbench/Cargo.toml +++ b/benches/netbench/Cargo.toml @@ -29,6 +29,7 @@ fsgsbase = ["hermit-sys/fsgsbase"] smp = ["hermit-sys/smp"] tcp = ["hermit-sys/tcp"] instrument = ["hermit-sys/instrument"] +rtl8139 = ["hermit-sys/rtl8139"] [[bin]] name = "server-bw" diff --git a/examples/httpd/Cargo.toml b/examples/httpd/Cargo.toml index 646649cb8..41b96eed0 100644 --- a/examples/httpd/Cargo.toml +++ b/examples/httpd/Cargo.toml @@ -27,4 +27,5 @@ smp = ["hermit-sys/smp"] tcp = ["hermit-sys/tcp"] instrument = ["hermit-sys/instrument"] trace = ["hermit-sys/trace"] +rtl8139 = ["hermit-sys/rtl8139"] ci = [] diff --git a/hermit-sys/Cargo.toml b/hermit-sys/Cargo.toml index 1687737e9..0a93f8338 100644 --- a/hermit-sys/Cargo.toml +++ b/hermit-sys/Cargo.toml @@ -39,6 +39,9 @@ tcp = [] trace = [] vga = [] +# if this feature isn't set, the Virtio interface will be used +rtl8139 = ["tcp", "pci"] + [build-dependencies] flate2 = "1" ureq = "2.4" diff --git a/hermit-sys/build.rs b/hermit-sys/build.rs index 8a2a1a419..64f650ec4 100644 --- a/hermit-sys/build.rs +++ b/hermit-sys/build.rs @@ -114,6 +114,7 @@ impl KernelSrc { &mut cmd, [ "acpi", "dhcpv4", "fsgsbase", "pci", "pci-ids", "smp", "tcp", "trace", "vga", + "rtl8139", ] .into_iter(), );