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:
@@ -0,0 +1,35 @@
|
||||
diff -ru source/lib/getdtablesize.c source-new/lib/getdtablesize.c
|
||||
--- source/lib/getdtablesize.c 2015-03-06 16:31:45.000000000 -0800
|
||||
+++ source-new/lib/getdtablesize.c 2017-08-08 19:33:33.993874985 -0700
|
||||
@@ -106,15 +106,6 @@
|
||||
int
|
||||
getdtablesize (void)
|
||||
{
|
||||
- struct rlimit lim;
|
||||
-
|
||||
- if (getrlimit (RLIMIT_NOFILE, &lim) == 0
|
||||
- && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
|
||||
- && lim.rlim_cur != RLIM_INFINITY
|
||||
- && lim.rlim_cur != RLIM_SAVED_CUR
|
||||
- && lim.rlim_cur != RLIM_SAVED_MAX)
|
||||
- return lim.rlim_cur;
|
||||
-
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
Only in source-new/lib: getdtablesize.c.orig
|
||||
diff -ru source/src/safe.c source-new/src/safe.c
|
||||
--- source/src/safe.c 2015-03-06 16:34:20.000000000 -0800
|
||||
+++ source-new/src/safe.c 2017-08-08 19:33:53.447430811 -0700
|
||||
@@ -92,11 +92,7 @@
|
||||
|
||||
static void init_dirfd_cache (void)
|
||||
{
|
||||
- struct rlimit nofile;
|
||||
-
|
||||
max_cached_fds = 8;
|
||||
- if (getrlimit (RLIMIT_NOFILE, &nofile) == 0)
|
||||
- max_cached_fds = MAX (nofile.rlim_cur / 4, max_cached_fds);
|
||||
|
||||
cached_dirfds = hash_initialize (max_cached_fds,
|
||||
NULL,
|
||||
@@ -0,0 +1,19 @@
|
||||
diff -ru source/src/util.c source-new/src/util.c
|
||||
--- source/src/util.c 2015-03-06 16:34:20.000000000 -0800
|
||||
+++ source-new/src/util.c 2017-08-11 18:24:56.991729200 -0700
|
||||
@@ -271,6 +271,7 @@
|
||||
|
||||
/* May fail if we are not privileged to set the file owner, or we are
|
||||
not in group instat.st_gid. Ignore those errors. */
|
||||
+ /*
|
||||
if ((uid != -1 || gid != -1)
|
||||
&& safe_lchown (to, uid, gid) != 0
|
||||
&& (errno != EPERM
|
||||
@@ -281,6 +282,7 @@
|
||||
(uid == -1) ? "owner" : "owning group",
|
||||
S_ISLNK (mode) ? "symbolic link" : "file",
|
||||
quotearg (to));
|
||||
+ */
|
||||
}
|
||||
if (attr & FA_XATTRS)
|
||||
if (copy_attr (from, to) != 0
|
||||
@@ -0,0 +1,15 @@
|
||||
--- source-old/lib/renameat2.c 2018-02-03 05:41:53.000000000 -0700
|
||||
+++ source/lib/renameat2.c 2025-11-01 08:39:54.945513820 -0600
|
||||
@@ -70,6 +70,7 @@
|
||||
Obey FLAGS when doing the renaming. If FLAGS is zero, this
|
||||
function is equivalent to renameat (FD1, SRC, FD2, DST). */
|
||||
|
||||
+#if !defined(__redox__)
|
||||
int
|
||||
renameat2 (int fd1, char const *src, int fd2, char const *dst,
|
||||
unsigned int flags)
|
||||
@@ -225,3 +226,4 @@
|
||||
|
||||
#endif /* !HAVE_RENAMEAT */
|
||||
}
|
||||
+#endif
|
||||
@@ -0,0 +1,28 @@
|
||||
[source]
|
||||
tar = "https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz"
|
||||
blake3 = "d46d14c12aa4ea51e356bf92091c368fd871e1d770b94bc29027886737aecd5f"
|
||||
patches = [
|
||||
"01_no_rlimit.patch",
|
||||
"02_no_chown.patch",
|
||||
"03_renameat2.patch",
|
||||
]
|
||||
script = """
|
||||
wget -O build-aux/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
|
||||
autoreconf
|
||||
"""
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--host="${TARGET}"
|
||||
--prefix="/"
|
||||
--build="$(gcc -dumpmachine)"
|
||||
)
|
||||
|
||||
cookbook_configure
|
||||
|
||||
${TARGET}-strip "${COOKBOOK_STAGE}/bin/"*
|
||||
rm -rf "${COOKBOOK_STAGE}/share" "${COOKBOOK_STAGE}/lib"
|
||||
"""
|
||||
Reference in New Issue
Block a user