Red Bear OS — microkernel OS in Rust, based on Redox

Derivative of Redox OS (https://www.redox-os.org) adding:
- AMD GPU driver (amdgpu) via LinuxKPI compat layer
- ext4 filesystem support (ext4d scheme daemon)
- ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG)
- Custom branding (hostname, os-release, boot identity)

Build system is full upstream Redox with RBOS overlay in local/.
Patches for kernel, base, and relibc are symlinked from local/patches/
and protected from make clean/distclean. Custom recipes live in
local/recipes/ with symlinks into the recipes/ search path.

Build:  make all CONFIG_NAME=redbear-full
Sync:   ./local/scripts/sync-upstream.sh
This commit is contained in:
2026-04-12 19:05:00 +01:00
commit 50b731f1b7
3392 changed files with 98327 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
diff --git a/stdlib/src/posixsubprocess.rs b/stdlib/src/posixsubprocess.rs
index 7f418c899..4da6a6858 100644
--- a/stdlib/src/posixsubprocess.rs
+++ b/stdlib/src/posixsubprocess.rs
@@ -441,15 +441,14 @@ fn close_dir_fds(keep: KeepFds<'_>) -> nix::Result<()> {
fn close_filetable_fds(keep: KeepFds<'_>) -> nix::Result<()> {
use nix::fcntl;
use std::os::fd::{FromRawFd, OwnedFd};
- let fd = fcntl::open(
+ let filetable = fcntl::open(
c"/scheme/thisproc/current/filetable",
fcntl::OFlag::O_RDONLY,
nix::sys::stat::Mode::empty(),
)?;
- let filetable = unsafe { OwnedFd::from_raw_fd(fd) };
let read_one = || -> nix::Result<_> {
let mut byte = 0;
- let n = nix::unistd::read(filetable.as_raw_fd(), std::slice::from_mut(&mut byte))?;
+ let n = nix::unistd::read(&filetable, std::slice::from_mut(&mut byte))?;
Ok((n > 0).then_some(byte))
};
while let Some(c) = read_one()? {