mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-19 19:34:18 +08:00
Compare commits
No commits in common. "master" and "0.6.0" have entirely different histories.
@ -1,22 +0,0 @@
|
||||
[target.aarch64-unknown-redox]
|
||||
linker = "aarch64-unknown-redox-gcc"
|
||||
rustflags = []
|
||||
|
||||
[target.i586-unknown-redox]
|
||||
linker = "i586-unknown-redox-gcc"
|
||||
rustflags = []
|
||||
|
||||
[target.i686-unknown-redox]
|
||||
linker = "i686-unknown-redox-gcc"
|
||||
rustflags = []
|
||||
|
||||
[target.x86_64-unknown-redox]
|
||||
linker = "x86_64-unknown-redox-gcc"
|
||||
rustflags = []
|
||||
|
||||
[target.riscv64gc-unknown-redox]
|
||||
linker = "riscv64-unknown-redox-gcc"
|
||||
rustflags = []
|
||||
|
||||
[env]
|
||||
CFLAGS_riscv64gc_unknown_redox="-march=rv64gc -mabi=lp64d"
|
||||
22
.gitignore
vendored
22
.gitignore
vendored
@ -1,25 +1,3 @@
|
||||
/build/
|
||||
/prefix/
|
||||
.config
|
||||
**/my_*
|
||||
# Local settings folder for Jetbrains products (RustRover, IntelliJ, CLion)
|
||||
.idea/
|
||||
# Local settings folder for Visual Studio Professional
|
||||
.vs/
|
||||
# Local settings folder for vscode
|
||||
.vscode/
|
||||
# Local settings folder for the devcontainer extension that most IDEs support.
|
||||
.devcontainer/
|
||||
# Cookbook
|
||||
/repo
|
||||
/web
|
||||
/cookbook.toml
|
||||
/cookbook.lock
|
||||
source
|
||||
source.tmp
|
||||
source-new
|
||||
source-old
|
||||
source.tar
|
||||
source.tar.tmp
|
||||
target
|
||||
wget-log
|
||||
|
||||
@ -1,57 +1,44 @@
|
||||
# The GitLab Continuous Integration configuration
|
||||
image: "ubuntu:20.04"
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: "clone"
|
||||
GIT_STRATEGY: "pull"
|
||||
GIT_SUBMODULE_STRATEGY: "recursive"
|
||||
GIT_CHECKOUT: "true"
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
|
||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
||||
|
||||
fmt:
|
||||
image: "rust:trixie"
|
||||
stage: lint
|
||||
script:
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt -- --check
|
||||
|
||||
cargo-test:
|
||||
image: "rust:trixie"
|
||||
stage: lint
|
||||
script:
|
||||
- cargo test --locked
|
||||
|
||||
fetch-changed:
|
||||
image: "redoxos/redox-base-x86_64"
|
||||
stage: test
|
||||
script:
|
||||
- |
|
||||
export PATH="$HOME/.cargo/bin:$PATH" &&
|
||||
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
|
||||
cargo install cbindgen &&
|
||||
env PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 ./scripts/fetch-changed.sh
|
||||
before_script:
|
||||
- |
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -qq &&
|
||||
apt-get install -qq \
|
||||
bison \
|
||||
build-essential \
|
||||
curl \
|
||||
dosfstools \
|
||||
flex \
|
||||
fuse \
|
||||
genisoimage \
|
||||
git \
|
||||
gnupg \
|
||||
libfuse-dev \
|
||||
nasm \
|
||||
parted \
|
||||
pkg-config \
|
||||
software-properties-common \
|
||||
syslinux \
|
||||
syslinux-utils \
|
||||
texinfo \
|
||||
wget &&
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
|
||||
|
||||
img:
|
||||
image: "redoxos/redox-base-x86_64"
|
||||
stage: test
|
||||
script:
|
||||
- |
|
||||
export PATH="$HOME/.cargo/bin:$PATH" &&
|
||||
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
|
||||
cargo install cbindgen &&
|
||||
PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
|
||||
|
||||
pkg:
|
||||
image: "rust:trixie"
|
||||
stage: test
|
||||
script:
|
||||
- |
|
||||
export PATH="$HOME/.cargo/bin:$PATH" PODMAN_BUILD=0 &&
|
||||
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=x86_64 &&
|
||||
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=i586 &&
|
||||
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=aarch64 &&
|
||||
make CONFIG_NAME=ci SKIP_CHECK_TOOLS=1 repo-tree ARCH=riscv64gc
|
||||
script:
|
||||
- |
|
||||
source "$HOME/.cargo/env" &&
|
||||
cargo install --version 0.1.1 cargo-config &&
|
||||
cargo install cargo-xbuild &&
|
||||
cargo install --version 0.3.20 xargo &&
|
||||
make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
|
||||
artifacts:
|
||||
paths:
|
||||
- build/img/
|
||||
expire_in: 1 week
|
||||
|
||||
40
.gitmodules
vendored
Normal file
40
.gitmodules
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
[submodule "bootloader"]
|
||||
path = bootloader
|
||||
url = https://gitlab.redox-os.org/redox-os/bootloader.git
|
||||
branch = master
|
||||
[submodule "bootloader-efi"]
|
||||
path = bootloader-efi
|
||||
url = https://gitlab.redox-os.org/redox-os/bootloader-efi.git
|
||||
branch = master
|
||||
[submodule "cookbook"]
|
||||
path = cookbook
|
||||
url = https://gitlab.redox-os.org/redox-os/cookbook.git
|
||||
branch = master
|
||||
[submodule "installer"]
|
||||
path = installer
|
||||
url = https://gitlab.redox-os.org/redox-os/installer.git
|
||||
branch = master
|
||||
[submodule "isolinux"]
|
||||
path = isolinux
|
||||
url = https://gitlab.redox-os.org/redox-os/isolinux.git
|
||||
branch = master
|
||||
[submodule "kernel"]
|
||||
path = kernel
|
||||
url = https://gitlab.redox-os.org/redox-os/kernel.git
|
||||
branch = master
|
||||
[submodule "rust"]
|
||||
path = rust
|
||||
url = https://gitlab.redox-os.org/redox-os/rust.git
|
||||
branch = redox-2020-07-27
|
||||
[submodule "redoxfs"]
|
||||
path = redoxfs
|
||||
url = https://gitlab.redox-os.org/redox-os/redoxfs.git
|
||||
branch = master
|
||||
[submodule "relibc"]
|
||||
path = relibc
|
||||
url = https://gitlab.redox-os.org/redox-os/relibc.git
|
||||
branch = master
|
||||
[submodule "bootloader-coreboot"]
|
||||
path = bootloader-coreboot
|
||||
url = https://gitlab.redox-os.org/redox-os/bootloader-coreboot.git
|
||||
branch = master
|
||||
363
CONTRIBUTING.md
363
CONTRIBUTING.md
@ -1,286 +1,205 @@
|
||||
# Contributing to Redox
|
||||
|
||||
**Thank you for your interest in contributing to Redox!**
|
||||
_**Thank you for your interest in contributing to Redox!** 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**!_
|
||||
|
||||
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!**
|
||||
## Index
|
||||
|
||||
**Please read this document until the end to not waste your and our time with unnecessary questions**
|
||||
* [Communication](#communication)
|
||||
* [Chat](#chat)
|
||||
* [GitLab Issues](#issues)
|
||||
* [Pull Requests](#prs)
|
||||
* [Discourse](#discourse)
|
||||
* [Reddit](#reddit)
|
||||
* [News](#news)
|
||||
* [Code Contributions](#code-contributions)
|
||||
* [Low-Hanging Fruit - Easy Targets for Newbies](#easy-targets)
|
||||
* [Creating a Pull Request](#creating-a-pr)
|
||||
* [Best Practices/Guidelines](#best-practices)
|
||||
* [General](#general)
|
||||
* [Kernel](#kernel)
|
||||
* [Testing Practices](#testing-practices)
|
||||
* [Style Guidelines](#style-guidelines)
|
||||
* [Rust](#rust-style-guidelines)
|
||||
* [Git](#git-style-guidelines)
|
||||
* [Other Ways to Contribute](#other)
|
||||
* [Graphic Design](#graphic-design)
|
||||
* [Patreon](#patreon)
|
||||
|
||||
## Code Of Conduct
|
||||
## <a name="extern-links"> Other External Links </a>
|
||||
|
||||
We follow the [Rust Code Of Conduct](https://www.rust-lang.org/policies/code-of-conduct).
|
||||
* [redox-os.org](https://redox-os.org)
|
||||
* [rust-os-comparison](https://github.com/flosse/rust-os-comparison)
|
||||
* [rust-lang.org](http://rust-lang.org)
|
||||
|
||||
## License
|
||||
## <a name="communication"> Communication </a>
|
||||
|
||||
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.
|
||||
### <a name="chat"> Chat </a>
|
||||
|
||||
Please review the `LICENSE` file for the project you are contributing to.
|
||||
The quickest and most open way to **communicate with the Redox team** is on our **chat server**. Currently, you can only get an invite by sending an email request to [info@redox-os.org](mailto:info@redox-os.org), which might take a little while, since it's not automated. Simply say you'd like to join the chat. We're working on an better way to do this, but this is the best way right now.
|
||||
|
||||
[This](https://doc.redox-os.org/book/philosophy.html) page we explain why we use the MIT license.
|
||||
### <a name="issues"> GitLab Issues </a>
|
||||
|
||||
## Contribution Terms
|
||||
A bit more formal way of communication with fellow Redox devs, but a little less quick and convenient like the chat. Submit an issue when you run into problems compiling, testing, or just would like to discuss a certain topic, be it _features, code style, code inconsistencies, minor changes and fixes, etc._
|
||||
|
||||
When making a contribution you agree to the following terms:
|
||||
### <a name="prs"> Pull Requests </a>
|
||||
|
||||
- I understand these changes in full and will be able to respond to review comments.
|
||||
- I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions.
|
||||
It's fine to just submit a small pull request without first making an issue or asking in the chat, **unless** it's a significant change that will require a lot of planning and reviewing. Also see [Creating a Pull Request](#creating-a-pr) and [Git Style Guidelines](#git-style-guidelines).
|
||||
|
||||
## AI Policy
|
||||
### <a name="discourse"> Discourse </a>
|
||||
|
||||
Redox OS does not accept contributions generated by LLMs ([Large Language Models](https://en.wikipedia.org/wiki/Large_language_model)), sometimes also referred to as "AI". This policy is not open to discussion, any content submitted that is clearly labelled as LLM-generated (including issues, merge requests, and merge request descriptions) will be immediately closed, and any attempt to bypass this policy will result in a ban from the project.
|
||||
We have a **discourse forum** at [discourse.redox-os.org](https://discourse.redox-os.org). This is the best way to discuss more general topics that aren't about specific things that need to be addressed one way or another. You can sign up like any other website.
|
||||
|
||||
## Chat
|
||||
### <a name="reddit"> Reddit </a>
|
||||
|
||||
You can join in our chat platforms to discuss development, issues or ask questions.
|
||||
You can also find **Redox on Reddit** in [/r/rust/](https://www.reddit.com/r/rust) and [/r/redox/](https://www.reddit.com/r/redox). Redox news and discussion is posted on the latter, and Rust news and discussion, as well as some Redox posts, is on the former.
|
||||
|
||||
### [Matrix](https://matrix.to/#/#redox-join:matrix.org)
|
||||
### <a name="news"> News </a>
|
||||
|
||||
Matrix is the official way to talk with Redox OS team and community (these rooms are English-only, we don't accept other languages because we don't understand them).
|
||||
News and updates for Redox are posted at [redox-os.org/news](https://redox-os.org/news). It's more one-way than the other things on this list, but it should provide a good summary of what's been going on with the project lately. It's usually updated weekly, but with some exceptions. A mailing list may be included eventually, but it's not set up right now.
|
||||
|
||||
Matrix has several different clients. [Element](https://element.io/) is a commonly used choice, it works on web browsers, Linux, MacOSX, Windows, Android and iOS.
|
||||
## <a name="code-contributions"> Code Contributions </a>
|
||||
|
||||
If you have problems with Element, try [Fractal](https://gitlab.gnome.org/World/fractal).
|
||||
### <a name="easy-targets"> Low-Hanging Fruit - Easy Targets for Newbies </a>
|
||||
|
||||
- Join the [Join Requests](https://matrix.to/#/#redox-join:matrix.org) room and send a message requesting for an invite to the Redox Matrix space (the purpose of this is to avoid spam and bots).
|
||||
- #redox-join:matrix.org (Use this Matrix room address if you don't want to use the external Matrix link)
|
||||
#### If you're not fluent in Rust:
|
||||
|
||||
(We recommend that you leave the "Join Requests" room after your entry on Redox space)
|
||||
* Writing _documentation_
|
||||
* **Using/testing Redox**, filing issues for bugs and needed features
|
||||
* **Web development** ([Redox website, separate repo](https://gitlab.redox-os.org/redox-os/website))
|
||||
* **Writing unit tests** (may require minimal knowledge of rust)
|
||||
|
||||
If you want to have a big discussion in our rooms, you should use a Element thread, it's more organized and easy to keep track if more discussions happen on the same room.
|
||||
#### If you are fluent in Rust, but not OS Development:
|
||||
|
||||
You cand find more information on the [Chat](https://doc.redox-os.org/book/chat.html) page.
|
||||
* **Apps** development
|
||||
* **Shell** ([Ion](https://gitlab.redox-os.org/redox-os/ion)) development
|
||||
* **Package management** ([pkgutils](https://gitlab.redox-os.org/redox-os/pkgutils)) development
|
||||
* Other high-level code tasks
|
||||
|
||||
### [Discord](https://discord.gg/JfggvrHGDY)
|
||||
#### If you are fluent in Rust, and have experience with OS Dev:
|
||||
|
||||
We have a Discord server as an alternative for Matrix, open the #join-requests channel and send a message requesting to be a member (the purpose of this is to avoid spam and bots)
|
||||
* Familiarize yourself with the repository and codebase
|
||||
* Grep for `TODO`, `FIXME`, `BUG`, `UNOPTIMIZED`, `REWRITEME`, `DOCME`, and `PRETTYFYME` and fix the code you find.
|
||||
* **Improve and optimize code, especially in the kernel**
|
||||
|
||||
The Matrix messages are sent to Discord and vice-versa using a bot, but sometimes some Discord messages aren't sent to Matrix (if this happens to you join in our Matrix space above)
|
||||
### <a name="creating-a-pr"> Creating a Pull Request </a>
|
||||
|
||||
## [GitLab](https://gitlab.redox-os.org/redox-os/redox)
|
||||
**1**. _**Fork**_ the repository
|
||||
|
||||
A slightly more formal way of communication with fellow Redox developers, but a little less quick and convenient like the chat. Submit an issue when you run into problems compiling or testing. Issues can also be used if you would like to discuss a certain topic: be it features, code style, code inconsistencies, minor changes and fixes, etc.
|
||||
**2**. Clone the _original repository_ to your local PC using one of the following commands based on the protocol you are using:
|
||||
* HTTPS:`git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive`
|
||||
* SSH:`git clone git@gitlab.redox-os.org:redox-os/redox.git --origin upstream --recursive`
|
||||
* Then rebase: `git rebase upstream master`
|
||||
If you use HTTPS, you will have to log in each time when pushing to your fork. (Recommended: learn about git SSH support, it logs in automatically using SSH keys)
|
||||
|
||||
**3**. **Add** your fork with
|
||||
* HTTPS:`git remote add origin https://gitlab.redox-os.org/your-username/redox.git`
|
||||
* SSH:`git remote add origin git@gitlab.redox-os.org:your-username/redox.git`
|
||||
|
||||
**4**. Alternatively, if you already have a fork and copy of the repo, you can simply check to **make sure you're up-to-date**
|
||||
* Pull the upstream:`git pull upstream --rebase`
|
||||
* Update the submodules:`git submodule update --recursive --init`
|
||||
|
||||
**5**. Create a _**separate branch**_ (recommended if you're making multiple changes simultaneously) (`git checkout -b my-branch`)
|
||||
|
||||
If you want to create an account, read the [Signing in to GitLab](https://doc.redox-os.org/book/signing-in-to-gitlab.html) page.
|
||||
**6**. _Make changes_
|
||||
|
||||
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).
|
||||
**7**. **Commit** (`git add <item(s) you changed>; git commit`) and write your commit message
|
||||
|
||||
By doing this you help us to pay attention to your issues and avoid them to be accidentally forgotten.
|
||||
**8**. Optionally run [rustfmt](https://github.com/rust-lang-nursery/rustfmt) on the _files you changed_ and commit again if it did anything (check with `git diff` first)
|
||||
|
||||
If you have ready MRs (merge requests) you must send the links in the [MRs](https://matrix.to/#/#redox-mrs:matrix.org) room. To join this room, you will need to request an invite in the [Join Requests](https://matrix.to/#/#redox-join:matrix.org) room.
|
||||
**9**. Test your changes by **cleaning** (`make clean; git clean -Xfd`) and **building** with `make qemu` (you might have to use `make qemu kvm=no`) or `make virtualbox`.
|
||||
(see [Best Practices and Guidelines](#best-practices))
|
||||
|
||||
By sending a message in the room, your MR will not be forgotten or accumulate conflicts.
|
||||
**10**. _**Pull**_ from upstream (`git pull upstream --rebase`) (Note: Make sure to include `--rebase`, as it will apply your changes on top of the changes you just pulled, allowing for a much cleaner merge)
|
||||
|
||||
## Best Practices and Guidelines
|
||||
**11**. Repeat step **9** to make sure the rebase still builds and starts
|
||||
|
||||
You can read the best practices and guidelines on the [Best practices and guidelines](https://doc.redox-os.org/book/best-practices.html) chapter.
|
||||
**12**. Push to **your fork** (`git push origin <branch>`), `<branch>` being the branch you created earlier
|
||||
|
||||
## Notes
|
||||
**13**. Create a _pull request_
|
||||
|
||||
This section has important details to not waste your and our time with unnecessary questions.
|
||||
**14**. If your changes are _minor_, you can just describe them in a paragraph or less. If they're _major_, please fill out the provided form.
|
||||
|
||||
- We don't accept Git pushs using SSH to protect against AI scrappers and bots, you need to use [HTTPS with your PAT](https://doc.redox-os.org/book/signing-in-to-gitlab.html#setting-up-pat) in our GitLab server
|
||||
- For complete or advanced development you need the [Redox build system](https://doc.redox-os.org/book/podman-build.html) instead of Redoxer
|
||||
- If you want to work on individual repositories without the Redox build system you need to use [Redoxer](https://gitlab.redox-os.org/redox-os/redoxer) because our toolchain is not fully upstreamed yet
|
||||
**15. Submit!**
|
||||
|
||||
## Development Recommendations and Tips
|
||||
## <a name="best-practices"> Best Practices and Guidelines </a>
|
||||
|
||||
- Copy-paste prevent and reduce typos
|
||||
- Comment out configuration or code while testing is better than removal, to remember the testing conditions and prevent mistakes from forgotten logic
|
||||
- Read the entire [Build System Reference](https://doc.redox-os.org/book/build-system-reference.html) and [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html) pages
|
||||
- Make sure your build system is up-to-date, read the [Update The Build System](https://doc.redox-os.org/book/build-system-reference.html#update-the-build-system) section if in doubt.
|
||||
- If you want to make local changes in recipe sources it's recommended to automatic recipe source update, read [this](https://doc.redox-os.org/book/configuration-settings.html#local-recipe-changes) section to learn how to this for one or multiple recipes and [this](https://doc.redox-os.org/book/configuration-settings.html#cookbook-offline-mode) section for all recipes.
|
||||
- If you want to make changes to system components, drivers or RedoxFS you need to manually update initfs, read [this](https://doc.redox-os.org/book/coding-and-building.html#how-to-update-initfs) section to learn how to do that.
|
||||
- If some program can't build or work, something can be missing/hiding on [relibc](https://gitlab.redox-os.org/redox-os/relibc), like a POSIX/Linux function or bug.
|
||||
- If you have some error on QEMU remember to test different settings or verify your operating system (Pop_OS!, Ubuntu, Debian and Fedora are the recommend Linux distributions to do testing/development for Redox).
|
||||
- Remember to log all errors, you can use the following command as example:
|
||||
### <a name="general"> General </a>
|
||||
|
||||
```sh
|
||||
your-command 2>&1 | tee file-name.log
|
||||
```
|
||||
* **Remember to do a `git rebase -i upstream/master` before you send your patch!**
|
||||
* **Make sure your code is readable, commented, and well-documented.**
|
||||
* **Don't hesitate to ask for help, comments or suggestions!**
|
||||
* **Before implementing something, discuss it! Open an issue, or ask in the chat.**
|
||||
|
||||
- If you have a problem that seems to not have a solution, think on simple/stupid things. Sometimes you are very confident on your method and forget obvious things (very common).
|
||||
- If you want a quick review of your Merge Request, make it small.
|
||||
- If your big Merge Request is taking too long to be reviewed and merged try to split it in small MRs. But make sure it don't break anything, if this method break your changes, don't shrink.
|
||||
##### On the more technical side:
|
||||
* Test, test, and test!
|
||||
* Follow the style conventions (See [rust style guidelines](#rust-style-guidelines))
|
||||
* Use `std::mem::replace` and `std::mem::swap` when you can.
|
||||
* `libredox` should be 1-to-1 with the official `libstd`.
|
||||
* Prefer `.into()` and `.to_owned()` over `.to_string()`.
|
||||
* Prefer passing references to the data over owned data. (Don't take `String`, take `&str`. Don't take `Vec<T>` take `&[T]`).
|
||||
* Use generics, traits, and other abstractions Rust provides.
|
||||
* Avoid using lossy conversions (for example: don't do `my_u32 as u16 == my_u16`, prefer `my_u32 == my_u16 as u32`).
|
||||
* Prefer in place (`box` keyword) when doing heap allocations.
|
||||
* Prefer platform independently sized integer over pointer sized integer (`u32` over `usize`, for example).
|
||||
* Follow the usual idioms of programming, such as "composition over inheritance", "let your program be divided in smaller pieces", and "resource acquisition is initialization".
|
||||
* When `unsafe` is unnecessary, don't use it. **Longer safe code is better than shorter unsafe code!**
|
||||
* Be sure to mark parts that need work with `TODO`, `FIXME`, `BUG`, `UNOPTIMIZED`, `REWRITEME`, `DOCME`, and `PRETTYFYME`. Always elaborate on these messages, too. Nothing is more annoying than seeing a `TODO` and not knowing how to actually fix it.
|
||||
* Use the compiler hint attributes, such as `#[inline]`, `#[cold]`, etc. when it makes sense to do so.
|
||||
* Check the [chat](#chat), [the website](http://redox-os.org/news), and [the Rust subreddit](https://www.reddit.com/r/rust) frequently.
|
||||
|
||||
## Style Guidelines
|
||||
### <a name="kernel"> Kernel </a>
|
||||
|
||||
### Rust
|
||||
* When trying to access a slice, **always** use the `common::GetSlice` trait and the `.get_slice()` method to get a slice without causing the kernel to panic.
|
||||
The problem with slicing in regular Rust, e.g. `foo[a..b]`, is that if someone tries to access with a range that is out of bounds of an array/string/slice, it will cause a panic at runtime, as a safety measure. Same thing when accessing an element.
|
||||
Always use `foo.get(n)` instead of `foo[n]` and try to cover for the possibility of `Option::None`. Doing the regular way may work fine for applications, but never in the kernel. No possible panics should ever exist in kernel space, because then the whole OS would just stop working.
|
||||
|
||||
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.
|
||||
### <a name="testing-practices"> Testing Practices </a>
|
||||
|
||||
### Git
|
||||
* It's always better to test boot (`make qemu` or `make virtualbox`) every time you make a change, because it is important to see how the OS boots and works after it compiles.
|
||||
Even though Rust is a safety-oriented language, something as unstable and low-level as an in-dev operating system will almost certainly have problems in many cases and may completely break on even the slightest critical change.
|
||||
Also, make sure you check how the unmodified version runs on your machine before making any changes. Else, you won't have anything to compare to, and it will generally just lead to confusion. TLDR: Rebuild and test boot often.
|
||||
|
||||
Please follow our [Git style](https://doc.redox-os.org/book/creating-proper-pull-requests.html) for pull requests.
|
||||
* To run the **ZFS** tests:
|
||||
* Create the zfs.img only once. If one has not been created, run `make filesystem/apps/zfs/zfs.img` before booting into Redox.
|
||||
* Run `open zfs.img` to open the created ZFS image.
|
||||
* Run `file /home/LICENSE.md` twice to ensure ARC isn't broken.
|
||||
|
||||
## GitLab
|
||||
## <a name="style-guidelines"> Style Guidelines </a>
|
||||
|
||||
### Identity
|
||||
### <a name="rust-style-guidelines"> Rust </a>
|
||||
|
||||
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.
|
||||
Since **Rust** is a relatively small and new language compared to others like _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.
|
||||
|
||||
### Issues
|
||||
### <a name="git-style-guidelines"> Git </a>
|
||||
|
||||
We use issues to organize and track our current and pending work, to know how to create issues on the Redox GitLab read the [Filing Issues](https://doc.redox-os.org/book/filing-issues.html) page.
|
||||
* You should have a fork of the repository on **GitHub** and a local copy on your computer. The local copy should have two remotes; `upstream` and `origin`, `upstream` should be set to the main repository and `origin` should be your fork.
|
||||
* When you start to make changes, you will want to create a separate branch, and keep the `master` branch of your fork identical to the main repository, so that you can compare your changes with the main branch and test out a more stable build if you need to.
|
||||
* Usually, when syncing your local copy with the master branch, you'll want to rebase instead of merge. This is because it will create duplicate commits that don't actually do anything when merged into the master branch. You can do this in one command with `git pull upstream --rebase`. This will pull from the upstream, then roll back to the current state of the upstream, and "replay" your changes on top of it. Make sure you commit before doing this, though. Git won't be able to rebase if you don't.
|
||||
* Prefer to omit the `-m` when using `git commit`. This opens your editor and should help get you in the habit of writing longer commit messages.
|
||||
* Commit messages should describe their changes in present tense, e.g. "`Add stuff to file.ext`" instead of "`added stuff to file.ext`". This makes sense as sometimes when you revert back, then run through commits one-by-one, you want to see what a commit will do, instead of just what the person did when they made the commit. It's also just being consistent.
|
||||
* Try to remove useless duplicate/merge commits from PRs as these don't do anything except clutter up history and make it harder to read.
|
||||
|
||||
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).
|
||||
## <a name="other"> Other Ways to Contribute </a>
|
||||
|
||||
By doing this you help us to pay attention to your issues and avoid them to be accidentally forgotten.
|
||||
If you're not big on coding, but you still want to help keep the project going, you can still contribute/support in a variety of ways! We'll try to find a way to use anything you have to offer.
|
||||
|
||||
You can see all issues on [this](https://gitlab.redox-os.org/groups/redox-os/-/issues) link.
|
||||
### <a name="design"> Design </a>
|
||||
|
||||
### Pull Requests
|
||||
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_. More information to come on this in the future, for now just join [the chat](#chat) and ask about graphic design.
|
||||
|
||||
Please follow [our process](https://doc.redox-os.org/book/creating-proper-pull-requests.html) for creating proper pull requests.
|
||||
### <a name="patreon"> Patreon </a>
|
||||
|
||||
## Important Places to Contribute
|
||||
Our **BDFL**, [jackpot51](https://gitlab.redox-os.org/jackpot51), has a [Patreon campaign](https://www.patreon.com/redox_os)! **All money received will go towards Redox OS development**. If you donate, you will be listed in the **Redox credits** as one of the people that made Redox OS possible. You'll also get other rewards the more you donate. However, please don't donate if you can't afford it.
|
||||
|
||||
Before starting to contribute, we recommend reading the [General FAQ](https://www.redox-os.org/faq/) and the [Redox Book](https://doc.redox-os.org/book/).
|
||||
<!--
|
||||
|
||||
You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest-to-hardest order):
|
||||
POSSIBLE OTHER TOPICS TO INCLUDE
|
||||
- Merch (maybe in the future)
|
||||
- Sound Design (things like notifications, popups, etc. for orbital)
|
||||
- Video Production/Motion Graphics (tutorials, introduction videos, etc.)
|
||||
- Non-Rust programming, scripting, etc. (if we even have a need for this)
|
||||
- Hosting/download/git mirrors (this is not needed right now, but when downloads increase it may be necessary)
|
||||
|
||||
- [Website](https://gitlab.redox-os.org/redox-os/website)
|
||||
- [Book](https://gitlab.redox-os.org/redox-os/book) - High-level documentation
|
||||
- [Build System Configuration](https://gitlab.redox-os.org/redox-os/redox) - Our main repository
|
||||
- [Orbital](https://gitlab.redox-os.org/redox-os/orbital) - Display Server and Window Manager
|
||||
- [pkgutils](https://gitlab.redox-os.org/redox-os/pkgutils) - Package Manager
|
||||
- [acid](https://gitlab.redox-os.org/redox-os/acid) - Redox Test Suite
|
||||
- [relibc](https://gitlab.redox-os.org/redox-os/relibc) - Redox C Library
|
||||
- [libredox](https://gitlab.redox-os.org/redox-os/libredox) - Redox System Library
|
||||
- [Bootloader](https://gitlab.redox-os.org/redox-os/bootloader)
|
||||
- [RedoxFS](https://gitlab.redox-os.org/redox-os/redoxfs) - Default filesystem
|
||||
- [Base](https://gitlab.redox-os.org/redox-os/base) - Essential system components and drivers
|
||||
- [Kernel](https://gitlab.redox-os.org/redox-os/kernel)
|
||||
-->
|
||||
|
||||
To see all Redox repositories open the [redox-os group](https://gitlab.redox-os.org/redox-os).
|
||||
|
||||
### Skill Levels
|
||||
|
||||
If you don't know programming:
|
||||
|
||||
- Test the [daily images](https://static.redox-os.org/img/) on your computer and add the report on the [Hardware Compatibility](https://gitlab.redox-os.org/redox-os/redox/-/blob/master/HARDWARE.md) list
|
||||
- Monitor and warn developers if the [daily images](https://static.redox-os.org/img/) are outdated
|
||||
- Use/test Redox and create issues for bugs or needed features (please check for duplicates first)
|
||||
- Fix and write documentation
|
||||
- Find or fix typos in configuration
|
||||
|
||||
If you don't know how to code in Rust but know other programming languages:
|
||||
|
||||
- Web development on the website (we only accept minimal JavaScript code to preserve performance)
|
||||
- Write unit tests (may require minimal knowledge of Rust)
|
||||
- Port C/C++ programs to Redox (read the `TODO`s of the recipes on the [WIP category](https://gitlab.redox-os.org/redox-os/redox/-/tree/master/recipes/wip))
|
||||
- Port programs to Redox
|
||||
|
||||
If you know how to code in Rust but don't know operating system development:
|
||||
|
||||
- See the [easy](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=easy) issues
|
||||
- See the "[good first issue](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=good%20first%20issue)" issues
|
||||
- See the [help wanted](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=help%20wanted) issues (it's worth noting the skill level varies between projects, but a large subset of these should be approachable by contributors familiar with regular Rust/Unix application programming)
|
||||
- Improve the package manager, or build system tooling like `redoxer` or `installer`
|
||||
- Improve the [Ion](https://gitlab.redox-os.org/redox-os/ion) shell, or other high-level or mid-level projects
|
||||
- Port Rust programs (also look for issues with the `port` label)
|
||||
- Improve application compatibility in relibc by e.g. implementing missing POSIX/Linux functions
|
||||
|
||||
If you know how to code in Rust, and have experience with systems software/OS development:
|
||||
|
||||
- Familiarize yourself with the repository layout, code, and build system
|
||||
- Update old code to remove warnings
|
||||
- Search for `TODO`, `FIXME`, `BUG`, `UNOPTIMIZED`, `REWRITEME`, `DOCME`, and `PRETTYFYME` and fix the code you find
|
||||
- Look in general for issues with the following labels: `critical`, `help wanted`, `feature`, `enhancement`, `bug` or `port`
|
||||
- Improve internal libraries and abstractions, e.g. `libredox`, `redox-scheme`, `redox-event` etc.
|
||||
- Help upstream Redox-specific functionality to the Rust ecosystem
|
||||
- Improve Redox's automated testing suite and continuous integration testing processes
|
||||
- Improve, profile, and optimize code, especially in the kernel, filesystem, and network stack
|
||||
- Improve or write device drivers
|
||||
|
||||
For those who want to contribute to the Redox GUI, our GUI strategy has changed.
|
||||
|
||||
- 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).
|
||||
- OrbTk is in maintenance mode, and its developers have moved to other projects such as the ones below. There is currently no Redox-specific GUI development underway.
|
||||
|
||||
## Priorities
|
||||
|
||||
You can use the following GitLab issue label filters to know our development priorities on the moment:
|
||||
|
||||
- [Critical](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=critical)
|
||||
- [High-priority](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=high-priority)
|
||||
- [Medium-priority](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=medium-priority)
|
||||
- [Low-priority](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=low-priority)
|
||||
|
||||
## Roadmap
|
||||
|
||||
We use tracking issues for the goals in our roadmap, you can see them in the filter below:
|
||||
|
||||
- [Tracking issues](https://gitlab.redox-os.org/groups/redox-os/-/issues/?label_name[]=tracking%20issue)
|
||||
|
||||
## RFCs
|
||||
|
||||
For more significant changes that affect Redox's architecture, we use the [Request for Comments](https://gitlab.redox-os.org/redox-os/rfcs) repository.
|
||||
|
||||
## Build System
|
||||
|
||||
To download the build system use the following commands:
|
||||
|
||||
(You need to have [curl](https://curl.se/) installed on your system)
|
||||
|
||||
```sh
|
||||
curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/podman_bootstrap.sh -o podman_bootstrap.sh
|
||||
```
|
||||
|
||||
```sh
|
||||
time bash -e podman_bootstrap.sh
|
||||
```
|
||||
|
||||
To start the compilation of the default recipes run the command below:
|
||||
|
||||
```sh
|
||||
make all
|
||||
```
|
||||
|
||||
In case your operating system does not use SELinux, you must set the `USE_SELINUX` to `0` when calling `make all`, otherwise you might experience errors:
|
||||
|
||||
```sh
|
||||
make all USE_SELINUX=0
|
||||
```
|
||||
|
||||
You can find the build system organization and commands on the [Build System](https://doc.redox-os.org/book/build-system-reference.html) page.
|
||||
|
||||
## Developer FAQ
|
||||
|
||||
You can see the most common questions and problems on the [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html) page.
|
||||
|
||||
## Porting Software
|
||||
|
||||
You can read how to use the Cookbook recipe system to port applications on the [Application Porting](https://doc.redox-os.org/book/porting-applications.html) page.
|
||||
|
||||
**Always verify if a recipe for your program or library already exist before porting to not break the build system with a recipe duplication or waste time.**
|
||||
|
||||
## Libraries and APIs
|
||||
|
||||
You can read the [Libraries and APIs](https://doc.redox-os.org/book/libraries-apis.html) page to learn about the libraries and APIs used in Redox.
|
||||
|
||||
## Visual Studio Code (VS Code) Configuration
|
||||
|
||||
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.
|
||||
|
||||
## References
|
||||
|
||||
We maintain a list of wikis, articles and videos to learn Rust, OS development and computer science on the [References](https://doc.redox-os.org/book/references.html) page.
|
||||
|
||||
If you are skilled/experienced there's still a possibility that they could improve your knowledge in some way.
|
||||
|
||||
## Other Ways to Contribute
|
||||
|
||||
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.
|
||||
|
||||
### Design
|
||||
|
||||
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.
|
||||
|
||||
- [Redox backgrounds](https://gitlab.redox-os.org/redox-os/backgrounds) - You can send your wallpapers on this repository.
|
||||
- [Redox assets](https://gitlab.redox-os.org/redox-os/assets) - You can send your logos, icons and themes on this repository.
|
||||
|
||||
If you have questions about the graphic design, ask us on the [Chat](https://doc.redox-os.org/book/chat.html).
|
||||
|
||||
### Donate to Redox
|
||||
|
||||
If you are interested in donating to the Redox OS Nonprofit, you can find instructions on the [Donate](https://www.redox-os.org/donate/) page.
|
||||
|
||||
1490
Cargo.lock
generated
1490
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
57
Cargo.toml
57
Cargo.toml
@ -1,57 +0,0 @@
|
||||
[package]
|
||||
name = "redox_cookbook"
|
||||
version = "0.1.0"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
edition = "2024"
|
||||
default-run = "repo"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[[bin]]
|
||||
name = "cookbook_redoxer"
|
||||
path = "src/bin/cookbook_redoxer.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "repo"
|
||||
path = "src/bin/repo.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "repo_builder"
|
||||
path = "src/bin/repo_builder.rs"
|
||||
|
||||
[lib]
|
||||
name = "cookbook"
|
||||
path = "src/lib.rs"
|
||||
doctest = false
|
||||
|
||||
[features]
|
||||
#TODO: Actually make without tui feature works
|
||||
default = ["tui"]
|
||||
tui = ["ratatui", "ansi-to-tui", "strip-ansi-escapes"]
|
||||
|
||||
[dependencies]
|
||||
blake3 = "1"
|
||||
globset = "0.4"
|
||||
libc = "0.2"
|
||||
ignore = "0.4"
|
||||
object = { version = "0.38", features = ["build_core"] }
|
||||
pkgar = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" }
|
||||
pkgar-core = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" }
|
||||
pkgar-keys = { git = "https://gitlab.redox-os.org/redox-os/pkgar.git" }
|
||||
redox-pkg = { git = "https://gitlab.redox-os.org/redox-os/pkgutils.git", default-features = false }
|
||||
redox_installer = { git = "https://gitlab.redox-os.org/redox-os/installer.git", default-features = false }
|
||||
redoxer = { git = "https://gitlab.redox-os.org/redox-os/redoxer.git", default-features = false }
|
||||
regex = "1.11"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
termion = "4"
|
||||
toml = "0.8"
|
||||
walkdir = "2.3.1"
|
||||
ansi-to-tui = { version = "8", optional = true }
|
||||
strip-ansi-escapes = { version = "0.2.1", optional = true }
|
||||
serde_json = "1"
|
||||
|
||||
[dependencies.ratatui]
|
||||
version = "0.30"
|
||||
default-features = false
|
||||
features = ["termion"]
|
||||
optional = true
|
||||
136
HARDWARE.md
136
HARDWARE.md
@ -1,136 +0,0 @@
|
||||
# Hardware Compatibility
|
||||
|
||||
This document tracks the current hardware compatibility of Redox OS.
|
||||
|
||||
- [Why are hardware reports needed?](#why-are-hardware-reports-needed)
|
||||
- [What if my computer is customized?](#what-if-my-computer-is-customized)
|
||||
- [Status](#status)
|
||||
- [Contribute to this document](#contribute-to-this-document)
|
||||
- [Template](#template)
|
||||
- [Table row ordering](#table-row-ordering)
|
||||
- [Recommended](#recommended)
|
||||
- [Booting](#booting)
|
||||
- [Broken](#broken)
|
||||
|
||||
## Why are hardware reports needed?
|
||||
|
||||
Each computer model has different hardware interfaces, firmware implementations, and devices, which can cause the following problems:
|
||||
|
||||
- Boot bugs
|
||||
- Lack of device support
|
||||
- Performance degradation
|
||||
|
||||
These reports helps us to fix the problems above, your report may help to fix many computers affected by the same bugs or missing drivers.
|
||||
|
||||
## What if my computer is customized?
|
||||
|
||||
If your desktop is customized (common) you should use the "Custom" word on the "Vendor" category and insert the motherboard and CPU vendor/model in the "Model" category.
|
||||
|
||||
A customized laptop should only be reported if you replaced the original CPU, report the CPU vendor and model in the "Model" category.
|
||||
|
||||
We also recommend to add your `pciutils` log as a comment on [this](https://gitlab.redox-os.org/redox-os/redox/-/issues/1797) tracking issue to help us with probable device porting.
|
||||
|
||||
## Status
|
||||
|
||||
The following limitations apply to any status.
|
||||
|
||||
- ACPI support is incomplete (some things are hardcoded in the kernel to work)
|
||||
- Wi-Fi and Bluetooth aren't supported yet
|
||||
- Only Intel GPUs are supported, other GPU vendors use BIOS VESA or UEFI GOP
|
||||
- I2C devices aren't supported yet (PS/2 or USB devices should be used)
|
||||
- USB support varies on each device model because some USB devices require specific drivers (use input devices with standardized controls for more compatibility)
|
||||
- Automatic operating system discovery is not implemented in the boot loader yet (remember this before installing Redox)
|
||||
|
||||
### Recommended
|
||||
|
||||
This status is used when the operating system boots with video, sound, PS/2 or USB input, Ethernet, terminal and Orbital working.
|
||||
|
||||
### Booting
|
||||
|
||||
This status is used when the operating system successfully boot with some issues or lacking hardware support (write the issues and what supported hardware is not working in the "Report" section).
|
||||
|
||||
### Broken
|
||||
|
||||
This status is used when the boot loader or system boot doesn't work.
|
||||
|
||||
## Contribute to this document
|
||||
|
||||
To contribute to this document, learn how to create your GitLab account, follow the project-wide contribution guidelines and suggestions, please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) document.
|
||||
|
||||
### Template
|
||||
|
||||
You will use this template to insert your computer on the table.
|
||||
|
||||
```
|
||||
| | | | | | | | |
|
||||
```
|
||||
|
||||
The Redox image date should use the [ISO format](https://en.wikipedia.org/wiki/ISO_8601)
|
||||
|
||||
### Table row ordering
|
||||
|
||||
New reports should use an independent alphabetical order in the "Vendor" and "Model" table rows, for example:
|
||||
|
||||
```
|
||||
| ASUS | ROG g55vw |
|
||||
| ASUS | X554L |
|
||||
| System76 | Galago Pro (galp5) |
|
||||
| System76 | Lemur Pro (lemp9) |
|
||||
```
|
||||
|
||||
A comes before S, R comes before X, G comes before L
|
||||
|
||||
Each "Vendor" has its own alphabetical order in "Model", independent from models from other vendor.
|
||||
|
||||
## Recommended
|
||||
|
||||
| **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
|
||||
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
|
||||
| Lenovo | IdeaPad Y510P | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital |
|
||||
| System76 | Galago Pro (galp5) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital |
|
||||
| System76 | Lemur Pro (lemp9) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital |
|
||||
|
||||
## Booting
|
||||
|
||||
| **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
|
||||
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
|
||||
| ASUS | Eee PC 900 | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Boots to Orbital, No ethernet driver, Correct video mode not offered (firmware issue) |
|
||||
| ASUS | PRIME B350M-E (custom) | 0.9.0 | 2024-09-20 | desktop | x86-64 | UEFI | Partial support for the PS/2 keyboard, PS/2 mouse is broken |
|
||||
| ASUS | ROG g55vw | 0.8.0 | 2023-11-11 | desktop | x86-64 | BIOS | Boots to Orbital, UEFI panic in SETUP |
|
||||
| ASUS | X554L | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS | Boots to Orbital, No audio, HDA driver cannot find output pins |
|
||||
| ASUS | Vivobook 15 OLED (M1503Q) | 0.9.0 | 2025-08-04 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb do not work, cannot connect to the internet, right maximum display resolution 2880x1620 |
|
||||
| Dell | XPS 13 (9350) | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Boots to Orbital, NVMe driver livelocks |
|
||||
| Dell | XPS 13 (9350) | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital, NVMe driver livelocks |
|
||||
| Dell | XPS L502X | 0.9.0 | 2026-05-01 | desktop | x86-64 | BIOS | Does not find the bootloader without patching the partition type byte to FAT32 (LBA), Boots to orbital with the patch in live mode, The entire system freezes after the orblogin screen appears unless recompiling the kernel without ACPI support, almost everything works out of box when using the kernel without ACPI, except the touchpad scrolling, WiFi and Intel graphics |
|
||||
| HP | Dev One | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
|
||||
| HP | EliteBook Folio 9480M | 0.9.0 | 2025-11-04 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb work, cannot connect to the Internet, install failed, right maximum display resolution 1600x900
|
||||
| Lenovo | Thinkbook 14 Gen 2 ARE (AMD Ryzen Edition) Laptop | 0.9.0 | 2026-05-02 | desktop | x86-64 | UEFI | Boots to Orbital, but trackpad and USB mouse doesn't work so unable to test further |
|
||||
| Lenovo | ThinkPad Yoga 260 Laptop - Type 20FE | 0.9.0 | 2024-09-07 | demo | x86-64 | UEFI | Boots to Orbital, No audio |
|
||||
| Lenovo | Yoga S730-13IWL | 0.9.0 | 2024-11-09 | desktop | x86-64 | UEFI | Boots to Orbital, No trackpad or USB mouse input support |
|
||||
| Lenovo | Ideapad 710S-13IKB | 0.9.0 | 2026-02-12 | demo | x86-64 | UEFI | Boots to Orbital, No trackpad or USB mouse input support |
|
||||
| Raspberry Pi | 3 Model B+ | 0.8.0 | Unknown | server | ARM64 | U-Boot | Boots to UART serial console (pl011) |
|
||||
| Samsung | Series 3 (NP350V5C) | 0.9.0 | 2025-08-04 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad works, USB does not work, can connect to the Internet through LAN. Wrong maximum display resolution 1024x768 |
|
||||
| System76 | Oryx Pro (oryp10) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, though it should be working |
|
||||
| System76 | Pangolin (pang12) | 0.8.0 | 2022-11-11 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
|
||||
| Toshiba | Satellite L500 | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS | Boots to Orbital, No Ethernet driver, Correct video mode not offered (firmware issue) |
|
||||
|
||||
## Broken
|
||||
|
||||
| **Vendor** | **Model** | **Redox Version** | **Image Date** | **Variant** | **CPU Architecture** | **Motherboard Firmware** | **Report** |
|
||||
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
|
||||
| Apple | Mac Mini (Late 2012, Quad Core) | 0.9.0 | 2026-05-02 | desktop | x86-64 | EFI | Hangs after selecting boot device from boot menu, EFI 1.1 incompatibility? |
|
||||
| ASUS | PN41 | 0.8.0 | 2024-05-30 | server | x86-64 | Unknown | Aborts after panic in xhcid |
|
||||
| Asrock (Custom) | X570 Phantom Gaming 4 (Ryzen 3600) | 2026-05-02 | desktop | x86-64 | UEFI | Not recognised as a UEFI boot disk, have to boot in CSM mode. Bootloader fails with a panic |
|
||||
| BEELINK | U59 | 0.8.0 | 2024-05-30 | server | x86-64 | Unknown | Aborts after panic in xhcid |
|
||||
| Framework | Laptop 16 (AMD Ryzen 7040 Series) | 0.9.0 | 2026-3-29 | desktop, demo | x86-64 | UEFI | Crash due to unimplemented acpi function, see [jackpot51/acpi #3](https://github.com/jackpot51/acpi/pull/3) on GitHub |
|
||||
| Dell | Latitude D600 | 0.9.0 | 2026-01-25 | desktop | i586 | BIOS | Some kernel messages displayed, then locks up |
|
||||
| HP | Compaq nc6120 | 0.9.0 | 2024-11-08 | desktop, server | i686 | BIOS | Unloads into memory at a rate slower than 1MB/s after selecting resolution. When unloading is complete the logger initializes and crashes after kernel::acpi, some information about APIC is printed. Boot logs do not progress after this point. |
|
||||
| HP | EliteBook 2570p | 0.8.0 | 2022-11-23 | demo | x86-64 | BIOS (CSM mode?) | Gets to resolution selection, Fails assert in `src/os/bios/mod.rs:77` after selecting resolution |
|
||||
| Lenovo | G570 | 0.8.0 | 2022-11-11 | desktop | x86-64 | BIOS | Bootloader panics in `alloc_zeroed_page_aligned`, Correct video mode not offered (firmware issue) |
|
||||
| Lenovo | IdeaPad Y510P | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
|
||||
| Lenovo | ThinkPad X1 20KH-002 | 0.9.0 | 2026-02-11 | server | x86-64 | UEFI | Boots once after build but not a second time, fails in ps2d |
|
||||
| Lenovo | ThinkCentre M83 | 0.9.0 | 2025-11-09 | desktop | x86_64 | UEFI | Presents user with a set of display resolution options. After user selects an option, it takes a long time for the "live" thing to load all the way to 647MiB. Once it does reach 647MiB, however, it dumps a bunch of logs onto the screen. Those logs also happen to be offset so that the leftmost portion of all text "exists" past the leftmost part of the screen, resulting in the logs being only partially visible. The logs appear to include (among other things) 1. "thread 'main' (1) panicked at acpid/src/acpi.rs:256:68: Called `Result::unwrap()` on an `Err` value: Aml(NoCurrentOp)"; 2. "thread 'main' (1) panicked at acpid/src/main.rs:147:39:acpid: failed to daemonize: Error `I/O error` 5"; 3. "... [@hwd:40 ERROR] failed to probe with error No such device (os error 19)..."; etc. |
|
||||
| Panasonic | Toughbook CF-18 | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Hangs after PIT initialization |
|
||||
| Toshiba | Satellite L500 | 0.8.0 | 2022-11-11 | desktop | i686 | BIOS | Correct video mode not offered (firmware issue), Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
|
||||
| Unbranded | VIA C3 CPU | 0.9.0 | 2026-01-25 | desktop | i586 | BIOS | Some kernel messages displayed, then locks up |
|
||||
| XMG (Schenker) | Apex 17 (M21) | 0.9.0 | 2024-09-30 | demo, server | x86-64 | UEFI | After selecting resolution, (release) repeats `...::interrupt::irq::ERROR -- Local apic internal error: ESR=0x40` a few times before it freezes; (daily) really slowly prints statements from `...::rmm::INFO` before it abruptly aborts |
|
||||
201
Makefile
201
Makefile
@ -1,152 +1,125 @@
|
||||
# This file contains the build system commands configuration
|
||||
# and environment variables
|
||||
# Configuration and variables
|
||||
include mk/config.mk
|
||||
|
||||
# Build system dependencies
|
||||
# Dependencies
|
||||
include mk/depends.mk
|
||||
|
||||
all: $(BUILD)/harddrive.img
|
||||
all: build/harddrive.bin
|
||||
|
||||
live:
|
||||
-$(FUMOUNT) $(BUILD)/filesystem/ || true
|
||||
-$(FUMOUNT) /tmp/redox_installer/ || true
|
||||
rm -f $(BUILD)/redox-live.iso
|
||||
$(MAKE) $(BUILD)/redox-live.iso
|
||||
coreboot: build/coreboot.elf
|
||||
|
||||
popsicle: $(BUILD)/redox-live.iso
|
||||
popsicle-gtk $(BUILD)/redox-live.iso
|
||||
live: build/livedisk.bin
|
||||
|
||||
image:
|
||||
-$(FUMOUNT) $(BUILD)/filesystem/ || true
|
||||
-$(FUMOUNT) /tmp/redox_installer/ || true
|
||||
rm -f $(BUILD)/harddrive.img $(BUILD)/redox-live.iso
|
||||
$(MAKE) all
|
||||
|
||||
rebuild:
|
||||
-$(FUMOUNT) $(BUILD)/filesystem/ || true
|
||||
-$(FUMOUNT) /tmp/redox_installer/ || true
|
||||
rm -rf $(BUILD)/repo.tag $(BUILD)/harddrive.img $(BUILD)/redox-live.iso
|
||||
$(MAKE) all
|
||||
|
||||
# To tell that it's not safe
|
||||
# to execute the cookbook binary
|
||||
NOT_ON_PODMAN?=0
|
||||
iso: build/livedisk.iso
|
||||
|
||||
clean:
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifneq ("$(wildcard $(CONTAINER_TAG))","")
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(info will not run cookbook clean as container is not built)
|
||||
$(MAKE) clean PODMAN_BUILD=0 NOT_ON_PODMAN=1 SKIP_CHECK_TOOLS=1
|
||||
endif # CONTAINER_TAG
|
||||
else
|
||||
ifneq ($(NOT_ON_PODMAN),1)
|
||||
$(MAKE) repo_clean
|
||||
-$(FUMOUNT) $(BUILD)/filesystem/ || true
|
||||
-$(FUMOUNT) /tmp/redox_installer/ || true
|
||||
endif # NOT_ON_PODMAN
|
||||
rm -rf repo
|
||||
rm -rf $(BUILD) $(PREFIX)
|
||||
$(MAKE) fstools_clean
|
||||
endif # PODMAN_BUILD
|
||||
cd cookbook && ./clean.sh
|
||||
cargo clean --manifest-path cookbook/pkgutils/Cargo.toml
|
||||
cargo clean --manifest-path installer/Cargo.toml
|
||||
cargo clean --manifest-path kernel/Cargo.toml
|
||||
cargo clean --manifest-path kernel/syscall/Cargo.toml
|
||||
cargo clean --manifest-path redoxfs/Cargo.toml
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
rm -rf build
|
||||
|
||||
distclean:
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifneq ("$(wildcard $(CONTAINER_TAG))","")
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(info will not run cookbook unfetch as container is not built)
|
||||
$(MAKE) distclean PODMAN_BUILD=0 NOT_ON_PODMAN=1 SKIP_CHECK_TOOLS=1
|
||||
endif # CONTAINER_TAG
|
||||
else
|
||||
ifneq ($(NOT_ON_PODMAN),1)
|
||||
$(MAKE) fetch_clean
|
||||
endif # NOT_ON_PODMAN
|
||||
$(MAKE) clean NOT_ON_PODMAN=1
|
||||
endif # PODMAN_BUILD
|
||||
$(MAKE) clean
|
||||
cd cookbook && ./unfetch.sh
|
||||
|
||||
pull:
|
||||
git pull
|
||||
rm -f $(FSTOOLS_TAG)
|
||||
git pull --recurse-submodules
|
||||
git submodule sync --recursive
|
||||
git submodule update --recursive --init
|
||||
|
||||
repo: $(BUILD)/repo.tag
|
||||
update:
|
||||
cd cookbook && ./update.sh \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../initfs.toml)" \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../filesystem.toml)"
|
||||
cargo update --manifest-path cookbook/pkgutils/Cargo.toml
|
||||
cargo update --manifest-path installer/Cargo.toml
|
||||
cargo update --manifest-path kernel/Cargo.toml
|
||||
cargo update --manifest-path redoxfs/Cargo.toml
|
||||
|
||||
repo_clean: c.--all
|
||||
|
||||
fetch_clean: u.--all
|
||||
|
||||
# Podman build recipes and vars
|
||||
include mk/podman.mk
|
||||
|
||||
# Disk Imaging and Cookbook tools
|
||||
include mk/fstools.mk
|
||||
fetch:
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
cd cookbook && ./fetch.sh \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../initfs.toml)" \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../filesystem.toml)"
|
||||
|
||||
# Cross compiler recipes
|
||||
include mk/prefix.mk
|
||||
|
||||
# Repository maintenance
|
||||
include mk/repo.mk
|
||||
# Kernel recipes
|
||||
include mk/kernel.mk
|
||||
|
||||
# Filesystem recipes
|
||||
include mk/initfs.mk
|
||||
include mk/filesystem.mk
|
||||
|
||||
# Disk images
|
||||
include mk/disk.mk
|
||||
|
||||
# Emulation recipes
|
||||
include mk/qemu.mk
|
||||
include mk/bochs.mk
|
||||
include mk/virtualbox.mk
|
||||
|
||||
# CI
|
||||
include mk/ci.mk
|
||||
# CI image target
|
||||
ci-img: FORCE
|
||||
$(MAKE) INSTALLER_FLAGS= \
|
||||
build/harddrive.bin.gz \
|
||||
build/livedisk.iso.gz \
|
||||
build/harddrive-efi.bin.gz \
|
||||
build/livedisk-efi.iso.gz
|
||||
rm -rf build/img
|
||||
mkdir -p build/img
|
||||
cp "build/harddrive.bin.gz" "build/img/redox_$(IMG_TAG)_harddrive.bin.gz"
|
||||
cp "build/livedisk.iso.gz" "build/img/redox_$(IMG_TAG)_livedisk.iso.gz"
|
||||
cp "build/harddrive-efi.bin.gz" "build/img/redox_$(IMG_TAG)_harddrive-efi.bin.gz"
|
||||
cp "build/livedisk-efi.iso.gz" "build/img/redox_$(IMG_TAG)_livedisk-efi.iso.gz"
|
||||
cd build/img && sha256sum -b * > SHA256SUM
|
||||
|
||||
env: prefix FORCE $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
# CI packaging target
|
||||
ci-pkg: prefix FORCE
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
PACKAGES="$$(cargo run --manifest-path installer/Cargo.toml -- --list-packages -c ci.toml)" && \
|
||||
cd cookbook && \
|
||||
./fetch.sh "$${PACKAGES}" && \
|
||||
./repo.sh "$${PACKAGES}"
|
||||
|
||||
# CI toolchain
|
||||
ci-toolchain: FORCE
|
||||
$(MAKE) PREFIX_BINARY=0 \
|
||||
"prefix/$(TARGET)/gcc-install.tar.gz" \
|
||||
"prefix/$(TARGET)/relibc-install.tar.gz" \
|
||||
"prefix/$(TARGET)/rust-install.tar.gz"
|
||||
rm -rf "build/toolchain/$(TARGET)"
|
||||
mkdir -p "build/toolchain/$(TARGET)"
|
||||
cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(TARGET)/gcc-install.tar.gz"
|
||||
cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(TARGET)/relibc-install.tar.gz"
|
||||
cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(TARGET)/rust-install.tar.gz"
|
||||
cd "build/toolchain/$(TARGET)" && sha256sum -b * > SHA256SUM
|
||||
|
||||
env: prefix FORCE
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
bash
|
||||
endif
|
||||
|
||||
setenv: FORCE
|
||||
@echo export ARCH='$(ARCH)'
|
||||
@echo export BOARD='$(BOARD)'
|
||||
@echo export CONFIG_NAME='$(CONFIG_NAME)'
|
||||
@echo BUILD='$(BUILD)'
|
||||
|
||||
export RUST_GDB=gdb-multiarch # Necessary when debugging for another architecture than the host
|
||||
GDB_KERNEL_FILE=recipes/core/kernel/target/$(TARGET)/build/kernel.sym
|
||||
gdb: FORCE
|
||||
rust-gdb $(GDB_KERNEL_FILE) --eval-command="target remote :1234"
|
||||
|
||||
# This target allows debugging a userspace application without requiring gdbserver running inside
|
||||
# the VM. Because gdb doesn't know when the userspace application is scheduled by the kernel and as
|
||||
# it stops the entire VM rather than just the userspace application that the user wants to debug,
|
||||
# connecting to a gdbserver running inside the VM is highly encouraged when possible. This target
|
||||
# should only be used when the application to debug runs early during boot before the network stack
|
||||
# has started or you need to debug the interaction between the application and the kernel.
|
||||
# tl;dr: DO NOT USE THIS TARGET UNLESS YOU HAVE TO
|
||||
gdb-userspace: FORCE
|
||||
rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE)" --eval-command="target remote :1234"
|
||||
gdb build/kernel.sym --eval-command="target remote localhost:1234"
|
||||
|
||||
# An empty target
|
||||
FORCE:
|
||||
|
||||
# Gzip any binary
|
||||
%.gz: %
|
||||
gzip -k -f $<
|
||||
|
||||
# Create a listing for any binary
|
||||
%.list: %
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(OBJDUMP) -C -M intel -D $< > $@
|
||||
|
||||
# Wireshark
|
||||
wireshark: FORCE
|
||||
wireshark $(BUILD)/network.pcap
|
||||
|
||||
KPROF_KERNEL_BINARY?=recipes/core/profiling-kernel/target/$(TARGET)/build/kernel
|
||||
KPROF_KERNEL_SYM?=build/flamegraph/$(TARGET)-kernel-syms.txt
|
||||
KPROF_OUTPUT_TXT?=build/$(ARCH)/$(CONFIG_NAME)/filesystem/home/root/kprof.txt
|
||||
KPROF_PERF_SVG?=build/flamegraph/$(TARGET)-$(CONFIG_NAME)-kflamegraph.svg
|
||||
# XXX: This assumes the TSC is invariant, that the value for cpu0 is the same as for all other CPUs, and that the value from ACPI actually reflects the TSC rate. It also only works on Linux.
|
||||
KPROF_CPU_GHZ?=$(shell (cat /sys/devices/system/cpu/cpu0/acpi_cppc/nominal_freq || echo 3400) | xargs echo "0.001 *" | bc)
|
||||
# See https://gitlab.redox-os.org/redox-os/kprofiling/-/blob/master/src/main.rs?ref_type=heads#L16-L18
|
||||
# Set e.g. to "xo" to show individual instruction offsets
|
||||
KPROF_OPTIONS?=_
|
||||
|
||||
flamegraph:
|
||||
mkdir -p build/flamegraph && \
|
||||
make mount && \
|
||||
nm -CS $(KPROF_KERNEL_BINARY) >$(KPROF_KERNEL_SYM) && \
|
||||
redox-kprofiling $(KPROF_OUTPUT_TXT) $(KPROF_KERNEL_SYM) $(KPROF_OPTIONS) $(KPROF_CPU_GHZ) | inferno-collapse-perf | inferno-flamegraph > $(KPROF_PERF_SVG) && \
|
||||
make unmount
|
||||
wireshark build/network.pcap
|
||||
|
||||
204
README.md
204
README.md
@ -2,61 +2,171 @@
|
||||
<img alt="Redox" width="346" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/logos/redox/logo.png">
|
||||
</p>
|
||||
|
||||
This repository is the **Build System** for Redox OS.
|
||||
**Redox** is an operating system written in Rust, a language with focus on safety and high performance. Redox, following the microkernel design, aims to be secure, usable, and free. Redox is inspired by previous kernels and operating systems, such as SeL4, MINIX, Plan 9, and BSD.
|
||||
|
||||
Redox is under active development by a vibrant community, you can see the key links below:
|
||||
Redox _is not_ just a kernel, it's a **full-featured Operating System**, providing packages (memory allocator, file system, display manager, core utilities, etc.) that together make up a functional and convenient operating system. You can loosely think of it as the GNU or BSD ecosystem, but in a memory safe language and with modern technology. See [this list](#ecosystem) for overview of the ecosystem.
|
||||
|
||||
- [The **main website** for Redox OS](https://www.redox-os.org).
|
||||
- [The Redox Book](https://doc.redox-os.org/book/) and [Build Instructions](https://doc.redox-os.org/book/podman-build.html).
|
||||
- [Redox Chat and Support](https://matrix.to/#/#redox-join:matrix.org).
|
||||
- [Patreon](https://www.patreon.com/redox_os), [Donate](https://redox-os.org/donate/) and [Merch](https://redox-os.creator-spring.com/).
|
||||
- Scroll down for a list of key Redox components and their repositories.
|
||||
The website can be found at https://www.redox-os.org.
|
||||
|
||||
[Redox](https://www.redox-os.org) is an open-source operating system written in Rust, a language with focus on safety, efficiency and high performance. Redox uses a microkernel architecture, and aims to be reliable, secure, usable, correct, and free. Redox is inspired by previous operating systems, such as seL4, MINIX, Plan 9, Linux and BSD.
|
||||
|
||||
Redox _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.
|
||||
Please make sure you use the **latest nightly** of `rustc` before building (for more troubleshooting, see ["Help! Redox won't compile!"](#compile-help)).
|
||||
|
||||
[](https://travis-ci.org/redox-os/redox)
|
||||
[](https://gitlab.redox-os.org/redox-os/redox/tags)
|
||||
[](./LICENSE)
|
||||

|
||||
|
||||
## More Links
|
||||
## Contents
|
||||
|
||||
- [Book](https://doc.redox-os.org/book/)
|
||||
- [Contribute](CONTRIBUTING.md)
|
||||
- [Hardware Compatibility](https://doc.redox-os.org/book/hardware-support.html)
|
||||
- Run Redox in a [Virtual Machine](https://doc.redox-os.org/book/running-vm.html) or on [Real Hardware](https://doc.redox-os.org/book/real-hardware.html)
|
||||
- [Trying Out Redox](https://doc.redox-os.org/book/trying-out-redox.html)
|
||||
- [Building Redox](https://doc.redox-os.org/book/podman-build.html)
|
||||
- [Build System Documentation](https://doc.redox-os.org/book/build-system-reference.html)
|
||||
- [Developer FAQ](https://doc.redox-os.org/book/developer-faq.html)
|
||||
- [Chat/Discussions/Help](https://doc.redox-os.org/book/chat.html)
|
||||
* [What it looks like](#screenshots)
|
||||
* [Ecosystem](#ecosystem)
|
||||
* [Help! Redox won't compile](#compile-help)
|
||||
* [Contributing to Redox](#contributing)
|
||||
* [Cloning, Building and running](#cloning-building-running)
|
||||
* [Quick Setup](#quick-setup)
|
||||
* [Manual Setup](#manual-setup)
|
||||
* [Setup Using Docker](#setup-using-docker)
|
||||
|
||||
## Ecosystem
|
||||
## <a name="screenshots"> What it looks like </a>
|
||||
|
||||
Some of the key repositories on the Redox GitLab:
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/screenshots/Senza%20titolo.jpeg">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/screenshots/redox running.jpeg">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/screenshots/IMG_1460.PNG">
|
||||
|
||||
| Essential Repositories | Maintainer
|
||||
|-------------------------------------------------------------------------------------------------------------|---------------------------
|
||||
| [Kernel](https://gitlab.redox-os.org/redox-os/kernel) | **@jackpot51**
|
||||
| [Base (essential system components and drivers)](https://gitlab.redox-os.org/redox-os/base) | **@jackpot51**
|
||||
| [RedoxFS (default filesystem)](https://gitlab.redox-os.org/redox-os/redoxfs) | **@jackpot51**
|
||||
| [relibc (C POSIX library written in Rust)](https://gitlab.redox-os.org/redox-os/relibc) | **@jackpot51**
|
||||
| [Ion (defauilt shell)](https://gitlab.redox-os.org/redox-os/ion) | **@jackpot51**
|
||||
| [Termion (terminal library)](https://gitlab.redox-os.org/redox-os/termion) | **@jackpot51**
|
||||
| [pkgutils (current package manager)](https://gitlab.redox-os.org/redox-os/pkgutils) | **@jackpot51**
|
||||
| [Orbital (display server and window manager)](https://gitlab.redox-os.org/redox-os/orbital) | **@jackpot51**
|
||||
| This repo - the root of the Build System | **@jackpot51** **@hatred_45**
|
||||
| [Redoxer (tool for easy Redox development on Linux)](https://gitlab.redox-os.org/redox-os/redoxer) | **@jackpot51**
|
||||
| [The Redox Book](https://gitlab.redox-os.org/redox-os/book) | **@jackpot51** **@hatred_45**
|
||||
| [Website](https://gitlab.redox-os.org/redox-os/website) | **@jackpot51** **@hatred_45**
|
||||
|
||||
## What it looks like
|
||||
|
||||
See [Redox in Action](https://www.redox-os.org/screens/) for photos and videos.
|
||||
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/website/-/raw/master/static/img/screenshot/orbital-visual.png">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/website/-/raw/master/static/img/screenshot/cosmic-programs.png">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/website/-/raw/master/static/img/screenshot/cosmic-term-screenfetch.png">
|
||||
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/website/-/raw/master/static/img/screenshot/cosmic-edit-redox.png">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/website/-/raw/master/static/img/screenshot/image-viewer.png">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/screenshots/Sodium_v2.PNG">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/screenshots/Boot.png">
|
||||
<img alt="Redox" height="150" src="https://gitlab.redox-os.org/redox-os/assets/raw/master/screenshots/IMG_1459.PNG">
|
||||
|
||||
## <a name="ecosystem"> Ecosystem </a>
|
||||
|
||||
The ecosystem and software Redox OS provides is listed below.
|
||||
|
||||
| Name (lexicographic order) | Maintainer
|
||||
|--------------------------------------------------------------------------------------|---------------------------
|
||||
| [acid (kernel integration tests)](https://gitlab.redox-os.org/redox-os/acid) | **@jackpot51** **@NilSet**
|
||||
| [binutils](https://gitlab.redox-os.org/redox-os/binutils) | **vacant**
|
||||
| [cookbook](https://gitlab.redox-os.org/redox-os/cookbook) | **@jackpot51** **@ids1024** **@sajattack**
|
||||
| [coreutils](https://gitlab.redox-os.org/redox-os/coreutils) | **vacant**
|
||||
| [extrautils](https://gitlab.redox-os.org/redox-os/extrautils) | **vacant**
|
||||
| [games](https://gitlab.redox-os.org/redox-os/games) | **@enrico** (AKA **@HenryTheCat**) **@fabiao**
|
||||
| [Ion (shell)](https://gitlab.redox-os.org/redox-os/ion) | **@mmstick** **@stratact**
|
||||
| [ipcd](https://gitlab.redox-os.org/redox-os/ipcd) | **@jD91mZM2**
|
||||
| [kernel](https://gitlab.redox-os.org/redox-os/kernel) | **@jackpot51**
|
||||
| [libextra](https://gitlab.redox-os.org/redox-os/libextra) | **vacant**
|
||||
| [libpager](https://gitlab.redox-os.org/redox-os/libpager) | **vacant**
|
||||
| [netstack](https://gitlab.redox-os.org/redox-os/netstack) | **@batonius** **@dlrobertson**
|
||||
| [netutils](https://gitlab.redox-os.org/redox-os/netutils) | **@jackpot51**
|
||||
| [orbclient (Orbital client)](https://gitlab.redox-os.org/redox-os/orbclient) | **@jackpot51** **@FloVanGH**
|
||||
| [orbdata](https://gitlab.redox-os.org/redox-os/orbdata) | **@jackpot51**
|
||||
| [orbgame (Orbital 2D game engine)](https://gitlab.redox-os.org/redox-os/orbgame) | **@FloVanGH**
|
||||
| [Orbital (windowing and compositing system)](https://gitlab.redox-os.org/redox-os/orbital) | **@jackpot51**
|
||||
| [orbtk (Orbital toolkit)](https://gitlab.redox-os.org/redox-os/orbtk) | **@FloVanGH**
|
||||
| [orbutils (Orbital utilities)](https://gitlab.redox-os.org/redox-os/orbutils) | **@jackpot51**
|
||||
| [pkgutils (current package manager)](https://gitlab.redox-os.org/redox-os/pkgutils) | **@jackpot51**
|
||||
| [ralloc](https://gitlab.redox-os.org/redox-os/ralloc) | **@Tommoa** **@NilSet**
|
||||
| [RANSID (Rust ANSI driver)](https://gitlab.redox-os.org/redox-os/ransid) | **@jackpot51**
|
||||
| [redoxfs (old filesystem)](https://gitlab.redox-os.org/redox-os/redoxfs) | **@jackpot51**
|
||||
| [relibc (C Library in Rust)](https://gitlab.redox-os.org/redox-os/relibc) | **@jD91mZM2** **@sajattack** **@Tommoa** **@stratact**
|
||||
| [small (stack String and other collections)](https://gitlab.redox-os.org/redox-os/small) | **@Tommoa**
|
||||
| [syscall](https://gitlab.redox-os.org/redox-os/syscall) | **@jackpot51**
|
||||
| [Sodium (Vim-inspired text editor)](https://gitlab.redox-os.org/redox-os/sodium) | **vacant**
|
||||
| [TFS ((ticki) **T**he **F**ile **S**ystem)](https://gitlab.redox-os.org/redox-os/tfs) | **@Tommoa**
|
||||
| [The Redox book](https://gitlab.redox-os.org/redox-os/book) | **vacant**
|
||||
| [userutils](https://gitlab.redox-os.org/redox-os/userutils) | **@jackpot51**
|
||||
|
||||
## <a name="compile-help"> Help! Redox won't compile! </a>
|
||||
|
||||
Sometimes things go wrong when compiling. Try the following before opening an issue:
|
||||
|
||||
1. Run `rustup update`
|
||||
1. Run `make clean pull`.
|
||||
1. Make sure you have **the latest version of Rust nightly!** ([rustup.rs](https://www.rustup.rs) is recommended for managing Rust versions. If you already have it, run `rustup`).
|
||||
1. Update **GNU Make**, **NASM** and **QEMU/VirtualBox**.
|
||||
1. Pull the upstream master branch (`git remote add upstream git@gitlab.redox-os.org:redox-os/redox.git; git pull upstream master`).
|
||||
1. Update submodules (`git submodule update --recursive --init`).
|
||||
|
||||
and then rebuild!
|
||||
|
||||
## <a name="contributing"> Contributing to Redox </a>
|
||||
|
||||
If you're interested in this project, and you'd like to help us out, [here](CONTRIBUTING.md) is a list of ways you can do just that.
|
||||
|
||||
## <a name="cloning-building-running"> Cloning, Building and Running </a>
|
||||
|
||||
Redox is big, even compressed. Downloading the full history may take a lot of bandwidth, and can even be costly on some data plans. Clone at your own risk!
|
||||
|
||||
### <a name="quick-setup" /> Quick Setup </a>
|
||||
|
||||
```bash
|
||||
$ cd path/to/your/projects/folder/
|
||||
|
||||
# Run bootstrap setup
|
||||
$ curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh && bash -e bootstrap.sh
|
||||
|
||||
# Change to project directory
|
||||
$ cd redox
|
||||
|
||||
# Build Redox
|
||||
$ make all
|
||||
|
||||
# Launch using QEMU
|
||||
$ make qemu
|
||||
# Launch using QEMU without using KVM (Kernel-based Virtual Machine). Try if QEMU gives an error.
|
||||
$ make qemu kvm=no
|
||||
```
|
||||
|
||||
#### QEMU with KVM
|
||||
|
||||
To use QEMU with KVM (Kernel-based Virtual Machine), which is faster than without KVM, you need a CPU with Intel® Virtualization Technology (Intel® VT) or AMD Virtualization™ (AMD-V™) support. Most systems have this disabled by default, so you may need to reboot, go into the BIOS, and enable it.
|
||||
|
||||
### <a name="manual-setup"> Manual Setup </a>
|
||||
|
||||
To manually clone, build and run Redox using a Unix-based host, run the following commands (with exceptions, be sure to read the comments):
|
||||
```bash
|
||||
$ cd path/to/your/projects/folder/
|
||||
|
||||
# HTTPS
|
||||
$ git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
|
||||
# SSH
|
||||
$ git clone git@gitlab.redox-os.org:redox-os/redox.git --origin upstream --recursive
|
||||
|
||||
$ cd redox/
|
||||
|
||||
# Install/update dependencies
|
||||
$ ./bootstrap.sh -d
|
||||
|
||||
# Install rustup.rs
|
||||
$ curl https://sh.rustup.rs -sSf | sh
|
||||
$ source $HOME/.cargo/env
|
||||
|
||||
# Install the sysroot manager Xargo and cargo-config
|
||||
$ cargo install xargo cargo-config
|
||||
|
||||
# For successive builds start here. If this is your first build, just continue
|
||||
|
||||
# Update git submodules
|
||||
$ git submodule update --recursive --init
|
||||
|
||||
# Build Redox
|
||||
$ make all
|
||||
|
||||
# Launch using QEMU
|
||||
$ make qemu
|
||||
|
||||
# Launch using QEMU without using KVM (Kernel-based Virtual Machine). Try if QEMU gives an error.
|
||||
$ make qemu kvm=no
|
||||
|
||||
# Launch using QEMU without using KVM (Kernel-based Virtual Machine) nor Graphics
|
||||
make qemu kvm=no vga=no
|
||||
```
|
||||
|
||||
### <a name="setup-using-docker"> Setup using Docker </a>
|
||||
We also provide docker image. After cloning this repository, please follow README under the `docker` directory.
|
||||
|
||||
### Updating the codebase using the Makefile
|
||||
To update the codebase run:
|
||||
|
||||
```
|
||||
make pull; make fetch
|
||||
```
|
||||
|
||||
`make pull` pulls and updates the submodules, and `make fetch` updates the sources for cookbook recipes.
|
||||
|
||||
39
TRADEMARK.md
39
TRADEMARK.md
@ -1,39 +0,0 @@
|
||||
# Redox OS Trademark Policy
|
||||
|
||||
This document outlines the policy regarding the use of the Redox OS trademark owned by the Redox OS nonprofit. The purpose of this policy is to ensure that the Redox OS trademark is used correctly and consistently, maintaining the integrity and reputation of the Redox OS brand.
|
||||
|
||||
1. Usage of the Redox OS Trademark
|
||||
1. The Redox OS trademark includes, but is not limited to, the name "Redox OS", the Redox OS logo, and any associated symbols or designs.
|
||||
2. The Redox OS trademark may only be used in accordance with this policy. Unauthorized use of the trademark is prohibited.
|
||||
2. Permissible Use
|
||||
1. Community Projects: Community projects may use the Redox OS trademark to refer to the operating system, provided that such use is not misleading and does not imply endorsement by the Redox OS nonprofit without explicit permission.
|
||||
2. Educational and Informational Use: The Redox OS trademark may be used in educational and informational materials, including books, websites, and articles, to refer to the operating system, provided that such use complies with the guidelines set forth in this policy.
|
||||
3. Marketing and Promotional Use: Partners and affiliates of the Redox OS nonprofit may use the Redox OS trademark in marketing and promotional materials with prior written consent from the Redox OS nonprofit.
|
||||
3. Prohibited Use
|
||||
1. Misrepresentation: The Redox OS trademark must not be used in a way that misrepresents or implies false association with, endorsement by, or sponsorship from the Redox OS nonprofit.
|
||||
2. Modification: The Redox OS trademark must not be altered, modified, or used as part of another trademark or logo without prior written permission from the Redox OS nonprofit.
|
||||
3. Merchandising: The Redox OS trademark must not be used on merchandise (e.g., T-shirts, mugs) for commercial purposes without explicit authorization from the Redox OS nonprofit.
|
||||
4. Logo Usage Guidelines
|
||||
1. The Redox OS logo must be used as provided by the Redox OS nonprofit without any modifications. This includes maintaining the logo’s colors, proportions, and overall design.
|
||||
2. The Redox OS logo must be displayed in a manner that is clear and legible. Sufficient clear space should be maintained around the logo to ensure it is not crowded by other visual elements.
|
||||
3. The Redox OS name should be identified as a trademark using the “™” symbol.
|
||||
5. Official Redox OS Software
|
||||
1. Software hosted at [the Redox OS GitLab group](https://gitlab.redox-os.org/redox-os/) is considered official Redox OS software. Only software that has been approved by the Redox OS nonprofit is permitted to use the Redox OS trademarks to refer to itself. Software that is official Redox OS software may use the “redox-os-” package namespace and “org.redox_os.” prefixed reverse-DNS ID. Other software should avoid using these prefixes.
|
||||
2. Third-party software that integrates with or extend the Redox OS operating system must not use the Redox OS trademark in a way that implies official status or endorsement without prior approval from the Redox OS nonprofit. Third-party developers are encouraged to use the "redox-os-ext-" package namespace. This software may be described as "for the Redox OS™ operating system".
|
||||
3. Third-party software may request inclusion as official Redox OS software. To request inclusion, please contact the Redox OS nonprofit at trademark@redox-os.org.
|
||||
6. Request for Permission
|
||||
1. To request permission for uses of the Redox OS trademark not covered by this policy, please contact the Redox OS nonprofit at trademark@redox-os.org.
|
||||
2. All requests will be reviewed on a case-by-case basis, and the Redox OS nonprofit reserves the right to grant or deny permission at its sole discretion.
|
||||
7. Enforcement
|
||||
1. The Redox OS nonprofit reserves the right to take appropriate legal action against any unauthorized use of the Redox OS trademark.
|
||||
2. The Redox OS nonprofit may, at its discretion, require the cessation of use of the Redox OS trademark by any party that fails to comply with this policy.
|
||||
|
||||
## Contact Information
|
||||
|
||||
For any questions or to request permission to use the Redox OS trademark, please contact:<br><br>
|
||||
Redox OS<br>
|
||||
trademark@redox-os.org<br><br>
|
||||
This trademark policy is effective as of December 3, 2025 and may be updated from time to time at the discretion of the Redox OS nonprofit.
|
||||
|
||||
---
|
||||
By adhering to these guidelines, you help us protect the Redox OS brand and ensure it remains a symbol of quality and innovation. Thank you for your cooperation.
|
||||
@ -1 +0,0 @@
|
||||
x86_64-unknown-redox-llvm-config
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
|
||||
|
||||
if [ -n "${COOKBOOK_DYNAMIC}" ]
|
||||
then
|
||||
exec pkg-config "$@"
|
||||
else
|
||||
exec pkg-config --static "$@"
|
||||
fi
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
|
||||
|
||||
if [ -n "${COOKBOOK_DYNAMIC}" ]
|
||||
then
|
||||
exec pkg-config "$@"
|
||||
else
|
||||
exec pkg-config --static "$@"
|
||||
fi
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
|
||||
|
||||
if [ -n "${COOKBOOK_DYNAMIC}" ]
|
||||
then
|
||||
exec pkg-config "$@"
|
||||
else
|
||||
exec pkg-config --static "$@"
|
||||
fi
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
|
||||
|
||||
if [ -n "${COOKBOOK_DYNAMIC}" ]
|
||||
then
|
||||
exec pkg-config "$@"
|
||||
else
|
||||
exec pkg-config --static "$@"
|
||||
fi
|
||||
@ -1,103 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# This script wraps llvm-config that intended for cross compiling to Redox.
|
||||
# Because we can't run llvm-config compiled to Redox, we wrap it here
|
||||
# and filter out architectures that do not match the current $TARGET.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
LLVM_CONFIG = "/bin/llvm-config"
|
||||
|
||||
# name of (--targets-built, --components prefix, --libs prefix)
|
||||
ARCH_MAP = {
|
||||
"x86_64": ("X86", "x86", "X86"),
|
||||
"i586": ("X86", "x86", "X86"),
|
||||
"aarch64": ("AArch64", "aarch64", "AArch64"),
|
||||
"riscv64gc": ("RISCV", "riscv", "RISCV"),
|
||||
}
|
||||
|
||||
ALL_ARCH_COMPS = ["x86", "aarch64", "riscv"]
|
||||
ALL_ARCH_LIBS = ["X86", "AArch64", "RISCV"]
|
||||
|
||||
def is_unwanted_arch(item, allowed_prefix, all_prefixes, is_lib=False):
|
||||
matched_arch = None
|
||||
for arch in all_prefixes:
|
||||
# libraries e.g., -lLLVMX86CodeGen / libLLVMAArch64Desc.a
|
||||
if is_lib and f"LLVM{arch}" in item:
|
||||
matched_arch = arch
|
||||
break
|
||||
# components e.g., x86codegen, aarch64desc
|
||||
elif not is_lib and item.startswith(arch):
|
||||
matched_arch = arch
|
||||
break
|
||||
|
||||
if matched_arch and matched_arch != allowed_prefix:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def main():
|
||||
toolchain_path = os.environ.get("COOKBOOK_HOST_SYSROOT")
|
||||
sysroot_path = os.environ.get("COOKBOOK_SYSROOT")
|
||||
target_triple = os.environ.get("TARGET")
|
||||
|
||||
if not toolchain_path or not sysroot_path or not target_triple:
|
||||
print("Error: COOKBOOK_HOST_SYSROOT or COOKBOOK_SYSROOT or TARGET not set", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
target_arch = target_triple.split('-')[0] if target_triple else ""
|
||||
mapped_archs = ARCH_MAP.get(target_arch)
|
||||
target_built_name, comp_prefix, lib_prefix = mapped_archs
|
||||
|
||||
cmd = [toolchain_path + LLVM_CONFIG] + sys.argv[1:]
|
||||
|
||||
try:
|
||||
result = subprocess.run(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=sys.stderr,
|
||||
check=False,
|
||||
text=True
|
||||
)
|
||||
except FileNotFoundError:
|
||||
print(f"Error: Could not find executable '{LLVM_CONFIG}'", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if result.returncode != 0:
|
||||
sys.exit(result.returncode)
|
||||
|
||||
output = result.stdout.strip()
|
||||
|
||||
args_set = set(sys.argv[1:])
|
||||
|
||||
if "--bindir" in args_set:
|
||||
output = toolchain_path + "/usr/bin"
|
||||
|
||||
elif "--targets-built" in args_set:
|
||||
output = target_built_name
|
||||
|
||||
elif "--components" in args_set:
|
||||
components = output.split()
|
||||
filtered = [c for c in components if not is_unwanted_arch(c, comp_prefix, ALL_ARCH_COMPS, is_lib=False)]
|
||||
output = " ".join(filtered)
|
||||
|
||||
elif "--libs" in args_set:
|
||||
libs = output.split()
|
||||
filtered = [l for l in libs if not is_unwanted_arch(l, lib_prefix, ALL_ARCH_LIBS, is_lib=True)]
|
||||
output = " ".join(filtered)
|
||||
|
||||
# if "--ldflags" in args_set:
|
||||
src = toolchain_path.rstrip(os.sep)
|
||||
dst = sysroot_path.rstrip(os.sep)
|
||||
output = output.replace(src, dst)
|
||||
else:
|
||||
src = toolchain_path.rstrip(os.sep)
|
||||
dst = sysroot_path.rstrip(os.sep)
|
||||
output = output.replace(src, dst)
|
||||
|
||||
print(output + '\n', end='')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_SYSROOT}"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
|
||||
export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
|
||||
|
||||
if [ -n "${COOKBOOK_DYNAMIC}" ]
|
||||
then
|
||||
exec pkg-config "$@"
|
||||
else
|
||||
exec pkg-config --static "$@"
|
||||
fi
|
||||
16
bochs.x86_64
Normal file
16
bochs.x86_64
Normal file
@ -0,0 +1,16 @@
|
||||
ata0-master: type=disk, path="build/livedisk.bin", mode=flat
|
||||
boot: disk
|
||||
com1: enabled=1, mode=file, dev=build/serial.log
|
||||
cpu: model=corei7_haswell_4770
|
||||
#e1000: enabled=1, mac=52:54:00:12:34:56 ethmod=vnet
|
||||
megs: 1024
|
||||
|
||||
magic_break: enabled=1
|
||||
display_library: x, options="gui_debug"
|
||||
|
||||
log: -
|
||||
debug: action=ignore
|
||||
info: action=report
|
||||
error: action=report
|
||||
panic: action=ask
|
||||
debugger_log: -
|
||||
1
bootloader
Submodule
1
bootloader
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1d201c4435ebad73e0248d02c8b254783b75eca5
|
||||
1
bootloader-coreboot
Submodule
1
bootloader-coreboot
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6c31909f75f3d707efa606e546113ee508be0748
|
||||
1
bootloader-efi
Submodule
1
bootloader-efi
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e147b413eeb9eb7d01c85cfe1b6b6eea39c47a57
|
||||
624
bootstrap.sh
Executable file
624
bootstrap.sh
Executable file
@ -0,0 +1,624 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##########################################################
|
||||
# This function is simply a banner to introduce the script
|
||||
##########################################################
|
||||
banner()
|
||||
{
|
||||
echo "|------------------------------------------|"
|
||||
echo "|----- Welcome to the redox bootstrap -----|"
|
||||
echo "|------------------------------------------|"
|
||||
}
|
||||
|
||||
###################################################################################
|
||||
# This function takes care of installing a dependency via package manager of choice
|
||||
# for building redox on BSDs (MacOS, FreeBSD, etc.).
|
||||
# @params: $1 package manager
|
||||
# $2 package name
|
||||
# $3 binary name (optional)
|
||||
###################################################################################
|
||||
install_bsd_pkg()
|
||||
{
|
||||
PKG_MANAGER=$1
|
||||
PKG_NAME=$2
|
||||
BIN_NAME=$3
|
||||
if [ -z "$BIN_NAME" ]; then
|
||||
BIN_NAME=$PKG_NAME
|
||||
fi
|
||||
|
||||
BIN_LOCATION=$(which $BIN_NAME || true)
|
||||
if [ -z "$BIN_LOCATION" ]; then
|
||||
echo "$PKG_MANAGER install $PKG_NAME"
|
||||
$PKG_MANAGER install "$PKG_NAME"
|
||||
else
|
||||
echo "$BIN_NAME already exists at $BIN_LOCATION, no need to install $PKG_NAME..."
|
||||
fi
|
||||
}
|
||||
|
||||
install_macports_pkg()
|
||||
{
|
||||
install_bsd_pkg "sudo port" "$1" "$2"
|
||||
}
|
||||
|
||||
install_brew_pkg()
|
||||
{
|
||||
install_bsd_pkg "brew" $@
|
||||
}
|
||||
|
||||
install_brew_cask_pkg()
|
||||
{
|
||||
install_bsd_pkg "brew cask" $@
|
||||
}
|
||||
|
||||
install_freebsd_pkg()
|
||||
{
|
||||
install_bsd_pkg "sudo pkg" $@
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function checks which of the supported package managers
|
||||
# is available on the OSX Host.
|
||||
# If a supported package manager is found, it delegates the installing work to
|
||||
# the relevant function.
|
||||
# Otherwise this function will exit this script with an error.
|
||||
###############################################################################
|
||||
osx()
|
||||
{
|
||||
echo "Detected OSX!"
|
||||
|
||||
if [ ! -z "$(which brew)" ]; then
|
||||
osx_homebrew $@
|
||||
elif [ ! -z "$(which port)" ]; then
|
||||
osx_macports $@
|
||||
else
|
||||
echo "Please install either Homebrew or MacPorts, if you wish to use this script"
|
||||
echo "Re-run this script once you installed one of those package managers"
|
||||
echo "Will not install, now exiting..."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies using MacPorts
|
||||
# for building redox on Mac OSX
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
###############################################################################
|
||||
osx_macports()
|
||||
{
|
||||
echo "Macports detected! Now updating..."
|
||||
sudo port -v selfupdate
|
||||
|
||||
echo "Installing missing packages..."
|
||||
|
||||
install_macports_pkg "git"
|
||||
|
||||
if [ "$1" == "qemu" ]; then
|
||||
install_macports_pkg "qemu" "qemu-system-x86_64"
|
||||
else
|
||||
install_macports_pkg "virtualbox"
|
||||
fi
|
||||
|
||||
install_macports_pkg "coreutils"
|
||||
install_macports_pkg "findutils"
|
||||
install_macports_pkg "gcc49" "gcc-4.9"
|
||||
install_macports_pkg "nasm"
|
||||
install_macports_pkg "pkgconfig"
|
||||
install_macports_pkg "osxfuse"
|
||||
install_macports_pkg "x86_64-elf-gcc"
|
||||
install_macports_pkg "cmake"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies using Homebrew
|
||||
# for building redox on Mac OSX
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
###############################################################################
|
||||
osx_homebrew()
|
||||
{
|
||||
echo "Homebrew detected! Now updating..."
|
||||
brew update
|
||||
|
||||
echo "Installing missing packages..."
|
||||
|
||||
install_brew_pkg "git"
|
||||
|
||||
if [ "$1" == "qemu" ]; then
|
||||
install_brew_pkg "qemu" "qemu-system-x86_64"
|
||||
else
|
||||
install_brew_pkg "virtualbox"
|
||||
fi
|
||||
|
||||
install_brew_pkg "automake"
|
||||
install_brew_pkg "bison"
|
||||
install_brew_pkg "gettext"
|
||||
install_brew_pkg "libtool"
|
||||
install_brew_pkg "make"
|
||||
install_brew_pkg "nasm"
|
||||
install_brew_pkg "gcc@7" "gcc-7"
|
||||
install_brew_pkg "pkg-config"
|
||||
install_brew_pkg "cmake"
|
||||
install_brew_pkg "Caskroom/cask/osxfuse"
|
||||
|
||||
install_brew_pkg "redox-os/gcc_cross_compilers/x86_64-elf-gcc" "x86_64-elf-gcc"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies using pkg
|
||||
# for building redox on FreeBSD
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
###############################################################################
|
||||
freebsd()
|
||||
{
|
||||
set -xe
|
||||
echo "FreeBSD detected!"
|
||||
echo "Installing missing packages..."
|
||||
|
||||
install_freebsd_pkg "git"
|
||||
|
||||
if [ "$1" == "qemu" ]; then
|
||||
install_freebsd_pkg "qemu" "qemu-system-x86_64"
|
||||
else
|
||||
install_freebsd_pkg "virtualbox"
|
||||
fi
|
||||
|
||||
install_freebsd_pkg "coreutils"
|
||||
install_freebsd_pkg "findutils"
|
||||
install_freebsd_pkg "gcc"
|
||||
install_freebsd_pkg "nasm"
|
||||
install_freebsd_pkg "pkgconf"
|
||||
install_freebsd_pkg "fusefs-libs"
|
||||
install_freebsd_pkg "cmake"
|
||||
install_freebsd_pkg "gmake"
|
||||
install_freebsd_pkg "wget"
|
||||
install_freebsd_pkg "texinfo"
|
||||
install_freebsd_pkg "python"
|
||||
install_freebsd_pkg "automake"
|
||||
install_freebsd_pkg "gettext"
|
||||
install_freebsd_pkg "bison"
|
||||
install_freebsd_pkg "gperf"
|
||||
set +xe
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies for building redox on
|
||||
# Arch linux
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
###############################################################################
|
||||
archLinux()
|
||||
{
|
||||
echo "Detected Arch Linux"
|
||||
packages="cmake fuse git gperf perl-html-parser nasm wget texinfo bison flex po4a"
|
||||
if [ "$1" == "qemu" ]; then
|
||||
packages="$packages qemu"
|
||||
elif [ "$1" == "virtualbox" ]; then
|
||||
packages="$packages virtualbox"
|
||||
fi
|
||||
|
||||
# Scripts should not cause a system update in order to just install a couple
|
||||
# of packages. If pacman -S --needed is going to fail, let it fail and the
|
||||
# user will figure out the issues (without updating if required) and rerun
|
||||
# the script.
|
||||
#echo "Updating system..."
|
||||
#sudo pacman -Syu
|
||||
|
||||
echo "Installing packages $packages..."
|
||||
sudo pacman -S --needed $packages
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies for building redox on
|
||||
# debian based linux
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
# $2 the package manager to use
|
||||
###############################################################################
|
||||
ubuntu()
|
||||
{
|
||||
echo "Detected Ubuntu/Debian"
|
||||
echo "Updating system..."
|
||||
sudo "$2" update
|
||||
echo "Installing required packages..."
|
||||
sudo "$2" install \
|
||||
autoconf \
|
||||
autopoint \
|
||||
bison \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
file \
|
||||
flex \
|
||||
fuse \
|
||||
genisoimage \
|
||||
git \
|
||||
gperf \
|
||||
libc6-dev-i386 \
|
||||
libfuse-dev \
|
||||
libhtml-parser-perl \
|
||||
libpng-dev \
|
||||
libtool \
|
||||
m4 \
|
||||
nasm \
|
||||
pkg-config \
|
||||
po4a \
|
||||
syslinux-utils \
|
||||
texinfo
|
||||
if [ "$1" == "qemu" ]; then
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo "$2" install qemu-system-x86 qemu-kvm
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
else
|
||||
if [ -z "$(which virtualbox)" ]; then
|
||||
echo "Installing Virtualbox..."
|
||||
sudo "$2" install virtualbox
|
||||
else
|
||||
echo "Virtualbox already installed!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies for building redox on
|
||||
# fedora linux
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
###############################################################################
|
||||
fedora()
|
||||
{
|
||||
echo "Detected Fedora"
|
||||
if [ -z "$(which git)" ]; then
|
||||
echo "Installing git..."
|
||||
sudo dnf install git-all
|
||||
fi
|
||||
if [ "$1" == "qemu" ]; then
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo dnf install qemu-system-x86 qemu-kvm
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
else
|
||||
if [ -z "$(which virtualbox)" ]; then
|
||||
echo "Installing virtualbox..."
|
||||
sudo dnf install virtualbox
|
||||
else
|
||||
echo "Virtualbox already installed!"
|
||||
fi
|
||||
fi
|
||||
# Use rpm -q <package> to check if it's already installed
|
||||
PKGS=$(for pkg in gcc gcc-c++ glibc-devel.i686 nasm make fuse-devel cmake texinfo gettext-devel bison flex perl-HTML-Parser po4a; do rpm -q $pkg > /dev/null || echo $pkg; done)
|
||||
# If the list of packages is not empty, install missing
|
||||
COUNT=$(echo $PKGS | wc -w)
|
||||
if [ $COUNT -ne 0 ]; then
|
||||
echo "Installing necessary build tools..."
|
||||
sudo dnf install $PKGS
|
||||
fi
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# This function takes care of installing all dependencies for building redox on
|
||||
# *suse linux
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
###############################################################################
|
||||
suse()
|
||||
{
|
||||
echo "Detected SUSE Linux"
|
||||
if [ -z "$(which git)" ]; then
|
||||
echo "Installing git..."
|
||||
zypper install git
|
||||
fi
|
||||
if [ "$1" == "qemu" ]; then
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo zypper install qemu-x86 qemu-kvm
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
else
|
||||
if [ -z "$(which virtualbox)" ]; then
|
||||
echo "Please install Virtualbox and re-run this script,"
|
||||
echo "or run with -e qemu"
|
||||
exit
|
||||
else
|
||||
echo "Virtualbox already installed!"
|
||||
fi
|
||||
fi
|
||||
echo "Installing necessary build tools..."
|
||||
sudo zypper install gcc gcc-c++ glibc-devel-32bit nasm make fuse-devel cmake
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# This function takes care of installing all dependencies for building redox on
|
||||
# gentoo linux
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
##############################################################################
|
||||
gentoo()
|
||||
{
|
||||
echo "Detected Gentoo Linux"
|
||||
if [ -z "$(which nasm)" ]; then
|
||||
echo "Installing nasm..."
|
||||
sudo emerge dev-lang/nasm
|
||||
fi
|
||||
if [ -z "$(which git)" ]; then
|
||||
echo "Installing git..."
|
||||
sudo emerge dev-vcs/git
|
||||
fi
|
||||
if [ -z "$(which fusermount)" ]; then
|
||||
echo "Installing fuse..."
|
||||
sudo emerge sys-fs/fuse
|
||||
fi
|
||||
if [ "$2" == "qemu" ]; then
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Please install QEMU and re-run this script"
|
||||
echo "Step1. Add QEMU_SOFTMMU_TARGETS=\"x86_64\" to /etc/portage/make.conf"
|
||||
echo "Step2. Execute \"sudo emerge app-emulation/qemu\""
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
fi
|
||||
if [ -z "$(which cmake)" ]; then
|
||||
echo "Installing cmake..."
|
||||
sudo emerge dev-util/cmake
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# This function takes care of installing all dependencies for building redox on
|
||||
# SolusOS
|
||||
# @params: $1 the emulator to install, virtualbox or qemu
|
||||
##############################################################################
|
||||
solus()
|
||||
{
|
||||
echo "Detected SolusOS"
|
||||
|
||||
if [ "$1" == "qemu" ]; then
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
sudo eopkg it qemu
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
else
|
||||
if [ -z "$(which virtualbox)" ]; then
|
||||
echo "Please install Virtualbox and re-run this script,"
|
||||
echo "or run with -e qemu"
|
||||
exit
|
||||
else
|
||||
echo "Virtualbox already installed!"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Installing necessary build tools..."
|
||||
#if guards are not necessary with eopkg since it does nothing if latest version is already installed
|
||||
sudo eopkg it fuse-devel git gcc g++ libgcc-32bit libstdc++-32bit nasm make cmake
|
||||
}
|
||||
|
||||
######################################################################
|
||||
# This function outlines the different options available for bootstrap
|
||||
######################################################################
|
||||
usage()
|
||||
{
|
||||
echo "------------------------"
|
||||
echo "|Redox bootstrap script|"
|
||||
echo "------------------------"
|
||||
echo "Usage: ./bootstrap.sh"
|
||||
echo "OPTIONS:"
|
||||
echo
|
||||
echo " -h,--help Show this prompt"
|
||||
echo " -u [branch] Update git repo and update rust"
|
||||
echo " If blank defaults to master"
|
||||
echo " -s Check the status of the current travis build"
|
||||
echo " -e [emulator] Install specific emulator, virtualbox or qemu"
|
||||
echo " -p [package Choose an Ubuntu package manager, apt-fast or"
|
||||
echo " manager] aptitude"
|
||||
echo " -d Only install the dependencies, skip boot step"
|
||||
echo "EXAMPLES:"
|
||||
echo
|
||||
echo "./bootstrap.sh -e qemu"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
#############################################################
|
||||
# Looks for and installs a cargo-managed binary or subcommand
|
||||
#############################################################
|
||||
cargoInstall() {
|
||||
if [[ "`cargo install --list`" != *"$1 v$2"* ]]; then
|
||||
cargo install --force --version "$2" "$1"
|
||||
else
|
||||
echo "You have $1 version $2 installed already!"
|
||||
fi
|
||||
}
|
||||
|
||||
####################################################################################
|
||||
# This function takes care of everything associated to rust, and the version manager
|
||||
# That controls it, it can install rustup and uninstall multirust as well as making
|
||||
# sure that the correct version of rustc is selected by rustup
|
||||
####################################################################################
|
||||
rustInstall() {
|
||||
# Check to see if multirust is installed, we don't want it messing with rustup
|
||||
# In the future we can probably remove this but I believe it's good to have for now
|
||||
if [ -e /usr/local/lib/rustlib/uninstall.sh ] ; then
|
||||
echo "It appears that multirust is installed on your system."
|
||||
echo "This tool has been deprecated by the maintainer, and will cause issues."
|
||||
echo "This script can remove multirust from your system if you wish."
|
||||
printf "Uninstall multirust (y/N):"
|
||||
read multirust
|
||||
if echo "$multirust" | grep -iq "^y" ;then
|
||||
sudo /usr/local/lib/rustlib/uninstall.sh
|
||||
else
|
||||
echo "Please manually uninstall multirust and any other versions of rust, then re-run bootstrap."
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
# If rustup is not installed we should offer to install it for them
|
||||
if [ -z "$(which rustup)" ]; then
|
||||
echo "You do not have rustup installed."
|
||||
echo "We HIGHLY recommend using rustup."
|
||||
echo "Would you like to install it now?"
|
||||
echo "*WARNING* this involves a 'curl | sh' style command"
|
||||
printf "(y/N): "
|
||||
read rustup
|
||||
if echo "$rustup" | grep -iq "^y" ;then
|
||||
#install rustup
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
|
||||
# You have to add the rustup variables to the $PATH
|
||||
echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> ~/.bashrc
|
||||
# source the variables so that we can execute rustup commands in the current shell
|
||||
source ~/.cargo/env
|
||||
else
|
||||
echo "Rustup will not be installed!"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
if [ -z "$(which rustc)" ]; then
|
||||
echo "Rust is not installed"
|
||||
echo "Please either run the script again, accepting rustup install"
|
||||
echo "or install rustc nightly manually (not recommended) via:"
|
||||
echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
|
||||
exit
|
||||
else
|
||||
echo "Your rust install looks good!"
|
||||
fi
|
||||
}
|
||||
|
||||
####################################################################
|
||||
# This function gets the current build status from travis and prints
|
||||
# a message to the user
|
||||
####################################################################
|
||||
statusCheck() {
|
||||
for i in $(echo "$(curl -sf https://api.travis-ci.org/repositories/redox-os/redox.json)" | tr "," "\n")
|
||||
do
|
||||
if echo "$i" | grep -iq "last_build_status" ;then
|
||||
if echo "$i" | grep -iq "0" ;then
|
||||
echo
|
||||
echo "********************************************"
|
||||
echo "Travis reports that the last build succeeded!"
|
||||
echo "Looks like you are good to go!"
|
||||
echo "********************************************"
|
||||
elif echo "$i" | grep -iq "null" ;then
|
||||
echo
|
||||
echo "******************************************************************"
|
||||
echo "The Travis build did not finish, this is an error with its config."
|
||||
echo "I cannot reliably determine whether the build is succeeding or not."
|
||||
echo "Consider checking for and maybe opening an issue on gitlab"
|
||||
echo "******************************************************************"
|
||||
else
|
||||
echo
|
||||
echo "**************************************************"
|
||||
echo "Travis reports that the last build *FAILED* :("
|
||||
echo "Might want to check out the issues before building"
|
||||
echo "**************************************************"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
# This function is the main logic for the bootstrap; it clones the git repo
|
||||
# then it installs the rust version manager and the latest version of rustc
|
||||
###########################################################################
|
||||
boot()
|
||||
{
|
||||
echo "Cloning gitlab repo..."
|
||||
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
|
||||
echo "Cleaning up..."
|
||||
rm bootstrap.sh
|
||||
echo
|
||||
echo "---------------------------------------"
|
||||
echo "Well it looks like you are ready to go!"
|
||||
echo "---------------------------------------"
|
||||
statusCheck
|
||||
echo "Run the following commands to build redox:"
|
||||
echo "cd redox"
|
||||
MAKE="make"
|
||||
if [[ "$(uname)" == "FreeBSD" ]]; then
|
||||
MAKE="gmake"
|
||||
echo "kldload fuse.ko # This loads the kernel module for fuse"
|
||||
fi
|
||||
echo "$MAKE all"
|
||||
echo "$MAKE virtualbox or qemu"
|
||||
echo
|
||||
echo " Good luck!"
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
|
||||
usage
|
||||
elif [ "$1" == "-u" ]; then
|
||||
git pull upstream master
|
||||
git submodule update --recursive --init
|
||||
rustup update nightly
|
||||
exit
|
||||
elif [ "$1" == "-s" ]; then
|
||||
statusCheck
|
||||
exit
|
||||
fi
|
||||
|
||||
emulator="qemu"
|
||||
defpackman="apt-get"
|
||||
dependenciesonly=false
|
||||
update=false
|
||||
while getopts ":e:p:udhs" opt
|
||||
do
|
||||
case "$opt" in
|
||||
e) emulator="$OPTARG";;
|
||||
p) defpackman="$OPTARG";;
|
||||
d) dependenciesonly=true;;
|
||||
u) update=true;;
|
||||
h) usage;;
|
||||
s) statusCheck && exit;;
|
||||
\?) echo "I don't know what to do with that option, try -h for help"; exit;;
|
||||
esac
|
||||
done
|
||||
|
||||
banner
|
||||
|
||||
rustInstall
|
||||
cargoInstall cargo-config 0.1.1
|
||||
cargoInstall xargo 0.3.20
|
||||
|
||||
if [ "$update" == "true" ]; then
|
||||
git pull upstream master
|
||||
git submodule update --recursive --init
|
||||
rustup update nightly
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "Darwin" == "$(uname -s)" ]; then
|
||||
osx "$emulator"
|
||||
else
|
||||
# Here we will use package managers to determine which operating system the user is using.
|
||||
|
||||
# Suse and derivatives
|
||||
if hash 2>/dev/null zypper; then
|
||||
suse "$emulator"
|
||||
# Debian or any derivative of it
|
||||
elif hash 2>/dev/null apt-get; then
|
||||
ubuntu "$emulator" "$defpackman"
|
||||
# Fedora
|
||||
elif hash 2>/dev/null dnf; then
|
||||
fedora "$emulator"
|
||||
# Gentoo
|
||||
elif hash 2>/dev/null emerge; then
|
||||
gentoo "$emulator"
|
||||
# SolusOS
|
||||
elif hash 2>/dev/null eopkg; then
|
||||
solus "$emulator"
|
||||
# Arch linux
|
||||
elif hash 2>/dev/null pacman; then
|
||||
archLinux "$emulator"
|
||||
# FreeBSD
|
||||
elif hash 2>/dev/null pkg; then
|
||||
freebsd "$emulator"
|
||||
# Unsupported platform
|
||||
else
|
||||
printf "\e[31;1mFatal error: \e[0;31mUnsupported platform, please open an issue\[0m"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$dependenciesonly" = false ]; then
|
||||
boot
|
||||
fi
|
||||
|
||||
echo "Redox bootstrap complete!"
|
||||
105
build.sh
105
build.sh
@ -1,105 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Alternative script for the build system Makefiles
|
||||
|
||||
###########################################################################
|
||||
# #
|
||||
# Build the system, with a specified processor type and filesystem config #
|
||||
# #
|
||||
###########################################################################
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "build.sh: Invoke make for a particular architecture and configuration."
|
||||
echo "Usage:"
|
||||
echo "./build.sh [-X | -A | -5 | -R | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..."
|
||||
echo " -X Equivalent to -a x86_64."
|
||||
echo " -A Equivalent to -a aarch64."
|
||||
echo " -5 Equivalent to -a i586."
|
||||
echo " -6 Equivalent to -a i586 (deprecated, use -5 instead)."
|
||||
echo " -R Equivalent to -a riscv64gc."
|
||||
echo " -a ARCH: Processor Architecture. Normally one of x86_64, aarch64 or"
|
||||
echo " i686. ARCH is not checked, so you can add a new architecture."
|
||||
echo " Defaults to the directory containing the FILESYSTEM_CONFIG file,"
|
||||
echo " or x86_64 if no FILESYSTEM_CONFIG is specified."
|
||||
echo " -c CONFIG: The name of the config, e.g. desktop, server or demo."
|
||||
echo " Determines the name of the image, build/ARCH/CONFIG/harddrive.img"
|
||||
echo " e.g. build/x86_64/desktop/harddrive.img"
|
||||
echo " Determines the name of FILESYSTEM_CONFIG if none is specified."
|
||||
echo " Defaults to the basename of FILESYSTEM_CONFIG, or 'desktop'"
|
||||
echo " if FILESYSTEM_CONFIG is not specified."
|
||||
echo " -f FILESYSTEM_CONFIG:"
|
||||
echo " The config file to use. It can be in any location."
|
||||
echo " However, if the file is not in a directory named x86_64, aarch64"
|
||||
echo " or i686, you must specify the architecture."
|
||||
echo " If -f is not specified, FILESYSTEM_CONFIG is set to"
|
||||
echo " config/ARCH/CONFIG.toml"
|
||||
echo " If you specify both CONFIG and FILESYSTEM_CONFIG, it is not"
|
||||
echo " necessary that they match, but it is recommended."
|
||||
echo " Examples: ./build.sh -c demo live - make build/x86_64/demo/redox-live.iso"
|
||||
echo " ./build.sh -6 qemu - make build/i686/desktop/harddrive.img and"
|
||||
echo " and run it in qemu"
|
||||
echo " NOTE: If you do not change ARCH or CONFIG very often, edit mk/config.mk"
|
||||
echo " and set ARCH and FILESYSTEM_CONFIG. You only need to use this"
|
||||
echo " script when you want to override them."
|
||||
}
|
||||
|
||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
|
||||
defaultarch="x86_64"
|
||||
defaultname="desktop"
|
||||
ARCH=""
|
||||
CONFIG_NAME=""
|
||||
FILESYSTEM_CONFIG=""
|
||||
|
||||
while getopts ":c:f:a:dhXA6" opt
|
||||
do
|
||||
case "$opt" in
|
||||
a) ARCH="$OPTARG";;
|
||||
c) CONFIG_NAME="$OPTARG";;
|
||||
f) FILESYSTEM_CONFIG="$OPTARG";;
|
||||
X) ARCH="x86_64";;
|
||||
A) ARCH="aarch64";;
|
||||
R) ARCH="riscv64gc";;
|
||||
5) ARCH="i586";;
|
||||
6) ARCH="i586";;
|
||||
h) usage;;
|
||||
\?) echo "Unknown option -$OPTARG, try -h for help"; exit;;
|
||||
:) echo "-$OPTARG requires a value"; exit;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND -1))
|
||||
|
||||
if [ -z "$ARCH" ] && [ -n "$FILESYSTEM_CONFIG" ]; then
|
||||
dirname=`dirname "$FILESYSTEM_CONFIG"`
|
||||
ARCH=`basename $dirname`
|
||||
case "$ARCH" in
|
||||
x86_64) : ;;
|
||||
aarch64) : ;;
|
||||
riscv64gc) : ;;
|
||||
i586) : ;;
|
||||
\?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64, riscv64gc or i586";;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "$config_name" ] && [ -n "$FILESYSTEM_CONFIG" ]; then
|
||||
CONFIG_NAME=`basename "$FILESYSTEM_CONFIG" .toml`
|
||||
fi
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
ARCH="$defaultarch"
|
||||
fi
|
||||
|
||||
if [ -z "$CONFIG_NAME" ]; then
|
||||
CONFIG_NAME="$defaultname"
|
||||
fi
|
||||
|
||||
if [ -z "$FILESYSTEM_CONFIG" ]; then
|
||||
FILESYSTEM_CONFIG="config/$ARCH/$CONFIG_NAME.toml"
|
||||
fi
|
||||
|
||||
export ARCH CONFIG_NAME FILESYSTEM_CONFIG
|
||||
make $@
|
||||
192
ci.toml
Normal file
192
ci.toml
Normal file
@ -0,0 +1,192 @@
|
||||
# This is the CI configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
acid = {}
|
||||
atk = {}
|
||||
audiod = {}
|
||||
autoconf = {}
|
||||
automake = {}
|
||||
#bash = {} # setrlimit
|
||||
binutils = {}
|
||||
bootloader = {}
|
||||
ca-certificates = {}
|
||||
cairo = {}
|
||||
cairodemo = {}
|
||||
#cargo = {} # curl-config not found
|
||||
cleye = {}
|
||||
cmatrix = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cpal = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
diffutils = {}
|
||||
dosbox = {}
|
||||
drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {} # strptime
|
||||
eduke32 = {}
|
||||
exampled = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
#fd = {} # ctrlc-3.1.1
|
||||
ffmpeg = {}
|
||||
findutils = {}
|
||||
fontconfig = {}
|
||||
#freeciv = {}
|
||||
freedoom = {}
|
||||
#freeglut = {}
|
||||
freetype = {}
|
||||
#friar = {} # mio patch
|
||||
fribidi = {}
|
||||
#game-2048 = {} # rustc-serialize
|
||||
games = {}
|
||||
#gawk = {} # langinfo.h
|
||||
gcc = {}
|
||||
gdbserver = {}
|
||||
#gdk-pixbuf = {} # shared-mime-info
|
||||
gears = {}
|
||||
generaluser-gs = {}
|
||||
gettext = {}
|
||||
gigalomania = {}
|
||||
git = {}
|
||||
glib = {}
|
||||
glium = {}
|
||||
glutin = {}
|
||||
gnu-binutils = {}
|
||||
gnu-grep = {}
|
||||
gnu-make = {}
|
||||
#gstreamer = {} # conflict with thread local errno
|
||||
harfbuzz = {}
|
||||
#hematite = {} # needs crate patches for redox-unix
|
||||
init = {}
|
||||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
jansson = {}
|
||||
kernel = {}
|
||||
keyboard-sfx = {}
|
||||
lci = {}
|
||||
libc-bench = {}
|
||||
libffi = {}
|
||||
libiconv = {}
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
liborbital = {}
|
||||
libpng = {}
|
||||
libsodium = {}
|
||||
libvorbis = {}
|
||||
libxml2 = {}
|
||||
llvm = {}
|
||||
logd = {}
|
||||
#lua = {} # tmpnam
|
||||
#mdp = {} # ncursesw
|
||||
mesa = {}
|
||||
mesa_glu = {}
|
||||
#mgba = {} # no longer builds binary
|
||||
#miniserve = {} # actix
|
||||
nasm = {}
|
||||
#ncdu = {} # fails to link with ncurses
|
||||
ncurses = {}
|
||||
#ncursesw = {} # mkstemp configure hang
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netsurf = {}
|
||||
netutils = {}
|
||||
#neverball = {} # error finding SDL includes
|
||||
#newlib = {} # obsolete
|
||||
#newlibtest = {} # obsolete
|
||||
nghttp2 = {}
|
||||
nulld = {}
|
||||
openjazz = {}
|
||||
openssl = {}
|
||||
openttd = {}
|
||||
openttd-opengfx = {}
|
||||
openttd-openmsx = {}
|
||||
openttd-opensfx = {}
|
||||
orbclient = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
orbutils-background = {}
|
||||
orbutils-launcher = {}
|
||||
orbutils-orblogin = {}
|
||||
osdemo = {}
|
||||
pango = {}
|
||||
#pastel = {} # needs crate patches for redox-unix
|
||||
patch = {}
|
||||
#pathfinder = {} # servo-fontconfig
|
||||
#pciids = {}
|
||||
pcre = {}
|
||||
periodictable = {}
|
||||
#perl = {} # ctermid, tempnam, ttyname
|
||||
pixelcannon = {}
|
||||
pixman = {}
|
||||
pkg-config = {}
|
||||
pkgutils = {}
|
||||
#powerline = {} # dirs
|
||||
prboom = {}
|
||||
ptyd = {}
|
||||
#python = {} # getaddrinfo
|
||||
#qemu = {}
|
||||
randd = {}
|
||||
ramfs = {}
|
||||
readline = {}
|
||||
redoxerd = {}
|
||||
redoxfs = {}
|
||||
#redox-fatfs = {}
|
||||
#redox-ssh = {}
|
||||
relibc = {}
|
||||
#relibc-tests = {}
|
||||
ripgrep = {}
|
||||
rodioplay = {}
|
||||
rs-nes = {}
|
||||
#rust = {}
|
||||
rust64 = {}
|
||||
rust-cairo = {}
|
||||
rust-cairo-demo = {}
|
||||
rustual-boy = {}
|
||||
schismtracker = {}
|
||||
scummvm = {}
|
||||
sdl = {}
|
||||
sdl2 = {}
|
||||
sdl2_gears = {}
|
||||
sdl2_image = {}
|
||||
sdl2_mixer = {}
|
||||
sdl2_ttf = {}
|
||||
sdl_gfx = {}
|
||||
sdl_image = {}
|
||||
sdl_mixer = {}
|
||||
sdl-player = {}
|
||||
#sdl_ttf = {} # configure patch needs to be updated
|
||||
sed = {}
|
||||
#servo = {} # some more crates to port
|
||||
#shared-mime-info = {} # intltool-update out of date
|
||||
shellstorm = {}
|
||||
smith = {}
|
||||
sodium = {}
|
||||
sopwith = {}
|
||||
#ssh = {}
|
||||
strace = {}
|
||||
#syobonaction = {} # sdl_ttf errors
|
||||
terminfo = {}
|
||||
#termplay = {} # backtrace cannot find link.h
|
||||
timidity = {}
|
||||
ttf-hack = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
vice = {}
|
||||
#vim = {} # stack_t not matching
|
||||
vttest = {}
|
||||
#webrender = {} # unwind
|
||||
winit = {}
|
||||
xz = {}
|
||||
zerod = {}
|
||||
zlib = {}
|
||||
@ -1,320 +0,0 @@
|
||||
# The Redox build server configuration
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
|
||||
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
|
||||
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
|
||||
|
||||
# Meta-packages below
|
||||
|
||||
# auto-test = {}
|
||||
# dev-essential = {}
|
||||
# dev-redox = {}
|
||||
# redox-tests = {}
|
||||
# x11-minimal = {}
|
||||
# x11-full = {}
|
||||
|
||||
# Normal packages below
|
||||
|
||||
acid = {}
|
||||
acid-bins = {}
|
||||
base = {}
|
||||
bash = {}
|
||||
bash-completion = {}
|
||||
bootloader = {}
|
||||
bottom = {}
|
||||
ca-certificates = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
cosmic-text = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
dejavu = {}
|
||||
diffutils = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
file = {}
|
||||
findutils = {}
|
||||
freefont = {}
|
||||
freetype2 = {}
|
||||
gawk = {}
|
||||
gcc13 = {}
|
||||
gettext = {}
|
||||
git = {}
|
||||
gnu-binutils = {}
|
||||
gnu-make = {}
|
||||
hicolor-icon-theme = {}
|
||||
installer = {}
|
||||
installer-gui = {}
|
||||
ion = {}
|
||||
kernel = {}
|
||||
kibi = {}
|
||||
libffi = {}
|
||||
libgcc = {}
|
||||
libiconv = {}
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
liborbital = {}
|
||||
libpng = {}
|
||||
libstdcxx = {}
|
||||
libvorbis = {}
|
||||
libxkbcommon = {}
|
||||
libxml2 = {}
|
||||
llvm21 = {}
|
||||
nano = {}
|
||||
nasm = {}
|
||||
ncurses = {}
|
||||
netdb = {}
|
||||
netsurf = {}
|
||||
netutils = {}
|
||||
nghttp2 = {}
|
||||
openssl1 = {}
|
||||
openssl3 = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
patch = {}
|
||||
patchelf = {}
|
||||
pcre = {}
|
||||
pkgutils = {}
|
||||
pls = {}
|
||||
pop-icon-theme = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
ripgrep = {}
|
||||
rust = {}
|
||||
rustpython = {}
|
||||
sdl1 = {}
|
||||
sed = {}
|
||||
shared-mime-info = {}
|
||||
smith = {}
|
||||
terminfo = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
uutils-procps = {}
|
||||
vim = {}
|
||||
xz = {}
|
||||
zlib = {}
|
||||
zstd = {}
|
||||
# #"gcc13.cxx" = {}
|
||||
# #"llvm21.clang" = {}
|
||||
# #"llvm21.clang-dev" = {}
|
||||
# #"llvm21.dev" = {}
|
||||
# #"llvm21.lld" = {}
|
||||
# #"llvm21.lld-dev" = {}
|
||||
# #"llvm21.runtime" = {}
|
||||
# #"python312.dev" = {}
|
||||
# #"rust.doc" = {}
|
||||
# #atk = {} # depends on glib which does not build
|
||||
# #benchmarks = {}
|
||||
# #binutils-gdb = {}
|
||||
# #book = {}
|
||||
# #cairo-demo = {} # linking errors
|
||||
# #classicube = {}
|
||||
# #cmake = {}
|
||||
# #cmatrix = {} # needs ncursesw now
|
||||
# #cookbook = {}
|
||||
# #cosmic-reader = {}
|
||||
# #cosmic-settings = {}
|
||||
# #cosmic-store = {}
|
||||
# #devilutionx = {}
|
||||
# #dynamic-example = {}
|
||||
# #fal
|
||||
# #fd = {} # ctrlc-3.1.1
|
||||
# #flycast = {}
|
||||
# #freeciv = {}
|
||||
# #freeglut = {}
|
||||
# #friar = {} # mio patch
|
||||
# #game-2048 = {} # rustc-serialize
|
||||
# #gigalomania = {} # old recipe format
|
||||
# #gitoxide = {}
|
||||
# #goaccess = {}
|
||||
# #gstreamer = {} # conflict with thread local errno
|
||||
# #harfbuzz = {} # depends on glib which does not build
|
||||
# #helix = {}
|
||||
# #hello-redox = {}
|
||||
# #hematite = {} # needs crate patches for redox-unix
|
||||
# #hf = {}
|
||||
# #ibm-plex = {}
|
||||
# #iced = {}
|
||||
# #jansson = {} # needs config.sub update
|
||||
# #jq = {}
|
||||
# #libarchive = {}
|
||||
# #libatomic = {}
|
||||
# #libcosmic = {}
|
||||
# #libflac = {}
|
||||
# #libmodplug1 = {}
|
||||
# #libmpfr = {}
|
||||
# #libnettle = {}
|
||||
# #libogg = {}
|
||||
# #libpsl = {}
|
||||
# #libssh2 = {}
|
||||
# #libtool = {}
|
||||
# #liburcu = {}
|
||||
# #libuv = {}
|
||||
# #lua-compat-53 = {}
|
||||
# #luajit = {}
|
||||
# #luarocks = {}
|
||||
# #luv = {}
|
||||
# #mdp = {} # gcc hangs
|
||||
# #miniserve = {} # actix
|
||||
# #mpc = {}
|
||||
# #mupen64plus = {}
|
||||
# #ncdu = {} # multiple definitions of symbols
|
||||
# #newlib = {} # obsolete
|
||||
# #newlibtest = {} # obsolete
|
||||
# #noto-color-emoji = {}
|
||||
# #nushell = {} # needs cargo update
|
||||
# #openjk = {}
|
||||
# #openposixtestsuite = {}
|
||||
# #opentyrian = {}
|
||||
# #orbcalculator = {}
|
||||
# #ostest-bins = {}
|
||||
# #pango = {} # undefined references to std::__throw_system_error(int)
|
||||
# #pastel = {} # needs crate patches for redox-unix
|
||||
# #pathfinder = {} # servo-fontconfig
|
||||
# #pciids = {}
|
||||
# #pcre2 = {}
|
||||
# #pixman = {} # depends on glib which does not build
|
||||
# #pkgar = {} # uses virtual Cargo.toml, needs recipe update
|
||||
# #pls = {}
|
||||
# #pop-wallpapers = {}
|
||||
# #powerline = {} # dirs
|
||||
# #qemu = {} # can be built, but not working
|
||||
# #quakespasm = {}
|
||||
# #redox-posix-tests = {}
|
||||
# #redox-ssh = {} # does not compile
|
||||
# #retroarch = {} # OS_TLSIndex not declared
|
||||
# #rust-cairo = {} # linking errors
|
||||
# #rust-cairo-demo = {} # linking errors
|
||||
# #rvvm = {}
|
||||
# #schismtracker = {} # uses system includes
|
||||
# #sdl-player = {} # wctype_t
|
||||
# #sdl2-gfx = {}
|
||||
# #sm64ex = {}
|
||||
# #spacecadetpinball = {}
|
||||
# #twin-commander = {}
|
||||
# #ubuntu-wallpapers = {}
|
||||
# #unibilium = {}
|
||||
# #utf8proc = {}
|
||||
# #vice = {} # linker errors
|
||||
# #vvvvvv = {} # did not compile
|
||||
# #webrender = {} # unwind
|
||||
# #website = {}
|
||||
# #wesnoth = {}
|
||||
# #wget = {}
|
||||
# autoconf = {}
|
||||
# automake = {}
|
||||
# binutils = {}
|
||||
# bzip2 = {}
|
||||
# cairo = {}
|
||||
# cleye = {}
|
||||
# composer = {}
|
||||
# cpal = {}
|
||||
# dosbox = {}
|
||||
# duktape = {}
|
||||
# eduke32 = {}
|
||||
# exampled = {}
|
||||
# expat = {}
|
||||
# extrautils = {}
|
||||
# ffmpeg6 = {}
|
||||
# fontconfig = {}
|
||||
# freedoom = {}
|
||||
# freepats = {}
|
||||
# fribidi = {}
|
||||
# gdbserver = {} # wrong libc type
|
||||
# gdk-pixbuf = {}
|
||||
# gears = {}
|
||||
# generaluser-gs = {}
|
||||
# glib = {}
|
||||
# glutin = {}
|
||||
# gnu-grep = {}
|
||||
# htop = {}
|
||||
# intel-one-mono = {}
|
||||
# lci = {}
|
||||
# libavif = {}
|
||||
# libc-bench = {}
|
||||
# libedit = {}
|
||||
# libgmp = {}
|
||||
# libicu = {}
|
||||
# libonig = {}
|
||||
# libsodium = {}
|
||||
# libuuid = {}
|
||||
# libwebp = {}
|
||||
# lsd = {}
|
||||
# lua54 = {}
|
||||
# lz4 = {}
|
||||
# mednafen = {}
|
||||
# mesa = {} # libudev was not found
|
||||
# mesa-glu = {} # depends on mesa
|
||||
# mgba = {}
|
||||
# mpc = {} # libmpfr not found
|
||||
# ncursesw = {}
|
||||
# neverball = {}
|
||||
# nginx = {}
|
||||
# onefetch = {}
|
||||
# openjazz = {}
|
||||
# openssh = {}
|
||||
# openttd = {}
|
||||
# openttd-opengfx = {}
|
||||
# openttd-openmsx = {}
|
||||
# openttd-opensfx = {}
|
||||
# orbclient = {}
|
||||
# osdemo = {}
|
||||
# perg = {}
|
||||
# periodictable = {}
|
||||
# perl5 = {}
|
||||
# php84 = {}
|
||||
# pixelcannon = {}
|
||||
# pkg-config = {}
|
||||
# prboom = {}
|
||||
# procedural-wallpapers-rs = {}
|
||||
# python312 = {}
|
||||
# readline = {}
|
||||
# redox-fatfs = {}
|
||||
# redox-games = {}
|
||||
# relibc-tests = {}
|
||||
# relibc-tests-bins = {}
|
||||
# rodioplay = {}
|
||||
# rs-nes = {}
|
||||
# rsync = {}
|
||||
# rust64 = {}
|
||||
# rustual-boy = {}
|
||||
# scummvm = {}
|
||||
# sdl-gfx = {}
|
||||
# sdl1-image = {}
|
||||
# sdl1-mixer = {}
|
||||
# sdl1-ttf = {}
|
||||
# sdl2 = {}
|
||||
# sdl2-gears = {}
|
||||
# sdl2-image = {}
|
||||
# sdl2-mixer = {}
|
||||
# sdl2-ttf = {}
|
||||
# servo = {}
|
||||
# shellharden = {}
|
||||
# shellstorm = {}
|
||||
# simple-http-server = {}
|
||||
# sodium = {}
|
||||
# sopwith = {}
|
||||
# sqlite3 = {}
|
||||
# strace = {} # unknown syscall
|
||||
# syobonaction = {}
|
||||
# timidity = {}
|
||||
# tokei = {}
|
||||
# ttf-hack = {}
|
||||
# vttest = {}
|
||||
# webkitgtk3 = {}
|
||||
# winit = {}
|
||||
# xxhash = {}
|
||||
# zoxide = {} # untested
|
||||
@ -1,3 +0,0 @@
|
||||
# Configuration for demonstration
|
||||
|
||||
include = ["../desktop.toml"]
|
||||
@ -1,20 +0,0 @@
|
||||
# Configuration for development
|
||||
|
||||
include = ["../dev.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# see ci.toml for error reasons
|
||||
gdbserver = "ignore"
|
||||
gnu-binutils = "ignore"
|
||||
mesa = "ignore"
|
||||
mesa-glu = "ignore"
|
||||
mpc = "ignore"
|
||||
strace = "ignore"
|
||||
@ -1,3 +0,0 @@
|
||||
# Configuration for Jeremy Soller
|
||||
|
||||
include = ["demo.toml"]
|
||||
@ -1,10 +0,0 @@
|
||||
# Minimal configuration
|
||||
|
||||
include = ["../../minimal.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 256
|
||||
# EFI partition size in MiB
|
||||
efi_partition_size = 128
|
||||
@ -1,8 +0,0 @@
|
||||
# Configuration used for building redoxer base image
|
||||
|
||||
include = ["../redoxer.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1024
|
||||
220
config/acid.toml
220
config/acid.toml
@ -1,31 +1,223 @@
|
||||
# Configuration for "acid" testing
|
||||
|
||||
include = ["base.toml"]
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1024
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
acid = {}
|
||||
#audiod = {}
|
||||
#autoconf = {}
|
||||
#automake = {}
|
||||
#bash = {}
|
||||
#binutils = {}
|
||||
#ca-certificates = {}
|
||||
#cairo = {}
|
||||
#cairodemo = {}
|
||||
#cargo = {}
|
||||
#cleye = {}
|
||||
#cmatrix = {}
|
||||
#contain = {}
|
||||
coreutils = {}
|
||||
ion = {}
|
||||
#cpal = {}
|
||||
#curl = {}
|
||||
#dash = {}
|
||||
#diffutils = {}
|
||||
#dosbox = {}
|
||||
#drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {}
|
||||
#eduke32 = {}
|
||||
#exampled = {}
|
||||
#expat = {}
|
||||
#extrautils = {}
|
||||
#fd = {}
|
||||
#ffmpeg = {}
|
||||
#findutils = {}
|
||||
#freeciv = {}
|
||||
#freedoom = {}
|
||||
#freeglut = {}
|
||||
#freetype = {}
|
||||
#friar = {} # mio patch
|
||||
#game-2048 = {}
|
||||
#games = {}
|
||||
#gawk = {}
|
||||
#gcc = {}
|
||||
#gears = {}
|
||||
#generaluser-gs = {}
|
||||
#gettext = {}
|
||||
#gigalomania = {}
|
||||
#git = {}
|
||||
#glib = {}
|
||||
#glium = {}
|
||||
#glutin = {}
|
||||
#gnu-binutils = {}
|
||||
#gnu-grep = {}
|
||||
#gnu-make = {}
|
||||
#gstreamer = {}
|
||||
#harfbuzz = {}
|
||||
#hematite = {}
|
||||
#init = {}
|
||||
#installer = {}
|
||||
#ion = {}
|
||||
ipcd = {}
|
||||
#jansson = {}
|
||||
#keyboard-sfx = {}
|
||||
#lci = {}
|
||||
#libc-bench = {}
|
||||
#libffi = {}
|
||||
#libiconv = {}
|
||||
#libjpeg = {}
|
||||
#liborbital = {}
|
||||
#libpng = {}
|
||||
#libsodium = {}
|
||||
#llvm = {}
|
||||
logd = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
#mesa = {}
|
||||
#mesa_glu = {}
|
||||
#miniserve = {}
|
||||
#nasm = {}
|
||||
#ncdu = {}
|
||||
#ncurses = {}
|
||||
#ncursesw = {}
|
||||
#netdb = {}
|
||||
#netstack = {}
|
||||
#netsurf = {}
|
||||
#netutils = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
#nulld = {}
|
||||
#openjazz = {}
|
||||
#openssl = {}
|
||||
#openttd = {}
|
||||
#openttd-opengfx = {}
|
||||
#openttd-openmsx = {}
|
||||
#openttd-opensfx = {}
|
||||
#orbdata = {}
|
||||
#orbital = {}
|
||||
#orbterm = {}
|
||||
#orbutils = {}
|
||||
#osdemo = {}
|
||||
#pastel = {}
|
||||
#patch = {}
|
||||
#pciids = {}
|
||||
#pcre = {}
|
||||
#periodictable = {}
|
||||
#perl = {}
|
||||
#pixelcannon = {}
|
||||
#pixman = {}
|
||||
#pkgutils = {}
|
||||
#powerline = {}
|
||||
#prboom = {}
|
||||
ptyd = {}
|
||||
#python = {}
|
||||
#qemu = {}
|
||||
#randd = {}
|
||||
#readline = {} # ncurses
|
||||
#redoxfs = {}
|
||||
#redox-ssh = {}
|
||||
#relibc = {}
|
||||
#ripgrep = {}
|
||||
#rodioplay = {}
|
||||
#rs-nes = {}
|
||||
#rust = {}
|
||||
#rust64 = {}
|
||||
#rust-cairo = {}
|
||||
#rust-cairo-demo = {}
|
||||
#rustual-boy = {}
|
||||
#schismtracker = {}
|
||||
#scummvm = {}
|
||||
#sdl = {}
|
||||
#sdl2 = {}
|
||||
#sdl_gfx = {}
|
||||
#sdl_image = {}
|
||||
#sdl_mixer = {}
|
||||
#sdl_ttf = {}
|
||||
#sdl-player = {}
|
||||
#sed = {}
|
||||
#servo = {}
|
||||
#shellstorm = {}
|
||||
#smith = {}
|
||||
#sodium = {}
|
||||
#sopwith = {}
|
||||
#ssh = {}
|
||||
#syobonaction = {}
|
||||
#terminfo = {}
|
||||
#termplay = {}
|
||||
#timidity = {}
|
||||
#ttf-hack = {}
|
||||
#userutils = {}
|
||||
#uutils = {}
|
||||
#vim = {}
|
||||
#vttest = {}
|
||||
#webrender = {}
|
||||
#winit = {}
|
||||
#xz = {}
|
||||
#zerod = {}
|
||||
#zlib = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
name = "root"
|
||||
home = "/root"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/10_acid"
|
||||
path = "/etc/init.d/00_base"
|
||||
data = """
|
||||
requires_weak 00_base.target
|
||||
ion /usr/lib/run_acid.ion
|
||||
ipcd
|
||||
logd
|
||||
ptyd
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/run_acid.ion"
|
||||
path = "/etc/init.d/10_acid"
|
||||
data = """
|
||||
#!/usr/bin/env ion
|
||||
export RUST_BACKTRACE=full
|
||||
cd /home/user/acid
|
||||
cargo test
|
||||
acid
|
||||
acid create_test
|
||||
acid switch
|
||||
acid tls
|
||||
shutdown
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = "/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/games"
|
||||
data = "/games"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = "/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = "/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = "/share"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/tmp"
|
||||
data = ""
|
||||
directory= true
|
||||
# 0o1777
|
||||
mode = 1023
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
# Configuration for automated testing of essential test suites
|
||||
# Smaller test suites are executed first to catch possible bugs or regressions faster
|
||||
|
||||
include = ["base.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
auto-test = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
ion /usr/lib/run_tests.ion
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/run_tests.ion"
|
||||
data = """
|
||||
#!/usr/bin/env ion
|
||||
export RUST_BACKTRACE=full
|
||||
cd /home/user/acid
|
||||
cargo test
|
||||
bash /root/relibc-tests/run.sh
|
||||
os-test-runner
|
||||
shutdown
|
||||
"""
|
||||
254
config/base.toml
254
config/base.toml
@ -1,254 +0,0 @@
|
||||
# Base configuration: This configuration is meant to be included by
|
||||
# other configurations rather than use directly. It is the greatest
|
||||
# common divisor of all other configurations and misses several
|
||||
# parts necessary to create a bootable system.
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
[packages]
|
||||
base = {}
|
||||
bootloader = {}
|
||||
kernel = {}
|
||||
libgcc = {}
|
||||
libstdcxx = {}
|
||||
netdb = {}
|
||||
netutils = {}
|
||||
relibc = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
|
||||
## Configuration files
|
||||
[[files]]
|
||||
path = "/etc/login_schemes.toml"
|
||||
data = """
|
||||
[user_schemes.root]
|
||||
schemes = ["*"]
|
||||
[user_schemes.user]
|
||||
schemes = [
|
||||
# Kernel schemes
|
||||
"debug",
|
||||
"event",
|
||||
"memory",
|
||||
"pipe",
|
||||
"serio",
|
||||
"irq",
|
||||
"time",
|
||||
"sys",
|
||||
# Base schemes
|
||||
"rand",
|
||||
"null",
|
||||
"zero",
|
||||
"log",
|
||||
# Network schemes
|
||||
"ip",
|
||||
"icmp",
|
||||
"tcp",
|
||||
"udp",
|
||||
# IPC schemes
|
||||
"shm",
|
||||
"chan",
|
||||
"uds_stream",
|
||||
"uds_dgram",
|
||||
# File schemes
|
||||
"file",
|
||||
# Display schemes
|
||||
"display.vesa",
|
||||
"display*",
|
||||
# Other schemes
|
||||
"proc",
|
||||
"pty",
|
||||
"sudo",
|
||||
"audio",
|
||||
"orbital",
|
||||
]
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/hostname"
|
||||
data = "redox"
|
||||
|
||||
## Default net configuration (optimized for QEMU)
|
||||
[[files]]
|
||||
path = "/etc/net/dns"
|
||||
data = """
|
||||
9.9.9.9
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip"
|
||||
data = """
|
||||
10.0.2.15
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_router"
|
||||
data = """
|
||||
10.0.2.2
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_subnet"
|
||||
data = """
|
||||
255.255.255.0
|
||||
"""
|
||||
|
||||
# https://www.freedesktop.org/software/systemd/man/latest/os-release.html
|
||||
[[files]]
|
||||
path = "/usr/lib/os-release"
|
||||
data = """
|
||||
PRETTY_NAME="Redox OS 0.9.0"
|
||||
NAME="Redox OS"
|
||||
VERSION_ID="0.9.0"
|
||||
VERSION="0.9.0"
|
||||
ID="redox-os"
|
||||
|
||||
HOME_URL="https://redox-os.org/"
|
||||
DOCUMENTATION_URL="https://redox-os.org/docs/"
|
||||
SUPPORT_URL="https://redox-os.org/community/"
|
||||
"""
|
||||
# VARIANT and BUILD_ID are appended by redox_installer when creating images.
|
||||
|
||||
[[files]]
|
||||
path = "/etc/os-release"
|
||||
data = "../usr/lib/os-release"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/etc/pkg.d/50_redox"
|
||||
data = "https://static.redox-os.org/pkg"
|
||||
|
||||
## /usr and symlinks for usrmerge
|
||||
[[files]]
|
||||
path = "/usr"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/bin"
|
||||
data = "usr/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/include"
|
||||
data = "usr/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/lib"
|
||||
data = "usr/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/libexec"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/share"
|
||||
data = "usr/share"
|
||||
symlink = true
|
||||
|
||||
## legacy orbital directories
|
||||
[[files]]
|
||||
path = "/ui"
|
||||
data = "usr/share/ui"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share/ui/fonts"
|
||||
data = "/usr/share/fonts"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share/ui/icons"
|
||||
data = "/usr/share/icons"
|
||||
symlink = true
|
||||
|
||||
## /var
|
||||
[[files]]
|
||||
path = "/var"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/var/cache"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/var/lib"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/var/lock"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o1777
|
||||
|
||||
[[files]]
|
||||
path = "/var/log"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/var/run"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o755
|
||||
|
||||
[[files]]
|
||||
path = "/var/tmp"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o1777
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
shell = "/usr/bin/ion"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
shell = "/usr/bin/ion"
|
||||
|
||||
# Group settings
|
||||
[groups.sudo]
|
||||
gid = 1
|
||||
members = ["user"]
|
||||
287
config/coreboot.toml
Normal file
287
config/coreboot.toml
Normal file
@ -0,0 +1,287 @@
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
#acid = {}
|
||||
#audiod = {}
|
||||
#autoconf = {}
|
||||
#automake = {}
|
||||
#bash = {}
|
||||
#binutils = {}
|
||||
#ca-certificates = {}
|
||||
#cairo = {}
|
||||
#cairodemo = {}
|
||||
#cargo = {}
|
||||
#cleye = {}
|
||||
#cmatrix = {}
|
||||
#contain = {}
|
||||
#coreutils = {}
|
||||
#cpal = {}
|
||||
#curl = {}
|
||||
#dash = {}
|
||||
#diffutils = {}
|
||||
#dosbox = {}
|
||||
#drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {}
|
||||
#eduke32 = {}
|
||||
#exampled = {}
|
||||
#expat = {}
|
||||
#extrautils = {}
|
||||
#fd = {}
|
||||
#ffmpeg = {}
|
||||
#findutils = {}
|
||||
#freeciv = {}
|
||||
#freedoom = {}
|
||||
#freeglut = {}
|
||||
#freetype = {}
|
||||
#friar = {} # mio patch
|
||||
#game-2048 = {}
|
||||
#games = {}
|
||||
#gawk = {}
|
||||
#gcc = {}
|
||||
#gears = {}
|
||||
#generaluser-gs = {}
|
||||
#gettext = {}
|
||||
#gigalomania = {}
|
||||
#git = {}
|
||||
#glib = {}
|
||||
#glium = {}
|
||||
#glutin = {}
|
||||
#gnu-binutils = {}
|
||||
#gnu-grep = {}
|
||||
#gnu-make = {}
|
||||
#gstreamer = {}
|
||||
#harfbuzz = {}
|
||||
#hematite = {}
|
||||
#init = {}
|
||||
#installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
#jansson = {}
|
||||
#keyboard-sfx = {}
|
||||
#lci = {}
|
||||
#libc-bench = {}
|
||||
#libffi = {}
|
||||
#libiconv = {}
|
||||
#libjpeg = {}
|
||||
#liborbital = {}
|
||||
#libpng = {}
|
||||
#libsodium = {}
|
||||
#llvm = {}
|
||||
#logd = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
#mesa = {}
|
||||
#mesa_glu = {}
|
||||
#miniserve = {}
|
||||
#nasm = {}
|
||||
#ncdu = {}
|
||||
#ncurses = {}
|
||||
#ncursesw = {}
|
||||
#netdb = {}
|
||||
#netstack = {}
|
||||
#netsurf = {}
|
||||
#netutils = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
#nulld = {}
|
||||
#openjazz = {}
|
||||
#openssl = {}
|
||||
#openttd = {}
|
||||
#openttd-opengfx = {}
|
||||
#openttd-openmsx = {}
|
||||
#openttd-opensfx = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
#orbutils = {}
|
||||
orbutils-background = {}
|
||||
orbutils-launcher = {}
|
||||
orbutils-orblogin = {}
|
||||
#osdemo = {}
|
||||
#pastel = {}
|
||||
#patch = {}
|
||||
#pciids = {}
|
||||
#pcre = {}
|
||||
#periodictable = {}
|
||||
#perl = {}
|
||||
#pixelcannon = {}
|
||||
#pixman = {}
|
||||
#pkgutils = {}
|
||||
#powerline = {}
|
||||
#prboom = {}
|
||||
ptyd = {}
|
||||
#python = {}
|
||||
#qemu = {}
|
||||
#randd = {}
|
||||
#readline = {} # ncurses
|
||||
#redoxfs = {}
|
||||
#redox-ssh = {}
|
||||
#relibc = {}
|
||||
#ripgrep = {}
|
||||
#rodioplay = {}
|
||||
#rs-nes = {}
|
||||
#rust = {}
|
||||
#rust64 = {}
|
||||
#rust-cairo = {}
|
||||
#rust-cairo-demo = {}
|
||||
#rustual-boy = {}
|
||||
#schismtracker = {}
|
||||
#scummvm = {}
|
||||
#sdl = {}
|
||||
#sdl2 = {}
|
||||
#sdl_gfx = {}
|
||||
#sdl_image = {}
|
||||
#sdl_mixer = {}
|
||||
#sdl_ttf = {}
|
||||
#sdl-player = {}
|
||||
#sed = {}
|
||||
#servo = {}
|
||||
#shellstorm = {}
|
||||
#smith = {}
|
||||
#sodium = {}
|
||||
#sopwith = {}
|
||||
#ssh = {}
|
||||
#syobonaction = {}
|
||||
#terminfo = {}
|
||||
#termplay = {}
|
||||
#timidity = {}
|
||||
#ttf-hack = {}
|
||||
#userutils = {}
|
||||
uutils = {}
|
||||
#vim = {}
|
||||
#vttest = {}
|
||||
#webrender = {}
|
||||
#winit = {}
|
||||
#xz = {}
|
||||
#zerod = {}
|
||||
#zlib = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
name = "root"
|
||||
home = "/root"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_base"
|
||||
data = """
|
||||
ipcd
|
||||
#logd
|
||||
ptyd
|
||||
#pcid /etc/pcid.d/
|
||||
"""
|
||||
|
||||
# [[files]]
|
||||
# path = "/etc/init.d/10_net"
|
||||
# data = """
|
||||
# smolnetd
|
||||
# dnsd
|
||||
# dhcpd -b
|
||||
# """
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/20_orbital"
|
||||
data = """
|
||||
#audiod
|
||||
orbital display:2/activate orblogin launcher
|
||||
"""
|
||||
|
||||
# [[files]]
|
||||
# path = "/etc/init.d/30_console"
|
||||
# data = """
|
||||
# getty display:2
|
||||
# getty debug: -J
|
||||
# """
|
||||
#
|
||||
# [[files]]
|
||||
# path = "/etc/net/dns"
|
||||
# data = """
|
||||
# 208.67.222.222
|
||||
# """
|
||||
#
|
||||
# [[files]]
|
||||
# path = "/etc/net/ip"
|
||||
# data = """
|
||||
# 10.0.2.15
|
||||
# """
|
||||
#
|
||||
# [[files]]
|
||||
# path = "/etc/net/ip_router"
|
||||
# data = """
|
||||
# 10.0.2.2
|
||||
# """
|
||||
#
|
||||
# [[files]]
|
||||
# path = "/etc/net/ip_subnet"
|
||||
# data = """
|
||||
# 255.255.255.0
|
||||
# """
|
||||
#
|
||||
# [[files]]
|
||||
# path = "/etc/net/mac"
|
||||
# data = """
|
||||
# 54-52-00-ab-cd-ef
|
||||
# """
|
||||
#
|
||||
# [[files]]
|
||||
# path = "/etc/pkg.d/50_redox"
|
||||
# data = "https://static.redox-os.org/pkg"
|
||||
|
||||
[[files]]
|
||||
path = "/etc/group"
|
||||
data = """
|
||||
root;0;root
|
||||
user;1000;user
|
||||
sudo;1;user
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/hostname"
|
||||
data = """
|
||||
redox
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = "/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/games"
|
||||
data = "/games"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = "/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = "/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = "/share"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/tmp"
|
||||
data = ""
|
||||
directory= true
|
||||
# 0o1777
|
||||
mode = 1023
|
||||
@ -1,42 +0,0 @@
|
||||
# Desktop configuration using the Contain sandbox
|
||||
|
||||
include = ["desktop.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
|
||||
# Override orbital init to use contain_orblogin
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
requires_weak 10_net.target 20_audiod.service
|
||||
nowait VT=3 orbital contain_orblogin launcher
|
||||
"""
|
||||
|
||||
# Override console init to use contain
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
requires_weak 20_orbital
|
||||
nowait getty --contain 2
|
||||
nowait getty --contain /scheme/debug/no-preserve -J
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/contain.toml"
|
||||
data = """
|
||||
pass_schemes = ["rand", "null", "tcp", "udp", "thisproc", "pty", "orbital", "display.vesa"]
|
||||
sandbox_schemes = ["file"]
|
||||
files = ["file:/dev/null"]
|
||||
rofiles = ["file:/etc/passwd", "file:/etc/hostname", "file:/etc/localtime"]
|
||||
dirs = ["file:/tmp"]
|
||||
rodirs = ["file:/bin", "file:/ui"]
|
||||
"""
|
||||
@ -1,31 +0,0 @@
|
||||
# Minimal desktop configuration
|
||||
|
||||
include = ["minimal.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 256
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
requires_weak 10_net.target 20_audiod.service
|
||||
nowait VT=3 orbital orblogin launcher
|
||||
"""
|
||||
|
||||
# Override console config to not switch to VT 2
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
requires_weak 20_orbital
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug/no-preserve -J
|
||||
"""
|
||||
@ -1,26 +1,311 @@
|
||||
# Default build system configuration
|
||||
|
||||
include = ["desktop-minimal.toml", "server.toml"]
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 650
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
dejavu = {}
|
||||
file = {}
|
||||
freefont = {}
|
||||
hicolor-icon-theme = {}
|
||||
installer-gui = {}
|
||||
#acid = {}
|
||||
audiod = {}
|
||||
#autoconf = {}
|
||||
#automake = {}
|
||||
#bash = {}
|
||||
#binutils = {}
|
||||
ca-certificates = {}
|
||||
#cairo = {}
|
||||
#cairodemo = {}
|
||||
#cargo = {}
|
||||
#cleye = {}
|
||||
#cmatrix = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
#cpal = {}
|
||||
#curl = {}
|
||||
dash = {}
|
||||
#diffutils = {}
|
||||
#dosbox = {}
|
||||
drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {}
|
||||
#eduke32 = {}
|
||||
#exampled = {}
|
||||
#expat = {}
|
||||
extrautils = {}
|
||||
#fd = {}
|
||||
#ffmpeg = {}
|
||||
findutils = {}
|
||||
#freeciv = {}
|
||||
#freedoom = {}
|
||||
#freeglut = {}
|
||||
#freetype = {}
|
||||
#friar = {} # mio patch
|
||||
#game-2048 = {}
|
||||
#games = {}
|
||||
#gawk = {}
|
||||
#gcc = {}
|
||||
gdbserver = {}
|
||||
#gears = {}
|
||||
#generaluser-gs = {}
|
||||
#gettext = {}
|
||||
#gigalomania = {}
|
||||
#git = {}
|
||||
#glib = {}
|
||||
#glium = {}
|
||||
#glutin = {}
|
||||
#gnu-binutils = {}
|
||||
#gnu-grep = {}
|
||||
#gnu-make = {}
|
||||
#gstreamer = {}
|
||||
#harfbuzz = {}
|
||||
#hematite = {}
|
||||
#init = {}
|
||||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
#jansson = {}
|
||||
#keyboard-sfx = {}
|
||||
#lci = {}
|
||||
#libc-bench = {}
|
||||
#libffi = {}
|
||||
#libiconv = {}
|
||||
#libjpeg = {}
|
||||
#liborbital = {}
|
||||
#libpng = {}
|
||||
#libsodium = {}
|
||||
#llvm = {}
|
||||
logd = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
#mesa = {}
|
||||
#mesa_glu = {}
|
||||
#miniserve = {}
|
||||
#nasm = {}
|
||||
#ncdu = {}
|
||||
#ncurses = {}
|
||||
#ncursesw = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netsurf = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
shared-mime-info = {}
|
||||
# orbterm from desktop-minimal should be ignored
|
||||
orbterm = "ignore"
|
||||
netutils = {}
|
||||
#neverball = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
#nulld = {}
|
||||
#openjazz = {}
|
||||
#openssl = {}
|
||||
#openttd = {}
|
||||
#openttd-opengfx = {}
|
||||
#openttd-openmsx = {}
|
||||
#openttd-opensfx = {}
|
||||
#orbclient = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
#osdemo = {}
|
||||
#pastel = {}
|
||||
#patch = {}
|
||||
#pciids = {}
|
||||
#pcre = {}
|
||||
#periodictable = {}
|
||||
#perl = {}
|
||||
#pixelcannon = {}
|
||||
#pixman = {}
|
||||
pkgutils = {}
|
||||
#powerline = {}
|
||||
#prboom = {}
|
||||
ptyd = {}
|
||||
#python = {}
|
||||
#qemu = {}
|
||||
#randd = {}
|
||||
#readline = {} # ncurses
|
||||
redoxfs = {}
|
||||
#redox-fatfs = {}
|
||||
#redox-ssh = {}
|
||||
#relibc = {}
|
||||
#relibc-tests = {}
|
||||
#ripgrep = {}
|
||||
#rodioplay = {}
|
||||
#rs-nes = {}
|
||||
#rust = {}
|
||||
#rust64 = {}
|
||||
#rust-cairo = {}
|
||||
#rust-cairo-demo = {}
|
||||
#rustual-boy = {}
|
||||
#schismtracker = {}
|
||||
#scummvm = {}
|
||||
#sdl = {}
|
||||
#sdl2 = {}
|
||||
#sdl2_gears = {}
|
||||
#sdl_gfx = {}
|
||||
#sdl_image = {}
|
||||
#sdl_mixer = {}
|
||||
#sdl_ttf = {}
|
||||
#sdl-player = {}
|
||||
#sed = {}
|
||||
#servo = {}
|
||||
#shellstorm = {}
|
||||
smith = {}
|
||||
#sodium = {}
|
||||
#sopwith = {}
|
||||
#ssh = {}
|
||||
strace = {}
|
||||
#syobonaction = {}
|
||||
#terminfo = {}
|
||||
#termplay = {}
|
||||
#timidity = {}
|
||||
#ttf-hack = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
#vim = {}
|
||||
#vttest = {}
|
||||
#webrender = {}
|
||||
#winit = {}
|
||||
#xz = {}
|
||||
#zerod = {}
|
||||
#zlib = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
name = "root"
|
||||
home = "/root"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_base"
|
||||
data = """
|
||||
ipcd
|
||||
logd
|
||||
ptyd
|
||||
pcid /etc/pcid.d/
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/10_net"
|
||||
data = """
|
||||
smolnetd
|
||||
dnsd
|
||||
dhcpd -b
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/20_orbital"
|
||||
data = """
|
||||
audiod
|
||||
orbital display:3/activate orblogin launcher
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/30_console"
|
||||
data = """
|
||||
getty display:2
|
||||
getty debug: -J
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/dns"
|
||||
data = """
|
||||
208.67.222.222
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip"
|
||||
data = """
|
||||
10.0.2.15
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_router"
|
||||
data = """
|
||||
10.0.2.2
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_subnet"
|
||||
data = """
|
||||
255.255.255.0
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/mac"
|
||||
data = """
|
||||
54-52-00-ab-cd-ef
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/pkg.d/50_redox"
|
||||
data = "https://static.redox-os.org/pkg"
|
||||
|
||||
[[files]]
|
||||
path = "/etc/group"
|
||||
data = """
|
||||
root;0;root
|
||||
user;1000;user
|
||||
sudo;1;user
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/hostname"
|
||||
data = """
|
||||
redox
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = "/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/games"
|
||||
data = "/games"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = "/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = "/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = "/share"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/tmp"
|
||||
data = ""
|
||||
directory= true
|
||||
# 0o1777
|
||||
mode = 1023
|
||||
|
||||
[[files]]
|
||||
path = "/dev/null"
|
||||
data = "null:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/random"
|
||||
data = "rand:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/urandom"
|
||||
data = "rand:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/zero"
|
||||
data = "zero:"
|
||||
symlink = true
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
# Configuration for development
|
||||
|
||||
include = ["desktop.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 20000
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
dev-redox = {}
|
||||
hello-redox = {}
|
||||
@ -1,317 +0,0 @@
|
||||
# The Redox build server configuration
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
|
||||
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
|
||||
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
|
||||
|
||||
# Meta-packages below
|
||||
|
||||
# auto-test = {}
|
||||
# dev-essential = {}
|
||||
# dev-redox = {}
|
||||
# redox-tests = {}
|
||||
# x11-minimal = {}
|
||||
# x11-full = {}
|
||||
|
||||
# Normal packages below
|
||||
|
||||
# acid = {} # rust require dynamic linking
|
||||
acid-bins = {}
|
||||
base = {}
|
||||
bash = {}
|
||||
bash-completion = {}
|
||||
bootloader = {}
|
||||
bottom = {}
|
||||
ca-certificates = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
cosmic-text = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
dejavu = {}
|
||||
diffutils = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
file = {}
|
||||
findutils = {}
|
||||
freefont = {}
|
||||
freetype2 = {}
|
||||
gettext = {}
|
||||
git = {}
|
||||
gnu-make = {}
|
||||
hicolor-icon-theme = {}
|
||||
installer = {}
|
||||
installer-gui = {}
|
||||
ion = {}
|
||||
kernel = {}
|
||||
kibi = {}
|
||||
libffi = {}
|
||||
libgcc = {}
|
||||
libiconv = {}
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
liborbital = {}
|
||||
libpng = {}
|
||||
libstdcxx = {}
|
||||
libvorbis = {}
|
||||
libxkbcommon = {}
|
||||
libxml2 = {}
|
||||
nano = {}
|
||||
nasm = {}
|
||||
ncurses = {}
|
||||
netdb = {}
|
||||
netsurf = {}
|
||||
netutils = {}
|
||||
nghttp2 = {}
|
||||
openssl1 = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
patch = {}
|
||||
pcre = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
pkgutils = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
ripgrep = {}
|
||||
rustpython = {}
|
||||
sdl1 = {}
|
||||
sed = {}
|
||||
shared-mime-info = {}
|
||||
smith = {}
|
||||
terminfo = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
uutils-procps = {}
|
||||
xz = {}
|
||||
#vim = {} # conflicting types
|
||||
zlib = {}
|
||||
|
||||
# #"gcc13.cxx" = {}
|
||||
# #"llvm21.clang" = {}
|
||||
# #"llvm21.clang-dev" = {}
|
||||
# #"llvm21.dev" = {}
|
||||
# #"llvm21.lld" = {}
|
||||
# #"llvm21.lld-dev" = {}
|
||||
# #"llvm21.runtime" = {}
|
||||
# #"python312.dev" = {}
|
||||
# #"rust.doc" = {}
|
||||
# #atk = {} # depends on glib which does not build
|
||||
# #benchmarks = {}
|
||||
# #binutils-gdb = {}
|
||||
# #book = {}
|
||||
# #cairo-demo = {} # linking errors
|
||||
# #classicube = {}
|
||||
# #cmake = {}
|
||||
# #cmatrix = {} # needs ncursesw now
|
||||
# #cookbook = {}
|
||||
# #cosmic-reader = {}
|
||||
# #cosmic-settings = {}
|
||||
# #cosmic-store = {}
|
||||
# #devilutionx = {}
|
||||
# #dynamic-example = {}
|
||||
# #fal
|
||||
# #fd = {} # ctrlc-3.1.1
|
||||
# #flycast = {}
|
||||
# #freeciv = {}
|
||||
# #freeglut = {}
|
||||
# #friar = {} # mio patch
|
||||
# #game-2048 = {} # rustc-serialize
|
||||
# #gawk = {} # langinfo.h
|
||||
# #gigalomania = {} # old recipe format
|
||||
# #gitoxide = {}
|
||||
# #goaccess = {}
|
||||
# #gstreamer = {} # conflict with thread local errno
|
||||
# #harfbuzz = {} # depends on glib which does not build
|
||||
# #helix = {}
|
||||
# #hello-redox = {}
|
||||
# #hematite = {} # needs crate patches for redox-unix
|
||||
# #hf = {}
|
||||
# #ibm-plex = {}
|
||||
# #iced = {}
|
||||
# #jansson = {} # needs config.sub update
|
||||
# #jq = {}
|
||||
# #libarchive = {}
|
||||
# #libatomic = {}
|
||||
# #libcosmic = {}
|
||||
# #libflac = {}
|
||||
# #libmodplug1 = {}
|
||||
# #libmpfr = {}
|
||||
# #libnettle = {}
|
||||
# #libogg = {}
|
||||
# #libpsl = {}
|
||||
# #libssh2 = {}
|
||||
# #libtool = {}
|
||||
# #liburcu = {}
|
||||
# #libuv = {}
|
||||
# #lua-compat-53 = {}
|
||||
# #luajit = {}
|
||||
# #luarocks = {}
|
||||
# #luv = {}
|
||||
# #mdp = {} # gcc hangs
|
||||
# #miniserve = {} # actix
|
||||
# #mpc = {}
|
||||
# #mupen64plus = {}
|
||||
# #ncdu = {} # multiple definitions of symbols
|
||||
# #newlib = {} # obsolete
|
||||
# #newlibtest = {} # obsolete
|
||||
# #noto-color-emoji = {}
|
||||
# #nushell = {} # needs cargo update
|
||||
# #openjk = {}
|
||||
# #openposixtestsuite = {}
|
||||
# #opentyrian = {}
|
||||
# #orbcalculator = {}
|
||||
# #ostest-bins = {}
|
||||
# #pango = {} # undefined references to std::__throw_system_error(int)
|
||||
# #pastel = {} # needs crate patches for redox-unix
|
||||
# #pathfinder = {} # servo-fontconfig
|
||||
# #pciids = {}
|
||||
# #pcre2 = {}
|
||||
# #pixman = {} # depends on glib which does not build
|
||||
# #pkgar = {} # uses virtual Cargo.toml, needs recipe update
|
||||
# #pls = {}
|
||||
# #pop-wallpapers = {}
|
||||
# #powerline = {} # dirs
|
||||
# #qemu = {} # can be built, but not working
|
||||
# #quakespasm = {}
|
||||
# #redox-posix-tests = {}
|
||||
# #redox-ssh = {} # does not compile
|
||||
# #retroarch = {} # OS_TLSIndex not declared
|
||||
# #rust-cairo = {} # linking errors
|
||||
# #rust-cairo-demo = {} # linking errors
|
||||
# #rvvm = {}
|
||||
# #schismtracker = {} # uses system includes
|
||||
# #sdl-player = {} # wctype_t
|
||||
# #sdl2-gfx = {}
|
||||
# #sm64ex = {}
|
||||
# #spacecadetpinball = {}
|
||||
# #twin-commander = {}
|
||||
# #ubuntu-wallpapers = {}
|
||||
# #unibilium = {}
|
||||
# #utf8proc = {}
|
||||
# #vice = {} # linker errors
|
||||
# #vvvvvv = {} # did not compile
|
||||
# #webrender = {} # unwind
|
||||
# #website = {}
|
||||
# #wesnoth = {}
|
||||
# #wget = {}
|
||||
# autoconf = {}
|
||||
# automake = {}
|
||||
# binutils = {}
|
||||
# bzip2 = {}
|
||||
# cairo = {}
|
||||
# cleye = {}
|
||||
# composer = {}
|
||||
# cpal = {}
|
||||
# dosbox = {}
|
||||
# duktape = {}
|
||||
# eduke32 = {}
|
||||
# exampled = {}
|
||||
# ffmpeg6 = {}
|
||||
# fontconfig = {}
|
||||
# freedoom = {}
|
||||
# freepats = {}
|
||||
# fribidi = {}
|
||||
# gcc13 = {}
|
||||
# gdbserver = {}
|
||||
# gdk-pixbuf = {}
|
||||
# gears = {}
|
||||
# generaluser-gs = {}
|
||||
# glib = {}
|
||||
# glutin = {}
|
||||
# gnu-binutils = {}
|
||||
# gnu-grep = {}
|
||||
# htop = {}
|
||||
# intel-one-mono = {}
|
||||
# lci = {}
|
||||
# libavif = {}
|
||||
# libc-bench = {}
|
||||
# libedit = {}
|
||||
# libgmp = {}
|
||||
# libicu = {}
|
||||
# libonig = {}
|
||||
# libsodium = {}
|
||||
# libuuid = {}
|
||||
# libwebp = {}
|
||||
# llvm21 = {}
|
||||
# lsd = {}
|
||||
# lua54 = {}
|
||||
# lz4 = {}
|
||||
# mednafen = {}
|
||||
# mesa = {}
|
||||
# mesa-glu = {}
|
||||
# mgba = {}
|
||||
# ncursesw = {}
|
||||
# neverball = {}
|
||||
# nginx = {}
|
||||
# onefetch = {}
|
||||
# openjazz = {}
|
||||
# openssh = {}
|
||||
# openssl3 = {}
|
||||
# openttd = {}
|
||||
# openttd-opengfx = {}
|
||||
# openttd-openmsx = {}
|
||||
# openttd-opensfx = {}
|
||||
# orbclient = {}
|
||||
# osdemo = {}
|
||||
# perg = {}
|
||||
# periodictable = {}
|
||||
# perl5 = {}
|
||||
# php84 = {}
|
||||
# pixelcannon = {}
|
||||
# pkg-config = {}
|
||||
# prboom = {}
|
||||
# procedural-wallpapers-rs = {}
|
||||
# python312 = {}
|
||||
# readline = {}
|
||||
# redox-fatfs = {}
|
||||
# redox-games = {}
|
||||
# relibc-tests = {}
|
||||
# relibc-tests-bins = {}
|
||||
# rodioplay = {}
|
||||
# rs-nes = {}
|
||||
# rsync = {}
|
||||
# rust = {}
|
||||
# rust64 = {}
|
||||
# rustual-boy = {}
|
||||
# scummvm = {}
|
||||
# sdl-gfx = {}
|
||||
# sdl1-image = {}
|
||||
# sdl1-mixer = {}
|
||||
# sdl1-ttf = {}
|
||||
# sdl2 = {}
|
||||
# sdl2-gears = {}
|
||||
# sdl2-image = {}
|
||||
# sdl2-mixer = {}
|
||||
# sdl2-ttf = {}
|
||||
# servo = {}
|
||||
# shellharden = {}
|
||||
# shellstorm = {}
|
||||
# simple-http-server = {}
|
||||
# sodium = {}
|
||||
# sopwith = {}
|
||||
# sqlite3 = {}
|
||||
# strace = {}
|
||||
# syobonaction = {}
|
||||
# timidity = {}
|
||||
# tokei = {}
|
||||
# ttf-hack = {}
|
||||
# vttest = {}
|
||||
# webkitgtk3 = {}
|
||||
# winit = {}
|
||||
# xxhash = {}
|
||||
# zoxide = {} # untested
|
||||
# zstd = {}
|
||||
@ -1,48 +0,0 @@
|
||||
# Configuration for demonstration
|
||||
|
||||
include = ["../desktop.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 768
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# Games
|
||||
dosbox = {}
|
||||
freedoom = {}
|
||||
prboom = {}
|
||||
redox-games = {}
|
||||
|
||||
# Demos
|
||||
pixelcannon = {}
|
||||
|
||||
# MIDI
|
||||
freepats = {}
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/Welcome.txt"
|
||||
data = """
|
||||
##############################################################################
|
||||
# #
|
||||
# Welcome to Redox! #
|
||||
# #
|
||||
# Redox is an operating system written in Rust, a language with focus #
|
||||
# on safety and high performance. Redox, following the microkernel design, #
|
||||
# aims to be secure, usable, and free. Redox is inspired by previous kernels #
|
||||
# and operating systems, such as SeL4, MINIX, Plan 9, and BSD. #
|
||||
# #
|
||||
# Redox _is not_ just a kernel, it's a full-featured Operating System, #
|
||||
# providing packages (memory allocator, file system, display manager, core #
|
||||
# utilities, etc.) that together make up a functional and convenient #
|
||||
# operating system. You can loosely think of it as the GNU or BSD ecosystem, #
|
||||
# but in a memory safe language and with modern technology. #
|
||||
# #
|
||||
# The website can be found at https://www.redox-os.org. #
|
||||
# #
|
||||
# For things to try on Redox, please see #
|
||||
# https://doc.redox-os.org/book/ch02-06-trying-out-redox.html #
|
||||
# #
|
||||
##############################################################################
|
||||
"""
|
||||
@ -1,14 +0,0 @@
|
||||
# Configuration for development
|
||||
|
||||
include = ["../dev.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
@ -1,39 +0,0 @@
|
||||
# Configuration for Jeremy Soller
|
||||
|
||||
include = ["../desktop.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 4000
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# apps
|
||||
cosmic-text = {}
|
||||
pixelcannon = {}
|
||||
sodium = {}
|
||||
|
||||
# cli
|
||||
acid = {}
|
||||
cleye = {}
|
||||
ripgrep = {}
|
||||
|
||||
# demos
|
||||
cpal = {}
|
||||
orbclient = {}
|
||||
rodioplay = {}
|
||||
winit = {}
|
||||
|
||||
# games
|
||||
dosbox = {}
|
||||
eduke32 = {}
|
||||
freedoom = {}
|
||||
prboom = {}
|
||||
redox-games = {}
|
||||
|
||||
# stuff
|
||||
freepats = {}
|
||||
generaluser-gs = {}
|
||||
jeremy = {}
|
||||
ttf-hack = {}
|
||||
@ -1,8 +0,0 @@
|
||||
# Configuration used for building redoxer base image
|
||||
|
||||
include = ["../redoxer.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1024
|
||||
328
config/maximal.toml
Normal file
328
config/maximal.toml
Normal file
@ -0,0 +1,328 @@
|
||||
# This is a maximum configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
acid = {}
|
||||
atk = {}
|
||||
audiod = {}
|
||||
autoconf = {}
|
||||
automake = {}
|
||||
#bash = {}
|
||||
binutils = {}
|
||||
ca-certificates = {}
|
||||
cairo = {}
|
||||
cairodemo = {}
|
||||
#cargo = {}
|
||||
cleye = {}
|
||||
cmatrix = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cpal = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
diffutils = {}
|
||||
dosbox = {}
|
||||
drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {}
|
||||
eduke32 = {}
|
||||
exampled = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
#fd = {}
|
||||
ffmpeg = {}
|
||||
findutils = {}
|
||||
fontconfig = {}
|
||||
#freeciv = {}
|
||||
freedoom = {}
|
||||
#freeglut = {}
|
||||
freetype = {}
|
||||
#friar = {} # mio patch
|
||||
fribidi = {}
|
||||
#game-2048 = {}
|
||||
games = {}
|
||||
#gawk = {}
|
||||
gcc = {}
|
||||
gdbserver = {}
|
||||
#gdk-pixbuf = {}
|
||||
gears = {}
|
||||
generaluser-gs = {}
|
||||
gettext = {}
|
||||
gigalomania = {}
|
||||
git = {}
|
||||
glib = {}
|
||||
glium = {}
|
||||
glutin = {}
|
||||
gnu-binutils = {}
|
||||
gnu-grep = {}
|
||||
gnu-make = {}
|
||||
#gstreamer = {}
|
||||
harfbuzz = {}
|
||||
#hematite = {}
|
||||
#init = {}
|
||||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
jansson = {}
|
||||
keyboard-sfx = {}
|
||||
lci = {}
|
||||
libc-bench = {}
|
||||
libffi = {}
|
||||
libiconv = {}
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
liborbital = {}
|
||||
libpng = {}
|
||||
libsodium = {}
|
||||
libvorbis = {}
|
||||
libxml2 = {}
|
||||
llvm = {}
|
||||
logd = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
mesa = {}
|
||||
mesa_glu = {}
|
||||
#mgba = {}
|
||||
#miniserve = {}
|
||||
nasm = {}
|
||||
#ncdu = {}
|
||||
ncurses = {}
|
||||
#ncursesw = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netsurf = {}
|
||||
netutils = {}
|
||||
#neverball = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
nghttp2 = {}
|
||||
#nulld = {}
|
||||
openjazz = {}
|
||||
openssl = {}
|
||||
openttd = {}
|
||||
openttd-opengfx = {}
|
||||
openttd-openmsx = {}
|
||||
openttd-opensfx = {}
|
||||
orbclient = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
osdemo = {}
|
||||
pango = {}
|
||||
#pastel = {}
|
||||
patch = {}
|
||||
#pathfinder = {}
|
||||
#pciids = {}
|
||||
pcre = {}
|
||||
periodictable = {}
|
||||
#perl = {}
|
||||
pixelcannon = {}
|
||||
pixman = {}
|
||||
pkg-config = {}
|
||||
pkgutils = {}
|
||||
#powerline = {}
|
||||
prboom = {}
|
||||
ptyd = {}
|
||||
#python = {}
|
||||
#qemu = {}
|
||||
randd = {}
|
||||
readline = {} # ncurses
|
||||
redoxfs = {}
|
||||
#redox-fatfs = {}
|
||||
#redox-ssh = {}
|
||||
relibc = {}
|
||||
#relibc-tests = {}
|
||||
ripgrep = {}
|
||||
rodioplay = {}
|
||||
rs-nes = {}
|
||||
#rust = {}
|
||||
rust64 = {}
|
||||
rust-cairo = {}
|
||||
rust-cairo-demo = {}
|
||||
rustual-boy = {}
|
||||
schismtracker = {}
|
||||
scummvm = {}
|
||||
sdl = {}
|
||||
sdl2 = {}
|
||||
sdl2_gears = {}
|
||||
sdl2_image = {}
|
||||
sdl2_mixer = {}
|
||||
sdl2_ttf = {}
|
||||
sdl_gfx = {}
|
||||
sdl_image = {}
|
||||
sdl_mixer = {}
|
||||
sdl-player = {}
|
||||
#sdl_ttf = {}
|
||||
sed = {}
|
||||
#servo = {}
|
||||
#shared-mime-info = {}
|
||||
shellstorm = {}
|
||||
smith = {}
|
||||
sodium = {}
|
||||
sopwith = {}
|
||||
#ssh = {}
|
||||
strace = {}
|
||||
#syobonaction = {}
|
||||
terminfo = {}
|
||||
#termplay = {}
|
||||
timidity = {}
|
||||
ttf-hack = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
vice = {}
|
||||
#vim = {}
|
||||
vttest = {}
|
||||
#webrender = {}
|
||||
winit = {}
|
||||
xz = {}
|
||||
#zerod = {}
|
||||
zlib = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
name = "root"
|
||||
home = "/root"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_base"
|
||||
data = """
|
||||
ipcd
|
||||
logd
|
||||
ptyd
|
||||
pcid /etc/pcid.d/
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/10_net"
|
||||
data = """
|
||||
smolnetd
|
||||
dnsd
|
||||
dhcpd -b
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/20_orbital"
|
||||
data = """
|
||||
audiod
|
||||
orbital display:3/activate orblogin launcher
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/30_console"
|
||||
data = """
|
||||
getty display:2
|
||||
getty debug: -J
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/dns"
|
||||
data = """
|
||||
208.67.222.222
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip"
|
||||
data = """
|
||||
10.0.2.15
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_router"
|
||||
data = """
|
||||
10.0.2.2
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_subnet"
|
||||
data = """
|
||||
255.255.255.0
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/mac"
|
||||
data = """
|
||||
54-52-00-ab-cd-ef
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/pkg.d/50_redox"
|
||||
data = "https://static.redox-os.org/pkg"
|
||||
|
||||
[[files]]
|
||||
path = "/etc/group"
|
||||
data = """
|
||||
root;0;root
|
||||
user;1000;user
|
||||
sudo;1;user
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/hostname"
|
||||
data = """
|
||||
redox
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = "/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/games"
|
||||
data = "/games"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = "/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = "/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = "/share"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/tmp"
|
||||
data = ""
|
||||
directory= true
|
||||
# 0o1777
|
||||
mode = 1023
|
||||
|
||||
[[files]]
|
||||
path = "/dev/null"
|
||||
data = "null:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/random"
|
||||
data = "rand:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/urandom"
|
||||
data = "rand:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/zero"
|
||||
data = "zero:"
|
||||
symlink = true
|
||||
@ -1,27 +1,213 @@
|
||||
# Minimal configuration
|
||||
|
||||
include = ["base.toml"]
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 196
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
ca-certificates = {}
|
||||
coreutils = {}
|
||||
extrautils = {}
|
||||
ion = {}
|
||||
pkgutils = {}
|
||||
kibi = {}
|
||||
uutils-procps = {}
|
||||
#acid = {}
|
||||
#audiod = {}
|
||||
#autoconf = {}
|
||||
#automake = {}
|
||||
#bash = {}
|
||||
#binutils = {}
|
||||
#ca-certificates = {}
|
||||
#cairo = {}
|
||||
#cairodemo = {}
|
||||
#cargo = {}
|
||||
#cleye = {}
|
||||
#cmatrix = {}
|
||||
#contain = {}
|
||||
#coreutils = {}
|
||||
#cpal = {}
|
||||
#curl = {}
|
||||
#dash = {}
|
||||
#diffutils = {}
|
||||
#dosbox = {}
|
||||
#drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {}
|
||||
#eduke32 = {}
|
||||
#exampled = {}
|
||||
#expat = {}
|
||||
#extrautils = {}
|
||||
#fd = {}
|
||||
#ffmpeg = {}
|
||||
#findutils = {}
|
||||
#freeciv = {}
|
||||
#freedoom = {}
|
||||
#freeglut = {}
|
||||
#freetype = {}
|
||||
#friar = {} # mio patch
|
||||
#game-2048 = {}
|
||||
#games = {}
|
||||
#gawk = {}
|
||||
#gcc = {}
|
||||
#gears = {}
|
||||
#generaluser-gs = {}
|
||||
#gettext = {}
|
||||
#gigalomania = {}
|
||||
#git = {}
|
||||
#glib = {}
|
||||
#glium = {}
|
||||
#glutin = {}
|
||||
#gnu-binutils = {}
|
||||
#gnu-grep = {}
|
||||
#gnu-make = {}
|
||||
#gstreamer = {}
|
||||
#harfbuzz = {}
|
||||
#hematite = {}
|
||||
#init = {}
|
||||
#installer = {}
|
||||
#ion = {}
|
||||
ipcd = {}
|
||||
#jansson = {}
|
||||
#keyboard-sfx = {}
|
||||
#lci = {}
|
||||
#libc-bench = {}
|
||||
#libffi = {}
|
||||
#libiconv = {}
|
||||
#libjpeg = {}
|
||||
#liborbital = {}
|
||||
#libpng = {}
|
||||
#libsodium = {}
|
||||
#llvm = {}
|
||||
logd = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
#mesa = {}
|
||||
#mesa_glu = {}
|
||||
#miniserve = {}
|
||||
#nasm = {}
|
||||
#ncdu = {}
|
||||
#ncurses = {}
|
||||
#ncursesw = {}
|
||||
#netdb = {}
|
||||
#netstack = {}
|
||||
#netsurf = {}
|
||||
#netutils = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
#nulld = {}
|
||||
#openjazz = {}
|
||||
#openssl = {}
|
||||
#openttd = {}
|
||||
#openttd-opengfx = {}
|
||||
#openttd-openmsx = {}
|
||||
#openttd-opensfx = {}
|
||||
#orbdata = {}
|
||||
#orbital = {}
|
||||
#orbterm = {}
|
||||
#orbutils = {}
|
||||
#osdemo = {}
|
||||
#pastel = {}
|
||||
#patch = {}
|
||||
#pciids = {}
|
||||
#pcre = {}
|
||||
#periodictable = {}
|
||||
#perl = {}
|
||||
#pixelcannon = {}
|
||||
#pixman = {}
|
||||
#pkgutils = {}
|
||||
#powerline = {}
|
||||
#prboom = {}
|
||||
ptyd = {}
|
||||
#python = {}
|
||||
#qemu = {}
|
||||
#randd = {}
|
||||
#readline = {} # ncurses
|
||||
#redoxfs = {}
|
||||
#redox-ssh = {}
|
||||
#relibc = {}
|
||||
#ripgrep = {}
|
||||
#rodioplay = {}
|
||||
#rs-nes = {}
|
||||
#rust = {}
|
||||
#rust64 = {}
|
||||
#rust-cairo = {}
|
||||
#rust-cairo-demo = {}
|
||||
#rustual-boy = {}
|
||||
#schismtracker = {}
|
||||
#scummvm = {}
|
||||
#sdl = {}
|
||||
#sdl2 = {}
|
||||
#sdl_gfx = {}
|
||||
#sdl_image = {}
|
||||
#sdl_mixer = {}
|
||||
#sdl_ttf = {}
|
||||
#sdl-player = {}
|
||||
#sed = {}
|
||||
#servo = {}
|
||||
#shellstorm = {}
|
||||
#smith = {}
|
||||
#sodium = {}
|
||||
#sopwith = {}
|
||||
#ssh = {}
|
||||
#syobonaction = {}
|
||||
#terminfo = {}
|
||||
#termplay = {}
|
||||
#timidity = {}
|
||||
#ttf-hack = {}
|
||||
#userutils = {}
|
||||
#uutils = {}
|
||||
#vim = {}
|
||||
#vttest = {}
|
||||
#webrender = {}
|
||||
#winit = {}
|
||||
#xz = {}
|
||||
#zerod = {}
|
||||
#zlib = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
name = "root"
|
||||
home = "/root"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
path = "/etc/init.d/00_base"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
inputd -A 2
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug/no-preserve -J
|
||||
ipcd
|
||||
logd
|
||||
ptyd
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = "/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/games"
|
||||
data = "/games"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = "/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = "/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = "/share"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/tmp"
|
||||
data = ""
|
||||
directory= true
|
||||
# 0o1777
|
||||
mode = 1023
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
# Configuration for "os-test" testing
|
||||
|
||||
include = ["server.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1024
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
os-test-bins = {} # Provides source and cross-compiled binaries
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
RUST_BACKTRACE=full os-test-runner
|
||||
shutdown
|
||||
"""
|
||||
@ -1,18 +0,0 @@
|
||||
# Configuration for the Redoxer GUI image
|
||||
|
||||
include = ["redoxer.toml"]
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
|
||||
# Override to run inside of orbital
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_redoxer"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
echo
|
||||
echo "## running redoxer in orbital ##"
|
||||
nowait VT=3 orbital redoxerd
|
||||
"""
|
||||
@ -1,57 +0,0 @@
|
||||
# Configuration for the Redoxer image
|
||||
|
||||
include = ["base.toml"]
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
bash = {}
|
||||
ca-certificates = {}
|
||||
coreutils = {}
|
||||
extrautils = {}
|
||||
findutils = {}
|
||||
gnu-make = {}
|
||||
ion = {}
|
||||
pkgutils = {}
|
||||
relibc = {}
|
||||
sed = {}
|
||||
|
||||
# Override to not background dhcpd
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/10_dhcpd.service"
|
||||
data = """
|
||||
[unit]
|
||||
description = "Network configuration using DHCP"
|
||||
requires_weak = [
|
||||
"10_smolnetd.service",
|
||||
]
|
||||
|
||||
[service]
|
||||
cmd = "dhcpd"
|
||||
type = "oneshot"
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_redoxer"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
ion /usr/lib/run_redoxer.ion
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/run_redoxer.ion"
|
||||
data = """
|
||||
#!/usr/bin/env ion
|
||||
echo
|
||||
echo "## preparing environment ##"
|
||||
export GROUPS=0
|
||||
export HOME=/root
|
||||
export HOST=redox
|
||||
export SHELL=/bin/sh
|
||||
export UID=0
|
||||
export USER=root
|
||||
cd /root
|
||||
env
|
||||
echo
|
||||
echo "## running redoxer ##"
|
||||
redoxerd
|
||||
"""
|
||||
@ -1,318 +0,0 @@
|
||||
# The Redox build server configuration
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
|
||||
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
|
||||
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
|
||||
|
||||
# Meta-packages below
|
||||
|
||||
# auto-test = {}
|
||||
# dev-essential = {}
|
||||
# dev-redox = {}
|
||||
# redox-tests = {}
|
||||
# x11-minimal = {}
|
||||
# x11-full = {}
|
||||
|
||||
# Normal packages below
|
||||
|
||||
# acid = {} # rust require dynamic linking
|
||||
acid-bins = {}
|
||||
base = {}
|
||||
bash = {}
|
||||
bash-completion = {}
|
||||
bootloader = {}
|
||||
bottom = {}
|
||||
ca-certificates = {}
|
||||
#contain = {} # redox_syscall 0.4 not working on riscv64gc?
|
||||
coreutils = {}
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
#cosmic-text = {} # need to bump redox_syscall
|
||||
curl = {}
|
||||
dash = {}
|
||||
dejavu = {}
|
||||
diffutils = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
file = {}
|
||||
findutils = {}
|
||||
freefont = {}
|
||||
freetype2 = {}
|
||||
gettext = {}
|
||||
git = {}
|
||||
gnu-make = {}
|
||||
hicolor-icon-theme = {}
|
||||
installer = {}
|
||||
#installer-gui = {} # redox_syscall 0.4 not working on riscv64gc?
|
||||
ion = {}
|
||||
kernel = {}
|
||||
kibi = {}
|
||||
libffi = {}
|
||||
libgcc = {}
|
||||
#libiconv = {} # not tested yet, netsurf is commented out
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
#liborbital = {} # not tested yet, netsurf is commented out
|
||||
libpng = {}
|
||||
libstdcxx = {}
|
||||
libvorbis = {}
|
||||
libxkbcommon = {}
|
||||
libxml2 = {}
|
||||
#nano = {} # error compiling ncurses
|
||||
nasm = {}
|
||||
#ncurses = {}
|
||||
netdb = {}
|
||||
#netsurf = {} # error compiling nghttp2
|
||||
netutils = {}
|
||||
#nghttp2 = {}
|
||||
openssl1 = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
#patch = {} error configure machine `riscv64gc-unknown' not recognized
|
||||
pcre = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
pkgutils = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
ripgrep = {}
|
||||
rustpython = {}
|
||||
#sdl1 = {} # not tested yet, netsurf is commented out
|
||||
sed = {}
|
||||
shared-mime-info = {}
|
||||
smith = {}
|
||||
terminfo = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
uutils-procps = {}
|
||||
xz = {}
|
||||
#vim = {} # error compiling ncurses
|
||||
zlib = {}
|
||||
|
||||
# #"gcc13.cxx" = {}
|
||||
# #"llvm21.clang" = {}
|
||||
# #"llvm21.clang-dev" = {}
|
||||
# #"llvm21.dev" = {}
|
||||
# #"llvm21.lld" = {}
|
||||
# #"llvm21.lld-dev" = {}
|
||||
# #"llvm21.runtime" = {}
|
||||
# #"python312.dev" = {}
|
||||
# #"rust.doc" = {}
|
||||
# #atk = {} # depends on glib which does not build
|
||||
# #benchmarks = {}
|
||||
# #binutils-gdb = {}
|
||||
# #book = {}
|
||||
# #cairo-demo = {} # linking errors
|
||||
# #classicube = {}
|
||||
# #cmake = {}
|
||||
# #cmatrix = {} # needs ncursesw now
|
||||
# #cookbook = {}
|
||||
# #cosmic-reader = {}
|
||||
# #cosmic-settings = {}
|
||||
# #cosmic-store = {}
|
||||
# #devilutionx = {}
|
||||
# #dynamic-example = {}
|
||||
# #fal
|
||||
# #fd = {} # ctrlc-3.1.1
|
||||
# #flycast = {}
|
||||
# #freeciv = {}
|
||||
# #freeglut = {}
|
||||
# #friar = {} # mio patch
|
||||
# #game-2048 = {} # rustc-serialize
|
||||
# #gawk = {} # langinfo.h
|
||||
# #gigalomania = {} # old recipe format
|
||||
# #gitoxide = {}
|
||||
# #goaccess = {}
|
||||
# #gstreamer = {} # conflict with thread local errno
|
||||
# #harfbuzz = {} # depends on glib which does not build
|
||||
# #helix = {}
|
||||
# #hello-redox = {}
|
||||
# #hematite = {} # needs crate patches for redox-unix
|
||||
# #hf = {}
|
||||
# #ibm-plex = {}
|
||||
# #iced = {}
|
||||
# #jansson = {} # needs config.sub update
|
||||
# #jq = {}
|
||||
# #libarchive = {}
|
||||
# #libatomic = {}
|
||||
# #libcosmic = {}
|
||||
# #libflac = {}
|
||||
# #libmodplug1 = {}
|
||||
# #libmpfr = {}
|
||||
# #libnettle = {}
|
||||
# #libogg = {}
|
||||
# #libpsl = {}
|
||||
# #libssh2 = {}
|
||||
# #libtool = {}
|
||||
# #liburcu = {}
|
||||
# #libuv = {}
|
||||
# #lua-compat-53 = {}
|
||||
# #luajit = {}
|
||||
# #luarocks = {}
|
||||
# #luv = {}
|
||||
# #mdp = {} # gcc hangs
|
||||
# #miniserve = {} # actix
|
||||
# #mpc = {}
|
||||
# #mupen64plus = {}
|
||||
# #ncdu = {} # multiple definitions of symbols
|
||||
# #newlib = {} # obsolete
|
||||
# #newlibtest = {} # obsolete
|
||||
# #noto-color-emoji = {}
|
||||
# #nushell = {} # needs cargo update
|
||||
# #openjk = {}
|
||||
# #openposixtestsuite = {}
|
||||
# #opentyrian = {}
|
||||
# #orbcalculator = {}
|
||||
# #ostest-bins = {}
|
||||
# #pango = {} # undefined references to std::__throw_system_error(int)
|
||||
# #pastel = {} # needs crate patches for redox-unix
|
||||
# #pathfinder = {} # servo-fontconfig
|
||||
# #pciids = {}
|
||||
# #pcre2 = {}
|
||||
# #pixman = {} # depends on glib which does not build
|
||||
# #pkgar = {} # uses virtual Cargo.toml, needs recipe update
|
||||
# #pls = {}
|
||||
# #pop-wallpapers = {}
|
||||
# #powerline = {} # dirs
|
||||
# #qemu = {} # can be built, but not working
|
||||
# #quakespasm = {}
|
||||
# #redox-posix-tests = {}
|
||||
# #redox-ssh = {} # does not compile
|
||||
# #retroarch = {} # OS_TLSIndex not declared
|
||||
# #rust-cairo = {} # linking errors
|
||||
# #rust-cairo-demo = {} # linking errors
|
||||
# #rvvm = {}
|
||||
# #schismtracker = {} # uses system includes
|
||||
# #sdl-player = {} # wctype_t
|
||||
# #sdl2-gfx = {}
|
||||
# #sm64ex = {}
|
||||
# #spacecadetpinball = {}
|
||||
# #twin-commander = {}
|
||||
# #ubuntu-wallpapers = {}
|
||||
# #unibilium = {}
|
||||
# #utf8proc = {}
|
||||
# #vice = {} # linker errors
|
||||
# #vvvvvv = {} # did not compile
|
||||
# #webrender = {} # unwind
|
||||
# #website = {}
|
||||
# #wesnoth = {}
|
||||
# #wget = {}
|
||||
# autoconf = {}
|
||||
# automake = {}
|
||||
# binutils = {}
|
||||
# bzip2 = {}
|
||||
# cairo = {}
|
||||
# cleye = {}
|
||||
# composer = {}
|
||||
# cosmic-text = {}
|
||||
# cpal = {}
|
||||
# dosbox = {}
|
||||
# duktape = {}
|
||||
# eduke32 = {}
|
||||
# exampled = {}
|
||||
# ffmpeg6 = {}
|
||||
# fontconfig = {}
|
||||
# freedoom = {}
|
||||
# freepats = {}
|
||||
# fribidi = {}
|
||||
# gcc13 = {}
|
||||
# gdbserver = {}
|
||||
# gdk-pixbuf = {}
|
||||
# gears = {}
|
||||
# generaluser-gs = {}
|
||||
# glib = {}
|
||||
# glutin = {}
|
||||
# gnu-binutils = {}
|
||||
# gnu-grep = {}
|
||||
# htop = {}
|
||||
# intel-one-mono = {}
|
||||
# lci = {}
|
||||
# libavif = {}
|
||||
# libc-bench = {}
|
||||
# libedit = {}
|
||||
# libgmp = {}
|
||||
# libicu = {}
|
||||
# libonig = {}
|
||||
# libsodium = {}
|
||||
# libuuid = {}
|
||||
# libwebp = {}
|
||||
# llvm21 = {}
|
||||
# lsd = {}
|
||||
# lua54 = {}
|
||||
# lz4 = {}
|
||||
# mednafen = {}
|
||||
# mesa = {}
|
||||
# mesa-glu = {}
|
||||
# mgba = {}
|
||||
# ncursesw = {}
|
||||
# neverball = {}
|
||||
# nginx = {}
|
||||
# onefetch = {}
|
||||
# openjazz = {}
|
||||
# openssh = {}
|
||||
# openssl3 = {}
|
||||
# openttd = {}
|
||||
# openttd-opengfx = {}
|
||||
# openttd-openmsx = {}
|
||||
# openttd-opensfx = {}
|
||||
# orbclient = {}
|
||||
# osdemo = {}
|
||||
# perg = {}
|
||||
# periodictable = {}
|
||||
# perl5 = {}
|
||||
# php84 = {}
|
||||
# pixelcannon = {}
|
||||
# pkg-config = {}
|
||||
# prboom = {}
|
||||
# procedural-wallpapers-rs = {}
|
||||
# python312 = {}
|
||||
# readline = {}
|
||||
# redox-fatfs = {}
|
||||
# redox-games = {}
|
||||
# relibc-tests = {}
|
||||
# relibc-tests-bins = {}
|
||||
# rodioplay = {}
|
||||
# rs-nes = {}
|
||||
# rsync = {}
|
||||
# rust = {}
|
||||
# rust64 = {}
|
||||
# rustual-boy = {}
|
||||
# scummvm = {}
|
||||
# sdl-gfx = {}
|
||||
# sdl1-image = {}
|
||||
# sdl1-mixer = {}
|
||||
# sdl1-ttf = {}
|
||||
# sdl2 = {}
|
||||
# sdl2-gears = {}
|
||||
# sdl2-image = {}
|
||||
# sdl2-mixer = {}
|
||||
# sdl2-ttf = {}
|
||||
# servo = {}
|
||||
# shellharden = {}
|
||||
# shellstorm = {}
|
||||
# simple-http-server = {}
|
||||
# sodium = {}
|
||||
# sopwith = {}
|
||||
# sqlite3 = {}
|
||||
# strace = {}
|
||||
# syobonaction = {}
|
||||
# timidity = {}
|
||||
# tokei = {}
|
||||
# ttf-hack = {}
|
||||
# vttest = {}
|
||||
# webkitgtk3 = {}
|
||||
# winit = {}
|
||||
# xxhash = {}
|
||||
# zoxide = {} # untested
|
||||
# zstd = {}
|
||||
@ -1,3 +0,0 @@
|
||||
# Configuration for demonstration
|
||||
|
||||
include = ["desktop.toml"]
|
||||
@ -1,15 +0,0 @@
|
||||
# Default build system configuration
|
||||
|
||||
include = ["../desktop.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
# filesystem_size = 1024
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
netsurf = "ignore" # liborbital fails to link in due to mismatching float ABI
|
||||
@ -1,3 +0,0 @@
|
||||
# Configuration for Jeremy Soller
|
||||
|
||||
include = ["desktop.toml"]
|
||||
@ -1,22 +1,297 @@
|
||||
# Server configuration
|
||||
|
||||
include = ["minimal.toml"]
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 512
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
bash = {}
|
||||
bottom = {}
|
||||
#contain = {} # needs to update dependencies
|
||||
curl = {}
|
||||
diffutils = {}
|
||||
#acid = {}
|
||||
#audiod = {}
|
||||
#autoconf = {}
|
||||
#automake = {}
|
||||
#bash = {}
|
||||
#binutils = {}
|
||||
ca-certificates = {}
|
||||
#cairo = {}
|
||||
#cairodemo = {}
|
||||
#cargo = {}
|
||||
#cleye = {}
|
||||
#cmatrix = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
#cpal = {}
|
||||
#curl = {}
|
||||
dash = {}
|
||||
#diffutils = {}
|
||||
#dosbox = {}
|
||||
drivers = {}
|
||||
#drivers-041 = {}
|
||||
#duktape = {}
|
||||
#eduke32 = {}
|
||||
#exampled = {}
|
||||
#expat = {}
|
||||
extrautils = {}
|
||||
#fd = {}
|
||||
#ffmpeg = {}
|
||||
findutils = {}
|
||||
gettext = {}
|
||||
git = {}
|
||||
#freeciv = {}
|
||||
#freedoom = {}
|
||||
#freeglut = {}
|
||||
#freetype = {}
|
||||
#friar = {} # mio patch
|
||||
#game-2048 = {}
|
||||
#games = {}
|
||||
#gawk = {}
|
||||
#gcc = {}
|
||||
#gears = {}
|
||||
#generaluser-gs = {}
|
||||
#gettext = {}
|
||||
#gigalomania = {}
|
||||
#git = {}
|
||||
#glib = {}
|
||||
#glium = {}
|
||||
#glutin = {}
|
||||
#gnu-binutils = {}
|
||||
#gnu-grep = {}
|
||||
#gnu-make = {}
|
||||
#gstreamer = {}
|
||||
#harfbuzz = {}
|
||||
#hematite = {}
|
||||
#init = {}
|
||||
installer = {}
|
||||
kibi = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
#jansson = {}
|
||||
#keyboard-sfx = {}
|
||||
#lci = {}
|
||||
#libc-bench = {}
|
||||
#libffi = {}
|
||||
#libiconv = {}
|
||||
#libjpeg = {}
|
||||
#liborbital = {}
|
||||
#libpng = {}
|
||||
#libsodium = {}
|
||||
#llvm = {}
|
||||
logd = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
#mesa = {}
|
||||
#mesa_glu = {}
|
||||
#miniserve = {}
|
||||
#nasm = {}
|
||||
#ncdu = {}
|
||||
#ncurses = {}
|
||||
#ncursesw = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
#netsurf = {}
|
||||
netutils = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
#nulld = {}
|
||||
#openjazz = {}
|
||||
#openssl = {}
|
||||
#openttd = {}
|
||||
#openttd-opengfx = {}
|
||||
#openttd-openmsx = {}
|
||||
#openttd-opensfx = {}
|
||||
#orbdata = {}
|
||||
#orbital = {}
|
||||
#orbterm = {}
|
||||
#orbutils = {}
|
||||
#osdemo = {}
|
||||
#pastel = {}
|
||||
#patch = {}
|
||||
#pciids = {}
|
||||
#pcre = {}
|
||||
#periodictable = {}
|
||||
#perl = {}
|
||||
#pixelcannon = {}
|
||||
#pixman = {}
|
||||
pkgutils = {}
|
||||
#powerline = {}
|
||||
#prboom = {}
|
||||
ptyd = {}
|
||||
#python = {}
|
||||
#qemu = {}
|
||||
#randd = {}
|
||||
#readline = {} # ncurses
|
||||
redoxfs = {}
|
||||
#redox-ssh = {}
|
||||
#relibc = {}
|
||||
#ripgrep = {}
|
||||
#rodioplay = {}
|
||||
#rs-nes = {}
|
||||
#rust = {}
|
||||
#rust64 = {}
|
||||
#rust-cairo = {}
|
||||
#rust-cairo-demo = {}
|
||||
#rustual-boy = {}
|
||||
#schismtracker = {}
|
||||
#scummvm = {}
|
||||
#sdl = {}
|
||||
#sdl2 = {}
|
||||
#sdl_gfx = {}
|
||||
#sdl_image = {}
|
||||
#sdl_mixer = {}
|
||||
#sdl_ttf = {}
|
||||
#sdl-player = {}
|
||||
#sed = {}
|
||||
#servo = {}
|
||||
#shellstorm = {}
|
||||
smith = {}
|
||||
#sodium = {}
|
||||
#sopwith = {}
|
||||
#ssh = {}
|
||||
#syobonaction = {}
|
||||
#terminfo = {}
|
||||
#termplay = {}
|
||||
#timidity = {}
|
||||
#ttf-hack = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
#vim = {}
|
||||
#vttest = {}
|
||||
#webrender = {}
|
||||
#winit = {}
|
||||
#xz = {}
|
||||
#zerod = {}
|
||||
#zlib = {}
|
||||
|
||||
# User settings
|
||||
[users.root]
|
||||
password = "password"
|
||||
uid = 0
|
||||
gid = 0
|
||||
name = "root"
|
||||
home = "/root"
|
||||
|
||||
[users.user]
|
||||
# Password is unset
|
||||
password = ""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_base"
|
||||
data = """
|
||||
ipcd
|
||||
logd
|
||||
ptyd
|
||||
pcid /etc/pcid.d/
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/10_net"
|
||||
data = """
|
||||
smolnetd
|
||||
dnsd
|
||||
dhcpd -b
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/30_console"
|
||||
data = """
|
||||
getty display:2/activate
|
||||
getty debug: -J
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/dns"
|
||||
data = """
|
||||
208.67.222.222
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip"
|
||||
data = """
|
||||
10.0.2.15
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_router"
|
||||
data = """
|
||||
10.0.2.2
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/ip_subnet"
|
||||
data = """
|
||||
255.255.255.0
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/net/mac"
|
||||
data = """
|
||||
54-52-00-ab-cd-ef
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/pkg.d/50_redox"
|
||||
data = "https://static.redox-os.org/pkg"
|
||||
|
||||
[[files]]
|
||||
path = "/etc/group"
|
||||
data = """
|
||||
root;0;root
|
||||
user;1000;user
|
||||
sudo;1;user
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/hostname"
|
||||
data = """
|
||||
redox
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin"
|
||||
data = "/bin"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/games"
|
||||
data = "/games"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/include"
|
||||
data = "/include"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib"
|
||||
data = "/lib"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share"
|
||||
data = "/share"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/tmp"
|
||||
data = ""
|
||||
directory= true
|
||||
# 0o1777
|
||||
mode = 1023
|
||||
|
||||
[[files]]
|
||||
path = "/dev/null"
|
||||
data = "null:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/random"
|
||||
data = "rand:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/urandom"
|
||||
data = "rand:"
|
||||
symlink = true
|
||||
|
||||
[[files]]
|
||||
path = "/dev/zero"
|
||||
data = "zero:"
|
||||
symlink = true
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
# Configuration for automated self-hosted system compilation testing
|
||||
|
||||
include = ["server.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 10000
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
cookbook = {}
|
||||
bottom = "ignore"
|
||||
kibi = "ignore"
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
requires_weak 10_net
|
||||
ion /usr/lib/sys_build.ion
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/sys_build.ion"
|
||||
data = """
|
||||
#!/usr/bin/env ion
|
||||
export RUST_BACKTRACE=full
|
||||
cd /home/user/cookbook
|
||||
make prefix r.sys,--with-package-deps
|
||||
shutdown
|
||||
"""
|
||||
@ -1,15 +0,0 @@
|
||||
# Configuration for testing
|
||||
|
||||
include = ["server.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 10000
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
redox-tests = {}
|
||||
benchmarks = {}
|
||||
@ -1,100 +0,0 @@
|
||||
# Wayland configuration
|
||||
|
||||
include = ["desktop.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 2048
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
adwaita-icon-theme = {}
|
||||
bash = {}
|
||||
cosmic-app-library = {}
|
||||
cosmic-comp = {}
|
||||
gtk3 = {}
|
||||
libcosmic-wayland = {}
|
||||
libxcursor = {}
|
||||
iced-wayland = {}
|
||||
mesa = {}
|
||||
"pop-icon-theme.cursors" = {}
|
||||
smallvil = {}
|
||||
softbuffer-wayland = {}
|
||||
wayland-rs = {}
|
||||
#webkitgtk3 = {}
|
||||
winit-wayland = {}
|
||||
xkeyboard-config = {}
|
||||
|
||||
# Overridden to launch wayland compositor instead of orblogin
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
requires_weak 10_net.target 20_audiod.service
|
||||
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-wayland
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/orbital-wayland"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Prepare environment
|
||||
unset DISPLAY
|
||||
export COSMIC_BACKEND=winit
|
||||
export HOME=/root
|
||||
export LD_DEBUG=all
|
||||
export RUST_BACKTRACE=full
|
||||
export RUST_LOG=debug
|
||||
export XCURSOR_THEME=Pop
|
||||
export XDG_RUNTIME_DIR=/tmp/run/user/0
|
||||
# Comment out once responsive
|
||||
export WAYLAND_DEBUG=1
|
||||
|
||||
# Create XDG runtime directory
|
||||
#TODO: mkdir -p not working
|
||||
mkdir -p /tmp/run
|
||||
mkdir -p /tmp/run/user
|
||||
mkdir -p /tmp/run/user/0
|
||||
|
||||
# Compile glib schemas
|
||||
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
||||
|
||||
# For cosmic-comp (more features)
|
||||
cosmic-comp wayland-session
|
||||
|
||||
# For smallvil (easier to debug)
|
||||
#smallvil -c wayland-session&
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/wayland-session"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
#env G_MAIN_POLL_DEBUG=1 G_MESSAGES_DEBUG=all LD_DEBUG=all WEBKIT_DEBUG=all MiniBrowser&
|
||||
printenv
|
||||
#wayland-rs_simple-window
|
||||
#winit-wayland_window
|
||||
#softbuffer-wayland_animation
|
||||
#iced-wayland_sctk_lazy
|
||||
libcosmic-wayland_application
|
||||
#gtk3-widget-factory
|
||||
#cosmic-app-library run
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/gtk-3.0/settings.ini"
|
||||
data = """
|
||||
[Settings]
|
||||
gtk-cursor-theme-name = "Pop"
|
||||
gtk-icon-theme-name = "Cosmic"
|
||||
"""
|
||||
202
config/x11.toml
202
config/x11.toml
@ -1,202 +0,0 @@
|
||||
# X11 configuration
|
||||
|
||||
include = ["desktop.toml"]
|
||||
|
||||
# Override the default settings here
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 2048
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
adwaita-icon-theme = {}
|
||||
dbus = {}
|
||||
gtk3 = {}
|
||||
libxcursor = {} # loaded dynamically
|
||||
#mate-common = {}
|
||||
mesa-demos-x11 = {}
|
||||
#firefox = {}
|
||||
#webkitgtk3 = {} # not compiling
|
||||
xfce4-full = {}
|
||||
x11-full = {}
|
||||
zenity = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/10_dbus"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
bash /usr/bin/start-dbus.sh
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/start-dbus.sh"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
export DBUS_DEBUG_OUTPUT=1
|
||||
#export DBUS_VERBOSE=1
|
||||
#export G_DBUS_DEBUG=all
|
||||
mkdir -p /var/lib/dbus
|
||||
dbus-uuidgen --ensure
|
||||
mkdir -p /run/dbus
|
||||
rm -f /run/dbus/pid
|
||||
dbus-daemon --system
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/10_xenv"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
||||
"""
|
||||
|
||||
# Overridden to launch X instead of orblogin
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
requires_weak 10_dbus 10_xenv 20_audiod.service
|
||||
nowait BROWSER=/bin/netsurf-fb VT=3 orbital orbital-x11
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/run/user/0"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o700
|
||||
|
||||
[[files]]
|
||||
path = "/home/root/.config/dconf"
|
||||
data = ""
|
||||
directory = true
|
||||
|
||||
[[files]]
|
||||
path = "/home/root/Desktop"
|
||||
data = ""
|
||||
directory = true
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/usr/share/X11/xorg.conf.d"
|
||||
data = ""
|
||||
directory = true
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/orbital-x11"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
# for ice authority and pixbuf
|
||||
export HOME=/home/root
|
||||
export XDG_DATA_DIRS=/usr/share
|
||||
export XDG_RUNTIME_DIR=/run/user/0
|
||||
export XDG_CONFIG_HOME=/home/root/.config
|
||||
|
||||
# Generate config file
|
||||
WIDTH="$((0x$(grep FRAMEBUFFER_WIDTH /scheme/sys/env | cut -d '=' -f 2)))"
|
||||
HEIGHT="$((0x$(grep FRAMEBUFFER_HEIGHT /scheme/sys/env | cut -d '=' -f 2)))"
|
||||
cat > /usr/share/X11/xorg.conf.d/orbital.conf <<EOF
|
||||
Section "Device"
|
||||
Identifier "Configured Video Device"
|
||||
Driver "dummy"
|
||||
VideoRam 256000
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "Configured Monitor"
|
||||
HorizSync 5.0 - 1000.0
|
||||
VertRefresh 5.0 - 200.0
|
||||
$(cvt "${WIDTH}" "${HEIGHT}")
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Default Screen"
|
||||
Monitor "Configured Monitor"
|
||||
Device "Configured Video Device"
|
||||
DefaultDepth 24
|
||||
SubSection "Display"
|
||||
Depth 24
|
||||
Modes "${WIDTH}x${HEIGHT}"
|
||||
EndSubSection
|
||||
EndSection
|
||||
EOF
|
||||
|
||||
# Launch X11 and session on display 0
|
||||
export DISPLAY=":0"
|
||||
X "${DISPLAY}" &
|
||||
sleep 1
|
||||
exec dbus-launch --exit-with-x11 xfce4-x11-session
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/mate-x11-session"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
gdk-pixbuf-query-loaders --update-cache
|
||||
/usr/libexec/dconf-service &
|
||||
|
||||
xterm&
|
||||
#zenity --info --text="running mate as $(id)!"
|
||||
#exec marco
|
||||
exec mate-session
|
||||
"""
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/xfce4-x11-session"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
gdk-pixbuf-query-loaders --update-cache
|
||||
/usr/lib/xfce4/xfconf/xfconfd &
|
||||
/usr/lib/tumbler-1/tumblerd &
|
||||
/usr/libexec/upowerd &
|
||||
xfsettingsd &
|
||||
|
||||
xterm&
|
||||
#zenity --info --text="running xfce4 as $(id)!"
|
||||
#exec xfwm4
|
||||
exec xfce4-session
|
||||
"""
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/environment.d/10_x11"
|
||||
data = """
|
||||
DISPLAY=:0
|
||||
"""
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/browser"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
#export G_MAIN_POLL_DEBUG=1
|
||||
export G_MESSAGES_DEBUG=all
|
||||
#export GDK_DEBUG=all
|
||||
#export GTK_DEBUG=all
|
||||
export LD_DEBUG=all
|
||||
#export WEBKIT_DEBUG=all
|
||||
exec MiniBrowser --dark-mode --ignore-tls-errors "about:blank"
|
||||
"""
|
||||
|
||||
[users.messagebus]
|
||||
uid = 100
|
||||
gid = 100
|
||||
name = "messagebus"
|
||||
home = "/nonexistent"
|
||||
shell = "/usr/bin/false"
|
||||
|
||||
@ -1,326 +0,0 @@
|
||||
# The Redox build server configuration
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
|
||||
# If you need to disable some broken package comment out instead of removal to not increase the maintenance cost
|
||||
#TODO: commented out recipes need to be built and tested inside of Redox to verify if they returned to work
|
||||
|
||||
# Meta-packages below
|
||||
|
||||
auto-test = {}
|
||||
autotools = {}
|
||||
dev-essential = {}
|
||||
dev-redox = {}
|
||||
llvm21-common = {}
|
||||
mate-common = {}
|
||||
redox-tests = {}
|
||||
x11-minimal = {}
|
||||
x11-full = {}
|
||||
xfce4-common = {}
|
||||
xfce4-full = {}
|
||||
|
||||
# Normal packages below
|
||||
|
||||
acid = {}
|
||||
adwaita-icon-theme = {}
|
||||
atk = {}
|
||||
autoconf = {}
|
||||
automake = {}
|
||||
base = {}
|
||||
bash = {}
|
||||
bash-completion = {}
|
||||
binutils = {}
|
||||
bootloader = {}
|
||||
boxedwine = {}
|
||||
bottom = {}
|
||||
bzip2 = {}
|
||||
ca-certificates = {}
|
||||
cairo = {}
|
||||
cairo-demo = {}
|
||||
cbindgen = {}
|
||||
classicube = {}
|
||||
clang21 = {}
|
||||
cleye = {}
|
||||
cmake = {}
|
||||
cmatrix = {}
|
||||
composer = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-reader = {}
|
||||
cosmic-term = {}
|
||||
cosmic-text = {}
|
||||
cpal = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
dejavu = {}
|
||||
devilutionx = {}
|
||||
diffutils = {}
|
||||
dosbox = {}
|
||||
duktape = {}
|
||||
eduke32 = {}
|
||||
exampled = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
ffmpeg6 = {}
|
||||
file = {}
|
||||
findutils = {}
|
||||
firefox = {}
|
||||
fish-shell = {}
|
||||
flycast = {}
|
||||
fontconfig = {}
|
||||
freeciv = {}
|
||||
freedoom = {}
|
||||
freefont = {}
|
||||
freepats = {}
|
||||
freetype2 = {}
|
||||
fribidi = {}
|
||||
gawk = {}
|
||||
gcc13 = {}
|
||||
gdbserver = {}
|
||||
gdk-pixbuf = {}
|
||||
gears = {}
|
||||
generaluser-gs = {}
|
||||
gettext = {}
|
||||
gigalomania = {}
|
||||
git = {}
|
||||
glib = {}
|
||||
glutin = {}
|
||||
gnu-binutils = {}
|
||||
gnu-grep = {}
|
||||
gnu-make = {}
|
||||
goaccess = {}
|
||||
gobject-introspection = {}
|
||||
gitoxide = {}
|
||||
gstreamer = {}
|
||||
harfbuzz = {}
|
||||
hicolor-icon-theme = {}
|
||||
helix = {}
|
||||
hello-redox = {}
|
||||
hf = {}
|
||||
htop = {}
|
||||
jansson = {}
|
||||
jq = {}
|
||||
installer = {}
|
||||
installer-gui = {}
|
||||
intel-one-mono = {}
|
||||
ion = {}
|
||||
kernel = {}
|
||||
kibi = {}
|
||||
lci = {}
|
||||
libarchive = {}
|
||||
libatomic = {}
|
||||
libavif = {}
|
||||
libc-bench = {}
|
||||
libedit = {}
|
||||
libffi = {}
|
||||
libflac = {}
|
||||
libgcc = {}
|
||||
libgmp = {}
|
||||
libiconv = {}
|
||||
libicu = {}
|
||||
libjpeg = {}
|
||||
libmodplug1 = {}
|
||||
libmpfr = {}
|
||||
libnettle = {}
|
||||
libogg = {}
|
||||
libonig = {}
|
||||
liborbital = {}
|
||||
libpsl = {}
|
||||
libpng = {}
|
||||
libsodium = {}
|
||||
libssh2 = {}
|
||||
libstdcxx = {}
|
||||
libtool = {}
|
||||
libuuid = {}
|
||||
liburcu = {}
|
||||
libuv = {}
|
||||
libvorbis = {}
|
||||
libwebp = {}
|
||||
libxkbcommon = {}
|
||||
libxcursor = {}
|
||||
libxml2 = {}
|
||||
llvm21 = {}
|
||||
lsd = {}
|
||||
lua54 = {}
|
||||
lua-compat-53 = {}
|
||||
luajit = {}
|
||||
luarocks = {}
|
||||
lz4 = {}
|
||||
mednafen = {}
|
||||
mesa = {}
|
||||
mesa-glu = {}
|
||||
mesa-demos = {}
|
||||
mesa-demos-x11 = {}
|
||||
mgba = {}
|
||||
miniserve = {}
|
||||
mpc = {}
|
||||
nano = {}
|
||||
nasm = {}
|
||||
ncdu = {}
|
||||
ncurses = {}
|
||||
ncursesw = {}
|
||||
neovim = {}
|
||||
netdb = {}
|
||||
netsurf = {}
|
||||
netutils = {}
|
||||
neverball = {}
|
||||
nghttp2 = {}
|
||||
nginx = {}
|
||||
nodejs-21 = {}
|
||||
nushell = {}
|
||||
onefetch = {}
|
||||
openjazz = {}
|
||||
openjk = {}
|
||||
openssh = {}
|
||||
openssl1 = {}
|
||||
openssl3 = {}
|
||||
openttd = {}
|
||||
openttd-opengfx = {}
|
||||
openttd-openmsx = {}
|
||||
openttd-opensfx = {}
|
||||
opentyrian = {}
|
||||
orbclient = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
os-test-bins = {}
|
||||
osdemo = {}
|
||||
pango = {}
|
||||
patch = {}
|
||||
patchelf = {}
|
||||
pcre = {}
|
||||
pcre2 = {}
|
||||
perg = {}
|
||||
periodictable = {}
|
||||
perl5 = {}
|
||||
php84 = {}
|
||||
pixelcannon = {}
|
||||
pixman = {}
|
||||
pkg-config = {}
|
||||
pkgar = {}
|
||||
pkgutils = {}
|
||||
pls = {}
|
||||
pop-icon-theme = {}
|
||||
powerline = {}
|
||||
prboom = {}
|
||||
procedural-wallpapers-rs = {}
|
||||
profiled = {}
|
||||
profiling-kernel = {}
|
||||
python312 = {}
|
||||
qemu = {}
|
||||
quakespasm = {}
|
||||
readline = {}
|
||||
redox-fatfs = {}
|
||||
redox-games = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
relibc-tests = {}
|
||||
relibc-tests-bins = {}
|
||||
ripgrep = {}
|
||||
rodioplay = {}
|
||||
rs-nes = {}
|
||||
rsync = {}
|
||||
rust = {}
|
||||
rust64 = {}
|
||||
rustpython = {}
|
||||
rustual-boy = {}
|
||||
rvvm = {}
|
||||
scummvm = {}
|
||||
sdl-gfx = {}
|
||||
sdl1 = {}
|
||||
sdl1-image = {}
|
||||
sdl1-mixer = {}
|
||||
sdl1-ttf = {}
|
||||
sdl2 = {}
|
||||
sdl2-gears = {}
|
||||
sdl2-image = {}
|
||||
sdl2-mixer = {}
|
||||
sdl2-ttf = {}
|
||||
sed = {}
|
||||
servo = {}
|
||||
shared-mime-info = {}
|
||||
shellharden = {}
|
||||
shellstorm = {}
|
||||
simple-http-server = {}
|
||||
smallvil = {}
|
||||
smith = {}
|
||||
sodium = {}
|
||||
softbuffer-wayland = {}
|
||||
sopwith = {}
|
||||
sqlite3 = {}
|
||||
strace = {}
|
||||
syobonaction = {}
|
||||
tcl = {}
|
||||
terminfo = {}
|
||||
timidity = {}
|
||||
tmux = {}
|
||||
tokei = {}
|
||||
ttf-hack = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
uutils-procps = {}
|
||||
vim = {}
|
||||
vttest = {}
|
||||
wasmtime = {}
|
||||
wayland-rs = {}
|
||||
webkitgtk3 = {}
|
||||
wget = {}
|
||||
winit = {}
|
||||
winit-wayland = {}
|
||||
xxhash = {}
|
||||
xz = {}
|
||||
zenity = {}
|
||||
zoxide = {}
|
||||
zsh = {}
|
||||
zlib = {}
|
||||
zola = {}
|
||||
zstd = {}
|
||||
|
||||
#benchmarks = {}
|
||||
#binutils-gdb = {}
|
||||
#book = {}
|
||||
#cookbook = {}
|
||||
#cosmic-settings = {}
|
||||
#cosmic-store = {}
|
||||
#dynamic-example = {}
|
||||
#fal
|
||||
#fd = {} # ctrlc-3.1.1
|
||||
#freeglut = {}
|
||||
#friar = {} # mio patch
|
||||
#game-2048 = {} # rustc-serialize
|
||||
#hematite = {} # needs crate patches for redox-unix
|
||||
#ibm-plex = {}
|
||||
#iced = {}
|
||||
#libcosmic = {}
|
||||
#mdp = {} # gcc hangs
|
||||
#mupen64plus = {}
|
||||
#noto-color-emoji = {}
|
||||
#orbcalculator = {}
|
||||
#ostest-bins = {}
|
||||
#pastel = {} # needs crate patches for redox-unix
|
||||
#pathfinder = {} # servo-fontconfig
|
||||
#pciids = {}
|
||||
#pop-wallpapers = {}
|
||||
#retroarch = {} # cannot locate GL
|
||||
#rust-cairo = {} # linking errors
|
||||
#rust-cairo-demo = {} # linking errors
|
||||
#schismtracker = {} # uses system includes
|
||||
#sdl-player = {} # wctype_t
|
||||
#sdl2-gfx = {}
|
||||
#twin-commander = {}
|
||||
#ubuntu-wallpapers = {}
|
||||
#vice = {} # linker errors
|
||||
#vvvvvv = {} # did not compile
|
||||
#webrender = {} # unwind
|
||||
#website = {}
|
||||
#wesnoth = {}
|
||||
@ -1,71 +0,0 @@
|
||||
# Configuration for demonstration
|
||||
|
||||
include = ["../desktop.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1536
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# GUI Apps
|
||||
cosmic-reader = {}
|
||||
periodictable = {}
|
||||
|
||||
# GUI Data
|
||||
intel-one-mono = {}
|
||||
|
||||
# Shell Apps
|
||||
gawk = {}
|
||||
gnu-grep = {}
|
||||
htop = {}
|
||||
ripgrep = {}
|
||||
terminfo = {}
|
||||
vim = {}
|
||||
wget = {}
|
||||
|
||||
# Games
|
||||
dosbox = {}
|
||||
freedoom = {}
|
||||
neverball = {}
|
||||
prboom = {}
|
||||
redox-games = {}
|
||||
sopwith = {}
|
||||
syobonaction = {}
|
||||
|
||||
# Demos
|
||||
nushell = {}
|
||||
orbclient = {}
|
||||
pixelcannon = {}
|
||||
rodioplay = {}
|
||||
gears = {}
|
||||
|
||||
# MIDI
|
||||
freepats = {}
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/Welcome.txt"
|
||||
data = """
|
||||
##############################################################################
|
||||
# #
|
||||
# Welcome to Redox! #
|
||||
# #
|
||||
# Redox is an operating system written in Rust, a language with focus #
|
||||
# on safety and high performance. Redox, following the microkernel design, #
|
||||
# aims to be secure, usable, and free. Redox is inspired by previous kernels #
|
||||
# and operating systems, such as SeL4, MINIX, Plan 9, and BSD. #
|
||||
# #
|
||||
# Redox _is not_ just a kernel, it's a full-featured Operating System, #
|
||||
# providing packages (memory allocator, file system, display manager, core #
|
||||
# utilities, etc.) that together make up a functional and convenient #
|
||||
# operating system. You can loosely think of it as the GNU or BSD ecosystem, #
|
||||
# but in a memory safe language and with modern technology. #
|
||||
# #
|
||||
# The website can be found at https://www.redox-os.org. #
|
||||
# #
|
||||
# For things to try on Redox, please see #
|
||||
# https://doc.redox-os.org/book/ch02-06-trying-out-redox.html #
|
||||
# #
|
||||
##############################################################################
|
||||
"""
|
||||
@ -1,9 +0,0 @@
|
||||
include = [ "../base.toml", "ci.toml" ]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
filesystem_size = 8192
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
@ -1,100 +0,0 @@
|
||||
# Configuration for Jeremy Soller
|
||||
|
||||
include = ["demo.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 8192
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# apps
|
||||
#boxedwine = {}
|
||||
cosmic-player = {}
|
||||
cosmic-reader = {}
|
||||
cosmic-settings = {}
|
||||
cosmic-store = {}
|
||||
cosmic-term = {}
|
||||
cosmic-text = {}
|
||||
#qemu = {} # not building
|
||||
schismtracker = {}
|
||||
servo = {}
|
||||
|
||||
# cli
|
||||
cleye = {}
|
||||
ffmpeg6 = {}
|
||||
lua54 = {}
|
||||
nano = {}
|
||||
#nushell = {}
|
||||
perg = {}
|
||||
#relibc-tests = {}
|
||||
russh = {}
|
||||
sed = {}
|
||||
shellharden = {}
|
||||
xz = {}
|
||||
|
||||
# demos
|
||||
#cairodemo = {}
|
||||
cmatrix = {}
|
||||
cpal = {}
|
||||
gears = {}
|
||||
glutin = {}
|
||||
#hematite = {} # not building
|
||||
iced = {}
|
||||
libcosmic = {}
|
||||
osdemo = {} # does not show anything
|
||||
#pathfinder = {} # not building
|
||||
procedural-wallpapers-rs = {}
|
||||
#rust-cairo = {}
|
||||
#rust-cairo-demo = {}
|
||||
sdl2-gears = {}
|
||||
vttest = {}
|
||||
#webrender = {}
|
||||
winit = {}
|
||||
|
||||
# dev
|
||||
autoconf = {}
|
||||
automake = {}
|
||||
#cookbook = {}
|
||||
gcc13 = {}
|
||||
gnu-binutils = {}
|
||||
gnu-make = {}
|
||||
nasm = {}
|
||||
patch = {}
|
||||
pkg-config = {}
|
||||
rust = {}
|
||||
|
||||
# games
|
||||
devilutionx = {}
|
||||
eduke32 = {}
|
||||
flycast = {}
|
||||
freeciv = {}
|
||||
gigalomania = {}
|
||||
love = {}
|
||||
mednafen = {}
|
||||
mgba = {}
|
||||
openjazz = {}
|
||||
openjk = {}
|
||||
openttd = {}
|
||||
openttd-opengfx = {}
|
||||
openttd-openmsx = {}
|
||||
openttd-opensfx = {}
|
||||
quakespasm = {}
|
||||
#retroarch = {} # need to package cores
|
||||
rs-nes = {} # need game for testing
|
||||
rust64 = {} # need roms
|
||||
rustual-boy = {} # need game for testing
|
||||
scummvm = {} # need game for testing
|
||||
sm64ex = {}
|
||||
#spacecadetpinball = {} # not building
|
||||
syobonaction = {}
|
||||
#vice = {} # broken on new toolchain
|
||||
#vvvvvv = {} # cannot find -lgcc_s
|
||||
|
||||
# stuff
|
||||
generaluser-gs = {}
|
||||
jeremy = {}
|
||||
noto-color-emoji = {}
|
||||
timidity = {}
|
||||
ttf-hack = {}
|
||||
@ -1,8 +0,0 @@
|
||||
# Configuration used for building redoxer base image
|
||||
|
||||
include = ["../redoxer.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1024
|
||||
@ -1,13 +0,0 @@
|
||||
# Configuration for demonstration
|
||||
|
||||
include = ["demo.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 1536
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
cosmic-reader = {}
|
||||
rustconf2025 = {}
|
||||
@ -1,311 +0,0 @@
|
||||
# Configuration for server stack demonstration
|
||||
|
||||
include = ["../server.toml"]
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Filesystem size in MiB
|
||||
filesystem_size = 4096
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
# Daemons
|
||||
openssh = {}
|
||||
nginx = {}
|
||||
rustysd = {}
|
||||
|
||||
# Backends
|
||||
php84 = {}
|
||||
composer = {}
|
||||
luajit = {}
|
||||
python312 = {}
|
||||
# go = {}
|
||||
# zig = {}
|
||||
|
||||
# Tools
|
||||
nano = {}
|
||||
neovim = {}
|
||||
rsync = {}
|
||||
vim = {}
|
||||
sqlite3 = {}
|
||||
# tmux = {}
|
||||
htop = {}
|
||||
|
||||
# Content
|
||||
website = {}
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/98_keygen_sh"
|
||||
data = """
|
||||
requires_weak 10_net.target
|
||||
bash /root/keygen.sh
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/99_rustysd"
|
||||
data = """
|
||||
requires_weak 98_keygen_sh
|
||||
# Undocumented usage of rsdctl, pointing to notifications dir
|
||||
RSDCTL_ADDR=/var/run/rustysd/control.socket rustysd --conf /etc/rustysd
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/rustysd/system/network-online.target"
|
||||
data = """
|
||||
[Unit]
|
||||
Description=The target after networks has online
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/rustysd/system/multi-user.target"
|
||||
data = """
|
||||
[Unit]
|
||||
Description=The target after user administrations has online
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/rustysd/system/nginx.service"
|
||||
data = """
|
||||
[Unit]
|
||||
Description=The nginx HTTP and reverse proxy server
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/nginx -g "daemon off;"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
"""
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/etc/rustysd/system/ssh.service"
|
||||
data = """
|
||||
[Unit]
|
||||
Description=OpenBSD Secure Shell server
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/sshd -D
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
"""
|
||||
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/etc/rustysd/system/php.service"
|
||||
data = """
|
||||
[Unit]
|
||||
Description=OpenBSD Secure Shell server
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# currently php-fpm not that quite work
|
||||
ExecStart=env PWD=/var/www/html php -S localhost:9000
|
||||
# ExecStart=/usr/bin/php-fpm --fpm-config /etc/php/84/php-fpm.conf --nodaemonize
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/var/www/html/index.php"
|
||||
data = """
|
||||
<?php
|
||||
|
||||
echo "Hello from PHP on Redox!";
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/var/www/html/phpinfo.php"
|
||||
data = """
|
||||
<?php phpinfo();
|
||||
"""
|
||||
|
||||
|
||||
[[files]]
|
||||
path = "/var/www/html/README"
|
||||
data = """
|
||||
This is a demonstration into PHP server.
|
||||
|
||||
At the moment to run composer you have to run it like:
|
||||
> php /bin/composer install
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
data = ""
|
||||
path = "/etc/nginx/conf.d"
|
||||
directory = true
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
path = "/etc/nginx/nginx.conf"
|
||||
data = """
|
||||
user nginx;
|
||||
|
||||
# currently nginx does a lot spin locking for some reason
|
||||
worker_processes 1;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
http {
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
include mime.types;
|
||||
include fastcgi.conf;
|
||||
default_type application/octet-stream;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
path = "/etc/nginx/conf.d/localhost.conf"
|
||||
data = """
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/website;
|
||||
absolute_redirect off;
|
||||
|
||||
location / {
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
path = "/etc/nginx/conf.d/php-www.conf"
|
||||
data = """
|
||||
server {
|
||||
listen 8081;
|
||||
server_name localhost;
|
||||
root /var/www/html;
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \\.php$ {
|
||||
# because we're not using PHP FPM (see rustysd php.service)
|
||||
# include fastcgi_params;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
proxy_pass http://127.0.0.1:9000;
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
path = "/etc/php/84/php-fpm.conf"
|
||||
data = """
|
||||
|
||||
error_log=/var/log/php-fpm.log
|
||||
include=/etc/php/84/php-fpm.d/*.conf
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
path = "/etc/php/84/php-fpm.d/www.conf"
|
||||
data = """
|
||||
[www]
|
||||
user = user
|
||||
group = user
|
||||
listen = 127.0.0.1:9000
|
||||
pm = static
|
||||
pm.max_children = 1
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
postinstall = true
|
||||
path = "/etc/ssh/sshd_config"
|
||||
data = """
|
||||
Port 22
|
||||
AddressFamily inet
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
PermitRootLogin yes
|
||||
PasswordAuthentication yes
|
||||
PermitEmptyPasswords yes
|
||||
Subsystem sftp /usr/libexec/sftp-server
|
||||
"""
|
||||
|
||||
[users.nobody]
|
||||
password = ""
|
||||
shell = "/usr/bin/ion" #TODO: nologin?
|
||||
|
||||
[users.nginx]
|
||||
password = ""
|
||||
shell = "/usr/bin/ion" #TODO: nologin?
|
||||
|
||||
[[files]]
|
||||
path = "/root/keygen.sh"
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
|
||||
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
|
||||
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
|
||||
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ""
|
||||
fi
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/server.sh"
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/bin/sshd -D &
|
||||
nginx -g "daemon off;" &
|
||||
php-fpm --nodaemonize &
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/home/user/Welcome.txt"
|
||||
data = """
|
||||
##############################################################################
|
||||
# Welcome to Redox Server Demo!
|
||||
#
|
||||
# This is a quick demonstration of Redox used as server stack.
|
||||
# At the moment we support SSH, NGINX, Python, PHP. There's more to come
|
||||
#
|
||||
# This server demo is insecure by design, we encourage you to get familiar into
|
||||
# basics of server security if you wish to use this as a production server.
|
||||
#
|
||||
# There should be rustysd already running, if not, you can try start it manually
|
||||
# > sudo rustysd --conf /etc/rustysd
|
||||
#
|
||||
# You can also try running all daemons manually
|
||||
# > sudo bash server.sh
|
||||
#
|
||||
# The server will start port 22 (ssh), 80 (static web) and 8081 (php)
|
||||
# If you use the Redox OS build system, starting QEMU with `net=redir`
|
||||
# should expose those port to 8022, 8080 and 8081.
|
||||
# Try logging in to console via SSH with `ssh user@localhost -p 8022`
|
||||
#
|
||||
##############################################################################
|
||||
"""
|
||||
1
cookbook
Submodule
1
cookbook
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 84535c9062c8f977e0d7c76ade8a3c751982b4d6
|
||||
3
docker/.bash_aliases
Normal file
3
docker/.bash_aliases
Normal file
@ -0,0 +1,3 @@
|
||||
# Hijack this file to set this PS1, visually indicating to the user that we are running the docker container
|
||||
|
||||
PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[1;35m\]<$IMAGE_NAME>\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
|
||||
43
docker/Dockerfile
Executable file
43
docker/Dockerfile
Executable file
@ -0,0 +1,43 @@
|
||||
FROM rustlang/rust:nightly
|
||||
|
||||
ENV IMAGE_NAME=redox-os-docker
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get update; \
|
||||
apt-get install -q -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
bison \
|
||||
flex \
|
||||
fuse \
|
||||
gosu \
|
||||
libfuse-dev \
|
||||
nasm \
|
||||
qemu-utils \
|
||||
sudo \
|
||||
texinfo \
|
||||
autopoint \
|
||||
git \
|
||||
cmake \
|
||||
gperf \
|
||||
libhtml-parser-perl \
|
||||
; \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F; \
|
||||
echo "deb https://static.redox-os.org/toolchain/apt/ /" >> \
|
||||
/etc/apt/sources.list.d/redox.list; \
|
||||
apt-get update -o Dir::Etc::sourcelist="redox.list"; \
|
||||
apt-get install -q -y --no-install-recommends \
|
||||
x86-64-unknown-redox-newlib \
|
||||
x86-64-unknown-redox-binutils \
|
||||
x86-64-unknown-redox-gcc \
|
||||
; \
|
||||
cargo install xargo; \
|
||||
cargo install cargo-config; \
|
||||
apt-get autoremove -q -y; \
|
||||
apt-get clean -q -y; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
COPY .bash_aliases /etc/skel/
|
||||
|
||||
ENTRYPOINT ["bash", "/usr/local/bin/entrypoint.sh"]
|
||||
CMD ["/bin/bash"]
|
||||
85
docker/README.md
Normal file
85
docker/README.md
Normal file
@ -0,0 +1,85 @@
|
||||
## Building Redox using a Docker image with the pre-built toolchain
|
||||
|
||||
*All you need is `git`, `make`, `qemu`, `fuse` and `docker`. The method requires
|
||||
a non-privileged user able to run the `docker` command, which is usually achieved
|
||||
by adding the user to the `docker` group.*
|
||||
|
||||
It's a three-steps process with variations depending on the platform.
|
||||
On the first execution of one of the following docker commands, the
|
||||
official container image will be pulled from dockerhub and stored
|
||||
locally.
|
||||
|
||||
The image includes the required dependencies and the pre-built
|
||||
toolchain. As long as you rely on this particular dependencies and
|
||||
toolchain versions, you don't need to update the container.
|
||||
|
||||
### <a name='get_the_sources'></a>Get the sources
|
||||
```
|
||||
git clone https://gitlab.redox-os.org/redox-os/redox.git ; cd redox
|
||||
```
|
||||
|
||||
### Update the source tree
|
||||
Note: if you use the container on a different host or
|
||||
with a different user, [get the sources first](#get_the_sources).
|
||||
```shell
|
||||
git pull --rebase --recurse-submodules && git submodule sync \
|
||||
&& git submodule update --recursive --init
|
||||
```
|
||||
|
||||
### Run the container to build Redox
|
||||
```shell
|
||||
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
|
||||
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
|
||||
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
|
||||
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
|
||||
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm redoxos/redox make fetch all
|
||||
```
|
||||
#### Linux with security modules
|
||||
Add the following options depending on the security modules activated on your system:
|
||||
```shell
|
||||
--security-opt label=disable // disable SELinux
|
||||
--security-opt seccomp=unconfined // disable seccomp
|
||||
--security-opt apparmor=unconfined // disable AppArmor
|
||||
```
|
||||
Ex.: for a SELinux only system such as Fedora or CentOS
|
||||
```shell
|
||||
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
|
||||
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
|
||||
--security-opt label=disable \
|
||||
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
|
||||
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
|
||||
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm redoxos/redox make fetch all
|
||||
```
|
||||
### Run the container interactively
|
||||
```shell
|
||||
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
|
||||
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
|
||||
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
|
||||
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
|
||||
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox
|
||||
```
|
||||
|
||||
#### Demo
|
||||

|
||||
|
||||
### Clear the named volumes containing the toolchain caches
|
||||
```shell
|
||||
docker volume rm redox-"$(id -u)-$(id -g)"-cargo \
|
||||
redox-"$(id -u)-$(id -g)"-rustup
|
||||
```
|
||||
|
||||
### Build the container manually
|
||||
If you cannot access dockerhub for whatever reason, you can also build
|
||||
the container image manually.
|
||||
```shell
|
||||
docker build -t redoxos/redox docker/
|
||||
```
|
||||
|
||||
### Troubleshooting / updating
|
||||
Sometimes, builds may fail because the nightly toolchain of rust inside the container got out of sync with dependencies of redox, or there are issues with cargo. In this case, it might help to update your current container image and delete the rust and cargo caches. This way, you can start over from a clean state and rule out your local setup as the origin of errors.
|
||||
|
||||
```shell
|
||||
docker pull redoxos/redox
|
||||
docker volume rm redox-"$(id -u)-$(id -g)"-cargo \
|
||||
redox-"$(id -u)-$(id -g)"-rustup
|
||||
```
|
||||
BIN
docker/demo.gif
Normal file
BIN
docker/demo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
5
docker/docker.sh
Executable file
5
docker/docker.sh
Executable file
@ -0,0 +1,5 @@
|
||||
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
|
||||
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
|
||||
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
|
||||
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
|
||||
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox "$@"
|
||||
34
docker/entrypoint.sh
Executable file
34
docker/entrypoint.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Add local user
|
||||
# Either use LOCAL_UID and LOCAL_GID if passed in at runtime via
|
||||
# -e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" or fallback
|
||||
USER_NAME=redox
|
||||
RUN_UID=${LOCAL_UID:-9001}
|
||||
RUN_GID=${LOCAL_GID:-9001}
|
||||
|
||||
groupadd --non-unique --gid $RUN_GID $USER_NAME
|
||||
useradd --non-unique --create-home --uid $RUN_UID --gid $USER_NAME --groups sudo $USER_NAME
|
||||
|
||||
echo "$USER_NAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user-no-sudo-password
|
||||
|
||||
export HOME=/home/$USER_NAME
|
||||
|
||||
# Check current UID and GID of files in the named volume caches for
|
||||
# cargo and rustup. Test only one of the top level folders to speed
|
||||
# things up.
|
||||
TESTFILE=$RUSTUP_HOME/settings.toml
|
||||
CACHED_UID=$(stat -c "%u" $TESTFILE)
|
||||
CACHED_GID=$(stat -c "%g" $TESTFILE)
|
||||
|
||||
if [ $CACHED_UID != $RUN_UID ] || [ $RUN_GID != $CACHED_GID ]; then
|
||||
echo -e "\033[01;38;5;155mChanging user id:group to ${RUN_UID}:${RUN_GID}. Please wait...\033[0m"
|
||||
chown $RUN_UID:$RUN_GID -R $CARGO_HOME $RUSTUP_HOME
|
||||
fi
|
||||
|
||||
# fixes issue in docker for mac where fuse permissions are restricted to root:root
|
||||
# https://github.com/theferrit32/data-commons-workspace/issues/5
|
||||
# https://github.com/heliumdatacommons/data-commons-workspace/commit/f96624c8a55f5ded5ac60f4f54182a59be92e66d
|
||||
if [ -f /dev/fuse ]; then chmod 666 /dev/fuse; fi
|
||||
|
||||
exec gosu $USER_NAME "$@"
|
||||
1
filesystem.toml
Symbolic link
1
filesystem.toml
Symbolic link
@ -0,0 +1 @@
|
||||
config/desktop.toml
|
||||
82
flake.lock
generated
82
flake.lock
generated
@ -1,82 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763759067,
|
||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1763934636,
|
||||
"narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1761765539,
|
||||
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764038373,
|
||||
"narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
202
flake.nix
202
flake.nix
@ -1,202 +0,0 @@
|
||||
{
|
||||
description = "The Nix-flake for Redox development on NixOS";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
rust-overlay,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
||||
top@{
|
||||
config,
|
||||
withSystem,
|
||||
moduleWithSystem,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systems = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
lib,
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
rust-bin = pkgs.rust-bin.nightly."2026-05-24".default.override {
|
||||
extensions = [
|
||||
"rust-analyzer"
|
||||
"rust-src"
|
||||
];
|
||||
targets = [ "x86_64-unknown-redox" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
|
||||
# TODO: Create Redox OS Image as package
|
||||
# TODO: No cross-compile for now, as there is no pkgsCross.aarch64-unknown-redox and so on
|
||||
# TODO: Get rid of make env step: package custom libtool and setup rust toolchain properly
|
||||
devShells = {
|
||||
# Podman config taken from https://nixos.wiki/wiki/Podman and https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947
|
||||
# Provides a script that copies required files to ~/
|
||||
default =
|
||||
let
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = rust-bin;
|
||||
rustc = rust-bin;
|
||||
};
|
||||
|
||||
podmanSetupScript =
|
||||
let
|
||||
registriesConf = pkgs.writeText "registries.conf" ''
|
||||
[registries.search]
|
||||
registries = ['docker.io']
|
||||
[registries.block]
|
||||
registries = []
|
||||
'';
|
||||
in
|
||||
pkgs.writeScript "podman-setup" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
# Dont overwrite customised configuration
|
||||
if ! test -f ~/.config/containers/policy.json; then
|
||||
install -Dm555 ${pkgs.skopeo.src}/default-policy.json ~/.config/containers/policy.json
|
||||
fi
|
||||
if ! test -f ~/.config/containers/registries.conf; then
|
||||
install -Dm555 ${registriesConf} ~/.config/containers/registries.conf
|
||||
fi
|
||||
systemctl --user start podman.socket || true
|
||||
export PODMAN_SYSTEMD_UNIT=podman.socket
|
||||
'';
|
||||
# Provides a fake "docker" binary mapping to podman
|
||||
dockerCompat = pkgs.runCommand "docker-podman-compat" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
||||
'';
|
||||
|
||||
in
|
||||
pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [
|
||||
# Podman
|
||||
dockerCompat
|
||||
podman # Docker compat
|
||||
runc # Container runtime
|
||||
conmon # Container runtime monitor
|
||||
skopeo # Interact with container registry
|
||||
slirp4netns # User-mode networking for unprivileged namespaces
|
||||
fuse-overlayfs # CoW for images, much faster than default vfs
|
||||
|
||||
# with FSTOOLS_IN_PODMAN=1 these are not needed
|
||||
# without it, the installer fails to link FUSE somehow
|
||||
#fuse
|
||||
#rust-bin
|
||||
qemu_kvm
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
NIX_SHELL_BUILD = "1";
|
||||
FSTOOLS_IN_PODMAN = "1";
|
||||
shellHook = ''
|
||||
# Install required configuration
|
||||
${podmanSetupScript}
|
||||
echo "Redox podman build environment loaded"
|
||||
'';
|
||||
};
|
||||
|
||||
#TODO: This isn't tested yet, use at your own risk
|
||||
native = pkgs.mkShell rec {
|
||||
nativeBuildInputs =
|
||||
let
|
||||
autoreconf269 = pkgs.writeShellScriptBin "autoreconf2.69" "${pkgs.autoconf269}/bin/autoreconf";
|
||||
in
|
||||
with pkgs;
|
||||
[
|
||||
ant
|
||||
autoconf
|
||||
autoreconf269 # gnu-binutils
|
||||
automake
|
||||
bison
|
||||
cmake
|
||||
curl
|
||||
doxygen
|
||||
file
|
||||
flex
|
||||
gettext
|
||||
gnumake
|
||||
gnupatch
|
||||
gperf
|
||||
help2man
|
||||
just
|
||||
llvmPackages.clang
|
||||
llvmPackages.llvm
|
||||
lua
|
||||
m4
|
||||
meson
|
||||
nasm
|
||||
ninja
|
||||
perl
|
||||
perl540Packages.HTMLParser
|
||||
perl540Packages.Po4a
|
||||
pkg-config
|
||||
pkgconf
|
||||
(python3.withPackages (ps: with ps; [ mako ]))
|
||||
qemu_kvm
|
||||
rust-cbindgen
|
||||
scons
|
||||
texinfo
|
||||
unzip
|
||||
waf
|
||||
wget
|
||||
xdg-utils
|
||||
xxd
|
||||
zip
|
||||
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||
pkgs.syslinux
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
rust-bin
|
||||
fuse # fuser
|
||||
libpng # netsurf
|
||||
fontconfig # orbutils
|
||||
SDL # prboom
|
||||
xorg.utilmacros # libX11
|
||||
xorg.xtrans # libX11
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
PERL_PATH = "${pkgs.perl}/bin/perl";
|
||||
NIX_SHELL_BUILD = "1";
|
||||
PODMAN_BUILD = "0";
|
||||
shellHook = with pkgs; ''
|
||||
export PKG_CONFIG_PATH="${fuse.dev}/lib/pkgconfig\
|
||||
:${libpng.dev}/lib/pkgconfig"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
36
initfs.toml
Normal file
36
initfs.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
drivers = {}
|
||||
init = {}
|
||||
nulld = {}
|
||||
#pciids = {}
|
||||
ramfs = {}
|
||||
randd = {}
|
||||
redoxfs = {}
|
||||
zerod = {}
|
||||
|
||||
[[files]]
|
||||
path="/etc/init.rc"
|
||||
data="""
|
||||
export PATH /bin
|
||||
export TMPDIR /tmp
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
vesad T T G
|
||||
stdio display:1
|
||||
ps2d us
|
||||
ramfs logging
|
||||
pcid /etc/pcid/initfs.toml
|
||||
redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
|
||||
cd file:
|
||||
export PATH file:/bin
|
||||
run.d /etc/init.d
|
||||
"""
|
||||
36
initfs_coreboot.toml
Normal file
36
initfs_coreboot.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
drivers = {}
|
||||
init = {}
|
||||
nulld = {}
|
||||
#pciids = {}
|
||||
ramfs = {}
|
||||
randd = {}
|
||||
redoxfs = {}
|
||||
zerod = {}
|
||||
|
||||
[[files]]
|
||||
path="/etc/init.rc"
|
||||
data="""
|
||||
export PATH /bin
|
||||
export TMPDIR /tmp
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
vesad T T G
|
||||
stdio display:1
|
||||
ps2d us
|
||||
ramfs logging
|
||||
pcid /etc/pcid/initfs.toml
|
||||
redoxfs disk/live: file
|
||||
cd file:
|
||||
export PATH file:/bin
|
||||
run.d /etc/init.d
|
||||
"""
|
||||
36
initfs_live.toml
Normal file
36
initfs_live.toml
Normal file
@ -0,0 +1,36 @@
|
||||
# This is the default configuration file
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
drivers = {}
|
||||
init = {}
|
||||
nulld = {}
|
||||
#pciids = {}
|
||||
ramfs = {}
|
||||
randd = {}
|
||||
redoxfs = {}
|
||||
zerod = {}
|
||||
|
||||
[[files]]
|
||||
path="/etc/init.rc"
|
||||
data="""
|
||||
export PATH /bin
|
||||
export TMPDIR /tmp
|
||||
nulld
|
||||
zerod
|
||||
randd
|
||||
vesad T T G
|
||||
stdio display:1
|
||||
ps2d us
|
||||
ramfs logging
|
||||
pcid /etc/pcid/initfs.toml
|
||||
redoxfs disk/live: file
|
||||
cd file:
|
||||
export PATH file:/bin
|
||||
run.d /etc/init.d
|
||||
"""
|
||||
1
installer
Submodule
1
installer
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 150d65c31ba05c829ba239a3febe1e44b6e512e8
|
||||
1
isolinux
Submodule
1
isolinux
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3cf79d335400af8fc3a87a13f0ae12777a766b3b
|
||||
1
kernel
Submodule
1
kernel
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 903390283066a988b74e86e3630106b12b4df806
|
||||
2
mk/bochs.mk
Normal file
2
mk/bochs.mk
Normal file
@ -0,0 +1,2 @@
|
||||
bochs: build/livedisk.bin
|
||||
bochs -f bochs.$(ARCH)
|
||||
71
mk/ci.mk
71
mk/ci.mk
@ -1,71 +0,0 @@
|
||||
# Configuration file of the build system commands for the build server
|
||||
|
||||
IMG_TAG?=$(shell git describe --tags)
|
||||
IMG_SEPARATOR?=_
|
||||
IMG_DIR?=build/img/$(ARCH)
|
||||
OS_TEST_DIR?=build/os-test/$(ARCH)
|
||||
CI_COOKBOOK_CONFIG?=CI=1 COOKBOOK_LOGS=true COOKBOOK_CLEAN_BUILD=true COOKBOOK_VERBOSE=false COOKBOOK_COMPRESSED=true COOKBOOK_WEB=true
|
||||
|
||||
# CI image target - build standard images
|
||||
# To leave out the build tag, set both IMG_TAG and IMG_SEPARATOR to null
|
||||
ci-img: FORCE
|
||||
rm -rf $(IMG_DIR)
|
||||
mkdir -p $(IMG_DIR)
|
||||
$(MAKE) server desktop demo
|
||||
cd $(IMG_DIR) && zstd --rm *
|
||||
cd $(IMG_DIR) && sha256sum -b * > SHA256SUM
|
||||
|
||||
# The name of the target must match the name of the filesystem config file
|
||||
server desktop demo: FORCE
|
||||
rm -f "build/$(ARCH)/$@/harddrive.img" "build/$(ARCH)/$@/redox-live.iso"
|
||||
export $(CI_COOKBOOK_CONFIG) REPO_NONSTOP=0 && \
|
||||
$(MAKE) CONFIG_NAME=$@ build/$(ARCH)/$@/harddrive.img build/$(ARCH)/$@/redox-live.iso
|
||||
mkdir -p $(IMG_DIR)
|
||||
cp "build/$(ARCH)/$@/harddrive.img" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_harddrive.img"
|
||||
cp "build/$(ARCH)/$@/redox-live.iso" "$(IMG_DIR)/redox_$(@)$(IMG_SEPARATOR)$(IMG_TAG)_livedisk.iso"
|
||||
|
||||
ci-os-test: FORCE
|
||||
make CONFIG_NAME=os-test unmount
|
||||
rm -f "build/$(ARCH)/os-test/harddrive.img"
|
||||
$(MAKE) CONFIG_NAME=os-test qemu gpu=no
|
||||
rm -rf $(OS_TEST_DIR)
|
||||
mkdir -p $(OS_TEST_DIR)
|
||||
$(MAKE) CONFIG_NAME=os-test mount
|
||||
cp -rv build/$(ARCH)/os-test/filesystem/usr/share/os-test/html $(OS_TEST_DIR)
|
||||
cp -v build/$(ARCH)/os-test/filesystem/usr/share/os-test/os-test.json $(OS_TEST_DIR)
|
||||
tar \
|
||||
--create \
|
||||
--gzip \
|
||||
--file "$(OS_TEST_DIR)/out.tar.gz" \
|
||||
--directory="build/$(ARCH)/os-test/filesystem/usr/share/os-test" \
|
||||
out
|
||||
$(MAKE) CONFIG_NAME=os-test unmount
|
||||
|
||||
# CI packaging target
|
||||
ci-pkg: prefix $(FSTOOLS_TAG) $(CONTAINER_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) build --manifest-path Cargo.toml --release
|
||||
export $(CI_COOKBOOK_CONFIG) REPO_NONSTOP=1 PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
$(REPO_BIN) cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
|
||||
endif
|
||||
|
||||
# CI toolchain
|
||||
ci-toolchain: $(CONTAINER_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) PREFIX_BINARY=0 \
|
||||
"prefix/$(TARGET)/gcc-install.tar.gz" \
|
||||
"prefix/$(TARGET)/relibc-install.tar.gz" \
|
||||
"prefix/$(TARGET)/rust-install.tar.gz" \
|
||||
"prefix/$(TARGET)/clang-install.tar.gz"
|
||||
rm -rf "build/toolchain/$(HOST_TARGET)/$(TARGET)"
|
||||
mkdir -p "build/toolchain/$(HOST_TARGET)/$(TARGET)"
|
||||
cp "prefix/$(TARGET)/gcc-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/gcc-install.tar.gz"
|
||||
cp "prefix/$(TARGET)/relibc-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz"
|
||||
cp "prefix/$(TARGET)/rust-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/rust-install.tar.gz"
|
||||
cp "prefix/$(TARGET)/clang-install.tar.gz" "build/toolchain/$(HOST_TARGET)/$(TARGET)/clang-install.tar.gz"
|
||||
cd "build/toolchain/$(HOST_TARGET)/$(TARGET)" && sha256sum -b * > SHA256SUM
|
||||
endif
|
||||
227
mk/config.mk
227
mk/config.mk
@ -1,141 +1,35 @@
|
||||
# Configuration file of the build system environment variables
|
||||
|
||||
-include .config
|
||||
|
||||
HOST_ARCH?=$(shell uname -m)
|
||||
|
||||
# Configuration
|
||||
## Architecture to build Redox for (aarch64, i586, or x86_64). Defaults to a host one
|
||||
ARCH?=$(HOST_ARCH)
|
||||
## Sub-device type for aarch64 if needed
|
||||
BOARD?=
|
||||
## Enable to use binary prefix (much faster)
|
||||
## Architecture to build Redox for (aarch64 or x86_64)
|
||||
ARCH?=x86_64
|
||||
## Flags to pass to the installer (empty to download binary packages)
|
||||
INSTALLER_FLAGS?=--cookbook=cookbook
|
||||
## Enabled to use binary prefix (much faster)
|
||||
PREFIX_BINARY?=1
|
||||
## Enable to use up-to-date rust compiler (experimental, only available to Tier 2 targets)
|
||||
## Even more experimental, add -Zbuild-std to cookbook.toml to allow compilation to Tier 3 targets
|
||||
PREFIX_USE_UPSTREAM_RUST_COMPILER?=0
|
||||
## Enable to use binary packages (much faster)
|
||||
REPO_BINARY?=0
|
||||
## Name of the configuration to include in the image name e.g. desktop or server
|
||||
CONFIG_NAME?=desktop
|
||||
## Build appstream data for repo
|
||||
REPO_APPSTREAM?=0
|
||||
## Ignore errors when building the repo, attempt to build every package
|
||||
REPO_NONSTOP?=0
|
||||
## Do not update source repos, attempt to build in offline condition
|
||||
REPO_OFFLINE?=0
|
||||
## Do not strip debug info for local build
|
||||
REPO_DEBUG?=0
|
||||
## Old config value that need to be corrected
|
||||
ifeq ($(ARCH),i686)
|
||||
ARCH=i586
|
||||
endif
|
||||
## Select filesystem config
|
||||
ifeq ($(BOARD),)
|
||||
ifeq ($(wildcard config/$(ARCH)/$(CONFIG_NAME).toml),)
|
||||
FILESYSTEM_CONFIG?=config/$(CONFIG_NAME).toml
|
||||
else
|
||||
FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml
|
||||
endif
|
||||
else
|
||||
FILESYSTEM_CONFIG?=config/$(ARCH)/$(BOARD)/$(CONFIG_NAME).toml
|
||||
endif
|
||||
HOST_CARGO=env -u RUSTUP_TOOLCHAIN -u CC -u TARGET cargo
|
||||
## Filesystem size in MB (default comes from filesystem_size in the FILESYSTEM_CONFIG)
|
||||
## FILESYSTEM_SIZE?=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG))
|
||||
## Flags to pass to redoxfs-mkfs. Add --encrypt to set up disk encryption
|
||||
REDOXFS_MKFS_FLAGS?=
|
||||
## Set to 1 to enable Podman build, any other value will disable it
|
||||
PODMAN_BUILD?=1
|
||||
## Set to 1 to put filesystem tools inside podman, any other value will install it to host
|
||||
FSTOOLS_IN_PODMAN?=0
|
||||
## Set to 1 if FUSE is not available and we are running in a container
|
||||
FSTOOLS_NO_MOUNT?=0
|
||||
## Enable sccache to speed up cargo builds
|
||||
## only do this by default if this is inside podman
|
||||
SCCACHE_BUILD?=$(shell [ -f /run/.containerenv ] && echo 1 || echo 0)
|
||||
## The containerfile to use for the Podman base image
|
||||
CONTAINERFILE?=podman/redox-base-containerfile
|
||||
## Filesystem size in MB (256 is the default)
|
||||
FILESYSTEM_SIZE?=256
|
||||
|
||||
# Per host variables
|
||||
NPROC=nproc
|
||||
SED=sed
|
||||
FIND=find
|
||||
REPO_BIN=./target/release/repo
|
||||
|
||||
ifneq ($(PODMAN_BUILD),1)
|
||||
FSTOOLS_IN_PODMAN=0
|
||||
HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")
|
||||
# x86_64 linux hosts have all toolchains
|
||||
ifeq ($(PREFIX_BINARY),1)
|
||||
ifeq ($(HOST_TARGET),aarch64-unknown-linux-gnu)
|
||||
ifneq ($(ARCH),aarch64)
|
||||
ifneq ($(ARCH),x86_64)
|
||||
$(info The $(ARCH) binary prefix is only built for x86_64 Linux hosts)
|
||||
PREFIX_BINARY=0
|
||||
endif
|
||||
endif
|
||||
else ifeq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
|
||||
else
|
||||
$(info The $(ARCH) binary prefix is only built for Linux hosts)
|
||||
PREFIX_BINARY=0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SCCACHE_BUILD),1)
|
||||
ifeq (,$(shell command -v sccache))
|
||||
$(info sccache not found in PATH)
|
||||
SCCACHE_BUILD=0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(REPO_APPSTREAM),1)
|
||||
export COOKBOOK_APPSTREAM=true
|
||||
endif
|
||||
ifeq ($(REPO_NONSTOP),1)
|
||||
export COOKBOOK_NONSTOP=true
|
||||
endif
|
||||
ifeq ($(REPO_OFFLINE),1)
|
||||
export COOKBOOK_OFFLINE=true
|
||||
endif
|
||||
ifeq ($(REPO_DEBUG),1)
|
||||
export COOKBOOK_NOSTRIP=true
|
||||
export COOKBOOK_DEBUG=true
|
||||
#TODO: https://gitlab.redox-os.org/redox-os/relibc/-/issues/226
|
||||
# export PROFILE=debug
|
||||
# export RUSTCFLAGS="-Cdebuginfo=2"
|
||||
endif
|
||||
|
||||
UNAME := $(shell uname)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
FUMOUNT=umount
|
||||
NPROC=sysctl -n hw.ncpu
|
||||
SED=gsed
|
||||
FIND=gfind
|
||||
FUMOUNT=sudo umount
|
||||
export NPROC=sysctl -n hw.ncpu
|
||||
export REDOX_MAKE=make
|
||||
PREFIX_BINARY=0
|
||||
VB_AUDIO=coreaudio
|
||||
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
||||
else ifeq ($(UNAME),FreeBSD)
|
||||
FIND=gfind
|
||||
FUMOUNT=sudo umount
|
||||
VB_AUDIO=pulse # To check, will probably be OSS on most setups
|
||||
export NPROC=sysctl -n hw.ncpu
|
||||
export REDOX_MAKE=gmake
|
||||
PREFIX_BINARY=0
|
||||
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
|
||||
VBM=VBoxManage
|
||||
else ifeq ($(UNAME),Redox)
|
||||
PODMAN_BUILD=0
|
||||
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
# TODO: allow overriding to cross compiler toolchain when build server have one prebuilt
|
||||
HOSTED_REDOX=1
|
||||
ifneq ($(shell which repo),)
|
||||
REPO_BIN=repo
|
||||
endif
|
||||
else
|
||||
# Detect which version of the fusermount binary is available.
|
||||
ifneq (, $(shell which fusermount3))
|
||||
FUMOUNT=fusermount3 -u
|
||||
else
|
||||
FUMOUNT=fusermount -u
|
||||
endif
|
||||
|
||||
FUMOUNT=fusermount -u
|
||||
export NPROC=nproc
|
||||
export REDOX_MAKE=make
|
||||
VB_AUDIO=pulse
|
||||
VBM=VBoxManage
|
||||
endif
|
||||
@ -143,65 +37,38 @@ endif
|
||||
# Automatic variables
|
||||
ROOT=$(CURDIR)
|
||||
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
|
||||
export TESTBIN?=
|
||||
RUNNING_IN_PODMAN=$(shell [ -f /run/.containerenv ] && echo 1 || echo 0)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifeq ($(RUNNING_IN_PODMAN),1)
|
||||
$(info Please unset PODMAN_BUILD=1 in .config!)
|
||||
endif
|
||||
endif
|
||||
export RUST_TARGET_PATH=$(ROOT)/kernel/targets
|
||||
export XARGO_RUST_SRC=$(ROOT)/rust/src
|
||||
|
||||
ALLOW_FSTOOLS?=0
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),0)
|
||||
ifeq ($(RUNNING_IN_PODMAN),0)
|
||||
ALLOW_FSTOOLS=1
|
||||
endif
|
||||
endif
|
||||
## Kernel variables
|
||||
KTARGET=$(ARCH)-unknown-none
|
||||
KBUILD=build/kernel
|
||||
|
||||
## Userspace variables
|
||||
ifeq ($(ARCH),riscv64gc)
|
||||
export TARGET=riscv64gc-unknown-redox
|
||||
export GNU_TARGET=riscv64-unknown-redox
|
||||
else
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
export GNU_TARGET=$(ARCH)-unknown-redox
|
||||
endif
|
||||
BUILD=build/$(ARCH)/$(CONFIG_NAME)
|
||||
MOUNT_DIR=$(BUILD)/filesystem
|
||||
FSTOOLS=build/fstools
|
||||
INSTALLER=$(FSTOOLS)/bin/redox_installer
|
||||
REDOXFS=$(FSTOOLS)/bin/redoxfs
|
||||
REDOXFS_MKFS=$(FSTOOLS)/bin/redoxfs-mkfs
|
||||
INSTALLER_OPTS=--cookbook=. --config-name=$(CONFIG_NAME)
|
||||
INSTALLER_FEATURES=
|
||||
REDOXFS_FEATURES=
|
||||
COOKBOOK_OPTS="--filesystem=$(FILESYSTEM_CONFIG)"
|
||||
ifeq ($(REPO_BINARY),1)
|
||||
INSTALLER_OPTS+=--repo-binary
|
||||
COOKBOOK_OPTS+=--repo-binary
|
||||
endif
|
||||
ifeq ($(FSTOOLS_NO_MOUNT),1)
|
||||
INSTALLER_OPTS+=--no-mount
|
||||
INSTALLER_FEATURES=--no-default-features --features installer
|
||||
REDOXFS_FEATURES= --no-default-features --features std,log
|
||||
endif
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
BUILD=build/userspace
|
||||
INSTALLER=\
|
||||
export REDOXER_TOOLCHAIN="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
installer/target/release/redox_installer $(INSTALLER_FLAGS)
|
||||
|
||||
REPO_TAG=$(BUILD)/repo.tag
|
||||
FSTOOLS_TAG=build/fstools.tag
|
||||
export BOARD FIND
|
||||
## Bootloader variables
|
||||
EFI_TARGET=$(ARCH)-unknown-uefi
|
||||
|
||||
ifeq ($(SCCACHE_BUILD),1)
|
||||
export CC_WRAPPER:=sccache
|
||||
export RUSTC_WRAPPER:=$(CC_WRAPPER)
|
||||
endif
|
||||
## Cross compiler variables
|
||||
AR=$(TARGET)-gcc-ar
|
||||
AS=$(TARGET)-as
|
||||
CC=$(TARGET)-gcc
|
||||
CXX=$(TARGET)-g++
|
||||
LD=$(TARGET)-ld
|
||||
NM=$(TARGET)-gcc-nm
|
||||
OBJCOPY=$(TARGET)-objcopy
|
||||
OBJDUMP=$(TARGET)-objdump
|
||||
RANLIB=$(TARGET)-gcc-ranlib
|
||||
READELF=$(TARGET)-readelf
|
||||
STRIP=$(TARGET)-strip
|
||||
|
||||
ifeq ($(HOSTED_REDOX),1)
|
||||
FSTOOLS_TAG=
|
||||
endif
|
||||
|
||||
## If Podman is being used, a container is required
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
CONTAINER_TAG=build/container.tag
|
||||
else
|
||||
CONTAINER_TAG=
|
||||
endif
|
||||
## Rust cross compile variables
|
||||
export AR_$(subst -,_,$(TARGET))=$(TARGET)-ar
|
||||
export CC_$(subst -,_,$(TARGET))=$(TARGET)-gcc
|
||||
export CXX_$(subst -,_,$(TARGET))=$(TARGET)-g++
|
||||
|
||||
@ -1,29 +1,19 @@
|
||||
# Configuration file for the build system dependencies
|
||||
# Dependencies
|
||||
|
||||
# Don't check for dependencies if you will be using Podman
|
||||
ifneq ($(PODMAN_BUILD),1)
|
||||
# Don't check for dependencies if you will be using Hosted Redox
|
||||
ifneq ($(HOSTED_REDOX),1)
|
||||
|
||||
# don't check for Rust and Cargo if building on a Nix system
|
||||
ifneq ($(NIX_SHELL_BUILD),1)
|
||||
ifeq ($(shell which rustup),)
|
||||
$(error rustup not found, install from "https://rustup.rs/")
|
||||
endif
|
||||
endif
|
||||
|
||||
# don't check for compile tools, used internally when installing fstools on host
|
||||
ifneq ($(SKIP_CHECK_TOOLS),1)
|
||||
ifeq ($(shell which cbindgen),)
|
||||
$(error cbindgen not found, install from crates.io or from your package manager)
|
||||
endif
|
||||
ifeq ($(shell which nasm),)
|
||||
$(error nasm not found, install from your package manager)
|
||||
endif
|
||||
ifeq ($(shell which just),)
|
||||
$(error 'just' not found, install from crates.io or from your package manager)
|
||||
endif
|
||||
|
||||
CARGO_CONFIG_VERSION=0.1.1
|
||||
ifeq ($(shell env -u RUSTUP_TOOLCHAIN cargo install --list | grep '^cargo-config v$(CARGO_CONFIG_VERSION):$$'),)
|
||||
$(error cargo-config $(CARGO_CONFIG_VERSION) not found, run "cargo install --force --version $(CARGO_CONFIG_VERSION) cargo-config")
|
||||
endif
|
||||
|
||||
endif
|
||||
XARGO_VERSION=0.3.20
|
||||
ifeq ($(shell env -u RUSTUP_TOOLCHAIN cargo install --list | grep '^xargo v$(XARGO_VERSION):$$'),)
|
||||
$(error xargo $(XARGO_VERSION) not found, run "cargo install --force --version $(XARGO_VERSION) xargo")
|
||||
endif
|
||||
|
||||
175
mk/disk.mk
175
mk/disk.mk
@ -1,105 +1,78 @@
|
||||
# Configuration file with the commands configuration of the Redox image
|
||||
build/bootloader: bootloader/$(ARCH)/**
|
||||
mkdir -p build
|
||||
nasm -f bin -o $@ -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/disk.asm
|
||||
|
||||
$(BUILD)/harddrive.img: $(FSTOOLS) $(REPO_TAG)
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p $(BUILD)
|
||||
-$(FUMOUNT) $(MOUNT_DIR) || true
|
||||
-$(FUMOUNT) /tmp/redox_installer || true
|
||||
rm -rf $@ $@.partial $(MOUNT_DIR)
|
||||
FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
|
||||
if [ -z "$$FILESYSTEM_SIZE" ] ; then \
|
||||
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
|
||||
fi && \
|
||||
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
|
||||
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $@.partial
|
||||
build/harddrive.bin: build/filesystem.bin bootloader/$(ARCH)/**
|
||||
nasm -f bin -o build/bootsector.bin -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/disk.asm
|
||||
dd if=/dev/zero of=$@.partial bs=1M count=$$(expr $$(du -m $< | cut -f1) + 2)
|
||||
parted -s -a minimal $@.partial mklabel msdos
|
||||
parted -s -a minimal $@.partial mkpart primary 2048s $$(expr $$(du -m $< | cut -f1) \* 2048 + 2048)s
|
||||
dd if=build/bootsector.bin of=$@.partial bs=1 count=446 conv=notrunc
|
||||
dd if=build/bootsector.bin of=$@.partial bs=512 skip=1 seek=1 conv=notrunc
|
||||
dd if=$< of=$@.partial bs=1M seek=1 conv=notrunc
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(BUILD)/redox-live.iso: $(FSTOOLS) $(REPO_TAG) redox.ipxe
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p $(BUILD)
|
||||
rm -rf $@ $@.partial
|
||||
-$(FUMOUNT) /tmp/redox_installer || true
|
||||
FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
|
||||
if [ -z "$$FILESYSTEM_SIZE" ] ; then \
|
||||
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
|
||||
fi && \
|
||||
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
|
||||
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) --write-bootloader="$(BUILD)/bootloader-live.efi" --live $@.partial
|
||||
build/livedisk.bin: build/kernel_live bootloader/$(ARCH)/**
|
||||
nasm -f bin -o $@ -D ARCH_$(ARCH) -D KERNEL=$< -ibootloader/$(ARCH)/ bootloader/$(ARCH)/disk.asm
|
||||
|
||||
build/livedisk.iso: build/livedisk.bin.gz
|
||||
rm -rf build/iso/
|
||||
mkdir -p build/iso/
|
||||
cp -RL isolinux build/iso/
|
||||
cp $< build/iso/livedisk.gz
|
||||
genisoimage -o $@ -b isolinux/isolinux.bin -c isolinux/boot.cat \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
build/iso/
|
||||
isohybrid $@
|
||||
|
||||
bootloader-coreboot/build/bootloader: build/kernel_coreboot
|
||||
env --unset=RUST_TARGET_PATH --unset=RUSTUP_TOOLCHAIN --unset=XARGO_RUST_SRC \
|
||||
$(MAKE) -C bootloader-coreboot clean build/bootloader KERNEL="$(ROOT)/$<"
|
||||
|
||||
build/coreboot.elf: bootloader-coreboot/build/bootloader
|
||||
mkdir -p build
|
||||
cp -v $< $@
|
||||
|
||||
bootloader-efi/build/$(EFI_TARGET)/boot.efi: FORCE
|
||||
env --unset=RUST_TARGET_PATH --unset=RUSTUP_TOOLCHAIN --unset=XARGO_RUST_SRC \
|
||||
$(MAKE) -C bootloader-efi build/$(EFI_TARGET)/boot.efi TARGET=$(EFI_TARGET)
|
||||
|
||||
build/bootloader.efi: bootloader-efi/build/$(EFI_TARGET)/boot.efi
|
||||
mkdir -p build
|
||||
cp -v $< $@
|
||||
|
||||
build/harddrive-efi.bin: build/bootloader.efi build/filesystem.bin
|
||||
# TODO: Validate the correctness of this \
|
||||
# Populate an EFI system partition \
|
||||
dd if=/dev/zero of=$@.esp bs=1048576 count=$$(expr $$(du -m $< | cut -f1) + 1) && \
|
||||
mkfs.vfat $@.esp && \
|
||||
mmd -i $@.esp efi && \
|
||||
mmd -i $@.esp efi/boot && \
|
||||
mcopy -i $@.esp $< ::efi/boot/bootx64.efi && \
|
||||
# Create the disk \
|
||||
dd if=/dev/zero of=$@ bs=1048576 count=$$(expr $$(du -m $< | cut -f1) + 2 + $$(du -m build/filesystem.bin | cut -f1)) && \
|
||||
# Create partition table \
|
||||
parted -s -a minimal $@ mklabel gpt && \
|
||||
efi_disk_size=$$(du -m $< | cut -f1) && \
|
||||
efi_disk_blkcount=$$(expr $$efi_disk_size \* $$(expr 1048576 / 512)) && \
|
||||
efi_end=$$(expr 2048 + $$efi_disk_blkcount) && \
|
||||
efi_last=$$(expr $$efi_end - 1) && \
|
||||
parted -s -a minimal $@ mkpart EFI fat32 2048s "$${efi_last}s" && \
|
||||
fs_disk_size=$$(du -m build/filesystem.bin | cut -f1) && \
|
||||
fs_disk_blkcount=$$(expr $$fs_disk_size \* $$(expr 1048576 / 512)) && \
|
||||
parted -s -a minimal $@ mkpart redox ext4 "$${efi_end}s" $$(expr $$efi_end + $$fs_disk_blkcount)s && \
|
||||
parted -s -a minimal $@ set 1 boot on && \
|
||||
parted -s -a minimal $@ set 1 esp on && \
|
||||
# Write the partitions \
|
||||
dd if=$@.esp bs=512 seek=2048 conv=notrunc count=$$efi_disk_blkcount of=$@ && \
|
||||
dd if=build/filesystem.bin seek=$$efi_end bs=512 conv=notrunc of=$@ count=$$fs_disk_blkcount
|
||||
|
||||
build/livedisk-efi.iso: build/bootloader.efi build/kernel_live
|
||||
dd if=/dev/zero of=$@.partial bs=1048576 count=$$(expr $$(du -mc $^ | grep 'total$$' | cut -f1) + 1)
|
||||
mkfs.vfat $@.partial
|
||||
mmd -i $@.partial efi
|
||||
mmd -i $@.partial efi/boot
|
||||
mcopy -i $@.partial $< ::efi/boot/bootx64.efi
|
||||
mmd -i $@.partial redox_bootloader
|
||||
mcopy -i $@.partial -s build/kernel_live ::redox_bootloader/kernel
|
||||
mv $@.partial $@
|
||||
cp redox.ipxe $(BUILD)/redox.ipxe
|
||||
endif
|
||||
|
||||
$(BUILD)/filesystem.img: $(FSTOOLS) $(REPO_TAG)
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p $(BUILD)
|
||||
-$(FUMOUNT) $(MOUNT_DIR) || true
|
||||
rm -rf $@ $@.partial $(MOUNT_DIR)
|
||||
-$(FUMOUNT) /tmp/redox_installer || true
|
||||
FILESYSTEM_SIZE=$(FILESYSTEM_SIZE) && \
|
||||
if [ -z "$$FILESYSTEM_SIZE" ] ; then \
|
||||
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
|
||||
fi && \
|
||||
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
|
||||
$(REDOXFS_MKFS) $(REDOXFS_MKFS_FLAGS) $@.partial
|
||||
mkdir -p $(MOUNT_DIR)
|
||||
$(REDOXFS) $@.partial $(MOUNT_DIR)
|
||||
sleep 1
|
||||
pgrep redoxfs
|
||||
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $(MOUNT_DIR)
|
||||
sync
|
||||
-$(FUMOUNT) $(MOUNT_DIR) || true
|
||||
rm -rf $(MOUNT_DIR)
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
mount: $(FSTOOLS) FORCE
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@mkdir -p $(MOUNT_DIR)
|
||||
$(REDOXFS) $(BUILD)/harddrive.img $(MOUNT_DIR)
|
||||
@sleep 2
|
||||
@echo "\033[1;36;49mharddrive.img mounted ($$(pgrep redoxfs))\033[0m"
|
||||
endif
|
||||
|
||||
mount_extra: $(FSTOOLS) FORCE
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@mkdir -p $(MOUNT_DIR)
|
||||
$(REDOXFS) $(BUILD)/extra.img $(MOUNT_DIR)
|
||||
@sleep 2
|
||||
@echo "\033[1;36;49mextra.img mounted ($$(pgrep redoxfs))\033[0m"
|
||||
endif
|
||||
|
||||
mount_live: $(FSTOOLS) FORCE
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@mkdir -p $(MOUNT_DIR)
|
||||
$(REDOXFS) $(BUILD)/redox-live.iso $(MOUNT_DIR)
|
||||
@sleep 2
|
||||
@echo "\033[1;36;49mredox-live.iso mounted ($$(pgrep redoxfs))\033[0m"
|
||||
endif
|
||||
|
||||
unmount: FORCE
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@sync
|
||||
ifneq ($(wildcard $(MOUNT_DIR)),)
|
||||
$(FUMOUNT) $(MOUNT_DIR)
|
||||
@rm -rf $(MOUNT_DIR)
|
||||
@echo "\033[1;36;49mFilesystem unmounted\033[0m"
|
||||
else
|
||||
@echo "\033[1;36;49mDisk is not mounted\033[0m"
|
||||
endif
|
||||
@-$(FUMOUNT) /tmp/redox_installer 2>/dev/null || true
|
||||
endif
|
||||
|
||||
41
mk/filesystem.mk
Normal file
41
mk/filesystem.mk
Normal file
@ -0,0 +1,41 @@
|
||||
build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
cargo build --manifest-path installer/Cargo.toml --release
|
||||
cargo build --manifest-path redoxfs/Cargo.toml --release
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
rm -rf $@ $@.partial build/filesystem/
|
||||
dd if=/dev/zero of=$@.partial bs=1048576 count="$(FILESYSTEM_SIZE)"
|
||||
cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs-mkfs $@.partial
|
||||
mkdir -p build/filesystem/
|
||||
redoxfs/target/release/redoxfs $@.partial build/filesystem/
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
cp $< build/filesystem/filesystem.toml
|
||||
cp build/bootloader build/filesystem/bootloader
|
||||
cp build/kernel build/filesystem/kernel
|
||||
cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/include build/filesystem/include
|
||||
cp -r $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib build/filesystem/lib
|
||||
$(INSTALLER) -c $< build/filesystem/
|
||||
sync
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
rm -rf build/filesystem/
|
||||
mv $@.partial $@
|
||||
|
||||
mount: FORCE
|
||||
mkdir -p build/filesystem/
|
||||
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
|
||||
redoxfs/target/release/redoxfs build/harddrive.bin build/filesystem/
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
|
||||
mount_extra: FORCE
|
||||
mkdir -p build/filesystem/
|
||||
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
|
||||
redoxfs/target/release/redoxfs build/extra.bin build/filesystem/
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
|
||||
unmount: FORCE
|
||||
sync
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
rm -rf build/filesystem/
|
||||
@ -1,56 +0,0 @@
|
||||
# Configuration file for redox-installer, Cookbook and RedoxFS FUSE
|
||||
|
||||
fstools: $(FSTOOLS_TAG) $(FSTOOLS)
|
||||
|
||||
GOING_TO_PODMAN_AGAIN?=0
|
||||
|
||||
# These tools run inside Podman if it is used, or on the host if Podman is not used
|
||||
$(FSTOOLS): | prefix $(CONTAINER_TAG) $(FSTOOLS_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) $@ PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 GOING_TO_PODMAN_AGAIN=1
|
||||
endif
|
||||
else
|
||||
rm -rf $@ $@.partial
|
||||
mkdir -p $@.partial
|
||||
ln -s ../../recipes $@.partial/recipes
|
||||
$(MAKE) fstools_fetch PODMAN_BUILD=$(GOING_TO_PODMAN_AGAIN)
|
||||
|
||||
# Compile installer and redoxfs for host (may be outside of podman container)
|
||||
cd $@.partial && \
|
||||
export CARGO_TARGET_DIR=../$@-target && \
|
||||
$(HOST_CARGO) install --root . --path recipes/core/installer/source --locked $(INSTALLER_FEATURES) && \
|
||||
$(HOST_CARGO) install --root . --path recipes/core/redoxfs/source --locked $(REDOXFS_FEATURES)
|
||||
|
||||
mv $@.partial $@
|
||||
touch $@
|
||||
endif
|
||||
|
||||
fstools_fetch: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) fetch host:installer host:redoxfs
|
||||
endif
|
||||
|
||||
CARGO_OFFLINE_FLAG=
|
||||
ifeq ($(REPO_OFFLINE),1)
|
||||
CARGO_OFFLINE_FLAG=--offline
|
||||
endif
|
||||
|
||||
$(FSTOOLS_TAG): $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) build --manifest-path Cargo.toml --release --locked $(CARGO_OFFLINE_FLAG)
|
||||
mkdir -p $(@D)
|
||||
touch $@
|
||||
endif
|
||||
|
||||
fstools_clean: FORCE
|
||||
rm -rf target
|
||||
rm -rf $(FSTOOLS)
|
||||
rm -rf $(FSTOOLS)-target
|
||||
rm -f $(FSTOOLS_TAG)
|
||||
40
mk/initfs.mk
Normal file
40
mk/initfs.mk
Normal file
@ -0,0 +1,40 @@
|
||||
INITFS_RM_BINS=alxd e1000d ihdad ixgbed pcspkrd redoxfs-ar redoxfs-mkfs rtl8168d usbctl usbhidd usbscsid xhcid
|
||||
|
||||
build/initfs.tag: initfs.toml prefix
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
cargo build --manifest-path installer/Cargo.toml --release
|
||||
rm -f build/libkernel.a
|
||||
rm -rf build/initfs
|
||||
mkdir -p build/initfs
|
||||
$(INSTALLER) -c $< build/initfs/
|
||||
#TODO: HACK FOR SMALLER INITFS, FIX IN PACKAGING
|
||||
for bin in $(INITFS_RM_BINS); do \
|
||||
rm -f build/initfs/bin/$$bin; \
|
||||
done
|
||||
touch $@
|
||||
|
||||
build/initfs_coreboot.tag: initfs_coreboot.toml prefix
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
cargo build --manifest-path installer/Cargo.toml --release
|
||||
rm -f build/libkernel_coreboot.a
|
||||
rm -rf build/initfs_coreboot
|
||||
mkdir -p build/initfs_coreboot
|
||||
$(INSTALLER) -c $< build/initfs_coreboot/
|
||||
#TODO: HACK FOR SMALLER INITFS, FIX IN PACKAGING
|
||||
for bin in $(INITFS_RM_BINS); do \
|
||||
rm -f build/initfs_coreboot/bin/$$bin; \
|
||||
done
|
||||
touch $@
|
||||
|
||||
build/initfs_live.tag: initfs_live.toml prefix
|
||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
||||
cargo build --manifest-path installer/Cargo.toml --release
|
||||
rm -f build/libkernel_live.a
|
||||
rm -rf build/initfs_live
|
||||
mkdir -p build/initfs_live
|
||||
$(INSTALLER) -c $< build/initfs_live/
|
||||
#TODO: HACK FOR SMALLER INITFS, FIX IN PACKAGING
|
||||
for bin in $(INITFS_RM_BINS); do \
|
||||
rm -f build/initfs_live/bin/$$bin; \
|
||||
done
|
||||
touch $@
|
||||
43
mk/kernel.mk
Normal file
43
mk/kernel.mk
Normal file
@ -0,0 +1,43 @@
|
||||
build/libkernel.a: kernel/Cargo.lock kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/* build/initfs.tag
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export INITFS_FOLDER=$(ROOT)/build/initfs && \
|
||||
cd kernel && \
|
||||
cargo rustc --lib --target=$(ROOT)/kernel/targets/$(KTARGET).json --release -Z build-std=core,alloc -- -C soft-float -C debuginfo=2 -C lto --emit link=../$@
|
||||
|
||||
build/libkernel_coreboot.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/* build/initfs_coreboot.tag
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export INITFS_FOLDER=$(ROOT)/build/initfs_coreboot && \
|
||||
cd kernel && \
|
||||
cargo rustc --lib --target=$(ROOT)/kernel/targets/$(KTARGET).json --release --features live -Z build-std=core,alloc -- -C soft-float -C debuginfo=2 -C lto --emit link=../$@
|
||||
|
||||
build/libkernel_live.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* kernel/src/*/*/*/* build/initfs_live.tag
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export INITFS_FOLDER=$(ROOT)/build/initfs_live && \
|
||||
cd kernel && \
|
||||
cargo rustc --lib --target=$(ROOT)/kernel/targets/$(KTARGET).json --release --features live -Z build-std=core,alloc -- -C soft-float -C debuginfo=2 -C lto --emit link=../$@
|
||||
|
||||
build/kernel: kernel/linkers/$(ARCH).ld build/libkernel.a
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel.a && \
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
||||
$(OBJCOPY) --strip-debug $@
|
||||
|
||||
build/kernel_coreboot: kernel/linkers/$(ARCH).ld build/libkernel_coreboot.a build/live.o
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel_coreboot.a build/live.o && \
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
||||
$(OBJCOPY) --strip-debug $@
|
||||
|
||||
build/kernel_live: kernel/linkers/$(ARCH).ld build/libkernel_live.a build/live.o
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel_live.a build/live.o && \
|
||||
$(OBJCOPY) --only-keep-debug $@ $@.sym && \
|
||||
$(OBJCOPY) --strip-debug $@
|
||||
|
||||
build/live.o: build/filesystem.bin
|
||||
#TODO: More general use of $(ARCH)
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
$(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 $< $@ \
|
||||
--redefine-sym _binary_build_filesystem_bin_start=__live_start \
|
||||
--redefine-sym _binary_build_filesystem_bin_end=__live_end \
|
||||
--redefine-sym _binary_build_filesystem_bin_size=__live_size
|
||||
101
mk/podman.mk
101
mk/podman.mk
@ -1,101 +0,0 @@
|
||||
# Configuration file of the Podman commands
|
||||
|
||||
# Configuration variables for running make in Podman
|
||||
## Tag the podman image $IMAGE_TAG
|
||||
IMAGE_TAG?=redox-base
|
||||
## Working Directory in Podman
|
||||
CONTAINER_WORKDIR?=/mnt/redox
|
||||
|
||||
## Flag passed to the Podman volumes. :Z can be used only with SELinux
|
||||
USE_SELINUX?=1
|
||||
ifeq ($(USE_SELINUX),1)
|
||||
PODMAN_VOLUME_FLAG=:Z
|
||||
else
|
||||
PODMAN_VOLUME_FLAG=
|
||||
endif
|
||||
|
||||
# Cache layers to redox-os docker hub
|
||||
PODMAN_CACHE=
|
||||
PODMAN_CACHE_PATH?=docker.io/redoxos/$(IMAGE_TAG)-$(HOST_ARCH)
|
||||
|
||||
PODMAN_CACHE_PULL?=1
|
||||
ifeq ($(PODMAN_CACHE_PULL),1)
|
||||
PODMAN_CACHE+=--cache-from=$(PODMAN_CACHE_PATH)
|
||||
endif
|
||||
|
||||
PODMAN_CACHE_PUSH?=0
|
||||
ifeq ($(PODMAN_CACHE_PUSH),1)
|
||||
PODMAN_CACHE+=--cache-to=$(PODMAN_CACHE_PATH)
|
||||
endif
|
||||
|
||||
## Podman Home Directory
|
||||
PODMAN_HOME=$(ROOT)/build/podman
|
||||
## Podman command with its many arguments
|
||||
PODMAN_VOLUMES=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/root$(PODMAN_VOLUME_FLAG)
|
||||
PODMAN_ENV=--env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
|
||||
PODMAN_CONFIG=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG) --env PREFIX_BINARY=$(PREFIX_BINARY) \
|
||||
--env CI=$(CI) --env COOKBOOK_MAKE_JOBS=$(COOKBOOK_MAKE_JOBS) --env COOKBOOK_LOGS=$(COOKBOOK_LOGS) --env COOKBOOK_VERBOSE=$(COOKBOOK_VERBOSE) --env COOKBOOK_COMPRESSED=$(COOKBOOK_COMPRESSED) \
|
||||
--env REPO_APPSTREAM=$(REPO_APPSTREAM) --env REPO_BINARY=$(REPO_BINARY) --env REPO_NONSTOP=$(REPO_NONSTOP) --env REPO_OFFLINE=$(REPO_OFFLINE) --env TESTBIN=$(TESTBIN) \
|
||||
--env HOSTED_REDOX=$(HOSTED_REDOX) --env PREFIX_USE_UPSTREAM_RUST_COMPILER=$(PREFIX_USE_UPSTREAM_RUST_COMPILER)
|
||||
PODMAN_OPTIONS=--rm --workdir $(CONTAINER_WORKDIR) --interactive --tty --cap-add SYS_ADMIN --device /dev/fuse --network=host --env TERM=$(TERM) --pids-limit=-1
|
||||
PODMAN_RUN=podman run $(PODMAN_OPTIONS) $(PODMAN_VOLUMES) $(PODMAN_ENV) $(PODMAN_CONFIG) $(IMAGE_TAG)
|
||||
|
||||
container_shell: build/container.tag
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) bash
|
||||
else
|
||||
@echo PODMAN_BUILD=$(PODMAN_BUILD), please set it to 1 in mk/config.mk
|
||||
endif
|
||||
|
||||
container_clean: FORCE
|
||||
rm -f build/container.tag
|
||||
@echo "If podman dir cannot be removed, remove with \"sudo rm\"."
|
||||
-rm -rf $(PODMAN_HOME) || true
|
||||
@echo "For complete clean of images and containers, use \"podman system reset\""
|
||||
-podman image rm --force $(IMAGE_TAG) || true
|
||||
|
||||
container_touch: FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
rm -f build/container.tag
|
||||
podman image exists $(IMAGE_TAG) || (echo "Image does not exist, it will be rebuilt during normal make."; exit 1)
|
||||
touch build/container.tag
|
||||
else
|
||||
@echo PODMAN_BUILD=$(PODMAN_BUILD), container not required.
|
||||
endif
|
||||
|
||||
container_kill: FORCE
|
||||
podman kill --latest --signal SIGKILL
|
||||
|
||||
## Must match the value of CONTAINER_TAG in config.mk
|
||||
build/container.tag: $(CONTAINERFILE)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
rm -f $@ $(FSTOOLS_TAG)
|
||||
-podman image rm --force $(IMAGE_TAG) || true
|
||||
mkdir -p $(PODMAN_HOME)
|
||||
@echo "Building Podman image. This may take some time."
|
||||
cat $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) $(PODMAN_CACHE) --tag $(IMAGE_TAG)
|
||||
$(PODMAN_RUN) bash -e podman/rustinstall.sh
|
||||
mkdir -p build
|
||||
touch $@
|
||||
@echo "Podman ready!"
|
||||
else
|
||||
@echo PODMAN_BUILD=$(PODMAN_BUILD), container not required.
|
||||
endif
|
||||
|
||||
container_push: build/container.tag
|
||||
podman push $(IMAGE_TAG) $(PODMAN_CACHE_PATH)
|
||||
|
||||
KERNEL_PATH := recipes/core/kernel
|
||||
KERNEL_PATH_SOURCE := $(ROOT)/$(KERNEL_PATH)/source
|
||||
KERNEL_PATH_TARGET := $(ROOT)/$(KERNEL_PATH)/target/$(TARGET)
|
||||
|
||||
# TODO: make this work using `make debug.kernel` and remove this
|
||||
kernel_debugger:
|
||||
@echo "Building and running gdbgui container..."
|
||||
podman build -t redox-kernel-debug - < $(ROOT)/podman/redox-gdb-containerfile
|
||||
podman run --rm -p 5000:5000 -it --name redox-gdb \
|
||||
-v "$(KERNEL_PATH_TARGET)/build/kernel.sym:/kernel.sym" \
|
||||
-v "$(KERNEL_PATH_SOURCE)/src:/src" \
|
||||
redox-kernel-debug --gdb-cmd "gdb -ex 'set confirm off' \
|
||||
-ex 'add-symbol-file /kernel.sym' \
|
||||
-ex 'target remote host.containers.internal:1234'"
|
||||
544
mk/prefix.mk
544
mk/prefix.mk
@ -1,97 +1,37 @@
|
||||
# Configuration file for the Rust/GCC cross-compilers, relibc and libtool
|
||||
|
||||
PREFIX=prefix/$(TARGET)
|
||||
|
||||
PREFIX_INSTALL=$(PREFIX)/sysroot/
|
||||
PREFIX_INSTALL=$(PREFIX)/relibc-install
|
||||
PREFIX_PATH=$(ROOT)/$(PREFIX_INSTALL)/bin
|
||||
BINUTILS_TARGET=recipes/dev/binutils-gdb/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBTOOL_TARGET=recipes/dev/libtool/target/$(HOST_TARGET)
|
||||
GCC_TARGET=recipes/dev/gcc13/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBSTDCXX_TARGET=recipes/libs/libstdcxx-v3/target/$(TARGET)/$(HOST_TARGET)
|
||||
RELIBC_FREESTANDING_TARGET=recipes/core/relibc/target/$(TARGET)/$(HOST_TARGET)
|
||||
RELIBC_TARGET=recipes/core/relibc/target/$(TARGET)
|
||||
LLVM_TARGET=recipes/dev/llvm21/target/$(HOST_TARGET)/$(TARGET)
|
||||
RUST_TARGET=recipes/dev/rust/target/$(HOST_TARGET)/$(TARGET)
|
||||
CLANG_TARGET=recipes/dev/clang21/target/$(HOST_TARGET)/$(TARGET)
|
||||
LLD_TARGET=recipes/dev/lld21/target/$(HOST_TARGET)/$(TARGET)
|
||||
# dependencies of GCC and Rust
|
||||
LIBGMP_TARGET=recipes/libs/libgmp/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBMPFR_TARGET=recipes/libs/libmpfr/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBMPC_TARGET=recipes/libs/mpc/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBZLIB_TARGET=recipes/libs/zlib/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBZSTD_TARGET=recipes/libs/zstd/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBSSL_TARGET=recipes/libs/openssl3/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBHTTP2_TARGET=recipes/libs/nghttp2/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBCURL_TARGET=recipes/net/download/curl/target/$(HOST_TARGET)/$(TARGET)
|
||||
LIBGCC_TARGET=recipes/libs/libgcc/target/$(TARGET)
|
||||
LIBCPP_TARGET=recipes/libs/libstdcxx/target/$(TARGET)
|
||||
|
||||
UPSTREAM_RUSTC_VERSION=2026-05-24
|
||||
|
||||
export PREFIX_RUSTFLAGS=-L $(ROOT)/$(PREFIX_INSTALL)/$(TARGET)/lib
|
||||
export RUSTUP_TOOLCHAIN=$(ROOT)/$(PREFIX_INSTALL)
|
||||
export REDOXER_TOOLCHAIN=$(RUSTUP_TOOLCHAIN)
|
||||
PREFIX_CONFIG=CI=1 COOKBOOK_CLEAN_BUILD=true COOKBOOK_CLEAN_TARGET=false COOKBOOK_VERBOSE=true COOKBOOK_NONSTOP=false
|
||||
|
||||
prefix: $(PREFIX)/sysroot
|
||||
prefix: $(PREFIX_INSTALL)
|
||||
|
||||
# Remove prefix builds and downloads
|
||||
prefix_clean:
|
||||
rm -rf $(PREFIX)
|
||||
ifeq ($(PREFIX_BINARY),0)
|
||||
rm -rf $(BINUTILS_TARGET) $(LIBTOOL_TARGET) $(GCC_TARGET) $(LIBSTDCXX_TARGET) $(RELIBC_FREESTANDING_TARGET)
|
||||
rm -rf $(RELIBC_TARGET) $(LLVM_TARGET) $(RUST_TARGET) $(CLANG_TARGET) $(LLD_TARGET) $(LIBGMP_TARGET) $(LIBMPFR_TARGET)
|
||||
rm -rf $(LIBMPC_TARGET) $(LIBZLIB_TARGET) $(LIBZSTD_TARGET) $(LIBSSL_TARGET) $(LIBHTTP2_TARGET) $(LIBCURL_TARGET)
|
||||
rm -rf $(LIBGCC_TARGET) $(LIBCPP_TARGET)
|
||||
endif
|
||||
PREFIX_STRIP=\
|
||||
mkdir -p bin libexec "$(TARGET)/bin" && \
|
||||
find bin libexec "$(TARGET)/bin" "$(TARGET)/lib" \
|
||||
-type f \
|
||||
-exec strip --strip-unneeded {} ';' \
|
||||
2> /dev/null
|
||||
|
||||
# Remove relibc in sysroot and all statically linked recipes
|
||||
static_clean: | $(FSTOOLS_TAG)
|
||||
$(MAKE) c.relibc
|
||||
$(MAKE) c.base,extrautils,kernel,redoxfs
|
||||
$(MAKE) c.luajit,gettext,libgcc,libstdcxx,openssl1,openssl3,pcre2,sdl1,zstd,zlib,bzip2,xz
|
||||
$(MAKE) c.expat,freetype2,libffi,libiconv,libjpeg,liborbital,libpng,libxml2,ncurses,ncursesw,termcap
|
||||
rm -rf $(REPO_TAG)
|
||||
|
||||
$(PREFIX)/sysroot: $(PREFIX)/clang-install $(PREFIX)/rust-install $(PREFIX)/gcc-install | $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding sysroot\033[0m"
|
||||
$(PREFIX)/relibc-install: $(ROOT)/relibc | $(PREFIX)/rust-install
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir "$@.partial"
|
||||
cp -r "$(PREFIX)/gcc-install/". "$@.partial"
|
||||
cp -r "$(PREFIX)/rust-install/". "$@.partial"
|
||||
cp -r "$(PREFIX)/clang-install/". "$@.partial"
|
||||
ifneq ($(HOSTED_REDOX),1)
|
||||
rm -rf "$@.partial/$(GNU_TARGET)/include/"*
|
||||
cp -r "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++" "$@.partial/$(GNU_TARGET)/include/c++"
|
||||
else
|
||||
rm -rf "$@.partial/include/"*
|
||||
cp -r "$(PREFIX)/gcc-install/include/c++" "$@.partial/include/c++"
|
||||
endif
|
||||
cp -r "$(PREFIX)/rust-install" "$@.partial"
|
||||
rm -rf "$@.partial/$(TARGET)/include/"*
|
||||
cp -r "$(PREFIX)/rust-install/$(TARGET)/include/c++" "$@.partial/$(TARGET)/include/c++"
|
||||
cd "$<" && \
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
export CARGO="env -u CARGO cargo" $(PREFIX_CONFIG) && \
|
||||
$(REPO_BIN) cook relibc
|
||||
ifneq ($(HOSTED_REDOX),1)
|
||||
cp -r "$(RELIBC_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
|
||||
mkdir -p "$@.partial/$(GNU_TARGET)/usr"
|
||||
ln -s "../include" "$@.partial/$(GNU_TARGET)/usr/include"
|
||||
ln -s "../lib" "$@.partial/$(GNU_TARGET)/usr/lib"
|
||||
else
|
||||
cp -r "$(RELIBC_TARGET)/stage/usr/". "$@.partial"
|
||||
mkdir -p "$@.partial/usr"
|
||||
ln -s "../include" "$@.partial/usr/include"
|
||||
ln -s "../lib" "$@.partial/usr/lib"
|
||||
endif
|
||||
export CARGO="env -u CARGO xargo" && \
|
||||
$(MAKE) -j `$(NPROC)` all && \
|
||||
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial/$(TARGET)"
|
||||
cd "$@.partial" && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
# adapt path for libtoolize
|
||||
sed 's|/usr/share|$(ROOT)/$@/share|g' "$@/bin/libtoolize.orig" > "$@/bin/libtoolize"
|
||||
chmod 0755 "$@/bin/libtoolize"
|
||||
touch "$@"
|
||||
endif
|
||||
mkdir $@/lib/rustlib/src
|
||||
ln -s $(ROOT)/rust $@/lib/rustlib/src
|
||||
|
||||
$(PREFIX)/relibc-install.tar.gz: $(PREFIX)/sysroot
|
||||
$(PREFIX)/relibc-install.tar.gz: $(PREFIX)/relibc-install
|
||||
tar \
|
||||
--create \
|
||||
--gzip \
|
||||
@ -99,105 +39,154 @@ $(PREFIX)/relibc-install.tar.gz: $(PREFIX)/sysroot
|
||||
--directory="$<" \
|
||||
.
|
||||
|
||||
|
||||
# PREFIX_BINARY ---------------------------------------------------
|
||||
ifeq ($(PREFIX_BINARY),1)
|
||||
|
||||
# PREFIX_BINARY FOR LINUX -----------------------------------------
|
||||
ifneq ($(HOSTED_REDOX),1)
|
||||
|
||||
$(PREFIX)/%.tar.gz: | $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(PREFIX)/rust-install.tar.gz:
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/$(@F)"
|
||||
wget -O $@.partial "https://static.redox-os.org/toolchain/$(TARGET)/rust-install.tar.gz"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(PREFIX)/gcc-install $(PREFIX)/rust-install $(PREFIX)/clang-install: %: %.tar.gz | $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
# PREFIX_BINARY FOR REDOX -----------------------------------------
|
||||
else
|
||||
|
||||
$(PREFIX)/id_ed25519.pub.toml: | $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
PREFIX_BASE_INSTALL=$(PREFIX)/rust-freestanding-install
|
||||
PREFIX_FREESTANDING_INSTALL=$(PREFIX)/gcc-freestanding-install
|
||||
|
||||
PREFIX_BASE_PATH=$(ROOT)/$(PREFIX_BASE_INSTALL)/bin
|
||||
PREFIX_FREESTANDING_PATH=$(ROOT)/$(PREFIX_FREESTANDING_INSTALL)/bin
|
||||
|
||||
$(PREFIX)/binutils.tar.bz2:
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://static.redox-os.org/pkg/id_ed25519.pub.toml"
|
||||
wget -O $@.partial "https://gitlab.redox-os.org/redox-os/binutils-gdb/-/archive/redox/binutils-gdb-redox.tar.bz2"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(PREFIX)/%.pkgar: $(PREFIX)/id_ed25519.pub.toml | $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(PREFIX)/binutils: $(PREFIX)/binutils.tar.bz2
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
$(PREFIX)/binutils-install: $(PREFIX)/binutils
|
||||
rm -rf "$<-build" "$@.partial" "$@"
|
||||
mkdir -p "$<-build" "$@.partial"
|
||||
cd "$<-build" && \
|
||||
"$(ROOT)/$</configure" \
|
||||
--target="$(TARGET)" \
|
||||
--program-prefix="$(TARGET)-" \
|
||||
--prefix="" \
|
||||
--disable-werror \
|
||||
&& \
|
||||
$(MAKE) -j `$(NPROC)` all && \
|
||||
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
|
||||
rm -rf "$<-build"
|
||||
cd "$@.partial" && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
$(PREFIX)/gcc.tar.bz2:
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://static.redox-os.org/pkg/$(TARGET)/$(@F)"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
wget -O $@.partial "https://gitlab.redox-os.org/redox-os/gcc/-/archive/redox/gcc-redox.tar.bz2"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
|
||||
$(PREFIX)/gcc-install: $(PREFIX)/gcc13.pkgar $(PREFIX)/gcc13.cxx.pkgar $(PREFIX)/libgcc.pkgar $(PREFIX)/libstdcxx.pkgar $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
rm -rf "$@.partial" "$@"
|
||||
$(PREFIX)/gcc: $(PREFIX)/gcc.tar.bz2
|
||||
mkdir -p "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/gcc13.pkgar" "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/gcc13.cxx.pkgar" "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/libgcc.pkgar" "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/libstdcxx.pkgar" "$@.partial"
|
||||
mv "$@.partial/usr"/* "$@.partial"
|
||||
rmdir "$@.partial/usr"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
cd "$@.partial" && ./contrib/download_prerequisites
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-install: $(PREFIX)/llvm21.pkgar $(PREFIX)/rust.pkgar $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/llvm21.pkgar" "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/rust.pkgar" "$@.partial"
|
||||
mv "$@.partial/usr"/* "$@.partial"
|
||||
rmdir "$@.partial/usr"
|
||||
$(PREFIX)/gcc-freestanding-install: $(PREFIX)/gcc | $(PREFIX)/binutils-install
|
||||
rm -rf "$<-freestanding-build" "$@.partial" "$@"
|
||||
mkdir -p "$<-freestanding-build"
|
||||
cp -r "$(PREFIX)/binutils-install" "$@.partial"
|
||||
cd "$<-freestanding-build" && \
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
"$(ROOT)/$</configure" \
|
||||
--target="$(TARGET)" \
|
||||
--program-prefix="$(TARGET)-" \
|
||||
--prefix="" \
|
||||
--disable-nls \
|
||||
--enable-languages=c,c++ \
|
||||
--without-headers \
|
||||
&& \
|
||||
$(MAKE) -j `$(NPROC)` all-gcc && \
|
||||
$(MAKE) -j `$(NPROC)` install-gcc DESTDIR="$(ROOT)/$@.partial"
|
||||
rm -rf "$<-freestanding-build"
|
||||
cd "$@.partial" && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/clang-install: $(PREFIX)/llvm21.runtime.pkgar $(PREFIX)/clang21.pkgar $(PREFIX)/lld21.pkgar $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/llvm21.runtime.pkgar" "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/clang21.pkgar" "$@.partial"
|
||||
pkgar extract --pkey $(PREFIX)/id_ed25519.pub.toml --archive "$(PREFIX)/lld21.pkgar" "$@.partial"
|
||||
mv "$@.partial/usr"/* "$@.partial"
|
||||
rmdir "$@.partial/usr"
|
||||
$(PREFIX)/rust-freestanding-install: $(ROOT)/rust | $(PREFIX)/binutils-install
|
||||
rm -rf "$(PREFIX)/rust-freestanding-build" "$@.partial" "$@"
|
||||
mkdir -p "$(PREFIX)/rust-freestanding-build"
|
||||
cp -r "$(PREFIX)/binutils-install" "$@.partial"
|
||||
cd "$(PREFIX)/rust-freestanding-build" && \
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
"$</configure" \
|
||||
--prefix="/" \
|
||||
--disable-docs \
|
||||
--enable-cargo-native-static \
|
||||
--enable-extended \
|
||||
--enable-llvm-static-stdcpp \
|
||||
--tools=cargo \
|
||||
&& \
|
||||
$(MAKE) -j `$(NPROC)` && \
|
||||
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
|
||||
rm -rf "$(PREFIX)/rust-freestanding-build"
|
||||
mkdir -p "$@.partial/lib/rustlib/x86_64-unknown-linux-gnu/bin"
|
||||
cd "$@.partial" && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
endif
|
||||
$(PREFIX)/relibc-freestanding-install: $(ROOT)/relibc | $(PREFIX_BASE_INSTALL) $(PREFIX_FREESTANDING_INSTALL)
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
cd "$<" && \
|
||||
export PATH="$(PREFIX_BASE_PATH):$(PREFIX_FREESTANDING_PATH):$$PATH" && \
|
||||
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN xargo" && \
|
||||
export CC_$(subst -,_,$(TARGET))="$(TARGET)-gcc -isystem $(ROOT)/$@.partial/$(TARGET)/include" && \
|
||||
$(MAKE) -j `$(NPROC)` all && \
|
||||
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial/$(TARGET)"
|
||||
cd "$@.partial" && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
else
|
||||
$(PREFIX)/gcc-install: $(PREFIX)/gcc | $(PREFIX)/relibc-freestanding-install
|
||||
rm -rf "$<-build" "$@.partial" "$@"
|
||||
mkdir -p "$<-build"
|
||||
cp -r "$(PREFIX_BASE_INSTALL)" "$@.partial"
|
||||
cd "$<-build" && \
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
"$(ROOT)/$</configure" \
|
||||
--target="$(TARGET)" \
|
||||
--program-prefix="$(TARGET)-" \
|
||||
--prefix="" \
|
||||
--with-sysroot \
|
||||
--with-build-sysroot="$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(TARGET)" \
|
||||
--with-native-system-header-dir="/include" \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-werror \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-shared \
|
||||
--enable-threads=posix \
|
||||
&& \
|
||||
$(MAKE) -j `$(NPROC)` all-gcc all-target-libgcc all-target-libstdc++-v3 && \
|
||||
$(MAKE) -j `$(NPROC)` install-gcc install-target-libgcc install-target-libstdc++-v3 DESTDIR="$(ROOT)/$@.partial" && \
|
||||
rm $(ROOT)/$@.partial/$(TARGET)/lib/*.la
|
||||
rm -rf "$<-build"
|
||||
cd "$@.partial" && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
$(PREFIX)/%.tar.gz: $(PREFIX)/%
|
||||
$(PREFIX)/gcc-install.tar.gz: $(PREFIX)/gcc-install
|
||||
tar \
|
||||
--create \
|
||||
--gzip \
|
||||
@ -205,233 +194,36 @@ $(PREFIX)/%.tar.gz: $(PREFIX)/%
|
||||
--directory="$<" \
|
||||
.
|
||||
|
||||
# BUILD GCC ---------------------------------------------------
|
||||
$(PREFIX)/libtool-install: | $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding libtool-install\033[0m"
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
export $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr && \
|
||||
$(REPO_BIN) cook host:libtool
|
||||
cp -r "$(LIBTOOL_TARGET)/stage/usr/". "$@.partial"
|
||||
mv "$@.partial/bin/libtoolize" "$@.partial/bin/libtoolize.orig"
|
||||
# adapt path for libtoolize
|
||||
sed 's|/usr/share|$(ROOT)/$@/share|g' "$@.partial/bin/libtoolize.orig" > "$@.partial/bin/libtoolize"
|
||||
chmod 0755 "$@.partial/bin/libtoolize"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/binutils-install: | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding binutils-install\033[0m"
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
|
||||
COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \
|
||||
$(REPO_BIN) cook host:binutils-gdb
|
||||
cp -r "$(BINUTILS_TARGET)/stage/usr/". "$@.partial"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/gcc-freestanding-install: $(PREFIX)/binutils-install | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding gcc-freestanding-install\033[0m"
|
||||
rm -rf "$@.partial" "$@" $(PREFIX)/relibc-freestanding-install $(PREFIX)/sysroot
|
||||
mkdir -p "$@.partial" $(PREFIX)/relibc-freestanding-install/$(GNU_TARGET)/include
|
||||
export $(PREFIX_CONFIG) PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/binutils-install/bin:$$PATH" \
|
||||
COOKBOOK_LIBTOOL_DIR=$(ROOT)/$(PREFIX)/libtool-install COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) \
|
||||
COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_SYSROOT=$(ROOT)/$(PREFIX)/relibc-freestanding-install/$(GNU_TARGET) && \
|
||||
$(REPO_BIN) cook host:gcc13
|
||||
cp -r "$(GCC_TARGET)/stage/usr/". "$@.partial"
|
||||
cp -r "$(GCC_TARGET)/stage.cxx/usr/". "$@.partial"
|
||||
cp -r "$(PREFIX)/binutils-install/". "$@.partial"
|
||||
rm -rf $(PREFIX)/relibc-freestanding-install
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/relibc-freestanding-install: $(PREFIX)/gcc-freestanding-install | $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding relibc-freestanding-install\033[0m"
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN cargo" RUSTUP="env -u CARGO -u RUSTUP_TOOLCHAIN rustup" && \
|
||||
export PATH="$(ROOT)/$(PREFIX)/gcc-freestanding-install/bin:$$PATH" && \
|
||||
export CC_$(subst -,_,$(TARGET))="$(GNU_TARGET)-gcc -isystem $(ROOT)/$@.partial/$(GNU_TARGET)/include" LINKFLAGS="" && \
|
||||
export $(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
|
||||
$(REPO_BIN) cook relibc
|
||||
cp -r "$(RELIBC_FREESTANDING_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/gcc-install: $(PREFIX)/relibc-freestanding-install | $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding gcc-install\033[0m"
|
||||
rm -rf "$@.partial" "$@-build.partial" "$@"
|
||||
if [ ! -d "$(ROOT)/$(GCC_TARGET)" ]; then \
|
||||
echo "\033[1;38;5;196m Incomplete build stages. Please re-run the build\033[0m"; \
|
||||
rm -rf "$(PREFIX)"/gcc-freestanding-install && "$(PREFIX)"/relibc-freestanding-install && \
|
||||
exit 1; fi
|
||||
mkdir -p "$@.partial" "$@-build.partial"
|
||||
cp -r "$(PREFIX)/gcc-freestanding-install/". "$@.partial"
|
||||
cp -r "$(PREFIX)/relibc-freestanding-install/". "$@.partial"
|
||||
cp -r "$(PREFIX)/libtool-install/". "$@.partial"
|
||||
@#TODO: how to make this not conflict with libc?
|
||||
rm -f "$@.partial/lib/gcc/$(GNU_TARGET)/13.2.0/include/limits.h"
|
||||
# libgcc and freestanding libstdcxx
|
||||
$(PREFIX)/rust-install: $(ROOT)/rust | $(PREFIX)/gcc-install $(PREFIX)/relibc-freestanding-install
|
||||
rm -rf "$(PREFIX)/rust-build" "$@.partial" "$@"
|
||||
mkdir -p "$(PREFIX)/rust-build"
|
||||
cp -r "$(PREFIX)/gcc-install" "$@.partial"
|
||||
cp -r "$(PREFIX)/relibc-freestanding-install/$(TARGET)" "$@.partial"
|
||||
cd "$(PREFIX)/rust-build" && \
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
$(MAKE) -C "$(ROOT)/$(GCC_TARGET)/build" all-target-libgcc all-target-libstdc++-v3 && \
|
||||
$(MAKE) -C "$(ROOT)/$(GCC_TARGET)/build" install-target-libgcc install-target-libstdc++-v3 DESTDIR="$(ROOT)/$@-build.partial/usr"
|
||||
cp -r "$@-build.partial/usr/". "$@.partial"
|
||||
@#TODO: in riscv64gc libgcc_s.so is a GNU ld script
|
||||
rm -f "$@.partial"/$(GNU_TARGET)/lib/libgcc_s.so
|
||||
ln -s libgcc_s.so.1 "$@.partial"/$(GNU_TARGET)/lib/libgcc_s.so
|
||||
@#TODO: generates wrong lib path for libtool
|
||||
rm -f "$@.partial"/$(GNU_TARGET)/lib/libstdc++.la
|
||||
rm -f "$@.partial"/$(GNU_TARGET)/lib/libsupc++.la
|
||||
# hosted libstdcxx
|
||||
export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \
|
||||
export $(PREFIX_CONFIG) "COOKBOOK_HOST_SYSROOT=$(ROOT)/$@.partial" COOKBOOK_CROSS_TARGET=$(HOST_TARGET) && \
|
||||
rm -rf "$(LIBSTDCXX_TARGET)/stage" && $(REPO_BIN) cook libstdcxx-v3
|
||||
cp -r "$(LIBSTDCXX_TARGET)/stage/usr/". "$@.partial/$(GNU_TARGET)"
|
||||
rm -rf "$@-build.partial"
|
||||
"$</configure" \
|
||||
--prefix="/" \
|
||||
--disable-docs \
|
||||
--enable-cargo-native-static \
|
||||
--enable-extended \
|
||||
--enable-llvm-static-stdcpp \
|
||||
--tools=cargo \
|
||||
--target="$(TARGET)" \
|
||||
&& \
|
||||
$(MAKE) -j `$(NPROC)` && \
|
||||
rm -rf "$(ROOT)/$@.partial/lib/rustlib" "$(ROOT)/$@.partial/share/doc/rust" && \
|
||||
$(MAKE) -j `$(NPROC)` install DESTDIR="$(ROOT)/$@.partial"
|
||||
rm -rf "$(PREFIX)/rust-build"
|
||||
mkdir -p "$@.partial/lib/rustlib/x86_64-unknown-linux-gnu/bin"
|
||||
cd "$@.partial" && find . -name *.old -exec rm {} ';' && $(PREFIX_STRIP)
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
# no longer needed, delete build files to save disk space
|
||||
rm -rf $(BINUTILS_TARGET) $(LIBTOOL_TARGET) $(GCC_TARGET) $(LIBSTDCXX_TARGET) $(RELIBC_FREESTANDING_TARGET)
|
||||
endif
|
||||
|
||||
# RUST FROM UPSTREAM COMPILER ---------------------------------------------------
|
||||
ifeq ($(PREFIX_USE_UPSTREAM_RUST_COMPILER),1)
|
||||
|
||||
PREFIX_RUST_VERSION_TAG=$(PREFIX)/rustc-version-tag-$(UPSTREAM_RUSTC_VERSION)
|
||||
|
||||
$(PREFIX_RUST_VERSION_TAG):
|
||||
rm -f "$(PREFIX)"/rustc-version-tag-*
|
||||
rm -f "$(PREFIX)"/rustc-install.tar.xz
|
||||
rm -f "$(PREFIX)"/cargo-install.tar.xz
|
||||
rm -f "$(PREFIX)"/rust-std-host-install.tar.xz
|
||||
rm -f "$(PREFIX)"/rust-std-target-install.tar.xz
|
||||
rm -f "$(PREFIX)"/rust-src-install.tar.xz:
|
||||
mkdir -p "$(@D)"
|
||||
touch $@
|
||||
|
||||
$(PREFIX)/rustc-install.tar.xz $(PREFIX)/cargo-install.tar.xz: $(PREFIX)/%-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/$*-nightly-$(HOST_TARGET).tar.xz"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-std-host-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/rust-std-nightly-$(HOST_TARGET).tar.xz"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-std-target-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p "$(@D)"
|
||||
ifeq ($(TARGET),x86_64-unknown-redox)
|
||||
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/rust-std-nightly-$(TARGET).tar.xz"
|
||||
mv $@.partial $@
|
||||
else
|
||||
touch $@
|
||||
endif
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-src-install.tar.xz: | $(PREFIX_RUST_VERSION_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://static.rust-lang.org/dist/$(UPSTREAM_RUSTC_VERSION)/rust-src-nightly.tar.xz"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-install: $(PREFIX)/rustc-install.tar.xz $(PREFIX)/cargo-install.tar.xz $(PREFIX)/rust-std-host-install.tar.xz $(PREFIX)/rust-std-target-install.tar.xz $(PREFIX)/rust-src-install.tar.xz
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding rust-install\033[0m"
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$(PREFIX)/rustc-install.tar.xz" -C "$@.partial" rustc-nightly-$(HOST_TARGET)/rustc/ --strip-components=2
|
||||
tar --extract --file "$(PREFIX)/cargo-install.tar.xz" --directory "$@.partial" cargo-nightly-$(HOST_TARGET)/cargo/ --strip-components=2
|
||||
tar --extract --file "$(PREFIX)/rust-std-host-install.tar.xz" --directory "$@.partial" rust-std-nightly-$(HOST_TARGET)/rust-std-$(HOST_TARGET)/ --strip-components=2
|
||||
tar --extract --file "$(PREFIX)/rust-src-install.tar.xz" --directory "$@.partial" rust-src-nightly/rust-src/ --strip-components=2
|
||||
ifeq ($(TARGET),x86_64-unknown-redox)
|
||||
tar --extract --file "$(PREFIX)/rust-std-target-install.tar.xz" --directory "$@.partial" rust-std-nightly-$(TARGET)/rust-std-$(TARGET)/ --strip-components=2
|
||||
endif
|
||||
rm -f "$@.partial/manifest.in"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
# BUILD RUST ---------------------------------------------------
|
||||
else
|
||||
|
||||
$(PREFIX)/rust-install: | $(PREFIX)/gcc-install $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding rust-install\033[0m"
|
||||
rm -rf "$@.partial" "$@"
|
||||
export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$(ROOT)/$(PREFIX)/gcc-install/bin:$$PATH" \
|
||||
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) COOKBOOK_CROSS_GNU_TARGET=$(GNU_TARGET) && \
|
||||
$(REPO_BIN) cook host:llvm21 host:rust
|
||||
cp -r "$(RUST_TARGET)/stage/usr/". "$@.partial"
|
||||
cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
# TODO: Cache from RUST_TARGET is currently not cleared.
|
||||
# TIP: If you're developing std for rust, remove COOKBOOK_CLEAN_BUILD=true
|
||||
# at the top of this file so your next rust build reuses the build cache
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# BUILD CLANG ---------------------------------------------------
|
||||
$(PREFIX)/clang-install: | $(PREFIX)/rust-install $(PREFIX)/libtool-install $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@echo "\033[1;36;49mBuilding clang-install\033[0m"
|
||||
rm -rf "$@.partial" "$@"
|
||||
export PATH="$(ROOT)/$(PREFIX)/libtool-install/bin:$$PATH" \
|
||||
$(PREFIX_CONFIG) COOKBOOK_HOST_SYSROOT=/usr COOKBOOK_CROSS_TARGET=$(TARGET) && \
|
||||
$(REPO_BIN) cook host:llvm21 host:clang21 host:lld21
|
||||
# llvm libraries is already in rust if building
|
||||
ifeq ($(PREFIX_USE_UPSTREAM_RUST_COMPILER),1)
|
||||
cp -r "$(LLVM_TARGET)/stage/usr/". "$@.partial"
|
||||
endif
|
||||
cp -r "$(LLVM_TARGET)/stage.runtime/usr/". "$@.partial"
|
||||
cp -r "$(LLVM_TARGET)/stage.dev/usr/". "$@.partial"
|
||||
cp -r "$(CLANG_TARGET)/stage/usr/". "$@.partial"
|
||||
cp -r "$(LLD_TARGET)/stage/usr/". "$@.partial"
|
||||
rm -rf "$@.partial/lib/"*.a
|
||||
mv "$@.partial" "$@"
|
||||
# no longer needed, delete build files to save disk space
|
||||
rm -rf $(LLVM_TARGET) $(CLANG_TARGET) $(LLD_TARGET)
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-install.tar.gz: $(PREFIX)/rust-install
|
||||
tar \
|
||||
--create \
|
||||
--gzip \
|
||||
--file "$@" \
|
||||
--directory="$<" \
|
||||
.
|
||||
endif
|
||||
|
||||
476
mk/qemu.mk
476
mk/qemu.mk
@ -1,384 +1,154 @@
|
||||
# Configuration file for QEMU
|
||||
|
||||
QEMU?=qemu-system-$(QEMU_ARCH)
|
||||
QEMUFLAGS?=-d guest_errors -name "Redox OS $(ARCH)"
|
||||
netboot?=no
|
||||
redoxer?=no
|
||||
VGA_SUPPORTED=no
|
||||
|
||||
ifeq ($(ARCH),i586)
|
||||
audio?=ac97
|
||||
disk?=ata
|
||||
gpu?=vga
|
||||
uefi=no
|
||||
VGA_SUPPORTED=yes
|
||||
QEMU_ARCH=i386
|
||||
QEMU_MACHINE?=pc
|
||||
QEMU_CPU?=pentium2
|
||||
QEMU_SMP?=1
|
||||
QEMU_MEM?=1024
|
||||
|
||||
# Default to using kvm when arch is i586 and host is x86_64
|
||||
ifeq ($(HOST_ARCH),x86_64)
|
||||
kvm?=yes
|
||||
endif
|
||||
else ifeq ($(ARCH),x86_64)
|
||||
gpu?=vga
|
||||
uefi?=yes
|
||||
VGA_SUPPORTED=yes
|
||||
QEMU_ARCH=x86_64
|
||||
QEMU_MACHINE?=q35
|
||||
QEMU_CPU?=core2duo
|
||||
QEMU_SMP?=4
|
||||
QEMU_MEM?=2048
|
||||
ifeq ($(uefi),yes)
|
||||
FIRMWARE=$(firstword \
|
||||
$(wildcard /usr/share/ovmf/OVMF.fd) \
|
||||
$(wildcard /usr/share/OVMF/OVMF_CODE.fd) \
|
||||
)
|
||||
ifeq ($(FIRMWARE),)
|
||||
PFLASH0=$(firstword \
|
||||
$(wildcard /usr/share/qemu/edk2-x86_64-code.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-x86_64-code.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2s-x86_64-code.fd) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(usb),no)
|
||||
QEMUFLAGS+=-device qemu-xhci
|
||||
endif
|
||||
else ifeq ($(ARCH),aarch64)
|
||||
# Default to UEFI as U-Boot doesn't set up a framebuffer for us and we don't yet support
|
||||
# setting up a framebuffer ourself.
|
||||
uefi?=yes
|
||||
live?=yes
|
||||
gpu?=ramfb
|
||||
QEMU_ARCH=aarch64
|
||||
QEMU_MACHINE?=virt
|
||||
QEMU_CPU=max
|
||||
QEMU_SMP?=1
|
||||
QEMU_MEM?=2048
|
||||
ifeq ($(BOARD),raspi3bp)
|
||||
QEMU_KERNEL=$(BUILD)/raspi3bp_uboot.rom
|
||||
disk?=sdcard
|
||||
gpu=none
|
||||
QEMU_MACHINE:=raspi3b
|
||||
QEMU_SMP:=4
|
||||
QEMU_MEM:=1024
|
||||
net:=usb-net
|
||||
audio:=no
|
||||
ifneq ($(usb),no)
|
||||
QEMUFLAGS+=-usb -device usb-kbd -device usb-tablet
|
||||
endif
|
||||
else
|
||||
ifeq ($(uefi),yes)
|
||||
FIRMWARE=$(firstword \
|
||||
$(wildcard /usr/share/AAVMF/AAVMF_CODE.fd) \
|
||||
)
|
||||
ifeq ($(FIRMWARE),)
|
||||
PFLASH0=$(firstword \
|
||||
$(wildcard /usr/share/qemu/edk2-aarch64-code.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-aarch64-code.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-aarch64-code.fd) \
|
||||
)
|
||||
endif
|
||||
else
|
||||
FIRMWARE=$(BUILD)/qemu_uboot.rom
|
||||
endif
|
||||
ifneq ($(usb),no)
|
||||
QEMUFLAGS+=-device qemu-xhci -device usb-kbd -device usb-tablet
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default to using HVF when host is MacOS Silicon
|
||||
ifeq ($(HOST_ARCH),arm64)
|
||||
kvm?=yes
|
||||
endif
|
||||
else ifeq ($(ARCH),riscv64gc)
|
||||
live=no
|
||||
audio=no
|
||||
gpu?=ramfb
|
||||
net=bridge
|
||||
QEMU_ARCH=riscv64
|
||||
# QEMU_MACHINE=virt for ACPI mode instead of DTB
|
||||
QEMU_MACHINE=virt,acpi=off
|
||||
# QEMU_MACHINE:=${QEMU_MACHINE},aclint=on
|
||||
# QEMU_MACHINE:=${QEMU_MACHINE},aia=aplic
|
||||
# QEMU_MACHINE:=${QEMU_MACHINE},aia=aplic-imsic
|
||||
QEMU_SMP?=4
|
||||
QEMU_MEM?=2048
|
||||
QEMU_CPU=max
|
||||
PFLASH0=$(firstword \
|
||||
$(wildcard /usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd) \
|
||||
$(wildcard /usr/share/edk2/riscv/RISCV_VIRT_CODE.fd) \
|
||||
$(wildcard /usr/share/qemu/edk2-riscv-code.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-riscv-code.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-code.fd) \
|
||||
)
|
||||
PFLASH1=$(firstword \
|
||||
$(wildcard /usr/share/qemu-efi-riscv64/RISCV_VIRT_VARS.fd) \
|
||||
$(wildcard /usr/share/edk2/riscv/RISCV_VIRT_VARS.fd) \
|
||||
$(wildcard /usr/share/qemu/edk2-riscv-vars.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-riscv-vars.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-vars.fd) \
|
||||
)
|
||||
ifneq ($(usb),no)
|
||||
QEMUFLAGS+=-device qemu-xhci -device usb-kbd -device usb-tablet
|
||||
endif
|
||||
else
|
||||
$(error Unsupported ARCH for QEMU "$(ARCH)"))
|
||||
endif
|
||||
|
||||
QEMUFLAGS+=-smp $(QEMU_SMP) -m $(QEMU_MEM)
|
||||
|
||||
# If host and target arch do not match, disable kvm
|
||||
# (unless overridden above or by environment)
|
||||
ifneq ($(ARCH),$(HOST_ARCH))
|
||||
kvm?=no
|
||||
endif
|
||||
|
||||
# wsl2: run qemu on windows instead
|
||||
ifeq ($(QEMU_ON_WINDOWS),1)
|
||||
QEMU:=$(QEMU).exe
|
||||
WINDOWS_DISK=/mnt/c/ProgramData/redox.img
|
||||
disk=windows
|
||||
net=windows
|
||||
QEMU_MACHINE=pc
|
||||
FIRMWARE=
|
||||
QEMU_KERNEL=
|
||||
QEMUFLAGS+=-device usb-tablet
|
||||
endif
|
||||
|
||||
ifneq ($(FIRMWARE),)
|
||||
QEMUFLAGS+=-bios $(FIRMWARE)
|
||||
endif
|
||||
|
||||
ifneq ($(QEMU_KERNEL),)
|
||||
QEMUFLAGS+=-kernel $(QEMU_KERNEL)
|
||||
endif
|
||||
|
||||
ifeq ($(live),yes)
|
||||
DISK=$(BUILD)/redox-live.iso
|
||||
else
|
||||
DISK=$(BUILD)/harddrive.img
|
||||
endif
|
||||
|
||||
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(ARCH)
|
||||
QEMUFLAGS=-d cpu_reset -d guest_errors
|
||||
QEMUFLAGS+=-smp 4 -m 2048
|
||||
QEMU_EFI=/usr/share/OVMF/OVMF_CODE.fd
|
||||
ifeq ($(serial),no)
|
||||
QEMUFLAGS+=-chardev stdio,id=debug -device isa-debugcon,iobase=0x402,chardev=debug
|
||||
else
|
||||
QEMUFLAGS+=-chardev stdio,id=debug,signal=off,mux=on,"$(if $(qemu_serial_logfile),logfile=$(qemu_serial_logfile))"
|
||||
QEMUFLAGS+=-serial chardev:debug -mon chardev=debug
|
||||
endif
|
||||
|
||||
# redoxer exit code: 51 => success, 53 => failure
|
||||
ifeq ($(redoxer),yes)
|
||||
ifeq ($(ARCH),x86_64)
|
||||
QEMUFLAGS+=-device isa-debug-exit
|
||||
else ifeq ($(ARCH),i586)
|
||||
QEMUFLAGS+=-device isa-debug-exit
|
||||
else ifeq ($(ARCH),aarch64)
|
||||
QEMUFLAGS+=-semihosting-config enable=on,target=native,userspace=on
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(iommu),yes)
|
||||
QEMUFLAGS+=-machine $(QEMU_MACHINE),iommu=on
|
||||
QEMUFLAGS+=-machine q35,iommu=on
|
||||
else
|
||||
QEMUFLAGS+=-machine $(QEMU_MACHINE)
|
||||
QEMUFLAGS+=-machine q35
|
||||
endif
|
||||
|
||||
ifeq ($(audio),no)
|
||||
# No audio
|
||||
else ifeq ($(audio),ac97)
|
||||
# AC'97
|
||||
QEMUFLAGS+=-device AC97
|
||||
else
|
||||
# Intel High Definition Audio
|
||||
QEMUFLAGS+=-device ich9-intel-hda -device hda-output
|
||||
ifneq ($(audio),no)
|
||||
QEMUFLAGS+=-device ich9-intel-hda -device hda-duplex
|
||||
endif
|
||||
|
||||
ifeq ($(net),no)
|
||||
QEMUFLAGS+=-net none
|
||||
else
|
||||
ifeq ($(net),rtl8139) # RTL8139
|
||||
QEMUFLAGS+=-device rtl8139,netdev=net0
|
||||
else ifeq ($(net),virtio) # virtio-net
|
||||
QEMUFLAGS+=-device virtio-net,netdev=net0
|
||||
else ifeq ($(net),usb-net)
|
||||
QEMUFLAGS+=-device usb-net,netdev=net0
|
||||
else
|
||||
QEMUFLAGS+=-device e1000,netdev=net0,id=nic0
|
||||
endif
|
||||
|
||||
EXTRANETARGS=
|
||||
ifeq ($(netboot),yes)
|
||||
EXTRANETARGS+=,tftp=$(BUILD),bootfile=redox.ipxe
|
||||
QEMUFLAGS+=-kernel /usr/lib/ipxe/ipxe-amd64.efi
|
||||
endif
|
||||
|
||||
ifneq ($(bridge),)
|
||||
QEMUFLAGS+=-netdev bridge,br=$(bridge),id=net0
|
||||
else ifeq ($(net),redir)
|
||||
# port 8022 - ssh
|
||||
# port 8080-8083 - webservers
|
||||
# port 64126 - our gdbserver implementation
|
||||
FWD_PORTS := 8081 8082 8083 64126
|
||||
FWD_FLAGS := hostfwd=tcp::8022-:22,hostfwd=tcp::8080-:80
|
||||
FWD_FLAGS2 := $(foreach p,$(FWD_PORTS),,hostfwd=tcp::$(p)-:$(p))
|
||||
QEMUFLAGS += -netdev user,id=net0,$(FWD_FLAGS)$(subst $(eval ) ,,$(FWD_FLAGS2))$(EXTRANETARGS)
|
||||
else ifeq ($(net),windows)
|
||||
QEMUFLAGS+=-netdev user,id=net0$(EXTRANETARGS)
|
||||
QEMUFLAGS+=-netdev bridge,br=$(bridge),id=net0 -device e1000,netdev=net0,id=nic0
|
||||
else
|
||||
QEMUFLAGS+=-netdev user,id=net0$(EXTRANETARGS) -object filter-dump,id=f1,netdev=net0,file=$(BUILD)/network.pcap
|
||||
ifeq ($(net),redir)
|
||||
# port 8080 and 8083 - webservers
|
||||
# port 64126 - our gdbserver implementation
|
||||
QEMUFLAGS+=-netdev user,id=net0,hostfwd=tcp::8080-:8080,hostfwd=tcp::8083-:8083,hostfwd=tcp::64126-:64126 -device e1000,netdev=net0,id=nic0
|
||||
else
|
||||
QEMUFLAGS+=-netdev user,id=net0 -device e1000,netdev=net0 \
|
||||
-object filter-dump,id=f1,netdev=net0,file=build/network.pcap
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(gpu),no)
|
||||
ifeq ($(vga),no)
|
||||
QEMUFLAGS+=-nographic -vga none
|
||||
else ifeq ($(gpu),vga)
|
||||
ifeq ($(VGA_SUPPORTED),yes)
|
||||
QEMUFLAGS+=-vga std
|
||||
else
|
||||
QEMUFLAGS+=-vga none -device secondary-vga
|
||||
endif
|
||||
else ifeq ($(gpu),ramfb)
|
||||
QEMUFLAGS+=-vga none -device ramfb
|
||||
else ifeq ($(gpu),multi)
|
||||
ifeq ($(VGA_SUPPORTED),yes)
|
||||
QEMUFLAGS+=-display sdl -vga none -device virtio-vga,max_outputs=2
|
||||
else
|
||||
QEMUFLAGS+=-display sdl -vga none -device virtio-gpu,max_outputs=2
|
||||
endif
|
||||
else ifeq ($(gpu),virtio)
|
||||
ifeq ($(VGA_SUPPORTED),yes)
|
||||
QEMUFLAGS+=-vga none -device virtio-vga
|
||||
else
|
||||
QEMUFLAGS+=-vga none -device virtio-gpu
|
||||
endif
|
||||
else ifeq ($(gpu),virtio-sdl)
|
||||
ifeq ($(VGA_SUPPORTED),yes)
|
||||
QEMUFLAGS+=-vga none -device virtio-vga -display sdl,show-cursor=on
|
||||
else
|
||||
QEMUFLAGS+=-vga none -device virtio-gpu -display sdl,show-cursor=on
|
||||
endif
|
||||
else ifeq ($(gpu),virtio-gl)
|
||||
ifeq ($(VGA_SUPPORTED),yes)
|
||||
QEMUFLAGS+=-display gtk,gl=on -vga none -device virtio-vga-gl
|
||||
else
|
||||
QEMUFLAGS+=-display gtk,gl=on -vga none -device virtio-gpu-gl
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_DISK=$(BUILD)/extra.img
|
||||
disk?=nvme
|
||||
ifeq ($(disk),ata)
|
||||
# For i386, ata will use ided
|
||||
# For aarch64 and x86_64, ata will use ahcid
|
||||
QEMUFLAGS+= \
|
||||
-drive file=$(DISK),format=raw \
|
||||
-drive file=$(EXTRA_DISK),format=raw
|
||||
else ifeq ($(disk),nvme)
|
||||
QEMUFLAGS+= \
|
||||
-drive file=$(DISK),format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=$(EXTRA_DISK),format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
else ifeq ($(disk),usb)
|
||||
QEMUFLAGS+= \
|
||||
-drive if=none,id=usbstick,format=raw,file=$(DISK) \
|
||||
-device usb-storage,drive=usbstick
|
||||
else ifeq ($(disk),virtio)
|
||||
QEMUFLAGS+= \
|
||||
-drive file=$(DISK),format=raw,if=virtio \
|
||||
-drive file=$(EXTRA_DISK),format=raw,if=virtio
|
||||
else ifeq ($(disk),cdrom)
|
||||
QEMUFLAGS+= \
|
||||
-boot d -cdrom $(DISK) \
|
||||
-drive file=$(EXTRA_DISK),format=raw
|
||||
else ifeq ($(disk),sdcard)
|
||||
QEMUFLAGS+=-drive file=$(DISK),if=sd,format=raw
|
||||
else ifeq ($(disk),windows)
|
||||
QEMUFLAGS+=-drive file="$(shell wslpath -w $(WINDOWS_DISK))",format=raw,if=virtio
|
||||
ifneq ($(usb),no)
|
||||
QEMUFLAGS+=-device nec-usb-xhci,id=xhci -device usb-tablet,bus=xhci.0
|
||||
endif
|
||||
|
||||
ifeq ($(gdb),yes)
|
||||
QEMUFLAGS+=-d cpu_reset -s -S
|
||||
else ifeq ($(gdb),nonblock)
|
||||
# Allow attaching gdb, but don't block for it
|
||||
QEMUFLAGS+=-d cpu_reset -s
|
||||
QEMUFLAGS+=-s
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME),Linux)
|
||||
ifneq ($(kvm),no)
|
||||
ifeq ($(QEMU_ON_WINDOWS),1)
|
||||
QEMUFLAGS+=-accel whpx,kernel-irqchip=off -cpu Broadwell,x2apic=off
|
||||
else
|
||||
QEMUFLAGS+=-enable-kvm -cpu host
|
||||
endif
|
||||
QEMUFLAGS+=-enable-kvm -cpu host
|
||||
else
|
||||
QEMUFLAGS+=-cpu $(QEMU_CPU)
|
||||
QEMUFLAGS+=-cpu max
|
||||
endif
|
||||
endif
|
||||
#,int,pcall
|
||||
#-device intel-iommu
|
||||
|
||||
ifeq ($(UNAME),Darwin)
|
||||
ifneq ($(kvm),no)
|
||||
QEMUFLAGS+=-accel hvf -cpu max
|
||||
else
|
||||
QEMUFLAGS+=-cpu $(QEMU_CPU)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(PFLASH0),)
|
||||
QEMUFLAGS+=-drive if=pflash,format=raw,unit=0,file=$(PFLASH0),readonly=on
|
||||
endif
|
||||
|
||||
ifneq ($(PFLASH1),)
|
||||
QEMUFLAGS+=-drive if=pflash,format=raw,unit=1,file=$(BUILD)/fw_vars.bin
|
||||
endif
|
||||
|
||||
.PHONY: qemu-deps
|
||||
|
||||
qemu-deps: $(DISK)
|
||||
|
||||
ifeq ($(disk),usb)
|
||||
else ifeq ($(disk),sdcard)
|
||||
else ifeq ($(disk),windows)
|
||||
qemu-deps: $(WINDOWS_DISK)
|
||||
ifeq ($(UNAME),Linux)
|
||||
build/extra.bin:
|
||||
fallocate --posix --length 1G $@
|
||||
else
|
||||
qemu-deps: $(EXTRA_DISK)
|
||||
endif
|
||||
|
||||
qemu-deps:$(FIRMWARE)
|
||||
|
||||
qemu-deps:$(QEMU_KERNEL)
|
||||
|
||||
qemu-deps: $(PFLASH0)
|
||||
|
||||
ifneq ($(PFLASH1),)
|
||||
qemu-deps: $(BUILD)/fw_vars.bin
|
||||
|
||||
.PRECIOUS: $(BUILD)/fw_vars.bin
|
||||
$(BUILD)/fw_vars.bin: $(PFLASH1)
|
||||
cp "$<" "$@"
|
||||
endif
|
||||
|
||||
$(EXTRA_DISK):
|
||||
build/extra.bin:
|
||||
truncate -s 1g $@
|
||||
|
||||
$(WINDOWS_DISK): $(BUILD)/harddrive.img
|
||||
rm -f $@
|
||||
mkdir -p $(shell dirname $@)
|
||||
cp "$<" "$@"
|
||||
|
||||
$(BUILD)/raspi3bp_uboot.rom:
|
||||
wget -O $@ https://gitlab.redox-os.org/Ivan/redox_firmware/-/raw/main/platform/raspberry_pi/rpi3/u-boot-rpi-3-b-plus.bin
|
||||
|
||||
$(BUILD)/qemu_uboot.rom:
|
||||
wget -O $@ https://gitlab.redox-os.org/Ivan/redox_firmware/-/raw/main/platform/qemu/qemu_arm64/u-boot-qemu-arm64.bin
|
||||
|
||||
qemu: qemu-deps
|
||||
ifeq ($(wildcard $(MOUNT_DIR)),)
|
||||
$(QEMU) $(QEMUFLAGS)
|
||||
else
|
||||
@echo "\033[1;38;5;196mDisk is mounted. Unmounting the disk...\033[0m";
|
||||
$(MAKE) unmount
|
||||
$(QEMU) $(QEMUFLAGS)
|
||||
endif
|
||||
|
||||
qemu: build/harddrive.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/harddrive.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/harddrive.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_efi: build/harddrive-efi.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios $(QEMU_EFI) \
|
||||
-drive file=build/harddrive-efi.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_efi_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios $(QEMU_EFI) \
|
||||
-drive file=build/harddrive-efi.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_nvme: build/harddrive.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/harddrive.bin,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
qemu_nvme_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/harddrive.bin,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
qemu_nvme_efi: build/harddrive-efi.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios $(QEMU_EFI) \
|
||||
-drive file=build/harddrive-efi.bin,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
qemu_nvme_efi_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios $(QEMU_EFI) \
|
||||
-drive file=build/harddrive-efi.bin,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
qemu_nvme_live: build/livedisk.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/livedisk.bin,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
qemu_nvme_live_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/livedisk.bin,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
qemu_live: build/livedisk.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/livedisk.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_live_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/livedisk.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_iso: build/livedisk.iso build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-boot d -cdrom build/livedisk.iso \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_iso_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-boot d -cdrom build/livedisk.iso \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_iso_efi: build/livedisk-efi.iso build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios $(QEMU_EFI) \
|
||||
-boot d -cdrom build/livedisk-efi.iso \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_iso_efi_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios $(QEMU_EFI) \
|
||||
-boot d -cdrom build/livedisk-efi.iso \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_extra: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_nvme_extra: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/extra.bin,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA
|
||||
|
||||
401
mk/repo.mk
401
mk/repo.mk
@ -1,401 +0,0 @@
|
||||
# Configuration file for recipe commands
|
||||
|
||||
$(REPO_TAG): prefix $(FILESYSTEM_CONFIG) | $(FSTOOLS) $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
$(REPO_BIN) cook $(COOKBOOK_OPTS) --with-package-deps
|
||||
mkdir -p $(BUILD)
|
||||
touch $@
|
||||
endif
|
||||
|
||||
comma := ,
|
||||
|
||||
# List all recipes in a cook-tree fashion specified by the filesystem config
|
||||
repo-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@$(REPO_BIN) cook-tree $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# List all recipes in a push-tree fashion specified by the filesystem config
|
||||
image-tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@$(REPO_BIN) push-tree $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
# Clean specific target to all recipes, similar to repo_clean but more specific
|
||||
repo_clean_target: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) clean-target --all
|
||||
endif
|
||||
|
||||
# Fetch all recipes source or binary from filesystem config
|
||||
fetch: prefix $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
$(REPO_BIN) fetch $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# Unfetch and clean all recipes source or binary from filesystem config
|
||||
unfetch: prefix $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) unfetch $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# Fetch Cargo dependencies for the cookbook tool (needed for REPO_OFFLINE=1 builds)
|
||||
cargo-fetch: FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) fetch --manifest-path Cargo.toml --locked
|
||||
endif
|
||||
|
||||
# Find recipe for one or more targets separated by comma
|
||||
find.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@$(REPO_BIN) find $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Invoke clean for relibc in recipe and relibc in sysroot
|
||||
c.relibc: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) clean relibc
|
||||
rm -rf $(PREFIX)/relibc-install $(PREFIX)/sysroot
|
||||
@echo "\033[1;36;49mSysroot cleaned\033[0m"
|
||||
endif
|
||||
|
||||
# Invoke clean for one or more targets separated by comma
|
||||
c.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) clean $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Invoke fetch for one or more targets separated by comma
|
||||
f.%: prefix $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
$(REPO_BIN) fetch $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
# Invoke cook for one or more targets separated by comma
|
||||
r.%: prefix $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
$(REPO_BIN) cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
# Show what to cook
|
||||
rt.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) cook-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
MOUNTED_TAG=$(MOUNT_DIR)~
|
||||
|
||||
# Push compiled package into existing image
|
||||
# DO NOT RUN THIS WHILE QEMU ALIVE, THE DISK MIGHT CORRUPT IN DOING SO
|
||||
p.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(ALLOW_FSTOOLS),1)
|
||||
@rm -f $(MOUNTED_TAG)
|
||||
@if [ ! -d "$(MOUNT_DIR)" ]; then \
|
||||
$(MAKE) mount; \
|
||||
touch $(MOUNTED_TAG); \
|
||||
fi
|
||||
endif
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
|
||||
else
|
||||
$(REPO_BIN) push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)" $(COOKBOOK_OPTS)
|
||||
endif
|
||||
ifeq ($(ALLOW_FSTOOLS),1)
|
||||
@if [ -f $(MOUNTED_TAG) ]; then \
|
||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
||||
else echo "\033[0;33;49mNot unmounting by ourself, don't forget to do it\033[0m"; \
|
||||
fi
|
||||
endif
|
||||
|
||||
# Show what to push
|
||||
pt.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) push-tree $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
# Push all recipes specified by the filesystem config
|
||||
push: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(ALLOW_FSTOOLS),1)
|
||||
@rm -f $(MOUNTED_TAG)
|
||||
@if [ ! -d "$(MOUNT_DIR)" ]; then \
|
||||
$(MAKE) mount; \
|
||||
touch $(MOUNTED_TAG); \
|
||||
fi
|
||||
endif
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
|
||||
else
|
||||
$(REPO_BIN) push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)"
|
||||
endif
|
||||
ifeq ($(ALLOW_FSTOOLS),1)
|
||||
@if [ -f $(MOUNTED_TAG) ]; then \
|
||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
||||
else echo "\033[1;33;49mNot unmounting by ourself, don't forget to do it\033[0m"; \
|
||||
fi
|
||||
endif
|
||||
|
||||
# Rebuild and push all recipes specified by the filesystem config
|
||||
rebuild-push: $(FSTOOLS_TAG) FORCE
|
||||
rm -f $(REPO_TAG)
|
||||
$(MAKE) repo
|
||||
$(MAKE) push
|
||||
|
||||
# Invoke unfetch for one or more targets separated by comma
|
||||
u.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) unfetch $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Invoke clean, and rebuild for one of more targets separated by comma
|
||||
cr.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) c.$*
|
||||
$(MAKE) r.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch, clean, and rebuild for one or more targets separated by comma
|
||||
ucr.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) u.$*
|
||||
$(MAKE) cr.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch and clean for one or more targets separated by comma
|
||||
uc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) u.$*
|
||||
$(MAKE) c.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch, clean and fetch for one or more targets separated by comma
|
||||
ucf.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) uc.$*
|
||||
$(MAKE) f.$*
|
||||
endif
|
||||
|
||||
# Invoke rebuild and push for one of more targets separated by comma
|
||||
# Don't use podman here, as the p target cannot mount inside podman
|
||||
rp.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) r.$*,--with-package-deps
|
||||
$(MAKE) p.$*
|
||||
|
||||
# Invoke clean, rebuild and push for one of more targets separated by comma
|
||||
crp.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) cr.$*,--with-package-deps
|
||||
$(MAKE) p.$*
|
||||
|
||||
# Invoke unfetch. clean, rebuild and push for one of more targets separated by comma
|
||||
ucrp.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) ucr.$*,--with-package-deps
|
||||
$(MAKE) p.$*
|
||||
|
||||
ifeq ($(HOSTED_REDOX),1)
|
||||
DESTDIR?=/
|
||||
|
||||
# Install all recipes specified by the filesystem config
|
||||
install:
|
||||
$(REPO_BIN) push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(DESTDIR)"
|
||||
|
||||
# Rebuild and install all recipes specified by the filesystem config
|
||||
rebuild-install: $(FSTOOLS_TAG) FORCE
|
||||
rm -f $(REPO_TAG)
|
||||
$(MAKE) repo
|
||||
$(MAKE) install
|
||||
|
||||
i.%: $(FSTOOLS_TAG) FORCE
|
||||
$(REPO_BIN) push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(DESTDIR)"
|
||||
|
||||
# Invoke rebuild and install for one of more targets separated by comma
|
||||
ri.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) r.$*,--with-package-deps
|
||||
$(MAKE) i.$*
|
||||
|
||||
# Invoke clean, rebuild and install for one of more targets separated by comma
|
||||
cri.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) cr.$*,--with-package-deps
|
||||
$(MAKE) i.$*
|
||||
|
||||
# Invoke unfetch. clean, rebuild and install for one of more targets separated by comma
|
||||
ucri.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) ucr.$*,--with-package-deps
|
||||
$(MAKE) i.$*
|
||||
endif
|
||||
|
||||
# Set recipe rule to "binary" then invoke clean
|
||||
bc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) change-rule --set-rule=binary $(foreach f,$(subst $(comma), ,$*),$(f)) --with-package-deps
|
||||
endif
|
||||
|
||||
# Set recipe rule to "source" then invoke clean
|
||||
sc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) change-rule --set-rule=source $(foreach f,$(subst $(comma), ,$*),$(f)) --with-package-deps
|
||||
endif
|
||||
|
||||
# Set specific recipe rule to "local" then invoke clean
|
||||
lc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) change-rule-local --set-rule=local $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Set specific recipe rule to "ignore" then invoke clean
|
||||
nc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) change-rule-local --set-rule=ignore $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Reset recipe rule then invoke clean
|
||||
cc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) change-rule --unset $(foreach f,$(subst $(comma), ,$*),$(f)) --with-package-deps
|
||||
endif
|
||||
|
||||
# Set recipe rule to "binary" then invoke clean and rebuild
|
||||
bcr.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) bc.$*
|
||||
$(MAKE) r.$*,--with-package-deps
|
||||
|
||||
# Set recipe rule to "source" then invoke clean and rebuild
|
||||
scr.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) sc.$*
|
||||
$(MAKE) r.$*,--with-package-deps
|
||||
|
||||
# Set specific recipe rule to "local" then invoke clean and rebuild
|
||||
lcr.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) lc.$*
|
||||
$(MAKE) r.$*
|
||||
|
||||
# Set specific recipe rule to "ignore" then invoke clean and rebuild
|
||||
ncr.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) nc.$*
|
||||
$(MAKE) r.$*
|
||||
|
||||
# Set recipe rule to "binary" then invoke clean, rebuild and push
|
||||
bcrp.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) bcr.$*
|
||||
$(MAKE) p.$*
|
||||
|
||||
# Set recipe rule to "source" then invoke clean, rebuild and push
|
||||
scrp.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) scr.$*
|
||||
$(MAKE) p.$*
|
||||
|
||||
# Save current git rev for next recipe fetch, locking git recipes frozen in time
|
||||
repo-lock: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) capture-rev $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# Undo repo-lock, allowing git recipes to get updated by next recipe fetch
|
||||
repo-unlock: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(REPO_BIN) capture-rev $(COOKBOOK_OPTS) --unset --with-package-deps
|
||||
endif
|
||||
|
||||
# Like repo-lock, but also checking out the specified git rev.
|
||||
# Revert this operation by "git checkout master" "make pull" then "make repo-unlock".
|
||||
# Will not work if rolling back to a commit before 2026.
|
||||
repo-rollback.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
# have to be done otherwise podman will rebuild
|
||||
touch $(CONTAINER_TAG)
|
||||
else
|
||||
git checkout $*
|
||||
$(REPO_BIN) capture-rev $(COOKBOOK_OPTS) --rollback --with-package-deps
|
||||
endif
|
||||
# have to be done otherwise cookbook will rebuild
|
||||
touch $(FSTOOLS_TAG)
|
||||
|
||||
export DEBUG_BIN?=
|
||||
|
||||
# Debug a statically linked program with gdbgui, for example: debug.drivers-initfs DEBUG_BIN=pcid
|
||||
# Enable debug symbols with `REPO_DEBUG=1 make cr.recipe rebuild`, make sure `file` outputs "debug_info, not stripped"
|
||||
# Open http://localhost:5000/dashboard, start QEMU with `make qemu kvm=no QEMU_SMP=1 gdb=yes` before opening a session
|
||||
# Experimental, may not work if ARCH is different with what host is running
|
||||
debug.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
@cd $(shell make find.$* | grep ^recipes) && \
|
||||
export RECIPE_STAGE=target/$(TARGET)/stage && \
|
||||
export BIN_PATH=$$(find $$RECIPE_STAGE -type f -name "$(DEBUG_BIN)" -or -type f -name "$*") && \
|
||||
file $$BIN_PATH 2> /dev/null || ( echo "Binary is not found, please set DEBUG_BIN" && exit 1 ) && \
|
||||
echo "Opening gdbgui for debugging $* with binary '$$BIN_PATH'" && echo "----------" && \
|
||||
podman build -t redox-kernel-debug - < $(ROOT)/podman/redox-gdb-containerfile > /dev/null && \
|
||||
podman run --rm -p 5000:5000 -it --name redox-gdb \
|
||||
-v "./$$BIN_PATH:/binary" \
|
||||
-v "./source:/source" -w "/source" \
|
||||
redox-kernel-debug --gdb-cmd "gdb -ex 'set confirm off' \
|
||||
-ex 'add-symbol-file /binary' \
|
||||
-ex 'target remote host.containers.internal:1234'"
|
||||
else
|
||||
@cd $(shell make find.$* | grep ^recipes) && \
|
||||
export RECIPE_STAGE=target/$(TARGET)/stage && \
|
||||
export BIN_PATH=$$(find $$RECIPE_STAGE -type f -name "$(DEBUG_BIN)" -or -type f -name "$*") && \
|
||||
file $$BIN_PATH 2> /dev/null || ( echo "Binary is not found, please set DEBUG_BIN" && exit 1 ) && \
|
||||
echo "Opening gdbgui for debugging $* with binary '$$BIN_PATH'" && echo "----------" && \
|
||||
gdbgui.pex --gdb-cmd "gdb -ex 'set confirm off' \
|
||||
-ex 'add-symbol-file $$BIN_PATH' \
|
||||
-ex 'target remote localhost:1234'"
|
||||
endif
|
||||
@ -1,6 +1,4 @@
|
||||
# Configuration file for VirtualBox, it creates a VirtualBox virtual machine
|
||||
|
||||
virtualbox: $(BUILD)/harddrive.img
|
||||
virtualbox: build/harddrive.bin
|
||||
echo "Delete VM"
|
||||
-$(VBM) unregistervm Redox --delete; \
|
||||
if [ $$? -ne 0 ]; \
|
||||
@ -31,14 +29,13 @@ virtualbox: $(BUILD)/harddrive.img
|
||||
$(VBM) modifyvm Redox --usb off # on
|
||||
$(VBM) modifyvm Redox --keyboard ps2
|
||||
$(VBM) modifyvm Redox --mouse ps2
|
||||
$(VBM) modifyvm Redox --audio-driver $(VB_AUDIO)
|
||||
$(VBM) modifyvm Redox --audio $(VB_AUDIO)
|
||||
$(VBM) modifyvm Redox --audiocontroller hda
|
||||
$(VBM) modifyvm Redox --audioout on
|
||||
$(VBM) modifyvm Redox --nestedpaging on
|
||||
echo "Create Disk"
|
||||
$(VBM) convertfromraw $< $(BUILD)/harddrive.vdi
|
||||
$(VBM) convertfromraw $< build/harddrive.vdi
|
||||
echo "Attach Disk"
|
||||
$(VBM) storagectl Redox --name ATA --add sata --controller IntelAHCI --bootable on --portcount 1
|
||||
$(VBM) storageattach Redox --storagectl ATA --port 0 --device 0 --type hdd --medium $(BUILD)/harddrive.vdi
|
||||
$(VBM) storageattach Redox --storagectl ATA --port 0 --device 0 --type hdd --medium build/harddrive.vdi
|
||||
echo "Run VM"
|
||||
$(VBM) startvm Redox
|
||||
|
||||
1181
native_bootstrap.sh
1181
native_bootstrap.sh
File diff suppressed because it is too large
Load Diff
@ -1,84 +0,0 @@
|
||||
# Configuration file to install the recipe dependencies inside the Podman container
|
||||
|
||||
FROM docker.io/library/debian:trixie
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
appstream \
|
||||
appstream-compose \
|
||||
autoconf \
|
||||
autoconf2.69 \
|
||||
automake \
|
||||
autopoint \
|
||||
bison \
|
||||
bsdextrautils \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
dos2unix \
|
||||
doxygen \
|
||||
expect \
|
||||
file \
|
||||
flex \
|
||||
fuse3 \
|
||||
g++ \
|
||||
genisoimage \
|
||||
git \
|
||||
git-lfs \
|
||||
gobject-introspection \
|
||||
gtk-doc-tools \
|
||||
gtk-update-icon-cache \
|
||||
help2man \
|
||||
ipxe-qemu \
|
||||
intltool \
|
||||
libaudiofile-dev \
|
||||
libdbus-glib-1-dev-bin \
|
||||
libfuse3-dev \
|
||||
libgdk-pixbuf2.0-bin \
|
||||
libglib2.0-dev-bin \
|
||||
libhtml-parser-perl \
|
||||
librsvg2-common \
|
||||
libsdl1.2-dev \
|
||||
libsdl2-ttf-dev \
|
||||
lzip \
|
||||
m4 \
|
||||
make \
|
||||
meson \
|
||||
nano \
|
||||
nasm \
|
||||
ninja-build \
|
||||
patch \
|
||||
patchelf \
|
||||
perl \
|
||||
pkg-config \
|
||||
po4a \
|
||||
protobuf-compiler \
|
||||
qemu-system-x86 \
|
||||
qemu-system-arm \
|
||||
qemu-efi-aarch64 \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-libxml2 \
|
||||
python3-mako \
|
||||
python3-venv \
|
||||
python3-yaml \
|
||||
rsync \
|
||||
ruby \
|
||||
scons \
|
||||
ssh \
|
||||
texinfo \
|
||||
unifdef \
|
||||
unzip \
|
||||
wget \
|
||||
xdg-utils \
|
||||
xfonts-utils \
|
||||
xserver-xorg-dev \
|
||||
xutils-dev \
|
||||
xxd \
|
||||
zip \
|
||||
zstd \
|
||||
&& if [ "$(uname -m)" = "x86_64" ]; then \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libc6-dev-i386 \
|
||||
syslinux-utils \
|
||||
; fi
|
||||
@ -1,15 +0,0 @@
|
||||
FROM debian:stable-backports
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends -t stable-backports \
|
||||
python3 \
|
||||
python3-pip \
|
||||
gdb \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install gdbgui --break-system-packages
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
ENTRYPOINT [ "gdbgui", "--remote", "--port", "5000" ]
|
||||
@ -1,46 +0,0 @@
|
||||
# Configuration file to build linux toolchain using lower glibc constraint
|
||||
|
||||
FROM docker.io/library/debian:oldstable-backports
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends -t oldstable-backports \
|
||||
autoconf \
|
||||
autoconf2.69 \
|
||||
automake \
|
||||
autopoint \
|
||||
bison \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
dos2unix \
|
||||
doxygen \
|
||||
expect \
|
||||
file \
|
||||
flex \
|
||||
fuse3 \
|
||||
g++ \
|
||||
git \
|
||||
git-lfs \
|
||||
help2man \
|
||||
libfuse3-dev \
|
||||
lzip \
|
||||
m4 \
|
||||
make \
|
||||
meson \
|
||||
nano \
|
||||
nasm \
|
||||
ninja-build \
|
||||
patch \
|
||||
patchelf \
|
||||
perl \
|
||||
pkg-config \
|
||||
po4a \
|
||||
python3 \
|
||||
rsync \
|
||||
scons \
|
||||
texinfo \
|
||||
unifdef \
|
||||
unzip \
|
||||
wget \
|
||||
zip \
|
||||
zstd
|
||||
@ -1,40 +0,0 @@
|
||||
# The Redox build server configuration for host tools
|
||||
|
||||
# Packages listed here is to aid the build server to compile `host:` recipes
|
||||
# commonly found within dev dependencies of packages and distribute them.
|
||||
# This is not a replacement for cross compilers that exist within the prebuilt
|
||||
# prefix: GCC, Rust, LLVM and Clang. This is the place for the rest of
|
||||
# cross compilers that's might be needed by other recipes, such as Go or Zig.
|
||||
|
||||
# General settings
|
||||
[general]
|
||||
# Do not prompt if settings are not defined
|
||||
prompt = false
|
||||
|
||||
[packages]
|
||||
# Binaries
|
||||
#dotnet10 = {}
|
||||
#go = {}
|
||||
gperf = {}
|
||||
installer = {}
|
||||
itstool = {}
|
||||
luajit = {}
|
||||
neovim = {}
|
||||
nodejs-21 = {}
|
||||
#openjdk21 = {}
|
||||
#perl5 = {}
|
||||
#protobuf = {}
|
||||
python312 = {}
|
||||
redoxfs = {}
|
||||
redoxer = {}
|
||||
#ruby = {}
|
||||
xz = {}
|
||||
#zig = {}
|
||||
|
||||
# Libraries
|
||||
libarchive = {}
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
libxml = {}
|
||||
libxslt = {}
|
||||
ncurses = {}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user