Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/theseus_main' into graphics
Browse files Browse the repository at this point in the history
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
  • Loading branch information
tsoutsman committed Nov 23, 2023
2 parents ef1b4f2 + 3f339e1 commit bfdd747
Show file tree
Hide file tree
Showing 96 changed files with 2,203 additions and 1,122 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name: QEMU Test
on:
pull_request:
types: [synchronize, opened, reopened]
paths-ignore:
- 'book/**'
- 'c_test/**'
- 'docker/**'
- 'github_pages/**'
- 'old_crates/**'
- 'scripts/**'
- '.gitignore'
- 'LICENSE-MIT'
- 'README.md'
- 'bochsrc.txt'
- 'rustfmt.toml'
- 'slirp.conf'
jobs:
run-tests:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ github_pages/doc/

# library lock files
/libs/**/Cargo.lock

# macOS directory stores
/**/.DS_Store
62 changes: 41 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ exclude = [
"build",
"target",

## Exclude the `aarch64` directory, which is a WIP port that currently must be built separately.
"aarch64",

## Exclude configuration, tools, scripts, etc
"cfg",
"compiler_plugins",
Expand All @@ -45,7 +42,6 @@ exclude = [

## Exclude old components
"old_crates",
"userspace",

## Exclude third-party libs and ports for now.
## This allows Theseus crates that *are* included in a build to pull these
Expand Down Expand Up @@ -73,13 +69,15 @@ exclude = [
## Exclude benchmark-related crates in all builds; they must be explicitly included via features.
## TODO: move these to a specific "benches" folder so we can exclude that entire folder.
"applications/bm",
"applications/channel_eval",
"applications/heap_eval",
"applications/rq_eval",
"applications/scheduler_eval",

## Exclude application crates used for testing specific Theseus functionality.
## TODO: move these to a specific "tests" folder so we can exclude that entire folder.
"applications/test_aligned_page_allocation",
"applications/test_async",
"applications/test_backtrace",
"applications/test_block_io",
"applications/test_channel",
Expand All @@ -89,13 +87,15 @@ exclude = [
"applications/test_libc",
"applications/test_mlx5",
"applications/test_panic",
"applications/test_preemption_counter",
"applications/test_restartable",
"applications/test_serial_echo",
"applications/test_scheduler",
"applications/test_std_fs",
"applications/test_sync_block",
"applications/test_task_cancel",
"applications/test_tls",
"applications/test_wait_queue",
"applications/test_wasmtime",
"applications/tls_test",
"applications/unwind_test",
]

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ SHELL := /bin/bash
## Cargo already handles build parallelism for us anyway.
.NOTPARALLEL:

## Override the locale as building on non-English systems may fail.
## Or even worse: it might build, but not boot.
## Overriding LC_ALL instead throws bash warnings.
## C.UTF-8 should be available on all modern glibc systems.
export override LANG="C.UTF-8"

## most of the variables used below are defined in Config.mk
include cfg/Config.mk

Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Theseus OS

[![Documentation Action](https://img.shields.io/github/actions/workflow/status/theseus-os/Theseus/docs.yaml?label=docs%20build)](https://github.com/theseus-os/Theseus/actions/workflows/docs.yaml)
[![Documentation](https://img.shields.io/badge/view-docs-blue)](https://theseus-os.github.io/Theseus/doc/___Theseus_Crates___/index.html)
[![Book](https://img.shields.io/badge/view-book-blueviolet)](https://theseus-os.github.io/Theseus/book/index.html)
[![Blog](https://img.shields.io/badge/view-blog-orange)](https://theseus-os.com)
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=flat&logo=discord&logoColor=white)](https://discord.gg/NuUnqeYT8R)
<br>
[![Build Action](https://img.shields.io/github/actions/workflow/status/theseus-os/Theseus/docs.yaml?label=build)](https://github.com/theseus-os/Theseus/actions/workflows/docs.yaml)
[![Clippy Action](https://img.shields.io/github/actions/workflow/status/theseus-os/Theseus/check-clippy.yaml?label=clippy)](https://github.com/theseus-os/Theseus/actions/workflows/check-clippy.yaml)
[![QEMU tests](https://img.shields.io/github/actions/workflow/status/theseus-os/Theseus/test.yaml?label=QEMU%20tests)](https://github.com/theseus-os/Theseus/actions/workflows/test.yaml)


Theseus is a new OS written from scratch in [Rust](https://www.rust-lang.org/) to experiment with novel OS structure, better state management, and how to leverage **intralingual design** principles to shift OS responsibilities like resource management into the compiler.

Expand Down Expand Up @@ -100,8 +104,10 @@ If you're on WSL, also do the following steps:
```sh
rm -rf /tmp/theseus_tools_src
```

* If you're building Theseus on an M1-based Mac, you may need to use `gmake` instead of `make` for build commands. Alternatively, you can use `bash` with x86 emulation, but this is generally not necessary.
* **NOTE**: on MacOS, you need to run `gmake` instead of `make` for build commands (or you can simply create a shell alias).
* This is because HomeBrew installs its binaries in a way that doesn't conflict with built-in versions of system utilities.
* *(This is typically not necessary)*: if you're building Theseus on older Apple Silicon (M1 chips), you may need to use `bash` with x86 emulation:
```sh
arch -x86_64 bash # or another shell of your choice
```
Expand Down Expand Up @@ -240,7 +246,7 @@ make view-book ## for the Theseus book
We have tested Theseus on a variety of real machines, including Intel NUC devices, various Thinkpad laptops, and Supermicro servers.
Currently, we have only tested booting Theseus via USB or PXE using a traditional BIOS bootloader rather than UEFI, but UEFI is fully supported so it should work.
To boot over USB, simply run `make boot usb=sdc`, in which `sdc` is the device node for the USB disk itself *(**not a partition** like sdc2)* to which you want to write the OS image.
To boot over USB, simply run `make usb drive=sdc`, in which `sdc` is the device node for the USB disk itself *(**not a partition** like sdc2)* to which you want to write the OS image.
On WSL or other host environments where `/dev` device nodes don't exist, you can simply run `make iso` and burn the `.iso` file in the `build/` directory to a USB, e.g., using [Rufus](https://rufus.ie/) on Windows.
To boot Theseus over PXE (network boot), see [this set of separate instructions](https://theseus-os.github.io/Theseus/book/running/pxe.html).
Expand Down
Loading

0 comments on commit bfdd747

Please sign in to comment.