kernel: [patch.crates-io] libredox + [patch.'<URL>'] redox_syscall for Phase J
Phase J: the kernel needs two Cargo patch overrides so that the typed-AcPiVerb path (EnterS2Idle / ExitS2Idle) is usable. Without these: * the kernel's redox_syscall dep is fetched from gitlab.redox-os.org (upstream), so the local fork at local/sources/syscall (with the new AcPiVerb variants) is not visible to the kernel's build. * the libredox dep is fetched from crates.io, so the local fork at local/sources/libredox (which uses the local syscall fork) is not visible. This means libredox::error::Error and syscall::Error are different compile-time types and the E0277 errors in scheme-utils and daemon return. The fix: a single [patch.crates-io] section overriding libredox (which is from crates.io) and a [patch.'<URL>'] section overriding redox_syscall (which is from a git URL). [patch.crates-io] only matches crates.io deps; [patch.'<URL>'] matches the dep's source URL. Also: declare members = ['.', 'rmm'] in the [workspace] section. Without this, cargo doesn't recognize the kernel as a workspace and the [patch] sections are silently ignored (workspace_metadata is None). The members list includes the kernel's own directory and the rmm path dep.
This commit is contained in:
+15
@@ -1,5 +1,6 @@
|
||||
[workspace]
|
||||
resolver = "3"
|
||||
members = [".", "rmm"]
|
||||
|
||||
[package]
|
||||
name = "kernel"
|
||||
@@ -130,4 +131,18 @@ debug = "full"
|
||||
# same type, so `?` conversions in scheme-utils / daemon
|
||||
# compile cleanly.
|
||||
[patch.crates-io]
|
||||
# Phase J: override libredox 0.1.17 to use the local
|
||||
# fork at ../libredox/ (which itself uses the local syscall
|
||||
# fork). This breaks the libredox::error::Error <->
|
||||
# syscall::Error type-identity barrier that previously
|
||||
# caused E0277 errors in scheme-utils and daemon.
|
||||
libredox = { path = "../libredox" }
|
||||
# Phase J: the kernel's redox_syscall dep is a git URL
|
||||
# (not crates.io), so [patch.crates-io] doesn't apply.
|
||||
# Use a [patch."<URL>"] section to match the dep source.
|
||||
# The local fork at ../syscall adds the EnterS2Idle /
|
||||
# ExitS2Idle AcpiVerb variants — the kernel's direct use
|
||||
# of AcpiVerb in src/scheme/acpi.rs's kcall handler
|
||||
# needs the fork to see these variants.
|
||||
[patch."https://gitlab.redox-os.org/redox-os/syscall.git"]
|
||||
redox_syscall = { path = "../syscall" }
|
||||
|
||||
Reference in New Issue
Block a user