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
+5
View File
@@ -0,0 +1,5 @@
#TODO require a patch on the mio crate
[source]
git = "https://github.com/jmacdonald/amp"
[build]
template = "cargo"
+8
View File
@@ -0,0 +1,8 @@
#TODO not compiled or tested
[source]
git = "https://github.com/erikjuhani/basalt"
[build]
template = "custom"
script = """
cookbook_cargo_packages basalt-tui
"""
+5
View File
@@ -0,0 +1,5 @@
#TODO sys-info crate build.rs does not recognize Redox
[source]
git = "https://github.com/sharkdp/bat"
[build]
template = "cargo"
+8
View File
@@ -0,0 +1,8 @@
#TODO not compiled or tested
[source]
git = "https://github.com/bahdotsh/blogr"
[build]
template = "custom"
script = """
cookbook_cargo_packages blogr-cli
"""
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/wfxr/csview"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO compiled but not tested (after cargo update)
[source]
git = "https://github.com/YS-L/csvlens"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/TrystanScottLambert/dog"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/AhoyISki/duat"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/microsoft/edit"
[build]
template = "cargo"
+22
View File
@@ -0,0 +1,22 @@
#TODO compilation error
#TODO make dependencies work
[source]
tar = "https://ftp.gnu.org/gnu/emacs/emacs-29.1.tar.xz"
[build]
template = "custom"
dependencies = [
"dbus",
"libgmp",
"libgpm",
"gnutls3",
"jansson",
"liblcms",
"sqlite3",
"libxml2",
"zlib",
"ncurses",
]
script = """
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/ncurses"
cookbook_configure
"""
+37
View File
@@ -0,0 +1,37 @@
#TODO compilation error
#TODO make dependencies work
[source]
tar = "https://ftp.gnu.org/gnu/emacs/emacs-29.1.tar.xz"
[build]
template = "custom"
dependencies = [
"dbus",
"libgmp",
"libgpm",
"gnutls3",
"jansson",
"liblcms",
"sqlite3",
"libxml2",
"zlib",
"ncurses",
"cairo",
"fontconfig",
"freetype2",
"gdk-pixbuf",
"libgif",
"glib",
"gtk3",
"harfbuzz",
"libjpeg",
"pango",
"libpng",
"librsvg",
"libtiff",
"libwebp",
"libotf",
]
script = """
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/ncurses"
cookbook_configure
"""
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/warpwm/flowfix"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/jrnxf/fsrx"
[build]
template = "cargo"
+9
View File
@@ -0,0 +1,9 @@
#TODO can't find the fontconfig dependency
[source]
git = "https://github.com/polachok/helix-gpui"
[build]
template = "cargo"
dependencies = [
"openssl1",
"fontconfig",
]
+5
View File
@@ -0,0 +1,5 @@
#TODO promote
[source]
git = "https://github.com/konradsz/igrep"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/shashwatah/jot"
[build]
template = "cargo"
+9
View File
@@ -0,0 +1,9 @@
#TODO not compiled or tested
[source]
git = "https://github.com/bragefuglseth/keypunch"
[build]
template = "cargo"
dependencies = [
"gtk4",
"libadwaita",
]
+6
View File
@@ -0,0 +1,6 @@
#TODO not compiled or tested
[source]
git = "https://github.com/ki-editor/ki-editor"
shallow_clone = true
[build]
template = "cargo"
+12
View File
@@ -0,0 +1,12 @@
#TODO promote
[source]
git = "https://github.com/ilai-deutel/kibi"
rev = "v0.3.2"
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}"/usr/share/kibi
cp -rv "${COOKBOOK_SOURCE}"/syntax.d "${COOKBOOK_STAGE}"/usr/share/kibi
cookbook_cargo
"""
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/akiomik/mado"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/henriklovhaug/md-tui"
[build]
template = "cargo"
+8
View File
@@ -0,0 +1,8 @@
#TODO not compiled or tested
[source]
git = "https://github.com/swsnr/mdcat"
[build]
template = "custom"
script = """
cookbook_cargo --features=static
"""
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/Supakornn/nanorust"
[build]
template = "cargo"
+14
View File
@@ -0,0 +1,14 @@
#TODO Make neovim and freeglut work
[source]
git = "https://github.com/neovide/neovide"
[build]
template = "cargo"
dependencies = [
"neovim",
"openssl1",
"freetype2",
"expat",
"bzip2",
"freeglut",
"fontconfig",
]
+57
View File
@@ -0,0 +1,57 @@
#TODO working with workarounds on SIGCHLD
#TODO no documentation
[source]
git = "https://github.com/neovim/neovim"
rev = "v0.11.5"
shallow_clone = true
patches = [
"redox.patch"
]
[build]
template = "custom"
dependencies = [
"libiconv",
"libuv",
"luv",
"lpeg",
"tree-sitter",
"gettext",
"unibilium",
"utf8proc",
]
dev-dependencies = [
"host:luajit",
"host:neovim",
]
script = """
DYNAMIC_INIT
# the only official way to cross compile in future is via zig
# https://github.com/neovim/neovim/issues/19579
# the code path below is very hacky, and our zig support is poor yet
COOKBOOK_CMAKE_FLAGS+=(-DLUA_GEN_PRG=luajit)
export DEPS_BUILD_DIR=$COOKBOOK_SYSROOT/usr
if [ "$TARGET" = "$COOKBOOK_HOST_TARGET" ]; then
cookbook_cmake
# needed to workaround bootstrapping process
cp ./lib/libnlua0.so ${COOKBOOK_STAGE}/usr/lib/nvim/
patchelf --replace-needed \
"${COOKBOOK_SYSROOT}/usr/lib/liblpeg.so" \
'liblpeg.so.1' ${COOKBOOK_STAGE}/usr/lib/nvim/libnlua0.so
else
# this is a very ugly workaround
cookbook_cmake || true
cp ${COOKBOOK_TOOLCHAIN}/usr/lib/nvim/libnlua0.so ./lib/libnlua0.so
cookbook_cmake
fi
# Lpeg is absolute path https://github.com/neovim/neovim/issues/23395
patchelf --replace-needed \
"${COOKBOOK_SYSROOT}/usr/lib/liblpeg.so" \
'liblpeg.so.1' ${COOKBOOK_STAGE}/usr/bin/nvim
"""
+155
View File
@@ -0,0 +1,155 @@
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index d103b5f4..37d9444e 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -24,37 +24,6 @@ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
file(GLOB PACKAGES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
-set(GENERATED_PACKAGE_TAGS)
-foreach(PACKAGE ${PACKAGES})
- get_filename_component(PACKNAME ${PACKAGE} NAME)
- file(GLOB "${PACKNAME}_DOC_FILES" CONFIGURE_DEPENDS ${PACKAGE}/doc/*.txt)
- if(${PACKNAME}_DOC_FILES)
- file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
- add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
- COMMAND $<TARGET_FILE:nvim_bin>
- -u NONE -i NONE -e --headless -c "helptags doc" -c quit
- DEPENDS
- nvim_bin
- nvim_runtime_deps
- WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}"
- )
-
- set("${PACKNAME}_DOC_NAMES")
- foreach(DF "${${PACKNAME}_DOC_FILES}")
- get_filename_component(F ${DF} NAME)
- list(APPEND "${PACKNAME}_DOC_NAMES" ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/${F})
- endforeach()
-
- install_helper(
- FILES ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags "${${PACKNAME}_DOC_NAMES}"
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/pack/dist/opt/${PACKNAME}/doc)
-
- list(APPEND GENERATED_PACKAGE_TAGS "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags")
- endif()
-endforeach()
-
set(BUILDDOCFILES)
foreach(DF ${DOCFILES})
get_filename_component(F ${DF} NAME)
@@ -65,8 +34,6 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
COMMAND ${CMAKE_COMMAND} -E remove_directory doc
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/runtime/doc doc
- COMMAND $<TARGET_FILE:nvim_bin>
- -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
DEPENDS
nvim_bin
nvim_runtime_deps
@@ -78,7 +45,6 @@ add_custom_target(
DEPENDS
${GENERATED_SYN_VIM}
${GENERATED_HELP_TAGS}
- ${GENERATED_PACKAGE_TAGS}
)
# CMake is painful here. It will create the destination using the user's
@@ -87,10 +53,6 @@ add_custom_target(
# seems like the best compromise. If we create it, then everyone can see it.
# If it's preexisting, leave it alone.
-install_helper(
- FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES}
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc)
-
install_helper(
FILES ${GENERATED_SYN_VIM}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/syntax/vim)
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 4a8fe4c6..55a9ede1 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -93,19 +93,6 @@ if(NOT MSVC)
endif()
# -fstack-protector breaks Mingw-w64 builds
-if(NOT MINGW)
- check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG)
- if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
- target_compile_options(main_lib INTERFACE -fstack-protector-strong)
- target_link_libraries(main_lib INTERFACE -fstack-protector-strong)
- else()
- check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
- if(HAS_FSTACK_PROTECTOR_FLAG)
- target_compile_options(main_lib INTERFACE -fstack-protector --param ssp-buffer-size=4)
- target_link_libraries(main_lib INTERFACE -fstack-protector --param ssp-buffer-size=4)
- endif()
- endif()
-endif()
# Compiler specific options
if(MSVC)
@@ -145,9 +132,6 @@ endif()
# Platform specific options
if(UNIX)
target_link_libraries(main_lib INTERFACE m)
- if (NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
- target_link_libraries(main_lib INTERFACE util)
- endif()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 5c1e415c..fa6fa859 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -698,6 +698,12 @@ void getout(int exitval)
assert(!ui_client_channel_id);
exiting = true;
+ // parent doesn't notice SIGCHILD
+ pid_t ppid = getppid();
+ if (ppid > 1) {
+ kill(ppid, SIGKILL);
+ }
+
// make sure startuptimes have been flushed
time_finish();
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index db575e00..b42cee2a 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -28,6 +28,8 @@
#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX)
# define NAME_MAX _XOPEN_NAME_MAX
+#elif !defined(NAME_MAX)
+# define NAME_MAX 255
#endif
#define BASENAMELEN (NAME_MAX - 5)
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index 7dff8a1b..ebc61542 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -880,7 +880,16 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu
MultiQueue *events = multiqueue_new_child(main_loop.events);
proc->events = events;
proc->argv = argv;
+#ifdef __redox__
+ msg_puts("Shell execution is disabled until https://gitlab.redox-os.org/redox-os/redox/-/issues/1762 closed and this workaround removed\n");
+ loop_poll_events(&main_loop, 0);
+ multiqueue_free(events);
+ return -1;
+ int status = -1;
+#else
int status = proc_spawn(proc, has_input, true, true);
+#endif
+
if (status) {
loop_poll_events(&main_loop, 0);
// Failed, probably 'shell' is not executable.
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/mahlquistj/octotype"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/ollien/quicknotes"
[build]
template = "cargo"
+7
View File
@@ -0,0 +1,7 @@
#TODO not compiled or tested
[source]
git = "https://github.com/stefanalfbo/rawk"
shallow_clone = true
[build]
template = "cargo"
cargopackages = ["rawk-cli"]
@@ -0,0 +1,12 @@
#TODO not compiled or tested
[source]
git = "https://gitlab.gnome.org/World/read-it-later"
shallow_clone = true
[build]
template = "meson"
dependencies = [
"gtk4",
"libadwaita",
"glib",
"gdk-pixbuf",
]
+5
View File
@@ -0,0 +1,5 @@
#TODO compiled but not tested
[source]
git = "https://github.com/acheronfail/repgrep"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/revi-editor/revi"
[build]
template = "cargo"
+13
View File
@@ -0,0 +1,13 @@
#TODO not compiled or tested
#TODO resource packaging: https://github.com/lockedmutex/rhyolite/blob/master/Cargo.toml#L43
[source]
git = "https://github.com/lockedmutex/rhyolite"
[build]
template = "custom"
dependencies = [
"freetype2",
"fontconfig",
]
script = """
cookbook_cargo --profile release
"""
+5
View File
@@ -0,0 +1,5 @@
#TODO tokio-tar crate error
[source]
git = "https://github.com/phiresky/ripgrep-all"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/LuminousToaster/ripwc"
[build]
template = "cargo"
+14
View File
@@ -0,0 +1,14 @@
#TODO not compiled or tested
# build instructions: https://github.com/flxzt/rnote/blob/main/BUILDING.md#build-with-meson
[source]
git = "https://github.com/flxzt/rnote"
[build]
template = "meson"
dependencies = [
"gtk4",
"glib",
"libadwaita",
"libalsa",
"libpoppler",
"appstream",
]
+9
View File
@@ -0,0 +1,9 @@
#TODO not compiled or tested
[source]
git = "https://github.com/Linus-Mussmaecher/rucola"
[build]
template = "cargo"
[package]
dependencies = [
"nerd-fonts",
]
+6
View File
@@ -0,0 +1,6 @@
#TODO not compiled or tested
[source]
git = "https://github.com/chmln/sd"
shallow_clone = true
[build]
template = "cargo"
+6
View File
@@ -0,0 +1,6 @@
#TODO not compiled or tested
[source]
git = "https://github.com/pegasusheavy/sed-rs"
shallow_clone = true
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/yassinebridi/serpl"
[build]
template = "cargo"
+8
View File
@@ -0,0 +1,8 @@
#TODO not compiled or tested
[source]
git = "https://github.com/ivanceras/svgbob"
[build]
template = "custom"
script = """
cookbook_cargo_packages svgbob_cli
"""
+8
View File
@@ -0,0 +1,8 @@
#TODO not compiled or tested
[source]
git = "https://github.com/foxfriends/syncat"
[build]
template = "custom"
script = """
cookbook_cargo_packages syncat
"""
+6
View File
@@ -0,0 +1,6 @@
#TODO not compiled or tested
[source]
git = "https://github.com/alecthomas/t"
shallow_clone = true
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/Epistates/treemd"
[build]
template = "cargo"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/scipenai/tylax"
[build]
template = "cargo"
+6
View File
@@ -0,0 +1,6 @@
#TODO not compiled or tested
#TODO discover minimum dependencies from meson log
[source]
git = "https://codeberg.org/haydn/typesetter"
[build]
template = "meson"
+5
View File
@@ -0,0 +1,5 @@
#TODO not compiled or tested
[source]
git = "https://github.com/jedisct1/yes-rs"
[build]
template = "cargo"
+21
View File
@@ -0,0 +1,21 @@
#TODO not compiled or tested
#TODO maybe missing dependencies, see https://github.com/zed-industries/zed/blob/main/script/linux#L15
#TODO build the gui ("zed" package) once we have gpu drivers to render vulkan at decent fps
# build instructions - https://zed.dev/docs/development/linux
[source]
git = "https://github.com/zed-industries/zed"
[build]
template = "custom"
dependencies = [
"fontconfig",
"libxkbcommon",
"openssl1",
"zstd",
"libgit2",
"sqlite3",
]
script = """
cookbook_cargo_packages cli
mv "${COOKBOOK_STAGE}/usr/bin/cli" "${COOKBOOK_STAGE}/usr/bin/zed-cli"
#mv "${COOKBOOK_STAGE}/usr/bin/zed" "${COOKBOOK_STAGE}/usr/bin/zed-editor"
"""
+8
View File
@@ -0,0 +1,8 @@
#TODO not compiled or tested
[source]
git = "https://github.com/zee-editor/zee"
[build]
template = "custom"
script = """
cookbook_cargo_packages zee
"""