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
+80
View File
@@ -0,0 +1,80 @@
[source]
tar = "https://www.php.net/distributions/php-8.4.17.tar.xz"
blake3 = "a8478dddd948d4b26e51c5727ac0895440da76e8ad9be947098a4284ca0b7f2a"
patches = [
"redox.patch"
]
[build]
template = "custom"
dependencies = [
"bzip2",
"curl",
"gettext",
"libffi",
"libgmp",
"libavif",
"libicu",
"libjpeg",
"libedit",
"libonig",
"libpng",
"libsodium",
"libwebp",
"libxml2",
"libiconv",
"libzip",
"ncursesw",
"nghttp2",
"openssl3",
"pcre",
"sqlite3",
"xz",
"zlib",
"zstd",
]
script = """
DYNAMIC_INIT
export SUFFIX="84"
export CURL_LIBS="-lcurl -lnghttp2 -lssl -lcrypto"
COOKBOOK_CONFIGURE_FLAGS+=(
--program-suffix=${SUFFIX}
--sysconfdir=/etc/php/$SUFFIX
--with-config-file-path=/etc/php/$SUFFIX
--with-config-file-scan-dir=/etc/php/$SUFFIX/conf.d
--with-iconv="${COOKBOOK_SYSROOT}/usr"
--disable-opcache
--enable-bcmath
--enable-calendar
--enable-fpm # need times function
--enable-gd
--enable-intl
--enable-mbstring
--with-curl
--with-gettext
--with-gmp
--with-jpeg
--with-webp
--with-avif
--with-ffi
--with-libedit
--with-openssl
--with-sodium
--with-zip
)
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" "$@"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
"${COOKBOOK_MAKE}" install \
INSTALL_ROOT="${COOKBOOK_STAGE}" \
datarootdir=/usr/share localstatedir=/var
mv ${COOKBOOK_STAGE}/usr/sbin/* ${COOKBOOK_STAGE}/usr/bin/
for bin in "php-cgi" "php-config" "php" "phpdbg" "phpize" "php-fpm"; do
ln -s "$bin$SUFFIX" ${COOKBOOK_STAGE}/usr/bin/$bin
done
# will not exist on bash but exist on other shell
rm -f ${COOKBOOK_STAGE}/usr/bin/phar$SUFFIX
cp ${COOKBOOK_SOURCE}/php.ini* ${COOKBOOK_STAGE}/etc/php/$SUFFIX/
"""
+91
View File
@@ -0,0 +1,91 @@
diff -ruwN source/configure source-new/configure
--- source/configure 2026-01-14 00:17:10.000000000 +0700
+++ source-new/configure 2026-01-16 15:56:01.944755811 +0700
@@ -26007,7 +26007,7 @@
then :
ac_cv_lib_curl_curl_easy_perform=yes
else case e in #(
- e) ac_cv_lib_curl_curl_easy_perform=no ;;
+ e) ac_cv_lib_curl_curl_easy_perform=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
@@ -37728,7 +37728,7 @@
then :
php_cv_lib_gd_works=yes
else case e in #(
- e) php_cv_lib_gd_works=no ;;
+ e) php_cv_lib_gd_works=yes ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
@@ -40464,7 +40464,7 @@
LIBS_SAVED=$LIBS
CFLAGS="$CFLAGS $GMP_CFLAGS"
LIBS="$LIBS $GMP_LIBS"
- gmp_check=no
+ gmp_check=yes
ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
if test "x$ac_cv_header_gmp_h" = xyes
then :
diff -ruwN source/ext/phar/Makefile.frag source-new/ext/phar/Makefile.frag
--- source/ext/phar/Makefile.frag 2026-01-14 00:17:10.000000000 +0700
+++ source-new/ext/phar/Makefile.frag 2026-01-16 15:56:01.946130660 +0700
@@ -30,7 +30,7 @@
-@test -f $(builddir)/phar/phar.inc || cp $(srcdir)/phar/phar.inc $(builddir)/phar/phar.inc
TEST_PHP_EXECUTABLE = $(shell $(PHP_EXECUTABLE) -v 2>&1)
-TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -c 'Exec format error')
+TEST_PHP_EXECUTABLE_RES = $(shell echo "$(TEST_PHP_EXECUTABLE)" | grep -E -c 'Exec format error|required file not found')
$(builddir)/phar.php: $(srcdir)/build_precommand.php $(srcdir)/phar/*.inc $(srcdir)/phar/*.php $(SAPI_CLI_PATH)
-@(echo "Generating phar.php"; \
diff -ruwN source/ext/posix/posix.c source-new/ext/posix/posix.c
--- source/ext/posix/posix.c 2026-01-14 00:17:10.000000000 +0700
+++ source-new/ext/posix/posix.c 2026-01-16 15:56:01.946290813 +0700
@@ -375,7 +375,7 @@
ZEND_PARSE_PARAMETERS_NONE();
- if ((ticks = times(&t)) == -1) {
+ {
POSIX_G(last_error) = errno;
RETURN_FALSE;
}
diff -ruwN source/sapi/fpm/fpm/fpm_status.c source-new/sapi/fpm/fpm/fpm_status.c
--- source/sapi/fpm/fpm/fpm_status.c 2026-01-14 00:17:10.000000000 +0700
+++ source-new/sapi/fpm/fpm/fpm_status.c 2026-01-16 15:57:37.781307156 +0700
@@ -84,6 +84,7 @@
continue;
}
/* prevent NaN */
+#ifdef HAVE_TIMES
if (proc_p->cpu_duration.tv_sec == 0 && proc_p->cpu_duration.tv_usec == 0) {
cpu = 0.;
} else {
@@ -91,6 +92,9 @@
proc_p->last_request_cpu.tms_cstime) / fpm_scoreboard_get_tick() /
(proc_p->cpu_duration.tv_sec + proc_p->cpu_duration.tv_usec / 1000000.) * 100.;
}
+#else
+ cpu = 0.;
+#endif
array_init(&fpm_proc_stat);
add_assoc_long(&fpm_proc_stat, "pid", proc_p->pid);
@@ -573,11 +577,15 @@
}
/* prevent NaN */
+#ifdef HAVE_TIMES
if (proc->cpu_duration.tv_sec == 0 && proc->cpu_duration.tv_usec == 0) {
cpu = 0.;
} else {
cpu = (proc->last_request_cpu.tms_utime + proc->last_request_cpu.tms_stime + proc->last_request_cpu.tms_cutime + proc->last_request_cpu.tms_cstime) / fpm_scoreboard_get_tick() / (proc->cpu_duration.tv_sec + proc->cpu_duration.tv_usec / 1000000.) * 100.;
}
+#else
+ cpu = 0.;
+#endif
if (proc->request_stage == FPM_REQUEST_ACCEPTING) {
duration = proc->duration;