-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use zig instead of make and add a CI
- Loading branch information
Showing
6 changed files
with
107 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Zig | ||
uses: goto-bus-stop/[email protected] | ||
with: | ||
version: master | ||
|
||
- name: Build | ||
run: zig build -Doptimize=ReleaseFast | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Zig | ||
uses: goto-bus-stop/[email protected] | ||
with: | ||
version: master | ||
|
||
- name: Lint | ||
run: zig fmt --check kernel/*.zig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
zig-cache/ | ||
zig-out/ | ||
limine/ | ||
ovmf/ | ||
*.iso | ||
*.hdd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "limine"] | ||
path = limine | ||
url = https://github.com/limine-bootloader/limine.git | ||
branch = v5.x-branch-binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,23 @@ | ||
# Système 9 | ||
x86_64 operating system in zig | ||
an operating system made with zig | ||
|
||
# TODO | ||
- use flanterm | ||
- use zig instead of make | ||
- current font is under GPL | ||
- add a CI | ||
- support RISC-V64, aarch64 and x86_64 | ||
- replace limine with a custom bootloader | ||
- add a checklist/roadmap | ||
|
||
# dependencies | ||
- all: make, zig | ||
- iso: xorriso | ||
- hdd: gptfdisk, mtools | ||
- run: qemu | ||
### clone and build | ||
|
||
# makefile targets | ||
git clone https://github.com/ratakor/os --recursive | ||
|
||
Running `make all` will compile the kernel (from the `kernel/` directory) and | ||
then generate a bootable ISO image. | ||
### build | ||
Make sure to have `xorriso` and run | ||
|
||
Running `make all-hdd` will compile the kernel and then generate a raw image | ||
suitable to be flashed onto a USB stick or hard drive/SSD. | ||
zig build image -Doptimize=ReleaseFast | ||
|
||
Running `make run` will build the kernel and a bootable ISO (equivalent to make | ||
all) and then run it using `qemu` (if installed). | ||
### run | ||
Make sure to have `qemu` and run | ||
|
||
Running `make run-hdd` will build the kernel and a raw HDD image (equivalent to | ||
make all-hdd) and then run it using `qemu` (if installed). | ||
|
||
The `run-uefi` and `run-hdd-uefi` targets are equivalent to their non `-uefi` | ||
counterparts except that they boot `qemu` using a UEFI-compatible firmware. | ||
zig build run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters