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
+15
View File
@@ -0,0 +1,15 @@
[source]
tar = "https://github.com/lz4/lz4/releases/download/v1.10.0/lz4-1.10.0.tar.gz"
blake3 = "3e69fd475e7852e17594985528b5232afeba7d3d56cfebe2e89071768b2ab36a"
patches = ["redox.patch"]
[build]
template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
export CPPFLAGS="${CPPFLAGS} -D_REDOX"
${COOKBOOK_MAKE} prefix="/usr"
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
"""
+34
View File
@@ -0,0 +1,34 @@
diff '--color=auto' -ruwN source/programs/util.h source-new/programs/util.h
--- source/programs/util.h 2024-07-21 13:29:49.000000000 -0400
+++ source-new/programs/util.h 2024-12-13 02:21:03.032769559 -0500
@@ -52,6 +52,9 @@
#include <time.h> /* time */
#include <limits.h> /* INT_MAX */
#include <errno.h>
+#if defined(_REDOX)
+# include <sys/time.h> /* utimes */
+#endif
@@ -239,12 +242,20 @@
timebuf.modtime = statbuf->st_mtime;
res += utime(filename, &timebuf); /* set access and modification times */
#else
+ #if defined(_REDOX)
+ struct timeval timebuf[2];
+ memset(timebuf, 0, sizeof(timebuf));
+ timebuf[0].tv_usec = UTIME_NOW;
+ timebuf[1].tv_sec = statbuf->st_mtime;
+ res += utimes(filename, timebuf);
+ #else
struct timespec timebuf[2];
memset(timebuf, 0, sizeof(timebuf));
timebuf[0].tv_nsec = UTIME_NOW;
timebuf[1].tv_sec = statbuf->st_mtime;
res += utimensat(AT_FDCWD, filename, timebuf, 0); /* set access and modification times */
#endif
+#endif
}
#if !defined(_WIN32)
+15
View File
@@ -0,0 +1,15 @@
diff -ruwN source/programs/platform.h source-new/programs/platform.h
--- source/programs/platform.h 2025-02-19 07:04:24.000000000 +0700
+++ source-new/programs/platform.h 2025-07-21 22:52:07.716447723 +0700
@@ -109,6 +109,11 @@
#endif /* PLATFORM_POSIX_VERSION */
+#if defined(__redox__)
+/* TODO: AT_FDCWD && utimensat must be defined to conform _POSIX_VERSION */
+# define PLATFORM_POSIX_VERSION 1
+#endif
+
#if PLATFORM_POSIX_VERSION > 1
/* glibc < 2.26 may not expose struct timespec def without this.
* See issue #1920. */
+17
View File
@@ -0,0 +1,17 @@
[source]
tar = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
blake3 = "730dca31244abd219e995f03a55d95b2cfb4b3e16cda055a79fa6f30a4f0e1db"
patches = [
"01_redox.patch"
]
[build]
template = "custom"
script = """
DYNAMIC_STATIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
# TODO: fPIC is the default on linux but not on redox and
# required by llvm21 as zstd statically linked there
export CPPFLAGS="$CPPFLAGS -fPIC"
${COOKBOOK_MAKE}
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
"""