Skip to content

Commit 2ea3713

Browse files
committed
Released v0.6.0 and updated the user shell release notes
- Updated CHANGELOG.md with v0.6.0 release notes - Updated ROADMAP.md to mark v0.6.0 as released - Moved relative path support to v0.8.0 planned features - Updated README.md with current version status
1 parent a71049d commit 2ea3713

File tree

3 files changed

+118
-20
lines changed

3 files changed

+118
-20
lines changed

CHANGELOG.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,78 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.6.0] - 2025-11-28 - "User Shell"
11+
12+
### Overview
13+
Sixth release of ThunderOS. Implements a fully functional user-mode shell with fork+exec process launching, directory operations, and a suite of userland utilities. The shell runs entirely in user space and can execute programs from the ext2 filesystem.
14+
15+
### Added
16+
17+
#### Exec System Call (`kernel/core/process.c`)
18+
- **sys_exec Implementation**:
19+
- Load and execute ELF programs from filesystem
20+
- Replace current process image completely
21+
- Argument passing support (argv, envp)
22+
- Proper memory cleanup before loading new image
23+
24+
#### Working Directory Support
25+
- **System Calls**:
26+
- `sys_chdir(path)` - Change current working directory
27+
- `sys_getcwd(buf, size)` - Get current working directory
28+
- **Per-Process Tracking**:
29+
- Each process maintains its own cwd
30+
- Inherited by child processes on fork
31+
32+
#### Directory Operations
33+
- **System Calls**:
34+
- `sys_mkdir(path, mode)` - Create new directory
35+
- `sys_rmdir(path)` - Remove empty directory
36+
- `sys_getdents(fd, buf, count)` - Read directory entries
37+
- **ext2 Integration**:
38+
- Directory creation with proper inode allocation
39+
- Directory removal with block deallocation
40+
- Efficient directory entry iteration
41+
42+
#### File Operations
43+
- **System Calls**:
44+
- `sys_unlink(path)` - Remove file from filesystem
45+
- **ext2 Integration**:
46+
- Proper inode and block deallocation
47+
- Directory entry removal
48+
49+
#### User-Mode Shell (ush)
50+
- **Shell Features**:
51+
- Runs entirely in user space (loaded from /bin/ush)
52+
- Fork+exec model for external commands
53+
- Command line parsing and argument handling
54+
- **Built-in Commands**:
55+
- `cd <path>` - Change directory
56+
- `pwd` - Print working directory
57+
- `mkdir <name>` - Create directory
58+
- `rmdir <name>` - Remove directory
59+
- `clear` - Clear screen
60+
- `echo <text>` - Print text
61+
- `help` - Show available commands
62+
- `exit` - Exit shell
63+
- **External Commands**:
64+
- Executes programs from /bin directory
65+
- Supports: ls, cat, hello, and any ELF executable
66+
67+
#### Userland Utilities (`userland/`)
68+
- **File Utilities**:
69+
- `cat` - Display file contents
70+
- `touch` - Create empty file
71+
- `rm` - Remove file
72+
- **Directory Utilities**:
73+
- `ls` - List directory contents
74+
- `pwd` - Print working directory
75+
- `mkdir` - Create directory
76+
- `rmdir` - Remove directory
77+
- **System Utilities**:
78+
- `clear` - Clear terminal screen
79+
- `sleep` - Sleep for specified seconds
80+
- `hello` - Test program
81+
1082
### Changed
1183

1284
#### Test Infrastructure Refactoring
@@ -20,6 +92,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2092
- Organized programs into categories (Core Utilities, User Applications, Test Programs)
2193
- Added build summary with program count and output directory
2294
- Extracted common build logic into reusable `build_program()` function
95+
- **CI-friendly test runner**:
96+
- Added non-interactive mode for CI environments
97+
- Fixed TERM environment variable handling
98+
- Simple text output for pipelines
2399

24100
#### Clean Code Standards Applied to kernel/main.c
25101
- **Extracted helper functions** (all marked `static`):
@@ -42,6 +118,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42118
- **Added forward declarations** after constants section
43119
- **Initialized all variables** explicitly
44120

121+
### Technical Details
122+
123+
#### Syscall Count
124+
- Total syscalls: 32 (up from 27 in v0.5.0)
125+
- New syscalls: sys_exec, sys_chdir, sys_getcwd, sys_mkdir, sys_rmdir
126+
127+
#### Shell Architecture
128+
- Shell binary loaded from `/bin/ush` on boot
129+
- Falls back to kernel shell if user shell fails to load
130+
- Uses fork() to create child process for each command
131+
- Uses exec() in child to replace with target program
132+
- Parent waits for child with waitpid()
133+
134+
### Testing
135+
- ✅ Fork+exec works reliably
136+
- ✅ Shell commands execute correctly
137+
- ✅ Directory navigation works (absolute paths)
138+
- ✅ File/directory creation and removal works
139+
- ✅ All CI tests passing
140+
- ✅ Kernel boots and shell launches automatically
141+
45142
## [0.5.0] - 2025-11-21 - "Communication"
46143

47144
### Overview

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ A RISC-V operating system focused on AI acceleration and educational use.
44

55
## Current Status
66

7-
**Version 0.4.0 - "Persistence"** 🎯 Released!
8-
9-
-**v0.4.0 Released** - Persistent storage with VirtIO and ext2
10-
-VirtIO block device driver (modern MMIO interface)
11-
-ext2 filesystem with read/write support
12-
-Virtual Filesystem (VFS) abstraction layer
13-
-ELF64 loader for executing programs from disk
14-
-Interactive shell with ls, cat, and program execution
15-
-**Memory isolation** - Per-process page tables, VMAs, isolated heaps
16-
- 🚧 **Next**: Inter-process communication and networking (v0.5.0)
7+
**Version 0.6.0 - "User Shell"** 🎯 Released!
8+
9+
-**v0.6.0 Released** - User-mode shell with fork+exec
10+
-User-mode shell (ush) running from filesystem
11+
-Fork+exec process model for launching programs
12+
-Directory operations (mkdir, rmdir, cd, pwd)
13+
-File operations (touch, rm, cat, ls)
14+
-9 userland utilities available
15+
-32 system calls implemented
16+
- 🚧 **Next**: Graphics and virtual terminals (v0.7.0)
1717

1818
See [CHANGELOG.md](CHANGELOG.md) for complete feature list and [ROADMAP.md](ROADMAP.md) for future plans.
1919

ROADMAP.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ Initial attempt at VirtIO block driver revealed fundamental gaps in memory infra
251251

252252
---
253253

254-
## Version 0.6.0 - "User Shell" 🚧 IN PROGRESS
254+
## Version 0.6.0 - "User Shell" ✅ RELEASED
255255

256-
**Status:** In Development (started November 28, 2025)
256+
**Status:** Released on November 28, 2025
257257

258258
**Focus:** User-mode shell and process execution
259259

@@ -272,7 +272,7 @@ Initial attempt at VirtIO block driver revealed fundamental gaps in memory infra
272272
-`sys_getdents()` - Read directory entries
273273
- ✅ File operations
274274
-`sys_unlink()` - Remove file
275-
- ✅ User-mode shell (ush v0.8.0)
275+
- ✅ User-mode shell (ush)
276276
- ✅ Runs entirely in user space
277277
- ✅ Fork+exec for external commands
278278
- ✅ Shell builtins: cd, pwd, mkdir, rmdir, clear, echo, help, exit
@@ -287,24 +287,23 @@ Initial attempt at VirtIO block driver revealed fundamental gaps in memory infra
287287
- ✅ rm - Remove file
288288
- ✅ clear - Clear screen
289289
- ✅ sleep - Sleep for seconds
290-
291-
### Remaining Features
292-
- [ ] Relative path resolution in VFS (cd .., cd subdir)
293-
- [ ] Command history (up/down arrows)
294-
- [ ] Tab completion
290+
- ✅ Test infrastructure improvements
291+
- ✅ CI-friendly test runner with non-interactive mode
292+
- ✅ Clean code standards applied to kernel/main.c
293+
- ✅ Improved build scripts with visual output
295294

296295
### Testing Completed
297296
- ✅ Fork+exec works reliably
298297
- ✅ Shell commands execute correctly
299298
- ✅ Directory navigation works (absolute paths)
300299
- ✅ File/directory creation and removal works
300+
- ✅ All CI tests passing
301301

302302
**Release Criteria:**
303303
- ✅ User-mode shell runs from filesystem
304304
- ✅ Fork+exec launches programs
305305
- ✅ Basic shell builtins work
306306
- ✅ Userland utilities operational
307-
- [ ] Relative path support
308307

309308
---
310309

@@ -334,15 +333,17 @@ Initial attempt at VirtIO block driver revealed fundamental gaps in memory infra
334333
**Focus:** POSIX compatibility and advanced shell features
335334

336335
### Planned Features
336+
- [ ] Relative path resolution in VFS (cd .., cd subdir, ./program)
337337
- [ ] Environment variables
338338
- [ ] Expanded syscall set (50+ syscalls)
339-
- [ ] Relative path resolution throughout VFS
340339
- [ ] File permissions and ownership
341340
- [ ] Simple shell scripting support
342341
- [ ] Process groups and sessions
343342
- [ ] Job control (background/foreground processes)
344343
- [ ] Pipes in shell syntax (cmd1 | cmd2)
345344
- [ ] I/O redirection (>, <, >>)
345+
- [ ] Command history (up/down arrows)
346+
- [ ] Tab completion
346347

347348
**Release Criteria:**
348349
- Can run simple POSIX programs

0 commit comments

Comments
 (0)