Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The project uses a custom `rustfmt.toml` configuration.

We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification. The commit message format is:

```
```text
<type>(<scope>): <subject>

<body>
Expand All @@ -107,7 +107,7 @@ We follow the [Conventional Commits](https://www.conventionalcommits.org/) speci

**Example**:

```
```text
feat(syscall): add epoll system call support

Implement epoll_create, epoll_ctl, and epoll_wait system calls,
Expand Down
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ TODO
### 1. Clone repo

```bash
$ git clone --recursive https://github.com/Starry-OS/StarryOS.git
$ cd StarryOS
git clone --recursive https://github.com/Starry-OS/StarryOS.git
cd StarryOS
```

Or if you have already cloned it with out `--recursive` option:
Or if you have already cloned it without `--recursive` option:

```bash
$ cd StarryOS
$ git submodule update --init --recursive
cd StarryOS
git submodule update --init --recursive
```

### 2. Install Prerequisites
Expand All @@ -43,15 +43,15 @@ We provide a prebuilt Docker image with all dependencies installed.
For users in mainland China, you can use the following image which includes optimizations like Debian packages mirrors and crates.io mirrors:

```bash
$ docker pull docker.cnb.cool/starry-os/arceos-build
$ docker run -it --rm -v $(pwd):/workspace -w /workspace docker.cnb.cool/starry-os/arceos-build
docker pull docker.cnb.cool/starry-os/arceos-build
docker run -it --rm -v $(pwd):/workspace -w /workspace docker.cnb.cool/starry-os/arceos-build
```

For other users, you can use the image hosted on GitHub Container Registry:

```bash
$ docker pull ghcr.io/arceos-org/arceos-build
$ docker run -it --rm -v $(pwd):/workspace -w /workspace ghcr.io/arceos-org/arceos-build
docker pull ghcr.io/arceos-org/arceos-build
docker run -it --rm -v $(pwd):/workspace -w /workspace ghcr.io/arceos-org/arceos-build
```

**Note:** The `--rm` flag will destroy the container instance upon exit. Any changes made inside the container (outside of the mounted `/workspace` volume) will be lost. Please refer to the [Docker documentation](https://docs.docker.com/) for more advanced usage.
Expand All @@ -63,39 +63,40 @@ $ docker run -it --rm -v $(pwd):/workspace -w /workspace ghcr.io/arceos-org/arce
This step may vary depending on your operating system. Here is an example based on Debian:

```bash
$ sudo apt update
$ sudo apt install -y build-essential cmake clang qemu-system
sudo apt update
sudo apt install -y build-essential cmake clang qemu-system
```

**Note:** Running on LoongArch64 requires QEMU 10. If the QEMU version in your Linux distribution is too old (e.g. Ubuntu), consider building QEMU from [source](https://www.qemu.org/download/).

##### ii. Install Musl Toolchain

1. Download files from https://github.com/arceos-org/setup-musl/releases/tag/prebuilt
1. Download files from [prebuilt](https://github.com/arceos-org/setup-musl/releases/tag/prebuilt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing.

2. Extract to some path, for example `/opt/riscv64-linux-musl-cross`
3. Add bin folder to `PATH`, for example:
```bash
$ export PATH=/opt/riscv64-linux-musl-cross/bin:$PATH
```

```bash
export PATH=/opt/riscv64-linux-musl-cross/bin:$PATH
```

##### iii. Setup Rust toolchain

```bash
# Install rustup from https://rustup.rs or using your system package manager

# Automatically download components via rustup
$ cd StarryOS
$ cargo -V
cd StarryOS
cargo -V
```

### 3. Prepare rootfs

```bash
# Default target: riscv64
$ make rootfs
make rootfs
# Explicit target
$ make ARCH=riscv64 rootfs
$ make ARCH=loongarch64 rootfs
make ARCH=riscv64 rootfs
make ARCH=loongarch64 rootfs
```

This will download rootfs image from [Starry-OS/rootfs](https://github.com/Starry-OS/rootfs/releases) and set up the disk file for running on QEMU.
Expand All @@ -104,17 +105,18 @@ This will download rootfs image from [Starry-OS/rootfs](https://github.com/Starr

```bash
# Default target: riscv64
$ make build
make build
# Explicit target
$ make ARCH=riscv64 build
$ make ARCH=loongarch64 build
make ARCH=riscv64 build
make ARCH=loongarch64 build

# Run on QEMU (also rebuilds if necessary)
$ make ARCH=riscv64 run
$ make ARCH=loongarch64 run
make ARCH=riscv64 run
make ARCH=loongarch64 run
```

Note:

1. Binary dependencies will be automatically built during `make build`.
2. You don't have to rerun `build` every time. `run` automatically rebuilds if necessary.
3. The disk file will **not** be reset between each run. As a result, if you want to switch to another architecture, you must run `make rootfs` with the new architecture before `make run`.
Expand Down
40 changes: 20 additions & 20 deletions docs/x11.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ StarryOS supports X11 for GUI.

1. Make sure you run StarryOS with necessary flags:

```bash
make img ARCH=riscv64
make run ARCH=riscv64 GRAPHIC=y INPUT=y
```
```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] 3 spaces indentation might be better.

make img ARCH=riscv64
make run ARCH=riscv64 GRAPHIC=y INPUT=y
```

2. In StarryOS, install necessary dependencies:

```bash
apk add xorg-server xf86-video-fbdev xf86-input-evdev
```
```bash
apk add xorg-server xf86-video-fbdev xf86-input-evdev
```

3. Start the X server and set the DISPLAY environment variable:

```bash
X &
export DISPLAY=:0
```
```bash
X &
export DISPLAY=:0
```

4. You can now run graphical applications, for example:

```bash
apk add xcalc
xcalc
```
```bash
apk add xcalc
xcalc
```

`dwm` is also available as a lightweight window manager.
`dwm` is also available as a lightweight window manager.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this to "5."


```bash
apk add dwm
dwm &
```
```bash
apk add dwm
dwm &
```