diff --git a/local/patches/kernel/redox.patch b/local/patches/kernel/redox.patch index 35331336..7977f2f2 100644 --- a/local/patches/kernel/redox.patch +++ b/local/patches/kernel/redox.patch @@ -126,3 +126,22 @@ index 3159b9c4..c691eb8d 100644 _ => MadtEntry::Unknown(entry_type), }; + +diff --git a/src/devices/graphical_debug/mod.rs b/src/devices/graphical_debug/mod.rs +index b701c9a8..00cc984d 100644 +--- a/src/devices/graphical_debug/mod.rs ++++ b/src/devices/graphical_debug/mod.rs +@@ -59,7 +59,12 @@ pub fn init(env: &[u8]) { + ); + + let debug_display = DebugDisplay::new(width, height, stride, virt as *mut u32); +- *DEBUG_DISPLAY.lock() = Some(debug_display); ++ // FIXME: Writing to the framebuffer during early boot causes a hang on some ++ // QEMU configurations (virtio-vga, ramfb). The bootloader maps the framebuffer ++ // with default caching; the kernel remaps it with write-combining in memory::init(). ++ // Early kernel access before that remap appears to stall. Deferring DEBUG_DISPLAY ++ // setup avoids the hang; userspace vesad/fbbootlogd handles graphical output. ++ // *DEBUG_DISPLAY.lock() = Some(debug_display); + } + + #[allow(unused)] diff --git a/local/patches/relibc/P3-getrlimit-getdtablesize.patch b/local/patches/relibc/P3-getrlimit-getdtablesize.patch new file mode 100644 index 00000000..dd25ba16 --- /dev/null +++ b/local/patches/relibc/P3-getrlimit-getdtablesize.patch @@ -0,0 +1,40 @@ +diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs +index 573d69ad..d7ebe10d 100644 +--- a/src/header/unistd/mod.rs ++++ b/src/header/unistd/mod.rs +@@ -534,7 +534,7 @@ pub extern "C" fn getdtablesize() -> c_int { + }; + if r == 0 { + let cur = unsafe { lim.assume_init() }.rlim_cur; +- match cur { ++ return match cur { + c if c < i32::MAX as u64 => c as i32, + _ => i32::MAX, + }; + } + -1 + } + +diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs +index 752339a7..3f44171b 100644 +--- a/src/platform/redox/mod.rs ++++ b/src/platform/redox/mod.rs +@@ -736,10 +736,15 @@ impl Pal for Sys { + } + + fn getrlimit(resource: c_int, mut rlim: Out) -> Result<()> { +- todo_skip!(0, "getrlimit({}, {:p}): not implemented", resource, rlim); ++ // Return sensible defaults without logging; full kernel syscall not yet available. ++ let (cur, max) = match resource { ++ sys_resource::RLIMIT_NOFILE => (65536, 65536), ++ sys_resource::RLIMIT_STACK => (8 * 1024 * 1024, RLIM_INFINITY as u64), ++ _ => (RLIM_INFINITY as u64, RLIM_INFINITY as u64), ++ }; + rlim.write(rlimit { +- rlim_cur: RLIM_INFINITY, +- rlim_max: RLIM_INFINITY, ++ rlim_cur: cur, ++ rlim_max: max, + }); + Ok(()) + } diff --git a/local/recipes/kde/kwin/recipe.toml b/local/recipes/kde/kwin/recipe.toml index aedf3428..6679306f 100644 --- a/local/recipes/kde/kwin/recipe.toml +++ b/local/recipes/kde/kwin/recipe.toml @@ -86,6 +86,14 @@ exit 0 EOFBIN chmod +x "${STAGE}/bin/kwin_wayland" +# Dummy kwin_wayland_wrapper binary +cat > "${STAGE}/bin/kwin_wayland_wrapper" << 'EOFBIN' +#!/bin/sh +echo "KWin stub: kwin_wayland_wrapper not yet available on Redox (args: $@)" +exit 0 +EOFBIN +chmod +x "${STAGE}/bin/kwin_wayland_wrapper" + # Minimal kwin header stubs for downstream compilation cat > "${STAGE}/include/kwin/kwinevents.h" << 'EOFHDR' #pragma once diff --git a/recipes/core/relibc/recipe.toml b/recipes/core/relibc/recipe.toml index a3272f98..36d3354f 100644 --- a/recipes/core/relibc/recipe.toml +++ b/recipes/core/relibc/recipe.toml @@ -31,6 +31,7 @@ patches = [ "../../../local/patches/relibc/P3-inet6-pton-ntop.patch", "../../../local/patches/relibc/P3-tcp-sockopt-forward.patch", "../../../local/patches/relibc/P3-dns-aaaa-getaddrinfo-ipv6.patch", + "../../../local/patches/relibc/P3-getrlimit-getdtablesize.patch", ] [build]