Skip to content

Add complete userspace tooling and enhanced shell#83

Merged
xannyxs merged 23 commits intomasterfrom
add-cd
Feb 1, 2026
Merged

Add complete userspace tooling and enhanced shell#83
xannyxs merged 23 commits intomasterfrom
add-cd

Conversation

@xannyxs
Copy link
Copy Markdown
Owner

@xannyxs xannyxs commented Jan 23, 2026

This PR builds out a functional Unix-like userspace by implementing core file utilities (cat, touch, mkdir, rmdir, rm), system tools (mount, insmod, rmmod, time), and a significantly enhanced shell with builtins (cd, pwd, export, env, echo, reboot), environment variable support, and PATH-based command resolution. The shell now properly forks and executes external programs, making it a real interactive environment rather than just a command dispatcher. Added essential libc functionality including malloc/free memory allocation using sbrk, atoi for string parsing, and strchr for string manipulation, along with syscall wrappers for all the file operations, module management, and system control functions these tools require. Moved fcntl.h and other shared definitions to the uapi boundary for proper kernel-userspace separation, added the brk syscall (currently stubbed) to support future heap management, implemented the reboot syscall with magic number validation and permission checks, and changed time_t from unsigned to signed long to match POSIX conventions and avoid year 2038 issues on 32-bit systems.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 23, 2026

Deploying ferrite-c with  Cloudflare Pages  Cloudflare Pages

Latest commit: 43ec68c
Status: ✅  Deploy successful!
Preview URL: https://4b32ed52.ferrite-c.pages.dev
Branch Preview URL: https://add-cd.ferrite-c.pages.dev

View logs

@xannyxs xannyxs changed the title Add cd Add complete userspace tooling and enhanced shell Feb 1, 2026
@xannyxs xannyxs merged commit 17d9c93 into master Feb 1, 2026
2 checks passed
@xannyxs xannyxs deleted the add-cd branch February 1, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create UNIX envirnment Create a more complete shell that supports basic commands

1 participant