From ed1e074586a056a48f93f933d5f7b607b325dd81 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 13:20:54 +0700 Subject: [PATCH 01/11] Linux --- Cargo.lock | 2 +- Cargo.toml | 2 +- config/dev.toml | 4 ++-- mk/config.mk | 8 +++++++- recipes/core/relibc/recipe.toml | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f0142794e..58ee056fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -918,7 +918,7 @@ dependencies = [ [[package]] name = "redoxer" version = "0.2.63" -source = "git+https://gitlab.redox-os.org/redox-os/redoxer.git#67af2b7543ff8fb2eaba6699ac9d331dfe2d0f8c" +source = "git+https://gitlab.redox-os.org/willnode/redoxer.git?branch=linux#bdc5b9f2e37b4539698035255a312c16252b1845" dependencies = [ "anyhow", "dirs", diff --git a/Cargo.toml b/Cargo.toml index 54479d5fb..452355c64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ pkgar-core = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" } pkgar-keys = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" } redox-pkg = { git = "https://gitlab.redox-os.org/redox-os/pkgutils.git", default-features = false } redox_installer = { git = "https://gitlab.redox-os.org/redox-os/installer.git", default-features = false } -redoxer = { git = "https://gitlab.redox-os.org/redox-os/redoxer.git", default-features = false } +redoxer = { git = "https://gitlab.redox-os.org/willnode/redoxer.git", branch = "linux", default-features = false } regex = "1.11" serde = { version = "=1.0.197", features = ["derive"] } termion = "4" diff --git a/config/dev.toml b/config/dev.toml index 8f92fb2cc..cddb680a8 100644 --- a/config/dev.toml +++ b/config/dev.toml @@ -5,11 +5,11 @@ include = ["desktop.toml"] # General settings [general] # Filesystem size in MiB -filesystem_size = 20000 +filesystem_size = 3000 # Do not prompt if settings are not defined prompt = false # Package settings [packages] -dev-redox = {} +gcc13 = {} hello-redox = {} diff --git a/mk/config.mk b/mk/config.mk index 0d8484057..4f69b3418 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -7,6 +7,8 @@ HOST_ARCH?=$(shell uname -m) # Configuration ## Architecture to build Redox for (aarch64, i586, or x86_64). Defaults to a host one ARCH?=$(HOST_ARCH) +## Operating system mode (redox or linux). Linux is experimental +OPERATING_SYSTEM?=redox ## Sub-device type for aarch64 if needed BOARD?= ## Enable to use binary prefix (much faster) @@ -158,7 +160,11 @@ endif endif ## Userspace variables -ifeq ($(ARCH),riscv64gc) +ifeq ($(OPERATING_SYSTEM),linux) + export TARGET=$(ARCH)-unknown-linux-musl + export GNU_TARGET=$(ARCH)-unknown-linux-musl + export USE_RUST_LIBM=1 +else ifeq ($(ARCH),riscv64gc) export TARGET=riscv64gc-unknown-redox export GNU_TARGET=riscv64-unknown-redox else diff --git a/recipes/core/relibc/recipe.toml b/recipes/core/relibc/recipe.toml index 4aba45310..53ccb3bee 100644 --- a/recipes/core/relibc/recipe.toml +++ b/recipes/core/relibc/recipe.toml @@ -1,5 +1,6 @@ [source] -git = "https://gitlab.redox-os.org/redox-os/relibc.git" +git = "https://gitlab.redox-os.org/willnode/relibc.git" +branch = "linux" [build] template = "custom" From d15031f9cc1f6216a82e2d9edca3806c4dc51553 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 15:36:14 +0700 Subject: [PATCH 02/11] Change gnu target --- mk/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/config.mk b/mk/config.mk index 4f69b3418..81a212425 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -162,7 +162,7 @@ endif ## Userspace variables ifeq ($(OPERATING_SYSTEM),linux) export TARGET=$(ARCH)-unknown-linux-musl - export GNU_TARGET=$(ARCH)-unknown-linux-musl + export GNU_TARGET=$(ARCH)-linux-relibc export USE_RUST_LIBM=1 else ifeq ($(ARCH),riscv64gc) export TARGET=riscv64gc-unknown-redox From f4032a4a3750e625a7380d40e0cdac278276f22b Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 16:10:34 +0700 Subject: [PATCH 03/11] Update redoxer --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 58ee056fb..644c93b9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -918,7 +918,7 @@ dependencies = [ [[package]] name = "redoxer" version = "0.2.63" -source = "git+https://gitlab.redox-os.org/willnode/redoxer.git?branch=linux#bdc5b9f2e37b4539698035255a312c16252b1845" +source = "git+https://gitlab.redox-os.org/willnode/redoxer.git?branch=linux#c566c012cf073a990bdb2a89bdfe181af808aea6" dependencies = [ "anyhow", "dirs", From 3319e95ef5a18af4d808e78b8e14a7065083d5a6 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 17:06:15 +0700 Subject: [PATCH 04/11] Update gcc --- recipes/dev/gcc13/recipe.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/dev/gcc13/recipe.toml b/recipes/dev/gcc13/recipe.toml index d3fba2838..66ed02f25 100644 --- a/recipes/dev/gcc13/recipe.toml +++ b/recipes/dev/gcc13/recipe.toml @@ -1,6 +1,6 @@ [source] -git = "https://gitlab.redox-os.org/redox-os/gcc" -branch = "redox-13.2.0" +git = "https://gitlab.redox-os.org/willnode/gcc" +branch = "linux" shallow_clone = true script = """ DYNAMIC_INIT From 7162b7f8fd88b5247586d91f4ac74b01352d3946 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 18:24:23 +0700 Subject: [PATCH 05/11] Add exception relibc --- recipes/libs/libstdcxx-v3/recipe.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/libs/libstdcxx-v3/recipe.toml b/recipes/libs/libstdcxx-v3/recipe.toml index c89158af4..be1f84888 100644 --- a/recipes/libs/libstdcxx-v3/recipe.toml +++ b/recipes/libs/libstdcxx-v3/recipe.toml @@ -15,6 +15,9 @@ COOKBOOK_CONFIGURE_FLAGS+=( if [ "${TARGET}" = "riscv64gc-unknown-redox" ]; then COOKBOOK_CONFIGURE_FLAGS+=( --without-libstdcxx-zoneinfo ) fi +if [ "${TARGET}" = "x86_64-unknown-linux-musl" ]; then +COOKBOOK_CONFIGURE_FLAGS+=( --without-libstdcxx-zoneinfo ) +fi CPPINCLUDE="${COOKBOOK_HOST_SYSROOT}/$TARGET/include/c++/13.2.0" export CPPFLAGS+=" -I${CPPINCLUDE} -I${CPPINCLUDE}/$TARGET/bits" From b6f58ebd141e0ce442bcc6d1197d4263d94ebe24 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 18:31:22 +0700 Subject: [PATCH 06/11] Update rust --- recipes/dev/rust/config-cross-linux.toml | 28 +++++++++++++++++++ ...bootstrap.toml => config-cross-redox.toml} | 0 recipes/dev/rust/recipe.toml | 3 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 recipes/dev/rust/config-cross-linux.toml rename recipes/dev/rust/{config-bootstrap.toml => config-cross-redox.toml} (100%) diff --git a/recipes/dev/rust/config-cross-linux.toml b/recipes/dev/rust/config-cross-linux.toml new file mode 100644 index 000000000..879616361 --- /dev/null +++ b/recipes/dev/rust/config-cross-linux.toml @@ -0,0 +1,28 @@ +[llvm] +download-ci-llvm = false +static-libstdcpp = false +link-shared = true + +[build] +host = ["TARGET"] +target = ["TARGET", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl"] +cargo-native-static = true +submodules = false +docs = false +tools = ["cargo", "clippy", "rustdoc", "rustfmt", "src"] +extended = true +verbose = 1 + +[install] +prefix = "install" +sysconfdir = "etc" + +[rust] +backtrace = false +codegen-tests = false + +[target.aarch64-unknown-linux-gnu] +llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config" + +[target.x86_64-unknown-linux-gnu] +llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config" diff --git a/recipes/dev/rust/config-bootstrap.toml b/recipes/dev/rust/config-cross-redox.toml similarity index 100% rename from recipes/dev/rust/config-bootstrap.toml rename to recipes/dev/rust/config-cross-redox.toml diff --git a/recipes/dev/rust/recipe.toml b/recipes/dev/rust/recipe.toml index 93e5b6c18..10d4b983d 100644 --- a/recipes/dev/rust/recipe.toml +++ b/recipes/dev/rust/recipe.toml @@ -20,7 +20,8 @@ dev-dependencies = [ script = """ if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then -cat ${COOKBOOK_RECIPE}/config-bootstrap.toml > config.toml +OS=$(echo "${TARGET}" | cut -d - -f3) +cat ${COOKBOOK_RECIPE}/config-cross-$OS.toml > config.toml sed -i "s|TARGET|${TARGET}|g" config.toml sed -i "s|COOKBOOK_TOOLCHAIN|${COOKBOOK_TOOLCHAIN}|g" config.toml From df5e823c3da5ec9d699be48b9a6a54707463e21c Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 18:53:24 +0700 Subject: [PATCH 07/11] Fix compiler --- mk/prefix.mk | 2 +- recipes/dev/rust/config-cross-linux.toml | 10 +++++++++- recipes/dev/rust/recipe.toml | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index 16751a811..dd987ea71 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -391,7 +391,7 @@ else @echo "\033[1;36;49mBuilding rust-install\033[0m" rm -rf "$@.partial" "$@" export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \ - $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) && \ + $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \ $(REPO_BIN) cook host:llvm21 host:rust cp -r "$(RUST_TARGET)/stage/usr/". "$@.partial" cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial" diff --git a/recipes/dev/rust/config-cross-linux.toml b/recipes/dev/rust/config-cross-linux.toml index 879616361..c2d4ea1d9 100644 --- a/recipes/dev/rust/config-cross-linux.toml +++ b/recipes/dev/rust/config-cross-linux.toml @@ -5,7 +5,7 @@ link-shared = true [build] host = ["TARGET"] -target = ["TARGET", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl"] +target = ["TARGET", "COOKBOOK_TARGET"] cargo-native-static = true submodules = false docs = false @@ -21,6 +21,14 @@ sysconfdir = "etc" backtrace = false codegen-tests = false +[target.COOKBOOK_TARGET] +cc = "COOKBOOK_GNU_TARGET-gcc" +cxx = "COOKBOOK_GNU_TARGET-g++" +ar = "COOKBOOK_GNU_TARGET-ar" +linker = "COOKBOOK_GNU_TARGET-gcc" +crt-static = false +llvm-config = "COOKBOOK_SYSROOT/bin/llvm-config" + [target.aarch64-unknown-linux-gnu] llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config" diff --git a/recipes/dev/rust/recipe.toml b/recipes/dev/rust/recipe.toml index 10d4b983d..020909b26 100644 --- a/recipes/dev/rust/recipe.toml +++ b/recipes/dev/rust/recipe.toml @@ -22,8 +22,10 @@ if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then OS=$(echo "${TARGET}" | cut -d - -f3) cat ${COOKBOOK_RECIPE}/config-cross-$OS.toml > config.toml -sed -i "s|TARGET|${TARGET}|g" config.toml sed -i "s|COOKBOOK_TOOLCHAIN|${COOKBOOK_TOOLCHAIN}|g" config.toml +sed -i "s|COOKBOOK_TARGET|${COOKBOOK_CROSS_TARGET}|g" config.toml +sed -i "s|COOKBOOK_GNU_TARGET|${COOKBOOK_CROSS_GNU_TARGET}|g" config.toml +sed -i "s|TARGET|${TARGET}|g" config.toml else From b11968a1f3ad77cb145a0703c2809a743a898a7d Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 19:56:28 +0700 Subject: [PATCH 08/11] Use real relibc --- Cargo.lock | 2 +- mk/config.mk | 2 +- recipes/dev/rust/config-cross-linux.toml | 10 +--------- recipes/libs/libstdcxx-v3/recipe.toml | 5 ++++- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 644c93b9b..e63cb18eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -918,7 +918,7 @@ dependencies = [ [[package]] name = "redoxer" version = "0.2.63" -source = "git+https://gitlab.redox-os.org/willnode/redoxer.git?branch=linux#c566c012cf073a990bdb2a89bdfe181af808aea6" +source = "git+https://gitlab.redox-os.org/willnode/redoxer.git?branch=linux#908336f2bf893d026e391b8972f271a78e4e27c2" dependencies = [ "anyhow", "dirs", diff --git a/mk/config.mk b/mk/config.mk index 81a212425..ef0be1be2 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -161,7 +161,7 @@ endif ## Userspace variables ifeq ($(OPERATING_SYSTEM),linux) - export TARGET=$(ARCH)-unknown-linux-musl + export TARGET=$(ARCH)-unknown-linux-relibc export GNU_TARGET=$(ARCH)-linux-relibc export USE_RUST_LIBM=1 else ifeq ($(ARCH),riscv64gc) diff --git a/recipes/dev/rust/config-cross-linux.toml b/recipes/dev/rust/config-cross-linux.toml index c2d4ea1d9..efb2a27aa 100644 --- a/recipes/dev/rust/config-cross-linux.toml +++ b/recipes/dev/rust/config-cross-linux.toml @@ -5,7 +5,7 @@ link-shared = true [build] host = ["TARGET"] -target = ["TARGET", "COOKBOOK_TARGET"] +target = ["TARGET", "x86_64-unknown-linux-relibc", "aarch64-unknown-linux-relibc"] cargo-native-static = true submodules = false docs = false @@ -21,14 +21,6 @@ sysconfdir = "etc" backtrace = false codegen-tests = false -[target.COOKBOOK_TARGET] -cc = "COOKBOOK_GNU_TARGET-gcc" -cxx = "COOKBOOK_GNU_TARGET-g++" -ar = "COOKBOOK_GNU_TARGET-ar" -linker = "COOKBOOK_GNU_TARGET-gcc" -crt-static = false -llvm-config = "COOKBOOK_SYSROOT/bin/llvm-config" - [target.aarch64-unknown-linux-gnu] llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config" diff --git a/recipes/libs/libstdcxx-v3/recipe.toml b/recipes/libs/libstdcxx-v3/recipe.toml index be1f84888..c53005dc7 100644 --- a/recipes/libs/libstdcxx-v3/recipe.toml +++ b/recipes/libs/libstdcxx-v3/recipe.toml @@ -15,7 +15,10 @@ COOKBOOK_CONFIGURE_FLAGS+=( if [ "${TARGET}" = "riscv64gc-unknown-redox" ]; then COOKBOOK_CONFIGURE_FLAGS+=( --without-libstdcxx-zoneinfo ) fi -if [ "${TARGET}" = "x86_64-unknown-linux-musl" ]; then +if [ "${TARGET}" = "x86_64-unknown-linux-relibc" ]; then +COOKBOOK_CONFIGURE_FLAGS+=( --without-libstdcxx-zoneinfo ) +fi +if [ "${TARGET}" = "aarch64-unknown-linux-relibc" ]; then COOKBOOK_CONFIGURE_FLAGS+=( --without-libstdcxx-zoneinfo ) fi From 766078a708e2ae80c3e843d1d3fa74f60948af7c Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 20:37:32 +0700 Subject: [PATCH 09/11] Switch rust --- recipes/dev/rust/recipe.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/dev/rust/recipe.toml b/recipes/dev/rust/recipe.toml index 020909b26..2e3cff53c 100644 --- a/recipes/dev/rust/recipe.toml +++ b/recipes/dev/rust/recipe.toml @@ -1,6 +1,6 @@ [source] -git = "https://gitlab.redox-os.org/redox-os/rust.git" -branch = "redox-2025-10-03" +git = "https://gitlab.redox-os.org/willnode/rust.git" +branch = "linux" shallow_clone = true [build] From 37883d8f35fb5bd9333b8f010e84c9a96be755bd Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 20:40:56 +0700 Subject: [PATCH 10/11] Try use gcc i --- mk/prefix.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index dd987ea71..94ca6422c 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -384,13 +384,13 @@ endif # BUILD RUST --------------------------------------------------- else -$(PREFIX)/rust-install: | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG) +$(PREFIX)/rust-install: | $(PREFIX)/gcc-install $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG) ifeq ($(PODMAN_BUILD),1) $(PODMAN_RUN) make $@ else @echo "\033[1;36;49mBuilding rust-install\033[0m" rm -rf "$@.partial" "$@" - export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \ + export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/gcc-install/bin:$$PATH" \ $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \ $(REPO_BIN) cook host:llvm21 host:rust cp -r "$(RUST_TARGET)/stage/usr/". "$@.partial" From 9e6089ff75677f19491971829ef328ad9a5cd8db Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 20:43:06 +0700 Subject: [PATCH 11/11] Try only one --- mk/prefix.mk | 2 +- recipes/dev/rust/config-cross-linux.toml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index 94ca6422c..b2e3a40be 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -21,7 +21,7 @@ UPSTREAM_RUSTC_VERSION=2025-11-15 export PREFIX_RUSTFLAGS=-L $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib export RUSTUP_TOOLCHAIN=$(ROOT)/$(PREFIX_INSTALL) export REDOXER_TOOLCHAIN=$(RUSTUP_TOOLCHAIN) -PREFIX_CONFIG=CI=1 COOKBOOK_CLEAN_BUILD=true COOKBOOK_CLEAN_TARGET=false COOKBOOK_VERBOSE=true COOKBOOK_NONSTOP=false +PREFIX_CONFIG=CI=1 COOKBOOK_CLEAN_TARGET=false COOKBOOK_VERBOSE=true COOKBOOK_NONSTOP=false prefix: $(PREFIX)/sysroot diff --git a/recipes/dev/rust/config-cross-linux.toml b/recipes/dev/rust/config-cross-linux.toml index efb2a27aa..c2d4ea1d9 100644 --- a/recipes/dev/rust/config-cross-linux.toml +++ b/recipes/dev/rust/config-cross-linux.toml @@ -5,7 +5,7 @@ link-shared = true [build] host = ["TARGET"] -target = ["TARGET", "x86_64-unknown-linux-relibc", "aarch64-unknown-linux-relibc"] +target = ["TARGET", "COOKBOOK_TARGET"] cargo-native-static = true submodules = false docs = false @@ -21,6 +21,14 @@ sysconfdir = "etc" backtrace = false codegen-tests = false +[target.COOKBOOK_TARGET] +cc = "COOKBOOK_GNU_TARGET-gcc" +cxx = "COOKBOOK_GNU_TARGET-g++" +ar = "COOKBOOK_GNU_TARGET-ar" +linker = "COOKBOOK_GNU_TARGET-gcc" +crt-static = false +llvm-config = "COOKBOOK_SYSROOT/bin/llvm-config" + [target.aarch64-unknown-linux-gnu] llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config"