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
+30
View File
@@ -0,0 +1,30 @@
[source]
git = "https://github.com/RustPython/RustPython"
# newer rev requires 'bits/libc-header-start.h' for bindgen
rev = "2025-10-13-main-51"
shallow_clone = true
patches = [
"redox.patch"
]
[build]
dependencies = [
"openssl3",
"zlib",
]
template = "custom"
script = """
DYNAMIC_INIT
export BUILDTIME_RUSTPYTHONPATH=/lib/rustpython
export OPENSSL_DIR="${COOKBOOK_SYSROOT}"
export ZLIB_STATIC=1
cookbook_cargo --features ssl
mkdir -p "${COOKBOOK_STAGE}/lib"
rsync -aE \
--exclude 'test/' \
--exclude '__pycache__/' \
--exclude '*.pyc' \
--exclude '/README.md' \
"${COOKBOOK_SOURCE}"/Lib/ "${COOKBOOK_STAGE}/lib/rustpython"
"""
+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()? {