You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** Running on LoongArch64 requires QEMU 10. If the QEMU version in your Linux distribution is too old (e.g. Ubuntu), consider installing QEMU from [source](https://www.qemu.org/download/).
17
+
## Features
15
18
16
-
### 2. Install Musl Toolchain
19
+
TODO
17
20
18
-
1. Download files from https://github.com/arceos-org/setup-musl/releases/tag/prebuilt
19
-
2. Extract to some path, for example `/opt/riscv64-linux-musl-cross`
$ docker run -it --rm -v $(pwd):/workspace -w /workspace docker.cnb.cool/starry-os/arceos-build
48
+
```
43
49
44
-
# Make sure that you don't have `RUSTUP_DIST_SERVER` set
45
-
$ export RUSTUP_DIST_SERVER=
50
+
For other users, you can use the image hosted on GitHub Container Registry:
46
51
47
-
# Automatically download components via rustup
48
-
$ cd StarryOS
49
-
$ rustup target list --installed
52
+
```bash
53
+
$ docker pull ghcr.io/arceos-org/arceos-build
54
+
$ docker run -it --rm -v $(pwd):/workspace -w /workspace ghcr.io/arceos-org/arceos-build
50
55
```
51
56
52
-
### 5. Build
57
+
**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.
58
+
59
+
#### B. Manual Setup
60
+
61
+
##### i. Install System Dependencies
62
+
63
+
This step may vary depending on your operating system. Here is an example based on Debian:
This should also download required binary dependencies like [cargo-binutils](https://github.com/rust-embedded/cargo-binutils).
70
+
**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/).
71
+
72
+
##### ii. Install Musl Toolchain
73
+
74
+
1. Download files from https://github.com/arceos-org/setup-musl/releases/tag/prebuilt
75
+
2. Extract to some path, for example `/opt/riscv64-linux-musl-cross`
# Install rustup from https://rustup.rs or using your system package manager
85
+
86
+
# Automatically download components via rustup
87
+
$ cd StarryOS
88
+
$ cargo -V
89
+
```
63
90
64
-
### 6. Prepare rootfs
91
+
### 3. Prepare rootfs
65
92
66
93
```bash
67
-
$ make img
68
-
$ make img ARCH=riscv64
69
-
$ make img ARCH=loongarch64
94
+
# Default target: riscv64
95
+
$ make rootfs
96
+
# Explicit target
97
+
$ make ARCH=riscv64 rootfs
98
+
$ make ARCH=loongarch64 rootfs
70
99
```
71
100
72
-
This will download rootfs image from [GitHub Releases](https://github.com/Starry-OS/StarryOS/releases) and setup the disk file for running on QEMU.
101
+
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.
73
102
74
-
### 7. Run on QEMU
103
+
### 4. Build and run on QEMU
75
104
76
105
```bash
77
-
$ make run ARCH=riscv64
78
-
$ make run ARCH=loongarch64
106
+
# Default target: riscv64
107
+
$ make build
108
+
# Explicit target
109
+
$ make ARCH=riscv64 build
110
+
$ make ARCH=loongarch64 build
79
111
80
-
#Shortcut:
81
-
$ make rv
82
-
$ make la
112
+
#Run on QEMU (also rebuilds if necessary)
113
+
$ make ARCH=riscv64 run
114
+
$ make ARCH=loongarch64 run
83
115
```
84
116
85
117
Note:
86
-
1. You don't have to rerun the build step before running. `run` will automatically rebuild it.
87
-
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`.
118
+
1. Binary dependencies will be automatically built during `make build`.
119
+
2. You don't have to rerun `build` every time. `run` automatically rebuilds if necessary.
120
+
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`.
88
121
89
122
## What next?
90
123
91
-
You can check out the [GUI guide](./docs/gui.md) to set up a graphical environment, or explore other documentation in this folder.
124
+
You can check out the [GUI guide](./docs/x11.md) to set up a graphical environment, or explore other documentation in this folder.
92
125
93
126
If you're interested in contributing to the project, please see our [Contributing Guide](./CONTRIBUTING.md).
94
127
95
-
## Other Options
96
-
97
-
TODO
98
-
99
-
See [Makefile](./Makefile)
100
-
128
+
See more build options in the [Makefile](./Makefile).
101
129
102
130
## License
103
131
104
-
This project is now released under the Apache License 2.0. All modifications and new contributions in our project are distributed under the same license. See the [LICENSE](./LICENSE) and [NOTICE](./NOTICE) files for details.
132
+
This project is now released under the Apache License 2.0. All modifications and new contributions in our project are distributed under the same license. See the [LICENSE](./LICENSE) and [NOTICE](./NOTICE) files for details.
0 commit comments