Update README.md
This commit is contained in:
parent
f7e8fd9cb8
commit
6546f490b6
38
README.md
38
README.md
@ -11,6 +11,7 @@ A very basic POSIX-based operating system for personal computers, written in C++
|
||||
- Can [load ELF programs](kernel/src/thread/ELF.cpp) from the file system as userspace tasks.
|
||||
- Boots from an [ext2](apps/preinit.cpp) root filesystem (a bit slow for now).
|
||||
- [System call](kernel/src/sys/) interface and [C Library](libc/), aiming to be mostly POSIX-compatible.
|
||||
- POSIX [signal](libc/src/signal.cpp) support.
|
||||
- Designed to be [portable](kernel/src/arch), no need to be restricted to x86_64.
|
||||
- Designed around [UTF-8](libluna/include/luna/Utf8.h).
|
||||
- Environment-agnostic [utility library](libluna/), which can be used in both kernel and userspace.
|
||||
@ -23,46 +24,19 @@ To build and run Luna, you will need to build a [GCC Cross-Compiler](https://wik
|
||||
|
||||
You should start by installing the [required dependencies](https://wiki.osdev.org/GCC_Cross_Compiler#Installing_Dependencies).
|
||||
|
||||
Additionally, some extra Luna-specific dependencies you should install are: cmake, ninja, nasm and genext2fs.
|
||||
|
||||
Then, run `tools/setup.sh` to build the toolchain.
|
||||
|
||||
This script will check whether you have the required versions of the toolchain already setup, and will skip building them if so. (This means that it is used by the build scripts to install the toolchain if it is missing before building, so you could skip running it manually.)
|
||||
|
||||
Please beware that building GCC and Binutils can take some time, depending on your machine.
|
||||
|
||||
## Building
|
||||
There are a variety of scripts for building Luna.
|
||||
|
||||
`tools/build.sh` will build the kernel, libc and binaries.
|
||||
|
||||
`tools/rebuild.sh` will do a full rebuild of the kernel, libc and binaries.
|
||||
|
||||
`tools/install.sh` will install those to the system root and initial ramdisk.
|
||||
|
||||
`tools/sync-libc.sh` will install the libc headers to the system root, build libc and install it.
|
||||
|
||||
`tools/build-iso.sh` will build, install, and make an ISO disk image named Luna.iso.
|
||||
|
||||
`tools/build-stable-iso.sh` does the same thing as build-iso.sh, but configures the kernel so that the version does not show the commit hash (used for stable versions).
|
||||
|
||||
`tools/rebuild-iso.sh` will do a clean rebuild, install, and make an ISO disk image.
|
||||
|
||||
In most cases, you should just use `run.sh`, but if you want to build without running, `build-iso.sh`.
|
||||
|
||||
## Running
|
||||
|
||||
You should have [QEMU](https://www.qemu.org/) installed.
|
||||
|
||||
You can choose between 3 run scripts:
|
||||
`tools/run.sh` is the script you should use in most cases. It will build changed files, install, make an ISO image, and run Luna in QEMU.
|
||||
|
||||
`tools/run.sh` is the one you should use in most cases. It will build changed files, install, make an ISO image, and run Luna in QEMU.
|
||||
|
||||
`tools/rebuild-and-run.sh` will rebuild, install, make an ISO, and run Luna in QEMU.
|
||||
|
||||
`tools/debug.sh` will run Luna in QEMU with a port open for GDB to connect to. (run `tools/build-debug.sh`, `tools/gdb.sh`, and then `tools/debug.sh` in a separate terminal for an optimal debugging experience)
|
||||
|
||||
Essentially, since `run.sh` builds the toolchain if it hasn't been built, builds Luna if it hasn't been built, and runs it, you could just checkout this repo, run `run.sh`, and you're done. No need for the other scripts. Those are included for more fine-grained control/building step-by-step.
|
||||
|
||||
You can pass any arguments you want to the run scripts, and those will be forwarded to QEMU. Example: `tools/run.sh -m 512M -net none -machine q35`.
|
||||
If you have no toolchain set up, `run.sh` will build it automatically, which means that you don't necessarily have to run `setup.sh` since `run.sh` does it for you.
|
||||
|
||||
## Prebuilt images
|
||||
|
||||
@ -70,7 +44,7 @@ Prebuilt ISO images (numbered) for every version can be found at [pub.cloudapio.
|
||||
|
||||
These images are built manually whenever I decide to make a new version, and thus don't reflect the latest changes on the `main` branch.
|
||||
|
||||
Every hour, my server pulls the latest commits on `main` and builds an hourly ISO image. The ten most recent ones can be found in the [hourly](https://pub.cloudapio.eu/luna/hourly) directory, and [Luna-latest.iso](https://pub.cloudapio.eu/luna/Luna-latest.iso) should always be symlinked to the newest one.
|
||||
Every hour, this server pulls the latest commits on `main` and builds an hourly ISO image. The ten most recent ones can be found in the [hourly](https://pub.cloudapio.eu/luna/hourly) directory, and [Luna-latest.iso](https://pub.cloudapio.eu/luna/Luna-latest.iso) should always be symlinked to the newest one.
|
||||
|
||||
These images do reflect the latest changes on the `main` branch, but are obviously less stable. Additionally, an hourly image will be skipped if building the latest commit of the project fails.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user