Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
695ae6c
Fixed physical memory leak on process exit and incorrect free in page…
byteshiftlabs Mar 15, 2026
1c561dd
Fixed lost wakeup race in cond_wait and wrong wake semantics in cond_…
byteshiftlabs Mar 15, 2026
fe34c6e
Implemented signal frame save/restore with sigreturn trampoline
byteshiftlabs Mar 16, 2026
306f9cd
Fixed kmalloc_aligned to return properly aligned memory
byteshiftlabs Mar 16, 2026
3de80a1
Fixed quick-win SERIOUS issues: S6, S8, S13, S14
byteshiftlabs Mar 16, 2026
c283f2c
Fixed wait_queue_sleep silently failing on kmalloc failure (S11)
byteshiftlabs Mar 16, 2026
cb54616
Added interrupt protection to pipe buffer operations (S7)
byteshiftlabs Mar 16, 2026
6b337ee
Fixed TOCTOU race on parent pointer in process_exit (S5)
byteshiftlabs Mar 16, 2026
c95c9b7
Added process_lock to process_get and process_get_by_index (S10)
byteshiftlabs Mar 16, 2026
e798263
Added interrupt protection to PMM bitmap operations (S1)
byteshiftlabs Mar 16, 2026
81d686b
Added interrupt protection to user sync object create/destroy (S2)
byteshiftlabs Mar 16, 2026
380733f
Fixed sys_waitpid busy-wait with proper sleep (S3)
byteshiftlabs Mar 16, 2026
f6a53da
Replaced sys_sleep busy-wait with proper timed sleep (S4)
byteshiftlabs Mar 16, 2026
cd7c050
Cleaned up all MINOR code review issues (M1-M8, M10)
byteshiftlabs Mar 16, 2026
24c9a68
Removed networking test scripts (belong to feature/networking branch)
byteshiftlabs Mar 16, 2026
5c4f98d
Fixed menvcfg CSR assembler error by using numeric address 0x30A
byteshiftlabs Mar 16, 2026
0af6c9a
Moved userland to git submodule (byteshiftlabs/thunderos-userland)
byteshiftlabs Mar 16, 2026
de669e2
Added submodule clone instruction to README
byteshiftlabs Mar 16, 2026
1ffd29b
Added unit tests for PMM, kmalloc alignment, and errno; wired previou…
byteshiftlabs Mar 16, 2026
b9eb049
Redesigned test output to gtest-style format
byteshiftlabs Mar 16, 2026
0cfb9e0
Fixed header box alignment in run_all_tests.sh
byteshiftlabs Mar 16, 2026
cda0e65
Updated documentation for v0.9.0 release
byteshiftlabs Mar 16, 2026
3806c1f
Added gtest_export_counts for grand total aggregation in test runner
byteshiftlabs Mar 16, 2026
a68b1ba
Fixed code review issues: VirtIO polling, ELF permissions, mmap/open …
byteshiftlabs Mar 16, 2026
6c831ec
Fixed ext2 errno propagation, added -Werror, added filesystem tests
byteshiftlabs Mar 16, 2026
8a17a19
Fixed all blocker and serious issues from v0.9.1 code review
byteshiftlabs Mar 16, 2026
b98f91f
Fixed all minor issues from v0.9.1 code review (M1-M10)
byteshiftlabs Mar 16, 2026
7680fe0
Finalized audit fixes and supported QEMU workflow
byteshiftlabs Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
build-*/
*.o
*.elf
*.bin
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "userland"]
path = userland
url = https://github.com/byteshiftlabs/thunderos-userland.git
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Thank you for your interest in contributing to ThunderOS! This guide will help y

2. **Check current status**
- Look at the README banner for any active code freezes
- See [FREEZE.md](FREEZE.md) if a freeze is active
- Review open issues and pull requests

3. **Set up your environment**
Expand Down
53 changes: 41 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ INCLUDE_DIR := include
# Build configuration
ENABLE_TESTS ?= 0
TEST_MODE ?= 0
SINGLE_SHELL ?= 0

# Compiler flags
CFLAGS := -march=rv64gc -mabi=lp64d -mcmodel=medany
CFLAGS += -nostdlib -nostartfiles -ffreestanding -fno-common
CFLAGS += -O0 -g -Wall -Wextra
CFLAGS += -O0 -g -Wall -Wextra -Werror
CFLAGS += -I$(INCLUDE_DIR)

# Enable kernel tests (set ENABLE_TESTS=0 to disable)
Expand All @@ -44,6 +45,11 @@ ifeq ($(TEST_MODE),1)
CFLAGS += -DTEST_MODE
endif

# Single-shell mode: launch only one user shell in normal runtime.
ifeq ($(SINGLE_SHELL),1)
CFLAGS += -DSINGLE_SHELL_MODE
endif

# Linker flags
LDFLAGS := -nostdlib -T kernel/arch/riscv64/kernel.ld

Expand All @@ -63,7 +69,17 @@ KERNEL_C_SOURCES := $(wildcard $(KERNEL_DIR)/*.c) \
ifeq ($(ENABLE_TESTS),1)
KERNEL_C_SOURCES += tests/unit/test_memory_mgmt.c \
tests/unit/test_elf.c \
tests/unit/test_memory_isolation.c
tests/unit/test_memory_isolation.c \
tests/unit/test_vterm.c \
tests/unit/test_pmm.c \
tests/unit/test_kmalloc.c \
tests/unit/test_errno.c \
tests/unit/test_ext2_vfs.c \
tests/unit/test_wait_queue.c \
tests/unit/test_sync_primitives.c \
tests/unit/test_syscalls.c \
tests/unit/test_pipes.c \
tests/unit/test_scheduler_soak.c
endif

KERNEL_ASM_SOURCES := $(wildcard $(KERNEL_DIR)/arch/riscv64/*.S)
Expand Down Expand Up @@ -128,6 +144,7 @@ help:
@echo "$(BOLD)Run Targets:$(RESET)"
@echo " $(GREEN)make run$(RESET) Build and run in QEMU (text mode)"
@echo " $(GREEN)make qemu$(RESET) Same as 'make run'"
@echo " $(GREEN)make qemu-docker$(RESET) Run in Docker with supported QEMU 10.1.2"
@echo " $(GREEN)make qemu-gpu$(RESET) Run with VirtIO GPU (VNC on :5900)"
@echo " $(GREEN)make qemu-gpu-web$(RESET) Run with GPU + noVNC (http://localhost:6080)"
@echo ""
Expand Down Expand Up @@ -256,20 +273,32 @@ force_fs: userland
@echo ""

userland:
@echo ""
@echo "$(BOLD)$(BLUE)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$(RESET)"
@echo "$(BOLD)$(BLUE) Building Userland Programs$(RESET)"
@echo "$(BOLD)$(BLUE)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$(RESET)"
@chmod +x build_userland.sh
@./build_userland.sh
@echo "$(BOLD)$(BLUE)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$(RESET)"
@echo ""
@if [ ! -f userland/lib/user.ld ]; then \
echo ""; \
echo "$(RED)✗ Userland submodule not initialized$(RESET)"; \
echo " Run: git submodule update --init --recursive"; \
echo ""; \
exit 1; \
else \
echo ""; \
echo "$(BOLD)$(BLUE)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$(RESET)"; \
echo "$(BOLD)$(BLUE) Building Userland Programs$(RESET)"; \
echo "$(BOLD)$(BLUE)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$(RESET)"; \
chmod +x build_userland.sh; \
./build_userland.sh; \
echo "$(BOLD)$(BLUE)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━$(RESET)"; \
echo ""; \
fi

test:
@cd tests/scripts && bash test_runner.sh
@cd tests/scripts && bash run_all_tests.sh

test-quick:
@cd tests/scripts && bash test_runner.sh --quick
@cd tests/scripts && bash run_all_tests.sh --quick

qemu-docker:
@chmod +x run_os_docker.sh
@./run_os_docker.sh

qemu: userland fs
@rm -f $(BUILD_DIR)/kernel/main.o
Expand Down
Loading
Loading