├── .gitignore
├── .gitlab-ci.yml
├── .gitlab
├── issue_templates
│ └── Issue_template.md
└── merge_request_templates
│ └── Merge_request_template.md
├── .gitmodules
├── CONTRIBUTING.md
├── HARDWARE.md
├── LICENSE
├── Makefile
├── README.md
├── build.sh
├── config
├── aarch64
│ ├── acid.toml
│ ├── ci.toml
│ ├── demo.toml
│ ├── desktop-minimal.toml
│ ├── desktop.toml
│ ├── jeremy.toml
│ ├── minimal-net.toml
│ ├── minimal.toml
│ ├── raspi3bp
│ │ └── minimal.toml
│ ├── resist.toml
│ └── server.toml
├── acid.toml
├── base.toml
├── desktop-minimal.toml
├── desktop.toml
├── dev.toml
├── i686
│ ├── acid.toml
│ ├── ci.toml
│ ├── demo.toml
│ ├── desktop-minimal.toml
│ ├── desktop.toml
│ ├── dev.toml
│ ├── jeremy.toml
│ ├── minimal-net.toml
│ ├── minimal.toml
│ ├── resist.toml
│ └── server.toml
├── llvm.toml
├── minimal-net.toml
├── minimal.toml
├── net.toml
├── redoxer-gui.toml
├── redoxer.toml
├── resist.toml
├── riscv64gc
│ ├── ci.toml
│ ├── demo.toml
│ ├── desktop-minimal.toml
│ ├── desktop.toml
│ ├── jeremy.toml
│ ├── minimal-net.toml
│ ├── minimal.toml
│ └── server.toml
├── server.toml
├── x11.toml
└── x86_64
│ ├── acid.toml
│ ├── ci.toml
│ ├── demo.toml
│ ├── desktop-contain.toml
│ ├── desktop-minimal.toml
│ ├── desktop.toml
│ ├── dev.toml
│ ├── full.toml
│ ├── jeremy.toml
│ ├── llvm.toml
│ ├── minimal-net.toml
│ ├── minimal.toml
│ ├── resist.toml
│ ├── server.toml
│ └── x11.toml
├── docker
├── .bash_aliases
├── Dockerfile
├── README.md
├── demo.gif
├── docker.sh
└── entrypoint.sh
├── flake.lock
├── flake.nix
├── mk
├── ci.mk
├── config.mk
├── depends.mk
├── disk.mk
├── fstools.mk
├── podman.mk
├── prefix.mk
├── qemu.mk
├── repo.mk
└── virtualbox.mk
├── native_bootstrap.sh
├── podman
├── redox-base-containerfile
└── rustinstall.sh
├── podman_bootstrap.sh
├── rust-toolchain.toml
├── scripts
├── backtrace.sh
├── cargo-update.sh
├── category.sh
├── changelog.sh
├── commit-hash.sh
├── dual-boot.sh
├── executables.sh
├── find-recipe.sh
├── include-recipes.sh
├── pkg-size.sh
├── print-recipe.sh
├── recipe-match.sh
├── recipe-path.sh
├── show-package.sh
└── ventoy.sh
└── targets
├── README
└── riscv64gc-unknown-redox.json
/.gitignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /prefix/
3 | .config
4 | **/my_*
5 | # Local settings folder for Jetbrains products (RustRover, IntelliJ, CLion)
6 | .idea/
7 | # Local settings folder for Visual Studio Professional
8 | .vs/
9 | # Local settings folder for vscode
10 | .vscode/
11 | # Local settings folder for the devcontainer extension that most IDEs support.
12 | .devcontainer/
13 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | # The GitLab Continuous Integration configuration
2 | image: "ubuntu:22.04"
3 |
4 | variables:
5 | GIT_STRATEGY: "clone"
6 | GIT_SUBMODULE_STRATEGY: "recursive"
7 |
8 | before_script:
9 | # Disable the wget progress bar
10 | - echo 'show-progress = off' >> ~/.wgetrc
11 | - |
12 | export DEBIAN_FRONTEND=noninteractive
13 | apt-get update -qq &&
14 | apt-get install -qq \
15 | bison \
16 | build-essential \
17 | curl \
18 | flex \
19 | fuse3 \
20 | git \
21 | libfuse-dev \
22 | nasm \
23 | pkg-config \
24 | texinfo \
25 | wget \
26 | help2man \
27 | autoconf \
28 | automake \
29 | zstd &&
30 | curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
31 |
32 | img:
33 | script:
34 | - |
35 | source "$HOME/.cargo/env" &&
36 | curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash &&
37 | cargo binstall --no-confirm --version 0.1.1 cargo-config &&
38 | cargo binstall --no-confirm --version 1.16.0 just &&
39 | cargo binstall --no-confirm --version 0.27.0 cbindgen &&
40 | cargo build --manifest-path installer/Cargo.toml --release &&
41 | PODMAN_BUILD=0 REPO_BINARY=1 make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
42 | artifacts:
43 | paths:
44 | - build/img/
45 | expire_in: 1 week
46 |
--------------------------------------------------------------------------------
/.gitlab/issue_templates/Issue_template.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - [ ] I agree that I have searched opened and closed issues to prevent duplicates.
6 |
7 | --------------------
8 |
9 |
10 |
11 | ## Description
12 |
13 | Replace me
14 |
15 |
16 |
17 | ## Environment info
18 |
19 |
20 |
21 | - Redox OS Release:
22 | 0.0.0 Remove me
23 |
24 |
25 | - Operating system:
26 | Replace me
27 | - `uname -a`:
28 | `Replace me`
29 | - `rustc -V`:
30 | `Replace me`
31 | - `git rev-parse HEAD`:
32 | `Replace me`
33 |
34 | - Replace me:
35 | Replace me
36 |
37 |
38 |
39 | ## Steps to reproduce
40 |
41 | 1. Replace me
42 | 2. Replace me
43 | 3. ...
44 |
45 |
46 |
47 | ## Behavior
48 |
49 |
50 |
51 | - **Expected behavior**:
52 | Replace me
53 |
54 |
55 | - **Actual behavior**:
56 | Replace me
57 |
58 |
59 | ```
60 | Replace me
61 | ```
62 |
63 |
64 | - **Proposed solution**:
65 | Replace me
66 |
67 |
68 |
69 |
70 |
71 | ## Optional references
72 |
73 |
74 | Related to:
75 | - #0000 Remove me
76 | - Replace me
77 | - ...
78 |
79 | Blocked by:
80 | - #0000 Remove me
81 | - ...
82 |
83 |
84 |
85 | ## Optional extras
86 |
87 | Replace me
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/.gitlab/merge_request_templates/Merge_request_template.md:
--------------------------------------------------------------------------------
1 | **Problem**: [describe the problem you try to solve with this PR.]
2 |
3 | **Solution**: [describe carefully what you change by this PR.]
4 |
5 | **Changes introduced by this pull request**:
6 |
7 | - [...]
8 | - [...]
9 | - [...]
10 |
11 | **Drawbacks**: [if any, describe the drawbacks of this pull request.]
12 |
13 | **TODOs**: [what is not done yet.]
14 |
15 | **Fixes**: [what issues this fixes.]
16 |
17 | **State**: [the state of this PR, e.g. WIP, ready, etc.]
18 |
19 | **Blocking/related**: [issues or PRs blocking or being related to this issue.]
20 |
21 | **Other**: [optional: for other relevant information that should be known or cannot be described in the other fields.]
22 |
23 | ------
24 |
25 | _The above template is not necessary for smaller PRs._
26 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "cookbook"]
2 | path = cookbook
3 | url = https://gitlab.redox-os.org/redox-os/cookbook.git
4 | branch = master
5 | [submodule "installer"]
6 | path = installer
7 | url = https://gitlab.redox-os.org/redox-os/installer.git
8 | branch = master
9 | [submodule "rust"]
10 | path = rust
11 | url = https://gitlab.redox-os.org/redox-os/rust.git
12 | branch = redox-2025-01-12
13 | update = none
14 | [submodule "redoxfs"]
15 | path = redoxfs
16 | url = https://gitlab.redox-os.org/redox-os/redoxfs.git
17 | branch = master
18 | [submodule "relibc"]
19 | path = relibc
20 | url = https://gitlab.redox-os.org/redox-os/relibc.git
21 | branch = master
22 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Redox
2 |
3 | **Thank you for your interest in contributing to Redox!**
4 |
5 | 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!**
6 |
7 | **Please read this document until the end**
8 |
9 | ## Code Of Conduct
10 |
11 | We follow the [Rust Code Of Conduct](https://www.rust-lang.org/policies/code-of-conduct).
12 |
13 | ## License
14 |
15 | In general, your contributions to Redox are governed by the [MIT License](https://en.wikipedia.org/wiki/MIT_License). Each project repository has a `LICENSE` file that provides the license terms for that project.
16 |
17 | Please review the `LICENSE` file for the project you are contributing to.
18 |
19 | [This](https://doc.redox-os.org/book/philosophy.html) page we explain why we use the MIT license.
20 |
21 | ## Chat
22 |
23 | Join us on [Matrix Chat](https://doc.redox-os.org/book/chat.html) to discuss issues or ask questions.
24 |
25 | ## Important Places to Contribute
26 |
27 | 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/).
28 |
29 | You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest first):
30 |
31 | - [Website](https://gitlab.redox-os.org/redox-os/website)
32 | - [Book](https://gitlab.redox-os.org/redox-os/book) - High-level documentation
33 | - [Build System Configuration](https://gitlab.redox-os.org/redox-os/redox) - Our main repository
34 | - [Cookbook](https://gitlab.redox-os.org/redox-os/cookbook) - Software Ports System
35 | - [Orbital](https://gitlab.redox-os.org/redox-os/orbital) - Display Server and Window Manager
36 | - [pkgutils](https://gitlab.redox-os.org/redox-os/pkgutils) - Package Manager
37 | - [resist](https://gitlab.redox-os.org/redox-os/resist) - Redox System Interface Specifications and Tests (also has POSIX tests)
38 | - [acid](https://gitlab.redox-os.org/redox-os/acid) - Redox Test Suite
39 | - [relibc](https://gitlab.redox-os.org/redox-os/relibc) - Redox C Library
40 | - [libredox](https://gitlab.redox-os.org/redox-os/libredox) - Redox System Library
41 | - [netstack](https://gitlab.redox-os.org/redox-os/netstack) - Network Stack
42 | - [Bootloader](https://gitlab.redox-os.org/redox-os/bootloader)
43 | - [Drivers](https://gitlab.redox-os.org/redox-os/drivers) - Device Drivers
44 | - [Kernel](https://gitlab.redox-os.org/redox-os/kernel)
45 |
46 | To see all Redox repositories open the [redox-os group](https://gitlab.redox-os.org/redox-os).
47 |
48 | ### Skill Levels
49 |
50 | If you don't know programming:
51 |
52 | - Write documentation
53 | - Use and test Redox, and file issues for bugs or needed features (please check for duplicates first etc.)
54 |
55 | If you don't know how to code in Rust, but know other programming languages:
56 |
57 | - Web development on the website (we don't accept JavaScript code)
58 | - Write unit tests (may require minimal knowledge of Rust)
59 | - Port C/C++ programs to Redox (read the `TODO`s of the recipes on the [WIP category](https://gitlab.redox-os.org/redox-os/cookbook/-/tree/master/recipes/wip?ref_type=heads))
60 | - Port programs to Redox
61 |
62 | If you know how to code in Rust, but don't know operating system development:
63 |
64 | - 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.
65 | - Improve the package manager, or other meta-tools like `redoxer` or `installer`
66 | - Improve the [Ion](https://gitlab.redox-os.org/redox-os/ion) shell, or other high-level or mid-level projects
67 | - Port Rust programs to Redox, possibly including dependencies, and C library extensions if necessary (also look for issues with the `port` label)
68 | - Improve program compatibility in relibc by e.g. implementing missing APIs
69 |
70 | If you know how to code in Rust, and have experience with systems software/OS development:
71 |
72 | - Familiarize yourself with the repository layout, code, and build system
73 | - Update old code to remove warnings
74 | - Search for `TODO`, `FIXME`, `BUG`, `UNOPTIMIZED`, `REWRITEME`, `DOCME`, and `PRETTYFYME` and fix the code you find
75 | - Look in general for issues with the following labels: `critical`, `help wanted`, `feature`, `enhancement`, `bug` or `port`
76 | - Improve internal libraries and abstractions, e.g. `libredox`, `redox-scheme`, `redox-event` etc.
77 | - Help upstream Redox-specific functionality to the Rust ecosystem
78 | - Improve Redox's automated testing suite and continuous integration testing processes
79 | - Improve, profile, and optimize code, especially in the kernel, filesystem, and network stack
80 | - Improve or write device drivers
81 |
82 | For those who want to contribute to the Redox GUI, our GUI strategy has recently changed.
83 |
84 | - 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).
85 | - 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.
86 | - 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.
87 |
88 | ## Priorities
89 |
90 | You can use the following GitLab label filters to know our development priorities on the moment:
91 |
92 | - [Critical](https://gitlab.redox-os.org/redox-os/redox/-/issues/?sort=created_date&state=opened&label_name%5B%5D=critical&first_page_size=20)
93 | - [High-priority](https://gitlab.redox-os.org/redox-os/redox/-/issues/?sort=created_date&state=opened&label_name%5B%5D=high-priority&first_page_size=20)
94 | - [Medium-priority](https://gitlab.redox-os.org/redox-os/redox/-/issues/?sort=created_date&state=opened&label_name%5B%5D=medium-priority&first_page_size=20)
95 | - [Low-priority](https://gitlab.redox-os.org/redox-os/redox/-/issues/?sort=created_date&state=opened&label_name%5B%5D=low-priority&first_page_size=20)
96 |
97 | ## RFCs
98 |
99 | For more significant changes that affect Redox's architecture, we use the [Request for Comments](https://gitlab.redox-os.org/redox-os/rfcs) repository.
100 |
101 | ## Build System
102 |
103 | To download the build system use the following commands:
104 |
105 | (You need to have [curl](https://curl.se/) installed on your system)
106 |
107 | ```sh
108 | curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/podman_bootstrap.sh -o podman_bootstrap.sh
109 | ```
110 |
111 | ```sh
112 | time bash -e podman_bootstrap.sh
113 | ```
114 |
115 | To start the compilation of the default recipes run the command below:
116 |
117 | ```sh
118 | make all
119 | ```
120 |
121 | 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:
122 |
123 | ```sh
124 | make all USE_SELINUX=0
125 | ```
126 |
127 | You can find the build system organization and commands on the [Build System](https://doc.redox-os.org/book/build-system-reference.html) page.
128 |
129 | ## Developer FAQ
130 |
131 | You can see the most common questions and problems on the [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html) page.
132 |
133 | ## Porting Software
134 |
135 | You can read how to use the Cookbook recipe system to port applications on the [Porting Applications using Recipes](https://doc.redox-os.org/book/porting-applications.html) page.
136 |
137 | ## Libraries and APIs
138 |
139 | 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.
140 |
141 | ## Visual Studio Code (VS Code) Configuration
142 |
143 | 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.
144 |
145 | ## Development Tips
146 |
147 | You can find important tips on the [Development Tips](https://doc.redox-os.org/book/coding-and-building.html#development-tips) section.
148 |
149 | ## References
150 |
151 | 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.
152 |
153 | If you are skilled there's a possibility that they could improve your knowledge in some way.
154 |
155 | ## Best Practices and Guidelines
156 |
157 | You can read the best practices and guidelines on the [Best practices and guidelines](https://doc.redox-os.org/book/best-practices.html) chapter.
158 |
159 | ## Style Guidelines
160 |
161 | ### Rust
162 |
163 | 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.
164 |
165 | ### Git
166 |
167 | Please follow our [Git style](https://doc.redox-os.org/book/creating-proper-pull-requests.html) for pull requests.
168 |
169 | ## GitLab
170 |
171 | ### Identity
172 |
173 | 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.
174 |
175 | ### Issues
176 |
177 | To know how to create issues on the Redox GitLab, read the [Filing Issues](https://doc.redox-os.org/book/filing-issues.html) page.
178 |
179 | 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).
180 |
181 | By doing this you help us to pay attention to your issues and avoid them to be accidentally forgotten.
182 |
183 | ### Pull Requests
184 |
185 | Please follow [our process](https://doc.redox-os.org/book/creating-proper-pull-requests.html) for creating proper pull requests.
186 |
187 | ## Other Ways to Contribute
188 |
189 | If you aren't good on coding, but you still want to help keep the project going, you can contribute and support in a variety of ways! We'll try to find a way to use anything you have to offer.
190 |
191 | ### Design
192 |
193 | If you're a good designer, whether it's 2D graphics, 3D graphics, interfaces, web design, you can help. We need logos, UI design, UI skins, app icons, desktop backgrounds, etc.
194 |
195 | - [Redox backgrounds](https://gitlab.redox-os.org/redox-os/backgrounds) - You can send your wallpapers on this repository.
196 | - [Redox assets](https://gitlab.redox-os.org/redox-os/assets) - You can send your logos, icons and themes on this repository.
197 |
198 | If you have questions about the graphic design, ask us on the [Chat](https://doc.redox-os.org/book/chat.html).
199 |
200 | ### Donate to Redox
201 |
202 | 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.
203 |
--------------------------------------------------------------------------------
/HARDWARE.md:
--------------------------------------------------------------------------------
1 | # Hardware Compatibility
2 |
3 | This document tracks the current hardware compatibility of Redox.
4 |
5 | - [Why hardware reports are needed?](#why-hardware-reports-are-needed)
6 | - [What if my computer is customized?](#what-if-my-computer-is-customized)
7 | - [Status](#status)
8 | - [General](#general)
9 | - [Template](#template)
10 | - [Recommended](#recommended)
11 | - [Booting](#booting)
12 | - [Broken](#broken)
13 |
14 | ## Why hardware reports are needed?
15 |
16 | Each computer model have different hardware interface/firmware implementations and devices, which can cause the following problems:
17 |
18 | - Boot bugs
19 | - Lack of device support
20 | - Performance degradation
21 |
22 | These reports helps us to fix the problems above.
23 |
24 | ## What if my computer is customized?
25 |
26 | You can use the "Custom" word on the "Vendor" and "Model" categories, we also recommend to add your `pciutils` log on [this document link](https://gitlab.redox-os.org/redox-os/drivers/-/blob/master/COMMUNITY-HW.md?ref_type=heads) to help us with probable porting.
27 |
28 | ## Status
29 |
30 | - Broken - The system can't boot.
31 | - Booting - The system boots with some issues.
32 | - Recommended - The system start with all features working.
33 |
34 | ## General
35 |
36 | This section cover things to consider.
37 |
38 | - ACPI support is incomplete (some things are hardcoded on the kernel)
39 | - Only USB input devices are supported
40 | - Wi-Fi is not supported
41 | - GPU drivers aren't supported (only VESA and UEFI GOP)
42 | - Automatic operating system discovery on boot loader is not implemented (remember this before installing Redox)
43 |
44 | ## Template
45 |
46 | You will use this template to insert your computer on the table.
47 |
48 | ```
49 | | | | | | | | | |
50 | ```
51 |
52 | ## Recommended
53 |
54 | | **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
55 | |------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
56 | | System76 | Galago Pro (galp5) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital |
57 | | System76 | Lemur Pro (lemp9) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital |
58 | | Lenovo | IdeaPad Y510P | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital |
59 |
60 | ## Booting
61 |
62 | | **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
63 | |------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
64 | | System76 | Oryx Pro (oryp10) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, though it should be working |
65 | | System76 | Pangolin (pang12) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
66 | | Dell | XPS 13 (9350) | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital, NVMe driver livelocks |
67 | | Dell | XPS 13 (9350) | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Boots to Orbital, NVMe driver livelocks |
68 | | HP | Dev One | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
69 | | ASUS | X554L | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS | Boots to Orbital, No audio, HDA driver cannot find output pins |
70 | | ASUS | ROG g55vw | 0.8.0 | 11-11-2023 | desktop | x86-64 | BIOS | Boots to Orbital, UEFI panic in SETUP |
71 | | ASUS | PRIME B350M-E (custom) | 0.9.0 | 20-09-2024 | desktop | x86-64 | UEFI | Partial support for the PS/2 keyboard, PS/2 mouse is broken |
72 | | ASUS | Eee PC 900 | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Boots to Orbital, No ethernet driver, Correct video mode not offered (firmware issue) |
73 | | Toshiba | Satellite L500 | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS | Boots to Orbital, No ethernet driver, Correct video mode not offered (firmware issue) |
74 | | Raspberry Pi | 3 Model B+ | 0.8.0 | Unknown | server | ARM64 | U-Boot | Boots to UART serial console (pl011) |
75 | | Lenovo | ThinkPad Yoga 260 Laptop - Type 20FE | 0.9.0 | 07-09-2024 | demo | x86-64 | UEFI | Boots to Orbital, No audio |
76 | | Lenovo | Yoga S730-13IWL | 0.9.0 | 09-11-2024 | desktop | x86-64 | UEFI | Boots to Orbital, No trackpad or USB mouse input support |
77 | | Samsung | Series 3 (NP350V5C) | 0.9.0 | 04-08-2025 | 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 |
78 | | Asus | Vivobook 15 OLED (M1503Q) | 0.9.0 | 04-08-2025 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb do not work, cannot connect to the internet, right maximum display resolution 2880x1620 |
79 | | HP | EliteBook Folio 9480M | 0.9.0 | 04-11-2025 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb work, cannot connect to the Internet, install failed, right maximum display resolution 1600x900
80 | ## Broken
81 |
82 | | **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
83 | |------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
84 | | HP | EliteBook 2570p | 0.8.0 | 23-11-2022 | demo | x86-64 | BIOS (CSM mode?) | Gets to resolution selection, Fails assert in `src/os/bios/mod.rs:77` after selecting resolution |
85 | | BEELINK | U59 | 0.8.0 | 30-05-2024 | server | x86-64 | Unknown | Aborts after panic in xhcid |
86 | | ASUS | PN41 | 0.8.0 | 30-05-2024 | server | x86-64 | Unknown | Aborts after panic in xhcid |
87 | | Lenovo | G570 | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS | Bootloader panics in `alloc_zeroed_page_aligned`, Correct video mode not offered (firmware issue) |
88 | | Lenovo | IdeaPad Y510P | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
89 | | Framework | Laptop 16 (AMD Ryzen 7040 Series) | 0.9.0 | 07-09-2024 | server, demo | x86-64 | UEFI | Black screen and unresponsive after the bootloader and resolution selection |
90 | | Toshiba | Satellite L500 | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Correct video mode not offered (firmware issue), Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
91 | | Panasonic | Toughbook CF-18 | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Hangs after PIT initialization |
92 | | XMG (Schenker) | Apex 17 (M21) | 0.9.0 | 30-09-2024 | 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 |
93 | | 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. |
94 |
95 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Redox OS Developers
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # This file contains the build system commands configuration
2 | # and environment variables
3 | include mk/config.mk
4 |
5 | # Build system dependencies
6 | include mk/depends.mk
7 |
8 | all: $(BUILD)/harddrive.img
9 |
10 | live:
11 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
12 | -$(FUMOUNT) /tmp/redox_installer/ || true
13 | rm -f $(BUILD)/livedisk.iso
14 | $(MAKE) $(BUILD)/livedisk.iso
15 |
16 | popsicle: $(BUILD)/livedisk.iso
17 | popsicle-gtk $(BUILD)/livedisk.iso
18 |
19 | image:
20 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
21 | -$(FUMOUNT) /tmp/redox_installer/ || true
22 | rm -f $(BUILD)/harddrive.img $(BUILD)/livedisk.iso
23 | $(MAKE) all
24 |
25 | rebuild:
26 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
27 | -$(FUMOUNT) /tmp/redox_installer/ || true
28 | rm -rf $(BUILD)/repo.tag $(BUILD)/harddrive.img $(BUILD)/livedisk.iso
29 | $(MAKE) all
30 |
31 | clean: $(CONTAINER_TAG)
32 | ifeq ($(PODMAN_BUILD),1)
33 | $(PODMAN_RUN) $(MAKE) $@
34 | else
35 | cd cookbook && ./clean.sh
36 | -rm -rf cookbook/repo
37 | cargo clean --manifest-path installer/Cargo.toml
38 | cargo clean --manifest-path redoxfs/Cargo.toml
39 | cargo clean --manifest-path relibc/Cargo.toml
40 | endif
41 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
42 | -$(FUMOUNT) /tmp/redox_installer/ || true
43 | rm -rf $(BUILD) $(PREFIX)
44 |
45 | distclean: $(CONTAINER_TAG)
46 | ifeq ($(PODMAN_BUILD),1)
47 | $(PODMAN_RUN) $(MAKE) $@
48 | else
49 | $(MAKE) clean
50 | cd cookbook && ./unfetch.sh
51 | endif
52 |
53 | pull:
54 | git pull
55 | git submodule sync --recursive
56 | git submodule update --recursive --init
57 |
58 | fetch: $(BUILD)/fetch.tag
59 |
60 | repo: $(BUILD)/repo.tag
61 |
62 | # Podman build recipes and vars
63 | include mk/podman.mk
64 |
65 | # Disk Imaging and Cookbook tools
66 | include mk/fstools.mk
67 |
68 | # Cross compiler recipes
69 | include mk/prefix.mk
70 |
71 | # Repository maintenance
72 | include mk/repo.mk
73 |
74 | # Disk images
75 | include mk/disk.mk
76 |
77 | # Emulation recipes
78 | include mk/qemu.mk
79 | include mk/virtualbox.mk
80 |
81 | # CI
82 | include mk/ci.mk
83 |
84 | env: prefix FORCE $(CONTAINER_TAG)
85 | ifeq ($(PODMAN_BUILD),1)
86 | $(PODMAN_RUN) $(MAKE) $@
87 | else
88 | export PATH="$(PREFIX_PATH):$$PATH" && \
89 | bash
90 | endif
91 |
92 | export RUST_GDB=gdb-multiarch # Necessary when debugging for another architecture than the host
93 | GDB_KERNEL_FILE=cookbook/recipes/core/kernel/target/$(TARGET)/build/kernel.sym
94 | gdb: FORCE
95 | rust-gdb $(GDB_KERNEL_FILE) --eval-command="target remote :1234"
96 |
97 | # This target allows debugging a userspace application without requiring gdbserver running inside
98 | # the VM. Because gdb doesn't know when the userspace application is scheduled by the kernel and as
99 | # it stops the entire VM rather than just the userspace application that the user wants to debug,
100 | # connecting to a gdbserver running inside the VM is highly encouraged when possible. This target
101 | # should only be used when the application to debug runs early during boot before the network stack
102 | # has started or you need to debug the interaction between the application and the kernel.
103 | # tl;dr: DO NOT USE THIS TARGET UNLESS YOU HAVE TO
104 | gdb-userspace: FORCE
105 | 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"
106 |
107 | # An empty target
108 | FORCE:
109 |
110 | # Wireshark
111 | wireshark: FORCE
112 | wireshark $(BUILD)/network.pcap
113 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | This repository is the **Build System** for Redox OS.
6 |
7 | Redox is under active development by a vibrant community, you can see the key links below:
8 |
9 | - [The **main website** for Redox OS](https://www.redox-os.org).
10 | - [The Redox Book](https://doc.redox-os.org/book/) and [Build Instructions](https://doc.redox-os.org/book/podman-build.html).
11 | - [Redox Chat and Support](https://matrix.to/#/#redox-join:matrix.org).
12 | - [Patreon](https://www.patreon.com/redox_os), [Donate](https://redox-os.org/donate/) and [Merch](https://redox-os.creator-spring.com/).
13 | - Scroll down for a list of key Redox components and their repositories.
14 |
15 | [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.
16 |
17 | 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.
18 |
19 | [](./LICENSE)
20 |
21 | ## More Links
22 |
23 | - [Book](https://doc.redox-os.org/book/)
24 | - [Contribute](CONTRIBUTING.md)
25 | - [Hardware Compatibility](https://doc.redox-os.org/book/hardware-support.html)
26 | - 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)
27 | - [Trying Out Redox](https://doc.redox-os.org/book/trying-out-redox.html)
28 | - [Building Redox](https://doc.redox-os.org/book/podman-build.html)
29 | - [Build System Documentation](https://doc.redox-os.org/book/build-system-reference.html)
30 | - [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html)
31 | - [Chat/Discussions/Help](https://doc.redox-os.org/book/chat.html)
32 |
33 | ## Ecosystem
34 |
35 | Some of the key repositories on the Redox GitLab:
36 |
37 | | Essential Repos | Maintainer
38 | |--------------------------------------------------------------------------------------|---------------------------
39 | | [Kernel](https://gitlab.redox-os.org/redox-os/kernel) | **@jackpot51**
40 | | [RedoxFS (default filesystem)](https://gitlab.redox-os.org/redox-os/redoxfs) | **@jackpot51**
41 | | [Drivers](https://gitlab.redox-os.org/redox-os/drivers) | **@jackpot51**
42 | | [Orbital (display server and window manager)](https://gitlab.redox-os.org/redox-os/orbital) | **@jackpot51**
43 | | [pkgutils (current package manager)](https://gitlab.redox-os.org/redox-os/pkgutils) | **@jackpot51**
44 | | [relibc (C POSIX library written in Rust)](https://gitlab.redox-os.org/redox-os/relibc) | **@jackpot51**
45 | | [netstack (network stack)](https://gitlab.redox-os.org/redox-os/netstack) | **@jackpot51**
46 | | [Ion (defauilt shell)](https://gitlab.redox-os.org/redox-os/ion) | **@jackpot51**
47 | | [Termion (terminal library)](https://gitlab.redox-os.org/redox-os/termion) | **@jackpot51**
48 | | This repo - the root of the Build System | **@jackpot51**
49 | | [cookbook (Build system for system components and programs)](https://gitlab.redox-os.org/redox-os/cookbook) | **@jackpot51** **@hatred_45**
50 | | [Redoxer (Tool for Redox development testing)](https://gitlab.redox-os.org/redox-os/redoxer) | **@jackpot51**
51 | | [The Redox Book](https://gitlab.redox-os.org/redox-os/book) | **@hatred_45**
52 |
53 | ## What it looks like
54 |
55 | See [Redox in Action](https://www.redox-os.org/screens/) for photos and videos.
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Alternative script for the build system Makefiles
4 |
5 | ###########################################################################
6 | # #
7 | # Build the system, with a specified processor type and filesystem config #
8 | # #
9 | ###########################################################################
10 |
11 | usage()
12 | {
13 | echo "build.sh: Invoke make for a particular architecture and configuration."
14 | echo "Usage:"
15 | echo "./build.sh [-X | -A | -6 | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..."
16 | echo " -X Equivalent to -a x86_64."
17 | echo " -A Equivalent to -a aarch64."
18 | echo " -6 Equivalent to -a i686."
19 | echo " -a ARCH: Processor Architecture. Normally one of x86_64, aarch64 or"
20 | echo " i686. ARCH is not checked, so you can add a new architecture."
21 | echo " Defaults to the directory containing the FILESYSTEM_CONFIG file,"
22 | echo " or x86_64 if no FILESYSTEM_CONFIG is specified."
23 | echo " -c CONFIG: The name of the config, e.g. desktop, server or demo."
24 | echo " Determines the name of the image, build/ARCH/CONFIG/harddrive.img"
25 | echo " e.g. build/x86_64/desktop/harddrive.img"
26 | echo " Determines the name of FILESYSTEM_CONFIG if none is specified."
27 | echo " Defaults to the basename of FILESYSTEM_CONFIG, or 'desktop'"
28 | echo " if FILESYSTEM_CONFIG is not specified."
29 | echo " -f FILESYSTEM_CONFIG:"
30 | echo " The config file to use. It can be in any location."
31 | echo " However, if the file is not in a directory named x86_64, aarch64"
32 | echo " or i686, you must specify the architecture."
33 | echo " If -f is not specified, FILESYSTEM_CONFIG is set to"
34 | echo " config/ARCH/CONFIG.toml"
35 | echo " If you specify both CONFIG and FILESYSTEM_CONFIG, it is not"
36 | echo " necessary that they match, but it is recommended."
37 | echo " Examples: ./build.sh -c demo live - make build/x86_64/demo/livedisk.iso"
38 | echo " ./build.sh -6 qemu - make build/i686/desktop/harddrive.img and"
39 | echo " and run it in qemu"
40 | echo " NOTE: If you do not change ARCH or CONFIG very often, edit mk/config.mk"
41 | echo " and set ARCH and FILESYSTEM_CONFIG. You only need to use this"
42 | echo " script when you want to override them."
43 | }
44 |
45 | if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
46 | usage
47 | exit
48 | fi
49 |
50 | defaultarch="x86_64"
51 | defaultname="desktop"
52 | ARCH=""
53 | CONFIG_NAME=""
54 | FILESYSTEM_CONFIG=""
55 |
56 | while getopts ":c:f:a:dhXA6" opt
57 | do
58 | case "$opt" in
59 | a) ARCH="$OPTARG";;
60 | c) CONFIG_NAME="$OPTARG";;
61 | f) FILESYSTEM_CONFIG="$OPTARG";;
62 | X) ARCH="x86_64";;
63 | A) ARCH="aarch64";;
64 | 6) ARCH="i686";;
65 | h) usage;;
66 | \?) echo "Unknown option -$OPTARG, try -h for help"; exit;;
67 | :) echo "-$OPTARG requires a value"; exit;;
68 | esac
69 | done
70 | shift $((OPTIND -1))
71 |
72 | if [ -z "$ARCH" ] && [ -n "$FILESYSTEM_CONFIG" ]; then
73 | dirname=`dirname "$FILESYSTEM_CONFIG"`
74 | ARCH=`basename $dirname`
75 | case "$ARCH" in
76 | x86_64) : ;;
77 | aarch64) : ;;
78 | i686) : ;;
79 | \?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64 or i686";;
80 | esac
81 | fi
82 |
83 | if [ -z "$config_name" ] && [ -n "$FILESYSTEM_CONFIG" ]; then
84 | CONFIG_NAME=`basename "$FILESYSTEM_CONFIG" .toml`
85 | fi
86 |
87 | if [ -z "$ARCH" ]; then
88 | ARCH="$defaultarch"
89 | fi
90 |
91 | if [ -z "$CONFIG_NAME" ]; then
92 | CONFIG_NAME="$defaultname"
93 | fi
94 |
95 | if [ -z "$FILESYSTEM_CONFIG" ]; then
96 | FILESYSTEM_CONFIG="config/$ARCH/$CONFIG_NAME.toml"
97 | fi
98 |
99 | export ARCH CONFIG_NAME FILESYSTEM_CONFIG
100 | make $@
101 |
--------------------------------------------------------------------------------
/config/aarch64/acid.toml:
--------------------------------------------------------------------------------
1 | # Configuration to run the "acid" tests
2 |
3 | include = ["../acid.toml"]
4 |
--------------------------------------------------------------------------------
/config/aarch64/ci.toml:
--------------------------------------------------------------------------------
1 | # The Redox build server configuration
2 |
3 | # General settings
4 | [general]
5 | # Do not prompt if settings are not defined
6 | prompt = false
7 |
8 | # Package settings
9 | [packages]
10 | base = {}
11 | base-initfs = {}
12 | bootloader = {}
13 | ca-certificates = {}
14 | contain = {}
15 | coreutils = {}
16 | dash = {}
17 | diffutils = {}
18 | drivers = {}
19 | extrautils = {}
20 | findutils = {}
21 | hicolor-icon-theme = {}
22 | installer = {}
23 | installer-gui = {}
24 | ion = {}
25 | kernel = {}
26 | #nano = {} # error compiling ncurses
27 | netdb = {}
28 | #netsurf = {} # error building openssl1
29 | netutils = {}
30 | orbdata = {}
31 | orbital = {}
32 | orbterm = {}
33 | orbutils = {}
34 | pkgutils = {}
35 | redoxfs = {}
36 | relibc = {}
37 | resist = {}
38 | smith = {}
39 | userutils = {}
40 | uutils = {}
41 | #vim = {} # error compiling ncurses
42 |
43 | #TODO: Add more packages
44 |
--------------------------------------------------------------------------------
/config/aarch64/demo.toml:
--------------------------------------------------------------------------------
1 | # Configuration for demonstration
2 |
3 | include = ["desktop.toml"]
4 |
--------------------------------------------------------------------------------
/config/aarch64/desktop-minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal desktop configuration
2 |
3 | include = ["../desktop-minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/aarch64/desktop.toml:
--------------------------------------------------------------------------------
1 | # Default build system configuration
2 |
3 | include = ["../minimal.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 512
9 |
10 | # Package settings
11 | [packages]
12 | cosmic-edit = {}
13 | cosmic-icons = {}
14 | cosmic-files = {}
15 | cosmic-term = {}
16 | orbdata = {}
17 | orbital = {}
18 | orbutils = {}
19 | pop-icon-theme = {}
20 | shared-mime-info = {}
21 |
22 | [[files]]
23 | path = "/usr/lib/init.d/20_orbital"
24 | data = """
25 | audiod
26 | export VT 3
27 | orbital orblogin launcher
28 | unset VT
29 | """
30 |
--------------------------------------------------------------------------------
/config/aarch64/jeremy.toml:
--------------------------------------------------------------------------------
1 | # Configuration for Jeremy Soller
2 |
3 | include = ["desktop.toml"]
4 |
--------------------------------------------------------------------------------
/config/aarch64/minimal-net.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/aarch64/minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal configuration
2 |
3 | include = ["../minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/aarch64/raspi3bp/minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal configuration
2 |
3 | include = ["../../minimal.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 256
9 | # EFI partition size in MiB
10 | efi_partition_size = 128
11 |
--------------------------------------------------------------------------------
/config/aarch64/resist.toml:
--------------------------------------------------------------------------------
1 | # Configuration to run the "resist" tests
2 |
3 | include = ["../resist.toml"]
4 |
--------------------------------------------------------------------------------
/config/aarch64/server.toml:
--------------------------------------------------------------------------------
1 | # Server configuration
2 |
3 | include = ["../server.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/acid.toml:
--------------------------------------------------------------------------------
1 | # Configuration to run the "acid" tests
2 |
3 | include = ["base.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 256
9 |
10 | # Package settings
11 | [packages]
12 | acid = {}
13 | coreutils = {}
14 | ion = {}
15 |
16 | [[files]]
17 | path = "/usr/lib/init.d/10_acid"
18 | data = """
19 | export RUST_BACKTRACE full
20 | acid
21 | acid create_test
22 | acid switch
23 | acid tls
24 | acid thread
25 | shutdown
26 | """
27 |
--------------------------------------------------------------------------------
/config/base.toml:
--------------------------------------------------------------------------------
1 | # Base configuration: This configuration is meant to be included by
2 | # other configurations rather than use directly. It is the greatest
3 | # common divisor of all other configurations and misses several
4 | # parts necessary to create a bootable system.
5 |
6 | # General settings
7 | [general]
8 | # Do not prompt if settings are not defined
9 | prompt = false
10 |
11 | [packages]
12 | base = {}
13 | base-initfs = {}
14 | bootloader = {}
15 | drivers = {}
16 | kernel = {}
17 | libgcc = {}
18 | libstdcxx = {}
19 | relibc = {}
20 | uutils = {}
21 |
22 | ## Configuration files
23 | [[files]]
24 | path = "/usr/lib/init.d/00_base"
25 | data = """
26 | # clear and recreate tmpdir with 0o1777 permission
27 | rm -r /tmp
28 | mkdir -m a=rwxt /tmp
29 |
30 | ipcd
31 | ptyd
32 | sudo --daemon
33 | """
34 |
35 | [[files]]
36 | path = "/usr/lib/init.d/00_drivers"
37 | data = """
38 | pcid-spawner /etc/pcid.d/
39 | """
40 |
41 | [[files]]
42 | path = "/etc/hostname"
43 | data = "redox"
44 |
45 | # https://www.freedesktop.org/software/systemd/man/latest/os-release.html
46 | [[files]]
47 | path = "/usr/lib/os-release"
48 | data = """
49 | PRETTY_NAME="Redox OS 0.9.0"
50 | NAME="Redox OS"
51 | VERSION_ID="0.9.0"
52 | VERSION="0.9.0"
53 | ID="redox-os"
54 |
55 | HOME_URL="https://redox-os.org/"
56 | DOCUMENTATION_URL="https://redox-os.org/docs/"
57 | SUPPORT_URL="https://redox-os.org/community/"
58 | """
59 | # FIXME maybe add VARIANT= and VARIANT_ID= keys depending on the chosen configuration?
60 |
61 | [[files]]
62 | path = "/etc/os-release"
63 | data = "../usr/lib/os-release"
64 | symlink = true
65 |
66 | [[files]]
67 | path = "/etc/pkg.d/50_redox"
68 | data = "https://static.redox-os.org/pkg"
69 |
70 | ## /usr and symlinks for usrmerge
71 | [[files]]
72 | path = "/usr"
73 | data = ""
74 | directory = true
75 | mode = 0o755
76 |
77 | [[files]]
78 | path = "/usr/bin"
79 | data = ""
80 | directory = true
81 | mode = 0o755
82 |
83 | [[files]]
84 | path = "/bin"
85 | data = "usr/bin"
86 | symlink = true
87 |
88 | [[files]]
89 | path = "/usr/include"
90 | data = ""
91 | directory = true
92 | mode = 0o755
93 |
94 | [[files]]
95 | path = "/include"
96 | data = "usr/include"
97 | symlink = true
98 |
99 | [[files]]
100 | path = "/usr/lib"
101 | data = ""
102 | directory = true
103 | mode = 0o755
104 |
105 | [[files]]
106 | path = "/lib"
107 | data = "usr/lib"
108 | symlink = true
109 |
110 | [[files]]
111 | path = "/usr/libexec"
112 | data = ""
113 | directory = true
114 | mode = 0o755
115 |
116 | [[files]]
117 | path = "/usr/share"
118 | data = ""
119 | directory = true
120 | mode = 0o755
121 |
122 | [[files]]
123 | path = "/share"
124 | data = "usr/share"
125 | symlink = true
126 |
127 | ## legacy orbital font directory
128 | [[files]]
129 | path = "/usr/share/fonts"
130 | data = "../../ui/fonts"
131 | symlink = true
132 |
133 | ## /var
134 | [[files]]
135 | path = "/var"
136 | data = ""
137 | directory = true
138 | mode = 0o755
139 |
140 | [[files]]
141 | path = "/var/cache"
142 | data = ""
143 | directory = true
144 | mode = 0o755
145 |
146 | [[files]]
147 | path = "/var/lib"
148 | data = ""
149 | directory = true
150 | mode = 0o755
151 |
152 | [[files]]
153 | path = "/var/lock"
154 | data = ""
155 | directory = true
156 | mode = 0o1777
157 |
158 | [[files]]
159 | path = "/var/log"
160 | data = ""
161 | directory = true
162 | mode = 0o755
163 |
164 | [[files]]
165 | path = "/var/tmp"
166 | data = ""
167 | directory = true
168 | mode = 0o1777
169 |
170 | ## Device file symlinks
171 | [[files]]
172 | path = "/dev/null"
173 | data = "/scheme/null"
174 | symlink = true
175 |
176 | [[files]]
177 | path = "/dev/random"
178 | data = "/scheme/rand"
179 | symlink = true
180 |
181 | [[files]]
182 | path = "/dev/urandom"
183 | data = "/scheme/rand"
184 | symlink = true
185 |
186 | [[files]]
187 | path = "/dev/zero"
188 | data = "/scheme/zero"
189 | symlink = true
190 |
191 | [[files]]
192 | path = "/dev/tty"
193 | data = "libc:tty"
194 | symlink = true
195 |
196 | [[files]]
197 | path = "/dev/stdin"
198 | data = "libc:stdin"
199 | symlink = true
200 |
201 | [[files]]
202 | path = "/dev/stdout"
203 | data = "libc:stdout"
204 | symlink = true
205 |
206 | [[files]]
207 | path = "/dev/stderr"
208 | data = "libc:stderr"
209 | symlink = true
210 |
211 | # User settings
212 | [users.root]
213 | password = "password"
214 | uid = 0
215 | gid = 0
216 | name = "root"
217 | home = "/root"
218 | shell = "/usr/bin/ion"
219 |
220 | [users.user]
221 | # Password is unset
222 | password = ""
223 | shell = "/usr/bin/ion"
224 |
225 | # Group settings
226 | [groups.sudo]
227 | gid = 1
228 | members = ["user"]
229 |
--------------------------------------------------------------------------------
/config/desktop-minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal desktop configuration
2 |
3 | include = ["minimal-net.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 256
9 |
10 | # Package settings
11 | [packages]
12 | orbdata = {}
13 | orbital = {}
14 | orbterm = {}
15 | orbutils-background = {}
16 | orbutils-launcher = {}
17 | orbutils-orblogin = {}
18 |
19 | [[files]]
20 | path = "/usr/lib/init.d/20_orbital"
21 | data = """
22 | export VT 3
23 | orbital orblogin launcher
24 | unset VT
25 | """
26 |
27 | # Override console config to not switch to VT 2
28 | [[files]]
29 | path = "/usr/lib/init.d/30_console"
30 | data = """
31 | getty 2
32 | getty /scheme/debug/no-preserve -J
33 | """
34 |
--------------------------------------------------------------------------------
/config/desktop.toml:
--------------------------------------------------------------------------------
1 | # Default build system configuration
2 |
3 | include = ["server.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 650
9 |
10 | # Package settings
11 | [packages]
12 | cosmic-edit = {}
13 | cosmic-icons = {}
14 | cosmic-files = {}
15 | cosmic-term = {}
16 | dejavu = {}
17 | hicolor-icon-theme = {}
18 | installer-gui = {}
19 | netsurf = {}
20 | orbdata = {}
21 | orbital = {}
22 | orbutils = {}
23 | pop-icon-theme = {}
24 | # rustpython = {} #TODO ensure RustPython builds with our toolchain
25 | shared-mime-info = {}
26 | patchelf = {}
27 |
28 | [[files]]
29 | path = "/usr/lib/init.d/20_orbital"
30 | data = """
31 | audiod
32 | export VT 3
33 | orbital orblogin launcher
34 | unset VT
35 | """
36 |
37 | # Override console config to not switch to VT 2
38 | [[files]]
39 | path = "/usr/lib/init.d/30_console"
40 | data = """
41 | getty 2
42 | getty /scheme/debug/no-preserve -J
43 | """
44 |
--------------------------------------------------------------------------------
/config/dev.toml:
--------------------------------------------------------------------------------
1 | # Configuration for development
2 |
3 | include = ["desktop.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 20000
9 | # Do not prompt if settings are not defined
10 | prompt = false
11 |
12 | # Package settings
13 | [packages]
14 | acid = {}
15 | autoconf = {}
16 | automake = {}
17 | cargo = {}
18 | crates-io-index = {}
19 | exampled = {}
20 | gcc13 = {}
21 | gdbserver = {}
22 | gnu-binutils = {}
23 | gnu-grep = {}
24 | gnu-make = {}
25 | libffi = {}
26 | libgmp = {}
27 | libiconv = {}
28 | libjpeg = {}
29 | libogg = {}
30 | liborbital = {}
31 | libpng = {}
32 | libsodium = {}
33 | libvorbis = {}
34 | libxml2 = {}
35 | llvm18 = {}
36 | lua54 = {}
37 | mesa = {}
38 | mesa-glu = {}
39 | nasm = {}
40 | ncurses = {}
41 | nghttp2 = {}
42 | openssl1 = {}
43 | orbclient = {}
44 | patch = {}
45 | pcre = {}
46 | pkg-config = {}
47 | resist = {}
48 | ripgrep = {}
49 | rust = {}
50 | sdl-gfx = {}
51 | sdl1 = {}
52 | sdl1-image = {}
53 | sdl1-mixer = {}
54 | sdl1-ttf = {}
55 | sdl2 = {}
56 | sdl2-gears = {}
57 | sdl2-image = {}
58 | sdl2-mixer = {}
59 | sdl2-ttf = {}
60 | sed = {}
61 | strace = {}
62 | terminfo = {}
63 | xz = {}
64 | zlib = {}
65 |
66 | [[files]]
67 | path = "/home/user/test.rs"
68 | data = """
69 | fn main() {
70 | println!("Hello, Redox!");
71 | }
72 | """
73 |
74 | [[files]]
75 | path = "/home/user/test.c"
76 | data = """
77 | #include
78 |
79 | int main(void) {
80 | printf("Hello, Redox!\n");
81 | }
82 | """
83 |
84 | [[files]]
85 | path = "/home/user/test.cpp"
86 | data = """
87 | #include
88 |
89 | int main()
90 | {
91 | std::cout << "Hello, Redox!" << std::endl;
92 | }
93 | """
94 |
95 | [[files]]
96 | path = "/home/user/test.py"
97 | data = """
98 | print("Hello, Redox!")
99 | """
100 |
101 | [[files]]
102 | path = "/home/user/test.lua"
103 | data = """
104 | print("Hello, Redox!")
105 | """
106 |
--------------------------------------------------------------------------------
/config/i686/acid.toml:
--------------------------------------------------------------------------------
1 | # Configuration to run the "acid" tests
2 |
3 | include = ["../acid.toml"]
4 |
--------------------------------------------------------------------------------
/config/i686/ci.toml:
--------------------------------------------------------------------------------
1 | # The Redox build server configuration
2 |
3 | # General settings
4 | [general]
5 | # Do not prompt if settings are not defined
6 | prompt = false
7 |
8 | # Package settings
9 | [packages]
10 | base = {}
11 | base-initfs = {}
12 | bootloader = {}
13 | ca-certificates = {}
14 | contain = {}
15 | coreutils = {}
16 | dash = {}
17 | diffutils = {}
18 | drivers = {}
19 | extrautils = {}
20 | findutils = {}
21 | hicolor-icon-theme = {}
22 | installer = {}
23 | installer-gui = {}
24 | ion = {}
25 | kernel = {}
26 | nano = {}
27 | netdb = {}
28 | netsurf = {}
29 | netutils = {}
30 | orbdata = {}
31 | orbital = {}
32 | orbterm = {}
33 | orbutils = {}
34 | pkgutils = {}
35 | redoxfs = {}
36 | relibc = {}
37 | resist = {}
38 | smith = {}
39 | userutils = {}
40 | uutils = {}
41 | #vim = {} # conflicting types
42 |
43 | #TODO: Add more packages
44 |
--------------------------------------------------------------------------------
/config/i686/demo.toml:
--------------------------------------------------------------------------------
1 | # Configuration for demonstration
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 768
9 |
10 | # Package settings
11 | [packages]
12 | # Games
13 | dosbox = {}
14 | freedoom = {}
15 | prboom = {}
16 | redox-games = {}
17 |
18 | # Demos
19 | pixelcannon = {}
20 |
21 | # MIDI
22 | freepats = {}
23 |
24 | [[files]]
25 | path = "/home/user/Welcome.txt"
26 | data = """
27 | ##############################################################################
28 | # #
29 | # Welcome to Redox! #
30 | # #
31 | # Redox is an operating system written in Rust, a language with focus #
32 | # on safety and high performance. Redox, following the microkernel design, #
33 | # aims to be secure, usable, and free. Redox is inspired by previous kernels #
34 | # and operating systems, such as SeL4, MINIX, Plan 9, and BSD. #
35 | # #
36 | # Redox _is not_ just a kernel, it's a full-featured Operating System, #
37 | # providing packages (memory allocator, file system, display manager, core #
38 | # utilities, etc.) that together make up a functional and convenient #
39 | # operating system. You can loosely think of it as the GNU or BSD ecosystem, #
40 | # but in a memory safe language and with modern technology. #
41 | # #
42 | # The website can be found at https://www.redox-os.org. #
43 | # #
44 | # For things to try on Redox, please see #
45 | # https://doc.redox-os.org/book/ch02-06-trying-out-redox.html #
46 | # #
47 | ##############################################################################
48 | """
49 |
--------------------------------------------------------------------------------
/config/i686/desktop-minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal desktop configuration
2 |
3 | include = ["../desktop-minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/i686/desktop.toml:
--------------------------------------------------------------------------------
1 | # Default build system configuration
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/i686/dev.toml:
--------------------------------------------------------------------------------
1 | # Configuration for development
2 |
3 | include = ["../dev.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/i686/jeremy.toml:
--------------------------------------------------------------------------------
1 | # Configuration for Jeremy Soller
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 4000
9 |
10 | # Package settings
11 | [packages]
12 | # apps
13 | cosmic-text = {}
14 | pixelcannon = {}
15 | sodium = {}
16 |
17 | # cli
18 | acid = {}
19 | cleye = {}
20 | ripgrep = {}
21 |
22 | # demos
23 | cpal = {}
24 | orbclient = {}
25 | rodioplay = {}
26 | winit = {}
27 |
28 | # games
29 | dosbox = {}
30 | eduke32 = {}
31 | freedoom = {}
32 | prboom = {}
33 | redox-games = {}
34 |
35 | # stuff
36 | freepats = {}
37 | generaluser-gs = {}
38 | jeremy = {}
39 | ttf-hack = {}
40 |
--------------------------------------------------------------------------------
/config/i686/minimal-net.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/i686/minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal configuration
2 |
3 | include = ["../minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/i686/resist.toml:
--------------------------------------------------------------------------------
1 | # Configuration to use the "resist" tests
2 |
3 | include = ["../resist.toml"]
4 |
--------------------------------------------------------------------------------
/config/i686/server.toml:
--------------------------------------------------------------------------------
1 | # Server configuration
2 |
3 | include = ["../server.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/llvm.toml:
--------------------------------------------------------------------------------
1 | # # Configuration to create "llvm-config" script
2 |
3 | include = ["base.toml"]
4 |
5 | [general]
6 | filesystem_size = 2048
7 |
8 | [packages]
9 | bash = {}
10 | llvm = {}
11 |
12 | [[files]]
13 | path = "/usr/lib/init.d/99_gen_llvm-config-generate"
14 | data = """
15 | bash /usr/bin/llvm-config-generate
16 | """
17 |
18 | [[files]]
19 | path = "/usr/bin/llvm-config-generate"
20 | data = """
21 | for flag in --version --bindir --cppflags --cxxflags --includedir --ldflags --libdir --system-libs --targets-built --has-rtti --shared-mode
22 | do
23 | echo -e "'$flag': '$(llvm-config $flag)',"
24 | done
25 | for component in $(llvm-config --components)
26 | do
27 | echo -e "'$component': '$(llvm-config --libs $component)',"
28 | done
29 | """
30 |
--------------------------------------------------------------------------------
/config/minimal-net.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["net.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 256
9 |
10 | # Package settings
11 | [packages]
12 | ca-certificates = {}
13 | coreutils = {}
14 | extrautils = {}
15 | findutils = {}
16 | ion = {}
17 | netdb = {}
18 | pkgutils = {}
19 | smith = {}
20 | userutils = {}
21 |
22 | [[files]]
23 | path = "/usr/lib/init.d/30_console"
24 | data = """
25 | inputd -A 2
26 | getty 2
27 | getty /scheme/debug -J
28 | """
29 |
30 |
--------------------------------------------------------------------------------
/config/minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal configuration
2 |
3 | include = ["base.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 196
9 |
10 | # Package settings
11 | [packages]
12 | coreutils = {}
13 | extrautils = {}
14 | ion = {}
15 | smith = {}
16 | userutils = {}
17 |
18 | [[files]]
19 | path = "/usr/lib/init.d/30_console"
20 | data = """
21 | inputd -A 2
22 | getty 2
23 | getty /scheme/debug/no-preserve -J
24 | """
25 |
--------------------------------------------------------------------------------
/config/net.toml:
--------------------------------------------------------------------------------
1 | # Network configuration: includes the base configuration and adds files required
2 | # for networking
3 |
4 | include = ["base.toml"]
5 |
6 | # Package settings
7 | [packages]
8 | netutils = {}
9 |
10 | ## Network init
11 | [[files]]
12 | path = "/usr/lib/init.d/10_net"
13 | data = """
14 | smolnetd
15 | dnsd
16 | dhcpd -b
17 | """
18 |
19 | ## Default net configuration (optimized for QEMU)
20 | [[files]]
21 | path = "/etc/net/dns"
22 | data = """
23 | 208.67.222.222
24 | """
25 |
26 | [[files]]
27 | path = "/etc/net/ip"
28 | data = """
29 | 10.0.2.15
30 | """
31 |
32 | [[files]]
33 | path = "/etc/net/ip_router"
34 | data = """
35 | 10.0.2.2
36 | """
37 |
38 | [[files]]
39 | path = "/etc/net/ip_subnet"
40 | data = """
41 | 255.255.255.0
42 | """
43 |
--------------------------------------------------------------------------------
/config/redoxer-gui.toml:
--------------------------------------------------------------------------------
1 | # Configuration for the Redoxer GUI image
2 |
3 | include = ["redoxer.toml"]
4 |
5 | # Package settings
6 | [packages]
7 | orbdata = {}
8 | orbital = {}
9 |
10 | # Override to run inside of orbital
11 | [[files]]
12 | path = "/usr/lib/init.d/30_redoxer"
13 | data = """
14 | echo
15 | echo ## running redoxer in orbital ##
16 | export VT 3
17 | orbital redoxerd
18 | unset VT
19 | """
20 |
--------------------------------------------------------------------------------
/config/redoxer.toml:
--------------------------------------------------------------------------------
1 | # Configuration for the Redoxer image
2 |
3 | include = ["net.toml"]
4 |
5 | # Package settings
6 | [packages]
7 | bash = {}
8 | ca-certificates = {}
9 | coreutils = {}
10 | extrautils = {}
11 | findutils = {}
12 | gcc13 = {}
13 | gnu-binutils = {}
14 | ion = {}
15 | netdb = {}
16 | pkgutils = {}
17 | redoxerd = {}
18 | relibc = {}
19 |
20 | # Override to not background dhcpd
21 | [[files]]
22 | path = "/usr/lib/init.d/10_net"
23 | data = """
24 | smolnetd
25 | dnsd
26 | dhcpd
27 | """
28 |
29 | [[files]]
30 | path = "/usr/lib/init.d/20_env"
31 | data = """
32 | echo
33 | echo ## preparing environment ##
34 | export GROUPS 0
35 | export HOME /root
36 | export HOST redox
37 | export SHELL /bin/sh
38 | export UID 0
39 | export USER root
40 | cd /root
41 | env
42 | """
43 |
44 | [[files]]
45 | path = "/usr/lib/init.d/30_redoxer"
46 | data = """
47 | echo
48 | echo ## running redoxer ##
49 | redoxerd
50 | """
51 |
--------------------------------------------------------------------------------
/config/resist.toml:
--------------------------------------------------------------------------------
1 | # Configuration to run the "resist" tests
2 |
3 | include = ["net.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 256
9 |
10 | # Package settings
11 | [packages]
12 | bash = {}
13 | coreutils = {}
14 | diffutils = {}
15 | extrautils = {}
16 | findutils = {}
17 | gcc13 = {}
18 | gnu-binutils = {}
19 | gnu-make = {}
20 | netdb = {}
21 | resist = {}
22 | userutils = {}
23 |
24 | # Override to not background dhcpd
25 | [[files]]
26 | path = "/usr/lib/init.d/10_net"
27 | data = """
28 | smolnetd
29 | dnsd
30 | dhcpd
31 | """
32 |
33 | [[files]]
34 | path = "/usr/lib/init.d/20_resist"
35 | data = """
36 | export RUST_BACKTRACE full
37 | resist /share/resist/redox/spec.toml
38 | resist /share/resist/posix/base.toml
39 | resist /share/resist/posix/shell.toml
40 | shutdown
41 | """
42 |
--------------------------------------------------------------------------------
/config/riscv64gc/ci.toml:
--------------------------------------------------------------------------------
1 | # The Redox build server configuration
2 |
3 | # General settings
4 | [general]
5 | # Do not prompt if settings are not defined
6 | prompt = false
7 |
8 | # Package settings
9 | [packages]
10 | base = {}
11 | base-initfs = {}
12 | bootloader = {}
13 | ca-certificates = {}
14 | #contain = {} # redox_syscall 0.4 not working on riscv64gc?
15 | coreutils = {}
16 | dash = {}
17 | diffutils = {}
18 | drivers = {}
19 | extrautils = {}
20 | findutils = {}
21 | hicolor-icon-theme = {}
22 | installer = {}
23 | #installer-gui = {} # redox_syscall 0.4 not working on riscv64gc?
24 | ion = {}
25 | kernel = {}
26 | #nano = {} # error compiling ncurses
27 | netdb = {}
28 | #netsurf = {} # error compiling nghttp2
29 | netutils = {}
30 | orbdata = {}
31 | orbital = {}
32 | orbterm = {}
33 | orbutils = {}
34 | pkgutils = {}
35 | redoxfs = {}
36 | relibc = {}
37 | #resist = {} # Uses redox_syscall 0.2 which does not compile on riscv64gc
38 | smith = {}
39 | userutils = {}
40 | uutils = {}
41 | #vim = {} # error compiling ncurses
42 |
43 | #TODO: Add more packages
44 |
--------------------------------------------------------------------------------
/config/riscv64gc/demo.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | filesystem_size = 256
11 |
12 | # Package settings
13 | [packages]
14 | orbdata = {}
15 | orbital = {}
16 | orbterm = {}
17 | orbutils-background = {}
18 | orbutils-launcher = {}
19 | orbutils-orblogin = {}
20 |
21 | [[files]]
22 | path = "/usr/lib/init.d/20_orbital"
23 | data = """
24 | export VT 3
25 | orbital orblogin launcher
26 | unset VT
27 | """
28 |
29 | # Override console config to not switch to VT 2
30 | [[files]]
31 | path = "/usr/lib/init.d/30_console"
32 | data = """
33 | getty 2
34 | getty /scheme/debug/no-preserve -J
35 | """
36 |
--------------------------------------------------------------------------------
/config/riscv64gc/desktop-minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | filesystem_size = 256
11 |
12 | # Package settings
13 | [packages]
14 | orbdata = {}
15 | orbital = {}
16 | orbterm = {}
17 | orbutils-background = {}
18 | orbutils-launcher = {}
19 | orbutils-orblogin = {}
20 |
21 | [[files]]
22 | path = "/usr/lib/init.d/20_orbital"
23 | data = """
24 | export VT 3
25 | orbital orblogin launcher
26 | unset VT
27 | """
28 |
29 | # Override console config to not switch to VT 2
30 | [[files]]
31 | path = "/usr/lib/init.d/30_console"
32 | data = """
33 | getty 2
34 | getty /scheme/debug/no-preserve -J
35 | """
36 |
--------------------------------------------------------------------------------
/config/riscv64gc/desktop.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | filesystem_size = 256
11 |
12 | # Package settings
13 | [packages]
14 | orbdata = {}
15 | orbital = {}
16 | orbterm = {}
17 | orbutils-background = {}
18 | orbutils-launcher = {}
19 | orbutils-orblogin = {}
20 |
21 | [[files]]
22 | path = "/usr/lib/init.d/20_orbital"
23 | data = """
24 | export VT 3
25 | orbital orblogin launcher
26 | unset VT
27 | """
28 |
29 | # Override console config to not switch to VT 2
30 | [[files]]
31 | path = "/usr/lib/init.d/30_console"
32 | data = """
33 | getty 2
34 | getty /scheme/debug/no-preserve -J
35 | """
36 |
--------------------------------------------------------------------------------
/config/riscv64gc/jeremy.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | filesystem_size = 256
11 |
12 | # Package settings
13 | [packages]
14 | orbdata = {}
15 | orbital = {}
16 | orbterm = {}
17 | orbutils-background = {}
18 | orbutils-launcher = {}
19 | orbutils-orblogin = {}
20 |
21 | [[files]]
22 | path = "/usr/lib/init.d/20_orbital"
23 | data = """
24 | export VT 3
25 | orbital orblogin launcher
26 | unset VT
27 | """
28 |
29 | # Override console config to not switch to VT 2
30 | [[files]]
31 | path = "/usr/lib/init.d/30_console"
32 | data = """
33 | getty 2
34 | getty /scheme/debug/no-preserve -J
35 | """
36 |
--------------------------------------------------------------------------------
/config/riscv64gc/minimal-net.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/riscv64gc/minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal configuration
2 |
3 | include = ["../minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
15 |
--------------------------------------------------------------------------------
/config/riscv64gc/server.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/server.toml:
--------------------------------------------------------------------------------
1 | # Server configuration
2 |
3 | include = ["net.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 512
9 |
10 | # Package settings
11 | [packages]
12 | bash = {}
13 | ca-certificates = {}
14 | contain = {}
15 | coreutils = {}
16 | curl = {}
17 | diffutils = {}
18 | extrautils = {}
19 | findutils = {}
20 | git = {}
21 | installer = {}
22 | ion = {}
23 | kibi = {}
24 | netdb = {}
25 | pkgutils = {}
26 | redoxfs = {}
27 | resist = {}
28 | userutils = {}
29 |
30 | [[files]]
31 | path = "/usr/lib/init.d/30_console"
32 | data = """
33 | inputd -A 2
34 | getty 2
35 | getty /scheme/debug/no-preserve -J
36 | """
37 |
--------------------------------------------------------------------------------
/config/x11.toml:
--------------------------------------------------------------------------------
1 | # X11 configuration
2 |
3 | include = ["desktop.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | filesystem_size = 2048
11 |
12 | # Package settings
13 | [packages]
14 | gtk3 = {}
15 | llvm18 = {}
16 | mesa-x11 = {}
17 | mesa-demos-x11 = {}
18 | twm = {}
19 | xev = {}
20 | xeyes = {}
21 | xinit = {}
22 | xkbcomp = {}
23 | xkbutils = {}
24 | xkeyboard-config = {}
25 | xserver-xorg = {}
26 | xserver-xorg-video-dummy = {}
27 | xterm = {}
28 |
29 | [[files]]
30 | path = "/usr/lib/init.d/20_xenv"
31 | data = """
32 | export DISPLAY :0
33 | """
34 |
35 | [[files]]
36 | path = "/usr/lib/init.d/40_x"
37 | data = """
38 | bash /usr/bin/orbital-x11
39 | """
40 |
41 | [[files]]
42 | path = "/usr/bin/orbital-x11"
43 | data = """
44 | #!/usr/bin/env bash
45 |
46 | set -ex
47 |
48 | X "${DISPLAY}" -verbose 6 &
49 | sleep 1
50 | twm &
51 | xterm &
52 | """
53 |
--------------------------------------------------------------------------------
/config/x86_64/acid.toml:
--------------------------------------------------------------------------------
1 | # Configuration to use the "acid" tests
2 |
3 | include = ["../acid.toml"]
4 |
--------------------------------------------------------------------------------
/config/x86_64/ci.toml:
--------------------------------------------------------------------------------
1 | # The Redox build server configuration
2 |
3 | # General settings
4 | [general]
5 | # Do not prompt if settings are not defined
6 | prompt = false
7 |
8 | # Package settings
9 | [packages]
10 | acid = {}
11 | #atk = {} # depends on glib which does not build
12 | autoconf = {}
13 | automake = {}
14 | base = {}
15 | base-initfs = {}
16 | bash = {}
17 | binutils = {}
18 | bootloader = {}
19 | ca-certificates = {}
20 | cairo = {}
21 | #cairodemo = {} # linking errors
22 | #calculator = {}
23 | #cargo = {} # linking errors
24 | cleye = {}
25 | #cmatrix = {} # needs ncursesw now
26 | contain = {}
27 | coreutils = {}
28 | cosmic-edit = {}
29 | cosmic-files = {}
30 | cosmic-icons = {}
31 | cosmic-term = {}
32 | cosmic-text = {}
33 | cpal = {}
34 | curl = {}
35 | dash = {}
36 | dejavu = {}
37 | diffutils = {}
38 | dosbox = {}
39 | drivers = {}
40 | drivers-initfs = {}
41 | duktape = {}
42 | eduke32 = {}
43 | #exampled = {} # needs to use libredox
44 | expat = {}
45 | extrautils = {}
46 | #fal
47 | #fd = {} # ctrlc-3.1.1
48 | ffmpeg6 = {}
49 | findutils = {}
50 | fontconfig = {}
51 | #freeciv = {}
52 | freedoom = {}
53 | #freeglut = {}
54 | freepats = {}
55 | freetype2 = {}
56 | #friar = {} # mio patch
57 | fribidi = {}
58 | #game-2048 = {} # rustc-serialize
59 | #gawk = {} # langinfo.h
60 | gcc13 = {}
61 | gdbserver = {}
62 | #gdk-pixbuf = {} # shared-mime-info
63 | gears = {}
64 | generaluser-gs = {}
65 | gettext = {}
66 | #gigalomania = {} # old recipe format
67 | git = {}
68 | #glib = {} # does not build
69 | glutin = {}
70 | gnu-binutils = {}
71 | gnu-grep = {}
72 | gnu-make = {}
73 | #gstreamer = {} # conflict with thread local errno
74 | #harfbuzz = {} # depends on glib which does not build
75 | #hematite = {} # needs crate patches for redox-unix
76 | hicolor-icon-theme = {}
77 | installer = {}
78 | installer-gui = {}
79 | intel-one-mono = {}
80 | ion = {}
81 | #jansson = {} # needs config.sub update
82 | kernel = {}
83 | kibi = {}
84 | lci = {}
85 | libc-bench = {}
86 | libffi = {}
87 | libgmp = {}
88 | libiconv = {}
89 | libjpeg = {}
90 | libogg = {}
91 | liborbital = {}
92 | libpng = {}
93 | #libsodium = {} # failing to fetch
94 | libvorbis = {}
95 | libxml2 = {}
96 | llvm18 = {}
97 | #lua54 = {} # did not build
98 | #mdp = {} # ncursesw
99 | mednafen = {}
100 | mesa = {}
101 | mesa-glu = {}
102 | mgba = {}
103 | #miniserve = {} # actix
104 | nano = {}
105 | nasm = {}
106 | #ncdu = {} # fails to link with ncurses
107 | ncurses = {}
108 | #ncursesw = {} # mkstemp configure hang
109 | netdb = {}
110 | netsurf = {}
111 | netutils = {}
112 | neverball = {}
113 | #newlib = {} # obsolete
114 | #newlibtest = {} # obsolete
115 | nghttp2 = {}
116 | #nushell = {} # needs cargo update
117 | openjazz = {}
118 | openssl1 = {}
119 | openttd = {}
120 | openttd-opengfx = {}
121 | openttd-openmsx = {}
122 | openttd-opensfx = {}
123 | orbclient = {}
124 | orbdata = {}
125 | orbital = {}
126 | orbterm = {}
127 | orbutils = {}
128 | #orbutils-background = {} # needs recipe update
129 | #orbutils-launcher = {} # needs recipe update
130 | #orbutils-orblogin = {} # needs recipe update
131 | osdemo = {}
132 | #pango = {} # undefined references to std::__throw_system_error(int)
133 | #pastel = {} # needs crate patches for redox-unix
134 | patch = {}
135 | patchelf = {}
136 | #pathfinder = {} # servo-fontconfig
137 | #pciids = {}
138 | pcre = {}
139 | perg = {}
140 | periodictable = {}
141 | #perl5 = {} # ctermid, tempnam, ttyname
142 | pixelcannon = {}
143 | #pixman = {} # depends on glib which does not build
144 | #pkgar = {} # uses virtual Cargo.toml, needs recipe update
145 | #pkg-config = {} # depends on glib which does not build
146 | pkgutils = {}
147 | pop-icon-theme = {}
148 | #powerline = {} # dirs
149 | prboom = {}
150 | procedural-wallpapers-rs = {}
151 | #python37 = {} # getaddrinfo
152 | #qemu = {}
153 | readline = {}
154 | redoxerd = {}
155 | redox-fatfs = {}
156 | redoxfs = {}
157 | redox-games = {}
158 | #redox-ssh = {} # does not compile
159 | relibc = {}
160 | #relibc-tests = {} # madvise link error
161 | resist = {}
162 | #retroarch = {} # OS_TLSIndex not declared
163 | ripgrep = {}
164 | rodioplay = {}
165 | rs-nes = {}
166 | #rust = {} # zlib linking issue
167 | rust64 = {}
168 | #rust-cairo = {} # linking errors
169 | #rust-cairo-demo = {} # linking errors
170 | #rustpython = {} # does not compile
171 | rustual-boy = {}
172 | #schismtracker = {} # uses system includes
173 | scummvm = {}
174 | sdl-gfx = {}
175 | #sdl-player = {} # wctype_t
176 | sdl1 = {}
177 | sdl1-image = {}
178 | sdl1-mixer = {}
179 | sdl1-ttf = {}
180 | sdl2 = {}
181 | sdl2-gears = {}
182 | sdl2-image = {}
183 | sdl2-mixer = {}
184 | sdl2-ttf = {}
185 | sed = {}
186 | #servo = {} # some more crates to port
187 | shared-mime-info = {}
188 | shellharden = {}
189 | shellstorm = {}
190 | smith = {}
191 | sodium = {}
192 | sopwith = {}
193 | #openssh = {}
194 | strace = {}
195 | #syobonaction = {} # linking errors
196 | terminfo = {}
197 | #termplay = {} # backtrace cannot find link.h
198 | timidity = {}
199 | tokei = {}
200 | ttf-hack = {}
201 | userutils = {}
202 | uutils = {}
203 | #vice = {} # linker errors
204 | vim = {}
205 | vttest = {}
206 | #vvvvvv = {} # did not compile
207 | #webrender = {} # unwind
208 | #wesnoth = {}
209 | #winit = {} # tzset
210 | xz = {}
211 | zlib = {}
212 |
--------------------------------------------------------------------------------
/config/x86_64/demo.toml:
--------------------------------------------------------------------------------
1 | # Configuration for demonstration
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 1536
9 |
10 | # Package settings
11 | [packages]
12 | # GUI Apps
13 | periodictable = {}
14 |
15 | # GUI Data
16 | intel-one-mono = {}
17 |
18 | # Shell Apps
19 | curl = {}
20 | git = {}
21 | gnu-grep = {}
22 | ripgrep = {}
23 | sodium = {}
24 | terminfo = {}
25 | vim = {}
26 |
27 | # Games
28 | dosbox = {}
29 | freedoom = {}
30 | neverball = {}
31 | prboom = {}
32 | redox-games = {}
33 | sopwith = {}
34 | # syobonaction = {} # linking errors
35 |
36 | # Demos
37 | acid = {}
38 | # nushell = {}
39 | orbclient = {}
40 | pixelcannon = {}
41 | rodioplay = {}
42 | gears = {}
43 |
44 | # MIDI
45 | freepats = {}
46 |
47 | [[files]]
48 | path = "/home/user/Welcome.txt"
49 | data = """
50 | ##############################################################################
51 | # #
52 | # Welcome to Redox! #
53 | # #
54 | # Redox is an operating system written in Rust, a language with focus #
55 | # on safety and high performance. Redox, following the microkernel design, #
56 | # aims to be secure, usable, and free. Redox is inspired by previous kernels #
57 | # and operating systems, such as SeL4, MINIX, Plan 9, and BSD. #
58 | # #
59 | # Redox _is not_ just a kernel, it's a full-featured Operating System, #
60 | # providing packages (memory allocator, file system, display manager, core #
61 | # utilities, etc.) that together make up a functional and convenient #
62 | # operating system. You can loosely think of it as the GNU or BSD ecosystem, #
63 | # but in a memory safe language and with modern technology. #
64 | # #
65 | # The website can be found at https://www.redox-os.org. #
66 | # #
67 | # For things to try on Redox, please see #
68 | # https://doc.redox-os.org/book/ch02-06-trying-out-redox.html #
69 | # #
70 | ##############################################################################
71 | """
72 |
--------------------------------------------------------------------------------
/config/x86_64/desktop-contain.toml:
--------------------------------------------------------------------------------
1 | # Desktop configuration using the Contain sandbox
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
15 |
16 | # Override orbital init to use contain_orblogin
17 | [[files]]
18 | path = "/usr/lib/init.d/20_orbital"
19 | data = """
20 | audiod
21 | export VT 3
22 | orbital contain_orblogin launcher
23 | unset VT
24 | """
25 |
26 | # Override console init to use contain
27 | [[files]]
28 | path = "/usr/lib/init.d/30_console"
29 | data = """
30 | getty --contain 2
31 | getty --contain /scheme/debug/no-preserve -J
32 | """
33 |
34 | [[files]]
35 | path = "/etc/contain.toml"
36 | data = """
37 | pass_schemes = ["rand", "null", "tcp", "udp", "thisproc", "pty", "orbital", "display.vesa"]
38 | sandbox_schemes = ["file"]
39 | files = ["file:/dev/null"]
40 | rofiles = ["file:/etc/passwd", "file:/etc/hostname", "file:/etc/localtime"]
41 | dirs = ["file:/tmp"]
42 | rodirs = ["file:/bin", "file:/ui"]
43 | """
44 |
--------------------------------------------------------------------------------
/config/x86_64/desktop-minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal desktop configuration
2 |
3 | include = ["../desktop-minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/desktop.toml:
--------------------------------------------------------------------------------
1 | # Default build system configuration
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/dev.toml:
--------------------------------------------------------------------------------
1 | # Configuration for development
2 |
3 | include = ["../dev.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/full.toml:
--------------------------------------------------------------------------------
1 | include = [ "../base.toml", "ci.toml" ]
2 |
3 | # General settings
4 | [general]
5 | filesystem_size = 8192
6 |
7 | # Package settings
8 | [packages]
9 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/jeremy.toml:
--------------------------------------------------------------------------------
1 | # Configuration for Jeremy Soller
2 |
3 | include = ["../desktop.toml"]
4 |
5 | # General settings
6 | [general]
7 | # Filesystem size in MiB
8 | filesystem_size = 8192
9 |
10 | # Package settings
11 | [packages]
12 | # apps
13 | #boxedwine = {} # not building
14 | cosmic-term = {}
15 | cosmic-text = {}
16 | periodictable = {}
17 | pixelcannon = {}
18 | schismtracker = {}
19 | sodium = {}
20 |
21 | # cli
22 | acid = {}
23 | cleye = {}
24 | ffmpeg6 = {}
25 | gnu-grep = {}
26 | lua54 = {}
27 | nano = {}
28 | nushell = {}
29 | perg = {}
30 | relibc-tests = {}
31 | ripgrep = {}
32 | sed = {}
33 | shellharden = {}
34 | xz = {}
35 |
36 | # demos
37 | cairodemo = {}
38 | #cmatrix = {} # addwstr
39 | cpal = {}
40 | gears = {}
41 | glutin = {}
42 | #hematite = {} # not building
43 | iced = {}
44 | libcosmic = {}
45 | orbclient = {}
46 | osdemo = {} # does not show anything
47 | #pathfinder = {} # not building
48 | procedural-wallpapers-rs = {}
49 | rodioplay = {}
50 | rust-cairo = {}
51 | rust-cairo-demo = {}
52 | sdl2-gears = {}
53 | vttest = {}
54 | webrender = {}
55 | winit = {}
56 |
57 | # dev
58 | autoconf = {}
59 | automake = {}
60 | cargo = {}
61 | gcc13 = {}
62 | gnu-binutils = {}
63 | gnu-make = {}
64 | nasm = {}
65 | patch = {}
66 | pkg-config = {}
67 | rust = {}
68 | rustpython = {}
69 |
70 | # games
71 | devilutionx = {}
72 | dosbox = {}
73 | eduke32 = {}
74 | flycast = {}
75 | freedoom = {}
76 | gigalomania = {}
77 | mednafen = {}
78 | mgba = {}
79 | neverball = {}
80 | openjazz = {}
81 | openjk = {}
82 | openttd = {}
83 | openttd-opengfx = {}
84 | openttd-openmsx = {}
85 | openttd-opensfx = {}
86 | prboom = {}
87 | redox-games = {}
88 | #retroarch = {} # need to package cores
89 | rs-nes = {} # need game for testing
90 | rust64 = {} # need roms
91 | rustual-boy = {} # need game for testing
92 | scummvm = {} # need game for testing
93 | sm64ex = {}
94 | sopwith = {}
95 | spacecadetpinball = {}
96 | syobonaction = {}
97 | #vice = {} # broken on new toolchain
98 | #vvvvvv = {} # cannot find -lgcc_s
99 |
100 | # stuff
101 | freepats = {}
102 | generaluser-gs = {}
103 | intel-one-mono = {}
104 | jeremy = {}
105 | libc-bench = {}
106 | noto-color-emoji = {}
107 | timidity = {}
108 | ttf-hack = {}
109 |
--------------------------------------------------------------------------------
/config/x86_64/llvm.toml:
--------------------------------------------------------------------------------
1 | # Configuration to create "llvm-config" script
2 |
3 | include = ["../llvm.toml"]
4 |
--------------------------------------------------------------------------------
/config/x86_64/minimal-net.toml:
--------------------------------------------------------------------------------
1 | # Minimal network configuration
2 |
3 | include = ["../minimal-net.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/minimal.toml:
--------------------------------------------------------------------------------
1 | # Minimal configuration
2 |
3 | include = ["../minimal.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/resist.toml:
--------------------------------------------------------------------------------
1 | # Configuration to run the "resist" tests
2 |
3 | include = ["../resist.toml"]
4 |
--------------------------------------------------------------------------------
/config/x86_64/server.toml:
--------------------------------------------------------------------------------
1 | # Server configuration
2 |
3 | include = ["../server.toml"]
4 |
5 | # Override the default settings here
6 |
7 | # General settings
8 | [general]
9 | # Filesystem size in MiB
10 | # filesystem_size = 1024
11 |
12 | # Package settings
13 | [packages]
14 | # example = {}
--------------------------------------------------------------------------------
/config/x86_64/x11.toml:
--------------------------------------------------------------------------------
1 | # X11 configuration
2 |
3 | include = ["../x11.toml"]
4 |
--------------------------------------------------------------------------------
/docker/.bash_aliases:
--------------------------------------------------------------------------------
1 | # Hijack this file to set this PS1, visually indicating to the user that we are running the docker container
2 |
3 | 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\]\$ "
4 |
--------------------------------------------------------------------------------
/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | # Configuration file to setup the Docker container of Redox
2 |
3 | FROM rustlang/rust:nightly
4 |
5 | ENV IMAGE_NAME=redox-os-docker
6 |
7 | RUN set -ex; \
8 | apt-get update; \
9 | apt-get install -q -y --no-install-recommends \
10 | apt-transport-https \
11 | bison \
12 | flex \
13 | fuse \
14 | gosu \
15 | libfuse-dev \
16 | nasm \
17 | qemu-utils \
18 | sudo \
19 | texinfo \
20 | autopoint \
21 | git \
22 | cmake \
23 | gperf \
24 | libhtml-parser-perl \
25 | ; \
26 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F; \
27 | echo "deb https://static.redox-os.org/toolchain/apt/ /" >> \
28 | /etc/apt/sources.list.d/redox.list; \
29 | apt-get update -o Dir::Etc::sourcelist="redox.list"; \
30 | apt-get install -q -y --no-install-recommends \
31 | x86-64-unknown-redox-newlib \
32 | x86-64-unknown-redox-binutils \
33 | x86-64-unknown-redox-gcc \
34 | ; \
35 | cargo install cargo-config; \
36 | cargo install just@1.16.0; \
37 | apt-get autoremove -q -y; \
38 | apt-get clean -q -y; \
39 | rm -rf /var/lib/apt/lists/*
40 |
41 | COPY entrypoint.sh /usr/local/bin/
42 | COPY .bash_aliases /etc/skel/
43 |
44 | ENTRYPOINT ["bash", "/usr/local/bin/entrypoint.sh"]
45 | CMD ["/bin/bash"]
46 |
--------------------------------------------------------------------------------
/docker/README.md:
--------------------------------------------------------------------------------
1 | ## Building Redox using a Docker image with the pre-built toolchain
2 |
3 | *All you need is `git`, `make`, `qemu`, `fuse` and `docker`. The method requires
4 | a non-privileged user able to run the `docker` command, which is usually achieved
5 | by adding the user to the `docker` group.*
6 |
7 | It's a three-steps process with variations depending on the platform.
8 | On the first execution of one of the following docker commands, the
9 | official container image will be pulled from dockerhub and stored
10 | locally.
11 |
12 | The image includes the required dependencies and the pre-built
13 | toolchain. As long as you rely on this particular dependencies and
14 | toolchain versions, you don't need to update the container.
15 |
16 | ### Get the sources
17 | ```
18 | git clone https://gitlab.redox-os.org/redox-os/redox.git ; cd redox
19 | ```
20 |
21 | ### Update the source tree
22 | Note: if you use the container on a different host or
23 | with a different user, [get the sources first](#get_the_sources).
24 | ```shell
25 | git pull --rebase --recurse-submodules && git submodule sync \
26 | && git submodule update --recursive --init
27 | ```
28 |
29 | ### Run the container to build Redox
30 | ```shell
31 | docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
32 | -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
33 | -v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
34 | -v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
35 | -v "$(pwd):$(pwd)" -w "$(pwd)" --rm redoxos/redox make fetch all
36 | ```
37 | #### Linux with security modules
38 | Add the following options depending on the security modules activated on your system:
39 | ```shell
40 | --security-opt label=disable // disable SELinux
41 | --security-opt seccomp=unconfined // disable seccomp
42 | --security-opt apparmor=unconfined // disable AppArmor
43 | ```
44 | Ex.: for a SELinux only system such as Fedora or CentOS
45 | ```shell
46 | docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
47 | -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
48 | --security-opt label=disable \
49 | -v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
50 | -v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
51 | -v "$(pwd):$(pwd)" -w "$(pwd)" --rm redoxos/redox make fetch all
52 | ```
53 | ### Run the container interactively
54 | ```shell
55 | docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
56 | -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
57 | -v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
58 | -v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
59 | -v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox
60 | ```
61 |
62 | #### Demo
63 | 
64 |
65 | ### Clear the named volumes containing the toolchain caches
66 | ```shell
67 | docker volume rm redox-"$(id -u)-$(id -g)"-cargo \
68 | redox-"$(id -u)-$(id -g)"-rustup
69 | ```
70 |
71 | ### Build the container manually
72 | If you cannot access dockerhub for whatever reason, you can also build
73 | the container image manually.
74 | ```shell
75 | docker build -t redoxos/redox docker/
76 | ```
77 |
78 | ### Troubleshooting / updating
79 | 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.
80 |
81 | ```shell
82 | docker pull redoxos/redox
83 | docker volume rm redox-"$(id -u)-$(id -g)"-cargo \
84 | redox-"$(id -u)-$(id -g)"-rustup
85 | ```
86 |
--------------------------------------------------------------------------------
/docker/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/redox-os/redox/a35e6e0ca3dcf251cee9e6ed4a8344e7422fa090/docker/demo.gif
--------------------------------------------------------------------------------
/docker/docker.sh:
--------------------------------------------------------------------------------
1 | # This script run the Docker image of Redox
2 |
3 | docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
4 | -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
5 | -v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
6 | -v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
7 | -v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox "$@"
8 |
--------------------------------------------------------------------------------
/docker/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Add local user
4 | # Either use LOCAL_UID and LOCAL_GID if passed in at runtime via
5 | # -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" or fallback
6 | USER_NAME=redox
7 | RUN_UID=${LOCAL_UID:-9001}
8 | RUN_GID=${LOCAL_GID:-9001}
9 |
10 | groupadd --non-unique --gid $RUN_GID $USER_NAME
11 | useradd --non-unique --create-home --uid $RUN_UID --gid $USER_NAME --groups sudo $USER_NAME
12 |
13 | echo "$USER_NAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user-no-sudo-password
14 |
15 | export HOME=/home/$USER_NAME
16 |
17 | # Check current UID and GID of files in the named volume caches for
18 | # cargo and rustup. Test only one of the top level folders to speed
19 | # things up.
20 | TESTFILE=$RUSTUP_HOME/settings.toml
21 | CACHED_UID=$(stat -c "%u" $TESTFILE)
22 | CACHED_GID=$(stat -c "%g" $TESTFILE)
23 |
24 | if [ $CACHED_UID != $RUN_UID ] || [ $RUN_GID != $CACHED_GID ]; then
25 | echo -e "\033[01;38;5;155mChanging user id:group to ${RUN_UID}:${RUN_GID}. Please wait...\033[0m"
26 | chown $RUN_UID:$RUN_GID -R $CARGO_HOME $RUSTUP_HOME
27 | fi
28 |
29 | # fixes issue in docker for mac where fuse permissions are restricted to root:root
30 | # https://github.com/theferrit32/data-commons-workspace/issues/5
31 | # https://github.com/heliumdatacommons/data-commons-workspace/commit/f96624c8a55f5ded5ac60f4f54182a59be92e66d
32 | if [ -f /dev/fuse ]; then chmod 666 /dev/fuse; fi
33 |
34 | exec gosu $USER_NAME "$@"
35 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "flake-parts": {
4 | "inputs": {
5 | "nixpkgs-lib": "nixpkgs-lib"
6 | },
7 | "locked": {
8 | "lastModified": 1743550720,
9 | "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
10 | "owner": "hercules-ci",
11 | "repo": "flake-parts",
12 | "rev": "c621e8422220273271f52058f618c94e405bb0f5",
13 | "type": "github"
14 | },
15 | "original": {
16 | "owner": "hercules-ci",
17 | "repo": "flake-parts",
18 | "type": "github"
19 | }
20 | },
21 | "nixpkgs": {
22 | "locked": {
23 | "lastModified": 1739863612,
24 | "narHash": "sha256-UbtgxplOhFcyjBcNbTVO8+HUHAl/WXFDOb6LvqShiZo=",
25 | "owner": "NixOS",
26 | "repo": "nixpkgs",
27 | "rev": "632f04521e847173c54fa72973ec6c39a371211c",
28 | "type": "github"
29 | },
30 | "original": {
31 | "owner": "NixOS",
32 | "ref": "nixpkgs-unstable",
33 | "repo": "nixpkgs",
34 | "type": "github"
35 | }
36 | },
37 | "nixpkgs-lib": {
38 | "locked": {
39 | "lastModified": 1743296961,
40 | "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
41 | "owner": "nix-community",
42 | "repo": "nixpkgs.lib",
43 | "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
44 | "type": "github"
45 | },
46 | "original": {
47 | "owner": "nix-community",
48 | "repo": "nixpkgs.lib",
49 | "type": "github"
50 | }
51 | },
52 | "root": {
53 | "inputs": {
54 | "flake-parts": "flake-parts",
55 | "nixpkgs": "nixpkgs",
56 | "rust-overlay": "rust-overlay"
57 | }
58 | },
59 | "rust-overlay": {
60 | "inputs": {
61 | "nixpkgs": [
62 | "nixpkgs"
63 | ]
64 | },
65 | "locked": {
66 | "lastModified": 1739932111,
67 | "narHash": "sha256-WkayjH0vuGw0hx2gmjTUGFRvMKpM17gKcpL/U8EUUw0=",
68 | "owner": "oxalica",
69 | "repo": "rust-overlay",
70 | "rev": "75b2271c5c087d830684cd5462d4410219acc367",
71 | "type": "github"
72 | },
73 | "original": {
74 | "owner": "oxalica",
75 | "repo": "rust-overlay",
76 | "type": "github"
77 | }
78 | }
79 | },
80 | "root": "root",
81 | "version": 7
82 | }
83 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "The Nix-flake for Redox development on NixOS";
3 |
4 | inputs = {
5 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6 | flake-parts.url = "github:hercules-ci/flake-parts";
7 | rust-overlay = {
8 | url = "github:oxalica/rust-overlay";
9 | inputs = {
10 | nixpkgs.follows = "nixpkgs";
11 | };
12 | };
13 | };
14 |
15 | outputs =
16 | inputs@{
17 | nixpkgs,
18 | flake-parts,
19 | rust-overlay,
20 | ...
21 | }:
22 | flake-parts.lib.mkFlake { inherit inputs; } (
23 | top@{
24 | config,
25 | withSystem,
26 | moduleWithSystem,
27 | ...
28 | }:
29 | {
30 | systems = [
31 | "i686-linux"
32 | "x86_64-linux"
33 | "aarch64-linux"
34 | "x86_64-darwin"
35 | "aarch64-darwin"
36 | ];
37 | perSystem =
38 | {
39 | system,
40 | lib,
41 | inputs',
42 | ...
43 | }:
44 | let
45 | pkgs = import nixpkgs {
46 | inherit system;
47 |
48 | overlays = [ rust-overlay.overlays.default ];
49 | };
50 | rust-bin = pkgs.rust-bin.nightly."2025-01-12".default.override {
51 | extensions = [
52 | "rust-analyzer"
53 | "rust-src"
54 | ];
55 | targets = [ "x86_64-unknown-redox" ];
56 | };
57 | in
58 | {
59 | formatter = pkgs.nixfmt-rfc-style;
60 |
61 | # TODO: Create Redox OS Image as package
62 | # TODO: No cross-compile for now, as there is no pkgsCross.aarch64-unknown-redox and so on
63 | # TODO: Get rid of make env step: package custom libtool and setup rust toolchain properly
64 | devShells = {
65 | # Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
66 | # Provides a script that copies required files to ~/
67 | default =
68 | let
69 | rustPlatform = pkgs.makeRustPlatform {
70 | cargo = rust-bin;
71 | rustc = rust-bin;
72 | };
73 |
74 | cargo-config = rustPlatform.buildRustPackage {
75 | pname = "cargo-config";
76 | version = "0.1.1";
77 | src = pkgs.fetchFromGitHub {
78 | owner = "wesleywiser";
79 | repo = "cargo-config";
80 | rev = "cf576faf65913615ed424914daa960800ed3ebc4";
81 | sha256 = "sha256-HrITNTfjBppOH1MhfZHfzHc6N8ymcm7vaiBI94ctUOA=";
82 | fetchSubmodules = true;
83 | };
84 | # useFetchCargoVendor = true; # this is recommended, but fails in some python code?
85 | cargoHash = "sha256-yQpIKclZ8KLE5JGkB/tjKZA8ezaD9SbUthDsuBXYZjQ=";
86 | };
87 | podmanSetupScript =
88 | let
89 | registriesConf = pkgs.writeText "registries.conf" ''
90 | [registries.search]
91 | registries = ['docker.io']
92 | [registries.block]
93 | registries = []
94 | '';
95 | in
96 | pkgs.writeScript "podman-setup" ''
97 | #!${pkgs.runtimeShell}
98 | # Dont overwrite customised configuration
99 | if ! test -f ~/.config/containers/policy.json; then
100 | install -Dm555 ${pkgs.skopeo.src}/default-policy.json ~/.config/containers/policy.json
101 | fi
102 | if ! test -f ~/.config/containers/registries.conf; then
103 | install -Dm555 ${registriesConf} ~/.config/containers/registries.conf
104 | fi
105 | systemctl --user start podman.socket || true
106 | export PODMAN_SYSTEMD_UNIT=podman.socket
107 | '';
108 | # Provides a fake "docker" binary mapping to podman
109 | dockerCompat = pkgs.runCommandNoCC "docker-podman-compat" { } ''
110 | mkdir -p $out/bin
111 | ln -s ${pkgs.podman}/bin/podman $out/bin/docker
112 | '';
113 |
114 | in
115 | pkgs.mkShell rec {
116 | buildInputs = with pkgs; [
117 | # Compilation
118 | rust-bin
119 |
120 | # Utils
121 | cowsay
122 | lolcat
123 |
124 | # Podman
125 | dockerCompat
126 | podman # Docker compat
127 | runc # Container runtime
128 | conmon # Container runtime monitor
129 | skopeo # Interact with container registry
130 | slirp4netns # User-mode networking for unprivileged namespaces
131 | fuse-overlayfs # CoW for images, much faster than default vfs
132 |
133 | # Cargo utilities
134 | cargo-config
135 |
136 | # Build Redox
137 | ant
138 | autoconf
139 | automake
140 | bison
141 | cmake
142 | curl
143 | doxygen
144 | expat
145 | expect
146 | file
147 | flex
148 | fuse
149 | gmp
150 | gnumake
151 | gnupatch
152 | gperf
153 | just
154 | libjpeg
155 | libpng
156 | libtool
157 | llvmPackages.clang
158 | llvmPackages.llvm
159 | lua
160 | m4
161 | meson
162 | nasm
163 | perl
164 | perl540Packages.HTMLParser
165 | perl540Packages.Po4a
166 | pkgconf
167 | podman
168 | protobuf
169 | (python3.withPackages (ps: with ps; [ mako ]))
170 | qemu_kvm
171 | rust-cbindgen
172 | scons
173 | SDL
174 | syslinux
175 | texinfo
176 | unzip
177 | waf
178 | wget
179 | xdg-utils
180 | zip
181 | ];
182 |
183 | LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
184 | NIX_SHELL_BUILD = "1";
185 | shellHook = ''
186 | # Install required configuration
187 | ${podmanSetupScript}
188 | echo "Redox environment loaded" | cowsay | lolcat
189 | '';
190 | };
191 |
192 | native = pkgs.mkShell rec {
193 | nativeBuildInputs =
194 | let
195 | autoreconf269 = pkgs.writeShellScriptBin "autoreconf2.69" "${pkgs.autoconf269}/bin/autoreconf";
196 | in
197 | with pkgs;
198 | [
199 | ant
200 | autoconf
201 | autoreconf269 # gnu-binutils
202 | automake
203 | bison
204 | cmake
205 | curl
206 | doxygen
207 | file
208 | flex
209 | gettext
210 | gnumake
211 | gnupatch
212 | gperf
213 | help2man
214 | just
215 | llvmPackages.clang
216 | llvmPackages.llvm
217 | lua
218 | m4
219 | meson
220 | nasm
221 | ninja
222 | perl
223 | perl540Packages.HTMLParser
224 | perl540Packages.Po4a
225 | pkg-config
226 | pkgconf
227 | (python3.withPackages (ps: with ps; [ mako ]))
228 | qemu_kvm
229 | rust-cbindgen
230 | scons
231 | syslinux
232 | texinfo
233 | unzip
234 | waf
235 | wget
236 | xdg-utils
237 | xxd
238 | zip
239 | ];
240 |
241 | buildInputs = with pkgs; [
242 | rust-bin
243 | fuse # fuser
244 | libpng # netsurf
245 | fontconfig # orbutils
246 | SDL # prboom
247 | xorg.utilmacros # libX11
248 | xorg.xtrans # libX11
249 | ];
250 |
251 | LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
252 | PERL_PATH = "${pkgs.perl}/bin/perl";
253 | NIX_SHELL_BUILD = "1";
254 | PODMAN_BUILD = "0";
255 | shellHook = with pkgs; ''
256 | export PKG_CONFIG_PATH="${fuse.dev}/lib/pkgconfig\
257 | :${libpng.dev}/lib/pkgconfig
258 | '';
259 | };
260 | };
261 | };
262 | }
263 | );
264 | }
265 |
--------------------------------------------------------------------------------
/mk/ci.mk:
--------------------------------------------------------------------------------
1 | # Configuration file of the build system commands for the build server
2 |
3 | IMG_TAG?=$(shell git describe --tags)
4 | IMG_SEPARATOR?=_
5 | IMG_DIR?=build/img/$(ARCH)
6 |
7 | # CI image target - build standard images
8 | # To leave out the build tag, set both IMG_TAG and IMG_SEPARATOR to null
9 | ci-img: FORCE
10 | rm -rf $(IMG_DIR)
11 | mkdir -p $(IMG_DIR)
12 | $(MAKE) minimal minimal-net server desktop demo
13 | cd $(IMG_DIR) && zstd --rm *
14 | cd $(IMG_DIR) && sha256sum -b * > SHA256SUM
15 |
16 | # The name of the target must match the name of the filesystem config file
17 | minimal minimal-net server desktop demo: FORCE
18 | rm -f "build/$(ARCH)/$@/harddrive.img" "build/$(ARCH)/$@/livedisk.iso"
19 | $(MAKE) CONFIG_NAME=$@ build/$(ARCH)/$@/harddrive.img build/$(ARCH)/$@/livedisk.iso
20 | mkdir -p $(IMG_DIR)
21 | cp "build/$(ARCH)/$@/harddrive.img" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_harddrive.img"
22 | cp "build/$(ARCH)/$@/livedisk.iso" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_livedisk.iso"
23 |
24 | # CI packaging target
25 | ci-pkg: prefix $(FSTOOLS_TAG) $(CONTAINER_TAG) FORCE
26 | ifeq ($(PODMAN_BUILD),1)
27 | $(PODMAN_RUN) $(MAKE) $@
28 | else
29 | $(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
30 | $(HOST_CARGO) build --manifest-path cookbook/pkgar/Cargo.toml --release
31 | $(HOST_CARGO) build --manifest-path installer/Cargo.toml --release
32 | export PATH="$(PREFIX_PATH):$$PATH" && \
33 | export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
34 | PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) -c config/$(ARCH)/ci.toml)" && \
35 | cd cookbook && \
36 | ./fetch.sh "$${PACKAGES}" && \
37 | ./repo.sh $(REPO_NONSTOP) "$${PACKAGES}"
38 | endif
39 |
40 | # CI toolchain
41 | ci-toolchain: $(CONTAINER_TAG) FORCE
42 | ifeq ($(PODMAN_BUILD),1)
43 | $(PODMAN_RUN) $(MAKE) $@
44 | else
45 | $(MAKE) PREFIX_BINARY=0 \
46 | "prefix/$(TARGET)/gcc-install.tar.gz" \
47 | "prefix/$(TARGET)/relibc-install.tar.gz" \
48 | "prefix/$(TARGET)/rust-install.tar.gz"
49 | rm -rf "build/toolchain/$(TARGET)"
50 | mkdir -p "build/toolchain/$(TARGET)"
51 | cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(TARGET)/gcc-install.tar.gz"
52 | cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(TARGET)/relibc-install.tar.gz"
53 | cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(TARGET)/rust-install.tar.gz"
54 | cd "build/toolchain/$(TARGET)" && sha256sum -b * > SHA256SUM
55 | endif
56 |
--------------------------------------------------------------------------------
/mk/config.mk:
--------------------------------------------------------------------------------
1 | # Configuration file of the build system environment variables
2 |
3 | -include .config
4 |
5 | HOST_ARCH?=$(shell uname -m)
6 |
7 | # Configuration
8 | ## Architecture to build Redox for (aarch64, i686, or x86_64). Defaults to a host one
9 | ARCH?=$(HOST_ARCH)
10 | ## Sub-device type for aarch64 if needed
11 | BOARD?=
12 | ## Enable to use binary prefix (much faster)
13 | PREFIX_BINARY?=1
14 | ## Enable to use binary packages (much faster)
15 | REPO_BINARY?=0
16 | ## Name of the configuration to include in the image name e.g. desktop or server
17 | CONFIG_NAME?=desktop
18 | ## Ignore errors when building the repo, attempt to build every package
19 | ## REPO_NONSTOP?=--nonstop
20 | REPO_NONSTOP?=
21 | ## Select filesystem config
22 | ifeq ($(BOARD),)
23 | FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml
24 | else
25 | FILESYSTEM_CONFIG?=config/$(ARCH)/$(BOARD)/$(CONFIG_NAME).toml
26 | endif
27 | HOST_CARGO=env -u RUSTUP_TOOLCHAIN -u CC -u TARGET cargo
28 | ## Filesystem size in MB (default comes from filesystem_size in the FILESYSTEM_CONFIG)
29 | ## FILESYSTEM_SIZE?=$(shell $(HOST_CARGO) run --release --manifest-path installer/Cargo.toml -- --filesystem-size -c $(FILESYSTEM_CONFIG))
30 | ## Flags to pass to redoxfs-mkfs. Add --encrypt to set up disk encryption
31 | REDOXFS_MKFS_FLAGS?=
32 | ## Set to 1 to enable Podman build, any other value will disable it
33 | PODMAN_BUILD?=1
34 | ## The containerfile to use for the Podman base image
35 | CONTAINERFILE?=podman/redox-base-containerfile
36 |
37 | # Per host variables
38 | export NPROC=nproc
39 | export REDOX_MAKE=make
40 | HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")
41 | ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
42 | # The binary prefix is only built for x86_64 Linux hosts
43 | PREFIX_BINARY=0
44 | endif
45 | UNAME := $(shell uname)
46 | ifeq ($(UNAME),Darwin)
47 | FUMOUNT=umount
48 | export NPROC=sysctl -n hw.ncpu
49 | VB_AUDIO=coreaudio
50 | VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
51 | else ifeq ($(UNAME),FreeBSD)
52 | FUMOUNT=sudo umount
53 | export REDOX_MAKE=gmake
54 | VB_AUDIO=pulse # To check, will probably be OSS on most setups
55 | VBM=VBoxManage
56 | else
57 | # Detect which version of the fusermount binary is available.
58 | ifneq (, $(shell which fusermount3))
59 | FUMOUNT=fusermount3 -u
60 | else
61 | FUMOUNT=fusermount -u
62 | endif
63 |
64 | VB_AUDIO=pulse
65 | VBM=VBoxManage
66 | endif
67 |
68 | ifneq ($(UNAME),Linux)
69 | PREFIX_BINARY=0
70 | endif
71 | ifneq ($(HOST_ARCH),x86_64)
72 | PREFIX_BINARY=0
73 | endif
74 |
75 | # Automatic variables
76 | ROOT=$(CURDIR)
77 | export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
78 |
79 | ## Userspace variables
80 | export TARGET=$(ARCH)-unknown-redox
81 | ifeq ($(ARCH),riscv64gc)
82 | export GNU_TARGET=riscv64-unknown-redox
83 | else
84 | export GNU_TARGET=$(TARGET)
85 | endif
86 | BUILD=build/$(ARCH)/$(CONFIG_NAME)
87 | HOST_FSTOOLS=build/fstools
88 | INSTALLER=$(HOST_FSTOOLS)/bin/redox_installer
89 | INSTALLER_OPTS=
90 | LIST_PACKAGES=installer/target/release/list_packages
91 | LIST_PACKAGES_OPTS=
92 | REDOXFS=$(HOST_FSTOOLS)/bin/redoxfs
93 | REDOXFS_MKFS=$(HOST_FSTOOLS)/bin/redoxfs-mkfs
94 | ifeq ($(REPO_BINARY),0)
95 | INSTALLER_OPTS+=--cookbook=cookbook
96 | else
97 | INSTALLER_OPTS+=--cookbook=cookbook --repo-binary
98 | LIST_PACKAGES_OPTS+=--repo-binary
99 | endif
100 |
101 | REPO_TAG=$(BUILD)/repo.tag
102 | FSTOOLS_TAG=build/fstools.tag
103 | export BOARD
104 |
105 | ## Cross compiler variables
106 | AR=$(GNU_TARGET)-gcc-ar
107 | AS=$(GNU_TARGET)-as
108 | CC=$(GNU_TARGET)-gcc
109 | CXX=$(GNU_TARGET)-g++
110 | LD=$(GNU_TARGET)-ld
111 | NM=$(GNU_TARGET)-gcc-nm
112 | OBJCOPY=$(GNU_TARGET)-objcopy
113 | OBJDUMP=$(GNU_TARGET)-objdump
114 | RANLIB=$(GNU_TARGET)-gcc-ranlib
115 | READELF=$(GNU_TARGET)-readelf
116 | STRIP=$(GNU_TARGET)-strip
117 |
118 | ## Rust cross compile variables
119 | export AR_$(subst -,_,$(TARGET)):=$(AR)
120 | export CC_$(subst -,_,$(TARGET)):=$(CC)
121 | export CXX_$(subst -,_,$(TARGET)):=$(CXX)
122 |
123 | ## If Podman is being used, a container is required
124 | ifeq ($(PODMAN_BUILD),1)
125 | CONTAINER_TAG=build/container.tag
126 | else
127 | CONTAINER_TAG=
128 | endif
129 |
--------------------------------------------------------------------------------
/mk/depends.mk:
--------------------------------------------------------------------------------
1 | # Configuration file for the build system dependencies
2 |
3 | # Don't check for Rust/Cargo if you will be using Podman
4 | ifneq ($(PODMAN_BUILD),1)
5 |
6 | # don’t check for Rust and Cargo if building on a Nix system
7 | ifneq ($(NIX_SHELL_BUILD),1)
8 |
9 | ifeq ($(shell which rustup),)
10 | $(error rustup not found, install from "https://rustup.rs/")
11 | endif
12 |
13 | endif
14 |
15 | ifeq ($(shell which cbindgen),)
16 | $(error cbindgen not found, install from crates.io or from your package manager)
17 | endif
18 |
19 | ifeq ($(shell which nasm),)
20 | $(error nasm not found, install from your package manager)
21 | endif
22 |
23 | ifeq ($(shell which just),)
24 | $(error 'just' not found, install from crates.io or from your package manager)
25 | endif
26 |
27 | ifneq ($(NIX_SHELL_BUILD),1)
28 | CARGO_CONFIG_VERSION=0.1.1
29 | ifeq ($(shell env -u RUSTUP_TOOLCHAIN cargo install --list | grep '^cargo-config v$(CARGO_CONFIG_VERSION):$$'),)
30 | $(error cargo-config $(CARGO_CONFIG_VERSION) not found, run "cargo install --force --version $(CARGO_CONFIG_VERSION) cargo-config")
31 | endif
32 | endif
33 |
34 | endif
35 |
--------------------------------------------------------------------------------
/mk/disk.mk:
--------------------------------------------------------------------------------
1 | # Configuration file with the commands configuration of the Redox image
2 |
3 | $(BUILD)/harddrive.img: $(HOST_FSTOOLS) $(REPO_TAG)
4 | mkdir -p $(BUILD)
5 | rm -rf $@ $@.partial
6 | -$(FUMOUNT) /tmp/redox_installer || true
7 | FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
8 | if [ -z "$$FILESYSTEM_SIZE" ] ; then \
9 | FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
10 | fi && \
11 | truncate -s "$$FILESYSTEM_SIZE"m $@.partial
12 | umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $@.partial
13 | mv $@.partial $@
14 |
15 | $(BUILD)/livedisk.iso: $(HOST_FSTOOLS) $(REPO_TAG)
16 | mkdir -p $(BUILD)
17 | rm -rf $@ $@.partial
18 | -$(FUMOUNT) /tmp/redox_installer || true
19 | FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
20 | if [ -z "$$FILESYSTEM_SIZE" ] ; then \
21 | FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
22 | fi && \
23 | truncate -s "$$FILESYSTEM_SIZE"m $@.partial
24 | umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) --live $@.partial
25 | mv $@.partial $@
26 |
27 | $(BUILD)/filesystem.img: $(HOST_FSTOOLS) $(REPO_TAG)
28 | mkdir -p $(BUILD)
29 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
30 | rm -rf $@ $@.partial $(BUILD)/filesystem/
31 | -$(FUMOUNT) /tmp/redox_installer || true
32 | FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
33 | if [ -z "$$FILESYSTEM_SIZE" ] ; then \
34 | FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
35 | fi && \
36 | truncate -s "$$FILESYSTEM_SIZE"m $@.partial
37 | $(REDOXFS_MKFS) $(REDOXFS_MKFS_FLAGS) $@.partial
38 | mkdir -p $(BUILD)/filesystem/
39 | $(REDOXFS) $@.partial $(BUILD)/filesystem/
40 | sleep 1
41 | pgrep redoxfs
42 | umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $(BUILD)/filesystem/
43 | sync
44 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
45 | rm -rf $(BUILD)/filesystem/
46 | mv $@.partial $@
47 |
48 | mount: $(HOST_FSTOOLS) FORCE
49 | mkdir -p $(BUILD)/filesystem/
50 | $(REDOXFS) $(BUILD)/harddrive.img $(BUILD)/filesystem/
51 | sleep 2
52 | pgrep redoxfs
53 |
54 | mount_extra: $(HOST_FSTOOLS) FORCE
55 | mkdir -p $(BUILD)/filesystem/
56 | $(REDOXFS) $(BUILD)/extra.img $(BUILD)/filesystem/
57 | sleep 2
58 | pgrep redoxfs
59 |
60 | unmount: FORCE
61 | sync
62 | -$(FUMOUNT) $(BUILD)/filesystem/ || true
63 | rm -rf $(BUILD)/filesystem/
64 | -$(FUMOUNT) /tmp/redox_installer || true
65 |
--------------------------------------------------------------------------------
/mk/fstools.mk:
--------------------------------------------------------------------------------
1 | # Configuration file for redox-installer, Cookbook and RedoxFS FUSE
2 |
3 | fstools: $(FSTOOLS_TAG)
4 |
5 | # These tools run inside Podman if it is used, or on the host if Podman is not used
6 | $(FSTOOLS_TAG): cookbook installer $(CONTAINER_TAG)
7 | ifeq ($(PODMAN_BUILD),1)
8 | $(PODMAN_RUN) $(MAKE) $@
9 | else
10 | $(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
11 | $(HOST_CARGO) build --manifest-path cookbook/pkgar/Cargo.toml --release
12 | $(HOST_CARGO) build --manifest-path installer/Cargo.toml --bin list_packages --release
13 | mkdir -p build
14 | touch $@
15 | endif
16 |
17 | ## The installer and redoxfs run on the host, even when using Podman build
18 | $(HOST_FSTOOLS): installer redoxfs
19 | rm -rf $@ $@.partial
20 | mkdir -p $@.partial
21 | $(HOST_CARGO) install --root $@.partial --path installer --bin redox_installer
22 | $(HOST_CARGO) install --root $@.partial --path redoxfs --bin redoxfs --bin redoxfs-mkfs
23 | mv $@.partial $@
24 | touch $@
25 |
26 | fstools_clean: FORCE $(CONTAINER_TAG)
27 | ifeq ($(PODMAN_BUILD),1)
28 | $(PODMAN_RUN) $(MAKE) $@
29 | else
30 | $(HOST_CARGO) clean --manifest-path cookbook/Cargo.toml
31 | $(HOST_CARGO) clean --manifest-path cookbook/pkgar/Cargo.toml
32 | $(HOST_CARGO) clean --manifest-path installer/Cargo.toml
33 | $(HOST_CARGO) clean --manifest-path redoxfs/Cargo.toml
34 | rm -rf $(HOST_FSTOOLS)
35 | rm -f $(FSTOOLS_TAG)
36 | endif
37 |
--------------------------------------------------------------------------------
/mk/podman.mk:
--------------------------------------------------------------------------------
1 | # Configuration file of the Podman commands
2 |
3 | # Configuration variables for running make in Podman
4 | ## Tag the podman image $IMAGE_TAG
5 | IMAGE_TAG?=redox-base
6 | ## Working Directory in Podman
7 | CONTAINER_WORKDIR?=/mnt/redox
8 |
9 | ## Flag passed to the Podman volumes. :Z can be used only with SELinux
10 | USE_SELINUX=1
11 | ifeq ($(USE_SELINUX),1)
12 | PODMAN_VOLUME_FLAG=:Z
13 | else
14 | PODMAN_VOLUME_FLAG=
15 | endif
16 |
17 | ## Podman Home Directory
18 | PODMAN_HOME?=$(ROOT)/build/podman
19 | ## Podman command with its many arguments
20 | PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/home$(PODMAN_VOLUME_FLAG)
21 | PODMAN_ENV?=--env PATH=/home/poduser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
22 | PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG)
23 | PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --userns keep-id --user `id -u` --interactive --tty --env TERM=$(TERM)
24 | PODMAN_RUN?=podman run $(PODMAN_OPTIONS) $(PODMAN_VOLUMES) $(PODMAN_ENV) $(PODMAN_CONFIG) $(IMAGE_TAG)
25 |
26 | container_shell: build/container.tag
27 | ifeq ($(PODMAN_BUILD),1)
28 | podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) --tty $(IMAGE_TAG) bash
29 | else
30 | @echo PODMAN_BUILD=$(PODMAN_BUILD), please set it to 1 in mk/config.mk
31 | endif
32 |
33 | container_su: FORCE
34 | podman exec --user=0 --latest --interactive --tty bash
35 |
36 | container_clean: FORCE
37 | rm -f build/container.tag
38 | @echo "If podman dir cannot be removed, remove with \"sudo rm\"."
39 | -rm -rf $(PODMAN_HOME) || true
40 | @echo "For complete clean of images and containers, use \"podman system reset\""
41 | -podman image rm --force $(IMAGE_TAG) || true
42 |
43 | container_touch: FORCE
44 | ifeq ($(PODMAN_BUILD),1)
45 | rm -f build/container.tag
46 | podman image exists $(IMAGE_TAG) || (echo "Image does not exist, it will be rebuilt during normal make."; exit 1)
47 | touch build/container.tag
48 | else
49 | @echo PODMAN_BUILD=$(PODMAN_BUILD), container not required.
50 | endif
51 |
52 | container_kill: FORCE
53 | podman kill --latest --signal SIGKILL
54 |
55 | ## Must match the value of CONTAINER_TAG in config.mk
56 | build/container.tag: $(CONTAINERFILE)
57 | ifeq ($(PODMAN_BUILD),1)
58 | rm -f build/container.tag
59 | @echo "If podman_home dir cannot be removed, remove with \"sudo rm\"."
60 | -rm -rf $(PODMAN_HOME) || true
61 | -podman image rm --force $(IMAGE_TAG) || true
62 | mkdir -p $(PODMAN_HOME)
63 | @echo "Building Podman image. This may take some time."
64 | sed s/_UID_/`id -u`/ $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
65 | @echo "Mapping Podman user space. Please wait."
66 | $(PODMAN_RUN) bash -e podman/rustinstall.sh
67 | mkdir -p build
68 | touch $@
69 | @echo "Podman ready!"
70 | else
71 | @echo PODMAN_BUILD=$(PODMAN_BUILD), container not required.
72 | endif
73 |
--------------------------------------------------------------------------------
/mk/prefix.mk:
--------------------------------------------------------------------------------
1 | # Configuration file for the Rust/GCC cross-compilers, relibc and libtool
2 |
3 | PREFIX=prefix/$(TARGET)
4 |
5 | PREFIX_INSTALL=$(PREFIX)/sysroot/
6 | PREFIX_PATH=$(ROOT)/$(PREFIX_INSTALL)/bin
7 |
8 | BINUTILS_BRANCH=redox-2.43.1
9 | GCC_BRANCH=redox-13.2.0
10 | LIBTOOL_VERSION=2.5.4
11 |
12 | export PREFIX_RUSTFLAGS=-L $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib
13 | export RUSTUP_TOOLCHAIN=$(ROOT)/$(PREFIX_INSTALL)
14 | export REDOXER_TOOLCHAIN=$(RUSTUP_TOOLCHAIN)
15 |
16 | export CC=
17 | export CXX=
18 |
19 | ifeq ($(TARGET),riscv64gc-unknown-redox)
20 | GCC_ARCH?=--with-arch=rv64gc --with-abi=lp64d
21 | else
22 | GCC_ARCH?=
23 | endif
24 |
25 | # TODO(andypython): Upstream libtool patches to remove the need to locally build libtool.
26 | # Cannot be CI built, i.e. be a part of relibc-install.tar.gz, as the prefix has to be correctly
27 | # set while building. Otherwise aclocal will not be able to find libtool's files. Furthermore, doing
28 | # so would break non-podman builds (not sure if they are still supported though).
29 | prefix: $(PREFIX)/sysroot
30 |
31 | PREFIX_STRIP=\
32 | mkdir -p bin libexec "$(GCC_TARGET)/bin" && \
33 | find bin libexec "$(GCC_TARGET)/bin" "$(GCC_TARGET)/lib" \
34 | -type f \
35 | -exec strip --strip-unneeded {} ';' \
36 | 2> /dev/null
37 |
38 | $(PREFIX)/relibc: $(ROOT)/relibc
39 | mkdir -p "$(@D)"
40 | rm -rf "$@.partial" "$@"
41 | cp -r "$^" "$@.partial"
42 | touch "$@.partial"
43 | mv "$@.partial" "$@"
44 |
45 | $(PREFIX)/relibc-install: $(PREFIX)/relibc | $(PREFIX)/rust-install $(CONTAINER_TAG)
46 | ifeq ($(PODMAN_BUILD),1)
47 | $(PODMAN_RUN) $(MAKE) $@
48 | else
49 | rm -rf "$@.partial" "$@"
50 | cp -r "$(PREFIX)/rust-install" "$@.partial"
51 | rm -rf "$@.partial/$(TARGET)/include/"*
52 | cp -r "$(PREFIX)/rust-install/$(GNU_TARGET)/include/c++" "$@.partial/$(GNU_TARGET)/include/c++"
53 | cp -r "$(PREFIX)/rust-install/lib/rustlib/$(HOST_TARGET)/lib/" "$@.partial/lib/rustlib/$(HOST_TARGET)/"
54 | cd "$<" && \
55 | export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
56 | export CARGO="env -u CARGO cargo" && \
57 | $(MAKE) clean && \
58 | $(MAKE) -j `$(NPROC)` all && \
59 | $(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial/$(GNU_TARGET)"
60 | cd "$@.partial" && $(PREFIX_STRIP)
61 | touch "$@.partial"
62 | mv "$@.partial" "$@"
63 | endif
64 |
65 | $(PREFIX)/relibc-install.tar.gz: $(PREFIX)/relibc-install
66 | tar \
67 | --create \
68 | --gzip \
69 | --file "$@" \
70 | --directory="$<" \
71 | .
72 |
73 | $(PREFIX)/libtool:
74 | rm -rf "$@.partial" "$@"
75 | mkdir -p "$@.partial"
76 |
77 | git clone \
78 | --recurse-submodules \
79 | "https://gitlab.redox-os.org/redox-os/libtool/" \
80 | --branch "v$(LIBTOOL_VERSION)-redox" \
81 | --depth 2 \
82 | "$@.partial"
83 |
84 | touch "$@.partial"
85 | echo $(LIBTOOL_VERSION) > $@.partial/.tarball-version
86 | mv "$@.partial" "$@"
87 |
88 | $(PREFIX)/libtool-build: $(PREFIX)/libtool $(CONTAINER_TAG)
89 | ifeq ($(PODMAN_BUILD),1)
90 | $(PODMAN_RUN) $(MAKE) $@
91 | else
92 | mkdir -p "$@.partial"
93 | PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
94 | cd "$<" && \
95 | ./bootstrap \
96 | --skip-po \
97 | --force \
98 | --gnulib-srcdir=./gnulib
99 | PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
100 | cd "$@.partial" && \
101 | cp -rp $(abspath $<)/. ./ && \
102 | "$(ROOT)/$ /dev/null; then
237 | echo "Virtualbox is not in the official debian packages"
238 | echo "To install virtualbox on debian, see https://wiki.debian.org/VirtualBox"
239 | echo "Please install VirtualBox and re-run this script,"
240 | echo "or run with -e qemu"
241 | exit 1
242 | else
243 | echo "Installing VirtualBox..."
244 | sudo "$2" install virtualbox
245 | fi
246 | else
247 | echo "VirtualBox already installed!"
248 | fi
249 | else
250 | echo "Unknown emulator: $1"
251 | exit 1
252 | fi
253 |
254 | }
255 |
256 | ###############################################################################
257 | # This function takes care of installing all dependencies for building Redox on
258 | # Fedora Linux
259 | # @params: $1 the emulator to install, "virtualbox" or "qemu"
260 | ###############################################################################
261 | fedora()
262 | {
263 | echo "Detected Fedora"
264 | if [ -z "$(which git)" ]; then
265 | echo "Installing git..."
266 | sudo dnf install git-all
267 | fi
268 |
269 | if [ "$1" == "qemu" ]; then
270 | if [ -z "$(which qemu-system-x86_64)" ]; then
271 | echo "Installing QEMU..."
272 | sudo dnf install qemu-system-x86 qemu-kvm
273 | else
274 | echo "QEMU already installed!"
275 | fi
276 | elif [ "$1" == "virtualbox" ]; then
277 | if [ -z "$(which virtualbox)" ]; then
278 | echo "Please install VirtualBox and re-run this script,"
279 | echo "or run with -e qemu"
280 | exit 1
281 | else
282 | echo "VirtualBox already installed!"
283 | fi
284 | else
285 | echo "Unknown emulator: $1"
286 | exit 1
287 | fi
288 |
289 | # Use rpm -q to check if it's already installed
290 | PKGS=$(for pkg in podman curl make fuse3 fuse-overlayfs slirp4netns gdb; do rpm -q $pkg > /dev/null || echo $pkg; done)
291 | # If the list of packages is not empty, install missing
292 | COUNT=$(echo $PKGS | wc -w)
293 | if [ $COUNT -ne 0 ]; then
294 | echo "Installing necessary build tools..."
295 | sudo dnf install $PKGS
296 | fi
297 | }
298 |
299 | ###############################################################################
300 | # This function takes care of installing all dependencies for building Redox on
301 | # *SUSE Linux
302 | # @params: $1 the emulator to install, "virtualbox" or "qemu"
303 | ###############################################################################
304 | suse()
305 | {
306 | echo "Detected SUSE Linux"
307 |
308 | packages=(
309 | "git"
310 | "curl"
311 | "make"
312 | "fuse"
313 | "fuse-overlayfs"
314 | "slirp4netns"
315 | "podman"
316 | "gdb-multiarch"
317 | )
318 |
319 | if [ -z "$(which git)" ]; then
320 | echo "Will install git ..."
321 | packages+=(git)
322 | fi
323 |
324 | if [ "$1" == "qemu" ]; then
325 | if [ -z "$(which qemu-system-x86_64)" ]; then
326 | echo "Will install QEMU..."
327 | packages+=(qemu-x86 qemu-kvm)
328 | else
329 | echo "QEMU already installed!"
330 | fi
331 | elif [ "$1" == "virtualbox" ]; then
332 | if [ -z "$(which virtualbox)" ]; then
333 | echo "Please install VirtualBox and re-run this script,"
334 | echo "or run with -e qemu"
335 | exit 1
336 | else
337 | echo "VirtualBox already installed!"
338 | fi
339 | else
340 | echo "Unknown emulator: $1"
341 | exit 1
342 | fi
343 |
344 | echo "Installing necessary build tools..."
345 |
346 | # We could install all the packages in a single zypper command with:
347 | #
348 | # zypper install package1 package2 package3
349 | #
350 | # But there is an issue with this: zypper returns a success code if at
351 | # least one of the packages was correctly installed, but we need it to fail
352 | # if any of the packages is missing.
353 | #
354 | # To confirm that the packages are available, we try to install them one by
355 | # one with --dry-run.
356 | # We still install all the packages in a single zypper command so that the
357 | # user has to confirm only once.
358 | for p in ${packages[@]}; do
359 | if rpm -q "${p}" > /dev/null ; then
360 | echo "${p} is already installed"
361 | else
362 | # Zypper shows a confirmation prompt and the "y" answer even with
363 | # --non-interactive and --no-confirm:
364 | #
365 | # 1 new package to install.
366 | # Overall download size: 281.7 KiB. Already cached: 0 B. After the operation, additional 394.6 KiB will be used.
367 | # Continue? [y/n/v/...? shows all options] (y): y
368 | #
369 | # That could make the user think that the package was installed,
370 | # when it was only a dry run.
371 | # To avoid the confusion, we hide the output unless there was an
372 | # error.
373 | if out="$(zypper --non-interactive install --no-confirm --dry-run --force-resolution ${p} 2>&1)" ; then
374 | echo "${p} can be installed"
375 | else
376 | echo "no"
377 | echo ""
378 | echo "Zypper output:"
379 | echo ""
380 | echo "${out}"
381 | echo ""
382 | echo "Could not find how to install '${p}', try running:"
383 | echo ""
384 | echo " zypper install ${p}"
385 | echo ""
386 | exit 1
387 | fi
388 | fi
389 | done
390 |
391 | zypper install ${packages[@]}
392 |
393 | }
394 |
395 | ##############################################################################
396 | # This function takes care of installing all dependencies for building Redox on
397 | # Gentoo Linux
398 | # @params: $1 the emulator to install, "virtualbox" or "qemu"
399 | ##############################################################################
400 | gentoo()
401 | {
402 | echo "Detected Gentoo Linux"
403 | if [ -z "$(which git)" ]; then
404 | echo "Installing git..."
405 | sudo emerge dev-vcs/git
406 | fi
407 | if [ -z "$(which fusermount 2>/dev/null)" ] && [ -z "$(which fusermount3 2>/dev/null)" ]; then
408 | echo "Installing fuse..."
409 | sudo emerge sys-fs/fuse
410 | fi
411 |
412 | if [ "$1" == "qemu" ]; then
413 | if [ -z "$(which qemu-system-x86_64)" ]; then
414 | echo "Please install QEMU and re-run this script"
415 | echo "Step1. Add QEMU_SOFTMMU_TARGETS=\"x86_64\" to /etc/portage/make.conf"
416 | echo "Step2. Execute \"sudo emerge app-emulation/qemu\""
417 | exit 1
418 | else
419 | echo "QEMU already installed!"
420 | fi
421 | elif [ "$1" == "virtualbox" ]; then
422 | if [ -z "$(which virtualbox)" ]; then
423 | echo "Please install VirtualBox and re-run this script,"
424 | echo "or run with -e qemu"
425 | exit 1
426 | else
427 | echo "VirtualBox already installed!"
428 | fi
429 | else
430 | echo "Unknown emulator: $1"
431 | exit 1
432 | fi
433 |
434 | if [ -z "$(which cmake)" ]; then
435 | echo "Installing cmake..."
436 | sudo emerge dev-util/cmake
437 | fi
438 | if [ -z "$(which podman)" ]; then
439 | echo "Please install Podman, https://wiki.gentoo.org/wiki/Podman"
440 | exit 1
441 | fi
442 | }
443 |
444 | ##############################################################################
445 | # This function takes care of installing all dependencies for building Redox on
446 | # Solus
447 | # @params: $1 the emulator to install, "virtualbox" or "qemu"
448 | ##############################################################################
449 | solus()
450 | {
451 | echo "Detected Solus"
452 |
453 | if [ "$1" == "qemu" ]; then
454 | if [ -z "$(which qemu-system-x86_64)" ]; then
455 | sudo eopkg it qemu
456 | else
457 | echo "QEMU already installed!"
458 | fi
459 | elif [ "$1" == "virtualbox" ]; then
460 | if [ -z "$(which virtualbox)" ]; then
461 | echo "Please install VirtualBox and re-run this script,"
462 | echo "or run with -e qemu"
463 | exit 1
464 | else
465 | echo "VirtualBox already installed!"
466 | fi
467 | else
468 | echo "Unknown emulator: $1"
469 | exit 1
470 | fi
471 |
472 | echo "Installing necessary build tools..."
473 | #if guards are not necessary with eopkg since it does nothing if latest version is already installed
474 | sudo eopkg it fuse-devel git make fuse2-devel rsync
475 | if [ -z "$(which podman)" ]; then
476 | echo "Please install Podman"
477 | exit 1
478 | fi
479 | }
480 |
481 | ######################################################################
482 | # This function outlines the different options available for bootstrap
483 | ######################################################################
484 | usage()
485 | {
486 | echo "------------------------"
487 | echo "|Redox bootstrap script|"
488 | echo "------------------------"
489 | echo "Usage: ./podman_bootstrap.sh"
490 | echo "OPTIONS:"
491 | echo
492 | echo " -h,--help Show this prompt"
493 | echo " -u [branch] Update git repo and update rust"
494 | echo " If blank defaults to master"
495 | echo " -s Check the status of the current travis build"
496 | echo " -e [emulator] Install specific emulator, virtualbox or qemu"
497 | echo " -p [package Choose an Ubuntu package manager, apt-fast or"
498 | echo " manager] aptitude"
499 | echo " -d Only install the dependencies, skip boot step"
500 | echo "EXAMPLES:"
501 | echo
502 | echo "./podman_bootstrap.sh -e qemu"
503 | exit
504 | }
505 |
506 |
507 | #############################################################
508 | # Looks for and installs a cargo-managed binary or subcommand
509 | #############################################################
510 | cargoInstall() {
511 | if [[ "`cargo install --list`" != *"$1 v$2"* ]]; then
512 | cargo install --force --version "$2" "$1"
513 | else
514 | echo "You have $1 version $2 installed already!"
515 | fi
516 | }
517 |
518 |
519 | ####################################################################################
520 | # This function takes care of everything associated to rust, and the version manager
521 | # That controls it, it can install rustup and uninstall multirust as well as making
522 | # sure that the correct version of rustc is selected by rustup
523 | # @params: $1 install non-interactively, boolean
524 | ####################################################################################
525 | rustInstall() {
526 | noninteractive=$1
527 | # Check to see if multirust is installed, we don't want it messing with rustup
528 | # In the future we can probably remove this but I believe it's good to have for now
529 | if [ -e /usr/local/lib/rustlib/uninstall.sh ] ; then
530 | echo "It appears that multirust is installed on your system."
531 | echo "This tool has been deprecated by the maintainer, and will cause issues."
532 | echo "This script can remove multirust from your system if you wish."
533 | printf "Uninstall multirust (y/N):"
534 | read multirust
535 | if echo "$multirust" | grep -iq "^y" ;then
536 | sudo /usr/local/lib/rustlib/uninstall.sh
537 | else
538 | echo "Please manually uninstall multirust and any other versions of rust, then re-run bootstrap."
539 | exit 1
540 | fi
541 | fi
542 | # If rustup is not installed we should offer to install it for them
543 | if [ -z "$(which rustup)" ]; then
544 | rustup_options="--default-toolchain stable"
545 | echo "You do not have rustup installed."
546 | if [ "$noninteractive" = true ]; then
547 | rustup="y"
548 | rustup_options+=" -y"
549 | else
550 | echo "We HIGHLY recommend using rustup."
551 | echo "Would you like to install it now?"
552 | echo "*WARNING* this involves a 'curl | sh' style command"
553 | printf "(y/N): "
554 | read rustup
555 | fi
556 | if echo "$rustup" | grep -iq "^y" ;then
557 | #install rustup
558 | curl https://sh.rustup.rs -sSf | sh -s -- $rustup_options
559 | # You have to add the rustup variables to the $PATH
560 | echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> ~/.bashrc
561 | # source the variables so that we can execute rustup commands in the current shell
562 | source ~/.cargo/env
563 | else
564 | echo "Rustup will not be installed!"
565 | fi
566 | fi
567 | #
568 | if [ -z "$(which rustc)" ]; then
569 | echo "Rust is not installed"
570 | echo "Please either run the script again, accepting rustup install"
571 | echo "or install rustc stable manually (not recommended) via:"
572 | echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=stable"
573 | exit 1
574 | else
575 | echo "Your Rust install looks good!"
576 | fi
577 | }
578 |
579 | ####################################################################
580 | # This function gets the current build status from travis and prints
581 | # a message to the user
582 | ####################################################################
583 | statusCheck() {
584 | for i in $(echo "$(curl -sf https://api.travis-ci.org/repositories/redox-os/redox.json)" | tr "," "\n")
585 | do
586 | if echo "$i" | grep -iq "last_build_status" ;then
587 | if echo "$i" | grep -iq "0" ;then
588 | echo
589 | echo "********************************************"
590 | echo "Travis reports that the last build succeeded!"
591 | echo "Looks like you are good to go!"
592 | echo "********************************************"
593 | elif echo "$i" | grep -iq "null" ;then
594 | echo
595 | echo "******************************************************************"
596 | echo "The Travis build did not finish, this is an error with its config."
597 | echo "I cannot reliably determine whether the build is succeeding or not."
598 | echo "Consider checking for and maybe opening an issue on gitlab"
599 | echo "******************************************************************"
600 | else
601 | echo
602 | echo "**************************************************"
603 | echo "Travis reports that the last build *FAILED* :("
604 | echo "Might want to check out the issues before building"
605 | echo "**************************************************"
606 | fi
607 | fi
608 | done
609 | }
610 |
611 | ###########################################################################
612 | # This function is the main logic for the bootstrap; it clones the git repo
613 | # then it installs the dependent packages
614 | ###########################################################################
615 | boot()
616 | {
617 | echo "Cloning gitlab repo..."
618 | git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
619 | echo "Creating .config with PODMAN_BUILD=1"
620 | echo 'PODMAN_BUILD?=1' > redox/.config
621 | echo "Cleaning up..."
622 | rm podman_bootstrap.sh
623 | echo
624 | echo "---------------------------------------"
625 | echo "Well it looks like you are ready to go!"
626 | echo "---------------------------------------"
627 | statusCheck
628 | echo "The file redox/.config was created with PODMAN_BUILD=1."
629 | echo
630 | echo "** Be sure to update your path to include Rust - run the following command: **"
631 | echo 'source $HOME/.cargo/env'
632 | echo
633 | echo "Run the following commands to build redox using Podman:"
634 | echo
635 | echo "cd redox"
636 | MAKE="make"
637 | if [[ "$(uname)" == "FreeBSD" ]]; then
638 | MAKE="gmake"
639 | echo "kldload fuse.ko # This loads the kernel module for FUSE"
640 | fi
641 | echo "$MAKE all"
642 | echo "$MAKE virtualbox or qemu"
643 | echo
644 | echo " Good luck!"
645 |
646 | exit
647 | }
648 |
649 | if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
650 | usage
651 | elif [ "$1" == "-u" ]; then
652 | git pull upstream master
653 | git submodule update --recursive --init
654 | rustup update nightly
655 | exit
656 | elif [ "$1" == "-s" ]; then
657 | statusCheck
658 | exit
659 | fi
660 |
661 | emulator="qemu"
662 | defpackman="apt-get"
663 | dependenciesonly=false
664 | update=false
665 | while getopts ":e:p:udhs" opt
666 | do
667 | case "$opt" in
668 | e) emulator="$OPTARG";;
669 | p) defpackman="$OPTARG";;
670 | d) dependenciesonly=true;;
671 | u) update=true;;
672 | h) usage;;
673 | s) statusCheck && exit;;
674 | \?) echo "I don't know what to do with that option, try -h for help"; exit 1;;
675 | esac
676 | done
677 |
678 | banner
679 |
680 | rustInstall "$noninteractive"
681 |
682 | if [ "$update" == "true" ]; then
683 | git pull upstream master
684 | git submodule update --recursive --init
685 | exit
686 | fi
687 |
688 | if [ "Darwin" == "$(uname -s)" ]; then
689 | osx "$emulator"
690 | else
691 | # Here we will use package managers to determine which operating system the user is using.
692 |
693 | # SUSE and derivatives
694 | if hash 2>/dev/null zypper; then
695 | suse "$emulator"
696 | # Debian or any derivative of it
697 | elif hash 2>/dev/null apt-get; then
698 | ubuntu "$emulator" "$defpackman"
699 | # Fedora
700 | elif hash 2>/dev/null dnf; then
701 | fedora "$emulator"
702 | # Gentoo
703 | elif hash 2>/dev/null emerge; then
704 | gentoo "$emulator"
705 | # Solus
706 | elif hash 2>/dev/null eopkg; then
707 | solus "$emulator"
708 | # Arch Linux
709 | elif hash 2>/dev/null pacman; then
710 | archLinux "$emulator"
711 | # FreeBSD
712 | elif hash 2>/dev/null pkg; then
713 | freebsd "$emulator"
714 | # Unsupported platform
715 | else
716 | printf "\e[31;1mFatal error: \e[0;31mUnsupported platform, please open an issue\e[0m\n"
717 | fi
718 | fi
719 |
720 | if [ "$dependenciesonly" = false ]; then
721 | boot
722 | fi
723 |
724 | echo "Redox bootstrap complete!"
--------------------------------------------------------------------------------
/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "nightly-2025-01-12"
3 | components = ["rust-src"]
4 |
--------------------------------------------------------------------------------
/scripts/backtrace.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script allow the user to copy a Rust backtrace from Redox
4 | # and retrieve the symbols
5 |
6 | usage()
7 | {
8 | echo "Usage: $0 -r recipe [ -e command_name ] [ -R ] [ -X | -6 | -A ] [[ -b backtracefile ] | [ addr1 ... ]]"
9 | echo
10 | echo "Print the backtrace contained in the backtracefile."
11 | echo "Symbols are taken from the executable for the given recipe."
12 | echo "If no backtracefile is given, decode the given addresses instead."
13 | echo "This command must be run in the 'redox' directory."
14 | echo
15 | echo "-X for x86_64, -6 for i686, -A for aarch64 (x86_64 is the default)."
16 | echo "To read from stdin, use '-b -'"
17 | echo "The name of the executable must match what Cargo believes it to be."
18 | echo "If the executalbe is named 'recipe_command', just use 'command' as the name."
19 | echo "The debug version of the executable is used if available."
20 | echo "The release version is used if no debug version exists."
21 | echo "-R to force the use of the 'release' version of the executable."
22 | echo "Make sure the executable is the one that produced the backtrace."
23 | exit 1
24 | }
25 |
26 | ARCH="x86_64"
27 |
28 | while getopts ":b:e:r:hRXA6" opt
29 | do
30 | case "$opt" in
31 | X) ARCH="x86_64";;
32 | A) ARCH="aarch64";;
33 | 6) ARCH="i686";;
34 | b) INFILE="$OPTARG";;
35 | e) COMMAND="$OPTARG";;
36 | i) INST="$OPTARG";;
37 | r) RECIPE_NAME="$OPTARG";;
38 | R) RELEASE=true;;
39 | h) usage;;
40 | \?) echo "Unknown option -$OPTARG, try -h for help"; exit;;
41 | :) echo "-$OPTARG requires a value"; exit;;
42 | esac
43 | done
44 | shift $((OPTIND -1))
45 |
46 | if [ -z "$RECIPE_NAME" ]
47 | then
48 | usage
49 | fi
50 |
51 | if [ -z "$INFILE" -a $# = 0 ]
52 | then
53 | usage
54 | fi
55 |
56 | # if no command name is given, assume it's the same as the recipe name
57 | RECIPE_DIR="$(cd cookbook; target/release/find_recipe $RECIPE_NAME)"
58 | if [ -z "$COMMAND" ]
59 | then
60 | COMMAND="$RECIPE_NAME"
61 | fi
62 |
63 | # look for the debug version of the command
64 | EXECUTABLE=cookbook/"$RECIPE_DIR"/target/"$ARCH"-unknown-redox/build/target/"$ARCH"-unknown-redox/debug/"$COMMAND"
65 |
66 | # try the release version next
67 | if [ ! -f "$EXECUTABLE" -o ! -z "$RELEASE" ]
68 | then
69 | EXECUTABLE=cookbook/"$RECIPE_DIR"/target/"$ARCH"-unknown-redox/build/target/"$ARCH"-unknown-redox/release/"$COMMAND"
70 | fi
71 |
72 | if [ $# -ne 0 ]
73 | then
74 | addr2line --demangle=rust --inlines --pretty-print --functions --exe="$EXECUTABLE" $@
75 | else
76 | sed '/^\s*$/d; s/^.*0x\([0-9a-f]*\).*$/\1/g' "$INFILE" | addr2line --demangle=rust --inlines --pretty-print --functions --exe="$EXECUTABLE"
77 | fi
78 |
79 |
--------------------------------------------------------------------------------
/scripts/cargo-update.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script runs "make f.recipe" and "cargo update" in the specified recipe
4 |
5 | recipe_name="$1"
6 | recipe_path=$(find cookbook/recipes -name "$recipe_name" -maxdepth 4)
7 |
8 | make f."$recipe_name"
9 | cd "$recipe_path"/source
10 | cargo update
11 |
--------------------------------------------------------------------------------
/scripts/category.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script run the recipe command options on some Cookbook category
4 |
5 | if [ -z "$1" ] || [ -z "$2" ]
6 | then
7 | echo "Build or clean all recipe directories in a category" >&2
8 | echo Usage: $0 "" "" >&2
9 | echo "" can be f, r, c, u, or combinations that \"make\" understands >&2
10 | exit 1
11 | fi
12 |
13 | set -x
14 |
15 | action="${1#-}"
16 |
17 | for recipe in `find cookbook/recipes/"$2" -name "recipe.*"`
18 | do
19 | recipe_folder=`dirname "$recipe"`
20 | recipe_name=`basename "$recipe_folder"`
21 | make "$action"."$recipe_name"
22 | done
--------------------------------------------------------------------------------
/scripts/changelog.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script show the changelog of all Redox components
4 |
5 | set -e
6 |
7 | LAST_RELEASE_TAG="$(git describe --tags --abbrev=0)"
8 | LAST_RELEASE_TIMESTAMP="$(git log --format="%ct" -1 "${LAST_RELEASE_TAG}")"
9 | echo "Last release: ${LAST_RELEASE_TAG} at ${LAST_RELEASE_TIMESTAMP}"
10 |
11 | REPOS=(
12 | redox=.
13 | cookbook=cookbook
14 | rust=rust
15 | )
16 |
17 | if [ "$1" = "--summary" ]
18 | then
19 | summary=true
20 | elif [ "$1" = "--mdlinks" ]
21 | then
22 | mdlinks=true
23 | fi
24 |
25 | for package in $(installer/target/release/redox_installer --list-packages -c config/$(uname -m)/desktop.toml)
26 | do
27 | package_source="$(cd cookbook; target/release/find_recipe ${package})"
28 | REPOS+=("${package}=cookbook/${package_source}/source")
29 | done
30 |
31 | # TODO: resolve dependencies instead of manually adding these initfs packages
32 | for package in init logd ramfs randd zerod
33 | do
34 | package_source="$(cd cookbook; target/release/find_recipe ${package})"
35 | REPOS+=("${package}=cookbook/${package_source}/source")
36 | done
37 |
38 | for name_repo in "${REPOS[@]}"
39 | do
40 | name="$(echo "${name_repo}" | cut -d "=" -f 1)"
41 | repo="$(echo "${name_repo}" | cut -d "=" -f 2-)"
42 | if [ "${summary}" = true ]
43 | then
44 | echo
45 | echo "### ${name}"
46 | echo
47 | elif [ "${mdlinks}" = true ]
48 | then
49 | echo -n "- [${name}]"
50 | else
51 | echo -en "\x1B[1m${name}:\x1B[0m "
52 | fi
53 |
54 | if [ -e "${repo}/.git" ]
55 | then
56 | remote="$(git -C "${repo}" remote get-url origin)"
57 | website="${remote%.*}"
58 | before="$(git -C "${repo}" log --until="${LAST_RELEASE_TIMESTAMP}" --format="%h" -1)"
59 | after="$(git -C "${repo}" log --since="${LAST_RELEASE_TIMESTAMP}" --format="%h" -1)"
60 | if [ -z "${before}" ]
61 | then
62 | echo "New repository at ${website}"
63 | elif [ -z "${after}" ]
64 | then
65 | echo "No changes"
66 | else
67 | if [ "${summary}" = true ]
68 | then
69 | git -C "${repo}" log ${before}...${after} --oneline
70 | elif [ "${mdlinks}" = true ]
71 | then
72 | echo "(${website}/-/compare/${before}...${after})"
73 | else
74 | echo "${website}/-/compare/${before}...${after}"
75 | fi
76 | fi
77 | else
78 | echo "Not a git repository"
79 | fi
80 | done
81 |
--------------------------------------------------------------------------------
/scripts/commit-hash.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script show the current Git branch and commit of the recipe source
4 |
5 | if [ $# -ne 1 ]
6 | then
7 | echo "Usage: $0 recipe_name"
8 | echo " Print the commit hash for recipe_name"
9 | exit 1
10 | fi
11 |
12 | cd cookbook
13 | recipe_path="$(target/release/find_recipe $1)"
14 |
15 | cd "$recipe_path"/source
16 | git branch -v
17 |
--------------------------------------------------------------------------------
/scripts/dual-boot.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script install Redox in the free space of your storage device
4 | # and add a boot entry (if you are using the systemd-boot boot loader)
5 |
6 | set -e
7 |
8 | if [ -n "$1" ]
9 | then
10 | DISK="$1"
11 | else
12 | DISK=/dev/disk/by-partlabel/REDOX_INSTALL
13 | fi
14 |
15 | if [ ! -b "${DISK}" ]
16 | then
17 | echo "$0: '${DISK}' is not a block device" >&2
18 | exit 1
19 | fi
20 |
21 | if [ -z "${ARCH}" ]
22 | then
23 | export ARCH=x86_64
24 | fi
25 |
26 | if [ -z "${CONFIG_NAME}" ]
27 | then
28 | export CONFIG_NAME=demo
29 | fi
30 |
31 | IMAGE="build/${ARCH}/${CONFIG_NAME}/filesystem.img"
32 | set -x
33 | make "${IMAGE}"
34 | sudo popsicle "${IMAGE}" "${DISK}"
35 | set +x
36 |
37 | ESP="$(bootctl --print-esp-path)"
38 | if [ -z "${ESP}" ]
39 | then
40 | echo "$0: no ESP found" >&2
41 | exit 1
42 | fi
43 |
44 | BOOTLOADER="cookbook/recipes/core/bootloader/target/${ARCH}-unknown-redox/stage/boot/bootloader.efi"
45 | set -x
46 | sudo mkdir -pv "${ESP}/EFI" "${ESP}/loader/entries"
47 | sudo cp -v "${BOOTLOADER}" "${ESP}/EFI/redox.efi"
48 | sudo tee "${ESP}/loader/entries/redox.conf" < /dev/null) \
57 | $(find "$recipe_path/target/$target/stage/bin" -type f 2> /dev/null)
58 | do
59 | shortname="$(basename $command)"
60 | echo "$recipe_path $shortname"
61 | done
62 | done | sort | $uniq
63 |
--------------------------------------------------------------------------------
/scripts/find-recipe.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script show all files installed by a recipe
4 |
5 | # Ensure arch and config are set as desired, we use these to find the build dir
6 | export ARCH=$(uname -m)
7 | export CONFIG_NAME=desktop
8 |
9 | # Make sure to unmount the image first
10 | make unmount &>/dev/null || true
11 |
12 | # Mount the image
13 | make mount >/dev/null
14 |
15 | # Find all files
16 | find "build/${ARCH}/${CONFIG_NAME}/" -type f | cut -d / -f5- |\
17 | sort |\
18 | uniq |\
19 | while read path
20 | do
21 | # Skip empty paths
22 | if [ -z "${path}" ]
23 | then
24 | continue
25 | fi
26 |
27 | # Find all packages providing this file
28 | pkgs="$(
29 | find cookbook/recipes/*"/target/${ARCH}-unknown-redox/stage/${path}" 2>/dev/null |
30 | cut -d/ -f3 |
31 | tr '\n' ' ' |
32 | sort |
33 | uniq
34 | )"
35 | if [ -n "${pkgs}" ]
36 | then
37 | echo "$path: ${pkgs}"
38 | else
39 | echo "$path: no packages, see config/${ARCH}/${CONFIG_NAME}.toml"
40 | fi
41 | done
42 |
43 | # Make sure to unmount the image
44 | make unmount &>/dev/null || true
45 |
--------------------------------------------------------------------------------
/scripts/include-recipes.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script create a list with:
4 | # "recipe-name = {} #TODO"
5 | # For quick testing of WIP recipes
6 |
7 | # Given a string, find recipe.toml files containing that string.
8 | # Create a list that can be copy/pasted into a filesystem config.
9 |
10 | if [ -z "$*" ]
11 | then
12 | echo "Find matching recipes, and format for inclusion in config"
13 | echo "Usage: $0 \"pattern\""
14 | echo "Must be run from 'redox' directory"
15 | echo "e.g. $0 \"TODO.*error\""
16 | exit 1
17 | fi
18 |
19 | cookbook_recipes="cookbook/recipes"
20 | recipe_paths=$(grep -rl "$*" "$cookbook_recipes" --include recipe.toml)
21 |
22 | for recipe_path in $recipe_paths
23 | do
24 | recipe_dir="$(dirname $recipe_path)"
25 | recipe_name="$(basename $recipe_dir)"
26 | echo "$recipe_name = {} # " $(grep "$*" $recipe_path)
27 | done
--------------------------------------------------------------------------------
/scripts/pkg-size.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script show the package size of the recipes ("stage.pkgar" and "stage.tar.gz")
4 | # It must be used by package maintainers to enforce the library linking size policy
5 |
6 | if [ $# = 0 ]
7 | then
8 | find cookbook/recipes \( -name stage.pkgar -o -name stage.tar.gz \) -exec ls -hs {} \;
9 | exit 0
10 | fi
11 |
12 | for recipe in $@
13 | do
14 | if [ "$recipe" = "-h" ] || [ "$recipe" = "--help" ]
15 | then
16 | echo "Usage: $0 [recipe] ..."
17 | echo " For the recipe(s), prints the size of 'stage.pkgar' and 'stage.tar.gz'."
18 | echo " If no recipe is given, then all packages are listed."
19 | exit 0
20 | fi
21 |
22 | recipe_paths=$(find cookbook/recipes -name $recipe)
23 | for recipe_path in $recipe_paths
24 | do
25 | if [ -f "$recipe_path/recipe.toml" ] || [ -f "$recipe_path/recipe.sh" ]
26 | then
27 | find "$recipe_path" \( -name stage.pkgar -o -name stage.tar.gz \) -exec ls -hs {} \;
28 | fi
29 | done
30 | done
--------------------------------------------------------------------------------
/scripts/print-recipe.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script print the recipe configuration
4 |
5 | cd cookbook
6 |
7 | cat $(target/release/find_recipe "$1")/recipe.*
8 |
--------------------------------------------------------------------------------
/scripts/recipe-match.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script print the recipe configuration files with determined text
4 |
5 | bat --decorations=always $(rg "$1" -li --sort=path cookbook/recipes)
6 |
--------------------------------------------------------------------------------
/scripts/recipe-path.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FIND_RECIPE="find cookbook/recipes -maxdepth 4 -name"
4 |
5 | for recipe in $*
6 | do
7 | ${FIND_RECIPE} "${recipe}"
8 | done
9 |
--------------------------------------------------------------------------------
/scripts/show-package.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script show the contents of the "stage" and "sysroot" folders in some recipe
4 |
5 | if [ -z "$*" ]
6 | then
7 | echo "Show the contents of the stage and sysroot folders in recipe(s)"
8 | echo "Usage: $0 recipe1 ..."
9 | echo "Must be run from the 'redox' directory"
10 | echo "e.g. $0 kernel"
11 | exit 1
12 | fi
13 |
14 | find_recipe="target/release/find_recipe"
15 | if [ ! -x "cookbook/$find_recipe" ]
16 | then
17 | echo "$find_recipe not found."
18 | echo "Please run 'make fstools' and try again."
19 | exit 1
20 | fi
21 |
22 | for recipe in $*
23 | do
24 | recipe_dir="$(cd cookbook; "$find_recipe" "$recipe")"
25 | ls -1 "cookbook/$recipe_dir/target"/*/{stage,sysroot}
26 | done
27 |
--------------------------------------------------------------------------------
/scripts/ventoy.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script create and copy the Redox bootable image to an Ventoy-formatted device
4 |
5 | set -e
6 |
7 | ARCHS=(
8 | i686
9 | x86_64
10 | )
11 | CONFIGS=(
12 | demo
13 | desktop
14 | )
15 |
16 | VENTOY="/media/${USER}/Ventoy"
17 | if [ ! -d "${VENTOY}" ]
18 | then
19 | echo "Ventoy not mounted" >&2
20 | exit 1
21 | fi
22 |
23 | for ARCH in "${ARCHS[@]}"
24 | do
25 | for CONFIG_NAME in "${CONFIGS[@]}"
26 | do
27 | IMAGE="build/${ARCH}/${CONFIG_NAME}/livedisk.iso"
28 | make ARCH="${ARCH}" CONFIG_NAME="${CONFIG_NAME}" "${IMAGE}"
29 | cp -v "${IMAGE}" "${VENTOY}/redox-${CONFIG_NAME}-${ARCH}.iso"
30 | done
31 | done
32 |
33 | sync
34 |
35 | echo "Finished copying configs (${CONFIGS[@]}) for archs (${ARCHS[@]})"
36 |
--------------------------------------------------------------------------------
/targets/README:
--------------------------------------------------------------------------------
1 | This contains a target definition for targets that Redox supports but have not
2 | yet been added to the upstream rust, specifically for compiling relibc in
3 | freestanding mode.
4 |
--------------------------------------------------------------------------------
/targets/riscv64gc-unknown-redox.json:
--------------------------------------------------------------------------------
1 | {
2 | "arch": "riscv64",
3 | "code-model": "medium",
4 | "cpu": "generic-rv64",
5 | "crt-objects-fallback": "false",
6 | "crt-static-allows-dylibs": true,
7 | "crt-static-default": true,
8 | "crt-static-respected": true,
9 | "data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
10 | "dynamic-linking": true,
11 | "env": "relibc",
12 | "features": "+m,+a,+f,+d,+c",
13 | "has-rpath": true,
14 | "has-thread-local": true,
15 | "late-link-args": {
16 | "gnu-cc": [
17 | "-lgcc"
18 | ],
19 | "gnu-lld-cc": [
20 | "-lgcc"
21 | ]
22 | },
23 | "linker-flavor": "gnu-cc",
24 | "llvm-abiname": "lp64d",
25 | "llvm-target": "riscv64-unknown-redox",
26 | "max-atomic-width": 64,
27 | "metadata": {
28 | "description": null,
29 | "host_tools": null,
30 | "std": null,
31 | "tier": null
32 | },
33 | "os": "redox",
34 | "plt-by-default": false,
35 | "position-independent-executables": true,
36 | "relro-level": "full",
37 | "target-family": [
38 | "unix"
39 | ],
40 | "target-pointer-width": "64"
41 | }
42 |
--------------------------------------------------------------------------------