Merge branch 'master' into 'new-policy'

# Conflicts:
#   CONTRIBUTING.md
This commit is contained in:
Jeremy Soller 2026-03-09 10:13:31 -06:00
commit f0af3d4ef7
1158 changed files with 9998 additions and 3947 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@
.devcontainer/
# Cookbook
/repo
/web
/cookbook.toml
source
source.tmp

View File

@ -7,12 +7,14 @@ stages:
- lint
- test
fmt:
image: "rust:trixie"
stage: lint
workflow:
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
fmt:
image: "rust:trixie"
stage: lint
script:
- rustup component add rustfmt
- cargo fmt -- --check
@ -20,44 +22,26 @@ fmt:
cargo-test:
image: "rust:trixie"
stage: lint
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
script:
# TODO: we should omit fuse from cargo install chains
- apt update && apt install -y fuse3 libfuse3-dev
- cargo test --locked
img:
image: "ubuntu:24.04"
image: "redoxos/redox-base"
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
before_script:
# Disable the wget progress bar
- echo 'show-progress = off' >> ~/.wgetrc
- |
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq &&
apt-get install -qq \
bison \
build-essential \
curl \
flex \
fuse3 \
git \
libfuse-dev \
nasm \
pkg-config \
texinfo \
wget \
help2man \
autoconf \
automake \
zstd
script:
- |
export PATH="$HOME/.cargo/bin:$PATH" &&
bash podman/rustinstall.sh &&
PODMAN_BUILD=0 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
cargo install cbindgen &&
PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
pkg:
image: "rust:trixie"
stage: test
script:
- |
export PATH="$HOME/.cargo/bin:$PATH" PODMAN_BUILD=0 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=x86_64 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=i586 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=aarch64 &&
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=riscv64gc

5
.gitmodules vendored
View File

@ -1,5 +0,0 @@
[submodule "rust"]
path = rust
url = https://gitlab.redox-os.org/redox-os/rust.git
branch = redox-2025-10-03
update = none

View File

@ -30,7 +30,7 @@ This is similar to [Developer Certificate of Origin](https://developercertificat
## AI Policy
We do not accept contributions with code generated by LLMs ([Large Language Models](https://en.wikipedia.org/wiki/Large_language_model)) due to issues of provenance and copyright. Such contributions also place an unreasonable burden on reviewers. You may use code completion at the level provided by `rust-analyzer`.
Redox OS does not accept contributions generated by LLMs ([Large Language Models](https://en.wikipedia.org/wiki/Large_language_model)). This policy is not open to discussion, any content submitted that is clearly labelled as AI-generated (including issues, merge requests, and merge request descriptions) will be immediately closed, and any attempt to bypass this policy will result in a ban from the project. You may use code completion similar to what is provided by `rust-analyzer`.
## Chat
@ -77,6 +77,24 @@ By sending a message in the room, your MR will not be forgotten or accumulate co
You can read the best practices and guidelines on the [Best practices and guidelines](https://doc.redox-os.org/book/best-practices.html) chapter.
## Development Recommendations and Tips
- Read the entire [Build System Reference](https://doc.redox-os.org/book/build-system-reference.html) and [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html) pages
- Make sure your build system is up-to-date, read the [Update The Build System](https://doc.redox-os.org/book/build-system-reference.html#update-the-build-system) section if in doubt.
- If you want to make local changes in recipe sources it's recommended to automatic recipe source update, read [this](https://doc.redox-os.org/book/configuration-settings.html#local-recipe-changes) section to learn how to this for one or multiple recipes and [this](https://doc.redox-os.org/book/configuration-settings.html#cookbook-offline-mode) section for all recipes.
- If you want to make changes to system components, drivers or RedoxFS you need to manually update initfs, read [this](https://doc.redox-os.org/book/coding-and-building.html#how-to-update-initfs) section to learn how to do that.
- If some program can't build or work, something can be missing/hiding on [relibc](https://gitlab.redox-os.org/redox-os/relibc), like a POSIX/Linux function or bug.
- If you have some error on QEMU remember to test different settings or verify your operating system (Pop_OS!, Ubuntu, Debian and Fedora are the recommend Linux distributions to do testing/development for Redox).
- Remember to log all errors, you can use this command as example:
```sh
your-command 2>&1 | tee file-name.log
```
- If you have a problem that seems to not have a solution, think on simple/stupid things. Sometimes you are very confident on your method and forget obvious things (very common).
- If you want a quick review of your Merge Request, make it small.
- If your big Merge Request is taking too long to be reviewed and merged try to split it in small MRs. But make sure it don't break anything, if this method break your changes, don't shrink.
## Style Guidelines
### Rust
@ -109,7 +127,7 @@ Please follow [our process](https://doc.redox-os.org/book/creating-proper-pull-r
## Important Places to Contribute
Before starting to contribute, we recommend reading the [Website FAQ](https://www.redox-os.org/faq/) and the [Redox Book](https://doc.redox-os.org/book/).
Before starting to contribute, we recommend reading the [General FAQ](https://www.redox-os.org/faq/) and the [Redox Book](https://doc.redox-os.org/book/).
You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest-to-hardest order):
@ -118,7 +136,6 @@ You can contribute to the Redox documentation and code on the following reposito
- [Build System Configuration](https://gitlab.redox-os.org/redox-os/redox) - Our main repository
- [Orbital](https://gitlab.redox-os.org/redox-os/orbital) - Display Server and Window Manager
- [pkgutils](https://gitlab.redox-os.org/redox-os/pkgutils) - Package Manager
- [resist](https://gitlab.redox-os.org/redox-os/resist) - Redox System Interface Specifications and Tests (also has POSIX tests)
- [acid](https://gitlab.redox-os.org/redox-os/acid) - Redox Test Suite
- [relibc](https://gitlab.redox-os.org/redox-os/relibc) - Redox C Library
- [libredox](https://gitlab.redox-os.org/redox-os/libredox) - Redox System Library
@ -238,10 +255,6 @@ You can read the [Libraries and APIs](https://doc.redox-os.org/book/libraries-ap
To learn how to configure your VS Code to do Redox development please read the information below the [Visual Studio Code Configuration](https://doc.redox-os.org/book/coding-and-building.html#visual-studio-code-configuration) section.
## Development Tips
You can find important tips on the [Development Tips](https://doc.redox-os.org/book/coding-and-building.html#development-tips) section.
## References
We maintain a list of wikis, articles and videos to learn Rust, OS development and computer science on the [References](https://doc.redox-os.org/book/references.html) page.

239
Cargo.lock generated
View File

@ -36,15 +36,6 @@ dependencies = [
"thiserror 1.0.69",
]
[[package]]
name = "ansi_term"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
dependencies = [
"winapi",
]
[[package]]
name = "anyhow"
version = "1.0.100"
@ -57,35 +48,12 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "arrayvec"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.10.0"
@ -94,31 +62,17 @@ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
[[package]]
name = "blake3"
version = "0.3.8"
version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3"
checksum = "2468ef7d57b3fb7e16b576e8377cdbde2320c60e1491e961d11da40fc4f02a2d"
dependencies = [
"arrayref",
"arrayvec 0.5.2",
"arrayvec",
"cc",
"cfg-if 0.1.10",
"constant_time_eq 0.1.5",
"crypto-mac",
"digest 0.9.0",
"rayon",
]
[[package]]
name = "blake3"
version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210"
dependencies = [
"arrayref",
"arrayvec 0.7.6",
"cc",
"cfg-if 1.0.4",
"constant_time_eq 0.3.1",
"cfg-if",
"constant_time_eq",
"cpufeatures",
"rayon-core",
]
[[package]]
@ -185,12 +139,6 @@ dependencies = [
"shlex",
]
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cfg-if"
version = "1.0.4"
@ -203,7 +151,7 @@ version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
"cipher",
"cpufeatures",
]
@ -219,21 +167,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "clap"
version = "2.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
dependencies = [
"ansi_term",
"atty",
"bitflags 1.3.2",
"strsim 0.8.0",
"textwrap",
"unicode-width 0.1.14",
"vec_map",
]
[[package]]
name = "compact_str"
version = "0.8.1"
@ -241,7 +174,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
dependencies = [
"castaway",
"cfg-if 1.0.4",
"cfg-if",
"itoa",
"rustversion",
"ryu",
@ -250,15 +183,9 @@ dependencies = [
[[package]]
name = "constant_time_eq"
version = "0.1.5"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "constant_time_eq"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
[[package]]
name = "cpufeatures"
@ -275,7 +202,7 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
]
[[package]]
@ -322,23 +249,13 @@ dependencies = [
"typenum",
]
[[package]]
name = "crypto-mac"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
dependencies = [
"generic-array",
"subtle",
]
[[package]]
name = "curve25519-dalek"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"fiat-crypto",
@ -378,7 +295,7 @@ dependencies = [
"ident_case",
"proc-macro2",
"quote",
"strsim 0.11.1",
"strsim",
"syn",
]
@ -393,15 +310,6 @@ dependencies = [
"syn",
]
[[package]]
name = "digest"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
"generic-array",
]
[[package]]
name = "digest"
version = "0.10.7"
@ -439,7 +347,7 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e73e0fee365832cd9b9a53ea62f944cc0d7a4c71f2b9c96a28fc74749517afa"
dependencies = [
"bitflags 2.10.0",
"bitflags",
"chacha20",
"curve25519-dalek",
"generic-array",
@ -471,17 +379,6 @@ version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "filedescriptor"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d"
dependencies = [
"libc",
"thiserror 1.0.69",
"winapi",
]
[[package]]
name = "find-msvc-tools"
version = "0.1.5"
@ -490,9 +387,9 @@ checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844"
[[package]]
name = "flate2"
version = "1.1.5"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb"
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
@ -526,7 +423,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
]
@ -537,7 +434,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
"libc",
"wasi 0.11.1+wasi-snapshot-preview1",
]
@ -578,15 +475,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]]
name = "hex"
version = "0.4.3"
@ -692,7 +580,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"
dependencies = [
"bitflags 2.10.0",
"bitflags",
"libc",
"redox_syscall",
]
@ -712,6 +600,15 @@ dependencies = [
"hashbrown 0.15.5",
]
[[package]]
name = "lzma-rust2"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47bb1e988e6fb779cf720ad431242d3f03167c1b3f2b1aae7f1a94b2495b36ae"
dependencies = [
"sha2",
]
[[package]]
name = "memchr"
version = "2.7.6"
@ -800,13 +697,12 @@ dependencies = [
[[package]]
name = "pkgar"
version = "0.1.19"
source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#e265d32cc0bb149a9574d4500e5409cbb8b662d5"
version = "0.2.1"
source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#b544d6b6612b58524de2ea9d857c5a349f1c99e2"
dependencies = [
"anyhow",
"blake3 0.3.8",
"blake3",
"bytemuck",
"clap",
"lzma-rust2",
"pkgar-core",
"pkgar-keys",
"thiserror 2.0.17",
@ -814,22 +710,20 @@ dependencies = [
[[package]]
name = "pkgar-core"
version = "0.1.19"
source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#e265d32cc0bb149a9574d4500e5409cbb8b662d5"
version = "0.2.1"
source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#b544d6b6612b58524de2ea9d857c5a349f1c99e2"
dependencies = [
"bitflags 1.3.2",
"blake3 0.3.8",
"bitflags",
"blake3",
"bytemuck",
"dryoc",
]
[[package]]
name = "pkgar-keys"
version = "0.1.19"
source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#e265d32cc0bb149a9574d4500e5409cbb8b662d5"
version = "0.2.1"
source = "git+https://gitlab.redox-os.org/redox-os/pkgar.git#b544d6b6612b58524de2ea9d857c5a349f1c99e2"
dependencies = [
"anyhow",
"clap",
"dirs",
"hex",
"lazy_static",
@ -874,7 +768,7 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
dependencies = [
"bitflags 2.10.0",
"bitflags",
"cassowary",
"compact_str",
"indoc",
@ -889,16 +783,6 @@ dependencies = [
"unicode-width 0.2.0",
]
[[package]]
name = "rayon"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.13.0"
@ -911,10 +795,10 @@ dependencies = [
[[package]]
name = "redox-pkg"
version = "0.2.9"
source = "git+https://gitlab.redox-os.org/redox-os/pkgutils.git#cbf88111fab76b8bfd688f144f7cc000408b180e"
version = "0.3.0"
source = "git+https://gitlab.redox-os.org/redox-os/pkgutils.git#80e0196ef0ef940ca2b243d3c10ffecbd37f11cc"
dependencies = [
"anyhow",
"hex",
"ignore",
"serde",
"serde_derive",
@ -928,8 +812,7 @@ version = "0.1.0"
dependencies = [
"ansi-to-tui",
"anyhow",
"blake3 1.5.3",
"filedescriptor",
"blake3",
"globset",
"ignore",
"libc",
@ -969,7 +852,7 @@ version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
"bitflags 2.10.0",
"bitflags",
]
[[package]]
@ -985,11 +868,12 @@ dependencies = [
[[package]]
name = "redoxer"
version = "0.2.61"
source = "git+https://gitlab.redox-os.org/redox-os/redoxer.git#f2541efeae0396907fb6febc06f95e19479609a7"
version = "0.2.62"
source = "git+https://gitlab.redox-os.org/redox-os/redoxer.git#4a68a03d517015b2776284a99609d01d3373fa28"
dependencies = [
"anyhow",
"dirs",
"sha2",
]
[[package]]
@ -1120,9 +1004,9 @@ version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
"cpufeatures",
"digest 0.10.7",
"digest",
]
[[package]]
@ -1164,12 +1048,6 @@ dependencies = [
"vte",
]
[[package]]
name = "strsim"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "strsim"
version = "0.11.1"
@ -1225,15 +1103,6 @@ dependencies = [
"numtoa",
]
[[package]]
name = "textwrap"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
dependencies = [
"unicode-width 0.1.14",
]
[[package]]
name = "thiserror"
version = "1.0.69"
@ -1321,7 +1190,7 @@ version = "1.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if 1.0.4",
"cfg-if",
"static_assertions",
]
@ -1366,12 +1235,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "vec_map"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]]
name = "version_check"
version = "0.9.5"

View File

@ -27,12 +27,11 @@ doctest = false
[features]
#TODO: Actually make without tui feature works
default = ["tui"]
tui = ["ratatui", "ansi-to-tui", "filedescriptor", "strip-ansi-escapes"]
tui = ["ratatui", "ansi-to-tui", "strip-ansi-escapes"]
[dependencies]
anyhow = "1"
# blake3 1.5.4 is incompatible with 0.3 dependency from pkgar
blake3 = "=1.5.3"
blake3 = "1"
globset = "0.4"
libc = "0.2"
ignore = "0.4"
@ -49,7 +48,6 @@ serde = { version = "=1.0.197", features = ["derive"] }
termion = "4"
toml = "0.8"
walkdir = "2.3.1"
filedescriptor = { version = "0.8.3", optional = true }
ansi-to-tui = { version = "7.0.0", optional = true }
strip-ansi-escapes = { version = "0.2.1", optional = true }

View File

@ -1,6 +1,6 @@
# Hardware Compatibility
This document tracks the current hardware compatibility of Redox.
This document tracks the current hardware compatibility of Redox OS.
- [Why are hardware reports needed?](#why-are-hardware-reports-needed)
- [What if my computer is customized?](#what-if-my-computer-is-customized)
@ -25,22 +25,28 @@ These reports helps us to fix the problems above, your report may help to fix ma
## What if my computer is customized?
You can use the "Custom" word on the "Vendor" and "Model" categories, we also recommend to add your `pciutils` log on [this document link](https://gitlab.redox-os.org/redox-os/drivers/-/blob/master/COMMUNITY-HW.md?ref_type=heads) to help us with probable porting.
If your desktop is customized (common) you should use the "Custom" word on the "Vendor" category and insert the motherboard and CPU vendor/model in the "Model" category.
A customized laptop should only be reported if you replaced the original CPU, report the CPU vendor and model in the "Model" category.
We also recommend to add your `pciutils` log on [this](https://gitlab.redox-os.org/redox-os/base/-/blob/main/drivers/COMMUNITY-HW.md) document to help us with probable porting.
## Status
- **Recommended:** The system boots with all features working.
- **Booting:** The system boots with some issues.
- **Broken:** The system can't boot.
- **Recommended:** The operating system boots with video, sound, PS/2 or USB input, Ethernet, terminal and Orbital working.
- **Booting:** The operating system boots with some issues or lacking hardware support (write the issues and what supported hardware is not working in the "Report" section).
- **Broken:** The boot loader don't work or can't bootstrap the operating system.
## General
This section contain limitations to consider.
This section contain limitations that apply to any status.
- ACPI support is incomplete (some things are hardcoded on the kernel)
- Wi-Fi is not supported yet
- GPU drivers aren't supported yet (only VESA and UEFI GOP)
- Automatic operating system discovery on boot loader is not implemented (remember this before installing Redox)
- ACPI support is incomplete (some things are hardcoded on the kernel to work)
- Wi-Fi and Bluetooth aren't supported yet
- AMD, NVIDIA, ARM, and PowerVR GPUs aren't supported yet (only BIOS VESA and UEFI GOP)
- I2C devices aren't supported yet (PS/2 or USB devices should be used)
- USB support varies on each device model because some USB devices require specific drivers (use input devices with standardized controls for more compatibility)
- Automatic operating system discovery is not implemented in the boot loader yet (remember this before installing Redox)
## Contribute to this document

View File

@ -106,6 +106,12 @@ else
bash
endif
setenv: FORCE
@echo export ARCH='$(ARCH)'
@echo export BOARD='$(BOARD)'
@echo export CONFIG_NAME='$(CONFIG_NAME)'
@echo BUILD='$(BUILD)'
export RUST_GDB=gdb-multiarch # Necessary when debugging for another architecture than the host
GDB_KERNEL_FILE=recipes/core/kernel/target/$(TARGET)/build/kernel.sym
gdb: FORCE

View File

@ -0,0 +1 @@
x86_64-unknown-redox-llvm-config

View File

@ -1,23 +1,56 @@
#!/usr/bin/env python3
# This script wraps llvm-config that intended for cross compiling to Redox.
# Because we can't run llvm-config compiled to Redox, we wrap it here.
# Any recipes that calls this script must have "host:llvm.runtime" available.
# Because we can't run llvm-config compiled to Redox, we wrap it here
# and filter out architectures that do not match the current $TARGET.
import os
import sys
import subprocess
LLVM_CONFIG = "/usr/bin/llvm-config"
LLVM_CONFIG = "/bin/llvm-config"
# name of (--targets-built, --components prefix, --libs prefix)
ARCH_MAP = {
"x86_64": ("X86", "x86", "X86"),
"i586": ("X86", "x86", "X86"),
"aarch64": ("AArch64", "aarch64", "AArch64"),
"riscv64gc": ("RISCV", "riscv", "RISCV"),
}
ALL_ARCH_COMPS = ["x86", "aarch64", "riscv"]
ALL_ARCH_LIBS = ["X86", "AArch64", "RISCV"]
def is_unwanted_arch(item, allowed_prefix, all_prefixes, is_lib=False):
matched_arch = None
for arch in all_prefixes:
# libraries e.g., -lLLVMX86CodeGen / libLLVMAArch64Desc.a
if is_lib and f"LLVM{arch}" in item:
matched_arch = arch
break
# components e.g., x86codegen, aarch64desc
elif not is_lib and item.startswith(arch):
matched_arch = arch
break
if matched_arch and matched_arch != allowed_prefix:
return True
return False
def main():
toolchain_path = os.environ.get("COOKBOOK_TOOLCHAIN")
toolchain_path = os.environ.get("COOKBOOK_HOST_SYSROOT")
sysroot_path = os.environ.get("COOKBOOK_SYSROOT")
target_triple = os.environ.get("TARGET")
if not toolchain_path or not sysroot_path:
print(f"Error: COOKBOOK_TOOLCHAIN or COOKBOOK_SYSROOT not set", file=sys.stderr)
if not toolchain_path or not sysroot_path or not target_triple:
print("Error: COOKBOOK_HOST_SYSROOT or COOKBOOK_SYSROOT or TARGET not set", file=sys.stderr)
sys.exit(1)
target_arch = target_triple.split('-')[0] if target_triple else ""
mapped_archs = ARCH_MAP.get(target_arch)
target_built_name, comp_prefix, lib_prefix = mapped_archs
cmd = [toolchain_path + LLVM_CONFIG] + sys.argv[1:]
try:
@ -35,17 +68,36 @@ def main():
if result.returncode != 0:
sys.exit(result.returncode)
output = result.stdout
output = result.stdout.strip()
args_set = set(sys.argv[1:])
if sys.argv[1] in ["--bindir"]:
if "--bindir" in args_set:
output = toolchain_path + "/usr/bin"
else: #if sys.argv[1] in ["--cppflags", "--cxxflags", "--includedir", "--ldflags", "--libdir", "--libfiles"]
elif "--targets-built" in args_set:
output = target_built_name
elif "--components" in args_set:
components = output.split()
filtered = [c for c in components if not is_unwanted_arch(c, comp_prefix, ALL_ARCH_COMPS, is_lib=False)]
output = " ".join(filtered)
elif "--libs" in args_set:
libs = output.split()
filtered = [l for l in libs if not is_unwanted_arch(l, lib_prefix, ALL_ARCH_LIBS, is_lib=True)]
output = " ".join(filtered)
# if "--ldflags" in args_set:
src = toolchain_path.rstrip(os.sep)
dst = sysroot_path.rstrip(os.sep)
output = output.replace(src, dst)
else:
src = toolchain_path.rstrip(os.sep)
dst = sysroot_path.rstrip(os.sep)
output = output.replace(src, dst)
print(output, end='')
print(output + '\n', end='')
if __name__ == "__main__":
main()

View File

@ -1,3 +0,0 @@
# Configuration to run the "acid" tests
include = ["../acid.toml"]

View File

@ -7,10 +7,27 @@ prompt = false
# Package settings
[packages]
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
# Meta-packages below
# auto-test = {}
# dev-essential = {}
# dev-redox = {}
# redox-tests = {}
# x11-minimal = {}
# x11-full = {}
# Normal packages below
acid = {}
acid-bins = {}
base = {}
base-initfs = {}
bash = {}
bash-completion = {}
bootloader = {}
bottom = {}
ca-certificates = {}
@ -30,10 +47,11 @@ extrautils = {}
findutils = {}
freefont = {}
freetype2 = {}
gcc13 = {}
gettext = {}
git = {}
# gdbserver = {} # wrong libc type
# gnu-binutils = {} # bfd doesn't recognize redox
gnu-binutils = {}
gnu-make = {}
hicolor-icon-theme = {}
installer = {}
installer-gui = {}
@ -51,9 +69,7 @@ libstdcxx = {}
libvorbis = {}
libxkbcommon = {}
libxml2 = {}
# mesa = {} # libudev was not found
# mesa-glu = {} # depends on mesa
# mpc = {} # libmpfr not found
llvm21 = {}
nano = {}
nasm = {}
ncurses = {}
@ -62,24 +78,22 @@ netsurf = {}
netutils = {}
nghttp2 = {}
openssl1 = {}
openssl3 = {}
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
orbutils-background = {}
orbutils-launcher = {}
orbutils-orblogin = {}
patch = {}
pcre = {}
patchelf = {}
pop-icon-theme = {}
pcre = {}
pkgutils = {}
pls = {}
pop-icon-theme = {}
redoxfs = {}
relibc = {}
resist = {}
ripgrep = {}
rust = {}
rustpython = {}
# strace = {} # unknown syscall
sdl1 = {}
sed = {}
shared-mime-info = {}
@ -87,6 +101,220 @@ smith = {}
terminfo = {}
userutils = {}
uutils = {}
xz = {}
vim = {}
xz = {}
zlib = {}
zstd = {}
# #"gcc13.cxx" = {}
# #"llvm21.clang" = {}
# #"llvm21.clang-dev" = {}
# #"llvm21.dev" = {}
# #"llvm21.lld" = {}
# #"llvm21.lld-dev" = {}
# #"llvm21.runtime" = {}
# #"python312.dev" = {}
# #"rust.doc" = {}
# #atk = {} # depends on glib which does not build
# #benchmarks = {}
# #binutils-gdb = {}
# #book = {}
# #cairo-demo = {} # linking errors
# #classicube = {}
# #cmake = {}
# #cmatrix = {} # needs ncursesw now
# #cookbook = {}
# #cosmic-reader = {}
# #cosmic-settings = {}
# #cosmic-store = {}
# #devilutionx = {}
# #dynamic-example = {}
# #fal
# #fd = {} # ctrlc-3.1.1
# #file = {}
# #flycast = {}
# #freeciv = {}
# #freeglut = {}
# #friar = {} # mio patch
# #game-2048 = {} # rustc-serialize
# #gawk = {} # langinfo.h
# #gigalomania = {} # old recipe format
# #gitoxide = {}
# #goaccess = {}
# #gstreamer = {} # conflict with thread local errno
# #harfbuzz = {} # depends on glib which does not build
# #helix = {}
# #hello-redox = {}
# #hematite = {} # needs crate patches for redox-unix
# #hf = {}
# #ibm-plex = {}
# #iced = {}
# #jansson = {} # needs config.sub update
# #jq = {}
# #libarchive = {}
# #libatomic = {}
# #libcosmic = {}
# #libflac = {}
# #libmodplug1 = {}
# #libmpfr = {}
# #libnettle = {}
# #libogg = {}
# #libpsl = {}
# #libssh2 = {}
# #libtool = {}
# #liburcu = {}
# #libuv = {}
# #lua-compat-53 = {}
# #luajit = {}
# #luarocks = {}
# #luv = {}
# #mdp = {} # gcc hangs
# #miniserve = {} # actix
# #mpc = {}
# #mupen64plus = {}
# #ncdu = {} # multiple definitions of symbols
# #newlib = {} # obsolete
# #newlibtest = {} # obsolete
# #noto-color-emoji = {}
# #nushell = {} # needs cargo update
# #openjk = {}
# #openposixtestsuite = {}
# #opentyrian = {}
# #orbcalculator = {}
# #ostest-bins = {}
# #pango = {} # undefined references to std::__throw_system_error(int)
# #pastel = {} # needs crate patches for redox-unix
# #pathfinder = {} # servo-fontconfig
# #pciids = {}
# #pcre2 = {}
# #pixman = {} # depends on glib which does not build
# #pkgar = {} # uses virtual Cargo.toml, needs recipe update
# #pls = {}
# #pop-wallpapers = {}
# #powerline = {} # dirs
# #qemu = {} # can be built, but not working
# #quakespasm = {}
# #redox-posix-tests = {}
# #redox-ssh = {} # does not compile
# #retroarch = {} # OS_TLSIndex not declared
# #rust-cairo = {} # linking errors
# #rust-cairo-demo = {} # linking errors
# #rvvm = {}
# #schismtracker = {} # uses system includes
# #sdl-player = {} # wctype_t
# #sdl2-gfx = {}
# #sm64ex = {}
# #spacecadetpinball = {}
# #twin-commander = {}
# #ubuntu-wallpapers = {}
# #unibilium = {}
# #utf8proc = {}
# #vice = {} # linker errors
# #vvvvvv = {} # did not compile
# #webrender = {} # unwind
# #website = {}
# #wesnoth = {}
# #wget = {}
# autoconf = {}
# automake = {}
# binutils = {}
# bzip2 = {}
# cairo = {}
# cleye = {}
# composer = {}
# cpal = {}
# dosbox = {}
# duktape = {}
# eduke32 = {}
# exampled = {}
# expat = {}
# extrautils = {}
# ffmpeg6 = {}
# fontconfig = {}
# freedoom = {}
# freepats = {}
# fribidi = {}
# gdbserver = {} # wrong libc type
# gdk-pixbuf = {}
# gears = {}
# generaluser-gs = {}
# glib = {}
# glutin = {}
# gnu-grep = {}
# htop = {}
# intel-one-mono = {}
# lci = {}
# libavif = {}
# libc-bench = {}
# libedit = {}
# libgmp = {}
# libicu = {}
# libonig = {}
# libsodium = {}
# libuuid = {}
# libwebp = {}
# lsd = {}
# lua54 = {}
# lz4 = {}
# mednafen = {}
# mesa = {} # libudev was not found
# mesa-glu = {} # depends on mesa
# mgba = {}
# mpc = {} # libmpfr not found
# ncursesw = {}
# neverball = {}
# nginx = {}
# onefetch = {}
# openjazz = {}
# openssh = {}
# openttd = {}
# openttd-opengfx = {}
# openttd-openmsx = {}
# openttd-opensfx = {}
# orbclient = {}
# osdemo = {}
# perg = {}
# periodictable = {}
# perl5 = {}
# php84 = {}
# pixelcannon = {}
# pkg-config = {}
# prboom = {}
# procedural-wallpapers-rs = {}
# python312 = {}
# readline = {}
# redox-fatfs = {}
# redox-games = {}
# relibc-tests = {}
# relibc-tests-bins = {}
# rodioplay = {}
# rs-nes = {}
# rsync = {}
# rust64 = {}
# rustual-boy = {}
# scummvm = {}
# sdl-gfx = {}
# sdl1-image = {}
# sdl1-mixer = {}
# sdl1-ttf = {}
# sdl2 = {}
# sdl2-gears = {}
# sdl2-image = {}
# sdl2-mixer = {}
# sdl2-ttf = {}
# servo = {}
# shellharden = {}
# shellstorm = {}
# simple-http-server = {}
# sodium = {}
# sopwith = {}
# sqlite3 = {}
# strace = {} # unknown syscall
# syobonaction = {}
# timidity = {}
# tokei = {}
# ttf-hack = {}
# vttest = {}
# webkitgtk3 = {}
# winit = {}
# xxhash = {}
# zoxide = {} # untested

View File

@ -1,3 +1,3 @@
# Configuration for demonstration
include = ["desktop.toml"]
include = ["../desktop.toml"]

View File

@ -1,14 +0,0 @@
# Minimal desktop configuration
include = ["../desktop-minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Default build system configuration
include = ["../desktop.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal network configuration
include = ["../minimal-net.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal configuration
include = ["../minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -0,0 +1,8 @@
# Configuration used for building redoxer base image
include = ["../redoxer.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024

View File

@ -1,3 +0,0 @@
# Configuration to run the "resist" tests
include = ["../resist.toml"]

View File

@ -1,14 +0,0 @@
# Server configuration
include = ["../server.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Configuration for testing
include = ["../tests.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 10000
# Package settings
[packages]
# example = {}

View File

@ -1,11 +1,11 @@
# Configuration to run the "acid" tests
# Configuration for "acid" testing
include = ["base.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 256
filesystem_size = 1024
# Package settings
[packages]
@ -16,11 +16,16 @@ ion = {}
[[files]]
path = "/usr/lib/init.d/10_acid"
data = """
export RUST_BACKTRACE full
acid
acid create_test
acid switch
acid tls
acid thread
requires_weak 00_drivers
ion /usr/lib/run_acid.ion
"""
[[files]]
path = "/usr/lib/run_acid.ion"
data = """
#!/usr/bin/env ion
export RUST_BACKTRACE=full
cd /home/user/acid
cargo test
shutdown
"""

32
config/auto-test.toml Normal file
View File

@ -0,0 +1,32 @@
# Configuration for automated testing of essential test suites
# Smaller test suites are executed first to catch possible bugs or regressions faster
include = ["base.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024
# Package settings
[packages]
auto-test = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net
ion /usr/lib/run_tests.ion
"""
[[files]]
path = "/usr/lib/run_tests.ion"
data = """
#!/usr/bin/env ion
export RUST_BACKTRACE=full
cd /home/user/acid
cargo test
bash /root/relibc-tests/run.sh
os-test-runner
shutdown
"""

View File

@ -15,6 +15,8 @@ bootloader = {}
kernel = {}
libgcc = {}
libstdcxx = {}
netdb = {}
netutils = {}
relibc = {}
userutils = {}
uutils = {}
@ -27,21 +29,100 @@ data = """
rm -rf /tmp
mkdir -m a=rwxt /tmp
ipcd
ptyd
notify ipcd
notify ptyd
nowait sudo --daemon
"""
[[files]]
path = "/usr/lib/init.d/00_drivers"
data = """
pcid-spawner /etc/pcid.d/
requires_weak 00_base
pcid-spawner
"""
## Network init
[[files]]
path = "/usr/lib/init.d/10_net"
data = """
requires_weak 00_drivers
notify smolnetd
nowait dhcpd
"""
[[files]]
path = "/etc/login_schemes.toml"
data = """
[user_schemes.root]
schemes = ["*"]
[user_schemes.user]
schemes = [
# Kernel schemes
"debug",
"event",
"memory",
"pipe",
"serio",
"irq",
"time",
"sys",
# Base schemes
"rand",
"null",
"zero",
"log",
# Network schemes
"ip",
"icmp",
"tcp",
"udp",
# IPC schemes
"shm",
"chan",
"uds_stream",
"uds_dgram",
# File schemes
"file",
# Display schemes
"display.vesa",
"display*",
# Other schemes
"pty",
"sudo",
"audio",
"orbital",
]
"""
[[files]]
path = "/etc/hostname"
data = "redox"
## Default net configuration (optimized for QEMU)
[[files]]
path = "/etc/net/dns"
data = """
9.9.9.9
"""
[[files]]
path = "/etc/net/ip"
data = """
10.0.2.15
"""
[[files]]
path = "/etc/net/ip_router"
data = """
10.0.2.2
"""
[[files]]
path = "/etc/net/ip_subnet"
data = """
255.255.255.0
"""
# https://www.freedesktop.org/software/systemd/man/latest/os-release.html
[[files]]
path = "/usr/lib/os-release"
@ -124,10 +205,21 @@ path = "/share"
data = "usr/share"
symlink = true
[[files]]
path = "/ui"
data = "usr/share/ui"
symlink = true
## legacy orbital font directory
[[files]]
path = "/usr/share/fonts"
data = "../../ui/fonts"
path = "/usr/share/ui/fonts"
data = "/usr/share/fonts"
symlink = true
## legacy orbital icon directory
[[files]]
path = "/usr/share/ui/icons"
data = "/usr/share/icons"
symlink = true
## /var
@ -219,8 +311,6 @@ symlink = true
password = "password"
uid = 0
gid = 0
name = "root"
home = "/root"
shell = "/usr/bin/ion"
[users.user]

View File

@ -1,6 +1,6 @@
# Minimal desktop configuration
include = ["minimal-net.toml"]
include = ["minimal.toml"]
# General settings
[general]
@ -12,22 +12,21 @@ filesystem_size = 256
orbdata = {}
orbital = {}
orbterm = {}
orbutils-background = {}
orbutils-launcher = {}
orbutils-orblogin = {}
orbutils = {}
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
export VT 3
nowait orbital orblogin launcher
unset VT
requires_weak 10_net
notify audiod
nowait VT=3 orbital orblogin launcher
"""
# Override console config to not switch to VT 2
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 20_orbital
nowait getty 2
nowait getty /scheme/debug/no-preserve -J
"""

View File

@ -1,6 +1,6 @@
# Default build system configuration
include = ["server.toml"]
include = ["desktop-minimal.toml", "server.toml"]
# General settings
[general]
@ -18,29 +18,9 @@ freefont = {}
hicolor-icon-theme = {}
installer-gui = {}
netsurf = {}
orbdata = {}
orbital = {}
orbutils = {}
patchelf = {}
pop-icon-theme = {}
rustpython = {}
shared-mime-info = {}
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export BROWSER /bin/netsurf-fb
export VT 3
nowait orbital orblogin launcher
unset BROWSER
unset VT
"""
# Override console config to not switch to VT 2
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
nowait getty 2
nowait getty /scheme/debug/no-preserve -J
"""
# orbterm from desktop-minimal should be ignored
orbterm = "ignore"

View File

@ -1,3 +0,0 @@
# Configuration to run the "acid" tests
include = ["../acid.toml"]

View File

@ -7,10 +7,27 @@ prompt = false
# Package settings
[packages]
acid = {}
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
# Meta-packages below
# auto-test = {}
# dev-essential = {}
# dev-redox = {}
# redox-tests = {}
# x11-minimal = {}
# x11-full = {}
# Normal packages below
# acid = {} # rust require dynamic linking
acid-bins = {}
base = {}
base-initfs = {}
bash = {}
bash-completion = {}
bootloader = {}
bottom = {}
ca-certificates = {}
@ -32,6 +49,7 @@ freefont = {}
freetype2 = {}
gettext = {}
git = {}
gnu-make = {}
hicolor-icon-theme = {}
installer = {}
installer-gui = {}
@ -61,9 +79,6 @@ orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
orbutils-background = {}
orbutils-launcher = {}
orbutils-orblogin = {}
patch = {}
pcre = {}
patchelf = {}
@ -71,7 +86,6 @@ pop-icon-theme = {}
pkgutils = {}
redoxfs = {}
relibc = {}
resist = {}
ripgrep = {}
rustpython = {}
sdl1 = {}
@ -84,3 +98,220 @@ uutils = {}
xz = {}
#vim = {} # conflicting types
zlib = {}
# #"gcc13.cxx" = {}
# #"llvm21.clang" = {}
# #"llvm21.clang-dev" = {}
# #"llvm21.dev" = {}
# #"llvm21.lld" = {}
# #"llvm21.lld-dev" = {}
# #"llvm21.runtime" = {}
# #"python312.dev" = {}
# #"rust.doc" = {}
# #atk = {} # depends on glib which does not build
# #benchmarks = {}
# #binutils-gdb = {}
# #book = {}
# #cairo-demo = {} # linking errors
# #classicube = {}
# #cmake = {}
# #cmatrix = {} # needs ncursesw now
# #cookbook = {}
# #cosmic-reader = {}
# #cosmic-settings = {}
# #cosmic-store = {}
# #devilutionx = {}
# #dynamic-example = {}
# #fal
# #fd = {} # ctrlc-3.1.1
# #file = {}
# #flycast = {}
# #freeciv = {}
# #freeglut = {}
# #friar = {} # mio patch
# #game-2048 = {} # rustc-serialize
# #gawk = {} # langinfo.h
# #gigalomania = {} # old recipe format
# #gitoxide = {}
# #goaccess = {}
# #gstreamer = {} # conflict with thread local errno
# #harfbuzz = {} # depends on glib which does not build
# #helix = {}
# #hello-redox = {}
# #hematite = {} # needs crate patches for redox-unix
# #hf = {}
# #ibm-plex = {}
# #iced = {}
# #jansson = {} # needs config.sub update
# #jq = {}
# #libarchive = {}
# #libatomic = {}
# #libcosmic = {}
# #libflac = {}
# #libmodplug1 = {}
# #libmpfr = {}
# #libnettle = {}
# #libogg = {}
# #libpsl = {}
# #libssh2 = {}
# #libtool = {}
# #liburcu = {}
# #libuv = {}
# #lua-compat-53 = {}
# #luajit = {}
# #luarocks = {}
# #luv = {}
# #mdp = {} # gcc hangs
# #miniserve = {} # actix
# #mpc = {}
# #mupen64plus = {}
# #ncdu = {} # multiple definitions of symbols
# #newlib = {} # obsolete
# #newlibtest = {} # obsolete
# #noto-color-emoji = {}
# #nushell = {} # needs cargo update
# #openjk = {}
# #openposixtestsuite = {}
# #opentyrian = {}
# #orbcalculator = {}
# #ostest-bins = {}
# #pango = {} # undefined references to std::__throw_system_error(int)
# #pastel = {} # needs crate patches for redox-unix
# #pathfinder = {} # servo-fontconfig
# #pciids = {}
# #pcre2 = {}
# #pixman = {} # depends on glib which does not build
# #pkgar = {} # uses virtual Cargo.toml, needs recipe update
# #pls = {}
# #pop-wallpapers = {}
# #powerline = {} # dirs
# #qemu = {} # can be built, but not working
# #quakespasm = {}
# #redox-posix-tests = {}
# #redox-ssh = {} # does not compile
# #retroarch = {} # OS_TLSIndex not declared
# #rust-cairo = {} # linking errors
# #rust-cairo-demo = {} # linking errors
# #rvvm = {}
# #schismtracker = {} # uses system includes
# #sdl-player = {} # wctype_t
# #sdl2-gfx = {}
# #sm64ex = {}
# #spacecadetpinball = {}
# #twin-commander = {}
# #ubuntu-wallpapers = {}
# #unibilium = {}
# #utf8proc = {}
# #vice = {} # linker errors
# #vvvvvv = {} # did not compile
# #webrender = {} # unwind
# #website = {}
# #wesnoth = {}
# #wget = {}
# autoconf = {}
# automake = {}
# binutils = {}
# bzip2 = {}
# cairo = {}
# cleye = {}
# composer = {}
# cpal = {}
# dosbox = {}
# duktape = {}
# eduke32 = {}
# exampled = {}
# ffmpeg6 = {}
# fontconfig = {}
# freedoom = {}
# freepats = {}
# fribidi = {}
# gcc13 = {}
# gdbserver = {}
# gdk-pixbuf = {}
# gears = {}
# generaluser-gs = {}
# glib = {}
# glutin = {}
# gnu-binutils = {}
# gnu-grep = {}
# htop = {}
# intel-one-mono = {}
# lci = {}
# libavif = {}
# libc-bench = {}
# libedit = {}
# libgmp = {}
# libicu = {}
# libonig = {}
# libsodium = {}
# libuuid = {}
# libwebp = {}
# llvm21 = {}
# lsd = {}
# lua54 = {}
# lz4 = {}
# mednafen = {}
# mesa = {}
# mesa-glu = {}
# mgba = {}
# ncursesw = {}
# neverball = {}
# nginx = {}
# onefetch = {}
# openjazz = {}
# openssh = {}
# openssl3 = {}
# openttd = {}
# openttd-opengfx = {}
# openttd-openmsx = {}
# openttd-opensfx = {}
# orbclient = {}
# osdemo = {}
# perg = {}
# periodictable = {}
# perl5 = {}
# php84 = {}
# pixelcannon = {}
# pkg-config = {}
# prboom = {}
# procedural-wallpapers-rs = {}
# python312 = {}
# readline = {}
# redox-fatfs = {}
# redox-games = {}
# relibc-tests = {}
# relibc-tests-bins = {}
# rodioplay = {}
# rs-nes = {}
# rsync = {}
# rust = {}
# rust64 = {}
# rustual-boy = {}
# scummvm = {}
# sdl-gfx = {}
# sdl1-image = {}
# sdl1-mixer = {}
# sdl1-ttf = {}
# sdl2 = {}
# sdl2-gears = {}
# sdl2-image = {}
# sdl2-mixer = {}
# sdl2-ttf = {}
# servo = {}
# shellharden = {}
# shellstorm = {}
# simple-http-server = {}
# sodium = {}
# sopwith = {}
# sqlite3 = {}
# strace = {}
# syobonaction = {}
# timidity = {}
# tokei = {}
# ttf-hack = {}
# vttest = {}
# webkitgtk3 = {}
# winit = {}
# xxhash = {}
# zoxide = {} # untested
# zstd = {}

View File

@ -1,14 +0,0 @@
# Minimal desktop configuration
include = ["../desktop-minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Default build system configuration
include = ["../desktop.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal network configuration
include = ["../minimal-net.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal configuration
include = ["../minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

8
config/i586/redoxer.toml Normal file
View File

@ -0,0 +1,8 @@
# Configuration used for building redoxer base image
include = ["../redoxer.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024

View File

@ -1,3 +0,0 @@
# Configuration to use the "resist" tests
include = ["../resist.toml"]

View File

@ -1,14 +0,0 @@
# Server configuration
include = ["../server.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Configuration for testing
include = ["../tests.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 10000
# Package settings
[packages]
# example = {}

View File

@ -1,29 +0,0 @@
# # Configuration to create "llvm-config" script
include = ["base.toml"]
[general]
filesystem_size = 2048
[packages]
bash = {}
llvm20 = {}
[[files]]
path = "/usr/lib/init.d/99_gen_llvm-config-generate"
data = """
bash /usr/bin/llvm-config-generate
"""
[[files]]
path = "/usr/bin/llvm-config-generate"
data = """
for flag in --version --bindir --cppflags --cxxflags --includedir --ldflags --libdir --system-libs --targets-built --has-rtti --shared-mode
do
echo -e "'$flag': '$(llvm-config $flag)',"
done
for component in $(llvm-config --components)
do
echo -e "'$component': '$(llvm-config --libs $component)',"
done
"""

View File

@ -1,28 +0,0 @@
# Minimal network configuration
include = ["net.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 256
# Package settings
[packages]
ca-certificates = {}
coreutils = {}
extrautils = {}
findutils = {}
ion = {}
netdb = {}
pkgutils = {}
kibi = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
inputd -A 2
nowait getty 2
nowait getty /scheme/debug -J
"""

View File

@ -9,14 +9,17 @@ filesystem_size = 196
# Package settings
[packages]
ca-certificates = {}
coreutils = {}
extrautils = {}
ion = {}
pkgutils = {}
kibi = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net
inputd -A 2
nowait getty 2
nowait getty /scheme/debug/no-preserve -J

View File

@ -1,42 +0,0 @@
# Network configuration: includes the base configuration and adds files required
# for networking
include = ["base.toml"]
# Package settings
[packages]
netdb = {}
netutils = {}
## Network init
[[files]]
path = "/usr/lib/init.d/10_net"
data = """
smolnetd
nowait dhcpd
"""
## Default net configuration (optimized for QEMU)
[[files]]
path = "/etc/net/dns"
data = """
9.9.9.9
"""
[[files]]
path = "/etc/net/ip"
data = """
10.0.2.15
"""
[[files]]
path = "/etc/net/ip_router"
data = """
10.0.2.2
"""
[[files]]
path = "/etc/net/ip_subnet"
data = """
255.255.255.0
"""

22
config/os-test.toml Normal file
View File

@ -0,0 +1,22 @@
# Configuration for "os-test" testing
include = ["server.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024
# Do not prompt if settings are not defined
prompt = false
# Package settings
[packages]
os-test-bins = {} # Provides source and cross-compiled binaries
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net
RUST_BACKTRACE=full os-test-runner
shutdown
"""

View File

@ -11,9 +11,8 @@ orbital = {}
[[files]]
path = "/usr/lib/init.d/30_redoxer"
data = """
requires_weak 10_net
echo
echo ## running redoxer in orbital ##
export VT 3
nowait orbital redoxerd
unset VT
echo "## running redoxer in orbital ##"
nowait VT=3 orbital redoxerd
"""

View File

@ -1,6 +1,6 @@
# Configuration for the Redoxer image
include = ["net.toml"]
include = ["base.toml"]
# Package settings
[packages]
@ -9,38 +9,43 @@ ca-certificates = {}
coreutils = {}
extrautils = {}
findutils = {}
gnu-make = {}
ion = {}
netdb = {}
pkgutils = {}
relibc = {}
sed = {}
# Override to not background dhcpd
[[files]]
path = "/usr/lib/init.d/10_net"
data = """
smolnetd
requires_weak 00_drivers
notify smolnetd
dhcpd
"""
[[files]]
path = "/usr/lib/init.d/20_env"
data = """
echo
echo ## preparing environment ##
export GROUPS 0
export HOME /root
export HOST redox
export SHELL /bin/sh
export UID 0
export USER root
cd /root
env
"""
[[files]]
path = "/usr/lib/init.d/30_redoxer"
data = """
requires_weak 10_net
ion /usr/lib/run_redoxer.ion
"""
[[files]]
path = "/usr/lib/run_redoxer.ion"
data = """
#!/usr/bin/env ion
echo
echo ## running redoxer ##
echo "## preparing environment ##"
export GROUPS=0
export HOME=/root
export HOST=redox
export SHELL=/bin/sh
export UID=0
export USER=root
cd /root
env
echo
echo "## running redoxer ##"
redoxerd
"""

View File

@ -1,39 +0,0 @@
# Configuration to run the "resist" tests
include = ["net.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 256
# Package settings
[packages]
bash = {}
coreutils = {}
diffutils = {}
extrautils = {}
findutils = {}
gcc13 = {}
gnu-binutils = {}
gnu-make = {}
netdb = {}
resist = {}
# Override to not background dhcpd
[[files]]
path = "/usr/lib/init.d/10_net"
data = """
smolnetd
dhcpd
"""
[[files]]
path = "/usr/lib/init.d/20_resist"
data = """
export RUST_BACKTRACE full
resist /share/resist/redox/spec.toml
resist /share/resist/posix/base.toml
resist /share/resist/posix/shell.toml
shutdown
"""

View File

@ -7,10 +7,27 @@ prompt = false
# Package settings
[packages]
acid = {}
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
# Meta-packages below
# auto-test = {}
# dev-essential = {}
# dev-redox = {}
# redox-tests = {}
# x11-minimal = {}
# x11-full = {}
# Normal packages below
# acid = {} # rust require dynamic linking
acid-bins = {}
base = {}
base-initfs = {}
bash = {}
bash-completion = {}
bootloader = {}
bottom = {}
ca-certificates = {}
@ -32,6 +49,7 @@ freefont = {}
freetype2 = {}
gettext = {}
git = {}
gnu-make = {}
hicolor-icon-theme = {}
installer = {}
#installer-gui = {} # redox_syscall 0.4 not working on riscv64gc?
@ -61,9 +79,6 @@ orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
orbutils-background = {}
orbutils-launcher = {}
orbutils-orblogin = {}
#patch = {} error configure machine `riscv64gc-unknown' not recognized
pcre = {}
patchelf = {}
@ -71,7 +86,6 @@ pop-icon-theme = {}
pkgutils = {}
redoxfs = {}
relibc = {}
#resist = {} # Uses redox_syscall 0.2 which does not compile on riscv64gc
ripgrep = {}
rustpython = {}
#sdl1 = {} # not tested yet, netsurf is commented out
@ -84,3 +98,221 @@ uutils = {}
xz = {}
#vim = {} # error compiling ncurses
zlib = {}
# #"gcc13.cxx" = {}
# #"llvm21.clang" = {}
# #"llvm21.clang-dev" = {}
# #"llvm21.dev" = {}
# #"llvm21.lld" = {}
# #"llvm21.lld-dev" = {}
# #"llvm21.runtime" = {}
# #"python312.dev" = {}
# #"rust.doc" = {}
# #atk = {} # depends on glib which does not build
# #benchmarks = {}
# #binutils-gdb = {}
# #book = {}
# #cairo-demo = {} # linking errors
# #classicube = {}
# #cmake = {}
# #cmatrix = {} # needs ncursesw now
# #cookbook = {}
# #cosmic-reader = {}
# #cosmic-settings = {}
# #cosmic-store = {}
# #devilutionx = {}
# #dynamic-example = {}
# #fal
# #fd = {} # ctrlc-3.1.1
# #file = {}
# #flycast = {}
# #freeciv = {}
# #freeglut = {}
# #friar = {} # mio patch
# #game-2048 = {} # rustc-serialize
# #gawk = {} # langinfo.h
# #gigalomania = {} # old recipe format
# #gitoxide = {}
# #goaccess = {}
# #gstreamer = {} # conflict with thread local errno
# #harfbuzz = {} # depends on glib which does not build
# #helix = {}
# #hello-redox = {}
# #hematite = {} # needs crate patches for redox-unix
# #hf = {}
# #ibm-plex = {}
# #iced = {}
# #jansson = {} # needs config.sub update
# #jq = {}
# #libarchive = {}
# #libatomic = {}
# #libcosmic = {}
# #libflac = {}
# #libmodplug1 = {}
# #libmpfr = {}
# #libnettle = {}
# #libogg = {}
# #libpsl = {}
# #libssh2 = {}
# #libtool = {}
# #liburcu = {}
# #libuv = {}
# #lua-compat-53 = {}
# #luajit = {}
# #luarocks = {}
# #luv = {}
# #mdp = {} # gcc hangs
# #miniserve = {} # actix
# #mpc = {}
# #mupen64plus = {}
# #ncdu = {} # multiple definitions of symbols
# #newlib = {} # obsolete
# #newlibtest = {} # obsolete
# #noto-color-emoji = {}
# #nushell = {} # needs cargo update
# #openjk = {}
# #openposixtestsuite = {}
# #opentyrian = {}
# #orbcalculator = {}
# #ostest-bins = {}
# #pango = {} # undefined references to std::__throw_system_error(int)
# #pastel = {} # needs crate patches for redox-unix
# #pathfinder = {} # servo-fontconfig
# #pciids = {}
# #pcre2 = {}
# #pixman = {} # depends on glib which does not build
# #pkgar = {} # uses virtual Cargo.toml, needs recipe update
# #pls = {}
# #pop-wallpapers = {}
# #powerline = {} # dirs
# #qemu = {} # can be built, but not working
# #quakespasm = {}
# #redox-posix-tests = {}
# #redox-ssh = {} # does not compile
# #retroarch = {} # OS_TLSIndex not declared
# #rust-cairo = {} # linking errors
# #rust-cairo-demo = {} # linking errors
# #rvvm = {}
# #schismtracker = {} # uses system includes
# #sdl-player = {} # wctype_t
# #sdl2-gfx = {}
# #sm64ex = {}
# #spacecadetpinball = {}
# #twin-commander = {}
# #ubuntu-wallpapers = {}
# #unibilium = {}
# #utf8proc = {}
# #vice = {} # linker errors
# #vvvvvv = {} # did not compile
# #webrender = {} # unwind
# #website = {}
# #wesnoth = {}
# #wget = {}
# autoconf = {}
# automake = {}
# binutils = {}
# bzip2 = {}
# cairo = {}
# cleye = {}
# composer = {}
# cosmic-text = {}
# cpal = {}
# dosbox = {}
# duktape = {}
# eduke32 = {}
# exampled = {}
# ffmpeg6 = {}
# fontconfig = {}
# freedoom = {}
# freepats = {}
# fribidi = {}
# gcc13 = {}
# gdbserver = {}
# gdk-pixbuf = {}
# gears = {}
# generaluser-gs = {}
# glib = {}
# glutin = {}
# gnu-binutils = {}
# gnu-grep = {}
# htop = {}
# intel-one-mono = {}
# lci = {}
# libavif = {}
# libc-bench = {}
# libedit = {}
# libgmp = {}
# libicu = {}
# libonig = {}
# libsodium = {}
# libuuid = {}
# libwebp = {}
# llvm21 = {}
# lsd = {}
# lua54 = {}
# lz4 = {}
# mednafen = {}
# mesa = {}
# mesa-glu = {}
# mgba = {}
# ncursesw = {}
# neverball = {}
# nginx = {}
# onefetch = {}
# openjazz = {}
# openssh = {}
# openssl3 = {}
# openttd = {}
# openttd-opengfx = {}
# openttd-openmsx = {}
# openttd-opensfx = {}
# orbclient = {}
# osdemo = {}
# perg = {}
# periodictable = {}
# perl5 = {}
# php84 = {}
# pixelcannon = {}
# pkg-config = {}
# prboom = {}
# procedural-wallpapers-rs = {}
# python312 = {}
# readline = {}
# redox-fatfs = {}
# redox-games = {}
# relibc-tests = {}
# relibc-tests-bins = {}
# rodioplay = {}
# rs-nes = {}
# rsync = {}
# rust = {}
# rust64 = {}
# rustual-boy = {}
# scummvm = {}
# sdl-gfx = {}
# sdl1-image = {}
# sdl1-mixer = {}
# sdl1-ttf = {}
# sdl2 = {}
# sdl2-gears = {}
# sdl2-image = {}
# sdl2-mixer = {}
# sdl2-ttf = {}
# servo = {}
# shellharden = {}
# shellstorm = {}
# simple-http-server = {}
# sodium = {}
# sopwith = {}
# sqlite3 = {}
# strace = {}
# syobonaction = {}
# timidity = {}
# tokei = {}
# ttf-hack = {}
# vttest = {}
# webkitgtk3 = {}
# winit = {}
# xxhash = {}
# zoxide = {} # untested
# zstd = {}

View File

@ -1,14 +0,0 @@
# Minimal desktop configuration
include = ["../desktop-minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal network configuration
include = ["../minimal-net.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal configuration
include = ["../minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Server configuration
include = ["../server.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Configuration for testing
include = ["../tests.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 10000
# Package settings
[packages]
# example = {}

View File

@ -1,6 +1,6 @@
# Server configuration
include = ["net.toml"]
include = ["minimal.toml"]
# General settings
[general]
@ -11,24 +11,11 @@ filesystem_size = 512
[packages]
bash = {}
bottom = {}
ca-certificates = {}
#contain = {} # needs to update dependencies
coreutils = {}
curl = {}
diffutils = {}
extrautils = {}
findutils = {}
git = {}
installer = {}
ion = {}
kibi = {}
pkgutils = {}
redoxfs = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
inputd -A 2
nowait getty 2
nowait getty /scheme/debug/no-preserve -J
"""

View File

@ -11,12 +11,5 @@ prompt = false
# Package settings
[packages]
acid = {}
resist = {}
relibc-tests = {}
os-test = {}
openposixtestsuite = {}
redox-posix-tests = {}
vttest = {}
redox-tests = {}
benchmarks = {}
hello-redox = {}

View File

@ -1,4 +1,4 @@
# X11 configuration
# Wayland configuration
include = ["desktop.toml"]
@ -13,35 +13,28 @@ filesystem_size = 2048
[packages]
adwaita-icon-theme = {}
bash = {}
cosmic-app-library = {}
cosmic-comp = {}
gtk3 = {}
libcosmic-wayland = {}
libxcursor = {}
iced-wayland = {}
mesa = {}
"pop-icon-theme.cursors" = {}
smallvil = {}
softbuffer-wayland = {}
wayland-rs = {}
webkitgtk3 = {}
#webkitgtk3 = {}
winit-wayland = {}
xkeyboard-config = {}
[[files]]
path = "/usr/lib/init.d/10_wayland_env"
data = """
export XDG_RUNTIME_DIR /tmp/run/user/0
mkdir -p $XDG_RUNTIME_DIR
export WAYLAND_DISPLAY wayland-1
glib-compile-schemas /usr/share/glib-2.0/schemas/
"""
# Overridden to launch smallvil instead of orblogin
# Overridden to launch wayland compositor instead of orblogin
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export BROWSER /bin/netsurf-fb
export VT 3
nowait orbital orbital-wayland
unset BROWSER
unset VT
requires_weak 10_net
notify audiod
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-wayland
"""
[[files]]
@ -50,20 +43,60 @@ mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
# Prepare environment
unset DISPLAY
export COSMIC_BACKEND=winit
export HOME=/root
export LD_DEBUG=all
export RUST_BACKTRACE=full
export RUST_LOG=debug
smallvil_smallvil &
sleep 2
env G_MAIN_POLL_DEBUG=1 G_MESSAGES_DEBUG=all LD_DEBUG=all WEBKIT_DEBUG=all MiniBrowser&
#softbuffer-wayland_animation &
#wayland-rs_simple_window &
#winit-wayland_window &
export XCURSOR_THEME=Pop
export XDG_RUNTIME_DIR=/tmp/run/user/0
# Create XDG runtime directory
#TODO: mkdir -p not working
mkdir -p /tmp/run
mkdir -p /tmp/run/user
mkdir -p /tmp/run/user/0
# Compile glib schemas
glib-compile-schemas /usr/share/glib-2.0/schemas/
# For cosmic-comp (more features)
cosmic-comp wayland-session
# For smallvil (easier to debug)
#export WAYLAND_DISPLAY=wayland-1
#smallvil &
#sleep 2
#wayland-session
"""
[[files]]
path = "/usr/bin/wayland-session"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
#env G_MAIN_POLL_DEBUG=1 G_MESSAGES_DEBUG=all LD_DEBUG=all WEBKIT_DEBUG=all MiniBrowser&
printenv
#wayland-rs_simple_window
#winit-wayland_window
#softbuffer-wayland_animation
#iced-wayland_sctk_lazy
libcosmic-wayland_application
#gtk3-widget-factory
#cosmic-app-library run
"""
[[files]]
path = "/etc/gtk-3.0/settings.ini"
data = """
[Settings]
gtk-cursor-theme-name = "Adwaita"
gtk-icon-theme-name = "Adwaita"
gtk-cursor-theme-name = "Pop"
gtk-icon-theme-name = "Cosmic"
"""

View File

@ -12,47 +12,42 @@ filesystem_size = 2048
# Package settings
[packages]
adwaita-icon-theme = {}
caja = {}
dbus = {}
gtk3 = {}
marco = {}
mate-control-center = {}
mate-icon-theme = {}
mate-panel = {}
mate-session-manager = {}
mate-settings-daemon = {}
mate-terminal = {}
mate-common = {}
mesa-demos-x11 = {}
webkitgtk3 = {}
xev = {}
xeyes = {}
#webkitgtk3 = {} # not compiling
#xfce4-panel = {}
#xfwm4 = {}
xinit = {}
xkbcomp = {}
xkbutils = {}
xkeyboard-config = {}
xserver-xorg = {}
xserver-xorg-video-orbital = {}
xterm = {}
x11-full = {}
zenity = {}
[[files]]
path = "/usr/lib/init.d/10_dbus"
data = """
requires_weak 10_net
bash /usr/bin/start-dbus.sh
"""
[[files]]
path = "/usr/bin/start-dbus.sh"
mode = 0o755
data = """
#!/usr/bin/env bash
export DBUS_DEBUG_OUTPUT=1
#export DBUS_VERBOSE=1
#export G_DBUS_DEBUG=all
mkdir -p /var/lib/dbus
dbus-uuidgen --ensure
mkdir -p /run/dbus
rm -f /run/dbus/pid
dbus-daemon --system
"""
[[files]]
path = "/usr/lib/init.d/10_xenv"
data = """
export DISPLAY :0
requires_weak 10_net
glib-compile-schemas /usr/share/glib-2.0/schemas/
"""
@ -60,12 +55,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export BROWSER /bin/netsurf-fb
export VT 3
nowait orbital orbital-x11
unset BROWSER
unset VT
requires_weak 10_dbus 10_xenv
notify audiod
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-x11
"""
[[files]]
@ -76,6 +68,10 @@ data = """
set -ex
# for ice authority and pixbuf
export HOME=/home/root
export XDG_DATA_DIRS=/usr/share
# Generate config file
WIDTH="$((0x$(grep FRAMEBUFFER_WIDTH /scheme/sys/env | cut -d '=' -f 2)))"
HEIGHT="$((0x$(grep FRAMEBUFFER_HEIGHT /scheme/sys/env | cut -d '=' -f 2)))"
@ -123,9 +119,22 @@ set -ex
xterm&
sleep 1
gdk-pixbuf-query-loaders --update-cache
mate-session&
"""
# Override console config to set DISPLAY=:0
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 20_orbital
nowait DISPLAY=:0 getty 2
nowait DISPLAY=:0 getty /scheme/debug/no-preserve -J
"""
[[files]]
path = "/usr/bin/browser"
mode = 0o755

View File

@ -1,3 +0,0 @@
# Configuration to use the "acid" tests
include = ["../acid.toml"]

View File

@ -8,10 +8,16 @@ prompt = false
# Package settings
[packages]
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
# Meta-packages below
auto-test = {}
dev-essential = {}
dev-redox = {}
llvm21-common = {}
mate-common = {}
redox-tests = {}
x11-minimal = {}
x11-full = {}
@ -19,23 +25,21 @@ x11-full = {}
# Normal packages below
acid = {}
#atk = {} # depends on glib which does not build
adwaita-icon-theme = {}
autoconf = {}
automake = {}
base = {}
base-initfs = {}
bash = {}
bash-completion = {}
binutils = {}
bootloader = {}
bottom = {}
bzip2 = {}
ca-certificates = {}
cairo = {}
#cairodemo = {} # linking errors
#calculator = {}
cargo = {}
cbindgen = {}
cleye = {}
#cmatrix = {} # needs ncursesw now
composer = {}
contain = {}
coreutils = {}
@ -55,49 +59,38 @@ eduke32 = {}
exampled = {}
expat = {}
extrautils = {}
#fal
#fd = {} # ctrlc-3.1.1
ffmpeg6 = {}
findutils = {}
fish-shell = {}
fontconfig = {}
#freeciv = {}
freedoom = {}
freefont = {}
#freeglut = {}
freepats = {}
freetype2 = {}
#friar = {} # mio patch
fribidi = {}
#game-2048 = {} # rustc-serialize
#gawk = {} # langinfo.h
gcc13 = {}
gdbserver = {}
gdk-pixbuf = {}
gears = {}
generaluser-gs = {}
gettext = {}
#gigalomania = {} # old recipe format
git = {}
glib = {}
glutin = {}
gnu-binutils = {}
gnu-grep = {}
gnu-make = {}
#gstreamer = {} # conflict with thread local errno
#harfbuzz = {} # depends on glib which does not build
#hematite = {} # needs crate patches for redox-unix
hicolor-icon-theme = {}
htop = {}
installer = {}
installer-gui = {}
intel-one-mono = {}
ion = {}
#jansson = {} # needs config.sub update
kernel = {}
kibi = {}
lci = {}
libc-bench = {}
libavif = {}
libc-bench = {}
libedit = {}
libffi = {}
libgcc = {}
@ -109,37 +102,36 @@ libogg = {}
libonig = {}
liborbital = {}
libpng = {}
libstdcxx = {}
libsodium = {}
libstdcxx = {}
libuuid = {}
libvorbis = {}
libwebp = {}
libxkbcommon = {}
libuuid = {}
libxcursor = {}
libxml2 = {}
llvm21 = {}
lsd = {}
lua54 = {}
lz4 = {}
#mdp = {} # gcc hangs
mednafen = {}
mesa = {}
mesa-glu = {}
mesa-demos-x11 = {}
mgba = {}
#miniserve = {} # actix
nano = {}
nasm = {}
#ncdu = {} # multiple definitions of symbols
ncurses = {}
ncursesw = {}
neovim = {}
netdb = {}
netsurf = {}
netutils = {}
neverball = {}
#newlib = {} # obsolete
#newlibtest = {} # obsolete
nghttp2 = {}
nginx = {}
#nushell = {} # needs cargo update
nodejs-21 = {}
nushell = {}
onefetch = {}
openjazz = {}
openssh = {}
@ -154,55 +146,41 @@ orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
orbutils-background = {}
orbutils-launcher = {}
orbutils-orblogin = {}
os-test-bins = {}
osdemo = {}
#pango = {} # undefined references to std::__throw_system_error(int)
#pastel = {} # needs crate patches for redox-unix
patch = {}
patchelf = {}
#pathfinder = {} # servo-fontconfig
#pciids = {}
pcre = {}
perg = {}
periodictable = {}
php84 = {}
perl5 = {}
php84 = {}
pixelcannon = {}
#pixman = {} # depends on glib which does not build
#pkgar = {} # uses virtual Cargo.toml, needs recipe update
pkg-config = {}
pkgar = {}
pkgutils = {}
pls = {}
pop-icon-theme = {}
#powerline = {} # dirs
prboom = {}
procedural-wallpapers-rs = {}
python312 = {}
#qemu = {} # can be built, but not working
readline = {}
redox-fatfs = {}
redoxfs = {}
redox-games = {}
#redox-ssh = {} # does not compile
redoxfs = {}
relibc = {}
relibc-tests = {}
resist = {}
#retroarch = {} # OS_TLSIndex not declared
relibc-tests-bins = {}
ripgrep = {}
rodioplay = {}
rs-nes = {}
rsync = {}
rust = {}
rust64 = {}
#rust-cairo = {} # linking errors
#rust-cairo-demo = {} # linking errors
rustpython = {}
rustual-boy = {}
#schismtracker = {} # uses system includes
scummvm = {}
sdl-gfx = {}
#sdl-player = {} # wctype_t
sdl1 = {}
sdl1-image = {}
sdl1-mixer = {}
@ -218,28 +196,131 @@ shared-mime-info = {}
shellharden = {}
shellstorm = {}
simple-http-server = {}
smallvil = {}
smith = {}
sodium = {}
softbuffer-wayland = {}
sopwith = {}
sqlite3 = {}
strace = {}
syobonaction = {}
terminfo = {}
#termplay = {} # backtrace cannot find link.h
timidity = {}
tokei = {}
ttf-hack = {}
userutils = {}
uutils = {}
#vice = {} # linker errors
vim = {}
vttest = {}
#vvvvvv = {} # did not compile
wayland-rs = {}
webkitgtk3 = {}
#webrender = {} # unwind
#wesnoth = {}
winit = {}
winit-wayland = {}
xxhash = {}
xz = {}
zenity = {}
zoxide = {}
zsh = {}
zlib = {}
zstd = {}
#"python312.dev" = {}
#"rust.doc" = {}
#atk = {} # depends on glib which does not build
#benchmarks = {}
#binutils-gdb = {}
#book = {}
#cairo-demo = {} # linking errors
#classicube = {}
#cmake = {}
#cmatrix = {} # needs ncursesw now
#cookbook = {}
#cosmic-reader = {}
#cosmic-settings = {}
#cosmic-store = {}
#devilutionx = {}
#dynamic-example = {}
#fal
#fd = {} # ctrlc-3.1.1
#file = {}
#flycast = {}
#freeciv = {}
#freeglut = {}
#friar = {} # mio patch
#game-2048 = {} # rustc-serialize
#gawk = {} # langinfo.h
#gigalomania = {} # old recipe format
#gitoxide = {}
#goaccess = {}
#gstreamer = {} # conflict with thread local errno
#harfbuzz = {} # depends on glib which does not build
#helix = {}
#hello-redox = {}
#hematite = {} # needs crate patches for redox-unix
#hf = {}
#ibm-plex = {}
#iced = {}
#jansson = {} # needs config.sub update
#jq = {}
#libarchive = {}
#libatomic = {}
#libcosmic = {}
#libflac = {}
#libmodplug1 = {}
#libmpfr = {}
#libnettle = {}
#libogg = {}
#libpsl = {}
#libssh2 = {}
#libtool = {}
#liburcu = {}
#libuv = {}
#lua-compat-53 = {}
#luajit = {}
#luarocks = {}
#luv = {}
#mdp = {} # gcc hangs
#miniserve = {} # actix
#mpc = {}
#mupen64plus = {}
#ncdu = {} # multiple definitions of symbols
#newlib = {} # obsolete
#newlibtest = {} # obsolete
#noto-color-emoji = {}
#openjk = {}
#openposixtestsuite = {}
#opentyrian = {}
#orbcalculator = {}
#ostest-bins = {}
#pango = {} # undefined references to std::__throw_system_error(int)
#pastel = {} # needs crate patches for redox-unix
#pathfinder = {} # servo-fontconfig
#pciids = {}
#pcre2 = {}
#pixman = {} # depends on glib which does not build
#pls = {}
#pop-wallpapers = {}
#powerline = {} # dirs
#qemu = {} # can be built, but not working
#quakespasm = {}
#redox-posix-tests = {}
#redox-ssh = {} # does not compile
#retroarch = {} # OS_TLSIndex not declared
#rust-cairo = {} # linking errors
#rust-cairo-demo = {} # linking errors
#rvvm = {}
#schismtracker = {} # uses system includes
#sdl-player = {} # wctype_t
#sdl2-gfx = {}
#sm64ex = {}
#spacecadetpinball = {}
#twin-commander = {}
#ubuntu-wallpapers = {}
#unibilium = {}
#utf8proc = {}
#vice = {} # linker errors
#vvvvvv = {} # did not compile
#webrender = {} # unwind
#website = {}
#wesnoth = {}
#wget = {}

View File

@ -16,13 +16,9 @@ periodictable = {}
intel-one-mono = {}
# Shell Apps
bottom = {}
curl = {}
git = {}
gnu-grep = {}
htop = {}
ripgrep = {}
sodium = {}
terminfo = {}
vim = {}
@ -33,15 +29,14 @@ neverball = {}
prboom = {}
redox-games = {}
sopwith = {}
# syobonaction = {} # linking errors
syobonaction = {}
# Demos
acid = {}
# nushell = {}
nushell = {}
orbclient = {}
pixelcannon = {}
rodioplay = {}
# gears = {} # sccache issue
gears = {}
# MIDI
freepats = {}

View File

@ -17,16 +17,16 @@ include = ["../desktop.toml"]
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export VT 3
nowait orbital contain_orblogin launcher
unset VT
requires_weak 10_net
notify audiod
nowait VT=3 orbital contain_orblogin launcher
"""
# Override console init to use contain
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 20_orbital
nowait getty --contain 2
nowait getty --contain /scheme/debug/no-preserve -J
"""

View File

@ -1,14 +0,0 @@
# Minimal desktop configuration
include = ["../desktop-minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Default build system configuration
include = ["../desktop.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Configuration for development
include = ["../dev.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -55,7 +55,6 @@ winit = {}
# dev
autoconf = {}
automake = {}
cargo = {}
cookbook = {}
gcc13 = {}
gnu-binutils = {}

View File

@ -1,3 +0,0 @@
# Configuration to create "llvm-config" script
include = ["../llvm.toml"]

View File

@ -1,14 +0,0 @@
# Minimal network configuration
include = ["../minimal-net.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Minimal configuration
include = ["../minimal.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -0,0 +1,8 @@
# Configuration used for building redoxer base image
include = ["../redoxer.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024

View File

@ -1,3 +0,0 @@
# Configuration to run the "resist" tests
include = ["../resist.toml"]

View File

@ -35,23 +35,19 @@ htop = {}
website = {}
[[files]]
# Undocumented usage of rsdctl, pointing to notifications dir
path = "/usr/lib/init.d/19_rustyd"
data = """
export RSDCTL_ADDR /var/run/rustysd/control.socket
"""
[[files]]
path = "/usr/lib/init.d/98_keygen_sh"
data = """
requires_weak 10_net
bash /root/keygen.sh
"""
[[files]]
path = "/usr/lib/init.d/99_rustysd"
data = """
rustysd --conf /etc/rustysd
requires_weak 98_keygen_sh
# Undocumented usage of rsdctl, pointing to notifications dir
RSDCTL_ADDR=/var/run/rustysd/control.socket rustysd --conf /etc/rustysd
"""
[[files]]
@ -82,9 +78,8 @@ Description=The nginx HTTP and reverse proxy server
After=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/nginx
TimeoutStopSec=5
Type=simple
ExecStart=/usr/bin/nginx -g "daemon off;"
[Install]
WantedBy=multi-user.target
@ -99,16 +94,34 @@ Description=OpenBSD Secure Shell server
After=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/sshd
TimeoutStopSec=5
Type=simple
ExecStart=/usr/bin/sshd -D
[Install]
WantedBy=multi-user.target
"""
[[files]]
path = "/etc/rustysd/system/php.service"
data = """
[Unit]
Description=OpenBSD Secure Shell server
After=network-online.target
[Service]
Type=simple
# currently php-fpm not that quite work
ExecStart=env PWD=/var/www/html php -S localhost:9000
# ExecStart=/usr/bin/php-fpm --fpm-config /etc/php/84/php-fpm.conf --nodaemonize
[Install]
WantedBy=multi-user.target
"""
[[files]]
path = "/home/user/public_html/index.php"
path = "/var/www/html/index.php"
data = """
<?php
@ -116,14 +129,14 @@ echo "Hello from PHP on Redox!";
"""
[[files]]
path = "/home/user/public_html/phpinfo.php"
path = "/var/www/html/phpinfo.php"
data = """
<?php phpinfo();
"""
[[files]]
path = "/home/user/public_html/README"
path = "/var/www/html/README"
data = """
This is a demonstration into PHP server.
@ -142,7 +155,9 @@ postinstall = true
path = "/etc/nginx/nginx.conf"
data = """
user nginx;
worker_processes auto;
# currently nginx does a lot spin locking for some reason
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
@ -171,6 +186,7 @@ server {
listen 80;
server_name localhost;
root /usr/share/website;
absolute_redirect off;
location / {
index index.html index.htm;
@ -185,7 +201,7 @@ data = """
server {
listen 8081;
server_name localhost;
root /home/user/public_html;
root /var/www/html;
index index.php index.html index.htm;
@ -194,10 +210,12 @@ server {
}
location ~ \\.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# because we're not using PHP FPM (see rustysd php.service)
# include fastcgi_params;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
proxy_pass http://127.0.0.1:9000;
}
}
"""
@ -207,6 +225,7 @@ postinstall = true
path = "/etc/php/84/php-fpm.conf"
data = """
error_log=/var/log/php-fpm.log
include=/etc/php/84/php-fpm.d/*.conf
"""
@ -248,8 +267,7 @@ path = "/root/keygen.sh"
data = """
#!/usr/bin/env bash
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ""
@ -276,14 +294,18 @@ data = """
# At the moment we support SSH, NGINX, Python, PHP. There's more to come
#
# This server demo is insecure by design, we encourage you to get familiar into
# basics of server security if you wish to use this as a production server.
# basics of server security if you wish to use this as a production server.
#
# To start the daemon, run
# > sudo bash server.sh
#
# A WIP port of rustysd is available, you can try start it manually
# There should be rustysd already running, if not, you can try start it manually
# > sudo rustysd --conf /etc/rustysd
#
# The server will start port 22 (ssh), 80 (static web) and 8080 (php)
# You can also try running all daemons manually
# > sudo bash server.sh
#
# The server will start port 22 (ssh), 80 (static web) and 8081 (php)
# If you use the Redox OS build system, starting QEMU with `net=redir`
# should expose those port to 8022, 8080 and 8081.
# Try logging in to console via SSH with `ssh user@localhost -p 8022`
#
##############################################################################
"""

View File

@ -1,14 +0,0 @@
# Server configuration
include = ["../server.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 1024
# Package settings
[packages]
# example = {}

View File

@ -1,14 +0,0 @@
# Configuration for testing
include = ["../tests.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
# filesystem_size = 10000
# Package settings
[packages]
# example = {}

View File

@ -1,3 +0,0 @@
# Wayland configuration
include = ["../wayland.toml"]

View File

@ -1,3 +0,0 @@
# X11 configuration
include = ["../x11.toml"]

View File

@ -3,6 +3,7 @@
IMG_TAG?=$(shell git describe --tags)
IMG_SEPARATOR?=_
IMG_DIR?=build/img/$(ARCH)
OS_TEST_DIR?=build/os-test/$(ARCH)
# CI image target - build standard images
# To leave out the build tag, set both IMG_TAG and IMG_SEPARATOR to null
@ -19,7 +20,24 @@ server desktop demo: FORCE
$(MAKE) CONFIG_NAME=$@ build/$(ARCH)/$@/harddrive.img build/$(ARCH)/$@/redox-live.iso
mkdir -p $(IMG_DIR)
cp "build/$(ARCH)/$@/harddrive.img" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_harddrive.img"
cp "build/$(ARCH)/$@/redox-live.iso" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_redox-live.iso"
cp "build/$(ARCH)/$@/redox-live.iso" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_livedisk.iso"
ci-os-test: FORCE
make CONFIG_NAME=os-test unmount
rm -f "build/$(ARCH)/os-test/harddrive.img"
$(MAKE) CONFIG_NAME=os-test qemu gpu=no
rm -rf $(OS_TEST_DIR)
mkdir -p $(OS_TEST_DIR)
$(MAKE) CONFIG_NAME=os-test mount
cp -rv build/$(ARCH)/os-test/filesystem/usr/share/os-test/html $(OS_TEST_DIR)
cp -v build/$(ARCH)/os-test/filesystem/usr/share/os-test/os-test.json $(OS_TEST_DIR)
tar \
--create \
--gzip \
--file "$(OS_TEST_DIR)/out.tar.gz" \
--directory="build/$(ARCH)/os-test/filesystem/usr/share/os-test" \
out
$(MAKE) CONFIG_NAME=os-test unmount
# CI packaging target
ci-pkg: prefix $(FSTOOLS_TAG) $(CONTAINER_TAG) FORCE
@ -27,8 +45,8 @@ ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(HOST_CARGO) build --manifest-path Cargo.toml --release
export CI=1 COOKBOOK_LOGS=true PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
export CI=1 COOKBOOK_LOGS=true COOKBOOK_CLEAN_BUILD=true PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
$(REPO_BIN) cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
endif
# CI toolchain
@ -39,11 +57,13 @@ else
$(MAKE) PREFIX_BINARY=0 \
"prefix/$(TARGET)/gcc-install.tar.gz" \
"prefix/$(TARGET)/relibc-install.tar.gz" \
"prefix/$(TARGET)/rust-install.tar.gz"
"prefix/$(TARGET)/rust-install.tar.gz" \
"prefix/$(TARGET)/clang-install.tar.gz"
rm -rf "build/toolchain/$(HOST_TARGET)/$(TARGET)"
mkdir -p "build/toolchain/$(HOST_TARGET)/$(TARGET)"
cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/gcc-install.tar.gz"
cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz"
cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/rust-install.tar.gz"
cp "prefix/$(TARGET)/clang-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/clang-install.tar.gz"
cd "build/toolchain/$(HOST_TARGET)/$(TARGET)" && sha256sum -b * > SHA256SUM
endif

View File

@ -11,6 +11,9 @@ ARCH?=$(HOST_ARCH)
BOARD?=
## Enable to use binary prefix (much faster)
PREFIX_BINARY?=1
## Enable to use up-to-date rust compiler (experimental, only available to Tier 2 targets)
## Even more experimental, add -Zbuild-std to cookbook.toml to allow compilation to Tier 3 targets
PREFIX_USE_UPSTREAM_RUST_COMPILER?=0
## Enable to use binary packages (much faster)
REPO_BINARY?=0
## Name of the configuration to include in the image name e.g. desktop or server
@ -29,7 +32,11 @@ ifeq ($(ARCH),i686)
endif
## Select filesystem config
ifeq ($(BOARD),)
ifeq ($(wildcard config/$(ARCH)/$(CONFIG_NAME).toml),)
FILESYSTEM_CONFIG?=config/$(CONFIG_NAME).toml
else
FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml
endif
else
FILESYSTEM_CONFIG?=config/$(ARCH)/$(BOARD)/$(CONFIG_NAME).toml
endif
@ -51,23 +58,28 @@ SCCACHE_BUILD?=$(shell [ -f /run/.containerenv ] && echo 1 || echo 0)
CONTAINERFILE?=podman/redox-base-containerfile
# Per host variables
export NPROC=nproc
NPROC=nproc
SED=sed
FIND=find
REPO_BIN=./target/release/repo
ifneq ($(PODMAN_BUILD),1)
FSTOOLS_IN_PODMAN=0
HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")
# x86_64 linux hosts have all toolchains
ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
ifeq ($(ARCH),aarch64)
# aarch64 linux hosts have aarch64 toolchain
ifneq ($(HOST_TARGET),aarch64-unknown-linux-gnu)
$(info The $(ARCH) binary prefix is only built for x86_64 and aarch64 Linux hosts)
PREFIX_BINARY=0
endif
else
ifeq ($(PREFIX_BINARY),1)
ifeq ($(HOST_TARGET),aarch64-unknown-linux-gnu)
ifneq ($(ARCH),aarch64)
ifneq ($(ARCH),x86_64)
$(info The $(ARCH) binary prefix is only built for x86_64 Linux hosts)
PREFIX_BINARY=0
endif
endif
else ifeq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
else
$(info The $(ARCH) binary prefix is only built for Linux hosts)
PREFIX_BINARY=0
endif
endif
endif
@ -98,13 +110,23 @@ endif
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
FUMOUNT=umount
export NPROC=sysctl -n hw.ncpu
NPROC=sysctl -n hw.ncpu
SED=gsed
FIND=gfind
VB_AUDIO=coreaudio
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
else ifeq ($(UNAME),FreeBSD)
FIND=gfind
FUMOUNT=sudo umount
VB_AUDIO=pulse # To check, will probably be OSS on most setups
VBM=VBoxManage
else ifeq ($(UNAME),Redox)
PODMAN_BUILD=0
# TODO: allow overriding to cross compiler toolchain when build server have one prebuilt
HOSTED_REDOX=1
ifneq ($(shell which repo),)
REPO_BIN=repo
endif
else
# Detect which version of the fusermount binary is available.
ifneq (, $(shell which fusermount3))
@ -120,6 +142,7 @@ endif
# Automatic variables
ROOT=$(CURDIR)
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
export TESTBIN?=
RUNNING_IN_PODMAN=$(shell [ -f /run/.containerenv ] && echo 1 || echo 0)
ifeq ($(PODMAN_BUILD),1)
ifeq ($(RUNNING_IN_PODMAN),1)
@ -149,6 +172,8 @@ INSTALLER=$(FSTOOLS)/bin/redox_installer
REDOXFS=$(FSTOOLS)/bin/redoxfs
REDOXFS_MKFS=$(FSTOOLS)/bin/redoxfs-mkfs
INSTALLER_OPTS=--cookbook=.
INSTALLER_FEATURES=
REDOXFS_FEATURES=
COOKBOOK_OPTS="--filesystem=$(FILESYSTEM_CONFIG)"
ifeq ($(REPO_BINARY),1)
INSTALLER_OPTS+=--repo-binary
@ -156,17 +181,23 @@ COOKBOOK_OPTS+=--repo-binary
endif
ifeq ($(FSTOOLS_NO_MOUNT),1)
INSTALLER_OPTS+=--no-mount
INSTALLER_FEATURES=--no-default-features --features installer
REDOXFS_FEATURES= --no-default-features --features std,log
endif
REPO_TAG=$(BUILD)/repo.tag
FSTOOLS_TAG=build/fstools.tag
export BOARD
export BOARD FIND
ifeq ($(SCCACHE_BUILD),1)
export CC_WRAPPER:=sccache
export RUSTC_WRAPPER:=$(CC_WRAPPER)
endif
ifeq ($(HOSTED_REDOX),1)
FSTOOLS_TAG=
endif
## If Podman is being used, a container is required
ifeq ($(PODMAN_BUILD),1)
CONTAINER_TAG=build/container.tag

View File

@ -1,32 +1,29 @@
# Configuration file for the build system dependencies
# Don't check for Rust/Cargo if you will be using Podman
# Don't check for dependencies if you will be using Podman
ifneq ($(PODMAN_BUILD),1)
# Don't check for dependencies if you will be using Hosted Redox
ifneq ($(HOSTED_REDOX),1)
# dont check for Rust and Cargo if building on a Nix system
# don't check for Rust and Cargo if building on a Nix system
ifneq ($(NIX_SHELL_BUILD),1)
ifeq ($(shell which rustup),)
$(error rustup not found, install from "https://rustup.rs/")
endif
endif
# dont check for compile tools, used internally when installing fstools on host
# don't check for compile tools, used internally when installing fstools on host
ifneq ($(SKIP_CHECK_TOOLS),1)
ifeq ($(shell which cbindgen),)
$(error cbindgen not found, install from crates.io or from your package manager)
endif
ifeq ($(shell which nasm),)
$(error nasm not found, install from your package manager)
endif
ifeq ($(shell which just),)
$(error 'just' not found, install from crates.io or from your package manager)
endif
endif
endif
endif

View File

@ -5,8 +5,9 @@ ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
mkdir -p $(BUILD)
rm -rf $@ $@.partial
-$(FUMOUNT) $(MOUNT_DIR) || true
-$(FUMOUNT) /tmp/redox_installer || true
rm -rf $@ $@.partial $(MOUNT_DIR)
FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
if [ -z "$$FILESYSTEM_SIZE" ] ; then \
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
@ -65,7 +66,7 @@ else
@mkdir -p $(MOUNT_DIR)
$(REDOXFS) $(BUILD)/harddrive.img $(MOUNT_DIR)
@sleep 2
@pgrep redoxfs
@echo "\033[1;36;49mharddrive.img mounted ($$(pgrep redoxfs))\033[0m"
endif
mount_extra: $(FSTOOLS) FORCE
@ -75,7 +76,7 @@ else
@mkdir -p $(MOUNT_DIR)
$(REDOXFS) $(BUILD)/extra.img $(MOUNT_DIR)
@sleep 2
@pgrep redoxfs
@echo "\033[1;36;49mextra.img mounted ($$(pgrep redoxfs))\033[0m"
endif
mount_live: $(FSTOOLS) FORCE
@ -85,7 +86,7 @@ else
@mkdir -p $(MOUNT_DIR)
$(REDOXFS) $(BUILD)/redox-live.iso $(MOUNT_DIR)
@sleep 2
@pgrep redoxfs
@echo "\033[1;36;49mredox-live.iso mounted ($$(pgrep redoxfs))\033[0m"
endif
unmount: FORCE
@ -96,4 +97,5 @@ else
-$(FUMOUNT) $(MOUNT_DIR)
@rm -rf $(MOUNT_DIR)
@-$(FUMOUNT) /tmp/redox_installer 2>/dev/null || true
@echo "\033[1;36;49mFilesystem unmounted\033[0m"
endif

View File

@ -2,37 +2,50 @@
fstools: $(FSTOOLS_TAG) $(FSTOOLS)
GOING_TO_PODMAN_AGAIN?=0
# These tools run inside Podman if it is used, or on the host if Podman is not used
$(FSTOOLS): $(CONTAINER_TAG)
$(FSTOOLS): | prefix $(CONTAINER_TAG) $(FSTOOLS_TAG)
ifeq ($(PODMAN_BUILD),1)
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
$(MAKE) $@ PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1
$(MAKE) $@ PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 GOING_TO_PODMAN_AGAIN=1
endif
else
rm -rf $@ $@.partial
mkdir -p $@.partial
ln -sr recipes $@.partial/recipes
ln -s ../../recipes $@.partial/recipes
$(MAKE) fstools_fetch PODMAN_BUILD=$(GOING_TO_PODMAN_AGAIN)
# Install cookbook, installer, and redoxfs for host (may be outside of podman container)
#TODO: Build and install installer and redoxfs using cookbook?
# Compile installer and redoxfs for host (may be outside of podman container)
cd $@.partial && \
export CARGO_TARGET_DIR=../$@-target && \
$(HOST_CARGO) install --root . --path ../.. --locked && \
env -u RUSTUP_TOOLCHAIN ./bin/repo fetch installer redoxfs && \
$(HOST_CARGO) install --root . --path recipes/core/installer/source && \
$(HOST_CARGO) install --root . --path recipes/core/redoxfs/source
$(HOST_CARGO) install --root . --path recipes/core/installer/source $(INSTALLER_FEATURES) && \
$(HOST_CARGO) install --root . --path recipes/core/redoxfs/source $(REDOXFS_FEATURES)
mv $@.partial $@
touch $@
endif
$(FSTOOLS_TAG): $(FSTOOLS)
fstools_fetch: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(HOST_CARGO) build --manifest-path Cargo.toml --release --locked
$(REPO_BIN) fetch installer redoxfs
endif
CARGO_OFFLINE_FLAG=
ifeq ($(REPO_OFFLINE),1)
CARGO_OFFLINE_FLAG=--offline
endif
$(FSTOOLS_TAG): $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(HOST_CARGO) build --manifest-path Cargo.toml --release --locked $(CARGO_OFFLINE_FLAG)
mkdir -p $(@D)
touch $@
endif

View File

@ -7,34 +7,46 @@ IMAGE_TAG?=redox-base
CONTAINER_WORKDIR?=/mnt/redox
## Flag passed to the Podman volumes. :Z can be used only with SELinux
USE_SELINUX=1
USE_SELINUX?=1
ifeq ($(USE_SELINUX),1)
PODMAN_VOLUME_FLAG=:Z
else
PODMAN_VOLUME_FLAG=
endif
# Cache layers to redox-os docker hub
PODMAN_CACHE=
PODMAN_CACHE_PATH=docker.io/redoxos/$(IMAGE_TAG)
PODMAN_CACHE_PULL?=1
ifeq ($(PODMAN_CACHE_PULL),1)
PODMAN_CACHE+=--cache-from=$(PODMAN_CACHE_PATH)
endif
PODMAN_CACHE_PUSH?=0
ifeq ($(PODMAN_CACHE_PUSH),1)
PODMAN_CACHE+=--cache-to=$(PODMAN_CACHE_PATH)
endif
## Podman Home Directory
PODMAN_HOME?=$(ROOT)/build/podman
PODMAN_HOME=$(ROOT)/build/podman
## Podman command with its many arguments
PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/root$(PODMAN_VOLUME_FLAG)
PODMAN_ENV?=--env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG) --env PREFIX_BINARY=$(PREFIX_BINARY) \
PODMAN_VOLUMES=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/root$(PODMAN_VOLUME_FLAG)
PODMAN_ENV=--env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
PODMAN_CONFIG=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG) --env PREFIX_BINARY=$(PREFIX_BINARY) \
--env CI=$(CI) --env COOKBOOK_MAKE_JOBS=$(COOKBOOK_MAKE_JOBS) --env COOKBOOK_LOGS=$(COOKBOOK_LOGS) --env COOKBOOK_VERBOSE=$(COOKBOOK_VERBOSE) \
--env REPO_APPSTREAM=$(REPO_APPSTREAM) --env REPO_BINARY=$(REPO_BINARY) --env REPO_NONSTOP=$(REPO_NONSTOP) --env REPO_OFFLINE=$(REPO_OFFLINE)
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --interactive --tty --cap-add SYS_ADMIN --device /dev/fuse --network=host --env TERM=$(TERM)
PODMAN_RUN?=podman run $(PODMAN_OPTIONS) $(PODMAN_VOLUMES) $(PODMAN_ENV) $(PODMAN_CONFIG) $(IMAGE_TAG)
--env REPO_APPSTREAM=$(REPO_APPSTREAM) --env REPO_BINARY=$(REPO_BINARY) --env REPO_NONSTOP=$(REPO_NONSTOP) --env REPO_OFFLINE=$(REPO_OFFLINE) --env TESTBIN=$(TESTBIN) \
--env HOSTED_REDOX=$(HOSTED_REDOX) --env PREFIX_USE_UPSTREAM_RUST_COMPILER=$(PREFIX_USE_UPSTREAM_RUST_COMPILER)
PODMAN_OPTIONS=--rm --workdir $(CONTAINER_WORKDIR) --interactive --tty --cap-add SYS_ADMIN --device /dev/fuse --network=host --env TERM=$(TERM) --pids-limit=-1
PODMAN_RUN=podman run $(PODMAN_OPTIONS) $(PODMAN_VOLUMES) $(PODMAN_ENV) $(PODMAN_CONFIG) $(IMAGE_TAG)
container_shell: build/container.tag
ifeq ($(PODMAN_BUILD),1)
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) $(IMAGE_TAG) bash
$(PODMAN_RUN) bash
else
@echo PODMAN_BUILD=$(PODMAN_BUILD), please set it to 1 in mk/config.mk
endif
container_su: FORCE
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) --user 0 $(PODMAN_ENV) $(IMAGE_TAG) bash
container_clean: FORCE
rm -f build/container.tag
@echo "If podman dir cannot be removed, remove with \"sudo rm\"."
@ -57,12 +69,11 @@ container_kill: FORCE
## Must match the value of CONTAINER_TAG in config.mk
build/container.tag: $(CONTAINERFILE)
ifeq ($(PODMAN_BUILD),1)
rm -f build/container.tag
rm -f $@ $(FSTOOLS_TAG)
-podman image rm --force $(IMAGE_TAG) || true
mkdir -p $(PODMAN_HOME)
@echo "Building Podman image. This may take some time."
cat $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
@echo "Mapping Podman user space. Please wait."
cat $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) $(PODMAN_CACHE) --tag $(IMAGE_TAG)
$(PODMAN_RUN) bash -e podman/rustinstall.sh
mkdir -p build
touch $@
@ -71,6 +82,9 @@ else
@echo PODMAN_BUILD=$(PODMAN_BUILD), container not required.
endif
container_push: build/container.tag
podman push $(IMAGE_TAG) $(PODMAN_CACHE_PATH)
KERNEL_PATH := recipes/core/kernel
KERNEL_PATH_SOURCE := $(ROOT)/$(KERNEL_PATH)/source
KERNEL_PATH_TARGET := $(ROOT)/$(KERNEL_PATH)/target/$(TARGET)

View File

@ -4,69 +4,58 @@ PREFIX=prefix/$(TARGET)
PREFIX_INSTALL=$(PREFIX)/sysroot/
PREFIX_PATH=$(ROOT)/$(PREFIX_INSTALL)/bin
RELIBC_SOURCE=recipes/core/relibc/source
BINUTILS_TARGET=recipes/dev/binutils-gdb/target/$(HOST_TARGET)/$(TARGET)
LIBTOOL_TARGET=recipes/dev/libtool/target/$(HOST_TARGET)
GCC_TARGET=recipes/dev/gcc13/target/$(HOST_TARGET)/$(TARGET)
LIBSTDCXX_TARGET=recipes/libs/libstdcxx-v3/target/$(TARGET)/$(HOST_TARGET)
RELIBC_FREESTANDING_TARGET=recipes/core/relibc/target/$(TARGET)/$(HOST_TARGET)
RELIBC_TARGET=recipes/core/relibc/target/$(TARGET)
LLVM_TARGET=recipes/dev/llvm21/target/$(HOST_TARGET)/$(TARGET)
RUST_TARGET=recipes/dev/rust/target/$(HOST_TARGET)/$(TARGET)
CLANG_TARGET=recipes/dev/clang21/target/$(HOST_TARGET)/$(TARGET)
LLD_TARGET=recipes/dev/lld21/target/$(HOST_TARGET)/$(TARGET)
BINUTILS_BRANCH=redox-2.43.1
GCC_BRANCH=redox-13.2.0
LIBTOOL_VERSION=2.5.4
# official RISC-V support introduced in newer version
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
export CC=
export CXX=
ifeq ($(TARGET),riscv64gc-unknown-redox)
GCC_ARCH?=--with-arch=rv64gc --with-abi=lp64d
else
GCC_ARCH?=
endif
# TODO(andypython): Upstream libtool patches to remove the need to locally build libtool.
# Cannot be CI built, i.e. be a part of relibc-install.tar.gz, as the prefix has to be correctly
# set while building. Otherwise aclocal will not be able to find libtool's files. Furthermore, doing
# so would break non-podman builds (not sure if they are still supported though).
prefix: $(PREFIX)/sysroot
PREFIX_STRIP=\
mkdir -p bin libexec "$(GCC_TARGET)/bin" && \
find bin libexec "$(GCC_TARGET)/bin" "$(GCC_TARGET)/lib" \
-type f \
-exec strip --strip-unneeded {} ';' \
2> /dev/null
# Remove prefix builds and downloads
prefix_clean:
rm -rf $(PREFIX)
$(RELIBC_SOURCE): | $(FSTOOLS_TAG)
# Remove relibc in sysroot and all statically linked recipes
static_clean: | $(FSTOOLS_TAG)
$(MAKE) c.relibc
$(MAKE) c.base,base-initfs,extrautils,kernel,ion,pkgutils,redoxfs
$(MAKE) c.bash,luajit,gettext,openssl1,openssl3,pcre2,sdl1,zstd,zlib,bzip2,xz
$(MAKE) c.expat,freetype2,libffi,libiconv,libjpeg,liborbital,libpng,libxml2,ncurses,ncursesw
rm -rf $(REPO_TAG)
$(PREFIX)/relibc-install: $(PREFIX)/clang-install $(PREFIX)/rust-install $(PREFIX)/gcc-install | $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo fetch relibc
touch $(RELIBC_SOURCE)
endif
$(PREFIX)/relibc: | $(RELIBC_SOURCE)
mkdir -p "$(@D)"
@echo "\033[1;36;49mBuilding relibc-install\033[0m"
rm -rf "$@.partial" "$@"
cp -r "$(RELIBC_SOURCE)" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
$(PREFIX)/relibc-install: $(PREFIX)/relibc | $(PREFIX)/rust-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
cp -r "$(PREFIX)/rust-install" "$@.partial"
rm -rf "$@.partial/$(TARGET)/include/"*
cp -r "$(PREFIX)/rust-install/$(GNU_TARGET)/include/c++" "$@.partial/$(GNU_TARGET)/include/c++"
cp -r "$(PREFIX)/rust-install/lib/rustlib/$(HOST_TARGET)/lib/" "$@.partial/lib/rustlib/$(HOST_TARGET)/"
cd "$<" && \
mkdir "$@.partial"
cp -r "$(PREFIX)/gcc-install/". "$@.partial"
cp -r "$(PREFIX)/rust-install/". "$@.partial"
cp -r "$(PREFIX)/clang-install/". "$@.partial"
rm -rf "$@.partial/$(GNU_TARGET)/include/"*
cp -r "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++" "$@.partial/$(GNU_TARGET)/include/c++"
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
export CARGO="env -u CARGO cargo" && \
$(MAKE) clean && \
$(MAKE) -j `$(NPROC)` all && \
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial/$(GNU_TARGET)"
cd "$@.partial" && $(PREFIX_STRIP)
export CARGO="env -u CARGO cargo" $(PREFIX_CONFIG) && \
$(REPO_BIN) cook relibc
cp -r "$(RELIBC_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
mkdir -p "$@.partial/$(GNU_TARGET)/usr"
ln -s "../include" "$@.partial/$(GNU_TARGET)/usr/include"
ln -s "../lib" "$@.partial/$(GNU_TARGET)/usr/lib"
touch "$@.partial"
mv "$@.partial" "$@"
endif
@ -79,76 +68,35 @@ $(PREFIX)/relibc-install.tar.gz: $(PREFIX)/relibc-install
--directory="$<" \
.
$(PREFIX)/libtool: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
git clone \
--recurse-submodules \
--shallow-submodules \
"https://gitlab.redox-os.org/redox-os/libtool/" \
--branch "v$(LIBTOOL_VERSION)-redox" \
--depth 2 \
"$@.partial"
touch "$@.partial"
echo $(LIBTOOL_VERSION) > $@.partial/.tarball-version
mv "$@.partial" "$@"
endif
$(PREFIX)/libtool-build: $(PREFIX)/libtool $(PREFIX)/rust-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
cd "$<" && \
./bootstrap \
--skip-po \
--force \
--gnulib-srcdir=./gnulib
PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
cd "$@.partial" && \
cp -r $(abspath $<)/. ./ && \
"$(ROOT)/$</configure" \
--target="$(TARGET)" \
--prefix=$(abspath $(PREFIX)/sysroot) && \
$(MAKE) -j `$(NPROC)`
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/sysroot: $(PREFIX)/relibc-install $(PREFIX)/libtool-build $(CONTAINER_TAG)
$(PREFIX)/sysroot: $(PREFIX)/relibc-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@"
cp -r "$(PREFIX)/relibc-install/" "$@"
PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
cd "$(PREFIX)/libtool-build" && \
$(MAKE) install -j `$(NPROC)`
cd "$@" && $(PREFIX_STRIP)
# adapt path for libtoolize
sed 's|/usr/share|$(ROOT)/$@/share|g' "$@/bin/libtoolize.orig" > "$@/bin/libtoolize"
chmod 0755 "$@/bin/libtoolize"
touch "$@"
endif
# PREFIX_BINARY ---------------------------------------------------
ifeq ($(PREFIX_BINARY),1)
$(PREFIX)/rust-install.tar.gz: | $(CONTAINER_TAG)
# PREFIX_BINARY FOR LINUX -----------------------------------------
ifneq ($(HOSTED_REDOX),1)
$(PREFIX)/%.tar.gz: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
#TODO: figure out why rust-install.tar.gz is missing /lib/rustlib/$(HOST_TARGET)/lib
wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz"
wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/$(@F)"
mv $@.partial $@
endif
$(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz $(CONTAINER_TAG)
$(PREFIX)/gcc-install $(PREFIX)/rust-install $(PREFIX)/clang-install: %: %.tar.gz | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@ -159,161 +107,72 @@ else
mv "$@.partial" "$@"
endif
# PREFIX_BINARY FOR REDOX -----------------------------------------
else
$(ROOT)/rust/configure:
git submodule sync --recursive
git submodule update --progress --init --recursive --checkout rust
PREFIX_FREESTANDING_INSTALL=$(PREFIX)/gcc-freestanding-install
PREFIX_FREESTANDING_PATH=$(ROOT)/$(PREFIX_FREESTANDING_INSTALL)/bin
$(PREFIX)/binutils-$(BINUTILS_BRANCH).tar.bz2:
$(PREFIX)/id_ed25519.pub.toml: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
rm -fv $(PREFIX)/binutils*.tar.bz2*
wget -O $@.partial "https://gitlab.redox-os.org/redox-os/binutils-gdb/-/archive/$(BINUTILS_BRANCH)/binutils-gdb-$(BINUTILS_BRANCH).tar.bz2"
wget -O $@.partial "https://static.redox-os.org/pkg/id_ed25519.pub.toml"
mv $@.partial $@
endif
$(PREFIX)/binutils: $(PREFIX)/binutils-$(BINUTILS_BRANCH).tar.bz2
$(PREFIX)/%.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/binutils-install: $(PREFIX)/binutils $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$<-build" "$@.partial" "$@"
mkdir -p "$<-build" "$@.partial"
cd "$<-build" && \
"$(ROOT)/$</configure" \
--target="$(GNU_TARGET)" \
$(GCC_ARCH) \
--program-prefix="$(GNU_TARGET)-" \
--prefix="" \
--disable-werror \
--enable-default-hash-style=gnu \
&& \
$(MAKE) -j `$(NPROC)` all && \
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
rm -rf "$<-build"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/gcc-$(GCC_BRANCH).tar.bz2:
mkdir -p "$(@D)"
rm -fv $(PREFIX)/gcc*.tar.bz2*
wget -O $@.partial "https://gitlab.redox-os.org/redox-os/gcc/-/archive/$(GCC_BRANCH)/gcc-$(GCC_BRANCH).tar.bz2"
mv "$@.partial" "$@"
$(PREFIX)/gcc: $(PREFIX)/gcc-$(GCC_BRANCH).tar.bz2
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$@.partial"
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
cd "$@.partial" && ./contrib/download_prerequisites
touch "$@.partial"
mv "$@.partial" "$@"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/$(@F)"
mv $@.partial $@
endif
$(PREFIX)/gcc-freestanding-install: $(PREFIX)/gcc | $(PREFIX)/binutils-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$<-freestanding-build" "$@.partial" "$@"
mkdir -p "$<-freestanding-build"
cp -r "$(PREFIX)/binutils-install" "$@.partial"
cd "$<-freestanding-build" && \
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
"$(ROOT)/$</configure" \
--target="$(GNU_TARGET)" \
$(GCC_ARCH) \
--program-prefix="$(GNU_TARGET)-" \
--prefix="" \
--disable-nls \
--disable-shared \
--enable-languages=c,c++ \
--without-headers \
--with-linker-hash-style=gnu \
&& \
$(MAKE) -j `$(NPROC)` all-gcc all-target-libgcc && \
$(MAKE) -j `$(NPROC)` install-gcc install-target-libgcc DESTDIR="$(ROOT)/$@.partial"
rm -rf "$<-freestanding-build"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/relibc-freestanding: | $(RELIBC_SOURCE)
mkdir -p "$(@D)"
rm -rf "$@.partial" "$@"
cp -r "$(RELIBC_SOURCE)" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
$(PREFIX)/relibc-freestanding-install: $(PREFIX)/relibc-freestanding | $(PREFIX_FREESTANDING_INSTALL) $(CONTAINER_TAG)
$(PREFIX)/gcc-install: $(PREFIX)/gcc13.pkgar $(PREFIX)/gcc13.cxx.pkgar $(PREFIX)/libgcc.pkgar $(PREFIX)/libstdcxx.pkgar $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
cd "$<" && \
export PATH="$(PREFIX_FREESTANDING_PATH):$$PATH" && \
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN cargo" && \
export CC_$(subst -,_,$(TARGET))="$(GNU_TARGET)-gcc -isystem $(ROOT)/$@.partial/$(GNU_TARGET)/include" && \
$(MAKE) clean && \
$(MAKE) -j 1 all && \
$(MAKE) -j 1 install DESTDIR="$(ROOT)/$@.partial/$(GNU_TARGET)"
cd "$@.partial" && $(PREFIX_STRIP)
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/gcc13.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/gcc13.cxx.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/libgcc.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/libstdcxx.pkgar" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/gcc-install: $(PREFIX)/gcc | $(PREFIX)/relibc-freestanding-install $(CONTAINER_TAG)
$(PREFIX)/rust-install: $(PREFIX)/llvm21.pkgar $(PREFIX)/rust.pkgar $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$<-build" "$@.partial" "$@"
mkdir -p "$<-build"
cp -r "$(PREFIX)/binutils-install" "$@.partial"
cd "$<-build" && \
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
"$(ROOT)/$</configure" \
--target="$(GNU_TARGET)" \
$(GCC_ARCH) \
--program-prefix="$(GNU_TARGET)-" \
--prefix="" \
--with-sysroot \
--with-build-sysroot="$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(GNU_TARGET)" \
--with-native-system-header-dir="/include" \
--disable-multilib \
--disable-nls \
--disable-werror \
--enable-languages=c,c++ \
--enable-shared \
--enable-threads=posix \
--with-linker-hash-style=gnu \
&& \
$(MAKE) -j `$(NPROC)` all-gcc all-target-libgcc all-target-libstdc++-v3 && \
$(MAKE) -j `$(NPROC)` install-gcc install-target-libgcc install-target-libstdc++-v3 DESTDIR="$(ROOT)/$@.partial"
rm $(ROOT)/$@.partial/$(GNU_TARGET)/lib/*.la
rm -rf "$<-build"
cd "$@.partial" && $(PREFIX_STRIP)
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/llvm21.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/rust.pkgar" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/gcc-install.tar.gz: $(PREFIX)/gcc-install
$(PREFIX)/clang-install: $(PREFIX)/llvm21.runtime.pkgar $(PREFIX)/clang21.pkgar $(PREFIX)/lld21.pkgar $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/llvm21.runtime.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/clang21.pkgar" "$@.partial"
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/lld21.pkgar" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
endif
else
$(PREFIX)/%.tar.gz: $(PREFIX)/%
tar \
--create \
--gzip \
@ -321,44 +180,232 @@ $(PREFIX)/gcc-install.tar.gz: $(PREFIX)/gcc-install
--directory="$<" \
.
$(PREFIX)/rust-install: $(ROOT)/rust/configure | $(PREFIX)/gcc-install $(PREFIX)/relibc-freestanding-install $(CONTAINER_TAG)
# BUILD GCC ---------------------------------------------------
$(PREFIX)/libtool-install: | $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$(PREFIX)/rust-build" "$@.partial" "$@"
mkdir -p "$(PREFIX)/rust-build"
cp -r "$(PREFIX)/gcc-install" "$@.partial"
cp -r "$(PREFIX)/relibc-freestanding-install/$(GNU_TARGET)" "$@.partial"
cd "$(PREFIX)/rust-build" && \
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
"$<" \
--prefix="/" \
--disable-docs \
--disable-download-ci-llvm \
--enable-cargo-native-static \
--enable-dist-src \
--enable-extended \
--enable-lld \
--enable-llvm-static-stdcpp \
--tools=cargo,src \
--target="$(HOST_TARGET),$(TARGET)" \
&& \
$(MAKE) -j `$(NPROC)` && \
rm -rf $(ROOT)/$@.partial/lib/rustlib/{components,install.log,rust-installer-version,uninstall.sh,manifest-*} "$(ROOT)/$@.partial/share/doc/rust" && \
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
rm -rf "$(PREFIX)/rust-build"
mkdir -p "$@.partial/lib/rustlib/$(HOST_TARGET)/bin"
mkdir -p "$@.partial/lib/rustlib/$(HOST_TARGET)/lib"
cd "$@.partial" && find . -name *.old -exec rm {} ';' && $(PREFIX_STRIP)
@echo "\033[1;36;49mBuilding libtool-install\033[0m"
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
export $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr && \
$(REPO_BIN) cook host:libtool
cp -r "$(LIBTOOL_TARGET)/stage/usr/". "$@.partial"
mv "$@.partial/bin/libtoolize" "$@.partial/bin/libtoolize.orig"
# adapt path for libtoolize
sed 's|/usr/share|$(ROOT)/$@/share|g' "$@.partial/bin/libtoolize.orig" > "$@.partial/bin/libtoolize"
chmod 0755 "$@.partial/bin/libtoolize"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/rust-install.tar.gz: $(PREFIX)/rust-install
tar \
--create \
--gzip \
--file "$@" \
--directory="$<" \
.
$(PREFIX)/binutils-install: | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding binutils-install\033[0m"
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \
$(REPO_BIN) cook host:binutils-gdb
cp -r "$(BINUTILS_TARGET)/stage/usr/". "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/gcc-freestanding-install: $(PREFIX)/binutils-install | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding gcc-freestanding-install\033[0m"
rm -rf "$@.partial" "$@" $(PREFIX)/relibc-freestanding-install $(PREFIX)/sysroot
mkdir -p "$@.partial" $(PREFIX)/relibc-freestanding-install/$(GNU_TARGET)/include
export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/binutils-install/bin:$$PATH" \
COOKBOOK_LIBTOOL_DIR=$(ROOT)/$(PREFIX)/libtool-install COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) \
COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_SYSROOT=$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(GNU_TARGET) && \
$(REPO_BIN) cook host:gcc13
cp -r "$(GCC_TARGET)/stage/usr/". "$@.partial"
cp -r "$(GCC_TARGET)/stage.cxx/usr/". "$@.partial"
cp -r "$(PREFIX)/binutils-install/". "$@.partial"
rm -rf $(PREFIX)/relibc-freestanding-install
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/relibc-freestanding-install: $(PREFIX)/gcc-freestanding-install | $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding relibc-freestanding-install\033[0m"
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN cargo" RUSTUP="env -u CARGO -u RUSTUP_TOOLCHAIN rustup" && \
export PATH="$(ROOT)/$(PREFIX)/gcc-freestanding-install/bin:$$PATH" && \
export CC_$(subst -,_,$(TARGET))="$(GNU_TARGET)-gcc -isystem $(ROOT)/$@.partial/$(GNU_TARGET)/include" LINKFLAGS="" && \
export $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
$(REPO_BIN) cook relibc
cp -r "$(RELIBC_FREESTANDING_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/gcc-install: $(PREFIX)/relibc-freestanding-install | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding gcc-install\033[0m"
rm -rf "$@.partial" "$@-build.partial" "$@"
if [ ! -d "$(ROOT)/$(GCC_TARGET)" ]; then \
echo "\033[1;38;5;196m Incomplete build stages. Please re-run the build\033[0m"; \
rm -rf "$(PREFIX)"/gcc-freestanding-install && "$(PREFIX)"/relibc-freestanding-install && \
exit 1; fi
mkdir -p "$@.partial" "$@-build.partial"
cp -r "$(PREFIX)/gcc-freestanding-install/". "$@.partial"
cp -r "$(PREFIX)/relibc-freestanding-install/". "$@.partial"
cp -r "$(PREFIX)/libtool-install/". "$@.partial"
@#TODO: how to make this not conflict with libc?
rm -f "$@.partial/lib/gcc/$(GNU_TARGET)/13.2.0/include/limits.h"
# libgcc and freestanding libstdcxx
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
$(MAKE) -C "$(ROOT)/$(GCC_TARGET)/build" all-target-libgcc all-target-libstdc++-v3 && \
$(MAKE) -C "$(ROOT)/$(GCC_TARGET)/build" install-target-libgcc install-target-libstdc++-v3 DESTDIR="$(ROOT)/$@-build.partial/usr"
cp -r "$@-build.partial/usr/". "$@.partial"
@#TODO: in riscv64gc libgcc_s.so is a GNU ld script
rm -f "$@.partial"/$(GNU_TARGET)/lib/libgcc_s.so
ln -s libgcc_s.so.1 "$@.partial"/$(GNU_TARGET)/lib/libgcc_s.so
@#TODO: generates wrong lib path for libtool
rm -f "$@.partial"/$(GNU_TARGET)/lib/libstdc++.la
rm -f "$@.partial"/$(GNU_TARGET)/lib/libsupc++.la
# hosted libstdcxx
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
export $(PREFIX_CONFIG) "COOKBOOK_HOST_SYSROOT=$(ROOT)/$@.partial" COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
rm -rf "$(LIBSTDCXX_TARGET)/stage" && $(REPO_BIN) cook libstdcxx-v3
cp -r "$(LIBSTDCXX_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
rm -rf "$@-build.partial"
touch "$@.partial"
mv "$@.partial" "$@"
# no longer needed, delete build files to save disk space
rm -rf $(BINUTILS_TARGET) $(LIBTOOL_TARGET) $(GCC_TARGET) $(LIBSTDCXX_TARGET) $(RELIBC_FREESTANDING_TARGET)
endif
# RUST FROM UPSTREAM COMPILER ---------------------------------------------------
ifeq ($(PREFIX_USE_UPSTREAM_RUST_COMPILER),1)
PREFIX_RUST_VERSION_TAG=$(PREFIX)/rustc-version-tag-$(UPSTREAM_RUSTC_VERSION)
$(PREFIX_RUST_VERSION_TAG):
rm -f "$(PREFIX)"/rustc-version-tag-*
rm -f "$(PREFIX)"/rustc-install.tar.xz
rm -f "$(PREFIX)"/cargo-install.tar.xz
rm -f "$(PREFIX)"/rust-std-host-install.tar.xz
rm -f "$(PREFIX)"/rust-std-target-install.tar.xz
rm -f "$(PREFIX)"/rust-src-install.tar.xz:
mkdir -p "$(@D)"
touch $@
$(PREFIX)/rustc-install.tar.xz $(PREFIX)/cargo-install.tar.xz: $(PREFIX)/%-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/$*-nightly-$(HOST_TARGET).tar.xz"
mv $@.partial $@
endif
$(PREFIX)/rust-std-host-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/rust-std-nightly-$(HOST_TARGET).tar.xz"
mv $@.partial $@
endif
$(PREFIX)/rust-std-target-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
ifeq ($(TARGET),x86_64-unknown-redox)
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/rust-std-nightly-$(TARGET).tar.xz"
mv $@.partial $@
else
touch $@
endif
endif
$(PREFIX)/rust-src-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p "$(@D)"
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/rust-src-nightly.tar.xz"
mv $@.partial $@
endif
$(PREFIX)/rust-install: $(PREFIX)/rustc-install.tar.xz $(PREFIX)/cargo-install.tar.xz $(PREFIX)/rust-std-host-install.tar.xz $(PREFIX)/rust-std-target-install.tar.xz $(PREFIX)/rust-src-install.tar.xz
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding rust-install\033[0m"
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
tar --extract --file "$(PREFIX)/rustc-install.tar.xz" -C "$@.partial" rustc-nightly-$(HOST_TARGET)/rustc/ --strip-components=2
tar --extract --file "$(PREFIX)/cargo-install.tar.xz" --directory "$@.partial" cargo-nightly-$(HOST_TARGET)/cargo/ --strip-components=2
tar --extract --file "$(PREFIX)/rust-std-host-install.tar.xz" --directory "$@.partial" rust-std-nightly-$(HOST_TARGET)/rust-std-$(HOST_TARGET)/ --strip-components=2
tar --extract --file "$(PREFIX)/rust-src-install.tar.xz" --directory "$@.partial" rust-src-nightly/rust-src/ --strip-components=2
ifeq ($(TARGET),x86_64-unknown-redox)
tar --extract --file "$(PREFIX)/rust-std-target-install.tar.xz" --directory "$@.partial" rust-std-nightly-$(TARGET)/rust-std-$(TARGET)/ --strip-components=2
endif
rm -f "$@.partial/manifest.in"
touch "$@.partial"
mv "$@.partial" "$@"
endif
# BUILD RUST ---------------------------------------------------
else
$(PREFIX)/rust-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" \
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) && \
$(REPO_BIN) cook host:llvm21 host:rust
cp -r "$(RUST_TARGET)/stage/usr/". "$@.partial"
cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial"
mv "$@.partial" "$@"
# TODO: Cache from RUST_TARGET is currently not cleared.
# TIP: If you're developing std for rust, remove COOKBOOK_CLEAN_BUILD=true
# at the top of this file so your next rust build reuses the build cache
endif
endif
# BUILD CLANG ---------------------------------------------------
$(PREFIX)/clang-install: | $(PREFIX)/rust-install $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding clang-install\033[0m"
rm -rf "$@.partial" "$@"
export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) && \
$(REPO_BIN) cook host:llvm21 host:clang21 host:lld21
# llvm libraries is already in rust if building
ifeq ($(PREFIX_USE_UPSTREAM_RUST_COMPILER),1)
cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial"
endif
cp -r "$(LLVM_TARGET)/stage.dev/usr/". "$@.partial"
cp -r "$(LLVM_TARGET)/stage.runtime/usr/". "$@.partial"
cp -r "$(CLANG_TARGET)/stage/usr/". "$@.partial"
cp -r "$(LLD_TARGET)/stage/usr/". "$@.partial"
mv "$@.partial" "$@"
# no longer needed, delete build files to save disk space
rm -rf $(LLVM_TARGET) $(CLANG_TARGET) $(LLD_TARGET)
endif
endif

View File

@ -1,12 +1,14 @@
# Configuration file for QEMU
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(QEMU_ARCH)
QEMU=qemu-system-$(QEMU_ARCH)
QEMUFLAGS=-d guest_errors -name "Redox OS $(ARCH)"
netboot?=no
redoxer?=no
VGA_SUPPORTED=no
ifeq ($(ARCH),i586)
audio?=ac97
disk?=ata
gpu?=vga
uefi=no
VGA_SUPPORTED=yes
@ -42,7 +44,7 @@ else ifeq ($(ARCH),x86_64)
endif
endif
ifneq ($(usb),no)
QEMUFLAGS+=-device nec-usb-xhci,id=xhci
QEMUFLAGS+=-device qemu-xhci
endif
else ifeq ($(ARCH),aarch64)
# Default to UEFI as U-Boot doesn't set up a framebuffer for us and we don't yet support
@ -58,6 +60,7 @@ else ifeq ($(ARCH),aarch64)
ifeq ($(BOARD),raspi3bp)
QEMU_KERNEL=$(BUILD)/raspi3bp_uboot.rom
disk?=sdcard
gpu=none
QEMU_MACHINE:=raspi3b
QEMU_SMP:=4
QEMU_MEM:=1024
@ -103,14 +106,15 @@ else ifeq ($(ARCH),riscv64gc)
QEMU_SMP?=4
QEMU_MEM?=2048
QEMU_CPU=max
disk?=nvme
PFLASH0=$(firstword \
$(wildcard /usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd) \
$(wildcard /usr/share/edk2/riscv/RISCV_VIRT_CODE.fd) \
$(wildcard /usr/share/qemu/edk2-riscv-code.fd) \
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-code.fd) \
)
PFLASH1=$(firstword \
$(wildcard /usr/share/qemu-efi-riscv64/RISCV_VIRT_VARS.fd) \
$(wildcard /usr/share/edk2/riscv/RISCV_VIRT_VARS.fd) \
$(wildcard /usr/share/qemu/edk2-riscv-vars.fd) \
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-vars.fd) \
)
@ -162,6 +166,17 @@ else
QEMUFLAGS+=-serial chardev:debug -mon chardev=debug
endif
# redoxer exit code: 51 => success, 53 => failure
ifeq ($(redoxer),yes)
ifeq ($(ARCH),x86_64)
QEMUFLAGS+=-device isa-debug-exit
else ifeq ($(ARCH),i586)
QEMUFLAGS+=-device isa-debug-exit
else ifeq ($(ARCH),aarch64)
QEMUFLAGS+=-semihosting-config enable=on,target=native,userspace=on
endif
endif
ifeq ($(iommu),yes)
QEMUFLAGS+=-machine $(QEMU_MACHINE),iommu=on
else
@ -236,6 +251,12 @@ else ifeq ($(gpu),virtio)
else
QEMUFLAGS+=-vga none -device virtio-gpu
endif
else ifeq ($(gpu),virtio-sdl)
ifeq ($(VGA_SUPPORTED),yes)
QEMUFLAGS+=-vga none -device virtio-vga -display sdl,show-cursor=on
else
QEMUFLAGS+=-vga none -device virtio-gpu -display sdl,show-cursor=on
endif
else ifeq ($(gpu),virtio-gl)
ifeq ($(VGA_SUPPORTED),yes)
QEMUFLAGS+=-display gtk,gl=on -vga none -device virtio-vga-gl
@ -245,7 +266,7 @@ else ifeq ($(gpu),virtio-gl)
endif
EXTRA_DISK=$(BUILD)/extra.img
disk?=ata
disk?=nvme
ifeq ($(disk),ata)
# For i386, ata will use ided
# For aarch64 and x86_64, ata will use ahcid
@ -351,18 +372,3 @@ $(BUILD)/qemu_uboot.rom:
qemu: qemu-deps
$(QEMU) $(QEMUFLAGS)
# You probably want to use disk=no when using the *_extra targets
qemu_extra: qemu-deps
$(QEMU) $(QEMUFLAGS) \
-drive file=$(EXTRA_DISK),format=raw
qemu_nvme_extra: qemu-deps
$(QEMU) $(QEMUFLAGS) \
-drive file=$(EXTRA_DISK),format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
#additional steps for $(DISK) are required!!!
qemu_raspi: qemu-deps
$(QEMU) -M raspi3b -smp 4,cores=1 \
-kernel $(FIRMWARE) \
-serial stdio -display none

View File

@ -1,24 +1,40 @@
# Configuration file for recipe commands
$(REPO_TAG): prefix $(FILESYSTEM_CONFIG) | $(FSTOOLS_TAG) $(CONTAINER_TAG)
$(REPO_TAG): prefix $(FILESYSTEM_CONFIG) | $(FSTOOLS) $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo cook $(COOKBOOK_OPTS) --with-package-deps
$(REPO_BIN) cook $(COOKBOOK_OPTS) --with-package-deps
mkdir -p $(BUILD)
touch $@
endif
comma := ,
# List all recipes in a tree fashion specified by the filesystem config
tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
# List all recipes in a cook-tree fashion specified by the filesystem config
repo-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@./target/release/repo tree $(COOKBOOK_OPTS) --with-package-deps
@$(REPO_BIN) cook-tree $(COOKBOOK_OPTS) --with-package-deps
endif
# List all recipes in a push-tree fashion specified by the filesystem config
image-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@$(REPO_BIN) push-tree $(COOKBOOK_OPTS) --with-package-deps
endif
# Clean specific target to all recipes, similar to repo_clean but more specific
repo_clean_target: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(REPO_BIN) clean-target --all
endif
# Fetch all recipes source or binary from filesystem config
@ -28,7 +44,15 @@ ifeq ($(PODMAN_BUILD),1)
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo fetch $(COOKBOOK_OPTS) --with-package-deps
$(REPO_BIN) fetch $(COOKBOOK_OPTS) --with-package-deps
endif
# Fetch Cargo dependencies for the cookbook tool (needed for REPO_OFFLINE=1 builds)
cargo-fetch: FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(HOST_CARGO) fetch --manifest-path Cargo.toml --locked
endif
# Find recipe for one or more targets separated by comma
@ -36,7 +60,17 @@ find.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@./target/release/repo find $(foreach f,$(subst $(comma), ,$*),$(f))
@$(REPO_BIN) find $(foreach f,$(subst $(comma), ,$*),$(f))
endif
# Invoke clean for relibc in recipe and relibc in sysroot
c.relibc: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(REPO_BIN) clean relibc
rm -rf $(PREFIX)/relibc-install $(PREFIX)/sysroot
@echo "\033[1;36;49mSysroot cleaned\033[0m"
endif
# Invoke clean for one or more targets separated by comma
@ -44,7 +78,7 @@ c.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo clean $(foreach f,$(subst $(comma), ,$*),$(f))
$(REPO_BIN) clean $(foreach f,$(subst $(comma), ,$*),$(f))
endif
# Invoke fetch for one or more targets separated by comma
@ -54,17 +88,25 @@ ifeq ($(PODMAN_BUILD),1)
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo fetch $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
$(REPO_BIN) fetch $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
# Invoke repo.sh for one or more targets separated by comma
r.%: $(FSTOOLS_TAG) FORCE
# Invoke cook for one or more targets separated by comma
r.%: prefix $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
export PATH="$(PREFIX_PATH):$$PATH" && \
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
./target/release/repo cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
$(REPO_BIN) cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
# Show what to cook
rt.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(REPO_BIN) cook-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
MOUNTED_TAG=$(MOUNT_DIR)~
@ -82,12 +124,12 @@ endif
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
else
./target/release/repo push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)"
$(REPO_BIN) push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)"
endif
ifeq ($(ALLOW_FSTOOLS),1)
@if [ -f $(MOUNTED_TAG) ]; then \
$(MAKE) unmount && rm -f $(MOUNTED_TAG) && echo "Filesystem unmounted"; \
else echo "Not unmounting by ourself, don't forget to do it"; \
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
else echo "\033[0;33;49mNot unmounting by ourself, don't forget to do it\033[0m"; \
fi
endif
@ -95,6 +137,18 @@ endif
pp.%: $(FSTOOLS_TAG) FORCE
$(MAKE) p.$*,--with-package-deps
# Show what to push
pt.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
endif
# Show what to push (with deps)
ppt.%: prefix $(FSTOOLS_TAG) FORCE
$(MAKE) pt.$*,--with-package-deps
# Push all recipes specified by the filesystem config
push: $(FSTOOLS_TAG) FORCE
ifeq ($(ALLOW_FSTOOLS),1)
@ -107,12 +161,12 @@ endif
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
else
./target/release/repo push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)"
$(REPO_BIN) push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)"
endif
ifeq ($(ALLOW_FSTOOLS),1)
@if [ -f $(MOUNTED_TAG) ]; then \
$(MAKE) unmount && rm -f $(MOUNTED_TAG) && echo "Filesystem unmounted"; \
else echo "Not unmounting by ourself, don't forget to do it"; \
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
else echo "\033[1;33;49mNot unmounting by ourself, don't forget to do it\033[0m"; \
fi
endif
@ -121,7 +175,7 @@ u.%: $(FSTOOLS_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
./target/release/repo unfetch $(foreach f,$(subst $(comma), ,$*),$(f))
$(REPO_BIN) unfetch $(foreach f,$(subst $(comma), ,$*),$(f))
endif
# Invoke clean, and repo.sh for one of more targets separated by comma

View File

@ -105,55 +105,49 @@ osx_macports()
exit 1
fi
install_macports_pkg "coreutils"
install_macports_pkg "findutils"
install_macports_pkg "gcc14"
install_macports_pkg "nasm"
install_macports_pkg "pkgconfig"
install_macports_pkg "osxfuse"
install_macports_pkg "x86_64-elf-gcc"
install_macports_pkg "cmake"
install_macports_pkg "ninja"
install_macports_pkg "po4a"
install_macports_pkg "findutils"
install_macports_pkg "texinfo"
install_macports_pkg "autoconf"
install_macports_pkg "openssl3"
install_macports_pkg "openssl11"
install_macports_pkg "automake"
install_macports_pkg "bison"
install_macports_pkg "cmake"
install_macports_pkg "coreutils"
install_macports_pkg "curl"
install_macports_pkg "wget"
install_macports_pkg "file"
install_macports_pkg "flex"
install_macports_pkg "gperf"
install_macports_pkg "doxygen"
install_macports_pkg "expat"
install_macports_pkg "file"
install_macports_pkg "findutils"
install_macports_pkg "flex"
install_macports_pkg "gcc14"
install_macports_pkg "gdb +multiarch"
install_macports_pkg "gmake"
install_macports_pkg "gmp"
install_macports_pkg "libpng"
install_macports_pkg "gpatch"
install_macports_pkg "jpeg"
install_macports_pkg "libpng"
install_macports_pkg "libsdl12"
install_macports_pkg "libsdl2_ttf"
install_macports_pkg "libtool"
install_macports_pkg "m4"
install_macports_pkg "ninja"
install_macports_pkg "meson"
install_macports_pkg "python311"
install_macports_pkg "nasm"
install_macports_pkg "ninja"
install_macports_pkg "openssl11"
install_macports_pkg "openssl3"
install_macports_pkg "osxfuse"
install_macports_pkg "p5-html-parser"
install_macports_pkg "patchelf"
install_macports_pkg "perl5.24"
install_macports_pkg "pkgconfig"
install_macports_pkg "po4a"
install_macports_pkg "protobuf-c"
install_macports_pkg "py37-mako"
install_macports_pkg "python311"
install_macports_pkg "scons"
install_macports_pkg "texinfo"
install_macports_pkg "unzip"
install_macports_pkg "wget"
install_macports_pkg "x86_64-elf-gcc"
install_macports_pkg "xdg-utils"
install_macports_pkg "zip"
install_macports_pkg "unzip"
install_macports_pkg "llvm-18"
install_macports_pkg "clang-18"
install_macports_pkg "perl5.24"
install_macports_pkg "p5-html-parser"
install_macports_pkg "doxygen"
install_macports_pkg "gpatch"
install_macports_pkg "patchelf"
install_macports_pkg "automake"
install_macports_pkg "scons"
install_macports_pkg "gmake"
install_macports_pkg "lua"
install_macports_pkg "protobuf-c"
install_macports_pkg "gdb +multiarch"
}
############################################################################
@ -179,51 +173,46 @@ osx_homebrew()
exit 1
fi
install_brew_pkg "ant"
install_brew_pkg "autoconf"
install_brew_pkg "automake"
install_brew_pkg "bison"
install_brew_pkg "gettext"
install_brew_pkg "libtool"
install_brew_pkg "make"
install_brew_pkg "nasm"
install_brew_pkg "gcc@14"
install_brew_pkg "pkg-config"
install_brew_pkg "cmake"
install_brew_pkg "ninja"
install_brew_pkg "po4a"
install_brew_pkg "macfuse"
install_brew_pkg "curl"
install_brew_pkg "doxygen"
install_brew_pkg "expat"
install_brew_pkg "findutils"
install_brew_pkg "texinfo"
install_brew_pkg "flex"
install_brew_pkg "gcc@14"
install_brew_pkg "gdb"
install_brew_pkg "gettext"
install_brew_pkg "gmp"
install_brew_pkg "gpatch"
install_brew_pkg "jpeg"
install_brew_pkg "libpng"
install_brew_pkg "libtool"
install_brew_pkg "llvm"
install_brew_pkg "m4"
install_brew_pkg "macfuse"
install_brew_pkg "make"
install_brew_pkg "meson"
install_brew_pkg "nasm"
install_brew_pkg "ninja"
install_brew_pkg "openssl@1.1"
install_brew_pkg "openssl@3.0"
install_brew_pkg "autoconf"
install_brew_pkg "curl"
install_brew_pkg "wget"
install_brew_pkg "flex"
install_brew_pkg "gperf"
install_brew_pkg "expat"
install_brew_pkg "gmp"
install_brew_pkg "libpng"
install_brew_pkg "jpeg"
install_brew_pkg "patchelf"
install_brew_pkg "perl"
install_brew_pkg "pkg-config"
install_brew_pkg "po4a"
install_brew_pkg "protobuf"
install_brew_pkg "python@3.11"
install_brew_pkg "scons"
install_brew_pkg "sdl12-compat"
install_brew_pkg "sdl2_ttf"
install_brew_pkg "perl"
install_brew_pkg "libtool"
install_brew_pkg "m4"
install_brew_pkg "ninja"
install_brew_pkg "meson"
install_brew_pkg "python@3.11"
install_brew_pkg "zip"
install_brew_pkg "texinfo"
install_brew_pkg "unzip"
install_brew_pkg "llvm"
install_brew_pkg "doxygen"
install_brew_pkg "gpatch"
install_brew_pkg "patchelf"
install_brew_pkg "automake"
install_brew_pkg "scons"
install_brew_pkg "lua"
install_brew_pkg "ant"
install_brew_pkg "protobuf"
install_brew_pkg "gdb"
install_brew_pkg "wget"
install_brew_pkg "zip"
install_brew_pkg "redox-os/gcc_cross_compilers/x86_64-elf-gcc" "x86_64-elf-gcc"
}
@ -250,52 +239,48 @@ freebsd()
exit 1
fi
install_freebsd_pkg "coreutils"
install_freebsd_pkg "findutils"
install_freebsd_pkg "gcc"
install_freebsd_pkg "nasm"
install_freebsd_pkg "pkgconf"
install_freebsd_pkg "fusefs-libs3"
install_freebsd_pkg "cmake"
install_freebsd_pkg "gmake"
install_freebsd_pkg "wget"
install_freebsd_pkg "openssl"
install_freebsd_pkg "texinfo"
install_freebsd_pkg "python"
install_freebsd_pkg "automake"
install_freebsd_pkg "gettext"
install_freebsd_pkg "bison"
install_freebsd_pkg "gperf"
install_freebsd_pkg "autoconf"
install_freebsd_pkg "automake"
install_freebsd_pkg "bison"
install_freebsd_pkg "cmake"
install_freebsd_pkg "coreutils"
install_freebsd_pkg "curl"
install_freebsd_pkg "file"
install_freebsd_pkg "flex"
install_freebsd_pkg "doxygen"
install_freebsd_pkg "expat2"
install_freebsd_pkg "file"
install_freebsd_pkg "findutils"
install_freebsd_pkg "flex"
install_freebsd_pkg "fusefs-libs3"
install_freebsd_pkg "gcc"
install_freebsd_pkg "gdb"
install_freebsd_pkg "gettext"
install_freebsd_pkg "gmake"
install_freebsd_pkg "gmp"
install_freebsd_pkg "png"
install_freebsd_pkg "libjpeg-turbo"
install_freebsd_pkg "sdl12"
install_freebsd_pkg "sdl2_ttf"
install_freebsd_pkg "perl5.36"
install_freebsd_pkg "p5-HTML-Parser"
install_freebsd_pkg "libtool"
install_freebsd_pkg "m4"
install_freebsd_pkg "po4a"
install_freebsd_pkg "syslinux"
install_freebsd_pkg "ninja"
install_freebsd_pkg "meson"
install_freebsd_pkg "xdg-utils"
install_freebsd_pkg "zip"
install_freebsd_pkg "unzip"
install_freebsd_pkg "llvm"
install_freebsd_pkg "doxygen"
install_freebsd_pkg "nasm"
install_freebsd_pkg "ninja"
install_freebsd_pkg "openssl"
install_freebsd_pkg "p5-HTML-Parser"
install_freebsd_pkg "patch"
install_freebsd_pkg "patchelf"
install_freebsd_pkg "automake"
install_freebsd_pkg "scons"
install_freebsd_pkg "lua54"
install_freebsd_pkg "perl5.36"
install_freebsd_pkg "pkgconf"
install_freebsd_pkg "png"
install_freebsd_pkg "po4a"
install_freebsd_pkg "py-protobuf-compiler"
install_freebsd_pkg "gdb"
install_freebsd_pkg "python"
install_freebsd_pkg "scons"
install_freebsd_pkg "sdl12"
install_freebsd_pkg "sdl2_ttf"
install_freebsd_pkg "syslinux"
install_freebsd_pkg "texinfo"
install_freebsd_pkg "unzip"
install_freebsd_pkg "wget"
install_freebsd_pkg "xdg-utils"
install_freebsd_pkg "zip"
set +x
}
@ -315,51 +300,46 @@ archLinux()
fi
echo "Detected Arch Linux"
packages="cmake \
fuse \
git \
gperf \
perl-html-parser \
nasm \
wget \
texinfo \
bison \
flex \
po4a \
packages="ant \
autoconf \
automake \
bison \
cmake \
curl \
doxygen \
expat \
file \
flex \
fuse \
gdb \
git \
gmp \
libjpeg-turbo \
libpng \
libtool \
m4 \
make \
meson \
nasm \
patch \
patchelf \
automake \
scons \
waf \
expat \
gmp \
libtool \
libpng \
libjpeg-turbo \
sdl12-compat \
m4 \
perl \
perl-html-parser \
pkgconf \
po4a \
syslinux \
meson \
protobuf \
python \
python-mako \
make \
xdg-utils \
zip \
unzip \
llvm \
clang \
perl \
doxygen \
lua \
ant \
protobuf \
rsync \
gdb"
scons \
sdl12-compat \
syslinux \
texinfo \
unzip \
waf \
wget \
xdg-utils \
zip"
if [ "$1" == "qemu" ]; then
packages="$packages qemu-system-x86 qemu-system-arm qemu-system-riscv"
@ -427,16 +407,14 @@ ubuntu()
flex \
fuse3 \
g++ \
gdb-multiarch \
genisoimage \
git \
git-lfs \
gperf \
gtk-doc-tools \
help2man \
intltool \
libc6-dev-i386 \
libexpat-dev \
libfontconfig1-dev \
libfuse3-dev \
libgdk-pixbuf2.0-bin \
libglib2.0-dev-bin \
@ -445,7 +423,6 @@ ubuntu()
libjpeg-dev \
libmpfr-dev \
libparse-yapp-perl \
libpng-dev \
libsdl1.2-dev \
libsdl2-ttf-dev \
llvm \
@ -481,9 +458,7 @@ ubuntu()
xutils-dev \
xxd \
zip \
zlib1g-dev \
zstd \
gdb-multiarch"
zstd"
# Not availible for at least ARM hosts
case "$host_arch" in
x86*|i?86) pkgs="$pkgs libc6-dev-i386 syslinux-utils";;
@ -564,63 +539,57 @@ fedora()
# Use rpm -q <package> to check if it's already installed
PKGS=$(for pkg in @development-tools \
file \
ant \
autoconf \
vim \
automake \
bison \
flex \
genisoimage \
gperf \
glibc-devel.i686 \
cmake \
curl \
doxygen \
expat \
expat-devel \
file \
flex \
fuse-devel \
fuse3-devel \
gmp-devel \
libpng-devel \
perl \
perl-HTML-Parser \
libtool \
libjpeg-turbo-devel \
SDL2_ttf-devel \
sdl12-compat-devel \
m4 \
nasm \
po4a \
syslinux \
texinfo \
ninja-build \
meson \
waf \
python3-mako \
make \
gcc \
gcc-c++ \
gdb \
genisoimage \
gettext-devel \
glibc-devel.i686 \
gmp-devel \
help2man \
libjpeg-turbo-devel \
libpng-devel \
libtool \
lzip \
m4 \
make \
meson \
nasm \
ninja-build \
openssl \
patch \
patchelf \
automake \
perl-Pod-Html \
perl \
perl-FindBin \
gperf \
curl \
gettext-devel \
perl-HTML-Parser \
perl-Pod-Html \
perl-Pod-Xhtml \
pkgconf-pkg-config \
cmake \
llvm \
zip \
unzip \
lua \
luajit \
make \
clang \
doxygen \
ant \
po4a \
protobuf-compiler \
zstd \
lzip \
gdb ; do rpm -q $pkg > /dev/null || echo $pkg; done)
python3-mako \
SDL2_ttf-devel \
sdl12-compat-devel \
syslinux \
texinfo \
unzip \
vim \
waf \
zip \
zstd ; do rpm -q $pkg > /dev/null || echo $pkg; done)
# If the list of packages is not empty, install missing
COUNT=$(echo $PKGS | wc -w)
if [ $COUNT -ne 0 ]; then
@ -638,51 +607,46 @@ suse()
echo "Detected SUSE Linux"
packages=(
"ant"
"autoconf"
"automake"
"bison"
"cmake"
"curl"
"doxygen"
"file"
"flex"
"fuse-devel"
"gcc"
"gcc-c++"
"glibc-devel-32bit"
"nasm"
"make"
"fuse-devel"
"cmake"
"openssl"
"automake"
"gdb-multiarch"
"gettext-tools"
"libtool"
"po4a"
"patch"
"flex"
"gperf"
"autoconf"
"bison"
"curl"
"wget"
"file"
"libexpat-devel"
"glibc-devel-32bit"
"gmp-devel"
"libpng16-devel"
"libexpat-devel"
"libjpeg8-devel"
"perl"
"perl-HTML-Parser"
"libpng16-devel"
"libtool"
"m4"
"make"
"meson"
"nasm"
"ninja"
"openssl"
"patch"
"patchelf"
"scons"
"perl"
"perl-HTML-Parser"
"pkgconf"
"syslinux-utils"
"ninja"
"meson"
"po4a"
"protobuf"
"python-Mako"
"scons"
"syslinux-utils"
"unzip"
"wget"
"xdg-utils"
"zip"
"unzip"
"llvm"
"clang"
"doxygen"
"lua54"
"ant"
"protobuf"
"gdb-multiarch"
)
if [ -z "$(which git)" ]; then
@ -843,33 +807,116 @@ solus()
echo "Installing necessary build tools..."
#if guards are not necessary with eopkg since it does nothing if latest version is already installed
sudo eopkg it fuse-devel \
git \
gcc \
g++ \
libgcc-32bit \
libstdc++-32bit \
nasm \
make \
cmake \
binutils-gold \
glibc-devel \
pkg-config \
fuse2-devel \
linux-headers \
rsync \
sudo eopkg it autoconf \
automake \
autoconf \
m4 \
binutils-gold \
bison \
cmake \
flex \
fuse-devel \
fuse2-devel \
g++ \
gcc \
glibc-devel \
git \
libgcc-32bit \
libpng-devel \
libstdc++-32bit \
libtool-devel \
po4a \
linux-headers \
m4 \
make \
nasm \
patch \
patchelf \
bison \
flex \
gperf \
libpng-devel \
perl-html-parser
perl-html-parser \
pkg-config \
po4a \
rsync
}
###############################################################################
# Helper function to detect if we're running on Redox OS
# This needs to be checked before FreeBSD since both use 'pkg' package manager
###############################################################################
is_os_redox()
{
[ "$(uname -s)" = "Redox" ]
}
###############################################################################
# This function takes care of installing all dependencies for building Redox on
# Redox OS itself (bootstrapping Redox on Redox)
# @params: $1 the emulator to install, "virtualbox" or "qemu"
###############################################################################
redox()
{
echo "Detected Redox OS"
# Check if git is installed
if [ -z "$(which git)" ]; then
echo "Installing git..."
sudo pkg install git
fi
# Handle emulator selection
if [ "$1" == "qemu" ]; then
echo "QEMU is not available on Redox OS yet, but it is mandatory for running the built system."
echo "Please install QEMU manually on a compatible host or use another machine to run the emulator."
exit 1
elif [ "$1" == "virtualbox" ]; then
echo "VirtualBox is not supported on Redox OS."
exit 1
else
echo "Unknown emulator: $1"
exit 1
fi
echo "Installing necessary build tools..."
# Core development packages that are available on x86_64 Redox
# This list is based on list of "cookbook" and "dev-essential" recipe
packages="autoconf \
automake \
cbindgen \
expat \
gcc13 \
gcc13.cxx \
git \
gnu-grep \
gnu-make \
installer \
libgmp \
libjpeg \
libpng \
nasm \
patch \
pkgar \
pkg-config \
rust \
rustpython \
sdl1 \
sdl2-ttf \
vim"
# Try to install packages, but don't fail if some are unavailable
# since Redox package ecosystem is still developing
for pkg in $PKGS; do
if ! pkg list | grep -q "^${pkg}"; then
echo "Attempting to install ${pkg}..."
if ! sudo pkg install ${pkg} 2>/dev/null; then
echo "Warning: ${pkg} could not be installed. It may not be available yet."
fi
else
echo "${pkg} is already installed."
fi
done
echo ""
echo "Note: Building Redox on Redox itself is experimental."
echo "Some dependencies may not be available yet in the Redox package repository."
echo "For the best build experience, consider using podman_bootstrap.sh on another system."
}
######################################################################
@ -906,6 +953,10 @@ usage()
#############################################################
cargoInstall()
{
if is_os_redox ; then
# in redox OS, cargo is not based on rustup. Packages are managed by pkg
return 0
fi
if [[ "`cargo +stable install --list`" != *"$1 v$2"* ]]; then
cargo +stable install --force --version "$2" "$1"
else
@ -921,6 +972,10 @@ cargoInstall()
#############################################################################
rustInstall()
{
if is_os_redox ; then
# in redox OS, rustup is not available. Packages are managed by pkg
return 0
fi
noninteractive=$1
# Check to see if multirust is installed, we don't want it messing with rustup
# In the future we can probably remove this but I believe it's good to have for now
@ -1097,8 +1152,11 @@ if [ "Darwin" == "$(uname -s)" ]; then
else
# Here we will use package managers to determine which operating system the user is using.
# Redox OS
if is_os_redox; then
redox "$emulator"
# SUSE and derivatives
if hash 2>/dev/null zypper; then
elif hash 2>/dev/null zypper; then
suse "$emulator"
# Debian or any derivative of it
elif hash 2>/dev/null apt-get; then

View File

@ -4,7 +4,6 @@ FROM docker.io/library/debian:trixie
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ant \
appstream \
appstream-compose \
autoconf \
@ -27,29 +26,20 @@ RUN apt-get update \
git \
git-lfs \
gobject-introspection \
gperf \
gtk-doc-tools \
gtk-update-icon-cache \
help2man \
ipxe-qemu \
intltool \
itstool \
libaudiofile-dev \
libdbus-glib-1-dev-bin \
libexpat-dev \
libfontconfig1-dev \
libfuse3-dev \
libgdk-pixbuf2.0-bin \
libglib2.0-dev-bin \
libgmp-dev \
libhtml-parser-perl \
libjpeg-dev \
libmpfr-dev \
libparse-yapp-perl \
libpng-dev \
librsvg2-common \
libsdl1.2-dev \
libsdl2-ttf-dev \
libxml2-utils \
lzip \
m4 \
make \
@ -63,8 +53,12 @@ RUN apt-get update \
pkg-config \
po4a \
protobuf-compiler \
qemu-system-x86 \
qemu-system-arm \
qemu-efi-aarch64 \
python3 \
python3-dev \
python3-libxml2 \
python3-mako \
python3-venv \
rsync \
@ -77,12 +71,10 @@ RUN apt-get update \
wget \
xdg-utils \
xfonts-utils \
xorg-dev \
xserver-xorg-dev \
xutils-dev \
xxd \
zip \
zlib1g-dev \
zstd \
&& if [ "$(uname -m)" = "x86_64" ]; then \
apt-get install -y --no-install-recommends \
libc6-dev-i386 \

View File

@ -1,21 +1,20 @@
#/usr/bin/env bash
#!/usr/bin/env bash
# This must be run outside podman build so the build/podman volume mount to /root contains all home folder changes
set -ex
# This script install the Rust toolchain and the build system dependencies
# in Podman after the image has been built
echo "Installing rust..."
curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal
echo Installing rust...
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --profile minimal
echo "Downloading sccache..."
SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-$(uname -m)-unknown-linux-musl.tar.gz"
wget -qO- --show-progress "${SCCACHE_URL}" | tar -xz -C ~/.cargo/bin --strip-components=1 --wildcards '*/sccache'
echo Downloading sccache...
SCCACHE_URL=https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-$(uname -m)-unknown-linux-musl.tar.gz
wget -qO- --show-progress $SCCACHE_URL | tar -xz -C ~/.cargo/bin --strip-components=1 --wildcards '*/sccache'
echo "Downloading just..."
JUST_URL="https://github.com/casey/just/releases/download/1.45.0/just-1.45.0-$(uname -m)-unknown-linux-musl.tar.gz"
wget -qO- --show-progress "${JUST_URL}" | tar -xz -C ~/.cargo/bin --wildcards 'just'
echo Downloading just...
JUST_URL=https://github.com/casey/just/releases/download/1.45.0/just-1.45.0-$(uname -m)-unknown-linux-musl.tar.gz
wget -qO- --show-progress $JUST_URL | tar -xz -C ~/.cargo/bin --wildcards 'just'
echo Downloading cbindgen...
CBINDGEN_NAME=$( [[ $(uname -m) = "x86_64" ]] && echo "ubuntu22.04" || echo "ubuntu22.04-aarch64" )
CBINDGEN_URL=https://github.com/mozilla/cbindgen/releases/download/0.29.0/cbindgen-$CBINDGEN_NAME
wget -qO- --show-progress $CBINDGEN_URL > ~/.cargo/bin/cbindgen
echo "Downloading cbindgen..."
CBINDGEN_NAME="$( [ "$(uname -m)" = "x86_64" ] && echo "ubuntu22.04" || echo "ubuntu22.04-aarch64" )"
CBINDGEN_URL="https://github.com/mozilla/cbindgen/releases/download/0.29.0/cbindgen-${CBINDGEN_NAME}"
wget -qO- --show-progress "${CBINDGEN_URL}" > ~/.cargo/bin/cbindgen
chmod +x ~/.cargo/bin/cbindgen

View File

@ -6,8 +6,11 @@ patches = [
[build]
template = "custom"
script = """
DYNAMIC_INIT
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"
"""

View File

@ -66,18 +66,12 @@ case "${TARGET}" in
esac
rm -rf "${COOKBOOK_BUILD}/initfs"
mkdir -p "${COOKBOOK_BUILD}/initfs/etc"
mkdir -p "${COOKBOOK_BUILD}/initfs/lib/init.d"
cp "${COOKBOOK_SOURCE}/init.rc" "${COOKBOOK_BUILD}/initfs/etc/init.rc"
cp "${COOKBOOK_SOURCE}/init_drivers.rc" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
if [ -e ${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc.${BOARD} ]; then
cp "${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc.${BOARD}" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
elif [ -e ${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc ]; then
cp "${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
fi
cp "${COOKBOOK_SOURCE}/init.d"/* "${COOKBOOK_BUILD}/initfs/lib/init.d/"
mkdir -pv "${COOKBOOK_BUILD}/initfs/etc/pcid"
cp -v "${COOKBOOK_SOURCE}/drivers/initfs.toml" "${COOKBOOK_BUILD}/initfs/etc/pcid/initfs.toml"
mkdir -pv "${COOKBOOK_BUILD}/initfs/lib/pcid.d"
cp -v "${COOKBOOK_SOURCE}/drivers/initfs.toml" "${COOKBOOK_BUILD}/initfs/lib/pcid.d/initfs.toml"
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
export CARGO_PROFILE_RELEASE_PANIC=abort
@ -98,11 +92,6 @@ do
esac
done
# TODO: symlinks aren't supported by redox-initfs
#ln -sv zerod "${COOKBOOK_BUILD}/initfs/bin/nulld"
cp "${COOKBOOK_BUILD}/initfs/bin/zerod" "${COOKBOOK_BUILD}/initfs/bin/nulld"
cp "${COOKBOOK_SYSROOT}/usr/bin/redoxfs" "${COOKBOOK_BUILD}/initfs/bin"
ARCH="$(echo "${GNU_TARGET}" | cut -d - -f1)"
@ -120,8 +109,8 @@ RUSTFLAGS="$RUSTFLAGS -Ctarget-feature=+crt-static" cargo \
-z max-page-size=4096 \
"${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
env -u CARGO cargo run --manifest-path "${COOKBOOK_SOURCE}/initfs/tools/Cargo.toml" --bin redox-initfs-ar -- "${COOKBOOK_BUILD}/initfs" "${COOKBOOK_BUILD}/bootstrap" -o "${COOKBOOK_BUILD}/initfs.img"
env -u CARGO -u RUSTFLAGS cargo run --manifest-path "${COOKBOOK_SOURCE}/initfs/tools/Cargo.toml" --bin redox-initfs-ar -- "${COOKBOOK_BUILD}/initfs" "${COOKBOOK_BUILD}/bootstrap" -o "${COOKBOOK_BUILD}/initfs.img"
mkdir -v "${COOKBOOK_STAGE}/boot"
cp "${COOKBOOK_BUILD}/initfs.img" "${COOKBOOK_STAGE}/boot/initfs"
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
cp "${COOKBOOK_BUILD}/initfs.img" "${COOKBOOK_STAGE}/usr/lib/boot/initfs"
"""

View File

@ -23,7 +23,6 @@ cp -v \
# Drivers that are built on all architectures, and NOT in drivers-initfs
BINS=(
alxd
e1000d
ihdad
ihdgd
@ -68,13 +67,10 @@ do
fi
done
mkdir -pv "${COOKBOOK_STAGE}/etc/pcid"
cp -v "${COOKBOOK_SOURCE}/drivers/initfs.toml" "${COOKBOOK_STAGE}/etc/pcid/initfs.toml"
mkdir -pv "${COOKBOOK_STAGE}/etc/pcid.d"
mkdir -pv "${COOKBOOK_STAGE}/lib/pcid.d"
${FIND} "${COOKBOOK_SOURCE}/drivers" -maxdepth 3 -type f -name 'config.toml' | while read conf
do
driver="$(basename "$(dirname "$conf")")"
cp -v "$conf" "${COOKBOOK_STAGE}/etc/pcid.d/$driver.toml"
cp -v "$conf" "${COOKBOOK_STAGE}/lib/pcid.d/$driver.toml"
done
"""

View File

@ -5,14 +5,14 @@ git = "https://gitlab.redox-os.org/redox-os/bootloader.git"
template = "custom"
script = """
OUTDIR="${COOKBOOK_BUILD}"
mkdir -v "${COOKBOOK_STAGE}/boot"
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
function bootloader {
export TARGET="$1"
src="$2"
dst="$3"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" -f "${COOKBOOK_SOURCE}/Makefile" -C "${OUTDIR}" "${OUTDIR}/${src}"
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/boot/${dst}"
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/usr/lib/boot/${dst}"
}
ARCH="$(echo "${TARGET}" | cut -d - -f1)"

View File

@ -2,8 +2,7 @@
git = "https://gitlab.redox-os.org/redox-os/findutils.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo --bin find
"""
template = "cargo"
cargoflags = [
"--bin find"
]

View File

@ -5,6 +5,6 @@ git = "https://gitlab.redox-os.org/redox-os/kernel.git"
template = "custom"
script = """
make -f ${COOKBOOK_SOURCE}/Makefile
mkdir -v "${COOKBOOK_STAGE}/boot"
cp -v kernel "${COOKBOOK_STAGE}/boot"
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
cp -v kernel "${COOKBOOK_STAGE}/usr/lib/boot"
"""

View File

@ -3,4 +3,10 @@ git = "https://gitlab.redox-os.org/redox-os/pkgar.git"
[build]
template = "cargo"
package_path = "pkgar"
cargopackages = [
"pkgar",
"pkgar-keys",
]
cargoflags = [
"--features cli"
]

View File

@ -5,6 +5,6 @@ git = "https://gitlab.redox-os.org/redox-os/pkgutils.git"
template = "custom"
script = """
# Must be statically linked
PACKAGE_PATH=pkg-cli
COOKBOOK_CARGO_PATH=pkg-cli
cookbook_cargo
"""

View File

@ -1,9 +0,0 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/redoxer.git"
[build]
template = "custom"
script = """
COOKBOOK_SOURCE="${COOKBOOK_SOURCE}/daemon"
cookbook_cargo
"""

View File

@ -4,10 +4,22 @@ git = "https://gitlab.redox-os.org/redox-os/relibc.git"
[build]
template = "custom"
script = """
# obscure crash if jobs number is too much
COOKBOOK_MAKE_JOBS="$(( ${COOKBOOK_MAKE_JOBS} > 8 ? 8 : ${COOKBOOK_MAKE_JOBS} ))"
# rustup workaround https://github.com/rust-lang/rustup/issues/988
if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then
if command -v rustup >/dev/null 2>&1; then
pushd ${COOKBOOK_SOURCE}
${RUSTUP:-rustup} install
popd
fi
fi
export CARGO=${CARGO:-env -u CARGO cargo}
"${COOKBOOK_MAKE}" \
-C "${COOKBOOK_SOURCE}" \
-j"$($NPROC)" \
CARGO="env -u CARGO cargo" \
DESTDIR="${COOKBOOK_STAGE}" \
-j"${COOKBOOK_MAKE_JOBS}" \
DESTDIR="${COOKBOOK_STAGE}/usr" \
install
"""

View File

@ -1,12 +1,19 @@
# TODO Fix coreutils i18n/l10n behavior on Redox
# TODO waiting for rustix bump before removing patches
# TODO Fix locale init bug on aarch64 before removing patches
[source]
git = "https://github.com/uutils/coreutils"
rev = "aa218a30aca43fd1805841357ff885afbd9090c3"
patches = [
"redox.patch"
]
[build]
template = "custom"
script = """
DYNAMIC_INIT
CARGO_PROFILE_RELEASE_LTO=thin cookbook_cargo --no-default-features --features feat_os_unix_redox --bin coreutils
# TODO: upstream changes, consider using feat_require_unix_core if relibc is ready?
CARGO_PROFILE_RELEASE_LTO=thin cookbook_cargo --no-default-features --features feat_os_unix_redox,kill --bin coreutils
BINS=(
'['
@ -42,6 +49,7 @@ BINS=(
head
join
install
kill
link
ln
ls
@ -51,6 +59,7 @@ BINS=(
more
mv
nl
nproc
numfmt
od
paste

View File

@ -0,0 +1,120 @@
diff --git a/Cargo.lock b/Cargo.lock
index 49bf30262..37b5a89ec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2476,9 +2476,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.1.3"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
+checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
dependencies = [
"bitflags 2.10.0",
"errno",
@@ -2786,9 +2786,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
-version = "3.24.0"
+version = "3.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c"
+checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16"
dependencies = [
"fastrand",
"getrandom 0.3.4",
diff --git a/Cargo.toml b/Cargo.toml
index 3c8fea771..b04ac85a3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -265,6 +265,7 @@ feat_os_unix_redox = [
"feat_common_core",
#
"chmod",
+ "nproc",
"stat",
"uname",
]
diff --git a/src/uucore/src/lib/features/fs.rs b/src/uucore/src/lib/features/fs.rs
index a783d04ea..33967f5de 100644
--- a/src/uucore/src/lib/features/fs.rs
+++ b/src/uucore/src/lib/features/fs.rs
@@ -839,23 +839,39 @@ pub fn make_fifo(path: &Path) -> std::io::Result<()> {
}
// Redox's libc appears not to include the following utilities
+// TODO: Waiting for rustix release that includes https://github.com/rust-lang/libc/commit/76e737e
-#[cfg(target_os = "redox")]
+#[cfg(all(target_os = "redox", target_pointer_width = "64"))]
pub fn major(dev: libc::dev_t) -> libc::c_uint {
(((dev >> 8) & 0xFFF) | ((dev >> 32) & 0xFFFFF000)) as _
}
-#[cfg(target_os = "redox")]
+#[cfg(all(target_os = "redox", target_pointer_width = "64"))]
pub fn minor(dev: libc::dev_t) -> libc::c_uint {
((dev & 0xFF) | ((dev >> 12) & 0xFFFFF00)) as _
}
-#[cfg(target_os = "redox")]
+#[cfg(all(target_os = "redox", target_pointer_width = "64"))]
pub fn makedev(maj: libc::c_uint, min: libc::c_uint) -> libc::dev_t {
let [maj, min] = [maj as libc::dev_t, min as libc::dev_t];
(min & 0xff) | ((maj & 0xfff) << 8) | ((min & !0xff) << 12) | ((maj & !0xfff) << 32)
}
+#[cfg(all(target_os = "redox", target_pointer_width = "32"))]
+pub fn major(_: libc::dev_t) -> libc::c_uint {
+ 0
+}
+
+#[cfg(all(target_os = "redox", target_pointer_width = "32"))]
+pub fn minor(_: libc::dev_t) -> libc::c_uint {
+ 0
+}
+
+#[cfg(all(target_os = "redox", target_pointer_width = "32"))]
+pub fn makedev(_: libc::c_uint, _: libc::c_uint) -> libc::dev_t {
+ 0
+}
+
#[cfg(test)]
mod tests {
// Note this useful idiom: importing names from outer (for mod tests) scope.
diff --git a/src/uucore/src/lib/mods/locale.rs b/src/uucore/src/lib/mods/locale.rs
index ec9a78b43..2faccec5c 100644
--- a/src/uucore/src/lib/mods/locale.rs
+++ b/src/uucore/src/lib/mods/locale.rs
@@ -195,10 +195,11 @@ fn init_localization(
}
};
- LOCALIZER.with(|lock| {
+ // TODO: In aarch64 redox OS, this lock (once cell) is already initialized out of nothing
+ let _ = LOCALIZER.with(|lock| {
lock.set(loc)
.map_err(|_| LocalizationError::Bundle("Localizer already initialized".into()))
- })?;
+ });
Ok(())
}
@@ -400,10 +401,12 @@ pub fn setup_localization(p: &str) -> Result<(), LocalizationError> {
let english_bundle = create_english_bundle_from_embedded(&default_locale, p)?;
let localizer = Localizer::new(english_bundle);
- LOCALIZER.with(|lock| {
+ // TODO: In aarch64 redox OS, this lock (once cell) is already initialized out of nothing
+ // TODO: When this code is used? Patching for keep sake
+ let _ = LOCALIZER.with(|lock| {
lock.set(localizer)
.map_err(|_| LocalizationError::Bundle("Localizer already initialized".into()))
- })?;
+ });
Ok(())
}
}

View File

@ -15,11 +15,11 @@ template = "custom"
script = """
"${CXX}" \
$("${PKG_CONFIG}" --cflags cairo) \
"${COOKBOOK_RECIPE}/cairodemo.c" \
-o cairodemo \
"${COOKBOOK_RECIPE}/cairo-demo.c" \
-o cairo-demo \
-static \
$("${PKG_CONFIG}" --libs cairo) \
-lorbital
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "cairodemo" "${COOKBOOK_STAGE}/bin/cairodemo"
cp -v "cairo-demo" "${COOKBOOK_STAGE}/bin/cairo-demo"
"""

View File

@ -2,7 +2,7 @@
git = "https://gitlab.redox-os.org/redox-os/orbclient.git"
[build]
template = "custom"
script = """
cookbook_cargo_examples simple
"""
template = "cargo"
cargoexamples = [
"simple"
]

View File

@ -9,8 +9,8 @@ cookbook_cargo
mkdir -pv "${COOKBOOK_STAGE}/apps/pixelcannon"
cp -Rv "${COOKBOOK_SOURCE}/assets" "${COOKBOOK_STAGE}/apps/pixelcannon"
mkdir -pv "${COOKBOOK_STAGE}/ui/apps"
cp -v "${COOKBOOK_SOURCE}/manifest" "${COOKBOOK_STAGE}/ui/apps/pixelcannon"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps"
cp -v "${COOKBOOK_SOURCE}/manifest" "${COOKBOOK_STAGE}/usr/share/ui/apps/pixelcannon"
"""
[package]

Some files were not shown because too many files have changed in this diff Show More