Skip to content

Starry-OS/StarryOS

Repository files navigation

Starry OS

Quick Start

1. Install System Dependencies

This step may vary depending on your operating system. Here is an example based on Debian:

$ 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 installing QEMU from source.

2. Install Musl Toolchain

  1. Download files from https://github.com/arceos-org/setup-musl/releases/tag/prebuilt
  2. Extract to some path, for example /opt/riscv64-linux-musl-cross
  3. Add bin folder to PATH, for example:
    $ export PATH=/opt/riscv64-linux-musl-cross/bin:$PATH

3. Clone repo

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

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

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

4. Setup Rust toolchain

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

# Make sure that you don't have `RUSTUP_DIST_SERVER` set
$ export RUSTUP_DIST_SERVER=

# Automatically download components via rustup
$ cd StarryOS
$ rustup target list --installed

5. Build

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

This should also download required binary dependencies like cargo-binutils.

6. Prepare rootfs

$ make img
$ make img ARCH=riscv64
$ make img ARCH=loongarch64

This will download rootfs image from GitHub Releases and setup the disk file for running on QEMU.

7. Run on QEMU

$ make run ARCH=riscv64
$ make run ARCH=loongarch64

# Shortcut:
$ make rv
$ make la

Note:

  1. You don't have to rerun the build step before running. run will automatically rebuild it.
  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.

What next?

You can check out the GUI guide to set up a graphical environment, or explore other documentation in this folder.

Other Options

TODO

See Makefile

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 13

Languages