Skip to content

Commit d5a0e9e

Browse files
committed
update README.md
1 parent 334f0b4 commit d5a0e9e

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
## Quick Start for Beginners
44

5-
### 1. Clone repo
5+
### 1. Install System Dependencies
6+
7+
This step may vary depending on your operating system. Here is an example based on Ubuntu 24.04:
8+
9+
```bash
10+
$ sudo apt update
11+
$ sudo apt install -y --no-install-recommends build-essential cmake clang qemu-system qemu-system-misc
12+
```
13+
14+
### 2. Install Musl Toolchain
15+
16+
1. Download files from https://github.com/arceos-org/setup-musl/releases/tag/prebuilt
17+
2. Extract to some path, for example `/opt/riscv64-linux-musl-cross`
18+
3. Add bin folder to `PATH`, for example:
19+
```bash
20+
$ export PATH=/opt/riscv64-linux-musl-cross/bin:$PATH
21+
```
22+
23+
### 3. Clone repo
624

725
```bash
826
$ git clone --recursive https://github.com/Starry-OS/StarryOS.git
@@ -16,7 +34,7 @@ $ cd StarryOS
1634
$ git submodule update --init --recursive
1735
```
1836

19-
### 2. Setup Rust toolchain
37+
### 4. Setup Rust toolchain
2038

2139
```bash
2240
# Install rustup from https://rustup.rs or using your system package manager
@@ -27,10 +45,9 @@ $ export RUSTUP_DIST_SERVER=
2745
# Automatically download components via rustup
2846
$ cd StarryOS
2947
$ rustup target list --installed
30-
3148
```
3249

33-
### 3. Build
50+
### 5. Build
3451

3552
```bash
3653
# Default target: riscv64
@@ -42,7 +59,7 @@ $ make ARCH=loongarch64 build
4259

4360
This should also download required binary dependencies like [cargo-binutils](https://github.com/rust-embedded/cargo-binutils).
4461

45-
### 4. Prepare rootfs
62+
### 6. Prepare rootfs
4663

4764
```bash
4865
$ make img
@@ -52,7 +69,7 @@ $ make img ARCH=loongarch64
5269

5370
This will download rootfs image from [GitHub Releases](https://github.com/Starry-OS/StarryOS/releases) and setup the disk file for running on QEMU.
5471

55-
### 5. Run on QEMU
72+
### 7. Run on QEMU
5673

5774
```bash
5875
$ make run ARCH=riscv64
@@ -66,6 +83,7 @@ $ make la
6683
Note:
6784
1. You don't have to rerun the build step before running. `run` will automatically rebuild it.
6885
2. 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 img` with the new architecture before running `make run`.
86+
3. Currently we need a specially patched version of QEMU to run on LoongArch64. We'll try to fix this issue soon.
6987

7088
## Options
7189

0 commit comments

Comments
 (0)