From 11ebda95b194dcfcfcab4bda53e1260ee2de4c3d Mon Sep 17 00:00:00 2001 From: Mark Poliakov Date: Fri, 11 Jul 2025 19:07:49 +0300 Subject: [PATCH] riscv64: fix build --- kernel/driver/net/stmmac/src/lib.rs | 2 +- lib/runtime/src/process/thread_local/mod.rs | 20 ++++++++++---------- userspace/Cargo.lock | 17 +---------------- userspace/Cargo.toml | 2 +- userspace/lib/cryptic/Cargo.toml | 2 +- xtask/src/build/cargo.rs | 1 + 6 files changed, 15 insertions(+), 29 deletions(-) diff --git a/kernel/driver/net/stmmac/src/lib.rs b/kernel/driver/net/stmmac/src/lib.rs index 0e0d79c2..2831dffd 100644 --- a/kernel/driver/net/stmmac/src/lib.rs +++ b/kernel/driver/net/stmmac/src/lib.rs @@ -337,7 +337,7 @@ impl Device for Stmmac { let (id0, id1) = phy.id()?; log::info!("stmmac: PHY {id0:04x}:{id1:04x}"); phy.reset(Duration::from_millis(100))?; - phy.setup_link(true, GBESR::empty())?; + phy.setup_link(true, Some(GBESR::empty()))?; self.inner.init(Inner { regs: IrqSafeSpinlock::new(regs), diff --git a/lib/runtime/src/process/thread_local/mod.rs b/lib/runtime/src/process/thread_local/mod.rs index 2851a0bc..02b5cd1b 100644 --- a/lib/runtime/src/process/thread_local/mod.rs +++ b/lib/runtime/src/process/thread_local/mod.rs @@ -293,11 +293,11 @@ fn setup_dtv(image: &TlsImage, tls_info: &TlsInfo) -> Result<(), Error> { // NOTE if module 1 is specified again by the dynamic loader, it will be overriden with // what dynamic loader says if let Some(module0_offset) = tls_info.module0_offset { - crate::debug_trace!( - Info, - "DTV[1] = {:#x}", - tls_info.base + module0_offset + DTV_OFFSET - ); + // crate::debug_trace!( + // Info, + // "DTV[1] = {:#x}", + // tls_info.base + module0_offset + DTV_OFFSET + // ); dtv.set( 1, core::ptr::without_provenance_mut(tls_info.base + module0_offset + DTV_OFFSET), @@ -309,11 +309,11 @@ fn setup_dtv(image: &TlsImage, tls_info: &TlsInfo) -> Result<(), Error> { } for &(module_id, module_offset) in image.module_offsets.iter() { assert!(module_offset < image.full_size); - crate::debug_trace!( - Info, - "DTV[{module_id}] = {:#x}", - tls_info.base + module_offset + DTV_OFFSET - ); + // crate::debug_trace!( + // Info, + // "DTV[{module_id}] = {:#x}", + // tls_info.base + module_offset + DTV_OFFSET + // ); dtv.set( module_id, core::ptr::with_exposed_provenance_mut(tls_info.base + module_offset + DTV_OFFSET), diff --git a/userspace/Cargo.lock b/userspace/Cargo.lock index 3b28f3e1..01197048 100644 --- a/userspace/Cargo.lock +++ b/userspace/Cargo.lock @@ -629,7 +629,6 @@ dependencies = [ "cross", "hmac", "rand 0.8.5 (git+https://git.alnyan.me/yggdrasil/rand.git?branch=alnyan%2Fyggdrasil-rng_core-0.6.4)", - "ring 0.17.7", "rustls", "sha2", "x25519-dalek", @@ -2431,20 +2430,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "ring" -version = "0.17.7" -source = "git+https://git.alnyan.me/yggdrasil/ring.git?branch=alnyan%2Fyggdrasil#487ee1292bfd8eb68e4e89f590dd5b95dd0e1463" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.12", - "libc", - "spin", - "untrusted", - "windows-sys 0.48.0", -] - [[package]] name = "ring" version = "0.17.14" @@ -2575,7 +2560,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.14", + "ring", "rustls-pki-types", "untrusted", ] diff --git a/userspace/Cargo.toml b/userspace/Cargo.toml index 2c231af1..719959de 100644 --- a/userspace/Cargo.toml +++ b/userspace/Cargo.toml @@ -51,7 +51,7 @@ raqote = { version = "0.8.3", default-features = false } # Vendored/patched dependencies rand = { git = "https://git.alnyan.me/yggdrasil/rand.git", branch = "alnyan/yggdrasil" } rand_core = { git = "https://git.alnyan.me/yggdrasil/rand.git", branch = "alnyan/yggdrasil" } -ring = { git = "https://git.alnyan.me/yggdrasil/ring.git", branch = "alnyan/yggdrasil" } +# ring = { git = "https://git.alnyan.me/yggdrasil/ring.git", branch = "alnyan/yggdrasil" } rsa = { git = "https://git.alnyan.me/yggdrasil/rsa.git", branch = "alnyan/yggdrasil" } rustls = { git = "https://git.alnyan.me/yggdrasil/rustls.git", branch = "alnyan/yggdrasil", default-features = false, features = ["std", "logging", "tls12", "custom-provider"] } curve25519-dalek = { git = "https://git.alnyan.me/yggdrasil/curve25519-dalek.git", branch = "alnyan/yggdrasil" } diff --git a/userspace/lib/cryptic/Cargo.toml b/userspace/lib/cryptic/Cargo.toml index ab0e7897..524061a9 100644 --- a/userspace/lib/cryptic/Cargo.toml +++ b/userspace/lib/cryptic/Cargo.toml @@ -9,7 +9,7 @@ chrono.workspace = true rustls.workspace = true rand = { git = "https://git.alnyan.me/yggdrasil/rand.git", branch = "alnyan/yggdrasil-rng_core-0.6.4" } -ring.workspace = true +# ring.workspace = true sha2.workspace = true hmac.workspace = true chacha20poly1305.workspace = true diff --git a/xtask/src/build/cargo.rs b/xtask/src/build/cargo.rs index 0858ab21..c00f3751 100644 --- a/xtask/src/build/cargo.rs +++ b/xtask/src/build/cargo.rs @@ -63,6 +63,7 @@ impl<'e> CargoBuilder<'e> { }; command.env("LD_LIBRARY_PATH", ld_library_path); + command.env("CC", "clang"); command .arg("+ygg-stage1")