mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-02 09:38:42 +08:00
Merge branch redox:master into upstream-rustc
This commit is contained in:
commit
65fe58a709
22
.cargo/config.toml
Normal file
22
.cargo/config.toml
Normal file
@ -0,0 +1,22 @@
|
||||
[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"
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@ -10,3 +10,14 @@
|
||||
.vscode/
|
||||
# Local settings folder for the devcontainer extension that most IDEs support.
|
||||
.devcontainer/
|
||||
# Cookbook
|
||||
/repo
|
||||
/cookbook.toml
|
||||
source
|
||||
source.tmp
|
||||
source-new
|
||||
source-old
|
||||
source.tar
|
||||
source.tar.tmp
|
||||
target
|
||||
wget-log
|
||||
|
||||
@ -1,15 +1,35 @@
|
||||
# The GitLab Continuous Integration configuration
|
||||
image: "ubuntu:24.04"
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: "clone"
|
||||
GIT_SUBMODULE_STRATEGY: "recursive"
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
- retag
|
||||
|
||||
fmt:
|
||||
image: "rust:trixie"
|
||||
stage: lint
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
|
||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
||||
script:
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt -- --check
|
||||
|
||||
cargo-test:
|
||||
image: "rust:trixie"
|
||||
stage: lint
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
|
||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
||||
script:
|
||||
# TODO: we should omit fuse from cargo install chains
|
||||
- apt update && apt install -y fuse3 libfuse3-dev
|
||||
- cargo test --locked
|
||||
|
||||
img:
|
||||
image: "ubuntu:24.04"
|
||||
stage: test
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PROJECT_NAMESPACE == "redox-os"'
|
||||
@ -35,67 +55,9 @@ img:
|
||||
help2man \
|
||||
autoconf \
|
||||
automake \
|
||||
zstd &&
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
|
||||
zstd
|
||||
script:
|
||||
- |
|
||||
source "$HOME/.cargo/env" &&
|
||||
export PATH="$HOME/.cargo/bin:$PATH" &&
|
||||
bash podman/rustinstall.sh &&
|
||||
cargo build --manifest-path installer/Cargo.toml --release &&
|
||||
PODMAN_BUILD=0 REPO_BINARY=1 make ci-img IMG_TAG=$CI_COMMIT_REF_NAME &&
|
||||
([ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" ] && rm -rf build/img/* || true)
|
||||
artifacts:
|
||||
paths:
|
||||
- build/img/
|
||||
expire_in: 1 week
|
||||
|
||||
.update-submodule:
|
||||
stage: retag
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push"'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
- when: never
|
||||
image:
|
||||
name: alpine/git:latest
|
||||
entrypoint: [""] # force an empty entrypoint
|
||||
script:
|
||||
- |
|
||||
if [ -z "$CI_PUSH_TOKEN" ]; then
|
||||
echo "Error: CI_PUSH_TOKEN CI/CD variable is not set."
|
||||
echo "Please configure CI_PUSH_TOKEN in your project's CI/CD settings -> Variables."
|
||||
exit 1
|
||||
fi
|
||||
- git config user.email $GITLAB_USER_EMAIL
|
||||
- git config user.name "$GITLAB_USER_NAME (CI)"
|
||||
- git submodule update --remote $SUBMODULE_DIR
|
||||
- |
|
||||
if git diff --quiet $SUBMODULE_DIR; then
|
||||
echo "No changes detected for $SUBMODULE_DIR submodule. Exiting."
|
||||
else
|
||||
echo "Changes detected for $SUBMODULE_DIR submodule. Committing and pushing..."
|
||||
git add $SUBMODULE_DIR
|
||||
git commit -m "CI: Update $SUBMODULE_DIR submodule to latest $CI_COMMIT_BRANCH"
|
||||
git push https://:${CI_PUSH_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git HEAD:$CI_COMMIT_BRANCH
|
||||
echo "Pushed! View the branch at: ${CI_SERVER_URL}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/tree/${CI_COMMIT_BRANCH}"
|
||||
fi
|
||||
|
||||
update_cookbook:
|
||||
extends: .update-submodule
|
||||
variables:
|
||||
SUBMODULE_DIR: cookbook
|
||||
|
||||
update_installer:
|
||||
extends: .update-submodule
|
||||
variables:
|
||||
SUBMODULE_DIR: installer
|
||||
|
||||
update_redoxfs:
|
||||
extends: .update-submodule
|
||||
variables:
|
||||
SUBMODULE_DIR: redoxfs
|
||||
|
||||
update_relibc:
|
||||
extends: .update-submodule
|
||||
variables:
|
||||
SUBMODULE_DIR: relibc
|
||||
PODMAN_BUILD=0 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
|
||||
|
||||
18
.gitmodules
vendored
18
.gitmodules
vendored
@ -1,21 +1,5 @@
|
||||
[submodule "cookbook"]
|
||||
path = cookbook
|
||||
url = https://gitlab.redox-os.org/redox-os/cookbook.git
|
||||
branch = master
|
||||
[submodule "installer"]
|
||||
path = installer
|
||||
url = https://gitlab.redox-os.org/redox-os/installer.git
|
||||
branch = master
|
||||
[submodule "rust"]
|
||||
path = rust
|
||||
url = https://gitlab.redox-os.org/redox-os/rust.git
|
||||
branch = redox-2025-01-12
|
||||
branch = redox-2025-10-03
|
||||
update = none
|
||||
[submodule "redoxfs"]
|
||||
path = redoxfs
|
||||
url = https://gitlab.redox-os.org/redox-os/redoxfs.git
|
||||
branch = master
|
||||
[submodule "relibc"]
|
||||
path = relibc
|
||||
url = https://gitlab.redox-os.org/redox-os/relibc.git
|
||||
branch = master
|
||||
|
||||
@ -97,23 +97,20 @@ Please follow [our process](https://doc.redox-os.org/book/creating-proper-pull-r
|
||||
|
||||
Before starting to contribute, we recommend reading the [Website FAQ](https://www.redox-os.org/faq/) and the [Redox Book](https://doc.redox-os.org/book/).
|
||||
|
||||
You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest first):
|
||||
You can contribute to the Redox documentation and code on the following repositories (non-exhaustive, easiest-to-hardest order):
|
||||
|
||||
- [Website](https://gitlab.redox-os.org/redox-os/website)
|
||||
- [Book](https://gitlab.redox-os.org/redox-os/book) - High-level documentation
|
||||
- [Build System Configuration](https://gitlab.redox-os.org/redox-os/redox) - Our main repository
|
||||
- [Cookbook](https://gitlab.redox-os.org/redox-os/cookbook) - Software Ports System
|
||||
- [Orbital](https://gitlab.redox-os.org/redox-os/orbital) - Display Server and Window Manager
|
||||
- [pkgutils](https://gitlab.redox-os.org/redox-os/pkgutils) - Package Manager
|
||||
- [resist](https://gitlab.redox-os.org/redox-os/resist) - Redox System Interface Specifications and Tests (also has POSIX tests)
|
||||
- [acid](https://gitlab.redox-os.org/redox-os/acid) - Redox Test Suite
|
||||
- [relibc](https://gitlab.redox-os.org/redox-os/relibc) - Redox C Library
|
||||
- [libredox](https://gitlab.redox-os.org/redox-os/libredox) - Redox System Library
|
||||
- [netstack](https://gitlab.redox-os.org/redox-os/netstack) - Network Stack
|
||||
- [Bootloader](https://gitlab.redox-os.org/redox-os/bootloader)
|
||||
- [RedoxFS](https://gitlab.redox-os.org/redox-os/redoxfs) - Default filesystem
|
||||
- [Drivers](https://gitlab.redox-os.org/redox-os/drivers) - Device Drivers
|
||||
- [Base](https://gitlab.redox-os.org/redox-os/base) - Essential system daemons
|
||||
- [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).
|
||||
@ -132,7 +129,7 @@ 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/cookbook/-/tree/master/recipes/wip))
|
||||
- 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:
|
||||
@ -215,7 +212,9 @@ You can see the most common questions and problems on the [Developer FAQ](https:
|
||||
|
||||
## Porting Software
|
||||
|
||||
You can read how to use the Cookbook recipe system to port applications on the [Porting Applications using Recipes](https://doc.redox-os.org/book/porting-applications.html) page.
|
||||
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
|
||||
|
||||
|
||||
1551
Cargo.lock
generated
Normal file
1551
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
60
Cargo.toml
Normal file
60
Cargo.toml
Normal file
@ -0,0 +1,60 @@
|
||||
[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", "filedescriptor", "strip-ansi-escapes"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
# blake3 1.5.4 is incompatible with 0.3 dependency from pkgar
|
||||
blake3 = "=1.5.3"
|
||||
globset = "0.4"
|
||||
libc = "0.2"
|
||||
ignore = "0.4"
|
||||
object = { version = "0.36", features = ["build_core"] }
|
||||
pbr = "1.0.2"
|
||||
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.0.197", features = ["derive"] }
|
||||
termion = "4"
|
||||
toml = "0.8"
|
||||
walkdir = "2.3.1"
|
||||
filedescriptor = { version = "0.8.3", optional = true }
|
||||
ansi-to-tui = { version = "7.0.0", optional = true }
|
||||
strip-ansi-escapes = { version = "0.2.1", optional = true }
|
||||
|
||||
[dependencies.ratatui]
|
||||
version = "0.29.0"
|
||||
default-features = false
|
||||
features = ["termion"]
|
||||
optional = true
|
||||
102
HARDWARE.md
102
HARDWARE.md
@ -2,18 +2,20 @@
|
||||
|
||||
This document tracks the current hardware compatibility of Redox.
|
||||
|
||||
- [Why hardware reports are needed?](#why-hardware-reports-are-needed)
|
||||
- [Why are hardware reports needed?](#why-are-hardware-reports-needed)
|
||||
- [What if my computer is customized?](#what-if-my-computer-is-customized)
|
||||
- [Status](#status)
|
||||
- [General](#general)
|
||||
- [Template](#template)
|
||||
- [Contribute to this document](#contribute-to-this-document)
|
||||
- [Template](#template)
|
||||
- [Table row ordering](#table-row-ordering)
|
||||
- [Recommended](#recommended)
|
||||
- [Booting](#booting)
|
||||
- [Broken](#broken)
|
||||
|
||||
## Why hardware reports are needed?
|
||||
## Why are hardware reports needed?
|
||||
|
||||
Each computer model have different hardware interfaces, firmware implementations and devices, which can cause the following problems:
|
||||
Each computer model has different hardware interfaces, firmware implementations, and devices, which can cause the following problems:
|
||||
|
||||
- Boot bugs
|
||||
- Lack of device support
|
||||
@ -27,21 +29,24 @@ You can use the "Custom" word on the "Vendor" and "Model" categories, we also re
|
||||
|
||||
## Status
|
||||
|
||||
- Broken - The system can't boot.
|
||||
- Booting - The system boots with some issues.
|
||||
- Recommended - The system start with all features working.
|
||||
- **Recommended:** The system boots with all features working.
|
||||
- **Booting:** The system boots with some issues.
|
||||
- **Broken:** The system can't boot.
|
||||
|
||||
## General
|
||||
|
||||
This section cover things to consider.
|
||||
This section contain limitations to consider.
|
||||
|
||||
- ACPI support is incomplete (some things are hardcoded on the kernel)
|
||||
- Only USB input devices are supported
|
||||
- Wi-Fi is not supported
|
||||
- GPU drivers aren't supported (only VESA and UEFI GOP)
|
||||
- Wi-Fi is not supported yet
|
||||
- GPU drivers aren't supported yet (only VESA and UEFI GOP)
|
||||
- Automatic operating system discovery on boot loader is not implemented (remember this before installing Redox)
|
||||
|
||||
## Template
|
||||
## 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.
|
||||
|
||||
@ -49,46 +54,65 @@ 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** |
|
||||
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
|
||||
| System76 | Galago Pro (galp5) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital |
|
||||
| System76 | Lemur Pro (lemp9) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital |
|
||||
| Lenovo | IdeaPad Y510P | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital |
|
||||
| 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** |
|
||||
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
|
||||
| System76 | Oryx Pro (oryp10) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, though it should be working |
|
||||
| System76 | Pangolin (pang12) | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
|
||||
| Dell | XPS 13 (9350) | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS, UEFI | Boots to Orbital, NVMe driver livelocks |
|
||||
| Dell | XPS 13 (9350) | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Boots to Orbital, NVMe driver livelocks |
|
||||
| HP | Dev One | 0.8.0 | 11-11-2022 | desktop | x86-64 | UEFI | Boots to Orbital, No touchpad support, requires I2C HID |
|
||||
| ASUS | X554L | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS | Boots to Orbital, No audio, HDA driver cannot find output pins |
|
||||
| ASUS | ROG g55vw | 0.8.0 | 11-11-2023 | desktop | x86-64 | BIOS | Boots to Orbital, UEFI panic in SETUP |
|
||||
| ASUS | PRIME B350M-E (custom) | 0.9.0 | 20-09-2024 | desktop | x86-64 | UEFI | Partial support for the PS/2 keyboard, PS/2 mouse is broken |
|
||||
| ASUS | Eee PC 900 | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Boots to Orbital, No ethernet driver, Correct video mode not offered (firmware issue) |
|
||||
| Toshiba | Satellite L500 | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS | Boots to Orbital, No ethernet driver, Correct video mode not offered (firmware issue) |
|
||||
| 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 |
|
||||
| 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 | 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 |
|
||||
| Raspberry Pi | 3 Model B+ | 0.8.0 | Unknown | server | ARM64 | U-Boot | Boots to UART serial console (pl011) |
|
||||
| Lenovo | ThinkPad Yoga 260 Laptop - Type 20FE | 0.9.0 | 07-09-2024 | demo | x86-64 | UEFI | Boots to Orbital, No audio |
|
||||
| Lenovo | Yoga S730-13IWL | 0.9.0 | 09-11-2024 | desktop | x86-64 | UEFI | Boots to Orbital, No trackpad or USB mouse input support |
|
||||
| Samsung | Series 3 (NP350V5C) | 0.9.0 | 04-08-2025 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad works, usb does not work, can connect to the Internet through LAN. Wrong maximum display resolution 1024x768 |
|
||||
| Asus | Vivobook 15 OLED (M1503Q) | 0.9.0 | 04-08-2025 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb do not work, cannot connect to the internet, right maximum display resolution 2880x1620 |
|
||||
| HP | EliteBook Folio 9480M | 0.9.0 | 04-11-2025 | desktop | x86-64 | UEFI | Boots to Orbital, touchpad and usb work, cannot connect to the Internet, install failed, right maximum display resolution 1600x900
|
||||
| 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** |
|
||||
|------------|-----------|-------------------|----------------|-------------|----------------------|--------------------------|------------|
|
||||
| HP | EliteBook 2570p | 0.8.0 | 23-11-2022 | demo | x86-64 | BIOS (CSM mode?) | Gets to resolution selection, Fails assert in `src/os/bios/mod.rs:77` after selecting resolution |
|
||||
| BEELINK | U59 | 0.8.0 | 30-05-2024 | server | x86-64 | Unknown | Aborts after panic in xhcid |
|
||||
| ASUS | PN41 | 0.8.0 | 30-05-2024 | server | x86-64 | Unknown | Aborts after panic in xhcid |
|
||||
| Lenovo | G570 | 0.8.0 | 11-11-2022 | desktop | x86-64 | BIOS | Bootloader panics in `alloc_zeroed_page_aligned`, Correct video mode not offered (firmware issue) |
|
||||
| Lenovo | IdeaPad Y510P | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
|
||||
| Framework | Laptop 16 (AMD Ryzen 7040 Series) | 0.9.0 | 07-09-2024 | server, demo | x86-64 | UEFI | Black screen and unresponsive after the bootloader and resolution selection |
|
||||
| Toshiba | Satellite L500 | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Correct video mode not offered (firmware issue), Panics on `phys_to_virt overflow`, probably having invalid mappings for 32-bit |
|
||||
| Panasonic | Toughbook CF-18 | 0.8.0 | 11-11-2022 | desktop | i686 | BIOS | Hangs after PIT initialization |
|
||||
| XMG (Schenker) | Apex 17 (M21) | 0.9.0 | 30-09-2024 | demo, server | x86-64 | UEFI | After selecting resolution, (release) repeats `...::interrupt::irq::ERROR -- Local apic internal error: ESR=0x40` a few times before it freezes; (daily) really slowly prints statements from `...::rmm::INFO` before it abruptly aborts |
|
||||
| ASUS | PN41 | 0.8.0 | 2024-05-30 | server | x86-64 | Unknown | Aborts after panic in xhcid |
|
||||
| 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 | 2024-09-07 | server, demo | x86-64 | UEFI | Black screen and unresponsive after the bootloader and resolution selection |
|
||||
| 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 | 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 |
|
||||
| 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 |
|
||||
|
||||
|
||||
48
Makefile
48
Makefile
@ -28,36 +28,54 @@ rebuild:
|
||||
rm -rf $(BUILD)/repo.tag $(BUILD)/harddrive.img $(BUILD)/redox-live.iso
|
||||
$(MAKE) all
|
||||
|
||||
clean: $(CONTAINER_TAG)
|
||||
# To tell that it's not safe
|
||||
# to execute the cookbook binary
|
||||
NOT_ON_PODMAN?=0
|
||||
|
||||
clean:
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifneq ("$(wildcard $(CONTAINER_TAG))","")
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
cd cookbook && ./clean.sh
|
||||
-rm -rf cookbook/repo
|
||||
$(MAKE) fstools_clean
|
||||
$(HOST_CARGO) clean --manifest-path relibc/Cargo.toml
|
||||
endif
|
||||
$(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
|
||||
|
||||
distclean: $(CONTAINER_TAG)
|
||||
distclean:
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifneq ("$(wildcard $(CONTAINER_TAG))","")
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) clean
|
||||
cd cookbook && ./unfetch.sh
|
||||
endif
|
||||
$(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
|
||||
|
||||
pull:
|
||||
git pull
|
||||
git submodule sync --recursive
|
||||
git submodule update --recursive --init
|
||||
|
||||
fetch: $(BUILD)/fetch.tag
|
||||
rm -f $(FSTOOLS_TAG)
|
||||
|
||||
repo: $(BUILD)/repo.tag
|
||||
|
||||
repo_clean: c.--all
|
||||
|
||||
fetch_clean: u.--all
|
||||
|
||||
# Podman build recipes and vars
|
||||
include mk/podman.mk
|
||||
|
||||
@ -89,7 +107,7 @@ else
|
||||
endif
|
||||
|
||||
export RUST_GDB=gdb-multiarch # Necessary when debugging for another architecture than the host
|
||||
GDB_KERNEL_FILE=cookbook/recipes/core/kernel/target/$(TARGET)/build/kernel.sym
|
||||
GDB_KERNEL_FILE=recipes/core/kernel/target/$(TARGET)/build/kernel.sym
|
||||
gdb: FORCE
|
||||
rust-gdb $(GDB_KERNEL_FILE) --eval-command="target remote :1234"
|
||||
|
||||
|
||||
@ -37,17 +37,14 @@ Some of the key repositories on the Redox GitLab:
|
||||
| Essential Repositories | Maintainer
|
||||
|-------------------------------------------------------------------------------------------------------------|---------------------------
|
||||
| [Kernel](https://gitlab.redox-os.org/redox-os/kernel) | **@jackpot51**
|
||||
| [Base (essential system components)](https://gitlab.redox-os.org/redox-os/base) | **@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**
|
||||
| [Drivers](https://gitlab.redox-os.org/redox-os/drivers) | **@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**
|
||||
| [netstack (network stack)](https://gitlab.redox-os.org/redox-os/netstack) | **@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**
|
||||
| [Cookbook (build system for system components and programs)](https://gitlab.redox-os.org/redox-os/cookbook) | **@jackpot51** **@hatred_45**
|
||||
| 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**
|
||||
|
||||
39
TRADEMARK.md
Normal file
39
TRADEMARK.md
Normal file
@ -0,0 +1,39 @@
|
||||
# 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.
|
||||
12
bin/aarch64-unknown-redox-pkg-config
Executable file
12
bin/aarch64-unknown-redox-pkg-config
Executable file
@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
12
bin/i586-unknown-redox-pkg-config
Executable file
12
bin/i586-unknown-redox-pkg-config
Executable file
@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
12
bin/i686-unknown-redox-pkg-config
Executable file
12
bin/i686-unknown-redox-pkg-config
Executable file
@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
12
bin/riscv64-unknown-redox-pkg-config
Executable file
12
bin/riscv64-unknown-redox-pkg-config
Executable file
@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
51
bin/x86_64-unknown-redox-llvm-config
Executable file
51
bin/x86_64-unknown-redox-llvm-config
Executable file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# This script wraps llvm-config that intended for cross compiling to Redox.
|
||||
# Because we can't run llvm-config compiled to Redox, we wrap it here.
|
||||
# Any recipes that calls this script must have "host:llvm.runtime" available.
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
LLVM_CONFIG = "/usr/bin/llvm-config"
|
||||
|
||||
def main():
|
||||
toolchain_path = os.environ.get("COOKBOOK_TOOLCHAIN")
|
||||
sysroot_path = os.environ.get("COOKBOOK_SYSROOT")
|
||||
|
||||
if not toolchain_path or not sysroot_path:
|
||||
print(f"Error: COOKBOOK_TOOLCHAIN or COOKBOOK_SYSROOT not set", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
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
|
||||
|
||||
if sys.argv[1] in ["--bindir"]:
|
||||
output = toolchain_path + "/usr/bin"
|
||||
else: #if sys.argv[1] in ["--cppflags", "--cxxflags", "--includedir", "--ldflags", "--libdir", "--libfiles"]
|
||||
src = toolchain_path.rstrip(os.sep)
|
||||
dst = sysroot_path.rstrip(os.sep)
|
||||
|
||||
output = output.replace(src, dst)
|
||||
|
||||
print(output, end='')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
12
bin/x86_64-unknown-redox-pkg-config
Executable file
12
bin/x86_64-unknown-redox-pkg-config
Executable file
@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
15
build.sh
15
build.sh
@ -12,10 +12,12 @@ usage()
|
||||
{
|
||||
echo "build.sh: Invoke make for a particular architecture and configuration."
|
||||
echo "Usage:"
|
||||
echo "./build.sh [-X | -A | -6 | -a ARCH] [-c CONFIG] [-f FILESYSTEM_CONFIG] TARGET..."
|
||||
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 " -6 Equivalent to -a i686."
|
||||
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,"
|
||||
@ -61,7 +63,9 @@ do
|
||||
f) FILESYSTEM_CONFIG="$OPTARG";;
|
||||
X) ARCH="x86_64";;
|
||||
A) ARCH="aarch64";;
|
||||
6) ARCH="i686";;
|
||||
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;;
|
||||
@ -75,8 +79,9 @@ if [ -z "$ARCH" ] && [ -n "$FILESYSTEM_CONFIG" ]; then
|
||||
case "$ARCH" in
|
||||
x86_64) : ;;
|
||||
aarch64) : ;;
|
||||
i686) : ;;
|
||||
\?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64 or i686";;
|
||||
riscv64gc) : ;;
|
||||
i586) : ;;
|
||||
\?) ARCH=""; echo "Unknown Architecture, please specify x86_64, aarch64, riscv64gc or i586";;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
@ -7,29 +7,43 @@ prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
acid = {}
|
||||
base = {}
|
||||
base-initfs = {}
|
||||
bash = {}
|
||||
bootloader = {}
|
||||
bottom = {}
|
||||
ca-certificates = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
cosmic-text = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
dejavu = {}
|
||||
diffutils = {}
|
||||
drivers = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
findutils = {}
|
||||
freefont = {}
|
||||
freetype2 = {}
|
||||
gettext = {}
|
||||
git = {}
|
||||
# gdbserver = {} # wrong libc type
|
||||
# gnu-binutils = {} # bfd doesn't recognize redox
|
||||
gnu-make = {}
|
||||
hicolor-icon-theme = {}
|
||||
installer = {}
|
||||
installer-gui = {}
|
||||
ion = {}
|
||||
kernel = {}
|
||||
kibi = {}
|
||||
libffi = {}
|
||||
libgcc = {}
|
||||
libiconv = {}
|
||||
libjpeg = {}
|
||||
libogg = {}
|
||||
liborbital = {}
|
||||
@ -58,17 +72,22 @@ orbutils-launcher = {}
|
||||
orbutils-orblogin = {}
|
||||
patch = {}
|
||||
pcre = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
pkgutils = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
resist = {}
|
||||
ripgrep = {}
|
||||
rustpython = {}
|
||||
# strace = {} # unknown syscall
|
||||
sdl1 = {}
|
||||
sed = {}
|
||||
shared-mime-info = {}
|
||||
smith = {}
|
||||
terminfo = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
xz = {}
|
||||
vim = {}
|
||||
zlib = {}
|
||||
|
||||
@ -12,7 +12,6 @@ prompt = false
|
||||
base = {}
|
||||
base-initfs = {}
|
||||
bootloader = {}
|
||||
drivers = {}
|
||||
kernel = {}
|
||||
libgcc = {}
|
||||
libstdcxx = {}
|
||||
@ -25,12 +24,12 @@ uutils = {}
|
||||
path = "/usr/lib/init.d/00_base"
|
||||
data = """
|
||||
# clear and recreate tmpdir with 0o1777 permission
|
||||
rm -r /tmp
|
||||
rm -rf /tmp
|
||||
mkdir -m a=rwxt /tmp
|
||||
|
||||
ipcd
|
||||
ptyd
|
||||
sudo --daemon
|
||||
nowait sudo --daemon
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
|
||||
@ -20,7 +20,7 @@ orbutils-orblogin = {}
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
export VT 3
|
||||
orbital orblogin launcher
|
||||
nowait orbital orblogin launcher
|
||||
unset VT
|
||||
"""
|
||||
|
||||
@ -28,6 +28,6 @@ unset VT
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
getty 2
|
||||
getty /scheme/debug/no-preserve -J
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug/no-preserve -J
|
||||
"""
|
||||
|
||||
@ -10,20 +10,21 @@ filesystem_size = 650
|
||||
# Package settings
|
||||
[packages]
|
||||
cosmic-edit = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
dejavu = {}
|
||||
freefont = {}
|
||||
hicolor-icon-theme = {}
|
||||
installer-gui = {}
|
||||
netsurf = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbutils = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
rustpython = {}
|
||||
shared-mime-info = {}
|
||||
patchelf = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
@ -31,7 +32,7 @@ data = """
|
||||
audiod
|
||||
export BROWSER /bin/netsurf-fb
|
||||
export VT 3
|
||||
orbital orblogin launcher
|
||||
nowait orbital orblogin launcher
|
||||
unset BROWSER
|
||||
unset VT
|
||||
"""
|
||||
@ -40,6 +41,6 @@ unset VT
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
getty 2
|
||||
getty /scheme/debug/no-preserve -J
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug/no-preserve -J
|
||||
"""
|
||||
|
||||
@ -7,28 +7,57 @@ prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
acid = {}
|
||||
base = {}
|
||||
base-initfs = {}
|
||||
bash = {}
|
||||
bootloader = {}
|
||||
bottom = {}
|
||||
ca-certificates = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
cosmic-edit = {}
|
||||
cosmic-files = {}
|
||||
cosmic-icons = {}
|
||||
cosmic-term = {}
|
||||
cosmic-text = {}
|
||||
curl = {}
|
||||
dash = {}
|
||||
dejavu = {}
|
||||
diffutils = {}
|
||||
drivers = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
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 = {}
|
||||
@ -36,14 +65,23 @@ orbutils = {}
|
||||
orbutils-background = {}
|
||||
orbutils-launcher = {}
|
||||
orbutils-orblogin = {}
|
||||
patch = {}
|
||||
pcre = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
pkgutils = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
resist = {}
|
||||
ripgrep = {}
|
||||
rustpython = {}
|
||||
sdl1 = {}
|
||||
sed = {}
|
||||
shared-mime-info = {}
|
||||
smith = {}
|
||||
terminfo = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
xz = {}
|
||||
#vim = {} # conflicting types
|
||||
|
||||
#TODO: Add more packages
|
||||
zlib = {}
|
||||
@ -12,4 +12,3 @@ include = ["../desktop.toml"]
|
||||
# Package settings
|
||||
[packages]
|
||||
# example = {}
|
||||
rustpython = "ignore" # https://github.com/Alexhuszagh/rust-lexical/issues/218
|
||||
@ -7,7 +7,7 @@ filesystem_size = 2048
|
||||
|
||||
[packages]
|
||||
bash = {}
|
||||
llvm = {}
|
||||
llvm20 = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/99_gen_llvm-config-generate"
|
||||
|
||||
@ -16,13 +16,13 @@ findutils = {}
|
||||
ion = {}
|
||||
netdb = {}
|
||||
pkgutils = {}
|
||||
smith = {}
|
||||
kibi = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
inputd -A 2
|
||||
getty 2
|
||||
getty /scheme/debug -J
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug -J
|
||||
"""
|
||||
|
||||
|
||||
@ -12,12 +12,12 @@ filesystem_size = 196
|
||||
coreutils = {}
|
||||
extrautils = {}
|
||||
ion = {}
|
||||
smith = {}
|
||||
kibi = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
inputd -A 2
|
||||
getty 2
|
||||
getty /scheme/debug/no-preserve -J
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug/no-preserve -J
|
||||
"""
|
||||
|
||||
@ -13,14 +13,14 @@ netutils = {}
|
||||
path = "/usr/lib/init.d/10_net"
|
||||
data = """
|
||||
smolnetd
|
||||
dhcpd -b
|
||||
nowait dhcpd
|
||||
"""
|
||||
|
||||
## Default net configuration (optimized for QEMU)
|
||||
[[files]]
|
||||
path = "/etc/net/dns"
|
||||
data = """
|
||||
208.67.222.222
|
||||
9.9.9.9
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
|
||||
@ -14,6 +14,6 @@ data = """
|
||||
echo
|
||||
echo ## running redoxer in orbital ##
|
||||
export VT 3
|
||||
orbital redoxerd
|
||||
nowait orbital redoxerd
|
||||
unset VT
|
||||
"""
|
||||
|
||||
@ -9,13 +9,12 @@ ca-certificates = {}
|
||||
coreutils = {}
|
||||
extrautils = {}
|
||||
findutils = {}
|
||||
gcc13 = {}
|
||||
gnu-binutils = {}
|
||||
gnu-make = {}
|
||||
ion = {}
|
||||
netdb = {}
|
||||
pkgutils = {}
|
||||
redoxerd = {}
|
||||
relibc = {}
|
||||
sed = {}
|
||||
|
||||
# Override to not background dhcpd
|
||||
[[files]]
|
||||
|
||||
@ -7,28 +7,57 @@ prompt = false
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
acid = {}
|
||||
base = {}
|
||||
base-initfs = {}
|
||||
bash = {}
|
||||
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 = {}
|
||||
drivers = {}
|
||||
#extrautils = {} # xz fails to build
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
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 = {}
|
||||
@ -36,13 +65,23 @@ orbutils = {}
|
||||
orbutils-background = {}
|
||||
orbutils-launcher = {}
|
||||
orbutils-orblogin = {}
|
||||
#patch = {} error configure machine `riscv64gc-unknown' not recognized
|
||||
pcre = {}
|
||||
patchelf = {}
|
||||
pop-icon-theme = {}
|
||||
pkgutils = {}
|
||||
redoxfs = {}
|
||||
relibc = {}
|
||||
#resist = {} # Uses redox_syscall 0.2 which does not compile on riscv64gc
|
||||
ripgrep = {}
|
||||
rustpython = {}
|
||||
#sdl1 = {} # not tested yet, netsurf is commented out
|
||||
sed = {}
|
||||
shared-mime-info = {}
|
||||
smith = {}
|
||||
terminfo = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
xz = {}
|
||||
#vim = {} # error compiling ncurses
|
||||
|
||||
#TODO: Add more packages
|
||||
zlib = {}
|
||||
|
||||
@ -10,6 +10,7 @@ filesystem_size = 512
|
||||
# Package settings
|
||||
[packages]
|
||||
bash = {}
|
||||
bottom = {}
|
||||
ca-certificates = {}
|
||||
#contain = {} # needs to update dependencies
|
||||
coreutils = {}
|
||||
@ -28,6 +29,6 @@ redoxfs = {}
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
inputd -A 2
|
||||
getty 2
|
||||
getty /scheme/debug/no-preserve -J
|
||||
nowait getty 2
|
||||
nowait getty /scheme/debug/no-preserve -J
|
||||
"""
|
||||
|
||||
69
config/wayland.toml
Normal file
69
config/wayland.toml
Normal file
@ -0,0 +1,69 @@
|
||||
# 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 = {}
|
||||
bash = {}
|
||||
gtk3 = {}
|
||||
libxcursor = {}
|
||||
mesa = {}
|
||||
smallvil = {}
|
||||
softbuffer-wayland = {}
|
||||
wayland-rs = {}
|
||||
webkitgtk3 = {}
|
||||
winit-wayland = {}
|
||||
xkeyboard-config = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/10_wayland_env"
|
||||
data = """
|
||||
export XDG_RUNTIME_DIR /tmp/run/user/0
|
||||
mkdir -p $XDG_RUNTIME_DIR
|
||||
export WAYLAND_DISPLAY wayland-1
|
||||
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
||||
"""
|
||||
|
||||
# Overridden to launch smallvil instead of orblogin
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
audiod
|
||||
export BROWSER /bin/netsurf-fb
|
||||
export VT 3
|
||||
nowait orbital orbital-wayland
|
||||
unset BROWSER
|
||||
unset VT
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/orbital-wayland"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export LD_DEBUG=all
|
||||
export RUST_LOG=debug
|
||||
smallvil_smallvil &
|
||||
sleep 2
|
||||
env G_MAIN_POLL_DEBUG=1 G_MESSAGES_DEBUG=all LD_DEBUG=all WEBKIT_DEBUG=all MiniBrowser&
|
||||
#softbuffer-wayland_animation &
|
||||
#wayland-rs_simple_window &
|
||||
#winit-wayland_window &
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/gtk-3.0/settings.ini"
|
||||
data = """
|
||||
[Settings]
|
||||
gtk-cursor-theme-name = "Adwaita"
|
||||
gtk-icon-theme-name = "Adwaita"
|
||||
"""
|
||||
128
config/x11.toml
128
config/x11.toml
@ -11,50 +11,142 @@ filesystem_size = 2048
|
||||
|
||||
# Package settings
|
||||
[packages]
|
||||
adwaita-icon-theme = {}
|
||||
caja = {}
|
||||
dbus = {}
|
||||
gtk3 = {}
|
||||
htop = {}
|
||||
libnettle = {}
|
||||
llvm18 = {}
|
||||
mesa-x11 = {}
|
||||
marco = {}
|
||||
mate-control-center = {}
|
||||
mate-icon-theme = {}
|
||||
mate-panel = {}
|
||||
mate-session-manager = {}
|
||||
mate-settings-daemon = {}
|
||||
mate-terminal = {}
|
||||
mesa-demos-x11 = {}
|
||||
sqlite3 = {}
|
||||
twm = {}
|
||||
webkitgtk3 = {}
|
||||
xev = {}
|
||||
xeyes = {}
|
||||
#xfce4-panel = {}
|
||||
#xfwm4 = {}
|
||||
xinit = {}
|
||||
xkbcomp = {}
|
||||
xkbutils = {}
|
||||
xkeyboard-config = {}
|
||||
xserver-xorg = {}
|
||||
xserver-xorg-video-dummy = {}
|
||||
xserver-xorg-video-orbital = {}
|
||||
xterm = {}
|
||||
zenity = {}
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/20_xenv"
|
||||
path = "/usr/lib/init.d/10_dbus"
|
||||
data = """
|
||||
export DISPLAY :0
|
||||
export G_MESSAGES_DEBUG all
|
||||
export LD_DEBUG all
|
||||
export WEBKIT_DEBUG all
|
||||
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
||||
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
|
||||
dbus-daemon --system
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/40_x"
|
||||
path = "/usr/lib/init.d/10_xenv"
|
||||
data = """
|
||||
bash /usr/bin/orbital-x11
|
||||
export DISPLAY :0
|
||||
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 = """
|
||||
audiod
|
||||
export BROWSER /bin/netsurf-fb
|
||||
export VT 3
|
||||
nowait orbital orbital-x11
|
||||
unset BROWSER
|
||||
unset VT
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/orbital-x11"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
X "${DISPLAY}" -verbose 6 &
|
||||
# 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)))"
|
||||
mkdir -p /usr/share/X11/xorg.conf.d
|
||||
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
|
||||
twm &
|
||||
xterm &
|
||||
exec dbus-launch --exit-with-x11 orbital-x11-session
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/usr/bin/orbital-x11-session"
|
||||
mode = 0o755
|
||||
data = """
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
xterm&
|
||||
sleep 1
|
||||
mate-session&
|
||||
"""
|
||||
|
||||
[[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"
|
||||
|
||||
|
||||
@ -13,8 +13,8 @@ prompt = false
|
||||
dev-essential = {}
|
||||
dev-redox = {}
|
||||
redox-tests = {}
|
||||
#x11-minimal = { # needs all dependencies added below
|
||||
#x11-full = {} # needs all dependencies added below
|
||||
x11-minimal = {}
|
||||
x11-full = {}
|
||||
|
||||
# Normal packages below
|
||||
|
||||
@ -50,8 +50,6 @@ dash = {}
|
||||
dejavu = {}
|
||||
diffutils = {}
|
||||
dosbox = {}
|
||||
drivers = {}
|
||||
drivers-initfs = {}
|
||||
duktape = {}
|
||||
eduke32 = {}
|
||||
exampled = {}
|
||||
@ -64,6 +62,7 @@ findutils = {}
|
||||
fontconfig = {}
|
||||
#freeciv = {}
|
||||
freedoom = {}
|
||||
freefont = {}
|
||||
#freeglut = {}
|
||||
freepats = {}
|
||||
freetype2 = {}
|
||||
@ -73,7 +72,7 @@ fribidi = {}
|
||||
#gawk = {} # langinfo.h
|
||||
gcc13 = {}
|
||||
gdbserver = {}
|
||||
#gdk-pixbuf = {} # shared-mime-info
|
||||
gdk-pixbuf = {}
|
||||
gears = {}
|
||||
generaluser-gs = {}
|
||||
gettext = {}
|
||||
@ -117,7 +116,7 @@ libwebp = {}
|
||||
libxkbcommon = {}
|
||||
libuuid = {}
|
||||
libxml2 = {}
|
||||
llvm18 = {}
|
||||
llvm21 = {}
|
||||
lsd = {}
|
||||
lua54 = {}
|
||||
lz4 = {}
|
||||
@ -169,7 +168,7 @@ pcre = {}
|
||||
perg = {}
|
||||
periodictable = {}
|
||||
php84 = {}
|
||||
#perl5 = {} # ctermid, tempnam, ttyname
|
||||
perl5 = {}
|
||||
pixelcannon = {}
|
||||
#pixman = {} # depends on glib which does not build
|
||||
#pkgar = {} # uses virtual Cargo.toml, needs recipe update
|
||||
@ -182,7 +181,6 @@ procedural-wallpapers-rs = {}
|
||||
python312 = {}
|
||||
#qemu = {} # can be built, but not working
|
||||
readline = {}
|
||||
redoxerd = {}
|
||||
redox-fatfs = {}
|
||||
redoxfs = {}
|
||||
redox-games = {}
|
||||
@ -215,7 +213,7 @@ sdl2-image = {}
|
||||
sdl2-mixer = {}
|
||||
sdl2-ttf = {}
|
||||
sed = {}
|
||||
#servo = {} # some more crates to port
|
||||
servo = {}
|
||||
shared-mime-info = {}
|
||||
shellharden = {}
|
||||
shellstorm = {}
|
||||
@ -225,7 +223,7 @@ sodium = {}
|
||||
sopwith = {}
|
||||
sqlite3 = {}
|
||||
strace = {}
|
||||
#syobonaction = {} # linking errors
|
||||
syobonaction = {}
|
||||
terminfo = {}
|
||||
#termplay = {} # backtrace cannot find link.h
|
||||
timidity = {}
|
||||
@ -237,6 +235,7 @@ uutils = {}
|
||||
vim = {}
|
||||
vttest = {}
|
||||
#vvvvvv = {} # did not compile
|
||||
webkitgtk3 = {}
|
||||
#webrender = {} # unwind
|
||||
#wesnoth = {}
|
||||
winit = {}
|
||||
|
||||
@ -19,7 +19,7 @@ path = "/usr/lib/init.d/20_orbital"
|
||||
data = """
|
||||
audiod
|
||||
export VT 3
|
||||
orbital contain_orblogin launcher
|
||||
nowait orbital contain_orblogin launcher
|
||||
unset VT
|
||||
"""
|
||||
|
||||
@ -27,8 +27,8 @@ unset VT
|
||||
[[files]]
|
||||
path = "/usr/lib/init.d/30_console"
|
||||
data = """
|
||||
getty --contain 2
|
||||
getty --contain /scheme/debug/no-preserve -J
|
||||
nowait getty --contain 2
|
||||
nowait getty --contain /scheme/debug/no-preserve -J
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
|
||||
3
config/x86_64/wayland.toml
Normal file
3
config/x86_64/wayland.toml
Normal file
@ -0,0 +1,3 @@
|
||||
# Wayland configuration
|
||||
|
||||
include = ["../wayland.toml"]
|
||||
1
cookbook
1
cookbook
@ -1 +0,0 @@
|
||||
Subproject commit 8851a304e6710b953b4974bd714fdce4411e2e50
|
||||
@ -1,3 +0,0 @@
|
||||
# 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\]\$ "
|
||||
@ -1,45 +0,0 @@
|
||||
# Configuration file to setup the Docker container of Redox
|
||||
|
||||
FROM rustlang/rust:nightly
|
||||
|
||||
ENV IMAGE_NAME=redox-os-docker
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get update; \
|
||||
apt-get install -q -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
bison \
|
||||
flex \
|
||||
fuse \
|
||||
gosu \
|
||||
libfuse-dev \
|
||||
nasm \
|
||||
qemu-utils \
|
||||
sudo \
|
||||
texinfo \
|
||||
autopoint \
|
||||
git \
|
||||
cmake \
|
||||
gperf \
|
||||
libhtml-parser-perl \
|
||||
; \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA12E97F0881517F; \
|
||||
echo "deb https://static.redox-os.org/toolchain/apt/ /" >> \
|
||||
/etc/apt/sources.list.d/redox.list; \
|
||||
apt-get update -o Dir::Etc::sourcelist="redox.list"; \
|
||||
apt-get install -q -y --no-install-recommends \
|
||||
x86-64-unknown-redox-newlib \
|
||||
x86-64-unknown-redox-binutils \
|
||||
x86-64-unknown-redox-gcc \
|
||||
; \
|
||||
cargo install cargo-config; \
|
||||
cargo install just@1.16.0; \
|
||||
apt-get autoremove -q -y; \
|
||||
apt-get clean -q -y; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
COPY .bash_aliases /etc/skel/
|
||||
|
||||
ENTRYPOINT ["bash", "/usr/local/bin/entrypoint.sh"]
|
||||
CMD ["/bin/bash"]
|
||||
@ -1,85 +0,0 @@
|
||||
## 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
BIN
docker/demo.gif
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB |
@ -1,7 +0,0 @@
|
||||
# This script run the Docker image of Redox
|
||||
|
||||
docker run --privileged --cap-add MKNOD --cap-add SYS_ADMIN --device /dev/fuse \
|
||||
-e LOCAL_UID="$(id -u)" -e LOCAL_GID="$(id -g)" \
|
||||
-v redox-"$(id -u)-$(id -g)"-cargo:/usr/local/cargo \
|
||||
-v redox-"$(id -u)-$(id -g)"-rustup:/usr/local/rustup \
|
||||
-v "$(pwd):$(pwd)" -w "$(pwd)" --rm -it redoxos/redox "$@"
|
||||
@ -1,34 +0,0 @@
|
||||
#!/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 "$@"
|
||||
24
flake.lock
generated
24
flake.lock
generated
@ -5,11 +5,11 @@
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743550720,
|
||||
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||
"lastModified": 1763759067,
|
||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739863612,
|
||||
"narHash": "sha256-UbtgxplOhFcyjBcNbTVO8+HUHAl/WXFDOb6LvqShiZo=",
|
||||
"lastModified": 1763934636,
|
||||
"narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "632f04521e847173c54fa72973ec6c39a371211c",
|
||||
"rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -36,11 +36,11 @@
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1743296961,
|
||||
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
|
||||
"lastModified": 1761765539,
|
||||
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
|
||||
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -63,11 +63,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739932111,
|
||||
"narHash": "sha256-WkayjH0vuGw0hx2gmjTUGFRvMKpM17gKcpL/U8EUUw0=",
|
||||
"lastModified": 1764038373,
|
||||
"narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "75b2271c5c087d830684cd5462d4410219acc367",
|
||||
"rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
88
flake.nix
88
flake.nix
@ -6,9 +6,7 @@
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
@ -47,7 +45,7 @@
|
||||
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
rust-bin = pkgs.rust-bin.nightly."2025-01-12".default.override {
|
||||
rust-bin = pkgs.rust-bin.nightly."2025-10-03".default.override {
|
||||
extensions = [
|
||||
"rust-analyzer"
|
||||
"rust-src"
|
||||
@ -71,19 +69,6 @@
|
||||
rustc = rust-bin;
|
||||
};
|
||||
|
||||
cargo-config = rustPlatform.buildRustPackage {
|
||||
pname = "cargo-config";
|
||||
version = "0.1.1";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "wesleywiser";
|
||||
repo = "cargo-config";
|
||||
rev = "cf576faf65913615ed424914daa960800ed3ebc4";
|
||||
sha256 = "sha256-HrITNTfjBppOH1MhfZHfzHc6N8ymcm7vaiBI94ctUOA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
# useFetchCargoVendor = true; # this is recommended, but fails in some python code?
|
||||
cargoHash = "sha256-yQpIKclZ8KLE5JGkB/tjKZA8ezaD9SbUthDsuBXYZjQ=";
|
||||
};
|
||||
podmanSetupScript =
|
||||
let
|
||||
registriesConf = pkgs.writeText "registries.conf" ''
|
||||
@ -106,7 +91,7 @@
|
||||
export PODMAN_SYSTEMD_UNIT=podman.socket
|
||||
'';
|
||||
# Provides a fake "docker" binary mapping to podman
|
||||
dockerCompat = pkgs.runCommandNoCC "docker-podman-compat" { } ''
|
||||
dockerCompat = pkgs.runCommand "docker-podman-compat" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
||||
'';
|
||||
@ -114,13 +99,6 @@
|
||||
in
|
||||
pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [
|
||||
# Compilation
|
||||
rust-bin
|
||||
|
||||
# Utils
|
||||
cowsay
|
||||
lolcat
|
||||
|
||||
# Podman
|
||||
dockerCompat
|
||||
podman # Docker compat
|
||||
@ -130,65 +108,24 @@
|
||||
slirp4netns # User-mode networking for unprivileged namespaces
|
||||
fuse-overlayfs # CoW for images, much faster than default vfs
|
||||
|
||||
# Cargo utilities
|
||||
cargo-config
|
||||
|
||||
# Build Redox
|
||||
ant
|
||||
autoconf
|
||||
automake
|
||||
bison
|
||||
cmake
|
||||
curl
|
||||
doxygen
|
||||
expat
|
||||
expect
|
||||
file
|
||||
flex
|
||||
fuse
|
||||
gmp
|
||||
gnumake
|
||||
gnupatch
|
||||
gperf
|
||||
just
|
||||
libjpeg
|
||||
libpng
|
||||
libtool
|
||||
llvmPackages.clang
|
||||
llvmPackages.llvm
|
||||
lua
|
||||
m4
|
||||
meson
|
||||
nasm
|
||||
perl
|
||||
perl540Packages.HTMLParser
|
||||
perl540Packages.Po4a
|
||||
pkgconf
|
||||
podman
|
||||
protobuf
|
||||
(python3.withPackages (ps: with ps; [ mako ]))
|
||||
# with FSTOOLS_IN_PODMAN=1 these are not needed
|
||||
# without it, the installer fails to link FUSE somehow
|
||||
#fuse
|
||||
#rust-bin
|
||||
qemu_kvm
|
||||
rust-cbindgen
|
||||
scons
|
||||
SDL
|
||||
syslinux
|
||||
texinfo
|
||||
unzip
|
||||
waf
|
||||
wget
|
||||
xdg-utils
|
||||
zip
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
NIX_SHELL_BUILD = "1";
|
||||
FSTOOLS_IN_PODMAN = "1";
|
||||
shellHook = ''
|
||||
# Install required configuration
|
||||
${podmanSetupScript}
|
||||
echo "Redox environment loaded" | cowsay | lolcat
|
||||
echo "Redox podman build environment loaded"
|
||||
'';
|
||||
};
|
||||
|
||||
#TODO: This isn't tested yet, use at your own risk
|
||||
native = pkgs.mkShell rec {
|
||||
nativeBuildInputs =
|
||||
let
|
||||
@ -228,7 +165,6 @@
|
||||
qemu_kvm
|
||||
rust-cbindgen
|
||||
scons
|
||||
syslinux
|
||||
texinfo
|
||||
unzip
|
||||
waf
|
||||
@ -236,6 +172,8 @@
|
||||
xdg-utils
|
||||
xxd
|
||||
zip
|
||||
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86 [
|
||||
pkgs.syslinux
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
@ -254,7 +192,7 @@
|
||||
PODMAN_BUILD = "0";
|
||||
shellHook = with pkgs; ''
|
||||
export PKG_CONFIG_PATH="${fuse.dev}/lib/pkgconfig\
|
||||
:${libpng.dev}/lib/pkgconfig
|
||||
:${libpng.dev}/lib/pkgconfig"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Subproject commit 97dd77918e7027c6c57d537b7eb732bbd22739af
|
||||
16
mk/ci.mk
16
mk/ci.mk
@ -9,12 +9,12 @@ IMG_DIR?=build/img/$(ARCH)
|
||||
ci-img: FORCE
|
||||
rm -rf $(IMG_DIR)
|
||||
mkdir -p $(IMG_DIR)
|
||||
$(MAKE) minimal minimal-net server desktop demo
|
||||
$(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
|
||||
minimal minimal-net server desktop demo: FORCE
|
||||
server desktop demo: FORCE
|
||||
rm -f "build/$(ARCH)/$@/harddrive.img" "build/$(ARCH)/$@/redox-live.iso"
|
||||
$(MAKE) CONFIG_NAME=$@ build/$(ARCH)/$@/harddrive.img build/$(ARCH)/$@/redox-live.iso
|
||||
mkdir -p $(IMG_DIR)
|
||||
@ -26,15 +26,9 @@ ci-pkg: prefix $(FSTOOLS_TAG) $(CONTAINER_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
|
||||
$(HOST_CARGO) build --manifest-path cookbook/pkgar/Cargo.toml --release
|
||||
$(HOST_CARGO) build --manifest-path installer/Cargo.toml --release
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) --short -c config/$(ARCH)/ci.toml)" && \
|
||||
cd cookbook && \
|
||||
./fetch.sh "$${PACKAGES}" && \
|
||||
./repo.sh $(REPO_NONSTOP) "$${PACKAGES}"
|
||||
$(HOST_CARGO) build --manifest-path Cargo.toml --release
|
||||
export CI=1 COOKBOOK_LOGS=true PATH="$(PREFIX_PATH):$$PATH" COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
./target/release/repo cook --with-package-deps "--filesystem=config/$(ARCH)/ci.toml"
|
||||
endif
|
||||
|
||||
# CI toolchain
|
||||
|
||||
97
mk/config.mk
97
mk/config.mk
@ -5,7 +5,7 @@
|
||||
HOST_ARCH?=$(shell uname -m)
|
||||
|
||||
# Configuration
|
||||
## Architecture to build Redox for (aarch64, i686, or x86_64). Defaults to a host one
|
||||
## 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?=
|
||||
@ -17,12 +17,18 @@ EXPERIMENTAL_PREFIX_USE_UPSTREAM_RUST_COMPILER?=0
|
||||
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),)
|
||||
FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml
|
||||
@ -31,11 +37,15 @@ 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 $(HOST_CARGO) run --release --manifest-path installer/Cargo.toml -- --filesystem-size -c $(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)
|
||||
@ -44,22 +54,24 @@ CONTAINERFILE?=podman/redox-base-containerfile
|
||||
|
||||
# Per host variables
|
||||
export NPROC=nproc
|
||||
export REDOX_MAKE=make
|
||||
|
||||
ifneq ($(PODMAN_BUILD),1)
|
||||
FSTOOLS_IN_PODMAN=0
|
||||
HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")
|
||||
# x86_64 linux hosts have all toolchains
|
||||
ifneq ($(HOST_TARGET),x86_64-unknown-linux-gnu)
|
||||
ifeq ($(ARCH),aarch64)
|
||||
# aarch64 linux hosts have aarch64 toolchain
|
||||
ifneq ($(HOST_TARGET),aarch64-unknown-linux-gnu)
|
||||
$(info The $(ARCH) binary prefix is only built for x86_64 and aarch64 Linux hosts)
|
||||
$(info The $(ARCH) binary prefix is only built for x86_64 and aarch64 Linux hosts)
|
||||
PREFIX_BINARY=0
|
||||
endif
|
||||
else
|
||||
$(info The $(ARCH) binary prefix is only built for x86_64 Linux hosts)
|
||||
$(info The $(ARCH) binary prefix is only built for x86_64 Linux hosts)
|
||||
PREFIX_BINARY=0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SCCACHE_BUILD),1)
|
||||
ifeq (,$(shell command -v sccache))
|
||||
@ -68,15 +80,14 @@ ifeq (,$(shell command -v sccache))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(REPO_APPSTREAM),1)
|
||||
export COOKBOOK_APPSTREAM=true
|
||||
endif
|
||||
ifeq ($(REPO_NONSTOP),1)
|
||||
REPO_NONSTOP=--nonstop
|
||||
else ifeq ($(REPO_NONSTOP),0)
|
||||
REPO_NONSTOP=
|
||||
export COOKBOOK_NONSTOP=true
|
||||
endif
|
||||
ifeq ($(REPO_OFFLINE),1)
|
||||
REPO_OFFLINE=--offline
|
||||
else ifeq ($(REPO_OFFLINE),0)
|
||||
REPO_OFFLINE=
|
||||
export COOKBOOK_OFFLINE=true
|
||||
endif
|
||||
ifeq ($(REPO_DEBUG),1)
|
||||
export COOKBOOK_NOSTRIP=true
|
||||
@ -94,7 +105,6 @@ ifeq ($(UNAME),Darwin)
|
||||
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
|
||||
else ifeq ($(UNAME),FreeBSD)
|
||||
FUMOUNT=sudo umount
|
||||
export REDOX_MAKE=gmake
|
||||
VB_AUDIO=pulse # To check, will probably be OSS on most setups
|
||||
VBM=VBoxManage
|
||||
else
|
||||
@ -112,59 +122,54 @@ endif
|
||||
# Automatic variables
|
||||
ROOT=$(CURDIR)
|
||||
export RUST_COMPILER_RT_ROOT=$(ROOT)/rust/src/llvm-project/compiler-rt
|
||||
export TESTBIN?=
|
||||
RUNNING_IN_PODMAN=$(shell [ -f /run/.containerenv ] && echo 1 || echo 0)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifeq ($(RUNNING_IN_PODMAN),1)
|
||||
$(info Please unset PODMAN_BUILD=1 in .config!)
|
||||
endif
|
||||
endif
|
||||
|
||||
ALLOW_FSTOOLS?=0
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),0)
|
||||
ifeq ($(RUNNING_IN_PODMAN),0)
|
||||
ALLOW_FSTOOLS=1
|
||||
endif
|
||||
endif
|
||||
|
||||
## Userspace variables
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
ifeq ($(ARCH),riscv64gc)
|
||||
export TARGET=riscv64gc-unknown-redox
|
||||
export GNU_TARGET=riscv64-unknown-redox
|
||||
else
|
||||
export GNU_TARGET=$(TARGET)
|
||||
export TARGET=$(ARCH)-unknown-redox
|
||||
export GNU_TARGET=$(ARCH)-unknown-redox
|
||||
endif
|
||||
BUILD=build/$(ARCH)/$(CONFIG_NAME)
|
||||
MOUNT_DIR=$(BUILD)/filesystem
|
||||
HOST_FSTOOLS=build/fstools
|
||||
INSTALLER=$(HOST_FSTOOLS)/bin/redox_installer
|
||||
INSTALLER_OPTS=
|
||||
LIST_PACKAGES=installer/target/release/list_packages
|
||||
LIST_PACKAGES_OPTS=
|
||||
REDOXFS=$(HOST_FSTOOLS)/bin/redoxfs
|
||||
REDOXFS_MKFS=$(HOST_FSTOOLS)/bin/redoxfs-mkfs
|
||||
ifeq ($(REPO_BINARY),0)
|
||||
INSTALLER_OPTS+=--cookbook=cookbook
|
||||
else
|
||||
INSTALLER_OPTS+=--cookbook=cookbook --repo-binary
|
||||
LIST_PACKAGES_OPTS+=--repo-binary
|
||||
FSTOOLS=build/fstools
|
||||
INSTALLER=$(FSTOOLS)/bin/redox_installer
|
||||
REDOXFS=$(FSTOOLS)/bin/redoxfs
|
||||
REDOXFS_MKFS=$(FSTOOLS)/bin/redoxfs-mkfs
|
||||
INSTALLER_OPTS=--cookbook=.
|
||||
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
|
||||
endif
|
||||
|
||||
REPO_TAG=$(BUILD)/repo.tag
|
||||
FSTOOLS_TAG=build/fstools.tag
|
||||
export BOARD
|
||||
|
||||
## Cross compiler variables
|
||||
AR=$(GNU_TARGET)-gcc-ar
|
||||
AS=$(GNU_TARGET)-as
|
||||
CC=$(GNU_TARGET)-gcc
|
||||
CXX=$(GNU_TARGET)-g++
|
||||
LD=$(GNU_TARGET)-ld
|
||||
NM=$(GNU_TARGET)-gcc-nm
|
||||
OBJCOPY=$(GNU_TARGET)-objcopy
|
||||
OBJDUMP=$(GNU_TARGET)-objdump
|
||||
RANLIB=$(GNU_TARGET)-gcc-ranlib
|
||||
READELF=$(GNU_TARGET)-readelf
|
||||
STRIP=$(GNU_TARGET)-strip
|
||||
|
||||
ifeq ($(SCCACHE_BUILD),1)
|
||||
export CC_WRAPPER:=sccache
|
||||
export RUSTC_WRAPPER:=$(CC_WRAPPER)
|
||||
CC=$(CC_WRAPPER) $(GNU_TARGET)-gcc
|
||||
CXX=$(CC_WRAPPER) $(GNU_TARGET)-g++
|
||||
endif
|
||||
|
||||
## Rust cross compile variables
|
||||
export AR_$(subst -,_,$(TARGET)):=$(AR)
|
||||
export CC_$(subst -,_,$(TARGET)):=$(CC)
|
||||
export CXX_$(subst -,_,$(TARGET)):=$(CXX)
|
||||
|
||||
## If Podman is being used, a container is required
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
CONTAINER_TAG=build/container.tag
|
||||
|
||||
@ -12,6 +12,9 @@ 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
|
||||
@ -24,11 +27,6 @@ ifeq ($(shell which just),)
|
||||
$(error 'just' not found, install from crates.io or from your package manager)
|
||||
endif
|
||||
|
||||
ifneq ($(NIX_SHELL_BUILD),1)
|
||||
CARGO_CONFIG_VERSION=0.1.1
|
||||
ifeq ($(shell env -u RUSTUP_TOOLCHAIN cargo install --list | grep '^cargo-config v$(CARGO_CONFIG_VERSION):$$'),)
|
||||
$(error cargo-config $(CARGO_CONFIG_VERSION) not found, run "cargo install --force --version $(CARGO_CONFIG_VERSION) cargo-config")
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
66
mk/disk.mk
66
mk/disk.mk
@ -1,6 +1,9 @@
|
||||
# Configuration file with the commands configuration of the Redox image
|
||||
|
||||
$(BUILD)/harddrive.img: $(HOST_FSTOOLS) $(REPO_TAG)
|
||||
$(BUILD)/harddrive.img: $(FSTOOLS) $(REPO_TAG)
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p $(BUILD)
|
||||
rm -rf $@ $@.partial
|
||||
-$(FUMOUNT) /tmp/redox_installer || true
|
||||
@ -11,8 +14,12 @@ $(BUILD)/harddrive.img: $(HOST_FSTOOLS) $(REPO_TAG)
|
||||
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
|
||||
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $@.partial
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(BUILD)/redox-live.iso: $(HOST_FSTOOLS) $(REPO_TAG) redox.ipxe
|
||||
$(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
|
||||
@ -24,8 +31,12 @@ $(BUILD)/redox-live.iso: $(HOST_FSTOOLS) $(REPO_TAG) redox.ipxe
|
||||
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) --write-bootloader="$(BUILD)/bootloader-live.efi" --live $@.partial
|
||||
mv $@.partial $@
|
||||
cp redox.ipxe $(BUILD)/redox.ipxe
|
||||
endif
|
||||
|
||||
$(BUILD)/filesystem.img: $(HOST_FSTOOLS) $(REPO_TAG)
|
||||
$(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)
|
||||
@ -45,27 +56,44 @@ $(BUILD)/filesystem.img: $(HOST_FSTOOLS) $(REPO_TAG)
|
||||
-$(FUMOUNT) $(MOUNT_DIR) || true
|
||||
rm -rf $(MOUNT_DIR)
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
mount: $(HOST_FSTOOLS) FORCE
|
||||
mkdir -p $(MOUNT_DIR)
|
||||
mount: $(FSTOOLS) FORCE
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@mkdir -p $(MOUNT_DIR)
|
||||
$(REDOXFS) $(BUILD)/harddrive.img $(MOUNT_DIR)
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
@sleep 2
|
||||
@pgrep redoxfs
|
||||
endif
|
||||
|
||||
mount_extra: $(HOST_FSTOOLS) FORCE
|
||||
mkdir -p $(MOUNT_DIR)
|
||||
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
|
||||
pgrep redoxfs
|
||||
@sleep 2
|
||||
@pgrep redoxfs
|
||||
endif
|
||||
|
||||
mount_live: $(HOST_FSTOOLS) FORCE
|
||||
mkdir -p $(MOUNT_DIR)
|
||||
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
|
||||
pgrep redoxfs
|
||||
@sleep 2
|
||||
@pgrep redoxfs
|
||||
endif
|
||||
|
||||
unmount: FORCE
|
||||
sync
|
||||
-$(FUMOUNT) $(MOUNT_DIR) || true
|
||||
rm -rf $(MOUNT_DIR)
|
||||
-$(FUMOUNT) /tmp/redox_installer || true
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@sync
|
||||
-$(FUMOUNT) $(MOUNT_DIR)
|
||||
@rm -rf $(MOUNT_DIR)
|
||||
@-$(FUMOUNT) /tmp/redox_installer 2>/dev/null || true
|
||||
endif
|
||||
|
||||
@ -1,36 +1,43 @@
|
||||
# Configuration file for redox-installer, Cookbook and RedoxFS FUSE
|
||||
|
||||
fstools: $(FSTOOLS_TAG) $(HOST_FSTOOLS)
|
||||
fstools: $(FSTOOLS_TAG) $(FSTOOLS)
|
||||
|
||||
# These tools run inside Podman if it is used, or on the host if Podman is not used
|
||||
$(FSTOOLS_TAG): cookbook installer $(CONTAINER_TAG)
|
||||
$(FSTOOLS): $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
ifeq ($(FSTOOLS_IN_PODMAN),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
|
||||
$(HOST_CARGO) build --manifest-path cookbook/pkgar/Cargo.toml --release
|
||||
$(HOST_CARGO) build --manifest-path installer/Cargo.toml --bin list_packages --release
|
||||
mkdir -p build
|
||||
touch $@
|
||||
$(MAKE) $@ PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1
|
||||
endif
|
||||
|
||||
## The installer and redoxfs run on the host, even when using Podman build
|
||||
$(HOST_FSTOOLS): installer redoxfs
|
||||
else
|
||||
rm -rf $@ $@.partial
|
||||
mkdir -p $@.partial
|
||||
$(HOST_CARGO) install --root $@.partial --path installer --bin redox_installer
|
||||
$(HOST_CARGO) install --root $@.partial --path redoxfs --bin redoxfs --bin redoxfs-mkfs
|
||||
ln -sr recipes $@.partial/recipes
|
||||
|
||||
# Install cookbook, installer, and redoxfs for host (may be outside of podman container)
|
||||
#TODO: Build and install installer and redoxfs using cookbook?
|
||||
cd $@.partial && \
|
||||
export CARGO_TARGET_DIR=../$@-target && \
|
||||
$(HOST_CARGO) install --root . --path ../.. --locked && \
|
||||
env -u RUSTUP_TOOLCHAIN ./bin/repo fetch installer redoxfs && \
|
||||
$(HOST_CARGO) install --root . --path recipes/core/installer/source && \
|
||||
$(HOST_CARGO) install --root . --path recipes/core/redoxfs/source
|
||||
|
||||
mv $@.partial $@
|
||||
touch $@
|
||||
endif
|
||||
|
||||
fstools_clean: FORCE $(CONTAINER_TAG)
|
||||
$(FSTOOLS_TAG): $(FSTOOLS)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) clean --manifest-path cookbook/Cargo.toml
|
||||
$(HOST_CARGO) clean --manifest-path cookbook/pkgar/Cargo.toml
|
||||
$(HOST_CARGO) clean --manifest-path installer/Cargo.toml
|
||||
$(HOST_CARGO) clean --manifest-path redoxfs/Cargo.toml
|
||||
rm -rf $(HOST_FSTOOLS)
|
||||
rm -f $(FSTOOLS_TAG)
|
||||
$(HOST_CARGO) build --manifest-path Cargo.toml --release --locked
|
||||
touch $@
|
||||
endif
|
||||
|
||||
fstools_clean: FORCE
|
||||
rm -rf target
|
||||
rm -rf $(FSTOOLS)
|
||||
rm -rf $(FSTOOLS)-target
|
||||
rm -f $(FSTOOLS_TAG)
|
||||
|
||||
20
mk/podman.mk
20
mk/podman.mk
@ -17,21 +17,23 @@ 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):/home$(PODMAN_VOLUME_FLAG)
|
||||
PODMAN_ENV?=--env PATH=/home/poduser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
|
||||
PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG)
|
||||
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --userns keep-id --user `id -u` --interactive --tty --env TERM=$(TERM)
|
||||
PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/root$(PODMAN_VOLUME_FLAG)
|
||||
PODMAN_ENV?=--env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
|
||||
PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG) --env PREFIX_BINARY=$(PREFIX_BINARY) \
|
||||
--env CI=$(CI) --env COOKBOOK_MAKE_JOBS=$(COOKBOOK_MAKE_JOBS) --env COOKBOOK_LOGS=$(COOKBOOK_LOGS) --env COOKBOOK_VERBOSE=$(COOKBOOK_VERBOSE) \
|
||||
--env REPO_APPSTREAM=$(REPO_APPSTREAM) --env REPO_BINARY=$(REPO_BINARY) --env REPO_NONSTOP=$(REPO_NONSTOP) --env REPO_OFFLINE=$(REPO_OFFLINE) --env TESTBIN=$(TESTBIN)
|
||||
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --interactive --tty --cap-add SYS_ADMIN --device /dev/fuse --network=host --env TERM=$(TERM)
|
||||
PODMAN_RUN?=podman run $(PODMAN_OPTIONS) $(PODMAN_VOLUMES) $(PODMAN_ENV) $(PODMAN_CONFIG) $(IMAGE_TAG)
|
||||
|
||||
container_shell: build/container.tag
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) --tty $(IMAGE_TAG) bash
|
||||
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) $(IMAGE_TAG) bash
|
||||
else
|
||||
@echo PODMAN_BUILD=$(PODMAN_BUILD), please set it to 1 in mk/config.mk
|
||||
endif
|
||||
|
||||
container_su: FORCE
|
||||
podman exec --user=0 --latest --interactive --tty bash
|
||||
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) --user 0 $(PODMAN_ENV) $(IMAGE_TAG) bash
|
||||
|
||||
container_clean: FORCE
|
||||
rm -f build/container.tag
|
||||
@ -56,12 +58,10 @@ container_kill: FORCE
|
||||
build/container.tag: $(CONTAINERFILE)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
rm -f build/container.tag
|
||||
@echo "If podman_home dir cannot be removed, remove with \"sudo rm\"."
|
||||
-rm -rf $(PODMAN_HOME) || true
|
||||
-podman image rm --force $(IMAGE_TAG) || true
|
||||
mkdir -p $(PODMAN_HOME)
|
||||
@echo "Building Podman image. This may take some time."
|
||||
sed s/_UID_/`id -u`/ $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
|
||||
cat $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
|
||||
@echo "Mapping Podman user space. Please wait."
|
||||
$(PODMAN_RUN) bash -e podman/rustinstall.sh
|
||||
mkdir -p build
|
||||
@ -71,7 +71,7 @@ else
|
||||
@echo PODMAN_BUILD=$(PODMAN_BUILD), container not required.
|
||||
endif
|
||||
|
||||
KERNEL_PATH := cookbook/recipes/core/kernel
|
||||
KERNEL_PATH := recipes/core/kernel
|
||||
KERNEL_PATH_SOURCE := $(ROOT)/$(KERNEL_PATH)/source
|
||||
KERNEL_PATH_TARGET := $(ROOT)/$(KERNEL_PATH)/target/$(TARGET)
|
||||
|
||||
|
||||
60
mk/prefix.mk
60
mk/prefix.mk
@ -4,6 +4,7 @@ PREFIX=prefix/$(TARGET)
|
||||
|
||||
PREFIX_INSTALL=$(PREFIX)/sysroot/
|
||||
PREFIX_PATH=$(ROOT)/$(PREFIX_INSTALL)/bin
|
||||
RELIBC_SOURCE=recipes/core/relibc/source
|
||||
|
||||
GNU_HOST=$(HOST_ARCH)-unknown-linux-gnu
|
||||
BINUTILS_BRANCH=redox-2.43.1
|
||||
@ -30,6 +31,11 @@ endif
|
||||
# so would break non-podman builds (not sure if they are still supported though).
|
||||
prefix: $(PREFIX)/sysroot
|
||||
|
||||
# Update relibc used for compiling and clean all statically linked recipes
|
||||
prefix_clean: | $(FSTOOLS_TAG)
|
||||
rm -rf $(PREFIX)/relibc $(PREFIX)/sysroot
|
||||
$(MAKE) c.base,base-initfs,extrautils,kernel,ion,pkgutils,redoxfs,relibc
|
||||
|
||||
PREFIX_STRIP=\
|
||||
mkdir -p bin libexec "$(GCC_TARGET)/bin" && \
|
||||
find bin libexec "$(GCC_TARGET)/bin" "$(GCC_TARGET)/lib" \
|
||||
@ -37,10 +43,18 @@ PREFIX_STRIP=\
|
||||
-exec strip --strip-unneeded {} ';' \
|
||||
2> /dev/null
|
||||
|
||||
$(PREFIX)/relibc: $(ROOT)/relibc
|
||||
$(RELIBC_SOURCE): | $(FSTOOLS_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
./target/release/repo fetch relibc
|
||||
touch $(RELIBC_SOURCE)
|
||||
endif
|
||||
|
||||
$(PREFIX)/relibc: | $(RELIBC_SOURCE)
|
||||
mkdir -p "$(@D)"
|
||||
rm -rf "$@.partial" "$@"
|
||||
cp -r "$^" "$@.partial"
|
||||
cp -r "$(RELIBC_SOURCE)" "$@.partial"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
@ -72,7 +86,10 @@ $(PREFIX)/relibc-install.tar.gz: $(PREFIX)/relibc-install
|
||||
--directory="$<" \
|
||||
.
|
||||
|
||||
$(PREFIX)/libtool:
|
||||
$(PREFIX)/libtool: | $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
|
||||
@ -87,8 +104,9 @@ $(PREFIX)/libtool:
|
||||
touch "$@.partial"
|
||||
echo $(LIBTOOL_VERSION) > $@.partial/.tarball-version
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/libtool-build: $(PREFIX)/libtool $(PREFIX)/rust-install
|
||||
$(PREFIX)/libtool-build: $(PREFIX)/libtool $(PREFIX)/rust-install $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@ -102,7 +120,7 @@ else
|
||||
--gnulib-srcdir=./gnulib
|
||||
PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
|
||||
cd "$@.partial" && \
|
||||
cp -rp $(abspath $<)/. ./ && \
|
||||
cp -r $(abspath $<)/. ./ && \
|
||||
"$(ROOT)/$</configure" \
|
||||
--target="$(TARGET)" \
|
||||
--prefix=$(abspath $(PREFIX)/sysroot) && \
|
||||
@ -173,23 +191,32 @@ $(PREFIX)/rust-install: $(PREFIX)/gcc-install.tar.gz $(PREFIX)/rustc-install.tar
|
||||
# ---------------------------------------------------
|
||||
else ifeq ($(PREFIX_BINARY),1)
|
||||
|
||||
$(PREFIX)/rust-install.tar.gz:
|
||||
$(PREFIX)/rust-install.tar.gz: | $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p "$(@D)"
|
||||
#TODO: figure out why rust-install.tar.gz is missing /lib/rustlib/$(HOST_TARGET)/lib
|
||||
wget -O $@.partial "https://static.redox-os.org/toolchain/$(HOST_TARGET)/$(TARGET)/relibc-install.tar.gz"
|
||||
mv $@.partial $@
|
||||
endif
|
||||
|
||||
$(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz
|
||||
$(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
# ---------------------------------------------------
|
||||
else
|
||||
|
||||
$(ROOT)/rust/configure:
|
||||
git submodule sync --recursive
|
||||
git submodule update --progress --init --recursive --checkout rust
|
||||
|
||||
PREFIX_FREESTANDING_INSTALL=$(PREFIX)/gcc-freestanding-install
|
||||
@ -202,11 +229,15 @@ $(PREFIX)/binutils-$(BINUTILS_BRANCH).tar.bz2:
|
||||
mv $@.partial $@
|
||||
|
||||
$(PREFIX)/binutils: $(PREFIX)/binutils-$(BINUTILS_BRANCH).tar.bz2
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
rm -rf "$@.partial" "$@"
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/binutils-install: $(PREFIX)/binutils $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
@ -238,11 +269,15 @@ $(PREFIX)/gcc-$(GCC_BRANCH).tar.bz2:
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
$(PREFIX)/gcc: $(PREFIX)/gcc-$(GCC_BRANCH).tar.bz2
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
tar --extract --file "$<" --directory "$@.partial" --no-same-owner --strip-components=1
|
||||
cd "$@.partial" && ./contrib/download_prerequisites
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/gcc-freestanding-install: $(PREFIX)/gcc | $(PREFIX)/binutils-install $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
@ -272,10 +307,10 @@ else
|
||||
mv "$@.partial" "$@"
|
||||
endif
|
||||
|
||||
$(PREFIX)/relibc-freestanding: $(ROOT)/relibc
|
||||
$(PREFIX)/relibc-freestanding: | $(RELIBC_SOURCE)
|
||||
mkdir -p "$(@D)"
|
||||
rm -rf "$@.partial" "$@"
|
||||
cp -r "$^" "$@.partial"
|
||||
cp -r "$(RELIBC_SOURCE)" "$@.partial"
|
||||
touch "$@.partial"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
@ -290,7 +325,6 @@ else
|
||||
export PATH="$(PREFIX_FREESTANDING_PATH):$$PATH" && \
|
||||
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN cargo" && \
|
||||
export CC_$(subst -,_,$(TARGET))="$(GNU_TARGET)-gcc -isystem $(ROOT)/$@.partial/$(GNU_TARGET)/include" && \
|
||||
export RUST_TARGET_PATH="$(ROOT)/targets" && \
|
||||
$(MAKE) clean && \
|
||||
$(MAKE) -j 1 all && \
|
||||
$(MAKE) -j 1 install DESTDIR="$(ROOT)/$@.partial/$(GNU_TARGET)"
|
||||
|
||||
16
mk/qemu.mk
16
mk/qemu.mk
@ -3,9 +3,10 @@
|
||||
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(QEMU_ARCH)
|
||||
QEMUFLAGS=-d guest_errors -name "Redox OS $(ARCH)"
|
||||
netboot?=no
|
||||
redoxer?=no
|
||||
VGA_SUPPORTED=no
|
||||
|
||||
ifeq ($(ARCH),i686)
|
||||
ifeq ($(ARCH),i586)
|
||||
audio?=ac97
|
||||
gpu?=vga
|
||||
uefi=no
|
||||
@ -16,7 +17,7 @@ ifeq ($(ARCH),i686)
|
||||
QEMU_SMP?=1
|
||||
QEMU_MEM?=1024
|
||||
|
||||
# Default to using kvm when arch is i686 and host is x86_64
|
||||
# Default to using kvm when arch is i586 and host is x86_64
|
||||
ifeq ($(HOST_ARCH),x86_64)
|
||||
kvm?=yes
|
||||
endif
|
||||
@ -162,6 +163,17 @@ else
|
||||
QEMUFLAGS+=-serial chardev:debug -mon chardev=debug
|
||||
endif
|
||||
|
||||
# redoxer exit code: 51 => success, 53 => failure
|
||||
ifeq ($(redoxer),yes)
|
||||
ifeq ($(ARCH),x86_64)
|
||||
QEMUFLAGS+=-device isa-debug-exit
|
||||
else ifeq ($(ARCH),i586)
|
||||
QEMUFLAGS+=-device isa-debug-exit
|
||||
else ifeq ($(ARCH),aarch64)
|
||||
QEMUFLAGS+=-semihosting-config enable=on,target=native,userspace=on
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(iommu),yes)
|
||||
QEMUFLAGS+=-machine $(QEMU_MACHINE),iommu=on
|
||||
else
|
||||
|
||||
188
mk/repo.mk
188
mk/repo.mk
@ -1,75 +1,60 @@
|
||||
# Configuration file for recipe commands
|
||||
|
||||
$(BUILD)/fetch.tag: prefix $(FSTOOLS_TAG) $(FILESYSTEM_CONFIG) $(CONTAINER_TAG)
|
||||
$(REPO_TAG): prefix $(FILESYSTEM_CONFIG) | $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) --short -c $(FILESYSTEM_CONFIG))" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
cd cookbook && \
|
||||
./fetch.sh $(REPO_NONSTOP) $(REPO_OFFLINE) "$${PACKAGES}"
|
||||
./target/release/repo cook $(COOKBOOK_OPTS) --with-package-deps
|
||||
mkdir -p $(BUILD)
|
||||
touch $@
|
||||
endif
|
||||
|
||||
$(REPO_TAG): $(BUILD)/fetch.tag $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) --short -c $(FILESYSTEM_CONFIG))" && \
|
||||
cd cookbook && \
|
||||
./repo.sh $(REPO_NONSTOP) $(REPO_OFFLINE) --with-package-deps "$${PACKAGES}"
|
||||
mkdir -p $(BUILD)
|
||||
# make sure fstools.tag and fetch.tag are newer than the things repo modifies
|
||||
touch $(FSTOOLS_TAG)
|
||||
touch $(BUILD)/fetch.tag
|
||||
touch $@
|
||||
endif
|
||||
|
||||
# Find recipe
|
||||
find.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
cd cookbook && \
|
||||
target/release/find_recipe $*
|
||||
endif
|
||||
|
||||
comma := ,
|
||||
|
||||
# Invoke clean.sh for one or more targets separated by comma
|
||||
# List all recipes in a tree fashion specified by the filesystem config
|
||||
tree: $(FSTOOLS_TAG) $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@./target/release/repo tree $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# Fetch all recipes source or binary from filesystem config
|
||||
fetch: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
./target/release/repo fetch $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# Find recipe for one or more targets separated by comma
|
||||
find.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@./target/release/repo find $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Invoke clean for one or more targets separated by comma
|
||||
c.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@if echo "$*" | grep -q ','; then \
|
||||
$(MAKE) $(foreach f,$(subst $(comma), ,$*),c.$(f)); \
|
||||
else \
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
cd cookbook && \
|
||||
./clean.sh $*; \
|
||||
fi
|
||||
./target/release/repo clean $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Invoke fetch.sh for one or more targets separated by comma
|
||||
# Invoke fetch for one or more targets separated by comma
|
||||
f.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@if echo "$*" | grep -q ','; then \
|
||||
$(MAKE) $(foreach f,$(subst $(comma), ,$*),f.$(f)); \
|
||||
else \
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
cd cookbook && \
|
||||
./fetch.sh $*; \
|
||||
fi
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
./target/release/repo fetch $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
# Invoke repo.sh for one or more targets separated by comma
|
||||
@ -77,14 +62,9 @@ r.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@if echo "$*" | grep -q ','; then \
|
||||
$(MAKE) $(foreach f,$(subst $(comma), ,$*),r.$(f)); \
|
||||
else \
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
cd cookbook && \
|
||||
./repo.sh $*; \
|
||||
fi
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
./target/release/repo cook $(foreach f,$(subst $(comma), ,$*),$(f)) $(COOKBOOK_OPTS)
|
||||
endif
|
||||
|
||||
MOUNTED_TAG=$(MOUNT_DIR)~
|
||||
@ -92,45 +72,59 @@ 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
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@if echo "$*" | grep -q ','; then \
|
||||
$(MAKE) $(foreach f,$(subst $(comma), ,$*),p.$(f)); \
|
||||
else \
|
||||
export RECIPE_PATH=cookbook/$(shell make find.$* | grep ^recipes) && \
|
||||
export RECIPE_STAGE=$$RECIPE_PATH/target/$(TARGET)/stage.pkgar && \
|
||||
./cookbook/pkgar/target/release/pkgar extract $(MOUNT_DIR)/ --archive $$RECIPE_STAGE \
|
||||
--pkey ./cookbook/build/id_ed25519.pub.toml && \
|
||||
echo "extracted $$RECIPE_PATH"; \
|
||||
fi
|
||||
endif
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@ ALLOW_FSTOOLS=$(FSTOOLS_IN_PODMAN)
|
||||
else
|
||||
./target/release/repo push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=$(MOUNT_DIR)"
|
||||
endif
|
||||
ifeq ($(ALLOW_FSTOOLS),1)
|
||||
@if [ -f $(MOUNTED_TAG) ]; then \
|
||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG) && echo "Filesystem unmounted"; \
|
||||
else echo "Not unmounting by ourself, don't forget to do it"; \
|
||||
fi
|
||||
endif
|
||||
|
||||
# Invoke unfetch.sh for one or more targets separated by comma
|
||||
# Push compiled package with their package dependencies
|
||||
pp.%: $(FSTOOLS_TAG) FORCE
|
||||
$(MAKE) p.$*,--with-package-deps
|
||||
|
||||
# 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
|
||||
./target/release/repo push $(COOKBOOK_OPTS) --with-package-deps "--sysroot=$(MOUNT_DIR)"
|
||||
endif
|
||||
ifeq ($(ALLOW_FSTOOLS),1)
|
||||
@if [ -f $(MOUNTED_TAG) ]; then \
|
||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG) && echo "Filesystem unmounted"; \
|
||||
else echo "Not unmounting by ourself, don't forget to do it"; \
|
||||
fi
|
||||
endif
|
||||
|
||||
# Invoke unfetch for one or more targets separated by comma
|
||||
u.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
@if echo "$*" | grep -q ','; then \
|
||||
$(MAKE) $(foreach f,$(subst $(comma), ,$*),u.$(f)); \
|
||||
else \
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \
|
||||
cd cookbook && \
|
||||
./unfetch.sh $*; \
|
||||
fi
|
||||
./target/release/repo unfetch $(foreach f,$(subst $(comma), ,$*),$(f))
|
||||
endif
|
||||
|
||||
# Invoke clean.sh, and repo.sh for one of more targets separated by comma
|
||||
# Invoke clean, and repo.sh for one of more targets separated by comma
|
||||
cr.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
@ -139,7 +133,7 @@ else
|
||||
$(MAKE) r.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch.sh, clean.sh, and repo.sh for one or more targets separated by comma
|
||||
# Invoke unfetch, clean, and repo.sh for one or more targets separated by comma
|
||||
ucr.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
@ -148,7 +142,7 @@ else
|
||||
$(MAKE) cr.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch.sh and clean.sh for one or more targets separated by comma
|
||||
# Invoke unfetch and clean for one or more targets separated by comma
|
||||
uc.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
@ -157,7 +151,7 @@ else
|
||||
$(MAKE) c.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch, clean.sh and fetch.sh for one or more targets separated by comma
|
||||
# Invoke unfetch, clean and fetch for one or more targets separated by comma
|
||||
ucf.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
@ -167,34 +161,20 @@ else
|
||||
endif
|
||||
|
||||
# Invoke repo.sh 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
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) r.$*
|
||||
$(MAKE) p.$*
|
||||
endif
|
||||
|
||||
# Invoke clean.sh, repo.sh and push for one of more targets separated by comma
|
||||
# Invoke clean, repo.sh and push for one of more targets separated by comma
|
||||
crp.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) c.$*
|
||||
$(MAKE) r.$*
|
||||
$(MAKE) cr.$*
|
||||
$(MAKE) p.$*
|
||||
endif
|
||||
|
||||
# Invoke unfetch.sh. clean.sh, repo.sh and push for one of more targets separated by comma
|
||||
# Invoke unfetch. clean, repo.sh and push for one of more targets separated by comma
|
||||
ucrp.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(MAKE) u.$*
|
||||
$(MAKE) c.$*
|
||||
$(MAKE) r.$*
|
||||
$(MAKE) ucr.$*
|
||||
$(MAKE) p.$*
|
||||
endif
|
||||
|
||||
export DEBUG_BIN?=
|
||||
|
||||
@ -204,7 +184,7 @@ export DEBUG_BIN?=
|
||||
# Experimental, may not work if ARCH is different with what host is running
|
||||
debug.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
@cd cookbook/$(shell make find.$* | grep ^recipes) && \
|
||||
@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 ) && \
|
||||
@ -217,7 +197,7 @@ ifeq ($(PODMAN_BUILD),1)
|
||||
-ex 'add-symbol-file /binary' \
|
||||
-ex 'target remote host.containers.internal:1234'"
|
||||
else
|
||||
@cd cookbook/$(shell make find.$* | grep ^recipes) && \
|
||||
@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 ) && \
|
||||
|
||||
@ -70,8 +70,6 @@ install_freebsd_pkg()
|
||||
##############################################################################
|
||||
osx()
|
||||
{
|
||||
echo "Detected macOS!"
|
||||
|
||||
if [ ! -z "$(which brew)" ]; then
|
||||
osx_homebrew $@
|
||||
elif [ ! -z "$(which port)" ]; then
|
||||
@ -364,7 +362,7 @@ archLinux()
|
||||
gdb"
|
||||
|
||||
if [ "$1" == "qemu" ]; then
|
||||
packages="$packages qemu"
|
||||
packages="$packages qemu-system-x86 qemu-system-arm qemu-system-riscv"
|
||||
elif [ "$1" == "virtualbox" ]; then
|
||||
packages="$packages virtualbox"
|
||||
else
|
||||
@ -495,7 +493,8 @@ ubuntu()
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo $install_command qemu-system-x86 qemu-kvm
|
||||
sudo $install_command qemu-efi-arm qemu-system-arm
|
||||
sudo $install_command qemu-system-arm qemu-efi-aarch64
|
||||
sudo $install_command qemu-system-riscv
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
@ -545,6 +544,8 @@ fedora()
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo $dnf_install qemu-system-x86 qemu-kvm
|
||||
sudo $dnf_install qemu-system-arm edk2-aarch64
|
||||
sudo $dnf_install qemu-system-riscv
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
@ -1013,7 +1014,7 @@ statusCheck()
|
||||
boot()
|
||||
{
|
||||
echo "Cloning gitlab repo..."
|
||||
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
|
||||
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream
|
||||
echo "Creating .config with PODMAN_BUILD=0"
|
||||
echo 'PODMAN_BUILD?=0' > redox/.config
|
||||
echo "Cleaning up..."
|
||||
@ -1046,7 +1047,6 @@ if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
|
||||
usage
|
||||
elif [ "$1" == "-u" ]; then
|
||||
git pull upstream master
|
||||
git submodule update --recursive --init
|
||||
exit
|
||||
elif [ "$1" == "-s" ]; then
|
||||
statusCheck
|
||||
@ -1076,14 +1076,22 @@ done
|
||||
|
||||
banner
|
||||
|
||||
rustInstall "$noninteractive"
|
||||
if [ "Darwin" == "$(uname -s)" ]; then
|
||||
echo "Detected macOS!"
|
||||
|
||||
echo "WARNING: Building Redox OS on MacOS is not recommended, please use podman_bootstrap.sh instead."
|
||||
echo "WARNING: Our toolchain is not designed to work on MacOS and it relies on FUSE which requires kernel extensions."
|
||||
echo "WARNING: If you want to continue anyway, please wait for 3 seconds or cancel this script now!"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
if [ "$update" == "true" ]; then
|
||||
git pull upstream master
|
||||
git submodule update --recursive --init
|
||||
exit
|
||||
fi
|
||||
|
||||
rustInstall "$noninteractive"
|
||||
|
||||
if [ "Darwin" == "$(uname -s)" ]; then
|
||||
osx "$emulator"
|
||||
else
|
||||
@ -1116,7 +1124,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
cargoInstall cargo-config 0.1.1
|
||||
cargoInstall just 1.42.4
|
||||
cargoInstall cbindgen 0.29.0
|
||||
|
||||
|
||||
@ -2,12 +2,7 @@
|
||||
|
||||
FROM docker.io/library/debian:trixie
|
||||
|
||||
# _UID_ must be replaced with the user's uid on host
|
||||
# podman root is mapped to your user id on host during build,
|
||||
# poduser is mapped to your user id during podman run
|
||||
RUN useradd --create-home --no-log-init --uid _UID_ poduser \
|
||||
&& chown -R root:root /home \
|
||||
&& apt-get update \
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ant \
|
||||
appstream \
|
||||
@ -19,7 +14,6 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
|
||||
bison \
|
||||
bsdextrautils \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
curl \
|
||||
dos2unix \
|
||||
@ -32,10 +26,16 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
|
||||
genisoimage \
|
||||
git \
|
||||
git-lfs \
|
||||
gobject-introspection \
|
||||
gperf \
|
||||
gtk-doc-tools \
|
||||
gtk-update-icon-cache \
|
||||
help2man \
|
||||
ipxe-qemu \
|
||||
intltool \
|
||||
itstool \
|
||||
libaudiofile-dev \
|
||||
libdbus-glib-1-dev-bin \
|
||||
libexpat-dev \
|
||||
libfontconfig1-dev \
|
||||
libfuse3-dev \
|
||||
@ -47,14 +47,15 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
|
||||
libmpfr-dev \
|
||||
libparse-yapp-perl \
|
||||
libpng-dev \
|
||||
librsvg2-common \
|
||||
libsdl1.2-dev \
|
||||
libsdl2-ttf-dev \
|
||||
llvm \
|
||||
lua5.4 \
|
||||
libxml2-utils \
|
||||
lzip \
|
||||
m4 \
|
||||
make \
|
||||
meson \
|
||||
nano \
|
||||
nasm \
|
||||
ninja-build \
|
||||
patch \
|
||||
@ -63,6 +64,9 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
|
||||
pkg-config \
|
||||
po4a \
|
||||
protobuf-compiler \
|
||||
qemu-system-x86 \
|
||||
qemu-system-arm \
|
||||
qemu-efi-aarch64 \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-mako \
|
||||
|
||||
@ -3,10 +3,19 @@
|
||||
# This script install the Rust toolchain and the build system dependencies
|
||||
# in Podman after the image has been built
|
||||
|
||||
echo Installing rust...
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --profile minimal
|
||||
|
||||
curl -sSLf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
cargo +stable binstall --no-confirm --force --version 0.10.0 sccache
|
||||
cargo +stable binstall --no-confirm --force --version 1.42.4 just
|
||||
cargo +stable binstall --no-confirm --force --version 0.29.0 cbindgen
|
||||
cargo +stable install --force --version 0.1.1 cargo-config # TODO: Remove
|
||||
echo Downloading sccache...
|
||||
SCCACHE_URL=https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-$(uname -m)-unknown-linux-musl.tar.gz
|
||||
wget -qO- --show-progress $SCCACHE_URL | tar -xz -C ~/.cargo/bin --strip-components=1 --wildcards '*/sccache'
|
||||
|
||||
echo Downloading just...
|
||||
JUST_URL=https://github.com/casey/just/releases/download/1.45.0/just-1.45.0-$(uname -m)-unknown-linux-musl.tar.gz
|
||||
wget -qO- --show-progress $JUST_URL | tar -xz -C ~/.cargo/bin --wildcards 'just'
|
||||
|
||||
echo Downloading cbindgen...
|
||||
CBINDGEN_NAME=$( [[ $(uname -m) = "x86_64" ]] && echo "ubuntu22.04" || echo "ubuntu22.04-aarch64" )
|
||||
CBINDGEN_URL=https://github.com/mozilla/cbindgen/releases/download/0.29.0/cbindgen-$CBINDGEN_NAME
|
||||
wget -qO- --show-progress $CBINDGEN_URL > ~/.cargo/bin/cbindgen
|
||||
chmod +x ~/.cargo/bin/cbindgen
|
||||
|
||||
85
podman_bootstrap.sh
Normal file → Executable file
85
podman_bootstrap.sh
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script setup the Redox build system with Podman
|
||||
# It install the Podman dependencies, Rustup, recipes dependencies for cross-compilation
|
||||
# It install the Podman dependencies for cross-compilation
|
||||
# and download the build system configuration files
|
||||
|
||||
set -e
|
||||
@ -100,7 +100,6 @@ osx_macports()
|
||||
install_macports_pkg "git"
|
||||
install_macports_pkg "gmake"
|
||||
install_macports_pkg "curl"
|
||||
install_macports_pkg "osxfuse"
|
||||
install_macports_pkg "podman"
|
||||
install_macports_pkg "gdb +multiarch"
|
||||
|
||||
@ -129,9 +128,6 @@ osx_homebrew()
|
||||
install_brew_pkg "git"
|
||||
install_brew_pkg "make"
|
||||
install_brew_pkg "curl"
|
||||
install_brew_pkg "osxfuse"
|
||||
install_brew_pkg "fuse-overlayfs"
|
||||
install_brew_pkg "slirp4netns"
|
||||
install_brew_pkg "podman"
|
||||
install_brew_pkg "gdb"
|
||||
|
||||
@ -159,7 +155,6 @@ freebsd()
|
||||
install_freebsd_pkg "git"
|
||||
install_freebsd_pkg "gmake"
|
||||
install_freebsd_pkg "curl"
|
||||
install_freebsd_pkg "fusefs-libs3"
|
||||
install_freebsd_pkg "podman"
|
||||
install_freebsd_pkg "gdb"
|
||||
|
||||
@ -185,7 +180,7 @@ archLinux()
|
||||
echo "Detected Arch Linux"
|
||||
packages="git make curl fuse3 fuse-overlayfs slirp4netns podman gdb"
|
||||
if [ "$1" == "qemu" ]; then
|
||||
packages="$packages qemu"
|
||||
packages="$packages qemu-system-x86 qemu-system-arm qemu-system-riscv"
|
||||
elif [ "$1" == "virtualbox" ]; then
|
||||
packages="$packages virtualbox"
|
||||
else
|
||||
@ -221,7 +216,8 @@ ubuntu()
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo "$2" install qemu-system-x86 qemu-kvm
|
||||
sudo "$2" install qemu-efi-arm qemu-system-arm
|
||||
sudo "$2" install qemu-system-arm qemu-efi-aarch64
|
||||
sudo "$2" install qemu-system-riscv
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
@ -262,7 +258,8 @@ fedora()
|
||||
if [ "$1" == "qemu" ]; then
|
||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||
echo "Installing QEMU..."
|
||||
sudo dnf install qemu-system-x86 qemu-kvm
|
||||
sudo dnf install qemu-system-x86 qemu-system-arm \
|
||||
qemu-system-riscv qemu-kvm edk2-aarch64
|
||||
else
|
||||
echo "QEMU already installed!"
|
||||
fi
|
||||
@ -486,7 +483,6 @@ usage()
|
||||
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"
|
||||
@ -497,18 +493,6 @@ usage()
|
||||
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
|
||||
@ -569,39 +553,6 @@ rustInstall()
|
||||
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 dependent packages
|
||||
@ -609,31 +560,32 @@ statusCheck()
|
||||
boot()
|
||||
{
|
||||
echo "Cloning gitlab repo..."
|
||||
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
|
||||
git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream
|
||||
echo "Creating .config with PODMAN_BUILD=1"
|
||||
echo 'PODMAN_BUILD?=1' > redox/.config
|
||||
if [[ "$(uname -m)" == "arm64" ]]; then
|
||||
echo "Appending .config with ARCH=aarch64"
|
||||
echo 'ARCH=aarch64' >> redox/.config
|
||||
fi
|
||||
echo "Cleaning up..."
|
||||
rm podman_bootstrap.sh
|
||||
echo
|
||||
echo "---------------------------------------"
|
||||
echo "Well it looks like you are ready to go!"
|
||||
echo "---------------------------------------"
|
||||
statusCheck
|
||||
echo "The file redox/.config was created with PODMAN_BUILD=1."
|
||||
echo "If you need a much quicker installation, run: "
|
||||
echo " echo REPO_BINARY=1 >> redox/.config"
|
||||
echo
|
||||
echo "** Be sure to update your path to include Rust - run the following command: **"
|
||||
echo 'source $HOME/.cargo/env'
|
||||
echo
|
||||
echo "Run the following commands to build redox using Podman:"
|
||||
echo "Run the following commands to build Redox using Podman:"
|
||||
echo
|
||||
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 "$MAKE $emulator"
|
||||
echo
|
||||
echo " Good luck!"
|
||||
|
||||
@ -644,11 +596,6 @@ 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
|
||||
|
||||
@ -664,7 +611,6 @@ do
|
||||
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 1;;
|
||||
esac
|
||||
done
|
||||
@ -675,7 +621,6 @@ rustInstall "$noninteractive"
|
||||
|
||||
if [ "$update" == "true" ]; then
|
||||
git pull upstream master
|
||||
git submodule update --recursive --init
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
15
recipes/archives/lz4/recipe.toml
Normal file
15
recipes/archives/lz4/recipe.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[source]
|
||||
tar = "https://github.com/lz4/lz4/releases/download/v1.10.0/lz4-1.10.0.tar.gz"
|
||||
blake3 = "3e69fd475e7852e17594985528b5232afeba7d3d56cfebe2e89071768b2ab36a"
|
||||
patches = ["redox.patch"]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
export CPPFLAGS="${CPPFLAGS} -D_REDOX"
|
||||
|
||||
${COOKBOOK_MAKE} prefix="/usr"
|
||||
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
|
||||
"""
|
||||
34
recipes/archives/lz4/redox.patch
Normal file
34
recipes/archives/lz4/redox.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff '--color=auto' -ruwN source/programs/util.h source-new/programs/util.h
|
||||
--- source/programs/util.h 2024-07-21 13:29:49.000000000 -0400
|
||||
+++ source-new/programs/util.h 2024-12-13 02:21:03.032769559 -0500
|
||||
@@ -52,6 +52,9 @@
|
||||
#include <time.h> /* time */
|
||||
#include <limits.h> /* INT_MAX */
|
||||
#include <errno.h>
|
||||
+#if defined(_REDOX)
|
||||
+# include <sys/time.h> /* utimes */
|
||||
+#endif
|
||||
|
||||
|
||||
|
||||
@@ -239,12 +242,20 @@
|
||||
timebuf.modtime = statbuf->st_mtime;
|
||||
res += utime(filename, &timebuf); /* set access and modification times */
|
||||
#else
|
||||
+ #if defined(_REDOX)
|
||||
+ struct timeval timebuf[2];
|
||||
+ memset(timebuf, 0, sizeof(timebuf));
|
||||
+ timebuf[0].tv_usec = UTIME_NOW;
|
||||
+ timebuf[1].tv_sec = statbuf->st_mtime;
|
||||
+ res += utimes(filename, timebuf);
|
||||
+ #else
|
||||
struct timespec timebuf[2];
|
||||
memset(timebuf, 0, sizeof(timebuf));
|
||||
timebuf[0].tv_nsec = UTIME_NOW;
|
||||
timebuf[1].tv_sec = statbuf->st_mtime;
|
||||
res += utimensat(AT_FDCWD, filename, timebuf, 0); /* set access and modification times */
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if !defined(_WIN32)
|
||||
15
recipes/archives/zstd/01_redox.patch
Normal file
15
recipes/archives/zstd/01_redox.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -ruwN source/programs/platform.h source-new/programs/platform.h
|
||||
--- source/programs/platform.h 2025-02-19 07:04:24.000000000 +0700
|
||||
+++ source-new/programs/platform.h 2025-07-21 22:52:07.716447723 +0700
|
||||
@@ -109,6 +109,11 @@
|
||||
#endif /* PLATFORM_POSIX_VERSION */
|
||||
|
||||
|
||||
+#if defined(__redox__)
|
||||
+/* TODO: AT_FDCWD && utimensat must be defined to conform _POSIX_VERSION */
|
||||
+# define PLATFORM_POSIX_VERSION 1
|
||||
+#endif
|
||||
+
|
||||
#if PLATFORM_POSIX_VERSION > 1
|
||||
/* glibc < 2.26 may not expose struct timespec def without this.
|
||||
* See issue #1920. */
|
||||
13
recipes/archives/zstd/recipe.toml
Normal file
13
recipes/archives/zstd/recipe.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[source]
|
||||
tar = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
|
||||
patches = [
|
||||
"01_redox.patch"
|
||||
]
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
${COOKBOOK_MAKE}
|
||||
${COOKBOOK_MAKE} install DESTDIR="${COOKBOOK_STAGE}" prefix="/usr"
|
||||
"""
|
||||
8
recipes/artwork/pop-wallpapers/recipe.toml
Normal file
8
recipes/artwork/pop-wallpapers/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
[source]
|
||||
git = "https://github.com/pop-os/wallpapers"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}"/usr/share/wallpapers
|
||||
cp -rv "${COOKBOOK_SOURCE}"/original/* "${COOKBOOK_STAGE}"/usr/share/wallpapers
|
||||
"""
|
||||
9
recipes/artwork/ubuntu-wallpapers/recipe.toml
Normal file
9
recipes/artwork/ubuntu-wallpapers/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[source]
|
||||
tar = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ubuntu-wallpapers/23.10.4/ubuntu-wallpapers_23.10.4.orig.tar.gz"
|
||||
blake3 = "1e479d0aa48fe3f2961a2dac28c3ed397a29616cf6e7d73f5ceb6fabfd6449e1"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}"/usr/share/wallpapers
|
||||
cp -rv "${COOKBOOK_SOURCE}"/ubuntu-wallpapers-23.10.4/*.{jpg,png} "${COOKBOOK_STAGE}"/usr/share/wallpapers
|
||||
"""
|
||||
127
recipes/core/base-initfs/recipe.toml
Normal file
127
recipes/core/base-initfs/recipe.toml
Normal file
@ -0,0 +1,127 @@
|
||||
[source]
|
||||
same_as = "../base"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"redoxfs",
|
||||
]
|
||||
script = """
|
||||
BINS=(
|
||||
init
|
||||
logd
|
||||
ramfs
|
||||
randd
|
||||
zerod
|
||||
|
||||
acpid
|
||||
fbbootlogd
|
||||
fbcond
|
||||
hwd
|
||||
inputd
|
||||
lived
|
||||
nvmed
|
||||
pcid
|
||||
pcid-spawner
|
||||
rtcd
|
||||
vesad
|
||||
)
|
||||
|
||||
virt_bins()
|
||||
{
|
||||
BINS+=(virtio-blkd virtio-gpud)
|
||||
}
|
||||
|
||||
x86_common_bins()
|
||||
{
|
||||
BINS+=(ahcid ided ps2d vesad)
|
||||
virt_bins
|
||||
}
|
||||
|
||||
aarch64_bins()
|
||||
{
|
||||
case "${BOARD}" in
|
||||
raspi3b*)
|
||||
BINS+=(bcm2835-sdhcid)
|
||||
;;
|
||||
*)
|
||||
#qemu-virt
|
||||
virt_bins
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case "${TARGET}" in
|
||||
i586-unknown-redox | i686-unknown-redox)
|
||||
x86_common_bins
|
||||
;;
|
||||
x86_64-unknown-redox)
|
||||
x86_common_bins
|
||||
;;
|
||||
aarch64-unknown-redox)
|
||||
aarch64_bins
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -rf "${COOKBOOK_BUILD}/initfs"
|
||||
mkdir -p "${COOKBOOK_BUILD}/initfs/etc"
|
||||
|
||||
cp "${COOKBOOK_SOURCE}/init.rc" "${COOKBOOK_BUILD}/initfs/etc/init.rc"
|
||||
cp "${COOKBOOK_SOURCE}/init_drivers.rc" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
|
||||
if [ -e ${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc.${BOARD} ]; then
|
||||
cp "${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc.${BOARD}" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
|
||||
elif [ -e ${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc ]; then
|
||||
cp "${COOKBOOK_SOURCE}/${TARGET}/init_drivers.rc" "${COOKBOOK_BUILD}/initfs/etc/init_drivers.rc"
|
||||
fi
|
||||
|
||||
mkdir -pv "${COOKBOOK_BUILD}/initfs/etc/pcid"
|
||||
cp -v "${COOKBOOK_SOURCE}/drivers/initfs.toml" "${COOKBOOK_BUILD}/initfs/etc/pcid/initfs.toml"
|
||||
|
||||
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
|
||||
export CARGO_PROFILE_RELEASE_PANIC=abort
|
||||
"${COOKBOOK_CARGO}" build ${build_flags} \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
$(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done)
|
||||
|
||||
mkdir -pv "${COOKBOOK_BUILD}/initfs/bin" "${COOKBOOK_BUILD}/initfs/lib/drivers"
|
||||
for bin in "${BINS[@]}"
|
||||
do
|
||||
case "${bin}" in
|
||||
init | logd | ramfs | randd | zerod | pcid | pcid-spawner | fbbootlogd | fbcond | inputd | vesad | lived | ps2d | acpid | bcm2835-sdhcid | rtcd | hwd)
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_BUILD}/initfs/bin"
|
||||
;;
|
||||
*)
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_BUILD}/initfs/lib/drivers"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# TODO: symlinks aren't supported by redox-initfs
|
||||
#ln -sv zerod "${COOKBOOK_BUILD}/initfs/bin/nulld"
|
||||
|
||||
cp "${COOKBOOK_BUILD}/initfs/bin/zerod" "${COOKBOOK_BUILD}/initfs/bin/nulld"
|
||||
|
||||
cp "${COOKBOOK_SYSROOT}/usr/bin/redoxfs" "${COOKBOOK_BUILD}/initfs/bin"
|
||||
|
||||
ARCH="$(echo "${GNU_TARGET}" | cut -d - -f1)"
|
||||
RUSTFLAGS="$RUSTFLAGS -Ctarget-feature=+crt-static" cargo \
|
||||
-Zbuild-std=core,alloc,compiler_builtins \
|
||||
-Zbuild-std-features=compiler-builtins-mem build \
|
||||
--target "${TARGET}" \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/bootstrap/Cargo.toml" \
|
||||
--release \
|
||||
--target-dir "${COOKBOOK_BUILD}"
|
||||
"${GNU_TARGET}-ld" \
|
||||
-o "${COOKBOOK_BUILD}/bootstrap" \
|
||||
--gc-sections \
|
||||
-T "${COOKBOOK_SOURCE}/bootstrap/src/${ARCH}.ld" \
|
||||
-z max-page-size=4096 \
|
||||
"${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
|
||||
|
||||
env -u CARGO cargo run --manifest-path "${COOKBOOK_SOURCE}/initfs/tools/Cargo.toml" --bin redox-initfs-ar -- "${COOKBOOK_BUILD}/initfs" "${COOKBOOK_BUILD}/bootstrap" -o "${COOKBOOK_BUILD}/initfs.img"
|
||||
|
||||
mkdir -v "${COOKBOOK_STAGE}/boot"
|
||||
cp "${COOKBOOK_BUILD}/initfs.img" "${COOKBOOK_STAGE}/boot/initfs"
|
||||
"""
|
||||
80
recipes/core/base/recipe.toml
Normal file
80
recipes/core/base/recipe.toml
Normal file
@ -0,0 +1,80 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/base.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
for package in audiod ipcd ptyd; do
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/${package}/Cargo.toml" \
|
||||
${build_flags}
|
||||
cp -v \
|
||||
"target/${TARGET}/${build_type}/${package}" \
|
||||
"${COOKBOOK_STAGE}/usr/bin/${package}"
|
||||
done
|
||||
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/netstack/Cargo.toml" \
|
||||
${build_flags}
|
||||
cp -v \
|
||||
"target/${TARGET}/${build_type}/smolnetd" \
|
||||
"${COOKBOOK_STAGE}/usr/bin/smolnetd"
|
||||
|
||||
# Drivers that are built on all architectures, and NOT in drivers-initfs
|
||||
BINS=(
|
||||
alxd
|
||||
e1000d
|
||||
ihdad
|
||||
ihdgd
|
||||
ixgbed
|
||||
pcid
|
||||
pcid-spawner
|
||||
rtl8139d
|
||||
rtl8168d
|
||||
usbctl
|
||||
usbhidd
|
||||
usbhubd
|
||||
usbscsid
|
||||
virtio-netd
|
||||
xhcid
|
||||
inputd
|
||||
redoxerd
|
||||
)
|
||||
|
||||
# Add additional drivers to the list to build, that are not in drivers-initfs
|
||||
# depending on the target architecture
|
||||
case "${TARGET}" in
|
||||
i586-unknown-redox | i686-unknown-redox | x86_64-unknown-redox)
|
||||
BINS+=(ac97d bgad sb16d vboxd)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
#Build each driver in the list
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin" "${COOKBOOK_STAGE}/usr/lib/drivers"
|
||||
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
|
||||
export CARGO_PROFILE_RELEASE_PANIC=abort
|
||||
"${COOKBOOK_CARGO}" build ${build_flags} \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
$(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done)
|
||||
for bin in "${BINS[@]}"
|
||||
do
|
||||
if [[ "${bin}" == "inputd" || "${bin}" == "pcid" || "${bin}" == "pcid-spawner" || "${bin}" == "redoxerd" ]]; then
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_STAGE}/usr/bin"
|
||||
else
|
||||
cp -v "target/${TARGET}/${build_type}/${bin}" "${COOKBOOK_STAGE}/usr/lib/drivers"
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/etc/pcid"
|
||||
cp -v "${COOKBOOK_SOURCE}/drivers/initfs.toml" "${COOKBOOK_STAGE}/etc/pcid/initfs.toml"
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/etc/pcid.d"
|
||||
${FIND} "${COOKBOOK_SOURCE}/drivers" -maxdepth 3 -type f -name 'config.toml' | while read conf
|
||||
do
|
||||
driver="$(basename "$(dirname "$conf")")"
|
||||
cp -v "$conf" "${COOKBOOK_STAGE}/etc/pcid.d/$driver.toml"
|
||||
done
|
||||
"""
|
||||
5
recipes/core/binutils/recipe.toml
Normal file
5
recipes/core/binutils/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/binutils.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
33
recipes/core/bootloader/recipe.toml
Normal file
33
recipes/core/bootloader/recipe.toml
Normal file
@ -0,0 +1,33 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/bootloader.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
OUTDIR="${COOKBOOK_BUILD}"
|
||||
mkdir -v "${COOKBOOK_STAGE}/boot"
|
||||
|
||||
function bootloader {
|
||||
export TARGET="$1"
|
||||
src="$2"
|
||||
dst="$3"
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" -f "${COOKBOOK_SOURCE}/Makefile" -C "${OUTDIR}" "${OUTDIR}/${src}"
|
||||
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/boot/${dst}"
|
||||
}
|
||||
|
||||
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
|
||||
|
||||
# Build BIOS bootloader for supported architectures
|
||||
if [ "${ARCH}" == "i586" -o "${ARCH}" == "i686" -o "${ARCH}" == "x86_64" ]
|
||||
then
|
||||
bootloader "x86-unknown-none" bootloader.bin bootloader.bios
|
||||
bootloader "x86-unknown-none" bootloader-live.bin bootloader-live.bios
|
||||
fi
|
||||
|
||||
# Build UEFI bootloader for supported architectures
|
||||
if [ "${ARCH}" == "aarch64" -o "${ARCH}" == "x86_64" -o "${ARCH}" == "riscv64gc" ]
|
||||
then
|
||||
bootloader "${ARCH}-unknown-uefi" bootloader.efi bootloader.efi
|
||||
bootloader "${ARCH}-unknown-uefi" bootloader-live.efi bootloader-live.efi
|
||||
fi
|
||||
"""
|
||||
5
recipes/core/contain/recipe.toml
Normal file
5
recipes/core/contain/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/contain.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
5
recipes/core/coreutils/recipe.toml
Normal file
5
recipes/core/coreutils/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/coreutils.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
22
recipes/core/dash/recipe.toml
Normal file
22
recipes/core/dash/recipe.toml
Normal file
@ -0,0 +1,22 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/dash.git"
|
||||
branch = "redox"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
|
||||
./autogen.sh
|
||||
./configure \
|
||||
--host="${TARGET}" \
|
||||
--prefix="" \
|
||||
--enable-static \
|
||||
cross_compiling=yes
|
||||
# See https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux.
|
||||
sed -i'' -e 's|#define HAVE_GETRLIMIT 1|/* #undef HAVE_GETRLIMIT */|g' config.h
|
||||
# Skip configure
|
||||
COOKBOOK_CONFIGURE="true"
|
||||
COOKBOOK_CONFIGURE_FLAGS=()
|
||||
cookbook_configure
|
||||
"""
|
||||
18
recipes/core/extrautils/recipe.toml
Normal file
18
recipes/core/extrautils/recipe.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/extrautils.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"xz"
|
||||
]
|
||||
script = """
|
||||
# TODO: Can't be linked correctly yet
|
||||
# DYNAMIC_INIT
|
||||
|
||||
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
|
||||
install_flags+=" --features=static"
|
||||
fi
|
||||
|
||||
cookbook_cargo
|
||||
"""
|
||||
9
recipes/core/findutils/recipe.toml
Normal file
9
recipes/core/findutils/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/findutils.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cookbook_cargo --bin find
|
||||
"""
|
||||
5
recipes/core/installer/recipe.toml
Normal file
5
recipes/core/installer/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/installer.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
9
recipes/core/ion/recipe.toml
Normal file
9
recipes/core/ion/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/ion.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
# Must be statically linked
|
||||
cookbook_cargo
|
||||
"""
|
||||
10
recipes/core/kernel/recipe.toml
Normal file
10
recipes/core/kernel/recipe.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/kernel.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
make -f ${COOKBOOK_SOURCE}/Makefile
|
||||
mkdir -v "${COOKBOOK_STAGE}/boot"
|
||||
cp -v kernel "${COOKBOOK_STAGE}/boot"
|
||||
"""
|
||||
8
recipes/core/netdb/recipe.toml
Normal file
8
recipes/core/netdb/recipe.toml
Normal file
@ -0,0 +1,8 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/netdb.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
cp -rv "${COOKBOOK_SOURCE}/"* "${COOKBOOK_STAGE}"
|
||||
"""
|
||||
5
recipes/core/netutils/recipe.toml
Normal file
5
recipes/core/netutils/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/netutils.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
6
recipes/core/pkgar/recipe.toml
Normal file
6
recipes/core/pkgar/recipe.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/pkgar.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
package_path = "pkgar"
|
||||
10
recipes/core/pkgutils/recipe.toml
Normal file
10
recipes/core/pkgutils/recipe.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/pkgutils.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
# Must be statically linked
|
||||
PACKAGE_PATH=pkg-cli
|
||||
cookbook_cargo
|
||||
"""
|
||||
9
recipes/core/profiled/recipe.toml
Normal file
9
recipes/core/profiled/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/profiled.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
# Must be statically linked
|
||||
cookbook_cargo
|
||||
"""
|
||||
9
recipes/core/redoxfs/recipe.toml
Normal file
9
recipes/core/redoxfs/recipe.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/redoxfs.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
# Must be statically linked
|
||||
cookbook_cargo
|
||||
"""
|
||||
13
recipes/core/relibc/recipe.toml
Normal file
13
recipes/core/relibc/recipe.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/relibc.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
"${COOKBOOK_MAKE}" \
|
||||
-C "${COOKBOOK_SOURCE}" \
|
||||
-j"$($NPROC)" \
|
||||
CARGO="env -u CARGO cargo" \
|
||||
DESTDIR="${COOKBOOK_STAGE}" \
|
||||
install
|
||||
"""
|
||||
5
recipes/core/strace/recipe.toml
Normal file
5
recipes/core/strace/recipe.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/strace-redox.git"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
11
recipes/core/userutils/recipe.toml
Normal file
11
recipes/core/userutils/recipe.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/userutils.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
cookbook_cargo
|
||||
cp -rv "${COOKBOOK_SOURCE}/res" "${COOKBOOK_STAGE}/etc"
|
||||
ln -s id "${COOKBOOK_STAGE}/usr/bin/whoami"
|
||||
"""
|
||||
107
recipes/core/uutils/recipe.toml
Normal file
107
recipes/core/uutils/recipe.toml
Normal file
@ -0,0 +1,107 @@
|
||||
# TODO Fix coreutils i18n/l10n behavior on Redox
|
||||
[source]
|
||||
git = "https://github.com/uutils/coreutils"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
CARGO_PROFILE_RELEASE_LTO=thin cookbook_cargo --no-default-features --features feat_os_unix_redox --bin coreutils
|
||||
|
||||
BINS=(
|
||||
'['
|
||||
b2sum
|
||||
b3sum
|
||||
base32
|
||||
base64
|
||||
basename
|
||||
basenc
|
||||
cat
|
||||
chmod
|
||||
cksum
|
||||
comm
|
||||
cp
|
||||
csplit
|
||||
cut
|
||||
date
|
||||
dd
|
||||
#df not working, use redox coreutils
|
||||
dir
|
||||
dircolors
|
||||
dirname
|
||||
du
|
||||
echo
|
||||
env
|
||||
expand
|
||||
expr
|
||||
factor
|
||||
false
|
||||
fmt
|
||||
fold
|
||||
hashsum
|
||||
head
|
||||
join
|
||||
install
|
||||
link
|
||||
ln
|
||||
ls
|
||||
md5sum
|
||||
mkdir
|
||||
mktemp
|
||||
more
|
||||
mv
|
||||
nl
|
||||
numfmt
|
||||
od
|
||||
paste
|
||||
pr
|
||||
printenv
|
||||
printf
|
||||
ptx
|
||||
pwd
|
||||
readlink
|
||||
realpath
|
||||
rm
|
||||
rmdir
|
||||
seq
|
||||
sha1sum
|
||||
sha224sum
|
||||
sha256sum
|
||||
sha3-224sum
|
||||
sha3-256sum
|
||||
sha3-384sum
|
||||
sha3-512sum
|
||||
sha384sum
|
||||
sha3sum
|
||||
sha512sum
|
||||
shake128sum
|
||||
shake256sum
|
||||
shred
|
||||
shuf
|
||||
sleep
|
||||
sort
|
||||
split
|
||||
stat
|
||||
sum
|
||||
tac
|
||||
tail
|
||||
tee
|
||||
test
|
||||
touch
|
||||
tr
|
||||
true
|
||||
truncate
|
||||
tsort
|
||||
unexpand
|
||||
uniq
|
||||
unlink
|
||||
vdir
|
||||
wc
|
||||
yes
|
||||
)
|
||||
|
||||
for bin in "${BINS[@]}"
|
||||
do
|
||||
ln -sv coreutils "${COOKBOOK_STAGE}/usr/bin/$bin"
|
||||
done
|
||||
"""
|
||||
129
recipes/demos/cairodemo/cairodemo.c
Executable file
129
recipes/demos/cairodemo/cairodemo.c
Executable file
@ -0,0 +1,129 @@
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <cairo/cairo.h>
|
||||
#include <orbital.h>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265
|
||||
#endif
|
||||
|
||||
static int width = 800;
|
||||
static int height = 600;
|
||||
|
||||
static void
|
||||
travel_path (cairo_t *cr)
|
||||
{
|
||||
|
||||
cairo_pattern_t *pat;
|
||||
|
||||
pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, 256.0);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
|
||||
cairo_rectangle (cr, 0, 0, 256, 256);
|
||||
cairo_set_source (cr, pat);
|
||||
cairo_fill (cr);
|
||||
cairo_pattern_destroy (pat);
|
||||
|
||||
pat = cairo_pattern_create_radial (115.2, 102.4, 25.6,
|
||||
102.4, 102.4, 128.0);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
|
||||
cairo_set_source (cr, pat);
|
||||
cairo_arc (cr, 128.0, 128.0, 76.8, 0, 2 * M_PI);
|
||||
cairo_fill (cr);
|
||||
cairo_pattern_destroy (pat);
|
||||
|
||||
|
||||
double x = 305.6, /* parameters like cairo_rectangle */
|
||||
y = 25.6,
|
||||
width = 204.8,
|
||||
height = 204.8,
|
||||
aspect = 1.0, /* aspect ratio */
|
||||
corner_radius = height / 10.0; /* and corner curvature radius */
|
||||
|
||||
double radius = corner_radius / aspect;
|
||||
double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees);
|
||||
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees);
|
||||
cairo_arc (cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees);
|
||||
cairo_arc (cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees);
|
||||
cairo_close_path (cr);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.5, 0.5, 1);
|
||||
cairo_fill_preserve (cr);
|
||||
cairo_set_source_rgba (cr, 0.5, 0, 0, 0.5);
|
||||
cairo_set_line_width (cr, 10.0);
|
||||
cairo_stroke (cr);
|
||||
|
||||
|
||||
double xc = 128.0;
|
||||
double yc = 128.0;
|
||||
radius = 100.0;
|
||||
double angle1 = 45.0 * (M_PI/180.0); /* angles are specified */
|
||||
double angle2 = 180.0 * (M_PI/180.0); /* in radians */
|
||||
|
||||
cairo_set_line_width (cr, 10.0);
|
||||
cairo_arc (cr, xc, yc, radius, angle1, angle2);
|
||||
cairo_stroke (cr);
|
||||
|
||||
/* draw helping lines */
|
||||
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
|
||||
cairo_set_line_width (cr, 6.0);
|
||||
|
||||
cairo_arc (cr, xc, yc, 10.0, 0, 2*M_PI);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_arc (cr, xc, yc, radius, angle1, angle1);
|
||||
cairo_line_to (cr, xc, yc);
|
||||
cairo_arc (cr, xc, yc, radius, angle2, angle2);
|
||||
cairo_line_to (cr, xc, yc);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
static void
|
||||
draw (cairo_surface_t *surface)
|
||||
{
|
||||
cairo_t *cr;
|
||||
cr = cairo_create (surface);
|
||||
travel_path (cr);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
void * window = orb_window_new(-1, -1, width, height, "CairoDemo");
|
||||
|
||||
//Cairo
|
||||
uint32_t * frame_data = orb_window_data(window);
|
||||
cairo_surface_t *surface = cairo_image_surface_create_for_data((uint8_t*) frame_data, CAIRO_FORMAT_ARGB32, width, height, cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width));
|
||||
cairo_create(surface);
|
||||
draw (surface);
|
||||
|
||||
orb_window_sync(window);
|
||||
|
||||
char running = 1;
|
||||
while (running) {
|
||||
void * event_iter = orb_window_events(window);
|
||||
|
||||
OrbEventOption event_option;
|
||||
do {
|
||||
event_option = orb_events_next(event_iter);
|
||||
switch (event_option.tag) {
|
||||
case OrbEventOption_Quit:
|
||||
running = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} while (running && event_option.tag != OrbEventOption_None);
|
||||
|
||||
orb_events_destroy(event_iter);
|
||||
}
|
||||
orb_window_destroy(window);
|
||||
return 0; /* ANSI C requires main to return int. */
|
||||
}
|
||||
|
||||
25
recipes/demos/cairodemo/recipe.toml
Executable file
25
recipes/demos/cairodemo/recipe.toml
Executable file
@ -0,0 +1,25 @@
|
||||
# source is part of cookbook
|
||||
|
||||
[build]
|
||||
dependencies = [
|
||||
"cairo",
|
||||
"expat",
|
||||
"fontconfig",
|
||||
"freetype2",
|
||||
"liborbital",
|
||||
"libpng",
|
||||
"pixman",
|
||||
"zlib",
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
"${CXX}" \
|
||||
$("${PKG_CONFIG}" --cflags cairo) \
|
||||
"${COOKBOOK_RECIPE}/cairodemo.c" \
|
||||
-o cairodemo \
|
||||
-static \
|
||||
$("${PKG_CONFIG}" --libs cairo) \
|
||||
-lorbital
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
cp -v "cairodemo" "${COOKBOOK_STAGE}/bin/cairodemo"
|
||||
"""
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user