AI
|
d1bf69ce0d
|
Add sysfs VFS driver, SYS_OPEN/CLOSE syscalls, cat app
Sysfs:
- New VFS driver mounted at /sys that lets kernel drivers expose
virtual text files via namespace registration
- Drivers call sysfs_register(name, ops, ctx) with list/read/write
callbacks for their namespace
- IDE driver registers 'ide' namespace exposing per-device attributes:
model, type, channel, drive, sectors, sector_size
- Tested: ls /sys -> ide, ls /sys/ide -> hdd1 cd1,
cat /sys/ide/hdd1/model -> QEMU HARDDISK
Syscalls:
- Added SYS_OPEN (11) and SYS_CLOSE (12) for file I/O from userspace
- Extended SYS_READ/SYS_WRITE to handle VFS file descriptors (fd >= 3)
- Updated userspace syscalls.h with open()/close() wrappers
Apps:
- New 'cat' app: reads and displays file contents via open/read/close
- Updated 'ls' to accept path argument via ARG1 env var
- Updated shell to pass ARG1 env var to external commands
|
2026-02-23 14:26:52 +00:00 |
|
AI
|
c25ba1fccd
|
feat: shell (sh) with keyboard driver, SYS_READ, SYS_EXEC
- PS/2 keyboard driver: IRQ1 handler, scancode set 1 translation,
ring buffer, shift key support
- SYS_READ (fd=0): non-blocking keyboard read for stdin
- SYS_YIELD: calls schedule_tick directly (no nested INT 0x80)
- SYS_EXEC: loads binary from CPIO initrd, replaces process image
- User-space libc: crt0.S (C runtime startup), syscalls.h (inline
syscall wrappers, basic string functions)
- Shell app (sh): readline with echo/backspace, builtins (cd, env,
help, exit), fork+exec for external commands
- Updated build_apps.sh: C app support with crt0 linking, libc
include path, .bss section in objcopy
Tested: shell boots, keyboard input works, hello-world runs via
fork+exec, env shows CWD, exit cleanly terminates.
|
2026-02-23 13:08:06 +00:00 |
|