Compare commits

..

No commits in common. "master" and "0.9.0" have entirely different histories.

3603 changed files with 3716 additions and 70612 deletions

View File

@ -1,22 +0,0 @@
[target.aarch64-unknown-redox]
linker = "aarch64-unknown-redox-gcc"
rustflags = []
[target.i586-unknown-redox]
linker = "i586-unknown-redox-gcc"
rustflags = []
[target.i686-unknown-redox]
linker = "i686-unknown-redox-gcc"
rustflags = []
[target.x86_64-unknown-redox]
linker = "x86_64-unknown-redox-gcc"
rustflags = []
[target.riscv64gc-unknown-redox]
linker = "riscv64-unknown-redox-gcc"
rustflags = []
[env]
CFLAGS_riscv64gc_unknown_redox="-march=rv64gc -mabi=lp64d"

13
.gitignore vendored
View File

@ -10,16 +10,3 @@
.vscode/
# Local settings folder for the devcontainer extension that most IDEs support.
.devcontainer/
# Cookbook
/repo
/web
/cookbook.toml
/cookbook.lock
source
source.tmp
source-new
source-old
source.tar
source.tar.tmp
target
wget-log

View File

@ -1,57 +0,0 @@
# The GitLab Continuous Integration configuration
variables:
GIT_STRATEGY: "clone"
stages:
- lint
- test
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
cargo-test:
image: "rust:trixie"
stage: lint
script:
- cargo test --locked
fetch-changed:
image: "redoxos/redox-base-x86_64"
stage: test
script:
- |
export PATH="$HOME/.cargo/bin:$PATH" &&
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
cargo install cbindgen &&
env PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 ./scripts/fetch-changed.sh
img:
image: "redoxos/redox-base-x86_64"
stage: test
script:
- |
export PATH="$HOME/.cargo/bin:$PATH" &&
(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

21
.gitmodules vendored Normal file
View File

@ -0,0 +1,21 @@
[submodule "cookbook"]
path = cookbook
url = https://gitlab.redox-os.org/redox-os/cookbook.git
branch = master
[submodule "installer"]
path = installer
url = https://gitlab.redox-os.org/redox-os/installer.git
branch = master
[submodule "rust"]
path = rust
url = https://gitlab.redox-os.org/redox-os/rust.git
branch = redox-2024-05-11
update = none
[submodule "redoxfs"]
path = redoxfs
url = https://gitlab.redox-os.org/redox-os/redoxfs.git
branch = master
[submodule "relibc"]
path = relibc
url = https://gitlab.redox-os.org/redox-os/relibc.git
branch = master

View File

@ -4,8 +4,6 @@
This document will outline the basics of where to start if you wish to contribute to the project. There are many ways to help us out and and we appreciate all of them. We look forward to **your contribution!**
**Please read this document until the end to not waste your and our time with unnecessary questions**
## Code Of Conduct
We follow the [Rust Code Of Conduct](https://www.rust-lang.org/policies/code-of-conduct).
@ -16,169 +14,56 @@ In general, your contributions to Redox are governed by the [MIT License](https:
Please review the `LICENSE` file for the project you are contributing to.
[This](https://doc.redox-os.org/book/philosophy.html) page we explain why we use the MIT license.
## Contribution Terms
When making a contribution you agree to the following terms:
- I understand these changes in full and will be able to respond to review comments.
- I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions.
## AI Policy
Redox OS does not accept contributions generated by LLMs ([Large Language Models](https://en.wikipedia.org/wiki/Large_language_model)), sometimes also referred to as "AI". This policy is not open to discussion, any content submitted that is clearly labelled as LLM-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.
[This](https://doc.redox-os.org/book/ch01-02-philosophy.html) page we explain why we use the MIT license.
## Chat
You can join in our chat platforms to discuss development, issues or ask questions.
### [Matrix](https://matrix.to/#/#redox-join:matrix.org)
Matrix is the official way to talk with Redox OS team and community (these rooms are English-only, we don't accept other languages because we don't understand them).
Matrix has several different clients. [Element](https://element.io/) is a commonly used choice, it works on web browsers, Linux, MacOSX, Windows, Android and iOS.
If you have problems with Element, try [Fractal](https://gitlab.gnome.org/World/fractal).
- Join the [Join Requests](https://matrix.to/#/#redox-join:matrix.org) room and send a message requesting for an invite to the Redox Matrix space (the purpose of this is to avoid spam and bots).
- #redox-join:matrix.org (Use this Matrix room address if you don't want to use the external Matrix link)
(We recommend that you leave the "Join Requests" room after your entry on Redox space)
If you want to have a big discussion in our rooms, you should use a Element thread, it's more organized and easy to keep track if more discussions happen on the same room.
You cand find more information on the [Chat](https://doc.redox-os.org/book/chat.html) page.
### [Discord](https://discord.gg/JfggvrHGDY)
We have a Discord server as an alternative for Matrix, open the #join-requests channel and send a message requesting to be a member (the purpose of this is to avoid spam and bots)
The Matrix messages are sent to Discord and vice-versa using a bot, but sometimes some Discord messages aren't sent to Matrix (if this happens to you join in our Matrix space above)
## [GitLab](https://gitlab.redox-os.org/redox-os/redox)
A slightly more formal way of communication with fellow Redox developers, but a little less quick and convenient like the chat. Submit an issue when you run into problems compiling or testing. Issues can also be used if you would like to discuss a certain topic: be it features, code style, code inconsistencies, minor changes and fixes, etc.
If you want to create an account, read the [Signing in to GitLab](https://doc.redox-os.org/book/signing-in-to-gitlab.html) page.
Once you create an issue don't forget to post the link on the Dev or Support rooms of the chat, because the GitLab email notifications have distractions (service messages or spam) and most developers don't left their GitLab pages open to receive desktop notifications from the web browser (which require a custom setting to receive issue notifications).
By doing this you help us to pay attention to your issues and avoid them to be accidentally forgotten.
If you have ready MRs (merge requests) you must send the links in the [MRs](https://matrix.to/#/#redox-mrs:matrix.org) room. To join this room, you will need to request an invite in the [Join Requests](https://matrix.to/#/#redox-join:matrix.org) room.
By sending a message in the room, your MR will not be forgotten or accumulate conflicts.
## Best Practices and Guidelines
You can read the best practices and guidelines on the [Best practices and guidelines](https://doc.redox-os.org/book/best-practices.html) chapter.
## Notes
This section has important details to not waste your and our time with unnecessary questions.
- We don't accept Git pushs using SSH to protect against AI scrappers and bots, you need to use [HTTPS with your PAT](https://doc.redox-os.org/book/signing-in-to-gitlab.html#setting-up-pat) in our GitLab server
- For complete or advanced development you need the [Redox build system](https://doc.redox-os.org/book/podman-build.html) instead of Redoxer
- If you want to work on individual repositories without the Redox build system you need to use [Redoxer](https://gitlab.redox-os.org/redox-os/redoxer) because our toolchain is not fully upstreamed yet
## Development Recommendations and Tips
- Copy-paste prevent and reduce typos
- Comment out configuration or code while testing is better than removal, to remember the testing conditions and prevent mistakes from forgotten logic
- 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 the following 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
Since **Rust** is a relatively small and new language compared to others like C and C++, there's really only one standard. Just follow the official Rust standards for formatting, and maybe run `rustfmt` on your changes, until we setup the CI system to do it automatically.
### Git
Please follow our [Git style](https://doc.redox-os.org/book/creating-proper-pull-requests.html) for pull requests.
## GitLab
### Identity
Once your GitLab account is created, you should add your Matrix or Discord username (the name after the `@` symbol) on the "About" section of your profile, that way we recognize you properly.
### Issues
We use issues to organize and track our current and pending work, to know how to create issues on the Redox GitLab read the [Filing Issues](https://doc.redox-os.org/book/filing-issues.html) page.
Once you create an issue don't forget to post the link on the Dev or Support rooms of the chat, because the GitLab email notifications have distractions (service messages or spam) and most developers don't left their GitLab pages open to receive desktop notifications from the web browser (which require a custom setting to receive issue notifications).
By doing this you help us to pay attention to your issues and avoid them to be accidentally forgotten.
You can see all issues on [this](https://gitlab.redox-os.org/groups/redox-os/-/issues) link.
### Pull Requests
Please follow [our process](https://doc.redox-os.org/book/creating-proper-pull-requests.html) for creating proper pull requests.
Join us on [Matrix Chat](https://doc.redox-os.org/book/ch13-01-chat.html) to discuss issues or ask questions.
## Important Places to Contribute
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/).
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/).
You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest-to-hardest order):
You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest first):
- [Website](https://gitlab.redox-os.org/redox-os/website)
- [Book](https://gitlab.redox-os.org/redox-os/book) - High-level documentation
- [Build System Configuration](https://gitlab.redox-os.org/redox-os/redox) - Our main repository
- [Cookbook](https://gitlab.redox-os.org/redox-os/cookbook) - Software Ports System
- [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
- [netstack](https://gitlab.redox-os.org/redox-os/netstack) - Network Stack
- [Bootloader](https://gitlab.redox-os.org/redox-os/bootloader)
- [RedoxFS](https://gitlab.redox-os.org/redox-os/redoxfs) - Default filesystem
- [Base](https://gitlab.redox-os.org/redox-os/base) - Essential system components and drivers
- [Drivers](https://gitlab.redox-os.org/redox-os/drivers) - Device Drivers
- [Kernel](https://gitlab.redox-os.org/redox-os/kernel)
To see all Redox repositories open the [redox-os group](https://gitlab.redox-os.org/redox-os).
To see all Redox repositories open [this](https://gitlab.redox-os.org/redox-os) link.
### Skill Levels
If you don't know programming:
- Test the [daily images](https://static.redox-os.org/img/) on your computer and add the report on the [Hardware Compatibility](https://gitlab.redox-os.org/redox-os/redox/-/blob/master/HARDWARE.md) list
- Monitor and warn developers if the [daily images](https://static.redox-os.org/img/) are outdated
- Use/test Redox and create issues for bugs or needed features (please check for duplicates first)
- Fix and write documentation
- Find or fix typos in configuration
- Write documentation
- Use and test Redox, and file issues for bugs or needed features (please check for duplicates first etc.)
If you don't know how to code in Rust but know other programming languages:
If you don't know how to code in Rust, but know other programming languages:
- Web development on the website (we only accept minimal JavaScript code to preserve performance)
- Web development on the website (we don't accept JavaScript code)
- Write unit tests (may require minimal knowledge of Rust)
- Port C/C++ programs to Redox (read the `TODO`s of the recipes on the [WIP category](https://gitlab.redox-os.org/redox-os/redox/-/tree/master/recipes/wip))
- Port C/C++ programs to Redox (read the `TODO`s of the recipes on [this](https://gitlab.redox-os.org/redox-os/cookbook/-/tree/master/recipes/wip?ref_type=heads) category)
- Port programs to Redox
If you know how to code in Rust but don't know operating system development:
If you know how to code in Rust, but don't know operating system development:
- See the [easy](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=easy) issues
- See the "[good first issue](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=good%20first%20issue)" issues
- See the [help wanted](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=help%20wanted) issues (it's worth noting the skill level varies between projects, but a large subset of these should be approachable by contributors familiar with regular Rust/Unix application programming)
- Improve the package manager, or build system tooling like `redoxer` or `installer`
- Look for issues labeled "good first issue", "easy", and/or "help wanted", e.g. [this GitLab filter](https://gitlab.redox-os.org/groups/redox-os/-/issues/?sort=updated_desc&state=opened&or%5Blabel_name%5D%5B%5D=good%20first%20issue&or%5Blabel_name%5D%5B%5D=Easy&or%5Blabel_name%5D%5B%5D=easy&or%5Blabel_name%5D%5B%5D=help%20wanted&first_page_size=20]). Worth noting the skill level varies between projects, but a large subset of these should be approachable by contributors familiar with regular Rust/Unix application programming.
- Improve the package manager, or other meta-tools like `redoxer` or `installer`
- Improve the [Ion](https://gitlab.redox-os.org/redox-os/ion) shell, or other high-level or mid-level projects
- Port Rust programs (also look for issues with the `port` label)
- Improve application compatibility in relibc by e.g. implementing missing POSIX/Linux functions
- Port Rust programs to Redox, possibly including dependencies, and C library extensions if necessary (also look for issues with the `port` label)
- Improve program compatibility in relibc by e.g. implementing missing APIs
If you know how to code in Rust, and have experience with systems software/OS development:
@ -192,25 +77,15 @@ If you know how to code in Rust, and have experience with systems software/OS de
- Improve, profile, and optimize code, especially in the kernel, filesystem, and network stack
- Improve or write device drivers
For those who want to contribute to the Redox GUI, our GUI strategy has changed.
For those who want to contribute to the Redox GUI, our GUI strategy has recently changed.
- We are improving the [Orbital](https://gitlab.redox-os.org/redox-os/orbital) display server and window manager, you can read more about it on [this tracking issue](https://gitlab.redox-os.org/redox-os/redox/-/issues/1430).
- We are improving the [Orbital](https://gitlab.redox-os.org/redox-os/orbital) display server and window manager, you can read more about it on [this](https://gitlab.redox-os.org/redox-os/redox/-/issues/1430) tracking issue.
- Redox is in the process of adopting other Rust-written GUI toolkits, such as [Iced](https://iced.rs) and [Slint](https://slint-ui.com/). Please check out those projects if this is your area of interest.
- OrbTk is in maintenance mode, and its developers have moved to other projects such as the ones below. There is currently no Redox-specific GUI development underway.
## Priorities
## Tracking Issues Index
You can use the following GitLab issue label filters to know our development priorities on the moment:
- [Critical](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=critical)
- [High-priority](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=high-priority)
- [Medium-priority](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=medium-priority)
- [Low-priority](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=low-priority)
## Roadmap
We use tracking issues for the goals in our roadmap, you can see them in the filter below:
- [Tracking issues](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=tracking%20issue)
We use an index to track the development priorities, you can find them on [this](https://gitlab.redox-os.org/redox-os/redox/-/issues/1384) page.
## RFCs
@ -223,11 +98,11 @@ To download the build system use the following commands:
(You need to have [curl](https://curl.se/) installed on your system)
```sh
curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/podman_bootstrap.sh -o podman_bootstrap.sh
curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh
```
```sh
time bash -e podman_bootstrap.sh
time bash -e bootstrap.sh
```
To start the compilation of the default recipes run the command below:
@ -236,37 +111,61 @@ To start the compilation of the default recipes run the command below:
make all
```
In case your operating system does not use SELinux, you must set the `USE_SELINUX` to `0` when calling `make all`, otherwise you might experience errors:
```sh
make all USE_SELINUX=0
```
You can find the build system organization and commands on the [Build System](https://doc.redox-os.org/book/build-system-reference.html) page.
You can find the build system organization and commands on [this](https://doc.redox-os.org/book/ch08-06-build-system-reference.html) page.
## Developer FAQ
You can see the most common questions and problems on the [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html) page.
You can see the most common questions and problems on [this](https://doc.redox-os.org/book/ch09-07-developer-faq.html) page.
## Porting Software
You can read how to use the Cookbook recipe system to port applications on the [Application Porting](https://doc.redox-os.org/book/porting-applications.html) page.
**Always verify if a recipe for your program or library already exist before porting to not break the build system with a recipe duplication or waste time.**
You can read how to use the Cookbook recipe system to port applications on [this](https://doc.redox-os.org/book/ch09-03-porting-applications.html) page.
## Libraries and APIs
You can read the [Libraries and APIs](https://doc.redox-os.org/book/libraries-apis.html) page to learn about the libraries and APIs used in Redox.
You can read [this](https://doc.redox-os.org/book/ch09-06-libraries-apis.html) page to learn about the libraries and APIs used in Redox.
## Visual Studio Code (VS Code) Configuration
## Development Tips
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.
You can find important tips on [this](https://doc.redox-os.org/book/ch09-02-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.
We maintain a list of wikis, articles and videos to learn Rust, OS development and computer science on [this](https://doc.redox-os.org/book/ch09-08-references.html) page.
If you are skilled/experienced there's still a possibility that they could improve your knowledge in some way.
If you are skilled there's a possibility that they could improve your knowledge in some way.
## Best Practices and Guidelines
You can read the best practices and guidelines on [this](https://doc.redox-os.org/book/ch11-00-best-practices.html) chapter.
## Style Guidelines
### Rust
Since **Rust** is a relatively small and new language compared to others like C and C++, there's really only one standard. Just follow the official Rust standards for formatting, and maybe run `rustfmt` on your changes, until we setup the CI system to do it automatically.
### Git
Please follow our [Git style](https://doc.redox-os.org/book/ch12-04-creating-proper-pull-requests.html) for pull requests.
## GitLab
### Identity
Once your GitLab account is created, you should add your Matrix or Discord username (the name after the `@` symbol) on the "About" section of your profile, that way we recognize you properly.
### Issues
To know how to create issues on the Redox GitLab, read [this](https://doc.redox-os.org/book/ch12-05-filing-issues.html) page.
Once you create an issue don't forget to post the link on the Dev or Support rooms of the chat, because the GitLab email notifications have distractions (service messages or spam) and most developers don't left their GitLab pages open to receive desktop notifications from the web browser (which require a custom setting to receive issue notifications).
By doing this you help us to pay attention to your issues and avoid them to be accidentally forgotten.
### Pull Requests
Please follow [our process](https://doc.redox-os.org/book/ch12-04-creating-proper-pull-requests.html) for creating proper pull requests.
## Other Ways to Contribute
@ -279,8 +178,8 @@ If you're a good designer, whether it's 2D graphics, 3D graphics, interfaces, we
- [Redox backgrounds](https://gitlab.redox-os.org/redox-os/backgrounds) - You can send your wallpapers on this repository.
- [Redox assets](https://gitlab.redox-os.org/redox-os/assets) - You can send your logos, icons and themes on this repository.
If you have questions about the graphic design, ask us on the [Chat](https://doc.redox-os.org/book/chat.html).
If you have questions about the graphic design, ask us on the [Chat](https://doc.redox-os.org/book/ch13-01-chat.html).
### Donate to Redox
If you are interested in donating to the Redox OS Nonprofit, you can find instructions on the [Donate](https://www.redox-os.org/donate/) page.
If you are interested in donating to the Redox OS Nonprofit, you can find instructions [here](https://www.redox-os.org/donate/).

1490
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,57 +0,0 @@
[package]
name = "redox_cookbook"
version = "0.1.0"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
edition = "2024"
default-run = "repo"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "cookbook_redoxer"
path = "src/bin/cookbook_redoxer.rs"
[[bin]]
name = "repo"
path = "src/bin/repo.rs"
[[bin]]
name = "repo_builder"
path = "src/bin/repo_builder.rs"
[lib]
name = "cookbook"
path = "src/lib.rs"
doctest = false
[features]
#TODO: Actually make without tui feature works
default = ["tui"]
tui = ["ratatui", "ansi-to-tui", "strip-ansi-escapes"]
[dependencies]
blake3 = "1"
globset = "0.4"
libc = "0.2"
ignore = "0.4"
object = { version = "0.38", features = ["build_core"] }
pkgar = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" }
pkgar-core = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" }
pkgar-keys = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" }
redox-pkg = { git = "https://gitlab.redox-os.org/redox-os/pkgutils.git", default-features = false }
redox_installer = { git = "https://gitlab.redox-os.org/redox-os/installer.git", default-features = false }
redoxer = { git = "https://gitlab.redox-os.org/redox-os/redoxer.git", default-features = false }
regex = "1.11"
serde = { version = "1", features = ["derive"] }
termion = "4"
toml = "0.8"
walkdir = "2.3.1"
ansi-to-tui = { version = "8", optional = true }
strip-ansi-escapes = { version = "0.2.1", optional = true }
serde_json = "1"
[dependencies.ratatui]
version = "0.30"
default-features = false
features = ["termion"]
optional = true

View File

@ -1,136 +1,365 @@
# Hardware Compatibility
This document tracks the current hardware compatibility of Redox OS.
This document tracks the current hardware compatibility of Redox.
- [Why are hardware reports needed?](#why-are-hardware-reports-needed)
- [What if my computer is customized?](#what-if-my-computer-is-customized)
- [Status](#status)
- [Contribute to this document](#contribute-to-this-document)
- [Template](#template)
- [Table row ordering](#table-row-ordering)
- [Recommended](#recommended)
- [Booting](#booting)
- [Broken](#broken)
## Why are hardware reports needed?
Each computer model has different hardware interfaces, firmware implementations, and devices, which can cause the following problems:
- Boot bugs
- Lack of device support
- Performance degradation
These reports helps us to fix the problems above, your report may help to fix many computers affected by the same bugs or missing drivers.
## What if my computer is customized?
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 as a comment on [this](https://gitlab.redox-os.org/redox-os/redox/-/issues/1797) tracking issue to help us with probable device porting.
- [General](#general)
- [Template](#template)
- [x86-64](#x86-64)
- [System76](#system76)
- [Dell](#dell)
- [HP](#hp)
- [ASUS](#asus)
- [Lenovo](#lenovo)
- [Toshiba](#toshiba)
- [Custom](#custom)
- [i686](#i686)
- [Dell](#dell-1)
- [ASUS](#asus-1)
- [Lenovo](#lenovo-1)
- [Toshiba](#toshiba-1)
- [Panasonic](#panasonic)
- [Custom](#custom-1)
- [ARM64](#arm64)
- [Custom](#custom-2)
## Status
The following limitations apply to any status.
- Broken - The system can't boot.
- Booting - The system boots with some issues.
- Recommended - The system start with all features working.
- ACPI support is incomplete (some things are hardcoded in the kernel to work)
- Wi-Fi and Bluetooth aren't supported yet
- Only Intel GPUs are supported, other GPU vendors use BIOS VESA or 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)
## General
### Recommended
This section cover things to consider.
This status is used when the operating system boots with video, sound, PS/2 or USB input, Ethernet, terminal and Orbital working.
- ACPI support is incomplete (some things are hardcoded on the kernel)
- Only USB input devices are supported
- Wi-Fi is not supported
- GPU drivers aren't supported (only VESA and UEFI GOP)
- Automatic operating system discovery on boot loader is not implemented (remember this before installing Redox)
### Booting
## Template
This status is used when the operating system successfully boot with some issues or lacking hardware support (write the issues and what supported hardware is not working in the "Report" section).
You will use this template to insert your computer.
### Broken
This status is used when the boot loader or system boot doesn't work.
## Contribute to this document
To contribute to this document, learn how to create your GitLab account, follow the project-wide contribution guidelines and suggestions, please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) document.
### Template
You will use this template to insert your computer on the table.
- **Computer model**
```
| | | | | | | | |
Status - (Broken, Booting or Recommended)
Redox version - 0.0.0
Variant - (server-minimal, desktop-minimal, server, desktop, demo, dev or customized)
Image date - day-month-year
- Additional details goes here as items
```
The Redox image date should use the [ISO format](https://en.wikipedia.org/wiki/ISO_8601)
## x86-64
### Table row ordering
Computers using a 64 bits Intel/AMD CPU.
New reports should use an independent alphabetical order in the "Vendor" and "Model" table rows, for example:
### System76
- **System76 Galago Pro (galp5)**
```
| ASUS | ROG g55vw |
| ASUS | X554L |
| System76 | Galago Pro (galp5) |
| System76 | Lemur Pro (lemp9) |
Status - Recommended
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using UEFI
- Boots to desktop
```
A comes before S, R comes before X, G comes before L
- **System76 Lemur Pro (lemp9)**
Each "Vendor" has its own alphabetical order in "Model", independent from models from other vendor.
```
Status - Recommended
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
## Recommended
- Booted using UEFI
- Boots to desktop
```
| **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
| Lenovo | IdeaPad Y510P | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital |
| System76 | Galago Pro (galp5) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital |
| System76 | Lemur Pro (lemp9) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital |
- **System76 Oryx Pro (oryp10)**
## Booting
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
| **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
| ASUS | Eee PC 900 | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Boots to Orbital, No ethernet driver, Correct video mode not offered (firmware issue) |
| ASUS | PRIME B350M-E (custom) | 0.9.0 | 2024-09-20 | desktop | x86-64 | UEFI | Partial support for the PS/2 keyboard, PS/2 mouse is broken |
| ASUS | ROG g55vw | 0.8.0 | 2023-11-11 | desktop | x86-64 | BIOS | Boots to Orbital, UEFI panic in SETUP |
| ASUS | X554L | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS | Boots to Orbital, No audio, HDA driver cannot find output pins |
| ASUS | Vivobook 15 OLED (M1503Q) | 0.9.0 | 2025-08-04 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb do not work, cannot connect to the internet, right maximum display resolution 2880x1620 |
| Dell | XPS 13 (9350) | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Boots to Orbital, NVMe driver livelocks |
| Dell | XPS 13 (9350) | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital, NVMe driver livelocks |
| Dell | XPS L502X | 0.9.0 | 2026-05-01 | desktop | x86-64 | BIOS | Does not find the bootloader without patching the partition type byte to FAT32 (LBA), Boots to orbital with the patch in live mode, The entire system freezes after the orblogin screen appears unless recompiling the kernel without ACPI support, almost everything works out of box when using the kernel without ACPI, except the touchpad scrolling, WiFi and Intel graphics |
| HP | Dev One | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
| HP | EliteBook Folio 9480M | 0.9.0 | 2025-11-04 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb work, cannot connect to the Internet, install failed, right maximum display resolution 1600x900
| Lenovo | Thinkbook 14 Gen 2 ARE (AMD Ryzen Edition) Laptop | 0.9.0 | 2026-05-02 | desktop | x86-64 | UEFI | Boots to Orbital, but trackpad and USB mouse doesn't work so unable to test further |
| Lenovo | ThinkPad Yoga 260 Laptop - Type 20FE | 0.9.0 | 2024-09-07 | demo | x86-64 | UEFI | Boots to Orbital, No audio |
| Lenovo | Yoga S730-13IWL | 0.9.0 | 2024-11-09 | desktop | x86-64 | UEFI | Boots to Orbital, No trackpad or USB mouse input support |
| Lenovo | Ideapad 710S-13IKB | 0.9.0 | 2026-02-12 | demo | x86-64 | UEFI | Boots to Orbital, No trackpad or USB mouse input support |
| Raspberry Pi | 3 Model B+ | 0.8.0 | Unknown | server | ARM64 | U-Boot | Boots to UART serial console (pl011) |
| Samsung | Series 3 (NP350V5C) | 0.9.0 | 2025-08-04 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad works, USB does not work, can connect to the Internet through LAN. Wrong maximum display resolution 1024x768 |
| System76 | Oryx Pro (oryp10) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, though it should be working |
| System76 | Pangolin (pang12) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
| Toshiba | Satellite L500 | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS | Boots to Orbital, No Ethernet driver, Correct video mode not offered (firmware issue) |
- Booted using UEFI
- Boots to desktop
- No touchpad support, though it should be working
```
## Broken
- **System76 Pangolin (pang12)**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using UEFI
- Boots to desktop
- No touchpad support, requires I2C HID
```
### Dell
- **Dell XPS 13 (9350)**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using both BIOS and UEFI
- Boots to desktop
- NVMe driver livelocks
```
### HP
- **HP Dev One**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using UEFI
- Boots to desktop
- No touchpad support, requires I2C HID
```
- **HP EliteBook 2570p**
```
Status - Broken
Redox version - 0.8.0
Variant - demo
Image date - 2022-11-23
- UEFI Hybrid & Native boot don't work
- Booted using 'legacy'
- Gets to resolution selection
- Fails assert in `src/os/bios/mod.rs:77` after selecting resolution
```
### BEELINK
- **BEELINK U59**
```
Status - Broken
Redox version - 0.8.x
Variant - server
Image date - 30-05-2024
- Aborts after panic in xhcid
```
### ASUS
- **ASUS PN41**
```
Status - Broken
Redox version - 0.8.x
Variant - server
Image date - 30-05-2024
- Aborts after panic in xhcid
```
- **ASUS X554L**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Boots to desktop
- No audio, HDA driver cannot find output pins
```
- **ASUS ROG g55vw**
```
Satus - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2023
- Booted using BIOS
- Boots to desktop
- UEFI panic in SETUP
```
### Lenovo
- **Lenovo IdeaPad Y510P**
```
Status - Recommended
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using both BIOS and UEFI
- Boots to desktop
```
- **Lenovo G570**
```
Status - Broken
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Correct video mode not offered, this is a firmware issue
- Bootloader panics in alloc_zeroed_page_aligned
```
### Toshiba
- **Toshiba Satellite L500**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Correct video mode not offered, this is a firmware issue
- Boots to desktop
- No ethernet driver
```
### Custom
If you have a customized computer, put it here.
## i686
Computers with a 32 bits Intel/AMD CPU.
### Dell
- **Dell XPS 13 (9350)**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Boots to desktop
- NVMe driver livelocks
```
### ASUS
- **ASUS Eee PC 900**
```
Status - Booting
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Correct video mode not offered, this is a firmware issue
- Boots to desktop
- No ethernet driver
```
### Lenovo
- **Lenovo IdeaPad Y510P**
```
Status - Broken
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Panics on phys_to_virt overflow, probably having invalid mappings for 32-bit
```
### Toshiba
- **Toshiba Satellite L500**
```
Status - Broken
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Correct video mode not offered, this is a firmware issue
- Panics on phys_to_virt overflow, probably having invalid mappings for 32-bit
```
### Panasonic
- **Panasonic Toughbook CF-18**
```
Status - Broken
Redox version - 0.8.0
Variant - desktop
Image date - 11-11-2022
- Booted using BIOS
- Hangs after PIT initialization
```
### Custom
If you have a customized computer, put it here.
## ARM64
Computers using a 64 bits ARM CPU.
### Raspberry Pi
- **Raspberry Pi 3 Model B+**
```
Status - Booting
Redox version - 0.8.0
Variant - server
Image date - None
- Booted using Uboot
- Boots to UART serial console
- a bcm2835-sdhci/mmc driver
- pl011 UART
```
### Custom
If you have a customized ARM board, put it here.
| **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
| Apple | Mac Mini (Late 2012, Quad Core) | 0.9.0 | 2026-05-02 | desktop | x86-64 | EFI | Hangs after selecting boot device from boot menu, EFI 1.1 incompatibility? |
| ASUS | PN41 | 0.8.0 | 2024-05-30 | server | x86-64 | Unknown | Aborts after panic in xhcid |
| Asrock (Custom) | X570 Phantom Gaming 4 (Ryzen 3600) | 2026-05-02 | desktop | x86-64 | UEFI | Not recognised as a UEFI boot disk, have to boot in CSM mode. Bootloader fails with a panic |
| BEELINK | U59 | 0.8.0 | 2024-05-30 | server | x86-64 | Unknown | Aborts after panic in xhcid |
| Framework | Laptop 16 (AMD Ryzen 7040 Series) | 0.9.0 | 2026-3-29 | desktop, demo | x86-64 | UEFI | Crash due to unimplemented acpi function, see [jackpot51/acpi #3](https://github.com/jackpot51/acpi/pull/3) on GitHub |
| Dell | Latitude D600 | 0.9.0 | 2026-01-25 | desktop | i586 | BIOS | Some kernel messages displayed, then locks up |
| HP | Compaq nc6120 | 0.9.0 | 2024-11-08 | desktop, server | i686 | BIOS | Unloads into memory at a rate slower than 1MB/s after selecting resolution. When unloading is complete the logger initializes and crashes after kernel::acpi, some information about APIC is printed. Boot logs do not progress after this point. |
| HP | EliteBook 2570p | 0.8.0 | 2022-11-23 | demo | x86-64 | BIOS (CSM mode?) | Gets to resolution selection, Fails assert in `src/os/bios/mod.rs:77` after selecting resolution |
| Lenovo | G570 | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS | Bootloader panics in `alloc_zeroed_page_aligned`, Correct video mode not offered (firmware issue) |
| Lenovo | IdeaPad Y510P | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
| Lenovo | ThinkPad X1 20KH-002 | 0.9.0 | 2026-02-11 | server | x86-64 | UEFI | Boots once after build but not a second time, fails in ps2d |
| Lenovo | ThinkCentre M83 | 0.9.0 | 2025-11-09 | desktop | x86_64 | UEFI | Presents user with a set of display resolution options. After user selects an option, it takes a long time for the "live" thing to load all the way to 647MiB. Once it does reach 647MiB, however, it dumps a bunch of logs onto the screen. Those logs also happen to be offset so that the leftmost portion of all text "exists" past the leftmost part of the screen, resulting in the logs being only partially visible. The logs appear to include (among other things) 1. "thread 'main' (1) panicked at acpid/src/acpi.rs:256:68: Called `Result::unwrap()` on an `Err` value: Aml(NoCurrentOp)"; 2. "thread 'main' (1) panicked at acpid/src/main.rs:147:39:acpid: failed to daemonize: Error `I/O error` 5"; 3. "... [@hwd:40 ERROR] failed to probe with error No such device (os error 19)..."; etc. |
| Panasonic | Toughbook CF-18 | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Hangs after PIT initialization |
| Toshiba | Satellite L500 | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Correct video mode not offered (firmware issue), Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
| Unbranded | VIA C3 CPU | 0.9.0 | 2026-01-25 | desktop | i586 | BIOS | Some kernel messages displayed, then locks up |
| XMG (Schenker) | Apex 17 (M21) | 0.9.0 | 2024-09-30 | demo, server | x86-64 | UEFI | After selecting resolution, (release) repeats `...::interrupt::irq::ERROR -- Local apic internal error: ESR=0x40` a few times before it freezes; (daily) really slowly prints statements from `...::rmm::INFO` before it abruptly aborts |

View File

@ -10,72 +10,56 @@ all: $(BUILD)/harddrive.img
live:
-$(FUMOUNT) $(BUILD)/filesystem/ || true
-$(FUMOUNT) /tmp/redox_installer/ || true
rm -f $(BUILD)/redox-live.iso
$(MAKE) $(BUILD)/redox-live.iso
rm -f $(BUILD)/livedisk.iso
$(MAKE) $(BUILD)/livedisk.iso
popsicle: $(BUILD)/redox-live.iso
popsicle-gtk $(BUILD)/redox-live.iso
popsicle: $(BUILD)/livedisk.iso
popsicle-gtk $(BUILD)/livedisk.iso
image:
-$(FUMOUNT) $(BUILD)/filesystem/ || true
-$(FUMOUNT) /tmp/redox_installer/ || true
rm -f $(BUILD)/harddrive.img $(BUILD)/redox-live.iso
rm -f $(BUILD)/harddrive.img $(BUILD)/livedisk.iso
$(MAKE) all
rebuild:
-$(FUMOUNT) $(BUILD)/filesystem/ || true
-$(FUMOUNT) /tmp/redox_installer/ || true
rm -rf $(BUILD)/repo.tag $(BUILD)/harddrive.img $(BUILD)/redox-live.iso
rm -rf $(BUILD)/repo.tag $(BUILD)/harddrive.img $(BUILD)/livedisk.iso
$(MAKE) all
# To tell that it's not safe
# to execute the cookbook binary
NOT_ON_PODMAN?=0
clean:
clean: $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
ifneq ("$(wildcard $(CONTAINER_TAG))","")
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
$(info will not run cookbook clean as container is not built)
$(MAKE) clean PODMAN_BUILD=0 NOT_ON_PODMAN=1 SKIP_CHECK_TOOLS=1
endif # CONTAINER_TAG
else
ifneq ($(NOT_ON_PODMAN),1)
$(MAKE) repo_clean
cd cookbook && ./clean.sh
-rm -rf cookbook/repo
cargo clean --manifest-path cookbook/pkgutils/Cargo.toml
cargo clean --manifest-path installer/Cargo.toml
cargo clean --manifest-path redoxfs/Cargo.toml
cargo clean --manifest-path relibc/Cargo.toml
endif
-$(FUMOUNT) $(BUILD)/filesystem/ || true
-$(FUMOUNT) /tmp/redox_installer/ || true
endif # NOT_ON_PODMAN
rm -rf repo
rm -rf $(BUILD) $(PREFIX)
$(MAKE) fstools_clean
endif # PODMAN_BUILD
rm -rf $(BUILD)
distclean:
distclean: $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
ifneq ("$(wildcard $(CONTAINER_TAG))","")
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
$(info will not run cookbook unfetch as container is not built)
$(MAKE) distclean PODMAN_BUILD=0 NOT_ON_PODMAN=1 SKIP_CHECK_TOOLS=1
endif # CONTAINER_TAG
else
ifneq ($(NOT_ON_PODMAN),1)
$(MAKE) fetch_clean
endif # NOT_ON_PODMAN
$(MAKE) clean NOT_ON_PODMAN=1
endif # PODMAN_BUILD
$(MAKE) clean
cd cookbook && ./unfetch.sh
endif
pull:
git pull
rm -f $(FSTOOLS_TAG)
git submodule sync --recursive
git submodule update --recursive --init
fetch: $(BUILD)/fetch.tag
repo: $(BUILD)/repo.tag
repo_clean: c.--all
fetch_clean: u.--all
# Podman build recipes and vars
include mk/podman.mk
@ -100,20 +84,14 @@ include mk/ci.mk
env: prefix FORCE $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
export PATH="$(PREFIX_PATH):$$PATH" && \
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_KERNEL_FILE=cookbook/recipes/core/kernel/target/$(TARGET)/build/kernel.sym
gdb: FORCE
rust-gdb $(GDB_KERNEL_FILE) --eval-command="target remote :1234"
@ -125,7 +103,7 @@ gdb: FORCE
# has started or you need to debug the interaction between the application and the kernel.
# tl;dr: DO NOT USE THIS TARGET UNLESS YOU HAVE TO
gdb-userspace: FORCE
rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE)" --eval-command="target remote :1234"
rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE) 0x$(shell readelf -S $(GDB_KERNEL_FILE) | grep .text | cut -c43-58)" --eval-command="target remote :1234"
# An empty target
FORCE:
@ -133,20 +111,3 @@ FORCE:
# Wireshark
wireshark: FORCE
wireshark $(BUILD)/network.pcap
KPROF_KERNEL_BINARY?=recipes/core/profiling-kernel/target/$(TARGET)/build/kernel
KPROF_KERNEL_SYM?=build/flamegraph/$(TARGET)-kernel-syms.txt
KPROF_OUTPUT_TXT?=build/$(ARCH)/$(CONFIG_NAME)/filesystem/home/root/kprof.txt
KPROF_PERF_SVG?=build/flamegraph/$(TARGET)-$(CONFIG_NAME)-kflamegraph.svg
# XXX: This assumes the TSC is invariant, that the value for cpu0 is the same as for all other CPUs, and that the value from ACPI actually reflects the TSC rate. It also only works on Linux.
KPROF_CPU_GHZ?=$(shell (cat /sys/devices/system/cpu/cpu0/acpi_cppc/nominal_freq || echo 3400) | xargs echo "0.001 *" | bc)
# See https://gitlab.redox-os.org/redox-os/kprofiling/-/blob/master/src/main.rs?ref_type=heads#L16-L18
# Set e.g. to "xo" to show individual instruction offsets
KPROF_OPTIONS?=_
flamegraph:
mkdir -p build/flamegraph && \
make mount && \
nm -CS $(KPROF_KERNEL_BINARY) >$(KPROF_KERNEL_SYM) && \
redox-kprofiling $(KPROF_OUTPUT_TXT) $(KPROF_KERNEL_SYM) $(KPROF_OPTIONS) $(KPROF_CPU_GHZ) | inferno-collapse-perf | inferno-flamegraph > $(KPROF_PERF_SVG) && \
make unmount

View File

@ -2,19 +2,17 @@
<img alt="Redox" width="346" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/logos/redox/logo.png">
</p>
This repository is the **Build System** for Redox OS.
Redox is under active development by a vibrant community, you can see the key links below:
This repository is the **Build System** for Redox OS. Redox is under active development by a vibrant community. Key links:
- [The **main website** for Redox OS](https://www.redox-os.org).
- [The Redox Book](https://doc.redox-os.org/book/) and [Build Instructions](https://doc.redox-os.org/book/podman-build.html).
- [The Redox Book](https://doc.redox-os.org/book/) and [Build Instructions](https://doc.redox-os.org/book/ch02-05-building-redox.html).
- [Redox Chat and Support](https://matrix.to/#/#redox-join:matrix.org).
- [Patreon](https://www.patreon.com/redox_os), [Donate](https://redox-os.org/donate/) and [Merch](https://redox-os.creator-spring.com/).
- Scroll down for a list of key Redox components and their repositories.
- Scroll down for a list of key Redox components and their repos.
[Redox](https://www.redox-os.org) is an open-source operating system written in Rust, a language with focus on safety, efficiency and high performance. Redox uses a microkernel architecture, and aims to be reliable, secure, usable, correct, and free. Redox is inspired by previous operating systems, such as seL4, MINIX, Plan 9, Linux and BSD.
[Redox](https://www.redox-os.org) is an operating system written in Rust, a language with focus on safety, efficiency and high performance. Redox uses a microkernel architecture, and aims to be reliable, secure, usable, correct, and free. Redox is inspired by previous operating systems, such as seL4, MINIX, Plan 9, Linux and BSD.
Redox _is not_ just a kernel, it's a **full-featured operating system**, providing components (file system, display server, core utilities, etc.) that together make up a functional and convenient operating system. Redox uses the COSMIC desktop apps, and provides source code compatibility with many Rust, Linux and BSD programs.
Redox _is not_ just a kernel, it's a **full-featured operating system**, providing components (file system, display manager, core utilities, etc.) that together make up a functional and convenient operating system. Redox uses the COSMIC desktop apps, and provides source code compatibility with many Rust, Linux and BSD programs.
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
@ -22,32 +20,33 @@ Redox _is not_ just a kernel, it's a **full-featured operating system**, providi
- [Book](https://doc.redox-os.org/book/)
- [Contribute](CONTRIBUTING.md)
- [Hardware Compatibility](https://doc.redox-os.org/book/hardware-support.html)
- Run Redox in a [Virtual Machine](https://doc.redox-os.org/book/running-vm.html) or on [Real Hardware](https://doc.redox-os.org/book/real-hardware.html)
- [Trying Out Redox](https://doc.redox-os.org/book/trying-out-redox.html)
- [Building Redox](https://doc.redox-os.org/book/podman-build.html)
- [Build System Documentation](https://doc.redox-os.org/book/build-system-reference.html)
- [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html)
- [Chat/Discussions/Help](https://doc.redox-os.org/book/chat.html)
- [Hardware Compatibility](https://doc.redox-os.org/book/ch01-09-hardware-support.html)
- Run Redox in a [Virtual Machine](https://doc.redox-os.org/book/ch02-01-running-vm.html) or on [Real Hardware](https://doc.redox-os.org/book/ch02-02-real-hardware.html)
- [Trying Out Redox](https://doc.redox-os.org/book/ch02-04-trying-out-redox.html)
- [Building Redox](https://doc.redox-os.org/book/ch02-05-building-redox.html)
- [Build System Documentation](https://doc.redox-os.org/book/ch08-06-build-system-reference.html)
- [Developer FAQ](https://doc.redox-os.org/book/ch09-07-developer-faq.html)
- [Chat/Discussions/Help](https://doc.redox-os.org/book/ch13-01-chat.html)
## Ecosystem
Some of the key repositories on the Redox GitLab:
| Essential Repositories | Maintainer
|-------------------------------------------------------------------------------------------------------------|---------------------------
| [Kernel](https://gitlab.redox-os.org/redox-os/kernel) | **@jackpot51**
| [Base (essential system components and drivers)](https://gitlab.redox-os.org/redox-os/base) | **@jackpot51**
| [RedoxFS (default filesystem)](https://gitlab.redox-os.org/redox-os/redoxfs) | **@jackpot51**
| [relibc (C POSIX library written in Rust)](https://gitlab.redox-os.org/redox-os/relibc) | **@jackpot51**
| [Ion (defauilt shell)](https://gitlab.redox-os.org/redox-os/ion) | **@jackpot51**
| [Termion (terminal library)](https://gitlab.redox-os.org/redox-os/termion) | **@jackpot51**
| [pkgutils (current package manager)](https://gitlab.redox-os.org/redox-os/pkgutils) | **@jackpot51**
| [Orbital (display server and window manager)](https://gitlab.redox-os.org/redox-os/orbital) | **@jackpot51**
| This repo - the root of the Build System | **@jackpot51** **@hatred_45**
| [Redoxer (tool for easy Redox development on Linux)](https://gitlab.redox-os.org/redox-os/redoxer) | **@jackpot51**
| [The Redox Book](https://gitlab.redox-os.org/redox-os/book) | **@jackpot51** **@hatred_45**
| [Website](https://gitlab.redox-os.org/redox-os/website) | **@jackpot51** **@hatred_45**
| Essential Repos | Maintainer
|--------------------------------------------------------------------------------------|---------------------------
| [Kernel](https://gitlab.redox-os.org/redox-os/kernel) | **@jackpot51**
| [RedoxFS (default filesystem)](https://gitlab.redox-os.org/redox-os/redoxfs) | **@jackpot51**
| [Drivers](https://gitlab.redox-os.org/redox-os/drivers) | **@jackpot51**
| [Orbital (windowing and compositing system)](https://gitlab.redox-os.org/redox-os/orbital) | **@jackpot51**
| [pkgutils (current package manager)](https://gitlab.redox-os.org/redox-os/pkgutils) | **@jackpot51**
| [relibc (C Library in Rust)](https://gitlab.redox-os.org/redox-os/relibc) | **@jackpot51**
| [netstack (protocol stack)](https://gitlab.redox-os.org/redox-os/netstack) | **@jackpot51**
| [Ion (shell)](https://gitlab.redox-os.org/redox-os/ion) | **@jackpot51**
| [Termion (terminal library)](https://gitlab.redox-os.org/redox-os/termion) | **@jackpot51**
| This repo - the root of the Build System | **@jackpot51**
| [cookbook (Build System for components)](https://gitlab.redox-os.org/redox-os/cookbook) | **@jackpot51** **@hatred_45**
| [Redoxer (Build/Test for Redox compatibility verification)](https://gitlab.redox-os.org/redox-os/redoxer) | **@jackpot51**
| [The Redox Book](https://gitlab.redox-os.org/redox-os/book) | **@hatred_45**
## What it looks like

View File

@ -1,39 +0,0 @@
# Redox OS Trademark Policy
This document outlines the policy regarding the use of the Redox OS trademark owned by the Redox OS nonprofit. The purpose of this policy is to ensure that the Redox OS trademark is used correctly and consistently, maintaining the integrity and reputation of the Redox OS brand.
1. Usage of the Redox OS Trademark
1. The Redox OS trademark includes, but is not limited to, the name "Redox OS", the Redox OS logo, and any associated symbols or designs.
2. The Redox OS trademark may only be used in accordance with this policy. Unauthorized use of the trademark is prohibited.
2. Permissible Use
1. Community Projects: Community projects may use the Redox OS trademark to refer to the operating system, provided that such use is not misleading and does not imply endorsement by the Redox OS nonprofit without explicit permission.
2. Educational and Informational Use: The Redox OS trademark may be used in educational and informational materials, including books, websites, and articles, to refer to the operating system, provided that such use complies with the guidelines set forth in this policy.
3. Marketing and Promotional Use: Partners and affiliates of the Redox OS nonprofit may use the Redox OS trademark in marketing and promotional materials with prior written consent from the Redox OS nonprofit.
3. Prohibited Use
1. Misrepresentation: The Redox OS trademark must not be used in a way that misrepresents or implies false association with, endorsement by, or sponsorship from the Redox OS nonprofit.
2. Modification: The Redox OS trademark must not be altered, modified, or used as part of another trademark or logo without prior written permission from the Redox OS nonprofit.
3. Merchandising: The Redox OS trademark must not be used on merchandise (e.g., T-shirts, mugs) for commercial purposes without explicit authorization from the Redox OS nonprofit.
4. Logo Usage Guidelines
1. The Redox OS logo must be used as provided by the Redox OS nonprofit without any modifications. This includes maintaining the logos colors, proportions, and overall design.
2. The Redox OS logo must be displayed in a manner that is clear and legible. Sufficient clear space should be maintained around the logo to ensure it is not crowded by other visual elements.
3. The Redox OS name should be identified as a trademark using the “™” symbol.
5. Official Redox OS Software
1. Software hosted at [the Redox OS GitLab group](https://gitlab.redox-os.org/redox-os/) is considered official Redox OS software. Only software that has been approved by the Redox OS nonprofit is permitted to use the Redox OS trademarks to refer to itself. Software that is official Redox OS software may use the “redox-os-” package namespace and “org.redox_os.” prefixed reverse-DNS ID. Other software should avoid using these prefixes.
2. Third-party software that integrates with or extend the Redox OS operating system must not use the Redox OS trademark in a way that implies official status or endorsement without prior approval from the Redox OS nonprofit. Third-party developers are encouraged to use the "redox-os-ext-" package namespace. This software may be described as "for the Redox OS™ operating system".
3. Third-party software may request inclusion as official Redox OS software. To request inclusion, please contact the Redox OS nonprofit at trademark@redox-os.org.
6. Request for Permission
1. To request permission for uses of the Redox OS trademark not covered by this policy, please contact the Redox OS nonprofit at trademark@redox-os.org.
2. All requests will be reviewed on a case-by-case basis, and the Redox OS nonprofit reserves the right to grant or deny permission at its sole discretion.
7. Enforcement
1. The Redox OS nonprofit reserves the right to take appropriate legal action against any unauthorized use of the Redox OS trademark.
2. The Redox OS nonprofit may, at its discretion, require the cessation of use of the Redox OS trademark by any party that fails to comply with this policy.
## Contact Information
For any questions or to request permission to use the Redox OS trademark, please contact:<br><br>
Redox OS<br>
trademark@redox-os.org<br><br>
This trademark policy is effective as of December 3, 2025 and may be updated from time to time at the discretion of the Redox OS nonprofit.
---
By adhering to these guidelines, you help us protect the Redox OS brand and ensure it remains a symbol of quality and innovation. Thank you for your cooperation.

View File

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

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
if [ -n "${COOKBOOK_DYNAMIC}" ]
then
exec pkg-config "$@"
else
exec pkg-config --static "$@"
fi

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
if [ -n "${COOKBOOK_DYNAMIC}" ]
then
exec pkg-config "$@"
else
exec pkg-config --static "$@"
fi

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
if [ -n "${COOKBOOK_DYNAMIC}" ]
then
exec pkg-config "$@"
else
exec pkg-config --static "$@"
fi

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
if [ -n "${COOKBOOK_DYNAMIC}" ]
then
exec pkg-config "$@"
else
exec pkg-config --static "$@"
fi

View File

@ -1,103 +0,0 @@
#!/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
# and filter out architectures that do not match the current $TARGET.
import os
import sys
import subprocess
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_HOST_SYSROOT")
sysroot_path = os.environ.get("COOKBOOK_SYSROOT")
target_triple = os.environ.get("TARGET")
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:
result = subprocess.run(
cmd,
stdout=subprocess.PIPE,
stderr=sys.stderr,
check=False,
text=True
)
except FileNotFoundError:
print(f"Error: Could not find executable '{LLVM_CONFIG}'", file=sys.stderr)
sys.exit(1)
if result.returncode != 0:
sys.exit(result.returncode)
output = result.stdout.strip()
args_set = set(sys.argv[1:])
if "--bindir" in args_set:
output = toolchain_path + "/usr/bin"
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 + '\n', end='')
if __name__ == "__main__":
main()

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
if [ -n "${COOKBOOK_DYNAMIC}" ]
then
exec pkg-config "$@"
else
exec pkg-config --static "$@"
fi

1090
bootstrap.sh Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Alternative script for the build system Makefiles
#!/usr/bin/env bash
###########################################################################
# #
# Build the system, with a specified processor type and filesystem config #
@ -12,12 +12,10 @@ usage()
{
echo "build.sh: Invoke make for a particular architecture and configuration."
echo "Usage:"
echo "./build.sh [-X | -A | -5 | -R | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..."
echo "./build.sh [-X | -A | -6 | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..."
echo " -X Equivalent to -a x86_64."
echo " -A Equivalent to -a aarch64."
echo " -5 Equivalent to -a i586."
echo " -6 Equivalent to -a i586 (deprecated, use -5 instead)."
echo " -R Equivalent to -a riscv64gc."
echo " -6 Equivalent to -a i686."
echo " -a ARCH: Processor Architecture. Normally one of x86_64, aarch64 or"
echo " i686. ARCH is not checked, so you can add a new architecture."
echo " Defaults to the directory containing the FILESYSTEM_CONFIG file,"
@ -36,7 +34,7 @@ usage()
echo " config/ARCH/CONFIG.toml"
echo " If you specify both CONFIG and FILESYSTEM_CONFIG, it is not"
echo " necessary that they match, but it is recommended."
echo " Examples: ./build.sh -c demo live - make build/x86_64/demo/redox-live.iso"
echo " Examples: ./build.sh -c demo live - make build/x86_64/demo/livedisk.iso"
echo " ./build.sh -6 qemu - make build/i686/desktop/harddrive.img and"
echo " and run it in qemu"
echo " NOTE: If you do not change ARCH or CONFIG very often, edit mk/config.mk"
@ -45,7 +43,7 @@ usage()
}
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
usage
usage
exit
fi
@ -57,19 +55,17 @@ FILESYSTEM_CONFIG=""
while getopts ":c:f:a:dhXA6" opt
do
case "$opt" in
a) ARCH="$OPTARG";;
c) CONFIG_NAME="$OPTARG";;
f) FILESYSTEM_CONFIG="$OPTARG";;
case "$opt" in
a) ARCH="$OPTARG";;
c) CONFIG_NAME="$OPTARG";;
f) FILESYSTEM_CONFIG="$OPTARG";;
X) ARCH="x86_64";;
A) ARCH="aarch64";;
R) ARCH="riscv64gc";;
5) ARCH="i586";;
6) ARCH="i586";;
h) usage;;
\?) echo "Unknown option -$OPTARG, try -h for help"; exit;;
6) ARCH="i686";;
h) usage;;
\?) echo "Unknown option -$OPTARG, try -h for help"; exit;;
:) echo "-$OPTARG requires a value"; exit;;
esac
esac
done
shift $((OPTIND -1))
@ -79,9 +75,8 @@ if [ -z "$ARCH" ] && [ -n "$FILESYSTEM_CONFIG" ]; then
case "$ARCH" in
x86_64) : ;;
aarch64) : ;;
riscv64gc) : ;;
i586) : ;;
\?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64, riscv64gc or i586";;
i686) : ;;
\?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64 or i686";;
esac
fi

3
config/aarch64/acid.toml Normal file
View File

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

View File

@ -7,314 +7,205 @@ 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 = {}
atk = {}
audiod = {}
autoconf = {}
automake = {}
bash = {}
bash-completion = {}
binutils = {}
bootloader = {}
bottom = {}
bootstrap = {}
ca-certificates = {}
cairo = {}
cairodemo = {}
#calculator = {}
cargo = {}
cleye = {}
#cmatrix = {} # needs ncursesw now
contain = {}
coreutils = {}
cosmic-edit = {}
cosmic-files = {}
cosmic-icons = {}
cosmic-term = {}
cosmic-text = {}
cpal = {}
curl = {}
dash = {}
dejavu = {}
diffutils = {}
dosbox = {}
drivers = {}
drivers-initfs = {}
duktape = {}
eduke32 = {}
escalated = {}
exampled = {}
expat = {}
extrautils = {}
file = {}
#fal
#fd = {} # ctrlc-3.1.1
#ffmpeg6 = {} # undefined references
findutils = {}
freefont = {}
fontconfig = {}
#freeciv = {}
freedoom = {}
#freeglut = {}
freepats = {}
freetype2 = {}
gawk = {}
#friar = {} # mio patch
fribidi = {}
#game-2048 = {} # rustc-serialize
#gawk = {} # langinfo.h
gcc13 = {}
gdbserver = {}
#gdk-pixbuf = {} # shared-mime-info
gears = {}
generaluser-gs = {}
gettext = {}
gigalomania = {}
git = {}
glib = {}
glutin = {}
gnu-binutils = {}
gnu-grep = {}
gnu-make = {}
hicolor-icon-theme = {}
#gstreamer = {} # conflict with thread local errno
harfbuzz = {}
#hematite = {} # needs crate patches for redox-unix
init = {}
initfs = {}
installer = {}
installer-gui = {}
intel-one-mono = {}
ion = {}
ipcd = {}
jansson = {}
kernel = {}
kibi = {}
lci = {}
libc-bench = {}
libffi = {}
libgcc = {}
libgmp = {}
libiconv = {}
libjpeg = {}
libogg = {}
liborbital = {}
libpng = {}
libstdcxx = {}
libsodium = {}
libvorbis = {}
libxkbcommon = {}
libxml2 = {}
llvm21 = {}
llvm18 = {}
logd = {}
lua54 = {}
#mdp = {} # ncursesw
mesa = {}
mesa-glu = {}
mgba = {}
#miniserve = {} # actix
nano = {}
nasm = {}
#ncdu = {} # fails to link with ncurses
ncurses = {}
#ncursesw = {} # mkstemp configure hang
netdb = {}
netstack = {}
netsurf = {}
netutils = {}
neverball = {}
#newlib = {} # obsolete
#newlibtest = {} # obsolete
nghttp2 = {}
openjazz = {}
openssl1 = {}
openssl3 = {}
openttd = {}
openttd-opengfx = {}
openttd-openmsx = {}
openttd-opensfx = {}
orbclient = {}
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
#orbutils-background = {} # needs recipe update
#orbutils-launcher = {} # needs recipe update
#orbutils-orblogin = {} # needs recipe update
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 = {}
#perl = {} # ctermid, tempnam, ttyname
pixelcannon = {}
pixman = {}
#pkgar = {} # uses virtual Cargo.toml, needs recipe update
pkg-config = {}
pkgutils = {}
pls = {}
pop-icon-theme = {}
#powerline = {} # dirs
prboom = {}
procedural-wallpapers-rs = {}
ptyd = {}
#python = {} # getaddrinfo
#qemu = {}
ramfs = {}
randd = {}
readline = {}
redoxerd = {}
redox-fatfs = {}
redoxfs = {}
redox-games = {}
redox-ssh = {}
relibc = {}
#relibc-tests = {} # madvise link error
resist = {}
#retroarch = {} # OS_TLSIndex not declared
ripgrep = {}
rodioplay = {}
rs-nes = {}
rust = {}
rustpython = {}
rust64 = {}
rust-cairo = {}
rust-cairo-demo = {}
rustual-boy = {}
schismtracker = {}
scummvm = {}
sdl-gfx = {}
#sdl-player = {} # wctype_t
sdl1 = {}
sdl1-image = {}
sdl1-mixer = {}
sdl1-ttf = {}
sdl2 = {}
sdl2-gears = {}
sdl2-image = {}
sdl2-mixer = {}
sdl2-ttf = {}
sed = {}
shared-mime-info = {}
#servo = {} # some more crates to port
#shared-mime-info = {} # intltool-update out of date
shellharden = {}
shellstorm = {}
smith = {}
sodium = {}
sopwith = {}
#ssh = {}
strace = {}
syobonaction = {}
terminfo = {}
#termplay = {} # backtrace cannot find link.h
timidity = {}
ttf-hack = {}
userutils = {}
uutils = {}
uutils-procps = {}
vice = {}
vim = {}
vttest = {}
vvvvvv = {}
#webrender = {} # unwind
#wesnoth = {}
#winit = {} # tzset
xz = {}
zerod = {}
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
# #flycast = {}
# #freeciv = {}
# #freeglut = {}
# #friar = {} # mio patch
# #game-2048 = {} # rustc-serialize
# #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

@ -0,0 +1,14 @@
# 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

@ -0,0 +1,30 @@
# Default build system configuration
include = ["../minimal.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 256
# Package settings
[packages]
audiod = {}
cosmic-edit = {}
cosmic-icons = {}
cosmic-files = {}
cosmic-term = {}
orbdata = {}
orbital = {}
orbutils = {}
pop-icon-theme = {}
shared-mime-info = {}
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export VT 3
orbital orblogin launcher
unset VT
"""

View File

@ -1,3 +1,3 @@
# Configuration for Jeremy Soller
include = ["demo.toml"]
include = ["desktop.toml"]

View File

@ -0,0 +1,14 @@
# 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

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

View File

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

View File

@ -0,0 +1,14 @@
# 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,11 +1,11 @@
# Configuration for "acid" testing
# Configuration to run the "acid" tests
include = ["base.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024
filesystem_size = 256
# Package settings
[packages]
@ -16,16 +16,11 @@ ion = {}
[[files]]
path = "/usr/lib/init.d/10_acid"
data = """
requires_weak 00_base.target
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
export RUST_BACKTRACE full
acid
acid create_test
acid switch
acid tls
acid thread
shutdown
"""

View File

@ -1,32 +0,0 @@
# 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.target
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

@ -9,90 +9,39 @@
prompt = false
[packages]
base = {}
bootloader = {}
bootstrap = {}
drivers = {}
escalated = {}
initfs = {}
ipcd = {}
kernel = {}
libgcc = {}
libstdcxx = {}
netdb = {}
netutils = {}
relibc = {}
userutils = {}
ptyd = {}
uutils = {}
## Configuration files
[[files]]
path = "/etc/login_schemes.toml"
path = "/usr/lib/init.d/00_base"
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
"proc",
"pty",
"sudo",
"audio",
"orbital",
]
# clear and recreate tmpdir with 0o1777 permission
rm -r /tmp
mkdir -m a=rwxt /tmp
ipcd
ptyd
escalated
"""
[[files]]
path = "/usr/lib/init.d/00_drivers"
data = """
pcid /etc/pcid.d/
"""
[[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
redox
"""
# https://www.freedesktop.org/software/systemd/man/latest/os-release.html
@ -109,18 +58,14 @@ HOME_URL="https://redox-os.org/"
DOCUMENTATION_URL="https://redox-os.org/docs/"
SUPPORT_URL="https://redox-os.org/community/"
"""
# VARIANT and BUILD_ID are appended by redox_installer when creating images.
# FIXME maybe add VARIANT= and VARIANT_ID= keys depending on the chosen configuration?
[[files]]
path = "/etc/os-release"
data = "../usr/lib/os-release"
symlink = true
[[files]]
path = "/etc/pkg.d/50_redox"
data = "https://static.redox-os.org/pkg"
## /usr and symlinks for usrmerge
## Symlinks for usrmerge
[[files]]
path = "/usr"
data = ""
@ -166,6 +111,11 @@ data = ""
directory = true
mode = 0o755
[[files]]
path = "/libexec"
data = "usr/libexec"
symlink = true
[[files]]
path = "/usr/share"
data = ""
@ -177,70 +127,54 @@ path = "/share"
data = "usr/share"
symlink = true
## legacy orbital directories
## Device file symlinks
[[files]]
path = "/ui"
data = "usr/share/ui"
path = "/dev/null"
data = "/scheme/null"
symlink = true
[[files]]
path = "/usr/share/ui/fonts"
data = "/usr/share/fonts"
path = "/dev/random"
data = "/scheme/rand"
symlink = true
[[files]]
path = "/usr/share/ui/icons"
data = "/usr/share/icons"
path = "/dev/urandom"
data = "/scheme/rand"
symlink = true
## /var
[[files]]
path = "/var"
data = ""
directory = true
mode = 0o755
path = "/dev/zero"
data = "/scheme/zero"
symlink = true
[[files]]
path = "/var/cache"
data = ""
directory = true
mode = 0o755
path = "/dev/tty"
data = "libc:tty"
symlink = true
[[files]]
path = "/var/lib"
data = ""
directory = true
mode = 0o755
path = "/dev/stdin"
data = "libc:stdin"
symlink = true
[[files]]
path = "/var/lock"
data = ""
directory = true
mode = 0o1777
path = "/dev/stdout"
data = "libc:stdout"
symlink = true
[[files]]
path = "/var/log"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/run"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/tmp"
data = ""
directory = true
mode = 0o1777
path = "/dev/stderr"
data = "libc:stderr"
symlink = true
# User settings
[users.root]
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.toml"]
include = ["minimal-net.toml"]
# General settings
[general]
@ -12,20 +12,22 @@ filesystem_size = 256
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
orbutils-background = {}
orbutils-launcher = {}
orbutils-orblogin = {}
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
requires_weak 10_net.target 20_audiod.service
nowait VT=3 orbital orblogin launcher
export VT 3
orbital orblogin launcher
unset VT
"""
# 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
getty 2
getty /scheme/debug/no-preserve -J
"""

View File

@ -1,26 +1,42 @@
# Default build system configuration
include = ["desktop-minimal.toml", "server.toml"]
include = ["server.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 650
filesystem_size = 576
# Package settings
[packages]
audiod = {}
cosmic-edit = {}
cosmic-files = {}
cosmic-icons = {}
cosmic-files = {}
cosmic-term = {}
dejavu = {}
file = {}
freefont = {}
hicolor-icon-theme = {}
installer-gui = {}
netsurf = {}
patchelf = {}
orbdata = {}
orbital = {}
orbutils = {}
pop-icon-theme = {}
#rustpython = {} # issues with new Rust nightly
shared-mime-info = {}
# orbterm from desktop-minimal should be ignored
orbterm = "ignore"
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
audiod
export VT 3
orbital orblogin launcher
unset VT
"""
# Override console config to not switch to VT 2
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
getty 2
getty /scheme/debug/no-preserve -J
"""

View File

@ -11,5 +11,95 @@ prompt = false
# Package settings
[packages]
dev-redox = {}
hello-redox = {}
acid = {}
autoconf = {}
automake = {}
cargo = {}
crates-io-index = {}
exampled = {}
gcc13 = {}
gdbserver = {}
gnu-binutils = {}
gnu-grep = {}
gnu-make = {}
libffi = {}
libgmp = {}
libiconv = {}
libjpeg = {}
libogg = {}
liborbital = {}
libpng = {}
libsodium = {}
libvorbis = {}
libxml2 = {}
llvm18 = {}
lua54 = {}
mesa = {}
mesa-glu = {}
nasm = {}
ncurses = {}
nghttp2 = {}
openssl1 = {}
orbclient = {}
patch = {}
pcre = {}
pkg-config = {}
resist = {}
ripgrep = {}
rust = {}
sdl-gfx = {}
sdl1 = {}
sdl1-image = {}
sdl1-mixer = {}
sdl1-ttf = {}
sdl2 = {}
sdl2-gears = {}
sdl2-image = {}
sdl2-mixer = {}
sdl2-ttf = {}
sed = {}
strace = {}
terminfo = {}
xz = {}
zlib = {}
[[files]]
path = "/home/user/test.rs"
data = """
fn main() {
println!("Hello, Redox!");
}
"""
[[files]]
path = "/home/user/test.c"
data = """
#include <stdio.h>
int main(void) {
printf("Hello, Redox!\n");
}
"""
[[files]]
path = "/home/user/test.cpp"
data = """
#include <iostream>
int main()
{
std::cout << "Hello, Redox!" << std::endl;
}
"""
[[files]]
path = "/home/user/test.py"
data = """
print("Hello, Redox!")
"""
[[files]]
path = "/home/user/test.lua"
data = """
print("Hello, Redox!")
"""

View File

@ -1,317 +0,0 @@
# The Redox build server configuration
# General settings
[general]
# Do not prompt if settings are not defined
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 = {} # rust require dynamic linking
acid-bins = {}
base = {}
bash = {}
bash-completion = {}
bootloader = {}
bottom = {}
ca-certificates = {}
contain = {}
coreutils = {}
cosmic-edit = {}
cosmic-files = {}
cosmic-icons = {}
cosmic-term = {}
cosmic-text = {}
curl = {}
dash = {}
dejavu = {}
diffutils = {}
expat = {}
extrautils = {}
file = {}
findutils = {}
freefont = {}
freetype2 = {}
gettext = {}
git = {}
gnu-make = {}
hicolor-icon-theme = {}
installer = {}
installer-gui = {}
ion = {}
kernel = {}
kibi = {}
libffi = {}
libgcc = {}
libiconv = {}
libjpeg = {}
libogg = {}
liborbital = {}
libpng = {}
libstdcxx = {}
libvorbis = {}
libxkbcommon = {}
libxml2 = {}
nano = {}
nasm = {}
ncurses = {}
netdb = {}
netsurf = {}
netutils = {}
nghttp2 = {}
openssl1 = {}
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
patch = {}
pcre = {}
patchelf = {}
pop-icon-theme = {}
pkgutils = {}
redoxfs = {}
relibc = {}
ripgrep = {}
rustpython = {}
sdl1 = {}
sed = {}
shared-mime-info = {}
smith = {}
terminfo = {}
userutils = {}
uutils = {}
uutils-procps = {}
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
# #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,8 +0,0 @@
# Configuration used for building redoxer base image
include = ["../redoxer.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1024

3
config/i686/acid.toml Normal file
View File

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

47
config/i686/ci.toml Normal file
View File

@ -0,0 +1,47 @@
# The Redox build server configuration
# General settings
[general]
# Do not prompt if settings are not defined
prompt = false
# Package settings
[packages]
audiod = {}
bootloader = {}
bootstrap = {}
ca-certificates = {}
contain = {}
coreutils = {}
dash = {}
diffutils = {}
drivers = {}
escalated = {}
extrautils = {}
findutils = {}
initfs = {}
installer = {}
installer-gui = {}
ion = {}
ipcd = {}
kernel = {}
nano = {}
netdb = {}
netstack = {}
netsurf = {}
netutils = {}
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
pkgutils = {}
ptyd = {}
redoxfs = {}
relibc = {}
resist = {}
smith = {}
userutils = {}
uutils = {}
vim = {}
#TODO: Add more packages

View File

@ -5,7 +5,7 @@ include = ["../desktop.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 768
filesystem_size = 640
# Package settings
[packages]

View File

@ -0,0 +1,14 @@
# 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

@ -11,5 +11,4 @@ include = ["../desktop.toml"]
# Package settings
[packages]
# example = {}
netsurf = "ignore" # liborbital fails to link in due to mismatching float ABI
# example = {}

View File

@ -11,4 +11,4 @@ include = ["../dev.toml"]
# Package settings
[packages]
# example = {}
# example = {}

View File

@ -0,0 +1,14 @@
# 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 = {}

14
config/i686/minimal.toml Normal file
View File

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

3
config/i686/resist.toml Normal file
View File

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

14
config/i686/server.toml Normal file
View File

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

29
config/llvm.toml Normal file
View File

@ -0,0 +1,29 @@
# # Configuration to create "llvm-config" script
include = ["base.toml"]
[general]
filesystem_size = 2048
[packages]
bash = {}
llvm = {}
[[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
"""

32
config/minimal-net.toml Normal file
View File

@ -0,0 +1,32 @@
# 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 = {}
smith = {}
userutils = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
inputd -A 2
getty 2
getty /scheme/debug -J
"""
[[files]]
path = "/etc/pkg.d/50_redox"
data = "https://static.redox-os.org/pkg"

View File

@ -5,23 +5,19 @@ include = ["base.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 196
filesystem_size = 128
# Package settings
[packages]
ca-certificates = {}
coreutils = {}
extrautils = {}
ion = {}
pkgutils = {}
kibi = {}
uutils-procps = {}
smith = {}
userutils = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net.target
inputd -A 2
nowait getty 2
nowait getty /scheme/debug/no-preserve -J
getty 2
getty /scheme/debug/no-preserve -J
"""

43
config/net.toml Normal file
View File

@ -0,0 +1,43 @@
# Network configuration: includes the base configuration and adds files required
# for networking
include = ["base.toml"]
# Package settings
[packages]
netstack = {}
netutils = {}
## Network init
[[files]]
path = "/usr/lib/init.d/10_net"
data = """
smolnetd
dnsd
dhcpd -b
"""
## Default net configuration (optimized for QEMU)
[[files]]
path = "/etc/net/dns"
data = """
208.67.222.222
"""
[[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
"""

View File

@ -1,22 +0,0 @@
# 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.target
RUST_BACKTRACE=full os-test-runner
shutdown
"""

View File

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

View File

@ -1,6 +1,6 @@
# Configuration for the Redoxer image
include = ["base.toml"]
include = ["net.toml"]
# Package settings
[packages]
@ -9,49 +9,45 @@ ca-certificates = {}
coreutils = {}
extrautils = {}
findutils = {}
gnu-make = {}
ion = {}
gcc13 = {}
gnu-binutils = {}
netdb = {}
pkgutils = {}
redoxerd = {}
relibc = {}
sed = {}
# Override to not background dhcpd
[[files]]
path = "/usr/lib/init.d/10_dhcpd.service"
path = "/usr/lib/init.d/10_net"
data = """
[unit]
description = "Network configuration using DHCP"
requires_weak = [
"10_smolnetd.service",
]
smolnetd
dnsd
dhcpd
"""
[service]
cmd = "dhcpd"
type = "oneshot"
[[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.target
ion /usr/lib/run_redoxer.ion
echo
echo ## running redoxer ##
redoxerd
"""
[[files]]
path = "/usr/lib/run_redoxer.ion"
data = """
#!/usr/bin/env ion
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
echo
echo "## running redoxer ##"
redoxerd
"""
path = "/etc/pkg.d/50_redox"
data = "https://static.redox-os.org/pkg"

45
config/resist.toml Normal file
View File

@ -0,0 +1,45 @@
# 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 = {}
userutils = {}
# Override to not background dhcpd
[[files]]
path = "/usr/lib/init.d/10_net"
data = """
smolnetd
dnsd
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
"""
[[files]]
path = "/etc/pkg.d/50_redox"
data = "https://static.redox-os.org/pkg"

View File

@ -1,318 +0,0 @@
# The Redox build server configuration
# General settings
[general]
# Do not prompt if settings are not defined
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 = {} # rust require dynamic linking
acid-bins = {}
base = {}
bash = {}
bash-completion = {}
bootloader = {}
bottom = {}
ca-certificates = {}
#contain = {} # redox_syscall 0.4 not working on riscv64gc?
coreutils = {}
cosmic-edit = {}
cosmic-files = {}
cosmic-icons = {}
cosmic-term = {}
#cosmic-text = {} # need to bump redox_syscall
curl = {}
dash = {}
dejavu = {}
diffutils = {}
expat = {}
extrautils = {}
file = {}
findutils = {}
freefont = {}
freetype2 = {}
gettext = {}
git = {}
gnu-make = {}
hicolor-icon-theme = {}
installer = {}
#installer-gui = {} # redox_syscall 0.4 not working on riscv64gc?
ion = {}
kernel = {}
kibi = {}
libffi = {}
libgcc = {}
#libiconv = {} # not tested yet, netsurf is commented out
libjpeg = {}
libogg = {}
#liborbital = {} # not tested yet, netsurf is commented out
libpng = {}
libstdcxx = {}
libvorbis = {}
libxkbcommon = {}
libxml2 = {}
#nano = {} # error compiling ncurses
nasm = {}
#ncurses = {}
netdb = {}
#netsurf = {} # error compiling nghttp2
netutils = {}
#nghttp2 = {}
openssl1 = {}
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
#patch = {} error configure machine `riscv64gc-unknown' not recognized
pcre = {}
patchelf = {}
pop-icon-theme = {}
pkgutils = {}
redoxfs = {}
relibc = {}
ripgrep = {}
rustpython = {}
#sdl1 = {} # not tested yet, netsurf is commented out
sed = {}
shared-mime-info = {}
smith = {}
terminfo = {}
userutils = {}
uutils = {}
uutils-procps = {}
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
# #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,3 +0,0 @@
# Configuration for demonstration
include = ["desktop.toml"]

View File

@ -1,3 +0,0 @@
# Configuration for Jeremy Soller
include = ["desktop.toml"]

View File

@ -1,6 +1,6 @@
# Server configuration
include = ["minimal.toml"]
include = ["net.toml"]
# General settings
[general]
@ -10,13 +10,32 @@ filesystem_size = 512
# Package settings
[packages]
bash = {}
bottom = {}
#contain = {} # needs to update dependencies
ca-certificates = {}
contain = {}
coreutils = {}
curl = {}
diffutils = {}
extrautils = {}
findutils = {}
gettext = {}
git = {}
installer = {}
ion = {}
kibi = {}
netdb = {}
pkgutils = {}
redoxfs = {}
relibc = {}
resist = {}
userutils = {}
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
inputd -A 2
getty 2
getty /scheme/debug/no-preserve -J
"""
[[files]]
path = "/etc/pkg.d/50_redox"
data = "https://static.redox-os.org/pkg"

View File

@ -1,31 +0,0 @@
# Configuration for automated self-hosted system compilation testing
include = ["server.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 10000
# Package settings
[packages]
cookbook = {}
bottom = "ignore"
kibi = "ignore"
[[files]]
path = "/usr/lib/init.d/30_console"
data = """
requires_weak 10_net
ion /usr/lib/sys_build.ion
"""
[[files]]
path = "/usr/lib/sys_build.ion"
data = """
#!/usr/bin/env ion
export RUST_BACKTRACE=full
cd /home/user/cookbook
make prefix r.sys,--with-package-deps
shutdown
"""

View File

@ -1,15 +0,0 @@
# Configuration for testing
include = ["server.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 10000
# Do not prompt if settings are not defined
prompt = false
# Package settings
[packages]
redox-tests = {}
benchmarks = {}

View File

@ -1,100 +0,0 @@
# Wayland configuration
include = ["desktop.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 2048
# Package settings
[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 = {}
winit-wayland = {}
xkeyboard-config = {}
# Overridden to launch wayland compositor instead of orblogin
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
requires_weak 10_net.target 20_audiod.service
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-wayland
"""
[[files]]
path = "/usr/bin/orbital-wayland"
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
export XCURSOR_THEME=Pop
export XDG_RUNTIME_DIR=/tmp/run/user/0
# Comment out once responsive
export WAYLAND_DEBUG=1
# 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)
#smallvil -c 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 = "Pop"
gtk-icon-theme-name = "Cosmic"
"""

View File

@ -1,202 +0,0 @@
# X11 configuration
include = ["desktop.toml"]
# Override the default settings here
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 2048
# Package settings
[packages]
adwaita-icon-theme = {}
dbus = {}
gtk3 = {}
libxcursor = {} # loaded dynamically
#mate-common = {}
mesa-demos-x11 = {}
#firefox = {}
#webkitgtk3 = {} # not compiling
xfce4-full = {}
x11-full = {}
zenity = {}
[[files]]
path = "/usr/lib/init.d/10_dbus"
data = """
requires_weak 10_net.target
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 = """
requires_weak 10_net.target
glib-compile-schemas /usr/share/glib-2.0/schemas/
"""
# Overridden to launch X instead of orblogin
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
requires_weak 10_dbus 10_xenv 20_audiod.service
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-x11
"""
[[files]]
path = "/run/user/0"
data = ""
directory = true
mode = 0o700
[[files]]
path = "/home/root/.config/dconf"
data = ""
directory = true
[[files]]
path = "/home/root/Desktop"
data = ""
directory = true
[[files]]
path = "/usr/share/X11/xorg.conf.d"
data = ""
directory = true
[[files]]
path = "/usr/bin/orbital-x11"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
# for ice authority and pixbuf
export HOME=/home/root
export XDG_DATA_DIRS=/usr/share
export XDG_RUNTIME_DIR=/run/user/0
export XDG_CONFIG_HOME=/home/root/.config
# 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)))"
cat > /usr/share/X11/xorg.conf.d/orbital.conf <<EOF
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
VideoRam 256000
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 5.0 - 1000.0
VertRefresh 5.0 - 200.0
$(cvt "${WIDTH}" "${HEIGHT}")
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "${WIDTH}x${HEIGHT}"
EndSubSection
EndSection
EOF
# Launch X11 and session on display 0
export DISPLAY=":0"
X "${DISPLAY}" &
sleep 1
exec dbus-launch --exit-with-x11 xfce4-x11-session
"""
[[files]]
path = "/usr/bin/mate-x11-session"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
gdk-pixbuf-query-loaders --update-cache
/usr/libexec/dconf-service &
xterm&
#zenity --info --text="running mate as $(id)!"
#exec marco
exec mate-session
"""
[[files]]
path = "/usr/bin/xfce4-x11-session"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
gdk-pixbuf-query-loaders --update-cache
/usr/lib/xfce4/xfconf/xfconfd &
/usr/lib/tumbler-1/tumblerd &
/usr/libexec/upowerd &
xfsettingsd &
xterm&
#zenity --info --text="running xfce4 as $(id)!"
#exec xfwm4
exec xfce4-session
"""
[[files]]
path = "/usr/lib/environment.d/10_x11"
data = """
DISPLAY=:0
"""
[[files]]
path = "/usr/bin/browser"
mode = 0o755
data = """
#!/usr/bin/env bash
set -ex
#export G_MAIN_POLL_DEBUG=1
export G_MESSAGES_DEBUG=all
#export GDK_DEBUG=all
#export GTK_DEBUG=all
export LD_DEBUG=all
#export WEBKIT_DEBUG=all
exec MiniBrowser --dark-mode --ignore-tls-errors "about:blank"
"""
[users.messagebus]
uid = 100
gid = 100
name = "messagebus"
home = "/nonexistent"
shell = "/usr/bin/false"

3
config/x86_64/acid.toml Normal file
View File

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

View File

@ -7,86 +7,59 @@ 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 = {}
autotools = {}
dev-essential = {}
dev-redox = {}
llvm21-common = {}
mate-common = {}
redox-tests = {}
x11-minimal = {}
x11-full = {}
xfce4-common = {}
xfce4-full = {}
# Normal packages below
acid = {}
adwaita-icon-theme = {}
atk = {}
audiod = {}
autoconf = {}
automake = {}
base = {}
bash = {}
bash-completion = {}
binutils = {}
bootloader = {}
boxedwine = {}
bottom = {}
bzip2 = {}
bootstrap = {}
ca-certificates = {}
cairo = {}
cairo-demo = {}
cbindgen = {}
classicube = {}
clang21 = {}
cairodemo = {}
#calculator = {}
cargo = {}
cleye = {}
cmake = {}
cmatrix = {}
composer = {}
#cmatrix = {} # needs ncursesw now
contain = {}
coreutils = {}
cosmic-edit = {}
cosmic-files = {}
cosmic-icons = {}
cosmic-reader = {}
cosmic-term = {}
cosmic-text = {}
cpal = {}
curl = {}
dash = {}
dejavu = {}
devilutionx = {}
diffutils = {}
dosbox = {}
drivers = {}
drivers-initfs = {}
duktape = {}
eduke32 = {}
escalated = {}
exampled = {}
expat = {}
extrautils = {}
#fal
#fd = {} # ctrlc-3.1.1
ffmpeg6 = {}
file = {}
findutils = {}
firefox = {}
fish-shell = {}
flycast = {}
fontconfig = {}
freeciv = {}
#freeciv = {}
freedoom = {}
freefont = {}
#freeglut = {}
freepats = {}
freetype2 = {}
#friar = {} # mio patch
fribidi = {}
gawk = {}
#game-2048 = {} # rustc-serialize
#gawk = {} # langinfo.h
gcc13 = {}
gdbserver = {}
gdk-pixbuf = {}
#gdk-pixbuf = {} # shared-mime-info
gears = {}
generaluser-gs = {}
gettext = {}
@ -97,146 +70,113 @@ glutin = {}
gnu-binutils = {}
gnu-grep = {}
gnu-make = {}
goaccess = {}
gobject-introspection = {}
gitoxide = {}
gstreamer = {}
#gstreamer = {} # conflict with thread local errno
harfbuzz = {}
hicolor-icon-theme = {}
helix = {}
hello-redox = {}
hf = {}
htop = {}
jansson = {}
jq = {}
#hematite = {} # needs crate patches for redox-unix
init = {}
initfs = {}
installer = {}
installer-gui = {}
intel-one-mono = {}
ion = {}
ipcd = {}
#jansson = {} # needs config.sub update
kernel = {}
kibi = {}
lci = {}
libarchive = {}
libatomic = {}
libavif = {}
libc-bench = {}
libedit = {}
libffi = {}
libflac = {}
libgcc = {}
libgmp = {}
libiconv = {}
libicu = {}
libjpeg = {}
libmodplug1 = {}
libmpfr = {}
libnettle = {}
libogg = {}
libonig = {}
liborbital = {}
libpsl = {}
libpng = {}
libsodium = {}
libssh2 = {}
libstdcxx = {}
libtool = {}
libuuid = {}
liburcu = {}
libuv = {}
libvorbis = {}
libwebp = {}
libxkbcommon = {}
libxcursor = {}
libxml2 = {}
llvm21 = {}
lsd = {}
llvm18 = {}
logd = {}
lua54 = {}
lua-compat-53 = {}
luajit = {}
luarocks = {}
lz4 = {}
#mdp = {} # ncursesw
mednafen = {}
mesa = {}
mesa-glu = {}
mesa-demos = {}
mesa-demos-x11 = {}
mgba = {}
miniserve = {}
mpc = {}
#miniserve = {} # actix
nano = {}
nasm = {}
ncdu = {}
#ncdu = {} # fails to link with ncurses
ncurses = {}
ncursesw = {}
neovim = {}
#ncursesw = {} # mkstemp configure hang
netdb = {}
netstack = {}
netsurf = {}
netutils = {}
neverball = {}
#newlib = {} # obsolete
#newlibtest = {} # obsolete
nghttp2 = {}
nginx = {}
nodejs-21 = {}
nushell = {}
onefetch = {}
openjazz = {}
openjk = {}
openssh = {}
openssl1 = {}
openssl3 = {}
openttd = {}
openttd-opengfx = {}
openttd-openmsx = {}
openttd-opensfx = {}
opentyrian = {}
orbclient = {}
orbdata = {}
orbital = {}
orbterm = {}
orbutils = {}
os-test-bins = {}
#orbutils-background = {} # needs recipe update
#orbutils-launcher = {} # needs recipe update
#orbutils-orblogin = {} # needs recipe update
osdemo = {}
pango = {}
#pango = {} # undefined references to std::__throw_system_error(int)
#pastel = {} # needs crate patches for redox-unix
patch = {}
patchelf = {}
#pathfinder = {} # servo-fontconfig
#pciids = {}
pcre = {}
pcre2 = {}
perg = {}
periodictable = {}
perl5 = {}
php84 = {}
#perl5 = {} # ctermid, tempnam, ttyname
pixelcannon = {}
pixman = {}
#pkgar = {} # uses virtual Cargo.toml, needs recipe update
pkg-config = {}
pkgar = {}
pkgutils = {}
pls = {}
pop-icon-theme = {}
powerline = {}
#powerline = {} # dirs
prboom = {}
procedural-wallpapers-rs = {}
profiled = {}
profiling-kernel = {}
python312 = {}
qemu = {}
quakespasm = {}
ptyd = {}
#python37 = {} # getaddrinfo
#qemu = {}
ramfs = {}
randd = {}
readline = {}
redoxerd = {}
redox-fatfs = {}
redox-games = {}
redoxfs = {}
redox-games = {}
redox-ssh = {}
relibc = {}
relibc-tests = {}
relibc-tests-bins = {}
#relibc-tests = {} # madvise link error
resist = {}
#retroarch = {} # OS_TLSIndex not declared
ripgrep = {}
rodioplay = {}
rs-nes = {}
rsync = {}
rust = {}
rust64 = {}
rustpython = {}
rust-cairo = {}
rust-cairo-demo = {}
rustual-boy = {}
rvvm = {}
schismtracker = {}
scummvm = {}
sdl-gfx = {}
#sdl-player = {} # wctype_t
sdl1 = {}
sdl1-image = {}
sdl1-mixer = {}
@ -247,80 +187,29 @@ sdl2-image = {}
sdl2-mixer = {}
sdl2-ttf = {}
sed = {}
servo = {}
#servo = {} # some more crates to port
shared-mime-info = {}
shellharden = {}
shellstorm = {}
simple-http-server = {}
smallvil = {}
smith = {}
sodium = {}
softbuffer-wayland = {}
sopwith = {}
sqlite3 = {}
#openssh = {}
strace = {}
syobonaction = {}
tcl = {}
terminfo = {}
#termplay = {} # backtrace cannot find link.h
timidity = {}
tmux = {}
tokei = {}
ttf-hack = {}
userutils = {}
uutils = {}
uutils-procps = {}
#vice = {} # linker errors
vim = {}
vttest = {}
wasmtime = {}
wayland-rs = {}
webkitgtk3 = {}
wget = {}
winit = {}
winit-wayland = {}
xxhash = {}
xz = {}
zenity = {}
zoxide = {}
zsh = {}
zlib = {}
zola = {}
zstd = {}
#benchmarks = {}
#binutils-gdb = {}
#book = {}
#cookbook = {}
#cosmic-settings = {}
#cosmic-store = {}
#dynamic-example = {}
#fal
#fd = {} # ctrlc-3.1.1
#freeglut = {}
#friar = {} # mio patch
#game-2048 = {} # rustc-serialize
#hematite = {} # needs crate patches for redox-unix
#ibm-plex = {}
#iced = {}
#libcosmic = {}
#mdp = {} # gcc hangs
#mupen64plus = {}
#noto-color-emoji = {}
#orbcalculator = {}
#ostest-bins = {}
#pastel = {} # needs crate patches for redox-unix
#pathfinder = {} # servo-fontconfig
#pciids = {}
#pop-wallpapers = {}
#retroarch = {} # cannot locate GL
#rust-cairo = {} # linking errors
#rust-cairo-demo = {} # linking errors
#schismtracker = {} # uses system includes
#sdl-player = {} # wctype_t
#sdl2-gfx = {}
#twin-commander = {}
#ubuntu-wallpapers = {}
#vice = {} # linker errors
#vvvvvv = {} # did not compile
vvvvvv = {}
#webrender = {} # unwind
#website = {}
#wesnoth = {}
#winit = {} # tzset
xz = {}
zerod = {}
zlib = {}

View File

@ -10,20 +10,17 @@ filesystem_size = 1536
# Package settings
[packages]
# GUI Apps
cosmic-reader = {}
periodictable = {}
# GUI Data
intel-one-mono = {}
# Shell Apps
gawk = {}
curl = {}
git = {}
gnu-grep = {}
htop = {}
ripgrep = {}
terminfo = {}
vim = {}
wget = {}
sodium = {}
# Games
dosbox = {}
@ -35,6 +32,7 @@ sopwith = {}
syobonaction = {}
# Demos
acid = {}
nushell = {}
orbclient = {}
pixelcannon = {}

View File

@ -1,6 +1,6 @@
# Desktop configuration using the Contain sandbox
include = ["desktop.toml"]
include = ["../desktop.toml"]
# Override the default settings here
@ -17,17 +17,18 @@ include = ["desktop.toml"]
[[files]]
path = "/usr/lib/init.d/20_orbital"
data = """
requires_weak 10_net.target 20_audiod.service
nowait VT=3 orbital contain_orblogin launcher
audiod
export VT 3
orbital contain_orblogin launcher
unset VT
"""
# 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
getty --contain 2
getty --contain /scheme/debug/no-preserve -J
"""
[[files]]

View File

@ -0,0 +1,14 @@
# 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

@ -0,0 +1,14 @@
# 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

@ -11,10 +11,4 @@ include = ["../dev.toml"]
# Package settings
[packages]
# see ci.toml for error reasons
gdbserver = "ignore"
gnu-binutils = "ignore"
mesa = "ignore"
mesa-glu = "ignore"
mpc = "ignore"
strace = "ignore"
# example = {}

View File

@ -1,9 +0,0 @@
include = [ "../base.toml", "ci.toml" ]
# General settings
[general]
filesystem_size = 8192
# Package settings
[packages]
# example = {}

View File

@ -1,6 +1,6 @@
# Configuration for Jeremy Soller
include = ["demo.toml"]
include = ["../desktop.toml"]
# General settings
[general]
@ -10,53 +10,54 @@ filesystem_size = 8192
# Package settings
[packages]
# apps
#boxedwine = {}
cosmic-player = {}
cosmic-reader = {}
cosmic-settings = {}
cosmic-store = {}
#boxedwine = {} # not building
cosmic-term = {}
cosmic-text = {}
#qemu = {} # not building
periodictable = {}
pixelcannon = {}
schismtracker = {}
servo = {}
sodium = {}
# cli
acid = {}
cleye = {}
ffmpeg6 = {}
gnu-grep = {}
lua54 = {}
nano = {}
#nushell = {}
nushell = {}
perg = {}
#relibc-tests = {}
russh = {}
relibc-tests = {}
ripgrep = {}
sed = {}
shellharden = {}
xz = {}
# demos
#cairodemo = {}
cmatrix = {}
cairodemo = {}
#cmatrix = {} # addwstr
cpal = {}
gears = {}
glutin = {}
#hematite = {} # not building
iced = {}
libcosmic = {}
orbclient = {}
osdemo = {} # does not show anything
#pathfinder = {} # not building
procedural-wallpapers-rs = {}
#rust-cairo = {}
#rust-cairo-demo = {}
rodioplay = {}
rust-cairo = {}
rust-cairo-demo = {}
sdl2-gears = {}
vttest = {}
#webrender = {}
webrender = {}
winit = {}
# dev
autoconf = {}
automake = {}
#cookbook = {}
cargo = {}
gcc13 = {}
gnu-binutils = {}
gnu-make = {}
@ -64,37 +65,44 @@ nasm = {}
patch = {}
pkg-config = {}
rust = {}
#rustpython = {} # not building
# games
devilutionx = {}
dosbox = {}
eduke32 = {}
flycast = {}
freeciv = {}
freedoom = {}
gigalomania = {}
love = {}
mednafen = {}
mgba = {}
neverball = {}
openjazz = {}
openjk = {}
openttd = {}
openttd-opengfx = {}
openttd-openmsx = {}
openttd-opensfx = {}
quakespasm = {}
prboom = {}
redox-games = {}
#retroarch = {} # need to package cores
rs-nes = {} # need game for testing
rust64 = {} # need roms
rustual-boy = {} # need game for testing
scummvm = {} # need game for testing
sm64ex = {}
#spacecadetpinball = {} # not building
sopwith = {}
spacecadetpinball = {}
syobonaction = {}
#vice = {} # broken on new toolchain
#vvvvvv = {} # cannot find -lgcc_s
# stuff
freepats = {}
generaluser-gs = {}
intel-one-mono = {}
jeremy = {}
libc-bench = {}
noto-color-emoji = {}
timidity = {}
ttf-hack = {}

3
config/x86_64/llvm.toml Normal file
View File

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

View File

@ -0,0 +1,14 @@
# 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

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

View File

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

View File

@ -1,13 +0,0 @@
# Configuration for demonstration
include = ["demo.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 1536
# Package settings
[packages]
cosmic-reader = {}
rustconf2025 = {}

View File

@ -1,311 +0,0 @@
# Configuration for server stack demonstration
include = ["../server.toml"]
# General settings
[general]
# Filesystem size in MiB
filesystem_size = 4096
# Package settings
[packages]
# Daemons
openssh = {}
nginx = {}
rustysd = {}
# Backends
php84 = {}
composer = {}
luajit = {}
python312 = {}
# go = {}
# zig = {}
# Tools
nano = {}
neovim = {}
rsync = {}
vim = {}
sqlite3 = {}
# tmux = {}
htop = {}
# Content
website = {}
[[files]]
path = "/usr/lib/init.d/98_keygen_sh"
data = """
requires_weak 10_net.target
bash /root/keygen.sh
"""
[[files]]
path = "/usr/lib/init.d/99_rustysd"
data = """
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]]
path = "/etc/rustysd/system/network-online.target"
data = """
[Unit]
Description=The target after networks has online
[Install]
WantedBy=default.target
"""
[[files]]
path = "/etc/rustysd/system/multi-user.target"
data = """
[Unit]
Description=The target after user administrations has online
[Install]
WantedBy=default.target
"""
[[files]]
path = "/etc/rustysd/system/nginx.service"
data = """
[Unit]
Description=The nginx HTTP and reverse proxy server
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/nginx -g "daemon off;"
[Install]
WantedBy=multi-user.target
"""
[[files]]
path = "/etc/rustysd/system/ssh.service"
data = """
[Unit]
Description=OpenBSD Secure Shell server
After=network-online.target
[Service]
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 = "/var/www/html/index.php"
data = """
<?php
echo "Hello from PHP on Redox!";
"""
[[files]]
path = "/var/www/html/phpinfo.php"
data = """
<?php phpinfo();
"""
[[files]]
path = "/var/www/html/README"
data = """
This is a demonstration into PHP server.
At the moment to run composer you have to run it like:
> php /bin/composer install
"""
[[files]]
postinstall = true
data = ""
path = "/etc/nginx/conf.d"
directory = true
[[files]]
postinstall = true
path = "/etc/nginx/nginx.conf"
data = """
user nginx;
# 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;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
include mime.types;
include fastcgi.conf;
default_type application/octet-stream;
include /etc/nginx/conf.d/*.conf;
}
"""
[[files]]
postinstall = true
path = "/etc/nginx/conf.d/localhost.conf"
data = """
server {
listen 80;
server_name localhost;
root /usr/share/website;
absolute_redirect off;
location / {
index index.html index.htm;
}
}
"""
[[files]]
postinstall = true
path = "/etc/nginx/conf.d/php-www.conf"
data = """
server {
listen 8081;
server_name localhost;
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
location ~ \\.php$ {
# 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;
}
}
"""
[[files]]
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
"""
[[files]]
postinstall = true
path = "/etc/php/84/php-fpm.d/www.conf"
data = """
[www]
user = user
group = user
listen = 127.0.0.1:9000
pm = static
pm.max_children = 1
"""
[[files]]
postinstall = true
path = "/etc/ssh/sshd_config"
data = """
Port 22
AddressFamily inet
AuthorizedKeysFile .ssh/authorized_keys
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes
Subsystem sftp /usr/libexec/sftp-server
"""
[users.nobody]
password = ""
shell = "/usr/bin/ion" #TODO: nologin?
[users.nginx]
password = ""
shell = "/usr/bin/ion" #TODO: nologin?
[[files]]
path = "/root/keygen.sh"
data = """
#!/usr/bin/env bash
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 ""
fi
"""
[[files]]
path = "/home/user/server.sh"
data = """
#!/usr/bin/env bash
/bin/sshd -D &
nginx -g "daemon off;" &
php-fpm --nodaemonize &
"""
[[files]]
path = "/home/user/Welcome.txt"
data = """
##############################################################################
# Welcome to Redox Server Demo!
#
# This is a quick demonstration of Redox used as server stack.
# 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.
#
# There should be rustysd already running, if not, you can try start it manually
# > sudo rustysd --conf /etc/rustysd
#
# 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`
#
##############################################################################
"""

14
config/x86_64/server.toml Normal file
View File

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

1
cookbook Submodule

@ -0,0 +1 @@
Subproject commit 5c30a878c6c2bde285b8d911cefef772706ec873

3
docker/.bash_aliases Normal file
View File

@ -0,0 +1,3 @@
# Hijack this file to set this PS1, visually indicating to the user that we are running the docker container
PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[1;35m\]<$IMAGE_NAME>\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "

45
docker/Dockerfile Executable file
View File

@ -0,0 +1,45 @@
# Configuration file to setup the Docker container of Redox
FROM rustlang/rust:nightly
ENV IMAGE_NAME=redox-os-docker
RUN set -ex; \
apt-get update; \
apt-get install -q -y --no-install-recommends \
apt-transport-https \
bison \
flex \
fuse \
gosu \
libfuse-dev \
nasm \
qemu-utils \
sudo \
texinfo \
autopoint \
git \
cmake \
gperf \
libhtml-parser-perl \
; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F; \
echo "deb https://static.redox-os.org/toolchain/apt/ /" >> \
/etc/apt/sources.list.d/redox.list; \
apt-get update -o Dir::Etc::sourcelist="redox.list"; \
apt-get install -q -y --no-install-recommends \
x86-64-unknown-redox-newlib \
x86-64-unknown-redox-binutils \
x86-64-unknown-redox-gcc \
; \
cargo install cargo-config; \
cargo install just@1.16.0; \
apt-get autoremove -q -y; \
apt-get clean -q -y; \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /usr/local/bin/
COPY .bash_aliases /etc/skel/
ENTRYPOINT ["bash", "/usr/local/bin/entrypoint.sh"]
CMD ["/bin/bash"]

85
docker/README.md Normal file
View File

@ -0,0 +1,85 @@
## Building Redox using a Docker image with the pre-built toolchain
*All you need is `git`, `make`, `qemu`, `fuse` and `docker`. The method requires
a non-privileged user able to run the `docker` command, which is usually achieved
by adding the user to the `docker` group.*
It's a three-steps process with variations depending on the platform.
On the first execution of one of the following docker commands, the
official container image will be pulled from dockerhub and stored
locally.
The image includes the required dependencies and the pre-built
toolchain. As long as you rely on this particular dependencies and
toolchain versions, you don't need to update the container.
### <a name='get_the_sources'></a>Get the sources
```
git clone https://gitlab.redox-os.org/redox-os/redox.git ; cd redox
```
### Update the source tree
Note: if you use the container on a different host or
with a different user, [get the sources first](#get_the_sources).
```shell
git pull --rebase --recurse-submodules && git submodule sync \
&& git submodule update --recursive --init
```
### Run the container to build Redox
```shell
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm redoxos/redox make fetch all
```
#### Linux with security modules
Add the following options depending on the security modules activated on your system:
```shell
--security-opt label=disable // disable SELinux
--security-opt seccomp=unconfined // disable seccomp
--security-opt apparmor=unconfined // disable AppArmor
```
Ex.: for a SELinux only system such as Fedora or CentOS
```shell
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
--security-opt label=disable \
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm redoxos/redox make fetch all
```
### Run the container interactively
```shell
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox
```
#### Demo
![Image of Usage](demo.gif)
### Clear the named volumes containing the toolchain caches
```shell
docker volume rm redox-"$(id -u)-$(id -g)"-cargo \
redox-"$(id -u)-$(id -g)"-rustup
```
### Build the container manually
If you cannot access dockerhub for whatever reason, you can also build
the container image manually.
```shell
docker build -t redoxos/redox docker/
```
### Troubleshooting / updating
Sometimes, builds may fail because the nightly toolchain of rust inside the container got out of sync with dependencies of redox, or there are issues with cargo. In this case, it might help to update your current container image and delete the rust and cargo caches. This way, you can start over from a clean state and rule out your local setup as the origin of errors.
```shell
docker pull redoxos/redox
docker volume rm redox-"$(id -u)-$(id -g)"-cargo \
redox-"$(id -u)-$(id -g)"-rustup
```

BIN
docker/demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

7
docker/docker.sh Executable file
View File

@ -0,0 +1,7 @@
# This script run the Docker image of Redox
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox "$@"

34
docker/entrypoint.sh Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Add local user
# Either use LOCAL_UID and LOCAL_GID if passed in at runtime via
# -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" or fallback
USER_NAME=redox
RUN_UID=${LOCAL_UID:-9001}
RUN_GID=${LOCAL_GID:-9001}
groupadd --non-unique --gid $RUN_GID $USER_NAME
useradd --non-unique --create-home --uid $RUN_UID --gid $USER_NAME --groups sudo $USER_NAME
echo "$USER_NAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user-no-sudo-password
export HOME=/home/$USER_NAME
# Check current UID and GID of files in the named volume caches for
# cargo and rustup. Test only one of the top level folders to speed
# things up.
TESTFILE=$RUSTUP_HOME/settings.toml
CACHED_UID=$(stat -c "%u" $TESTFILE)
CACHED_GID=$(stat -c "%g" $TESTFILE)
if [ $CACHED_UID != $RUN_UID ] || [ $RUN_GID != $CACHED_GID ]; then
echo -e "\033[01;38;5;155mChanging user id:group to ${RUN_UID}:${RUN_GID}. Please wait...\033[0m"
chown $RUN_UID:$RUN_GID -R $CARGO_HOME $RUSTUP_HOME
fi
# fixes issue in docker for mac where fuse permissions are restricted to root:root
# https://github.com/theferrit32/data-commons-workspace/issues/5
# https://github.com/heliumdatacommons/data-commons-workspace/commit/f96624c8a55f5ded5ac60f4f54182a59be92e66d
if [ -f /dev/fuse ]; then chmod 666 /dev/fuse; fi
exec gosu $USER_NAME "$@"

82
flake.lock generated
View File

@ -1,82 +0,0 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1763759067,
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1763934636,
"narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1761765539,
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1764038373,
"narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

202
flake.nix
View File

@ -1,202 +0,0 @@
{
description = "The Nix-flake for Redox development on NixOS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
nixpkgs,
flake-parts,
rust-overlay,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } (
top@{
config,
withSystem,
moduleWithSystem,
...
}:
{
systems = [
"i686-linux"
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{
system,
lib,
inputs',
...
}:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
rust-bin = pkgs.rust-bin.nightly."2026-05-24".default.override {
extensions = [
"rust-analyzer"
"rust-src"
];
targets = [ "x86_64-unknown-redox" ];
};
in
{
formatter = pkgs.nixfmt-rfc-style;
# TODO: Create Redox OS Image as package
# TODO: No cross-compile for now, as there is no pkgsCross.aarch64-unknown-redox and so on
# TODO: Get rid of make env step: package custom libtool and setup rust toolchain properly
devShells = {
# Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
# Provides a script that copies required files to ~/
default =
let
rustPlatform = pkgs.makeRustPlatform {
cargo = rust-bin;
rustc = rust-bin;
};
podmanSetupScript =
let
registriesConf = pkgs.writeText "registries.conf" ''
[registries.search]
registries = ['docker.io']
[registries.block]
registries = []
'';
in
pkgs.writeScript "podman-setup" ''
#!${pkgs.runtimeShell}
# Dont overwrite customised configuration
if ! test -f ~/.config/containers/policy.json; then
install -Dm555 ${pkgs.skopeo.src}/default-policy.json ~/.config/containers/policy.json
fi
if ! test -f ~/.config/containers/registries.conf; then
install -Dm555 ${registriesConf} ~/.config/containers/registries.conf
fi
systemctl --user start podman.socket || true
export PODMAN_SYSTEMD_UNIT=podman.socket
'';
# Provides a fake "docker" binary mapping to podman
dockerCompat = pkgs.runCommand "docker-podman-compat" { } ''
mkdir -p $out/bin
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
'';
in
pkgs.mkShell rec {
buildInputs = with pkgs; [
# Podman
dockerCompat
podman # Docker compat
runc # Container runtime
conmon # Container runtime monitor
skopeo # Interact with container registry
slirp4netns # User-mode networking for unprivileged namespaces
fuse-overlayfs # CoW for images, much faster than default vfs
# with FSTOOLS_IN_PODMAN=1 these are not needed
# without it, the installer fails to link FUSE somehow
#fuse
#rust-bin
qemu_kvm
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
NIX_SHELL_BUILD = "1";
FSTOOLS_IN_PODMAN = "1";
shellHook = ''
# Install required configuration
${podmanSetupScript}
echo "Redox podman build environment loaded"
'';
};
#TODO: This isn't tested yet, use at your own risk
native = pkgs.mkShell rec {
nativeBuildInputs =
let
autoreconf269 = pkgs.writeShellScriptBin "autoreconf2.69" "${pkgs.autoconf269}/bin/autoreconf";
in
with pkgs;
[
ant
autoconf
autoreconf269 # gnu-binutils
automake
bison
cmake
curl
doxygen
file
flex
gettext
gnumake
gnupatch
gperf
help2man
just
llvmPackages.clang
llvmPackages.llvm
lua
m4
meson
nasm
ninja
perl
perl540Packages.HTMLParser
perl540Packages.Po4a
pkg-config
pkgconf
(python3.withPackages (ps: with ps; [ mako ]))
qemu_kvm
rust-cbindgen
scons
texinfo
unzip
waf
wget
xdg-utils
xxd
zip
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
pkgs.syslinux
];
buildInputs = with pkgs; [
rust-bin
fuse # fuser
libpng # netsurf
fontconfig # orbutils
SDL # prboom
xorg.utilmacros # libX11
xorg.xtrans # libX11
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
PERL_PATH = "${pkgs.perl}/bin/perl";
NIX_SHELL_BUILD = "1";
PODMAN_BUILD = "0";
shellHook = with pkgs; ''
export PKG_CONFIG_PATH="${fuse.dev}/lib/pkgconfig\
:${libpng.dev}/lib/pkgconfig"
'';
};
};
};
}
);
}

1
installer Submodule

@ -0,0 +1 @@
Subproject commit 087810a25278f20fd6f7b897cd6de5ec29b44bea

View File

@ -3,69 +3,42 @@
IMG_TAG?=$(shell git describe --tags)
IMG_SEPARATOR?=_
IMG_DIR?=build/img/$(ARCH)
OS_TEST_DIR?=build/os-test/$(ARCH)
CI_COOKBOOK_CONFIG?=CI=1 COOKBOOK_LOGS=true COOKBOOK_CLEAN_BUILD=true COOKBOOK_VERBOSE=false COOKBOOK_COMPRESSED=true COOKBOOK_WEB=true
# CI image target - build standard images
# CI image target - build desktop, server and demo images
# To leave out the build tag, set both IMG_TAG and IMG_SEPARATOR to null
ci-img: FORCE
rm -rf $(IMG_DIR)
mkdir -p $(IMG_DIR)
$(MAKE) server desktop demo
$(MAKE) demo desktop server
cd $(IMG_DIR) && zstd --rm *
cd $(IMG_DIR) && sha256sum -b * > SHA256SUM
# The name of the target must match the name of the filesystem config file
server desktop demo: FORCE
rm -f "build/$(ARCH)/$@/harddrive.img" "build/$(ARCH)/$@/redox-live.iso"
export $(CI_COOKBOOK_CONFIG) REPO_NONSTOP=0 && \
$(MAKE) CONFIG_NAME=$@ build/$(ARCH)/$@/harddrive.img build/$(ARCH)/$@/redox-live.iso
mkdir -p $(IMG_DIR)
rm -f "build/$(ARCH)/$@/harddrive.img" "build/$(ARCH)/$@/livedisk.iso"
$(MAKE) CONFIG_NAME=$@ build/$(ARCH)/$@/harddrive.img build/$(ARCH)/$@/livedisk.iso
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)_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
cp "build/$(ARCH)/$@/livedisk.iso" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_livedisk.iso"
# CI packaging target
ci-pkg: prefix $(FSTOOLS_TAG) $(CONTAINER_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(HOST_CARGO) build --manifest-path Cargo.toml --release
export $(CI_COOKBOOK_CONFIG) REPO_NONSTOP=1 PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
$(REPO_BIN) cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
endif
ci-pkg: prefix FORCE
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
$(HOST_CARGO) build --manifest-path installer/Cargo.toml --release
export PATH="$(PREFIX_PATH):$$PATH" && \
PACKAGES="$$($(INSTALLER) --list-packages -c config/$(ARCH)/ci.toml)" && \
cd cookbook && \
./fetch.sh "$${PACKAGES}" && \
./repo.sh $(REPO_NONSTOP) "$${PACKAGES}"
# CI toolchain
ci-toolchain: $(CONTAINER_TAG) FORCE
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
ci-toolchain: FORCE
$(MAKE) PREFIX_BINARY=0 \
"prefix/$(TARGET)/gcc-install.tar.gz" \
"prefix/$(TARGET)/relibc-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
"prefix/$(TARGET)/rust-install.tar.gz"
rm -rf "build/toolchain/$(TARGET)"
mkdir -p "build/toolchain/$(TARGET)"
cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(TARGET)/gcc-install.tar.gz"
cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(TARGET)/relibc-install.tar.gz"
cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(TARGET)/rust-install.tar.gz"
cd "build/toolchain/$(TARGET)" && sha256sum -b * > SHA256SUM

View File

@ -5,129 +5,54 @@
HOST_ARCH?=$(shell uname -m)
# Configuration
## Architecture to build Redox for (aarch64, i586, or x86_64). Defaults to a host one
## Architecture to build Redox for (aarch64, i686, or x86_64). Defaults to a host one
ARCH?=$(HOST_ARCH)
## Sub-device type for aarch64 if needed
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
CONFIG_NAME?=desktop
## Build appstream data for repo
REPO_APPSTREAM?=0
## Ignore errors when building the repo, attempt to build every package
REPO_NONSTOP?=0
## Do not update source repos, attempt to build in offline condition
REPO_OFFLINE?=0
## Do not strip debug info for local build
REPO_DEBUG?=0
## Old config value that need to be corrected
ifeq ($(ARCH),i686)
ARCH=i586
endif
## REPO_NONSTOP?=--nonstop
REPO_NONSTOP?=
## 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
HOST_CARGO=env -u RUSTUP_TOOLCHAIN -u CC -u TARGET cargo
## Filesystem size in MB (default comes from filesystem_size in the FILESYSTEM_CONFIG)
## FILESYSTEM_SIZE?=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG))
## FILESYSTEM_SIZE?=$(shell $(HOST_CARGO) run --release --manifest-path installer/Cargo.toml -- --filesystem-size -c $(FILESYSTEM_CONFIG))
## Flags to pass to redoxfs-mkfs. Add --encrypt to set up disk encryption
REDOXFS_MKFS_FLAGS?=
## Set to 1 to enable Podman build, any other value will disable it
PODMAN_BUILD?=1
## Set to 1 to put filesystem tools inside podman, any other value will install it to host
FSTOOLS_IN_PODMAN?=0
## Set to 1 if FUSE is not available and we are running in a container
FSTOOLS_NO_MOUNT?=0
## Enable sccache to speed up cargo builds
## only do this by default if this is inside podman
SCCACHE_BUILD?=$(shell [ -f /run/.containerenv ] && echo 1 || echo 0)
PODMAN_BUILD?=0
## The containerfile to use for the Podman base image
CONTAINERFILE?=podman/redox-base-containerfile
# Per host variables
NPROC=nproc
SED=sed
FIND=find
REPO_BIN=./target/release/repo
ifneq ($(PODMAN_BUILD),1)
FSTOOLS_IN_PODMAN=0
export NPROC=nproc
export REDOX_MAKE=make
HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")
# x86_64 linux hosts have all toolchains
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)
ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
# The binary prefix is only built for x86_64 Linux hosts
PREFIX_BINARY=0
endif
endif
endif
ifeq ($(SCCACHE_BUILD),1)
ifeq (,$(shell command -v sccache))
$(info sccache not found in PATH)
SCCACHE_BUILD=0
endif
endif
ifeq ($(REPO_APPSTREAM),1)
export COOKBOOK_APPSTREAM=true
endif
ifeq ($(REPO_NONSTOP),1)
export COOKBOOK_NONSTOP=true
endif
ifeq ($(REPO_OFFLINE),1)
export COOKBOOK_OFFLINE=true
endif
ifeq ($(REPO_DEBUG),1)
export COOKBOOK_NOSTRIP=true
export COOKBOOK_DEBUG=true
#TODO: https://gitlab.redox-os.org/redox-os/relibc/-/issues/226
# export PROFILE=debug
# export RUSTCFLAGS="-Cdebuginfo=2"
endif
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
FUMOUNT=umount
NPROC=sysctl -n hw.ncpu
SED=gsed
FIND=gfind
export NPROC=sysctl -n hw.ncpu
VB_AUDIO=coreaudio
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
else ifeq ($(UNAME),FreeBSD)
FIND=gfind
FUMOUNT=sudo umount
export REDOX_MAKE=gmake
VB_AUDIO=pulse # To check, will probably be OSS on most setups
VBM=VBoxManage
else ifeq ($(UNAME),Redox)
PODMAN_BUILD=0
export CARGO_NET_GIT_FETCH_WITH_CLI=true
# 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))
@ -140,64 +65,53 @@ else
VBM=VBoxManage
endif
ifneq ($(UNAME),Linux)
PREFIX_BINARY=0
endif
ifneq ($(HOST_ARCH),x86_64)
PREFIX_BINARY=0
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)
$(info Please unset PODMAN_BUILD=1 in .config!)
endif
endif
ALLOW_FSTOOLS?=0
ifeq ($(FSTOOLS_IN_PODMAN),0)
ifeq ($(RUNNING_IN_PODMAN),0)
ALLOW_FSTOOLS=1
endif
endif
## Userspace variables
ifeq ($(ARCH),riscv64gc)
export TARGET=riscv64gc-unknown-redox
export GNU_TARGET=riscv64-unknown-redox
else
export TARGET=$(ARCH)-unknown-redox
export GNU_TARGET=$(ARCH)-unknown-redox
endif
export TARGET=$(ARCH)-unknown-redox
BUILD=build/$(ARCH)/$(CONFIG_NAME)
MOUNT_DIR=$(BUILD)/filesystem
FSTOOLS=build/fstools
INSTALLER=$(FSTOOLS)/bin/redox_installer
REDOXFS=$(FSTOOLS)/bin/redoxfs
REDOXFS_MKFS=$(FSTOOLS)/bin/redoxfs-mkfs
INSTALLER_OPTS=--cookbook=. --config-name=$(CONFIG_NAME)
INSTALLER_FEATURES=
REDOXFS_FEATURES=
COOKBOOK_OPTS="--filesystem=$(FILESYSTEM_CONFIG)"
ifeq ($(REPO_BINARY),1)
INSTALLER_OPTS+=--repo-binary
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
INSTALLER=installer/target/release/redox_installer
INSTALLER_OPTS=
LIST_PACKAGES=installer/target/release/list_packages
LIST_PACKAGES_OPTS=
ifeq ($(REPO_BINARY),0)
INSTALLER_OPTS+=--cookbook=cookbook
else
INSTALLER_OPTS+=--cookbook=cookbook --repo-binary
LIST_PACKAGES_OPTS+=--repo-binary
endif
REPO_TAG=$(BUILD)/repo.tag
FSTOOLS_TAG=build/fstools.tag
export BOARD FIND
export BOARD
ifeq ($(SCCACHE_BUILD),1)
export CC_WRAPPER:=sccache
export RUSTC_WRAPPER:=$(CC_WRAPPER)
endif
## Cross compiler variables
AR=$(TARGET)-gcc-ar
AS=$(TARGET)-as
CC=$(TARGET)-gcc
CXX=$(TARGET)-g++
LD=$(TARGET)-ld
NM=$(TARGET)-gcc-nm
OBJCOPY=$(TARGET)-objcopy
OBJDUMP=$(TARGET)-objdump
RANLIB=$(TARGET)-gcc-ranlib
READELF=$(TARGET)-readelf
STRIP=$(TARGET)-strip
## Rust cross compile variables
export AR_$(subst -,_,$(TARGET))=$(TARGET)-ar
export CC_$(subst -,_,$(TARGET))=$(TARGET)-gcc
export CXX_$(subst -,_,$(TARGET))=$(TARGET)-g++
ifeq ($(HOSTED_REDOX),1)
FSTOOLS_TAG=
endif
## If Podman is being used, a container is required
ifeq ($(PODMAN_BUILD),1)

View File

@ -1,29 +1,27 @@
# Configuration file for the build system dependencies
# Don't check for dependencies if you will be using Podman
# Don't check for Rust/Cargo 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)
# 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
# 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)
$(error just not found, install from crates.io or from your package manager)
endif
CARGO_CONFIG_VERSION=0.1.1
ifeq ($(shell env -u RUSTUP_TOOLCHAIN cargo install --list | grep '^cargo-config v$(CARGO_CONFIG_VERSION):$$'),)
$(error cargo-config $(CARGO_CONFIG_VERSION) not found, run "cargo install --force --version $(CARGO_CONFIG_VERSION) cargo-config")
endif
endif
endif

View File

@ -1,26 +1,6 @@
# Configuration file with the commands configuration of the Redox image
$(BUILD)/harddrive.img: $(FSTOOLS) $(REPO_TAG)
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
mkdir -p $(BUILD)
-$(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)); \
fi && \
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $@.partial
mv $@.partial $@
endif
$(BUILD)/redox-live.iso: $(FSTOOLS) $(REPO_TAG) redox.ipxe
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
$(BUILD)/harddrive.img: $(INSTALLER) $(FSTOOLS_TAG) $(REPO_TAG)
mkdir -p $(BUILD)
rm -rf $@ $@.partial
-$(FUMOUNT) /tmp/redox_installer || true
@ -29,77 +9,56 @@ else
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
fi && \
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) --write-bootloader="$(BUILD)/bootloader-live.efi" --live $@.partial
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $@.partial
mv $@.partial $@
cp redox.ipxe $(BUILD)/redox.ipxe
endif
$(BUILD)/filesystem.img: $(FSTOOLS) $(REPO_TAG)
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
$(BUILD)/livedisk.iso: $(INSTALLER) $(FSTOOLS_TAG) $(REPO_TAG)
mkdir -p $(BUILD)
-$(FUMOUNT) $(MOUNT_DIR) || true
rm -rf $@ $@.partial $(MOUNT_DIR)
rm -rf $@ $@.partial
-$(FUMOUNT) /tmp/redox_installer || true
FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
if [ -z "$$FILESYSTEM_SIZE" ] ; then \
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
fi && \
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
$(REDOXFS_MKFS) $(REDOXFS_MKFS_FLAGS) $@.partial
mkdir -p $(MOUNT_DIR)
$(REDOXFS) $@.partial $(MOUNT_DIR)
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) --live $@.partial
mv $@.partial $@
$(BUILD)/filesystem.img: $(INSTALLER) $(FSTOOLS_TAG) $(REPO_TAG)
mkdir -p $(BUILD)
-$(FUMOUNT) $(BUILD)/filesystem/ || true
rm -rf $@ $@.partial $(BUILD)/filesystem/
-$(FUMOUNT) /tmp/redox_installer || true
FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
if [ -z "$$FILESYSTEM_SIZE" ] ; then \
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
fi && \
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
redoxfs/target/release/redoxfs-mkfs $(REDOXFS_MKFS_FLAGS) $@.partial
mkdir -p $(BUILD)/filesystem/
redoxfs/target/release/redoxfs $@.partial $(BUILD)/filesystem/
sleep 1
pgrep redoxfs
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $(MOUNT_DIR)
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $(BUILD)/filesystem/
sync
-$(FUMOUNT) $(MOUNT_DIR) || true
rm -rf $(MOUNT_DIR)
-$(FUMOUNT) $(BUILD)/filesystem/ || true
rm -rf $(BUILD)/filesystem/
mv $@.partial $@
endif
mount: $(FSTOOLS) FORCE
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
@mkdir -p $(MOUNT_DIR)
$(REDOXFS) $(BUILD)/harddrive.img $(MOUNT_DIR)
@sleep 2
@echo "\033[1;36;49mharddrive.img mounted ($$(pgrep redoxfs))\033[0m"
endif
mount: $(FSTOOLS_TAG) FORCE
mkdir -p $(BUILD)/filesystem/
redoxfs/target/release/redoxfs $(BUILD)/harddrive.img $(BUILD)/filesystem/
sleep 2
pgrep redoxfs
mount_extra: $(FSTOOLS) FORCE
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
@mkdir -p $(MOUNT_DIR)
$(REDOXFS) $(BUILD)/extra.img $(MOUNT_DIR)
@sleep 2
@echo "\033[1;36;49mextra.img mounted ($$(pgrep redoxfs))\033[0m"
endif
mount_live: $(FSTOOLS) FORCE
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
@mkdir -p $(MOUNT_DIR)
$(REDOXFS) $(BUILD)/redox-live.iso $(MOUNT_DIR)
@sleep 2
@echo "\033[1;36;49mredox-live.iso mounted ($$(pgrep redoxfs))\033[0m"
endif
mount_extra: $(FSTOOLS_TAG) FORCE
mkdir -p $(BUILD)/filesystem/
redoxfs/target/release/redoxfs $(BUILD)/extra.img $(BUILD)/filesystem/
sleep 2
pgrep redoxfs
unmount: FORCE
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
@sync
ifneq ($(wildcard $(MOUNT_DIR)),)
$(FUMOUNT) $(MOUNT_DIR)
@rm -rf $(MOUNT_DIR)
@echo "\033[1;36;49mFilesystem unmounted\033[0m"
else
@echo "\033[1;36;49mDisk is not mounted\033[0m"
endif
@-$(FUMOUNT) /tmp/redox_installer 2>/dev/null || true
endif
sync
-$(FUMOUNT) $(BUILD)/filesystem/ || true
rm -rf $(BUILD)/filesystem/
-$(FUMOUNT) /tmp/redox_installer || true

View File

@ -1,56 +1,28 @@
# Configuration file for redox-installer, Cookbook and RedoxFS FUSE
fstools: $(FSTOOLS_TAG) $(FSTOOLS)
fstools: $(FSTOOLS_TAG)
GOING_TO_PODMAN_AGAIN?=0
# These tools run inside Podman if it is used, or on the host if Podman is not used
$(FSTOOLS): | prefix $(CONTAINER_TAG) $(FSTOOLS_TAG)
## The installer runs on the host, even when using Podman build
$(FSTOOLS_TAG): cookbook installer redoxfs $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
$(MAKE) $@ PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 GOING_TO_PODMAN_AGAIN=1
endif
else
rm -rf $@ $@.partial
mkdir -p $@.partial
ln -s ../../recipes $@.partial/recipes
$(MAKE) fstools_fetch PODMAN_BUILD=$(GOING_TO_PODMAN_AGAIN)
# Compile installer and redoxfs for host (may be outside of podman container)
cd $@.partial && \
export CARGO_TARGET_DIR=../$@-target && \
$(HOST_CARGO) install --root . --path recipes/core/installer/source --locked $(INSTALLER_FEATURES) && \
$(HOST_CARGO) install --root . --path recipes/core/redoxfs/source --locked $(REDOXFS_FEATURES)
mv $@.partial $@
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
$(HOST_CARGO) build --bin list_packages --manifest-path installer/Cargo.toml --release
$(HOST_CARGO) build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs --bin redoxfs-mkfs
mkdir -p build
touch $@
endif
fstools_fetch: $(FSTOOLS_TAG) FORCE
$(INSTALLER): installer
$(HOST_CARGO) build --bin redox_installer --manifest-path installer/Cargo.toml --release
fstools_clean: FORCE $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
$(REPO_BIN) fetch host:installer host: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
fstools_clean: FORCE
rm -rf target
rm -rf $(FSTOOLS)
rm -rf $(FSTOOLS)-target
$(HOST_CARGO) clean --manifest-path cookbook/Cargo.toml
$(HOST_CARGO) clean --manifest-path installer/Cargo.toml
$(HOST_CARGO) clean --manifest-path redoxfs/Cargo.toml
rm -f $(FSTOOLS_TAG)
endif

View File

@ -5,48 +5,25 @@
IMAGE_TAG?=redox-base
## Working Directory in Podman
CONTAINER_WORKDIR?=/mnt/redox
## Flag passed to the Podman volumes. :Z can be used only with SELinux
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)-$(HOST_ARCH)
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) \
--env CI=$(CI) --env COOKBOOK_MAKE_JOBS=$(COOKBOOK_MAKE_JOBS) --env COOKBOOK_LOGS=$(COOKBOOK_LOGS) --env COOKBOOK_VERBOSE=$(COOKBOOK_VERBOSE) --env COOKBOOK_COMPRESSED=$(COOKBOOK_COMPRESSED) \
--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)
PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR):Z --volume $(PODMAN_HOME):/home:Z
PODMAN_ENV?=--env PATH=/home/poduser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
PODMAN_CONFIG?=--env ARCH=$(ARCH) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG)
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --userns keep-id --user `id -u` --interactive --tty --env TERM=$(TERM)
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) bash
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) --tty $(IMAGE_TAG) bash
else
@echo PODMAN_BUILD=$(PODMAN_BUILD), please set it to 1 in mk/config.mk
endif
container_su: FORCE
podman exec --user=0 --latest --interactive --tty bash
container_clean: FORCE
rm -f build/container.tag
@echo "If podman dir cannot be removed, remove with \"sudo rm\"."
@ -69,11 +46,14 @@ container_kill: FORCE
## Must match the value of CONTAINER_TAG in config.mk
build/container.tag: $(CONTAINERFILE)
ifeq ($(PODMAN_BUILD),1)
rm -f $@ $(FSTOOLS_TAG)
rm -f build/container.tag
@echo "If podman_home dir cannot be removed, remove with \"sudo rm\"."
-rm -rf $(PODMAN_HOME) || true
-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) $(PODMAN_CACHE) --tag $(IMAGE_TAG)
sed s/_UID_/`id -u`/ $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
@echo "Mapping Podman user space. Please wait."
$(PODMAN_RUN) bash -e podman/rustinstall.sh
mkdir -p build
touch $@
@ -81,21 +61,3 @@ ifeq ($(PODMAN_BUILD),1)
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)
# TODO: make this work using `make debug.kernel` and remove this
kernel_debugger:
@echo "Building and running gdbgui container..."
podman build -t redox-kernel-debug - < $(ROOT)/podman/redox-gdb-containerfile
podman run --rm -p 5000:5000 -it --name redox-gdb \
-v "$(KERNEL_PATH_TARGET)/build/kernel.sym:/kernel.sym" \
-v "$(KERNEL_PATH_SOURCE)/src:/src" \
redox-kernel-debug --gdb-cmd "gdb -ex 'set confirm off' \
-ex 'add-symbol-file /kernel.sym' \
-ex 'target remote host.containers.internal:1234'"

View File

@ -1,97 +1,57 @@
# Configuration file for the Rust/GCC cross-compilers, relibc and libtool
# Configuration file for the Rust/GCC cross-compilers and relibc
PREFIX=prefix/$(TARGET)
PREFIX_INSTALL=$(PREFIX)/sysroot/
PREFIX_INSTALL=$(PREFIX)/relibc-install
PREFIX_PATH=$(ROOT)/$(PREFIX_INSTALL)/bin
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)
# dependencies of GCC and Rust
LIBGMP_TARGET=recipes/libs/libgmp/target/$(HOST_TARGET)/$(TARGET)
LIBMPFR_TARGET=recipes/libs/libmpfr/target/$(HOST_TARGET)/$(TARGET)
LIBMPC_TARGET=recipes/libs/mpc/target/$(HOST_TARGET)/$(TARGET)
LIBZLIB_TARGET=recipes/libs/zlib/target/$(HOST_TARGET)/$(TARGET)
LIBZSTD_TARGET=recipes/libs/zstd/target/$(HOST_TARGET)/$(TARGET)
LIBSSL_TARGET=recipes/libs/openssl3/target/$(HOST_TARGET)/$(TARGET)
LIBHTTP2_TARGET=recipes/libs/nghttp2/target/$(HOST_TARGET)/$(TARGET)
LIBCURL_TARGET=recipes/net/download/curl/target/$(HOST_TARGET)/$(TARGET)
LIBGCC_TARGET=recipes/libs/libgcc/target/$(TARGET)
LIBCPP_TARGET=recipes/libs/libstdcxx/target/$(TARGET)
UPSTREAM_RUSTC_VERSION=2026-05-24
BINUTILS_BRANCH=redox-2.41
GCC_BRANCH=redox-13.2.0
export PREFIX_RUSTFLAGS=-L $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib
export RUSTUP_TOOLCHAIN=$(ROOT)/$(PREFIX_INSTALL)
export REDOXER_TOOLCHAIN=$(RUSTUP_TOOLCHAIN)
PREFIX_CONFIG=CI=1 COOKBOOK_CLEAN_BUILD=true COOKBOOK_CLEAN_TARGET=false COOKBOOK_VERBOSE=true COOKBOOK_NONSTOP=false
prefix: $(PREFIX)/sysroot
export CC=
export CXX=
# Remove prefix builds and downloads
prefix_clean:
rm -rf $(PREFIX)
ifeq ($(PREFIX_BINARY),0)
rm -rf $(BINUTILS_TARGET) $(LIBTOOL_TARGET) $(GCC_TARGET) $(LIBSTDCXX_TARGET) $(RELIBC_FREESTANDING_TARGET)
rm -rf $(RELIBC_TARGET) $(LLVM_TARGET) $(RUST_TARGET) $(CLANG_TARGET) $(LLD_TARGET) $(LIBGMP_TARGET) $(LIBMPFR_TARGET)
rm -rf $(LIBMPC_TARGET) $(LIBZLIB_TARGET) $(LIBZSTD_TARGET) $(LIBSSL_TARGET) $(LIBHTTP2_TARGET) $(LIBCURL_TARGET)
rm -rf $(LIBGCC_TARGET) $(LIBCPP_TARGET)
endif
prefix: $(PREFIX_INSTALL)
# Remove relibc in sysroot and all statically linked recipes
static_clean: | $(FSTOOLS_TAG)
$(MAKE) c.relibc
$(MAKE) c.base,extrautils,kernel,redoxfs
$(MAKE) c.luajit,gettext,libgcc,libstdcxx,openssl1,openssl3,pcre2,sdl1,zstd,zlib,bzip2,xz
$(MAKE) c.expat,freetype2,libffi,libiconv,libjpeg,liborbital,libpng,libxml2,ncurses,ncursesw,termcap
rm -rf $(REPO_TAG)
PREFIX_STRIP=\
mkdir -p bin libexec "$(TARGET)/bin" && \
find bin libexec "$(TARGET)/bin" "$(TARGET)/lib" \
-type f \
-exec strip --strip-unneeded {} ';' \
2> /dev/null
$(PREFIX)/sysroot: $(PREFIX)/clang-install $(PREFIX)/rust-install $(PREFIX)/gcc-install | $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding sysroot\033[0m"
$(PREFIX)/relibc: $(ROOT)/relibc
mkdir -p "$(@D)"
rm -rf "$@.partial" "$@"
mkdir "$@.partial"
cp -r "$(PREFIX)/gcc-install/". "$@.partial"
cp -r "$(PREFIX)/rust-install/". "$@.partial"
cp -r "$(PREFIX)/clang-install/". "$@.partial"
ifneq ($(HOSTED_REDOX),1)
rm -rf "$@.partial/$(GNU_TARGET)/include/"*
cp -r "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++" "$@.partial/$(GNU_TARGET)/include/c++"
else
rm -rf "$@.partial/include/"*
cp -r "$(PREFIX)/gcc-install/include/c++" "$@.partial/include/c++"
endif
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
export CARGO="env -u CARGO cargo" $(PREFIX_CONFIG) && \
$(REPO_BIN) cook relibc
ifneq ($(HOSTED_REDOX),1)
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"
else
cp -r "$(RELIBC_TARGET)/stage/usr/". "$@.partial"
mkdir -p "$@.partial/usr"
ln -s "../include" "$@.partial/usr/include"
ln -s "../lib" "$@.partial/usr/lib"
endif
cp -r "$^" "$@.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/$(TARGET)/include/c++" "$@.partial/$(TARGET)/include/c++"
cp -r "$(PREFIX)/rust-install/lib/rustlib/$(HOST_TARGET)/lib/" "$@.partial/lib/rustlib/$(HOST_TARGET)/"
cd "$<" && \
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/$(TARGET)"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
# adapt path for libtoolize
sed 's|/usr/share|$(ROOT)/$@/share|g' "$@/bin/libtoolize.orig" > "$@/bin/libtoolize"
chmod 0755 "$@/bin/libtoolize"
touch "$@"
endif
$(PREFIX)/relibc-install.tar.gz: $(PREFIX)/sysroot
$(PREFIX)/relibc-install.tar.gz: $(PREFIX)/relibc-install
tar \
--create \
--gzip \
@ -99,105 +59,194 @@ $(PREFIX)/relibc-install.tar.gz: $(PREFIX)/sysroot
--directory="$<" \
.
# PREFIX_BINARY ---------------------------------------------------
ifeq ($(PREFIX_BINARY),1)
# PREFIX_BINARY FOR LINUX -----------------------------------------
ifneq ($(HOSTED_REDOX),1)
$(PREFIX)/%.tar.gz: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(PREFIX)/rust-install.tar.gz:
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/$(@F)"
#TODO: figure out why rust-install.tar.gz is missing /lib/rustlib/$(HOST_TARGET)/lib
wget -O $@.partial "https://static.redox-os.org/toolchain/$(TARGET)/relibc-install.tar.gz"
mv $@.partial $@
endif
$(PREFIX)/gcc-install $(PREFIX)/rust-install $(PREFIX)/clang-install: %: %.tar.gz | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
touch "$@.partial"
mv "$@.partial" "$@"
endif
# PREFIX_BINARY FOR REDOX -----------------------------------------
else
$(PREFIX)/id_ed25519.pub.toml: | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(ROOT)/rust:
git submodule update --init --recursive --checkout rust
PREFIX_BASE_INSTALL=$(PREFIX)/rust-freestanding-install
PREFIX_FREESTANDING_INSTALL=$(PREFIX)/gcc-freestanding-install
PREFIX_BASE_PATH=$(ROOT)/$(PREFIX_BASE_INSTALL)/bin
PREFIX_FREESTANDING_PATH=$(ROOT)/$(PREFIX_FREESTANDING_INSTALL)/bin
$(PREFIX)/binutils-$(BINUTILS_BRANCH).tar.bz2:
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/id_ed25519.pub.toml"
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"
mv $@.partial $@
$(PREFIX)/binutils: $(PREFIX)/binutils-$(BINUTILS_BRANCH).tar.bz2
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
touch "$@.partial"
mv "$@.partial" "$@"
$(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="$(TARGET)" \
--program-prefix="$(TARGET)-" \
--prefix="" \
--disable-werror \
&& \
$(MAKE) -j `$(NPROC)` all && \
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
rm -rf "$<-build"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/%.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
$(PREFIX)/gcc-$(GCC_BRANCH).tar.bz2:
mkdir -p "$(@D)"
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/$(@F)"
mv $@.partial $@
endif
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-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" "$@"
$(PREFIX)/gcc: $(PREFIX)/gcc-$(GCC_BRANCH).tar.bz2
mkdir -p "$@.partial"
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"
mv "$@.partial/usr"/* "$@.partial"
rmdir "$@.partial/usr"
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
cd "$@.partial" && ./contrib/download_prerequisites
touch "$@.partial"
mv "$@.partial" "$@"
$(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="$(TARGET)" \
--program-prefix="$(TARGET)-" \
--prefix="" \
--disable-nls \
--enable-languages=c,c++ \
--without-headers \
&& \
$(MAKE) -j `$(NPROC)` all-gcc && \
$(MAKE) -j `$(NPROC)` install-gcc DESTDIR="$(ROOT)/$@.partial"
rm -rf "$<-freestanding-build"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/rust-install: $(PREFIX)/llvm21.pkgar $(PREFIX)/rust.pkgar $(CONTAINER_TAG)
$(PREFIX)/rust-freestanding-install: $(ROOT)/rust | $(PREFIX)/binutils-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
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"
mv "$@.partial/usr"/* "$@.partial"
rmdir "$@.partial/usr"
rm -rf "$(PREFIX)/rust-freestanding-build" "$@.partial" "$@"
mkdir -p "$(PREFIX)/rust-freestanding-build"
cp -r "$(PREFIX)/binutils-install" "$@.partial"
cd "$(PREFIX)/rust-freestanding-build" && \
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
"$</configure" \
--prefix="/" \
--disable-docs \
--disable-download-ci-llvm \
--enable-cargo-native-static \
--enable-extended \
--enable-lld \
--enable-llvm-static-stdcpp \
--set 'llvm.targets=AArch64;X86' \
--set 'llvm.experimental-targets=' \
--tools=cargo,src \
&& \
$(MAKE) -j `$(NPROC)` && \
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
rm -rf "$(PREFIX)/rust-freestanding-build"
mkdir -p "$@.partial/lib/rustlib/$(HOST_TARGET)/bin"
mkdir -p "$@.partial/lib/rustlib/$(HOST_TARGET)/lib"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/clang-install: $(PREFIX)/llvm21.runtime.pkgar $(PREFIX)/clang21.pkgar $(PREFIX)/lld21.pkgar $(CONTAINER_TAG)
$(PREFIX)/relibc-freestanding: $(ROOT)/relibc
mkdir -p "$(@D)"
rm -rf "$@.partial" "$@"
cp -r "$^" "$@.partial"
touch "$@.partial"
mv "$@.partial" "$@"
$(PREFIX)/relibc-freestanding-install: $(PREFIX)/relibc-freestanding | $(PREFIX_BASE_INSTALL) $(PREFIX_FREESTANDING_INSTALL) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
$(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"
mv "$@.partial/usr"/* "$@.partial"
rmdir "$@.partial/usr"
cd "$<" && \
export PATH="$(PREFIX_BASE_PATH):$(PREFIX_FREESTANDING_PATH):$$PATH" && \
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN cargo" && \
export CC_$(subst -,_,$(TARGET))="$(TARGET)-gcc -isystem $(ROOT)/$@.partial/$(TARGET)/include" && \
$(MAKE) clean && \
$(MAKE) -j `$(NPROC)` all && \
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial/$(TARGET)"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
$(PREFIX)/gcc-install: $(PREFIX)/gcc | $(PREFIX)/relibc-freestanding-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) $(MAKE) $@
else
rm -rf "$<-build" "$@.partial" "$@"
mkdir -p "$<-build"
cp -r "$(PREFIX_BASE_INSTALL)" "$@.partial"
cd "$<-build" && \
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
"$(ROOT)/$</configure" \
--target="$(TARGET)" \
--program-prefix="$(TARGET)-" \
--prefix="" \
--with-sysroot \
--with-build-sysroot="$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(TARGET)" \
--with-native-system-header-dir="/include" \
--disable-multilib \
--disable-nls \
--disable-werror \
--enable-languages=c,c++ \
--enable-shared \
--enable-threads=posix \
&& \
$(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/$(TARGET)/lib/*.la
rm -rf "$<-build"
cd "$@.partial" && $(PREFIX_STRIP)
touch "$@.partial"
mv "$@.partial" "$@"
endif
else
$(PREFIX)/%.tar.gz: $(PREFIX)/%
$(PREFIX)/gcc-install.tar.gz: $(PREFIX)/gcc-install
tar \
--create \
--gzip \
@ -205,233 +254,44 @@ $(PREFIX)/%.tar.gz: $(PREFIX)/%
--directory="$<" \
.
# BUILD GCC ---------------------------------------------------
$(PREFIX)/libtool-install: | $(FSTOOLS_TAG) $(CONTAINER_TAG)
$(PREFIX)/rust-install: $(ROOT)/rust | $(PREFIX)/gcc-install $(PREFIX)/relibc-freestanding-install $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
$(PODMAN_RUN) $(MAKE) $@
else
@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)/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
rm -rf "$(PREFIX)/rust-build" "$@.partial" "$@"
mkdir -p "$(PREFIX)/rust-build"
cp -r "$(PREFIX)/gcc-install" "$@.partial"
cp -r "$(PREFIX)/relibc-freestanding-install/$(TARGET)" "$@.partial"
cd "$(PREFIX)/rust-build" && \
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"
"$</configure" \
--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)
touch "$@.partial"
mv "$@.partial" "$@"
endif
# BUILD RUST ---------------------------------------------------
else
$(PREFIX)/rust-install: | $(PREFIX)/gcc-install $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
@echo "\033[1;36;49mBuilding rust-install\033[0m"
rm -rf "$@.partial" "$@"
export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/gcc-install/bin:$$PATH" \
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \
$(REPO_BIN) cook host:llvm21 host:rust
cp -r "$(RUST_TARGET)/stage/usr/". "$@.partial"
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.runtime/usr/". "$@.partial"
cp -r "$(LLVM_TARGET)/stage.dev/usr/". "$@.partial"
cp -r "$(CLANG_TARGET)/stage/usr/". "$@.partial"
cp -r "$(LLD_TARGET)/stage/usr/". "$@.partial"
rm -rf "$@.partial/lib/"*.a
mv "$@.partial" "$@"
# no longer needed, delete build files to save disk space
rm -rf $(LLVM_TARGET) $(CLANG_TARGET) $(LLD_TARGET)
endif
$(PREFIX)/rust-install.tar.gz: $(PREFIX)/rust-install
tar \
--create \
--gzip \
--file "$@" \
--directory="$<" \
.
endif

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