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.
/opt/riscv64-linux-musl-crossPATH, for example:
$ export PATH=/opt/riscv64-linux-musl-cross/bin:$PATH
$ 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
# 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
# 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.
$ make img $ make img ARCH=riscv64 $ make img ARCH=loongarch64 $ make img ARCH=aarch64
This will download rootfs image from GitHub Releases and setup the disk file for running on QEMU.
$ make run ARCH=riscv64
$ make run ARCH=loongarch64
# Shortcut:
$ make rv
$ make la
$ make aarch64
Note:
run will automatically rebuild it.make img with the new architecture before running make run.You can check out the GUI guide to set up a graphical environment, or explore other documentation in this folder.
TODO
See Makefile