Skip to content

Conversation

@ryanbreen
Copy link
Owner

Summary

  • Implements 5 new POSIX-compatible coreutils for the ext2 filesystem:
    • true: always exits with status 0 (16 bytes)
    • false: always exits with status 1 (17 bytes)
    • head: output first N lines of files (-n option, default 10)
    • tail: output last N lines of files (-n option, default 10)
    • wc: word, line, and byte count (-l/-w/-c options)
  • All utilities support reading from stdin and multiple file arguments
  • Updated build.sh, Cargo.toml, and create_ext2_disk.sh
  • Regenerated testdata/ext2.img with all 13 coreutils

Test plan

  • All userspace binaries compile without warnings
  • ext2.img regenerated with all coreutils in /bin/
  • Boot stages test runs (192/217 passing - TCP SHUT_WR timeout is pre-existing)

Note: This PR includes cherry-picked commit from PR #92 (TCP timing fix) - should merge after #92.

🤖 Generated with Claude Code

ryanbreen and others added 2 commits January 14, 2026 12:25
Root cause: The entire sys_execv_with_frame() was wrapped in
without_interrupts(), causing ext2 filesystem I/O to run with
interrupts disabled. This blocked timer interrupts, starved the
scheduler, and caused TCP packet processing delays in CI.

Changes:
1. Restructure sys_execv_with_frame() to only disable interrupts
   for the critical frame manipulation section, not ELF loading
2. Increase TCP test MAX_LOOPBACK_RETRIES from 3 to 10 for CI
   environments where system load causes packet processing delays

The ext2 lookup (path resolution, inode reads, file content reads)
now runs with interrupts enabled, allowing proper VirtIO operation
and timer interrupt handling.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Implements 5 new POSIX-compatible coreutils for the ext2 filesystem:

- true: always exits with status 0 (16 bytes)
- false: always exits with status 1 (17 bytes)
- head: output first N lines of files (-n option, default 10)
- tail: output last N lines of files (-n option, default 10)
- wc: word, line, and byte count (-l/-w/-c options)

All utilities:
- Support reading from stdin when no files specified
- Support multiple file arguments with headers
- Use libbreenix syscall wrappers
- Follow POSIX conventions

Updated build.sh and Cargo.toml to include new binaries.
Updated create_ext2_disk.sh to install in ext2 /bin/.
Regenerated testdata/ext2.img with all 13 coreutils.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ryanbreen ryanbreen merged commit b507d9d into main Jan 15, 2026
1 check passed
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.

2 participants