Skip to content

Commit 813cac1

Browse files
authored
Merge pull request #14 from Voxi0/main
feat: updated limine to latest version, prettier readme, moved website for emexos to this repo and got rid of a bunch of compiler warnings
2 parents 94ea216 + a644701 commit 813cac1

100 files changed

Lines changed: 2283 additions & 134 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
trim_trailing_whitespaces = true
6+
insert_final_newline = false
7+
charset = utf-8
8+
9+
[*.nix]
10+
indent_size = 2
11+
12+
[*.{c,h,ld}]
13+
indent_size = 4

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy website
2+
3+
# Set permissions of the `GITHUB_TOKEN` to allow deployment to Github Pages
4+
permissions:
5+
contents: read
6+
pages: write
7+
id-token: write
8+
9+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued
10+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete
11+
concurrency:
12+
group: "pages"
13+
cancel-in-progress: false
14+
15+
# Workflow triggers
16+
on:
17+
# Whenever any changes are made to `web/` from either a push or merging a pull request
18+
push:
19+
paths:
20+
- "web/**"
21+
pull_request:
22+
paths:
23+
- "web/**"
24+
25+
# Allows you to run this workflow manually from the Actions tab
26+
workflow_dispatch:
27+
28+
# Workflow actions
29+
jobs:
30+
deploy:
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
# Clone repository
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
# Configure Github Pages
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v5
43+
44+
# Upload build - In this case it's just static files e.g. HTML and CSS
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
# Upload specific directory
49+
path: './web'
50+
51+
# Deploy to Github Pages
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ all: $(ISO)
1515
fetchDeps:
1616
@echo "[DEPS] Fetching dependencies/libraries"
1717
@mkdir -p $(INCLUDE_DIR)
18-
#@mkdir -p $(BUILD_DIR)/src/kernel/console/functions
18+
1919
@echo "[DEPS] Fetching Limine"
20-
@rm -rf $(INCLUDE_DIR)/limine
21-
@git clone https://codeberg.org/Limine/Limine.git --branch=v10.3.0-binary --depth=1 $(INCLUDE_DIR)/limine
22-
@echo "[DEPS] Building limine binary"
23-
@$(MAKE) -C $(INCLUDE_DIR)/limine
20+
@rm -rf $(LIMINE_DIR)
21+
@git clone https://codeberg.org/Limine/Limine.git --branch=v10.x-binary --depth=1 $(LIMINE_DIR)
22+
@rm -rf $(LIMINE_DIR)/.git
23+
@echo "[DEPS] Fetching Limine protocol header file"
24+
@wget https://codeberg.org/Limine/limine-protocol/raw/branch/trunk/include/limine.h -O $(LIMINE_DIR)/limine.h
2425

2526
disk:
2627
@mkdir -p $(DISK_DIR)
@@ -34,12 +35,12 @@ $(BUILD_DIR)/kernel.elf: src/kernel/linker.ld $(OBJS)
3435
userspace:
3536
@$(MAKE) -C src/userspace
3637

37-
# Ensure host limine tool exists (Linux/macOS binary).
38+
# Compile Limine
3839
$(LIMINE_TOOL):
3940
@$(MAKE) -C $(LIMINE_DIR)
4041

4142
# Create bootable ISO
42-
$(ISO): limine.conf $(BUILD_DIR)/kernel.elf disk userspace $(LIMINE_TOOL)
43+
$(ISO): limine.conf $(LIMINE_TOOL) $(BUILD_DIR)/kernel.elf disk userspace
4344
@echo "[ISO] Creating bootable image..."
4445
@rm -rf $(ISODIR)
4546
@rm -f $(DISK_DIR)/initrd.cpio
@@ -76,7 +77,6 @@ $(ISO): limine.conf $(BUILD_DIR)/kernel.elf disk userspace $(LIMINE_TOOL)
7677
./tools/initrd.sh
7778
@cp $(DISK_DIR)/initrd.cpio $(ISODIR)/boot/
7879

79-
8080
@xorriso -as mkisofs -b boot/limine/limine-bios-cd.bin \
8181
-no-emul-boot -boot-load-size 4 -boot-info-table \
8282
--efi-boot boot/limine/limine-uefi-cd.bin \
@@ -119,4 +119,4 @@ $(BUILD_DIR)/%.asm.o: %.asm
119119
clean:
120120
@echo "[CLR] Cleaning..."
121121
@rm -rf $(BUILD_DIR)
122-
@echo "[OK]"
122+
@echo "[OK]"

README.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
# emexOS - a simple 64 Bit OS written in C
2-
31
<div align="center">
4-
<img src="./screenshots/screen_size1.png" width="50%">
5-
<img src="./screenshots/login.png" width="50%">
2+
<h1>emexOS</h1>
3+
<h5>a simple 64-bit os written in c</h5>
4+
5+
![Discord Badge](https://img.shields.io/badge/Join%20the%20Discord-Black?style=for-the-badge&logo=discord&logoColor=white&color=black)
6+
7+
![GitHub License](https://img.shields.io/github/license/emexos/emexOS1?style=for-the-badge&label=License&labelColor=black&color=white)
8+
![GitHub repo size](https://img.shields.io/github/repo-size/emexos/emexOS1?style=for-the-badge&label=size&labelColor=black&color=white)
9+
![GitHub Repo stars](https://img.shields.io/github/stars/emexos/emexos1?style=for-the-badge&labelColor=black&color=white)
10+
611
</div>
712

813
## Build Dependencies
@@ -11,46 +16,45 @@ For building and compiling emexOS, ensure you have the following installed,
1116
- [NASM](https://www.nasm.us/) - Assembler.
1217
- [QEMU](https://www.qemu.org/) - Our preferred emulator.
1318
- [Xorriso](https://www.gnu.org/software/xorriso/) - ISO creation.
14-
- [Git](https://git-scm.com/) - To fetch dependencies.
19+
- [Git](https://git-scm.com/) and [wget](https://www.gnu.org/software/wget/) - To fetch dependencies.
1520

16-
You can use Zig instead of x86_64-gcc if you prefer to,
17-
- [Zig](https://ziglang.org/) - Zig lets you build the whole OS using just one command.
21+
You can use [Zig](https://ziglang.org/) instead of GCC if you prefer to.
1822

1923
## For Nix Users
20-
If you’re using [Nix](https://nixos.org/), you can run the provided flake that installs all the build dependencies. That way, you can set up a complete emexOS development environment with a single, simple command.
24+
Ensure you have flakes enabled first and then run `nix develop` to enter the provided development shell which will have all build dependencies and such installed for you. I'd recommend updating the flake using `nix flake update` as it's sometimes not updated for long periods of time.
2125

2226
## Building and Compiling
23-
Now that you have all the required build dependencies installed, you can finally build and run emexOS.
27+
With all build dependencies installed, you can finally build and run emexOS.
28+
> [!CAUTION]
29+
> If booting emexOS on real hardware, ensure your device has no existing data or else emexOS **WILL DELETE IT WITHOUT ASKING**
2430
2531
**Using gnu-make**
26-
- `make fetchDeps` - Fetches all libraries and such that emexOS depends on. Obviously `git` is used for this operation.
27-
- `make` - Builds emexOS.
28-
- `make run` - Emulates emexOS using QEMU.
29-
- `make clean` - Cleans up all build outputs.
32+
- `make fetchDeps` - Fetch all libraries and such that emexOS depends on e.g. Limine. `git` and `wget` are used for this.
33+
- `make` - Build emexOS.
34+
- `make run` - Emulate emexOS using QEMU.
35+
- `make clean` - Clean up all build outputs.
3036

3137
**Using Zig**
3238
- `zig build` - Fetch, build and run.
3339
- `zig build -Dnofetch` - Build and run.
3440
- `zig build -Dclean` - Remove (cache, output), fetch, build and run.
3541
- `zig build -Dnofetch -Dclean` - Remove (cache, output), build and run.
3642

37-
## Running
38-
to run emexOS on QEMU use `make run`
39-
on real hardware make sure your device does not have any existing data on the disk, emexOS will delete it without asking! (soon there will be a menu which asks you)
40-
4143
## Console
42-
After the bootup emexOS will ask you about a password to login. the password is "emex", but you can change that in shared/config/user.h
44+
After booting, you will be asked for a password which is "emex" by default, to log in. The password can be changed in `shared/config/user.h`.
4345

44-
currently there is no smp support btw so if you run emexOS just use one core
46+
Currently, no SMP support is available just yet so emexOS runs using only a single core.
4547

46-
---
47-
48-
## License:
49-
- GNU GPLv3
50-
- Attribution required (see ATTRIBUTION.md)
48+
<div align="center">
49+
<h2>Contributors</h2>
50+
<a href="https://github.com/emexos/emexOS1/graphs/contributors">
51+
<img src="https://contrib.rocks/image?repo=emexos/emexOS1" />
52+
</a>
53+
<p>Made with [contrib.rocks](https://contrib.rocks).</p>
54+
</div>
5155

56+
---
5257

53-
## Writer
54-
- README.md by Voxi0 & emexSW & Bi Moz
55-
- emexOS project started by emexSW
56-
##
58+
<div align="center">
59+
<p><bold>emexOS - by emexSW</bold></p>
60+
</div>

common.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ VLD = @echo "[LD] $@" && $(LD)
1515
# Compiler Flags
1616
COMMON_FLAGS += -I $(INCLUDE_DIR) -I $(SRC_DIR) -I shared/ -ffreestanding -fno-stack-protector -fno-lto \
1717
-fno-PIE -fno-pic -m64 -march=x86-64 -mno-80387 -mno-mmx \
18-
-mno-sse -mno-sse2 -mno-red-zone -mcmodel=kernel -Wall -Wextra
19-
CFLAGS ?= $(COMMON_FLAGS) -std=gnu11
18+
-mno-sse -mno-sse2 -mno-red-zone -mcmodel=kernel -Wall -Wextra -Wpedantic
19+
CFLAGS ?= $(COMMON_FLAGS) -std=c23
2020
CXXFLAGS ?= $(COMMON_FLAGS) -std=c++17 -fno-exceptions -fno-rtti
2121
LDFLAGS ?= -nostdlib -static -no-pie -z text -z max-page-size=0x1000
2222
ASFLAGS ?= -f elf64
@@ -32,4 +32,4 @@ DISK_DIR := dsk
3232
DISK_IMG := $(DISK_DIR)/disk.img
3333
INCLUDE_DIR := include
3434
ISODIR := $(BUILD_DIR)/isodir
35-
ISO := $(BUILD_DIR)/$(OS_NAME).iso
35+
ISO := $(BUILD_DIR)/$(OS_NAME).iso

docs/Building emexOS from source

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/Emulating_emexOS_binary_using_QEMU.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ The easiest way to run emexOS is to run it in QEMU.
1111
- Choose either to enable storage or not to.
1212
- Keep the default options and select "finish".
1313

14-
Learn how to install QEMU in [Arch](https://github.com/BloopBiMoz/emexOS1/blob/main/docs/QEMU_Arch.md) and [Debian](https://github.com/BloopBiMoz/emexOS1/blob/main/docs/QEMU_Debian.md) based distributions.
14+
Learn how to install QEMU in [Arch](./QEMU_Arch.md) and [Debian](./QEMU_Debian.md) based distributions.

dsk/initrd.cpio

1.5 KB
Binary file not shown.

dsk/rd/bin/echo.elf

256 Bytes
Binary file not shown.

dsk/rd/bin/hello.elf

256 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)